Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 58a04fb..be1245e 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -53,6 +53,11 @@ MScanListView::~MScanListView() | |||
53 | { | 53 | { |
54 | }; | 54 | }; |
55 | 55 | ||
56 | OListViewItem* MScanListView::childFactory() | ||
57 | { | ||
58 | return new MScanListItem( this ); | ||
59 | } | ||
60 | |||
56 | void MScanListView::serializeTo( QDataStream& s) const | 61 | void MScanListView::serializeTo( QDataStream& s) const |
57 | { | 62 | { |
58 | qDebug( "serializing MScanListView" ); | 63 | qDebug( "serializing MScanListView" ); |
@@ -198,14 +203,34 @@ MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid | |||
198 | decorateItem( type, essid, macaddr, wep, channel, signal ); | 203 | decorateItem( type, essid, macaddr, wep, channel, signal ); |
199 | } | 204 | } |
200 | 205 | ||
206 | OListViewItem* MScanListItem::childFactory() | ||
207 | { | ||
208 | return new MScanListItem( this ); | ||
209 | } | ||
210 | |||
201 | void MScanListItem::serializeTo( QDataStream& s ) const | 211 | void MScanListItem::serializeTo( QDataStream& s ) const |
202 | { | 212 | { |
213 | qDebug( "serializing MScanListItem" ); | ||
203 | OListViewItem::serializeTo( s ); | 214 | OListViewItem::serializeTo( s ); |
215 | |||
216 | s << _type; | ||
217 | s << (Q_UINT8) _wep; | ||
204 | } | 218 | } |
205 | 219 | ||
206 | void MScanListItem::serializeFrom( QDataStream& s ) | 220 | void MScanListItem::serializeFrom( QDataStream& s ) |
207 | { | 221 | { |
222 | qDebug( "serializing MScanListItem" ); | ||
208 | OListViewItem::serializeFrom( s ); | 223 | OListViewItem::serializeFrom( s ); |
224 | |||
225 | s >> _type; | ||
226 | s >> (Q_UINT8) _wep; | ||
227 | |||
228 | QString name; | ||
229 | name.sprintf( "wellenreiter/%s", (const char*) _type ); | ||
230 | setPixmap( col_type, Resource::loadPixmap( name ) ); | ||
231 | if ( _wep ) | ||
232 | setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! | ||
233 | listView()->triggerUpdate(); | ||
209 | } | 234 | } |
210 | 235 | ||
211 | void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) | 236 | void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) |