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) (side-by-side diff)
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 @@
#include "manufacturers.h"
+#include <qtextstream.h>
+
MScanListView::MScanListView( QWidget* parent, const char* name )
:OListView( parent, name ), _manufacturerdb( 0 )
{
setFrameShape( QListView::StyledPanel );
setFrameShadow( QListView::Sunken );
-
+
addColumn( tr( "Net/Station" ) );
setColumnAlignment( 0, AlignLeft || AlignVCenter );
addColumn( tr( "B" ) );
@@ -125,17 +127,17 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
else
{
s.sprintf( "(i) new network: '%s'", (const char*) essid );
-
+
network = new MScanListItem( this, "networks", essid, QString::null, 0, 0, 0 );
- }
-
-
+ }
+
+
// insert new station as child from network
-
+
// no essid to reduce clutter, maybe later we have a nick or stationname to display!?
-
+
qDebug( "inserting new station %s", (const char*) macaddr );
-
+
MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal );
if ( _manufacturerdb )
station->setManufacturer( _manufacturerdb->lookup( macaddr ) );
@@ -148,6 +150,18 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
{
s.sprintf( "(i) new adhoc station in '%s' [%d]", (const char*) essid, channel );
}
-
+
}
+void MScanListView::dump( QTextStream& t ) const
+{
+ qDebug( "dumping scanlist..." );
+
+ QListViewItemIterator it( const_cast<MScanListView*>( this ) );
+ for ( ; it.current(); ++it )
+ {
+ static_cast<MScanListItem*>( it.current() )->dump( t );
+ }
+
+ qDebug( "dump finished." );
+}