author | mickeyl <mickeyl> | 2003-02-23 17:13:49 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-02-23 17:13:49 (UTC) |
commit | 9f24ae5ae12aa1eb0f974b072d46868ba048e65d (patch) (unidiff) | |
tree | 85d9e671fe060ebec2bf7f04ab69ca96d8029741 /noncore/net | |
parent | 2f897267b4d3ec5b1c7dafdc0700a8e91cbb3321 (diff) | |
download | opie-9f24ae5ae12aa1eb0f974b072d46868ba048e65d.zip opie-9f24ae5ae12aa1eb0f974b072d46868ba048e65d.tar.gz opie-9f24ae5ae12aa1eb0f974b072d46868ba048e65d.tar.bz2 |
insert demo menu - useful, if you don't have wireless stuff yet but want
to show this program to someone...
-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 | |||
@@ -14,12 +14,14 @@ | |||
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "configwindow.h" | 16 | #include "configwindow.h" |
17 | #include "mainwindow.h" | 17 | #include "mainwindow.h" |
18 | #include "wellenreiter.h" | 18 | #include "wellenreiter.h" |
19 | 19 | ||
20 | #include "scanlist.h" | ||
21 | |||
20 | #include <qcombobox.h> | 22 | #include <qcombobox.h> |
21 | #include <qiconset.h> | 23 | #include <qiconset.h> |
22 | #include <qmenubar.h> | 24 | #include <qmenubar.h> |
23 | #include <qpopupmenu.h> | 25 | #include <qpopupmenu.h> |
24 | #include <qstatusbar.h> | 26 | #include <qstatusbar.h> |
25 | #include <qtoolbutton.h> | 27 | #include <qtoolbutton.h> |
@@ -77,30 +79,34 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
77 | 79 | ||
78 | // setup menu bar | 80 | // setup menu bar |
79 | 81 | ||
80 | QMenuBar* mb = menuBar(); | 82 | QMenuBar* mb = menuBar(); |
81 | 83 | ||
82 | QPopupMenu* file = new QPopupMenu( mb ); | 84 | QPopupMenu* file = new QPopupMenu( mb ); |
83 | file->insertItem( "&Load" ); | 85 | file->insertItem( "&Load..." ); |
84 | file->insertItem( "&Save" ); | 86 | file->insertItem( "&Save..." ); |
85 | 87 | ||
86 | QPopupMenu* view = new QPopupMenu( mb ); | 88 | QPopupMenu* view = new QPopupMenu( mb ); |
87 | view->insertItem( "&Configure" ); | 89 | view->insertItem( "&Configure..." ); |
88 | 90 | ||
89 | QPopupMenu* sniffer = new QPopupMenu( mb ); | 91 | QPopupMenu* sniffer = new QPopupMenu( mb ); |
90 | sniffer->insertItem( "&Configure" ); | 92 | sniffer->insertItem( "&Configure..." ); |
91 | sniffer->insertSeparator(); | 93 | sniffer->insertSeparator(); |
92 | 94 | ||
93 | int id; | 95 | QPopupMenu* demo = new QPopupMenu( mb ); |
96 | demo->insertItem( "&Add something", this, SLOT( demoAddStations() ) ); | ||
94 | 97 | ||
98 | int id; | ||
95 | id = mb->insertItem( "&File", file ); | 99 | id = mb->insertItem( "&File", file ); |
96 | mb->setItemEnabled( id, false ); | 100 | mb->setItemEnabled( id, false ); |
97 | id = mb->insertItem( "&View", view ); | 101 | id = mb->insertItem( "&View", view ); |
98 | mb->setItemEnabled( id, false ); | 102 | mb->setItemEnabled( id, false ); |
99 | id = mb->insertItem( "&Sniffer", sniffer ); | 103 | id = mb->insertItem( "&Sniffer", sniffer ); |
100 | mb->setItemEnabled( id, false ); | 104 | mb->setItemEnabled( id, false ); |
105 | id = mb->insertItem( "&Demo", demo ); | ||
106 | mb->setItemEnabled( id, true ); | ||
101 | 107 | ||
102 | #ifdef QWS | 108 | #ifdef QWS |
103 | mb->insertItem( startStopButton ); | 109 | mb->insertItem( startStopButton ); |
104 | mb->insertItem( c ); | 110 | mb->insertItem( c ); |
105 | mb->insertItem( d ); | 111 | mb->insertItem( d ); |
106 | #else // Qt3 changed the insertion order. It's now totally random :( | 112 | #else // Qt3 changed the insertion order. It's now totally random :( |
@@ -154,8 +160,15 @@ WellenreiterMainWindow::~WellenreiterMainWindow() | |||
154 | #else | 160 | #else |
155 | delete startStopIconSet; | 161 | delete startStopIconSet; |
156 | #endif | 162 | #endif |
157 | 163 | ||
158 | }; | 164 | }; |
159 | 165 | ||
160 | 166 | void WellenreiterMainWindow::demoAddStations() | |
167 | { | ||
168 | mw->netView()->addNewItem( "managed", "Vanille", "04:00:20:EF:A6:43", true, 6, 80 ); | ||
169 | mw->netView()->addNewItem( "managed", "Vanille", "04:00:20:EF:A6:23", true, 11, 10 ); | ||
170 | mw->netView()->addNewItem( "adhoc", "ELAN", "40:03:43:E7:16:22", false, 3, 10 ); | ||
171 | mw->netView()->addNewItem( "adhoc", "ELAN", "40:03:53:E7:56:62", false, 3, 15 ); | ||
172 | mw->netView()->addNewItem( "adhoc", "ELAN", "40:03:63:E7:56:E2", false, 3, 20 ); | ||
173 | } | ||
161 | 174 | ||
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 | |||
@@ -42,9 +42,10 @@ class WellenreiterMainWindow: public QMainWindow | |||
42 | const QIconSet* cancelIconSet; | 42 | const QIconSet* cancelIconSet; |
43 | 43 | ||
44 | QToolButton* startStopButton; | 44 | QToolButton* startStopButton; |
45 | 45 | ||
46 | public slots: | 46 | public slots: |
47 | void showConfigure(); | 47 | void showConfigure(); |
48 | void demoAddStations(); | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | #endif | 51 | #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 | |||
@@ -48,12 +48,13 @@ class Wellenreiter : public WellenreiterBase { | |||
48 | 48 | ||
49 | public: | 49 | public: |
50 | Wellenreiter( QWidget* parent = 0 ); | 50 | Wellenreiter( QWidget* parent = 0 ); |
51 | ~Wellenreiter(); | 51 | ~Wellenreiter(); |
52 | 52 | ||
53 | void setConfigWindow( WellenreiterConfigWindow* cw ); | 53 | void setConfigWindow( WellenreiterConfigWindow* cw ); |
54 | MScanListView* netView() const { return netview; }; | ||
54 | 55 | ||
55 | protected: | 56 | protected: |
56 | bool daemonRunning; | 57 | bool daemonRunning; |
57 | 58 | ||
58 | public slots: | 59 | public slots: |
59 | void dataReceived(); | 60 | void dataReceived(); |