summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
authormickeyl <mickeyl>2003-02-24 21:37:49 (UTC)
committer mickeyl <mickeyl>2003-02-24 21:37:49 (UTC)
commitd14b92ef8984ae654ff187bf6c8f5946d3ba218d (patch) (unidiff)
treefd209280150b48eb137315d9bfe693892525697e /noncore/net/wellenreiter/gui/scanlist.cpp
parent93151a1467b45759d320ce6673160190d6ab8872 (diff)
downloadopie-d14b92ef8984ae654ff187bf6c8f5946d3ba218d.zip
opie-d14b92ef8984ae654ff187bf6c8f5946d3ba218d.tar.gz
opie-d14b92ef8984ae654ff187bf6c8f5946d3ba218d.tar.bz2
- work around yet another g++ 2.x bug
- started work on saving session to xml [ any classes from libopie I can reuse without too much effort? ]
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 6d3469c..cdc2c48 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -20,13 +20,15 @@
20 20
21#include "manufacturers.h" 21#include "manufacturers.h"
22 22
23#include <qtextstream.h>
24
23MScanListView::MScanListView( QWidget* parent, const char* name ) 25MScanListView::MScanListView( QWidget* parent, const char* name )
24 :OListView( parent, name ), _manufacturerdb( 0 ) 26 :OListView( parent, name ), _manufacturerdb( 0 )
25{ 27{
26 28
27 setFrameShape( QListView::StyledPanel ); 29 setFrameShape( QListView::StyledPanel );
28 setFrameShadow( QListView::Sunken ); 30 setFrameShadow( QListView::Sunken );
29 31
30 addColumn( tr( "Net/Station" ) ); 32 addColumn( tr( "Net/Station" ) );
31 setColumnAlignment( 0, AlignLeft || AlignVCenter ); 33 setColumnAlignment( 0, AlignLeft || AlignVCenter );
32 addColumn( tr( "B" ) ); 34 addColumn( tr( "B" ) );
@@ -125,17 +127,17 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
125 else 127 else
126 { 128 {
127 s.sprintf( "(i) new network: '%s'", (const char*) essid ); 129 s.sprintf( "(i) new network: '%s'", (const char*) essid );
128 130
129 network = new MScanListItem( this, "networks", essid, QString::null, 0, 0, 0 ); 131 network = new MScanListItem( this, "networks", essid, QString::null, 0, 0, 0 );
130 } 132 }
131 133
132 134
133 // insert new station as child from network 135 // insert new station as child from network
134 136
135 // no essid to reduce clutter, maybe later we have a nick or stationname to display!? 137 // no essid to reduce clutter, maybe later we have a nick or stationname to display!?
136 138
137 qDebug( "inserting new station %s", (const char*) macaddr ); 139 qDebug( "inserting new station %s", (const char*) macaddr );
138 140
139 MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); 141 MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal );
140 if ( _manufacturerdb ) 142 if ( _manufacturerdb )
141 station->setManufacturer( _manufacturerdb->lookup( macaddr ) ); 143 station->setManufacturer( _manufacturerdb->lookup( macaddr ) );
@@ -148,6 +150,18 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
148 { 150 {
149 s.sprintf( "(i) new adhoc station in '%s' [%d]", (const char*) essid, channel ); 151 s.sprintf( "(i) new adhoc station in '%s' [%d]", (const char*) essid, channel );
150 } 152 }
151 153
152} 154}
153 155
156void MScanListView::dump( QTextStream& t ) const
157{
158 qDebug( "dumping scanlist..." );
159
160 QListViewItemIterator it( const_cast<MScanListView*>( this ) );
161 for ( ; it.current(); ++it )
162 {
163 static_cast<MScanListItem*>( it.current() )->dump( t );
164 }
165
166 qDebug( "dump finished." );
167}