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