-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 25 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 1 |
3 files changed, 21 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index b2d3a71..2d5ecd2 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -12,16 +12,18 @@ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "configwindow.h" #include "mainwindow.h" #include "wellenreiter.h" +#include "scanlist.h" + #include <qcombobox.h> #include <qiconset.h> #include <qmenubar.h> #include <qpopupmenu.h> #include <qstatusbar.h> #include <qtoolbutton.h> #ifdef QWS @@ -75,34 +77,38 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n d->setIconSet( *settingsIconSet ); connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); // setup menu bar QMenuBar* mb = menuBar(); QPopupMenu* file = new QPopupMenu( mb ); - file->insertItem( "&Load" ); - file->insertItem( "&Save" ); + file->insertItem( "&Load..." ); + file->insertItem( "&Save..." ); QPopupMenu* view = new QPopupMenu( mb ); - view->insertItem( "&Configure" ); + view->insertItem( "&Configure..." ); QPopupMenu* sniffer = new QPopupMenu( mb ); - sniffer->insertItem( "&Configure" ); + sniffer->insertItem( "&Configure..." ); sniffer->insertSeparator(); - int id; + QPopupMenu* demo = new QPopupMenu( mb ); + demo->insertItem( "&Add something", this, SLOT( demoAddStations() ) ); + int id; id = mb->insertItem( "&File", file ); mb->setItemEnabled( id, false ); id = mb->insertItem( "&View", view ); mb->setItemEnabled( id, false ); id = mb->insertItem( "&Sniffer", sniffer ); mb->setItemEnabled( id, false ); + id = mb->insertItem( "&Demo", demo ); + mb->setItemEnabled( id, true ); #ifdef QWS mb->insertItem( startStopButton ); mb->insertItem( c ); mb->insertItem( d ); #else // Qt3 changed the insertion order. It's now totally random :( mb->insertItem( d ); mb->insertItem( c ); @@ -152,10 +158,17 @@ WellenreiterMainWindow::~WellenreiterMainWindow() delete searchIconSet; delete cancelIconSet; #else delete startStopIconSet; #endif }; - +void WellenreiterMainWindow::demoAddStations() +{ + mw->netView()->addNewItem( "managed", "Vanille", "04:00:20:EF:A6:43", true, 6, 80 ); + mw->netView()->addNewItem( "managed", "Vanille", "04:00:20:EF:A6:23", true, 11, 10 ); + mw->netView()->addNewItem( "adhoc", "ELAN", "40:03:43:E7:16:22", false, 3, 10 ); + mw->netView()->addNewItem( "adhoc", "ELAN", "40:03:53:E7:56:62", false, 3, 15 ); + mw->netView()->addNewItem( "adhoc", "ELAN", "40:03:63:E7:56:E2", false, 3, 20 ); +} diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h index c21841a..22c21e8 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.h +++ b/noncore/net/wellenreiter/gui/mainwindow.h @@ -40,11 +40,12 @@ class WellenreiterMainWindow: public QMainWindow const QIconSet* infoIconSet; const QIconSet* settingsIconSet; const QIconSet* cancelIconSet; QToolButton* startStopButton; public slots: void showConfigure(); + void demoAddStations(); }; #endif diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index a55d6a1..61960d2 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h @@ -46,16 +46,17 @@ class WellenreiterConfigWindow; class Wellenreiter : public WellenreiterBase { Q_OBJECT public: Wellenreiter( QWidget* parent = 0 ); ~Wellenreiter(); void setConfigWindow( WellenreiterConfigWindow* cw ); + MScanListView* netView() const { return netview; }; protected: bool daemonRunning; public slots: void dataReceived(); void startStopClicked(); |