blob: e70874d4b99db0892ff8d926327f946255435440 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// $Id$
#include "MapView.h"
#include <stdlib.h>
#include "worldmap1.xpm"
MapView::MapView(
QGraphicsScene& c,
QWidget* parent )
:
QGraphicsView(&c, parent),
bg_pixmap_(worldmap1)
{
setSceneRect (0,0, 601, 388);
setMinimumSize(bg_pixmap_.width() -10, bg_pixmap_.height() -10);
}
void
MapView::clear()
{
}
void
MapView::resizeEvent (QResizeEvent * event)
{
QSize old = event->oldSize();
QSize size(this->width(), this->height());
QPixmap oo = bg_pixmap_.scaled(this->width() , this->height());
setBackgroundBrush(QBrush(oo));
}
|