summaryrefslogtreecommitdiff
path: root/noncore
authormickeyl <mickeyl>2002-11-21 22:25:02 (UTC)
committer mickeyl <mickeyl>2002-11-21 22:25:02 (UTC)
commit71f340d760a5863152ff5d22c60334f421a6c488 (patch) (unidiff)
treeb2e627876a2acce67e1030c857dc5ca4218ed43f /noncore
parent0ecfbc09273d23162ef65de521ff703a8b322a03 (diff)
downloadopie-71f340d760a5863152ff5d22c60334f421a6c488.zip
opie-71f340d760a5863152ff5d22c60334f421a6c488.tar.gz
opie-71f340d760a5863152ff5d22c60334f421a6c488.tar.bz2
Added some dummy icons (press "Start Scanning") to get a basic
idea of the main Net-Sniff window.
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.cpp33
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.h14
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp19
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h4
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.ui12
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
@@ -11,7 +11,38 @@
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
21const int col_type = 0;
22const int col_sig = 1;
23const int col_essid = 2;
24const int col_ap = 3;
25const int col_channel = 4;
26const int col_wep = 5;
27
28MScanListItem::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
@@ -15,13 +15,27 @@
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
21class QString;
22
21class MScanListItem: public QListViewItem 23class 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
@@ -11,21 +11,36 @@
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
18Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) 21Wellenreiter::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
23Wellenreiter::~Wellenreiter() 29Wellenreiter::~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
28void Wellenreiter::theButton() 34void 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
@@ -26,14 +26,14 @@ public:
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
29protected: 29protected:
30 30
31 31
32private slots: 32public slots:
33 void theButton(); 33 void buttonClicked();
34 34
35private: 35private:
36 //void readConfig(); 36 //void readConfig();
37 //void writeConfig(); 37 //void writeConfig();
38}; 38};
39 39
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
@@ -8,13 +8,13 @@
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>
@@ -150,13 +150,13 @@
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">
@@ -294,13 +294,13 @@ Karl Schoepf | Michael Lauer&lt;p&gt;
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>
@@ -313,15 +313,15 @@ Karl Schoepf | Michael Lauer&lt;p&gt;
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>