summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlistitem.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlistitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.cpp33
1 files changed, 32 insertions, 1 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
@@ -14,4 +14,35 @@
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}