summaryrefslogtreecommitdiff
path: root/CIAO/examples/Display/NavDisplayGUI_exec/RootPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/examples/Display/NavDisplayGUI_exec/RootPanel.cpp')
-rw-r--r--CIAO/examples/Display/NavDisplayGUI_exec/RootPanel.cpp90
1 files changed, 0 insertions, 90 deletions
diff --git a/CIAO/examples/Display/NavDisplayGUI_exec/RootPanel.cpp b/CIAO/examples/Display/NavDisplayGUI_exec/RootPanel.cpp
deleted file mode 100644
index c6737ee96c0..00000000000
--- a/CIAO/examples/Display/NavDisplayGUI_exec/RootPanel.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-#include "RootPanel.h"
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qprogressdialog.h>
-#include <stdlib.h>
-#include <qsplitter.h>
-#include "NodeItem.h"
-#include "Command.h"
-
-
-RootPanel::RootPanel(QCanvas &c, QWidget *parent, const char *name)
-: QMainWindow(parent, name), canvas(c)
-{
- QSplitter *s1 = new QSplitter( QSplitter::Vertical, this , "main" );
-
-
- navview = new MapView(canvas, s1);
- s1->moveToFirst(navview);
-
- details = new DetailView(s1);
-
- QMenuBar* menu = menuBar();
-
- QPopupMenu* file = new QPopupMenu;
- //file->insertItem("&Fill canvas", this, SLOT(init()), CTRL+Key_F);
- //file->insertItem("&Erase canvas", this, SLOT(clear()), CTRL+Key_E);
- //file->insertItem("&New view", this, SLOT(newView()), CTRL+Key_N);
- file->insertSeparator();
- file->insertItem("E&xit", qApp, SLOT(quit()), CTRL+Key_Q);
- menu->insertItem("&File", file);
-
- setCentralWidget(s1);
-}
-
-
-RootPanel::~RootPanel()
-{
- clear();
-}
-
-
-void
-RootPanel::addUnit(NavUnit *unit)
-{
- NodeItem *el = new NodeItem(&canvas, *unit);
- nodeMap.bind(unit->getID(), el);
- UnitLocation loc = unit->getLocation();
- el->move(loc.x_, loc.y_);
- el->show();
- this->details->currentNode(unit);
-}
-
-void
-RootPanel::updateUnit(NavUnit *unit)
-{
- NodeItem *el = NULL;
- nodeMap.find(unit->getID(), el);
- UnitLocation loc = unit->getLocation();
- el->move(loc.x_, loc.y_);
- //canvas.update();
-
- this->details->updateLocation(loc);
-}
-
-
-void
-RootPanel::clear()
-{
- navview->clear();
-}
-
-void
-RootPanel::customEvent(QCustomEvent *e)
-{
- CommandBase *cmd = (CommandBase*)(e->data());
- cmd->execute();
- delete cmd;
-/*
- int elapsed = time.restart();
- int fps = (elapsed == 0 ? 1000 : 1000 / elapsed);
-
- if(prev_fps != fps)
- {
- prev_fps = fps;
- ups->setNum(prev_fps);
- }
-*/
-}