blob: 96978bd84bff5ecea79b701b31a1494c5af2fe89 (
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
|
#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*/)
{
QPixmap oo = bg_pixmap_.scaled(this->width() , this->height());
setBackgroundBrush(QBrush(oo));
}
|