summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp25
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()
{
};
+OListViewItem* MScanListView::childFactory()
+{
+ return new MScanListItem( this );
+}
+
void MScanListView::serializeTo( QDataStream& s) const
{
qDebug( "serializing MScanListView" );
@@ -198,14 +203,34 @@ MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid
decorateItem( type, essid, macaddr, wep, channel, signal );
}
+OListViewItem* MScanListItem::childFactory()
+{
+ return new MScanListItem( this );
+}
+
void MScanListItem::serializeTo( QDataStream& s ) const
{
+ qDebug( "serializing MScanListItem" );
OListViewItem::serializeTo( s );
+
+ s << _type;
+ s << (Q_UINT8) _wep;
}
void MScanListItem::serializeFrom( QDataStream& s )
{
+ qDebug( "serializing MScanListItem" );
OListViewItem::serializeFrom( s );
+
+ s >> _type;
+ s >> (Q_UINT8) _wep;
+
+ QString name;
+ name.sprintf( "wellenreiter/%s", (const char*) _type );
+ setPixmap( col_type, Resource::loadPixmap( name ) );
+ if ( _wep )
+ setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap!
+ listView()->triggerUpdate();
}
void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal )