summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2002-11-26 19:37:54 (UTC)
committer mickeyl <mickeyl>2002-11-26 19:37:54 (UTC)
commitac4f32931212847803534a72eb5e951bd01e6ff5 (patch) (unidiff)
treeb4769af43d5894f68ae2e8a3f9813d64e03841ce
parent5698d4fb5134c9d493f5a3f81675e7d094597203 (diff)
downloadopie-ac4f32931212847803534a72eb5e951bd01e6ff5.zip
opie-ac4f32931212847803534a72eb5e951bd01e6ff5.tar.gz
opie-ac4f32931212847803534a72eb5e951bd01e6ff5.tar.bz2
stations belonging to one net (SSID) are shown in tree structure
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp17
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h28
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.cpp28
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.h10
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp29
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.ui316
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro4
8 files changed, 404 insertions, 29 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
new file mode 100644
index 0000000..f907afc
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -0,0 +1,17 @@
1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14**********************************************************************/
15
16#include "scanlist.h"
17
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h
new file mode 100644
index 0000000..5cf3053
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/scanlist.h
@@ -0,0 +1,28 @@
1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14**********************************************************************/
15
16#ifndef SCANLIST_H
17#define SCANLIST_H
18
19#include <qlistview.h>
20
21class QString;
22
23class MScanList: public QListView
24{
25};
26
27#endif
28
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.cpp b/noncore/net/wellenreiter/gui/scanlistitem.cpp
index 3a5ac4e..63caefb 100644
--- a/noncore/net/wellenreiter/gui/scanlistitem.cpp
+++ b/noncore/net/wellenreiter/gui/scanlistitem.cpp
@@ -19,19 +19,32 @@
19#include <qpixmap.h> 19#include <qpixmap.h>
20 20
21const int col_type = 0; 21const int col_type = 0;
22const int col_essid = 0;
22const int col_sig = 1; 23const int col_sig = 1;
23const int col_essid = 2; 24const int col_ap = 2;
24const int col_ap = 3; 25const int col_channel = 3;
25const int col_channel = 4; 26const int col_wep = 4;
26const int col_wep = 5; 27const int col_traffic = 5;
27 28
28MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString ap, 29MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString ap,
29 bool wep, int channel, int signal ) 30 bool wep, int channel, int signal )
30 :QListViewItem( parent, QString::null, QString::null, essid, ap, 31 :QListViewItem( parent, essid, ap, QString::null, QString::null, QString::null )
31 QString::null, QString::null )
32{ 32{
33 qDebug( "creating scanlist item" );
34 decorateItem( type, essid, ap, wep, channel, signal );
35}
33 36
37MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString ap,
38 bool wep, int channel, int signal )
39 :QListViewItem( parent, essid, ap, QString::null, QString::null, QString::null )
40{
34 qDebug( "creating scanlist item" ); 41 qDebug( "creating scanlist item" );
42 decorateItem( type, essid, ap, wep, channel, signal );
43}
44
45void MScanListItem::decorateItem( QString type, QString essid, QString ap, bool wep, int channel, int signal )
46{
47 qDebug( "decorating scanlist item" );
35 48
36 // set icon for managed or adhoc mode 49 // set icon for managed or adhoc mode
37 QString name; 50 QString name;
@@ -45,4 +58,7 @@ MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QS
45 // set channel and signal text 58 // set channel and signal text
46 setText( col_sig, QString::number( signal ) ); 59 setText( col_sig, QString::number( signal ) );
47 setText( col_channel, QString::number( channel ) ); 60 setText( col_channel, QString::number( channel ) );
61
62 listView()->triggerUpdate();
63
48} 64}
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.h b/noncore/net/wellenreiter/gui/scanlistitem.h
index 133551a..a786482 100644
--- a/noncore/net/wellenreiter/gui/scanlistitem.h
+++ b/noncore/net/wellenreiter/gui/scanlistitem.h
@@ -32,8 +32,18 @@ class MScanListItem: public QListViewItem
32 int channel, 32 int channel,
33 int signal ); 33 int signal );
34 34
35 MScanListItem::MScanListItem( QListViewItem* parent,
36 QString type,
37 QString essid,
38 QString ap,
39 bool wep,
40 int channel,
41 int signal );
42
35 43
44 protected:
36 45
46 virtual void decorateItem( QString type, QString essid, QString ap, bool wep, int channel, int signal );
37 47
38}; 48};
39 49
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 96ab7bd..afb010c 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -35,6 +35,7 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl )
35{ 35{
36 36
37 connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); 37 connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
38 netview->setColumnWidthMode( 1, QListView::Manual );
38 39
39 // 40 //
40 // setup socket for daemon communication and start poller 41 // setup socket for daemon communication and start poller
@@ -86,6 +87,30 @@ void Wellenreiter::timerEvent( QTimerEvent* e )
86 } 87 }
87} 88}
88 89
90void Wellenreiter::addNewStation( QString type, QString essid, QString ap, bool wep, int channel, int signal )
91{
92 // FIXME: this code belongs in customized QListView, not into this class
93
94 // search, if we had an item with this essid once before
95
96 QListViewItem* item = netview->firstChild();
97
98 while ( item && ( item->text( 0 ) != essid ) )
99 {
100 qDebug( "itemtext: %s", (const char*) item->text( 0 ) );
101 item = item->itemBelow();
102 }
103 if ( item )
104 {
105 qDebug( "found!" );
106 new MScanListItem( item, type, essid, ap, wep, channel, signal );
107 }
108 else
109 {
110 new MScanListItem( netview, type, essid, ap, wep, channel, signal );
111 }
112}
113
89void Wellenreiter::buttonClicked() 114void Wellenreiter::buttonClicked()
90{ 115{
91 116
@@ -95,7 +120,7 @@ void Wellenreiter::buttonClicked()
95 120
96 // add some icons, so that we can see if this works 121 // add some icons, so that we can see if this works
97 122
98 new MScanListItem( netview, "managed", "MyNet", "04:00:20:EF:A6:43", true, 6, 80 ); 123 addNewStation( "managed", "MyNet", "04:00:20:EF:A6:43", true, 6, 80 );
99 new MScanListItem( netview, "adhoc", "YourNet", "40:03:A3:E7:56:22", false, 11, 30 ); 124 addNewStation( "adhoc", "YourNet", "40:03:A3:E7:56:22", false, 11, 30 );
100 125
101} 126}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index 206f364..b0f41e3 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -33,6 +33,7 @@ protected:
33 33
34public slots: 34public slots:
35 void buttonClicked(); 35 void buttonClicked();
36 void addNewStation( QString type, QString essid, QString ap, bool wep, int channel, int signal );
36 37
37private: 38private:
38 int daemon_fd; // socket filedescriptor for udp communication socket 39 int daemon_fd; // socket filedescriptor for udp communication socket
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.ui b/noncore/net/wellenreiter/gui/wellenreiterbase.ui
index fbfe716..b290b49 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.ui
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>203</width> 14 <width>191</width>
15 <height>294</height> 15 <height>294</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -70,7 +70,7 @@
70 <column> 70 <column>
71 <property> 71 <property>
72 <name>text</name> 72 <name>text</name>
73 <string>Net</string> 73 <string>SSID</string>
74 </property> 74 </property>
75 <property> 75 <property>
76 <name>clickable</name> 76 <name>clickable</name>
@@ -98,7 +98,7 @@
98 <column> 98 <column>
99 <property> 99 <property>
100 <name>text</name> 100 <name>text</name>
101 <string>SSID</string> 101 <string>AP</string>
102 </property> 102 </property>
103 <property> 103 <property>
104 <name>clickable</name> 104 <name>clickable</name>
@@ -112,7 +112,7 @@
112 <column> 112 <column>
113 <property> 113 <property>
114 <name>text</name> 114 <name>text</name>
115 <string>AP</string> 115 <string>Chn</string>
116 </property> 116 </property>
117 <property> 117 <property>
118 <name>clickable</name> 118 <name>clickable</name>
@@ -126,7 +126,7 @@
126 <column> 126 <column>
127 <property> 127 <property>
128 <name>text</name> 128 <name>text</name>
129 <string>Chn</string> 129 <string>W</string>
130 </property> 130 </property>
131 <property> 131 <property>
132 <name>clickable</name> 132 <name>clickable</name>
@@ -140,7 +140,7 @@
140 <column> 140 <column>
141 <property> 141 <property>
142 <name>text</name> 142 <name>text</name>
143 <string>WEP</string> 143 <string>T</string>
144 </property> 144 </property>
145 <property> 145 <property>
146 <name>clickable</name> 146 <name>clickable</name>
@@ -163,6 +163,10 @@
163 <name>frameShadow</name> 163 <name>frameShadow</name>
164 <enum>Sunken</enum> 164 <enum>Sunken</enum>
165 </property> 165 </property>
166 <property stdset="1">
167 <name>rootIsDecorated</name>
168 <bool>true</bool>
169 </property>
166 </widget> 170 </widget>
167 </vbox> 171 </vbox>
168 </widget> 172 </widget>
@@ -191,6 +195,12 @@
191 <name>name</name> 195 <name>name</name>
192 <cstring>Log</cstring> 196 <cstring>Log</cstring>
193 </property> 197 </property>
198 <property stdset="1">
199 <name>text</name>
200 <string>11/18 18:15 - log started
20111/19 20:13 - new net : "ELAN"
20211/19 20:15 - new station : "pegasus"</string>
203 </property>
194 </widget> 204 </widget>
195 </vbox> 205 </vbox>
196 </widget> 206 </widget>
@@ -198,26 +208,291 @@
198 <class>QWidget</class> 208 <class>QWidget</class>
199 <property stdset="1"> 209 <property stdset="1">
200 <name>name</name> 210 <name>name</name>
201 <cstring>About</cstring> 211 <cstring>tab</cstring>
202 </property> 212 </property>
203 <attribute> 213 <attribute>
204 <name>title</name> 214 <name>title</name>
205 <string>About</string> 215 <string>Hex</string>
206 </attribute> 216 </attribute>
207 <vbox> 217 <grid>
208 <property stdset="1"> 218 <property stdset="1">
209 <name>margin</name> 219 <name>margin</name>
210 <number>8</number> 220 <number>2</number>
211 </property> 221 </property>
212 <property stdset="1"> 222 <property stdset="1">
213 <name>spacing</name> 223 <name>spacing</name>
214 <number>2</number> 224 <number>2</number>
215 </property> 225 </property>
226 <widget row="0" column="0" >
227 <class>QMultiLineEdit</class>
228 <property stdset="1">
229 <name>name</name>
230 <cstring>Log_2</cstring>
231 </property>
232 <property stdset="1">
233 <name>palette</name>
234 <palette>
235 <active>
236 <color>
237 <red>255</red>
238 <green>255</green>
239 <blue>255</blue>
240 </color>
241 <color>
242 <red>192</red>
243 <green>192</green>
244 <blue>192</blue>
245 </color>
246 <color>
247 <red>255</red>
248 <green>255</green>
249 <blue>255</blue>
250 </color>
251 <color>
252 <red>223</red>
253 <green>223</green>
254 <blue>223</blue>
255 </color>
256 <color>
257 <red>96</red>
258 <green>96</green>
259 <blue>96</blue>
260 </color>
261 <color>
262 <red>128</red>
263 <green>128</green>
264 <blue>128</blue>
265 </color>
266 <color>
267 <red>255</red>
268 <green>255</green>
269 <blue>255</blue>
270 </color>
271 <color>
272 <red>255</red>
273 <green>255</green>
274 <blue>255</blue>
275 </color>
276 <color>
277 <red>255</red>
278 <green>255</green>
279 <blue>255</blue>
280 </color>
281 <color>
282 <red>0</red>
283 <green>0</green>
284 <blue>0</blue>
285 </color>
286 <color>
287 <red>0</red>
288 <green>0</green>
289 <blue>0</blue>
290 </color>
291 <color>
292 <red>0</red>
293 <green>0</green>
294 <blue>0</blue>
295 </color>
296 <color>
297 <red>0</red>
298 <green>0</green>
299 <blue>128</blue>
300 </color>
301 <color>
302 <red>255</red>
303 <green>255</green>
304 <blue>255</blue>
305 </color>
306 </active>
307 <disabled>
308 <color>
309 <red>128</red>
310 <green>128</green>
311 <blue>128</blue>
312 </color>
313 <color>
314 <red>192</red>
315 <green>192</green>
316 <blue>192</blue>
317 </color>
318 <color>
319 <red>255</red>
320 <green>255</green>
321 <blue>255</blue>
322 </color>
323 <color>
324 <red>220</red>
325 <green>220</green>
326 <blue>220</blue>
327 </color>
328 <color>
329 <red>96</red>
330 <green>96</green>
331 <blue>96</blue>
332 </color>
333 <color>
334 <red>128</red>
335 <green>128</green>
336 <blue>128</blue>
337 </color>
338 <color>
339 <red>128</red>
340 <green>128</green>
341 <blue>128</blue>
342 </color>
343 <color>
344 <red>255</red>
345 <green>255</green>
346 <blue>255</blue>
347 </color>
348 <color>
349 <red>128</red>
350 <green>128</green>
351 <blue>128</blue>
352 </color>
353 <color>
354 <red>0</red>
355 <green>0</green>
356 <blue>0</blue>
357 </color>
358 <color>
359 <red>0</red>
360 <green>0</green>
361 <blue>0</blue>
362 </color>
363 <color>
364 <red>0</red>
365 <green>0</green>
366 <blue>0</blue>
367 </color>
368 <color>
369 <red>0</red>
370 <green>0</green>
371 <blue>128</blue>
372 </color>
373 <color>
374 <red>255</red>
375 <green>255</green>
376 <blue>255</blue>
377 </color>
378 </disabled>
379 <inactive>
380 <color>
381 <red>255</red>
382 <green>255</green>
383 <blue>255</blue>
384 </color>
385 <color>
386 <red>192</red>
387 <green>192</green>
388 <blue>192</blue>
389 </color>
390 <color>
391 <red>255</red>
392 <green>255</green>
393 <blue>255</blue>
394 </color>
395 <color>
396 <red>220</red>
397 <green>220</green>
398 <blue>220</blue>
399 </color>
400 <color>
401 <red>96</red>
402 <green>96</green>
403 <blue>96</blue>
404 </color>
405 <color>
406 <red>128</red>
407 <green>128</green>
408 <blue>128</blue>
409 </color>
410 <color>
411 <red>255</red>
412 <green>255</green>
413 <blue>255</blue>
414 </color>
415 <color>
416 <red>255</red>
417 <green>255</green>
418 <blue>255</blue>
419 </color>
420 <color>
421 <red>255</red>
422 <green>255</green>
423 <blue>255</blue>
424 </color>
425 <color>
426 <red>0</red>
427 <green>0</green>
428 <blue>0</blue>
429 </color>
430 <color>
431 <red>0</red>
432 <green>0</green>
433 <blue>0</blue>
434 </color>
435 <color>
436 <red>0</red>
437 <green>0</green>
438 <blue>0</blue>
439 </color>
440 <color>
441 <red>0</red>
442 <green>0</green>
443 <blue>128</blue>
444 </color>
445 <color>
446 <red>255</red>
447 <green>255</green>
448 <blue>255</blue>
449 </color>
450 </inactive>
451 </palette>
452 </property>
453 <property stdset="1">
454 <name>font</name>
455 <font>
456 <family>adobe-courier</family>
457 <pointsize>8</pointsize>
458 </font>
459 </property>
460 <property stdset="1">
461 <name>text</name>
462 <string>00 0a 20 00 a8 00 e2 00 ...ESD..
46300 0a 20 00 a8 00 e2 00 .*&amp;23...
46400 0a 20 00 a8 00 e2 00 ........
46500 0a 20 00 a8 00 e2 00 ........
46600 0a 20 00 a8 00 e2 00 ........
46700 0a 20 00 a8 00 e2 00 ...BRA22</string>
468 </property>
469 </widget>
470 </grid>
471 </widget>
216 <widget> 472 <widget>
473 <class>QWidget</class>
474 <property stdset="1">
475 <name>name</name>
476 <cstring>about</cstring>
477 </property>
478 <attribute>
479 <name>title</name>
480 <string>About</string>
481 </attribute>
482 <grid>
483 <property stdset="1">
484 <name>margin</name>
485 <number>11</number>
486 </property>
487 <property stdset="1">
488 <name>spacing</name>
489 <number>6</number>
490 </property>
491 <widget row="0" column="0" >
217 <class>QLabel</class> 492 <class>QLabel</class>
218 <property stdset="1"> 493 <property stdset="1">
219 <name>name</name> 494 <name>name</name>
220 <cstring>PixmapLabel1_3</cstring> 495 <cstring>PixmapLabel1_3_2</cstring>
221 </property> 496 </property>
222 <property stdset="1"> 497 <property stdset="1">
223 <name>sizePolicy</name> 498 <name>sizePolicy</name>
@@ -262,11 +537,11 @@
262 <name>hAlign</name> 537 <name>hAlign</name>
263 </property> 538 </property>
264 </widget> 539 </widget>
265 <widget> 540 <widget row="1" column="0" >
266 <class>QLabel</class> 541 <class>QLabel</class>
267 <property stdset="1"> 542 <property stdset="1">
268 <name>name</name> 543 <name>name</name>
269 <cstring>TextLabel1_4</cstring> 544 <cstring>TextLabel1_4_2</cstring>
270 </property> 545 </property>
271 <property stdset="1"> 546 <property stdset="1">
272 <name>font</name> 547 <name>font</name>
@@ -277,10 +552,13 @@
277 </property> 552 </property>
278 <property stdset="1"> 553 <property stdset="1">
279 <name>text</name> 554 <name>text</name>
280 <string>Max Moser | Martin J. Muench&lt;br&gt; 555 <string>&lt;p align=center&gt;
281Steffen Kewitz | Dario Luethi&lt;br&gt; 556&lt;hr&gt;
282Karl Schoepf | Michael Lauer&lt;p&gt; 557Max Moser&lt;br&gt;
283&lt;b&gt;www.remote-exploit.org&lt;/b&gt;</string> 558Martin J. Muench&lt;br&gt;
559Michael Lauer&lt;br&gt;&lt;hr&gt;
560&lt;b&gt;www.remote-exploit.org&lt;/b&gt;
561&lt;/p&gt;</string>
284 </property> 562 </property>
285 <property stdset="1"> 563 <property stdset="1">
286 <name>alignment</name> 564 <name>alignment</name>
@@ -290,7 +568,7 @@ Karl Schoepf | Michael Lauer&lt;p&gt;
290 <name>hAlign</name> 568 <name>hAlign</name>
291 </property> 569 </property>
292 </widget> 570 </widget>
293 </vbox> 571 </grid>
294 </widget> 572 </widget>
295 </widget> 573 </widget>
296 <widget> 574 <widget>
@@ -316,7 +594,7 @@ Karl Schoepf | Michael Lauer&lt;p&gt;
316<images> 594<images>
317 <image> 595 <image>
318 <name>image0</name> 596 <name>image0</name>