Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 32 |
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 | |||
@@ -21,4 +21,6 @@ | |||
21 | #include "manufacturers.h" | 21 | #include "manufacturers.h" |
22 | 22 | ||
23 | #include <qtextstream.h> | ||
24 | |||
23 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 25 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
24 | :OListView( parent, name ), _manufacturerdb( 0 ) | 26 | :OListView( parent, name ), _manufacturerdb( 0 ) |
@@ -27,5 +29,5 @@ MScanListView::MScanListView( QWidget* parent, const char* name ) | |||
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 ); |
@@ -126,15 +128,15 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
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 ) |
@@ -149,5 +151,17 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
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 | ||
156 | void 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 | } | ||