summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2002-11-21 22:25:02 (UTC)
committer mickeyl <mickeyl>2002-11-21 22:25:02 (UTC)
commit71f340d760a5863152ff5d22c60334f421a6c488 (patch) (unidiff)
treeb2e627876a2acce67e1030c857dc5ca4218ed43f
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 (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
@@ -15,3 +15,34 @@
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
@@ -19,6 +19,20 @@
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};
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
@@ -15,8 +15,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
@@ -26,6 +32,15 @@ Wellenreiter::~Wellenreiter()
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
@@ -30,6 +30,6 @@ protected:
30 30
31 31
32private slots: 32public slots:
33 void theButton(); 33 void buttonClicked();
34 34
35private: 35private:
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
@@ -12,5 +12,5 @@
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>
@@ -154,5 +154,5 @@
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">
@@ -298,5 +298,5 @@ Karl Schoepf | Michael Lauer&lt;p&gt;
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">
@@ -317,10 +317,10 @@ Karl Schoepf | Michael Lauer&lt;p&gt;
317 <image> 317 <image>
318 <name>image0</name> 318 <name>image0</name>