diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-07-31 16:14:11 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-07-31 16:14:11 +0000 |
commit | 9c2ec3049a5634f1c916d792e81fc80edb669ea8 (patch) | |
tree | 0d634e179761581cadbffe852e7f9a9f049b5c6e /TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/RootPanel.cpp | |
parent | 6540653cf736840d5aad719c73a8e43a549080be (diff) | |
download | ATCD-9c2ec3049a5634f1c916d792e81fc80edb669ea8.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_4_2'.TAO-1_4_2
Diffstat (limited to 'TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/RootPanel.cpp')
-rw-r--r-- | TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/RootPanel.cpp | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/RootPanel.cpp b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/RootPanel.cpp deleted file mode 100644 index c6737ee96c0..00000000000 --- a/TAO/CIAO/examples/OEP/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); - } -*/ -} |