summaryrefslogtreecommitdiff
path: root/modules/CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp
blob: f1dfac65400d0ef18dd3fd0b356b17ee3e6f2230 (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
32
33
34
35
36
37
38
39
40
// $Id$

#include "MapView.h"
#include <stdlib.h>

#include "worldmap1.xpm"

MapView::MapView(
  Q3Canvas& c,
  QWidget* parent,
  const char* name,
  Qt::WindowFlags f)
  :
  Q3CanvasView(&c, parent, name, f),
  bg_pixmap_(worldmap1)
{
  viewport()->setBackgroundMode(Qt::NoBackground);
  enableClipper(TRUE);
  if(!bg_pixmap_.isNull())
  {
    resizeContents(bg_pixmap_.width(), bg_pixmap_.height());
  }
  else
    resizeContents(100, 100);

  canvas()->setBackgroundPixmap(bg_pixmap_);
}

void
MapView::clear()
{
  /*
  QCanvasItemList list = canvas()->allItems();
  for(QCanvasItemList::Iterator it = list.begin(); it != list.end(); ++it)
    {
      if(*it)
        delete *it;
    }
  */
}