diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-03-18 22:23:37 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-03-18 22:23:37 +0000 |
commit | 06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b (patch) | |
tree | 8815ce3b3a85c3c4285429295f338e00ea4497f4 /CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp | |
parent | d66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de (diff) | |
download | ATCD-Static_RT_DAnCE.tar.gz |
Diffstat (limited to 'CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp')
-rw-r--r-- | CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp b/CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp new file mode 100644 index 00000000000..8f8f7ecd69b --- /dev/null +++ b/CIAO/examples/Display/NavDisplayGUI_exec/MapView.cpp @@ -0,0 +1,38 @@ +// $Id$ + +#include "MapView.h" +#include <stdlib.h> + +#include "worldmap1.xpm" + +MapView::MapView( + QCanvas& c, + QWidget* parent, + const char* name, + WFlags f) + : + QCanvasView(&c, parent, name, f), + bg_pixmap_(worldmap1) +{ + viewport()->setBackgroundMode(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; + }*/ +} |