-rw-r--r-- | noncore/net/wellenreiter/gui/scanlistitem.cpp | 33 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlistitem.h | 14 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 19 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.ui | 12 |
5 files changed, 71 insertions, 11 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.cpp b/noncore/net/wellenreiter/gui/scanlistitem.cpp index 267e543..3a5ac4e 100644 --- a/noncore/net/wellenreiter/gui/scanlistitem.cpp +++ b/noncore/net/wellenreiter/gui/scanlistitem.cpp | |||
@@ -1,17 +1,48 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "scanlistitem.h" | 16 | #include "scanlistitem.h" |
17 | #include <qlistview.h> | 17 | #include <qpe/resource.h> |
18 | #include <assert.h> | ||
19 | #include <qpixmap.h> | ||
20 | |||
21 | const int col_type = 0; | ||
22 | const int col_sig = 1; | ||
23 | const int col_essid = 2; | ||
24 | const int col_ap = 3; | ||
25 | const int col_channel = 4; | ||
26 | const int col_wep = 5; | ||
27 | |||
28 | MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString ap, | ||
29 | bool wep, int channel, int signal ) | ||
30 | :QListViewItem( parent, QString::null, QString::null, essid, ap, | ||
31 | QString::null, QString::null ) | ||
32 | { | ||
33 | |||
34 | qDebug( "creating scanlist item" ); | ||
35 | |||
36 | // set icon for managed or adhoc mode | ||
37 | QString name; | ||
38 | name.sprintf( "wellenreiter/%s", (const char*) type ); | ||
39 | setPixmap( col_type, Resource::loadPixmap( name ) ); | ||
40 | |||
41 | // set icon for wep (wireless encryption protocol) | ||
42 | if ( wep ) | ||
43 | setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); // rename the pixmap! | ||
44 | |||
45 | // set channel and signal text | ||
46 | setText( col_sig, QString::number( signal ) ); | ||
47 | setText( col_channel, QString::number( channel ) ); | ||
48 | } | ||
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.h b/noncore/net/wellenreiter/gui/scanlistitem.h index 2bed9d0..133551a 100644 --- a/noncore/net/wellenreiter/gui/scanlistitem.h +++ b/noncore/net/wellenreiter/gui/scanlistitem.h | |||
@@ -1,27 +1,41 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef SCANLISTITEM_H | 16 | #ifndef SCANLISTITEM_H |
17 | #define SCANLISTITEM_H | 17 | #define SCANLISTITEM_H |
18 | 18 | ||
19 | #include <qlistview.h> | 19 | #include <qlistview.h> |
20 | 20 | ||
21 | class QString; | ||
22 | |||
21 | class MScanListItem: public QListViewItem | 23 | class MScanListItem: public QListViewItem |
22 | { | 24 | { |
25 | public: | ||
26 | |||
27 | MScanListItem::MScanListItem( QListView* parent, | ||
28 | QString type, | ||
29 | QString essid, | ||
30 | QString ap, | ||
31 | bool wep, | ||
32 | int channel, | ||
33 | int signal ); | ||
34 | |||
35 | |||
36 | |||
23 | 37 | ||
24 | }; | 38 | }; |
25 | 39 | ||
26 | #endif | 40 | #endif |
27 | 41 | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index def3131..9364a75 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -1,31 +1,46 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ***********************************************************************/ | 14 | ***********************************************************************/ |
15 | 15 | ||
16 | #include "wellenreiter.h" | 16 | #include "wellenreiter.h" |
17 | #include "scanlistitem.h" | ||
18 | |||
19 | #include <qpushbutton.h> | ||
17 | 20 | ||
18 | Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) | 21 | Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) |
19 | : WellenreiterBase( parent, name, fl ) | 22 | : WellenreiterBase( parent, name, fl ) |
20 | { | 23 | { |
24 | |||
25 | connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); | ||
26 | |||
21 | } | 27 | } |
22 | 28 | ||
23 | Wellenreiter::~Wellenreiter() | 29 | Wellenreiter::~Wellenreiter() |
24 | { | 30 | { |
25 | // no need to delete child widgets, Qt does it all for us | 31 | // no need to delete child widgets, Qt does it all for us |
26 | } | 32 | } |
27 | 33 | ||
28 | void Wellenreiter::theButton() | 34 | void Wellenreiter::buttonClicked() |
29 | { | 35 | { |
30 | 36 | ||
37 | // FIXME: communicate with daemon and set button text according to state | ||
38 | |||
39 | button->setText( "Stop Scanning" ); | ||
40 | |||
41 | // add some icons, so that we can see if this works | ||
42 | |||
43 | new MScanListItem( netview, "managed", "MyNet", "04:00:20:EF:A6:43", true, 6, 80 ); | ||
44 | new MScanListItem( netview, "adhoc", "YourNet", "40:03:A3:E7:56:22", false, 11, 30 ); | ||
45 | |||
31 | } | 46 | } |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index 12ebe78..7ba8b01 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h | |||
@@ -1,40 +1,40 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef WELLENREITER_H | 16 | #ifndef WELLENREITER_H |
17 | #define WELLENREITER_H | 17 | #define WELLENREITER_H |
18 | 18 | ||
19 | #include "wellenreiterbase.h" | 19 | #include "wellenreiterbase.h" |
20 | 20 | ||
21 | class Wellenreiter : public WellenreiterBase { | 21 | class Wellenreiter : public WellenreiterBase { |
22 | Q_OBJECT | 22 | Q_OBJECT |
23 | 23 | ||
24 | public: | 24 | public: |
25 | 25 | ||
26 | Wellenreiter( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 26 | Wellenreiter( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
27 | ~Wellenreiter(); | 27 | ~Wellenreiter(); |
28 | 28 | ||
29 | protected: | 29 | protected: |
30 | 30 | ||
31 | 31 | ||
32 | private slots: | 32 | public slots: |
33 | void theButton(); | 33 | void buttonClicked(); |
34 | 34 | ||
35 | private: | 35 | private: |
36 | //void readConfig(); | 36 | //void readConfig(); |
37 | //void writeConfig(); | 37 | //void writeConfig(); |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #endif | 40 | #endif |
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.ui b/noncore/net/wellenreiter/gui/wellenreiterbase.ui index 9627da7..fbfe716 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.ui +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.ui | |||
@@ -1,46 +1,46 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>WellenreiterBase</class> | 2 | <class>WellenreiterBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>WellenreiterBase</cstring> | 7 | <cstring>WellenreiterBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>207</width> | 14 | <width>203</width> |
15 | <height>294</height> | 15 | <height>294</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Wellenreiter</string> | 20 | <string>Wellenreiter</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <vbox> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>0</number> | 31 | <number>0</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>2</number> | 35 | <number>2</number> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QTabWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>TabWidget</cstring> | 41 | <cstring>TabWidget</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <property> | 46 | <property> |
@@ -124,65 +124,65 @@ | |||
124 | </property> | 124 | </property> |
125 | </column> | 125 | </column> |
126 | <column> | 126 | <column> |
127 | <property> | 127 | <property> |
128 | <name>text</name> | 128 | <name>text</name> |
129 | <string>Chn</string> | 129 | <string>Chn</string> |
130 | </property> | 130 | </property> |
131 | <property> | 131 | <property> |
132 | <name>clickable</name> | 132 | <name>clickable</name> |
133 | <bool>true</bool> | 133 | <bool>true</bool> |
134 | </property> | 134 | </property> |
135 | <property> | 135 | <property> |
136 | <name>resizeable</name> | 136 | <name>resizeable</name> |
137 | <bool>true</bool> | 137 | <bool>true</bool> |
138 | </property> | 138 | </property> |
139 | </column> | 139 | </column> |
140 | <column> | 140 | <column> |
141 | <property> | 141 | <property> |
142 | <name>text</name> | 142 | <name>text</name> |
143 | <string>WEP</string> | 143 | <string>WEP</string> |
144 | </property> | 144 | </property> |
145 | <property> | 145 | <property> |
146 | <name>clickable</name> | 146 | <name>clickable</name> |
147 | <bool>true</bool> | 147 | <bool>true</bool> |
148 | </property> | 148 | </property> |
149 | <property> | 149 | <property> |
150 | <name>resizeable</name> | 150 | <name>resizeable</name> |
151 | <bool>true</bool> | 151 | <bool>true</bool> |
152 | </property> | 152 | </property> |
153 | </column> | 153 | </column> |
154 | <property stdset="1"> | 154 | <property stdset="1"> |
155 | <name>name</name> | 155 | <name>name</name> |
156 | <cstring>ListView8</cstring> | 156 | <cstring>netview</cstring> |
157 | </property> | 157 | </property> |
158 | <property stdset="1"> | 158 | <property stdset="1"> |
159 | <name>frameShape</name> | 159 | <name>frameShape</name> |
160 | <enum>StyledPanel</enum> | 160 | <enum>StyledPanel</enum> |
161 | </property> | 161 | </property> |
162 | <property stdset="1"> | 162 | <property stdset="1"> |
163 | <name>frameShadow</name> | 163 | <name>frameShadow</name> |
164 | <enum>Sunken</enum> | 164 | <enum>Sunken</enum> |
165 | </property> | 165 | </property> |
166 | </widget> | 166 | </widget> |
167 | </vbox> | 167 | </vbox> |
168 | </widget> | 168 | </widget> |
169 | <widget> | 169 | <widget> |
170 | <class>QWidget</class> | 170 | <class>QWidget</class> |
171 | <property stdset="1"> | 171 | <property stdset="1"> |
172 | <name>name</name> | 172 | <name>name</name> |
173 | <cstring>Log</cstring> | 173 | <cstring>Log</cstring> |
174 | </property> | 174 | </property> |
175 | <attribute> | 175 | <attribute> |
176 | <name>title</name> | 176 | <name>title</name> |
177 | <string>Log</string> | 177 | <string>Log</string> |
178 | </attribute> | 178 | </attribute> |
179 | <vbox> | 179 | <vbox> |
180 | <property stdset="1"> | 180 | <property stdset="1"> |
181 | <name>margin</name> | 181 | <name>margin</name> |
182 | <number>2</number> | 182 | <number>2</number> |
183 | </property> | 183 | </property> |
184 | <property stdset="1"> | 184 | <property stdset="1"> |
185 | <name>spacing</name> | 185 | <name>spacing</name> |
186 | <number>2</number> | 186 | <number>2</number> |
187 | </property> | 187 | </property> |
188 | <widget> | 188 | <widget> |
@@ -268,60 +268,60 @@ | |||
268 | <name>name</name> | 268 | <name>name</name> |
269 | <cstring>TextLabel1_4</cstring> | 269 | <cstring>TextLabel1_4</cstring> |
270 | </property> | 270 | </property> |
271 | <property stdset="1"> | 271 | <property stdset="1"> |
272 | <name>font</name> | 272 | <name>font</name> |
273 | <font> | 273 | <font> |
274 | <family>adobe-helvetica</family> | 274 | <family>adobe-helvetica</family> |
275 | <pointsize>10</pointsize> | 275 | <pointsize>10</pointsize> |
276 | </font> | 276 | </font> |
277 | </property> | 277 | </property> |
278 | <property stdset="1"> | 278 | <property stdset="1"> |
279 | <name>text</name> | 279 | <name>text</name> |
280 | <string>Max Moser | Martin J. Muench<br> | 280 | <string>Max Moser | Martin J. Muench<br> |
281 | Steffen Kewitz | Dario Luethi<br> | 281 | Steffen Kewitz | Dario Luethi<br> |
282 | Karl Schoepf | Michael Lauer<p> | 282 | Karl Schoepf | Michael Lauer<p> |
283 | <b>www.remote-exploit.org</b></string> | 283 | <b>www.remote-exploit.org</b></string> |
284 | </property> | 284 | </property> |
285 | <property stdset="1"> | 285 | <property stdset="1"> |
286 | <name>alignment</name> | 286 | <name>alignment</name> |
287 | <set>AlignCenter</set> | 287 | <set>AlignCenter</set> |
288 | </property> | 288 | </property> |
289 | <property> | 289 | <property> |
290 | <name>hAlign</name> | 290 | <name>hAlign</name> |
291 | </property> | 291 | </property> |
292 | </widget> | 292 | </widget> |
293 | </vbox> | 293 | </vbox> |
294 | </widget> | 294 | </widget> |
295 | </widget> | 295 | </widget> |
296 | <widget> | 296 | <widget> |
297 | <class>QPushButton</class> | 297 | <class>QPushButton</class> |
298 | <property stdset="1"> | 298 | <property stdset="1"> |
299 | <name>name</name> | 299 | <name>name</name> |
300 | <cstring>PushButton5</cstring> | 300 | <cstring>button</cstring> |
301 | </property> | 301 | </property> |
302 | <property stdset="1"> | 302 | <property stdset="1"> |
303 | <name>sizePolicy</name> | 303 | <name>sizePolicy</name> |
304 | <sizepolicy> | 304 | <sizepolicy> |
305 | <hsizetype>1</hsizetype> | 305 | <hsizetype>1</hsizetype> |
306 | <vsizetype>0</vsizetype> | 306 | <vsizetype>0</vsizetype> |
307 | </sizepolicy> | 307 | </sizepolicy> |
308 | </property> | 308 | </property> |
309 | <property stdset="1"> | 309 | <property stdset="1"> |
310 | <name>text</name> | 310 | <name>text</name> |
311 | <string>Start Scanning</string> | 311 | <string>Start Scanning</string> |
312 | </property> | 312 | </property> |
313 | </widget> | 313 | </widget> |
314 | </vbox> | 314 | </vbox> |
315 | </widget> | 315 | </widget> |
316 | <images> | 316 | <images> |
317 | <image> | 317 | <image> |
318 | <name>image0</name> | 318 | <name>image0</name> |