From eaec48ce99bc4e2f4e53dbd539a031b3ed993fb3 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 12 Mar 2005 23:56:15 +0000 Subject: Sort packagaes and channels (numbers) according their size instead of alphabeticaly. 9873 received packages are more than 10 but less than 10.000. The same is applied to the channel number [0..15] --- (limited to 'noncore/net/wellenreiter/gui') diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 8c2015e..f24e09f 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -567,3 +567,24 @@ void MScanListItem::receivedBeacon() } +QString MScanListItem::key( int id, bool b )const { + QString str; + + /* + * Pad the amount of received packages, number + * of the channel. + */ + switch( id ) { + case col_sig: + str = text(col_sig).rightJustify( 20, '0' ); + break; + case col_channel: + str = text(col_channel).rightJustify( 2, '0' ); + break; + default: + str = Opie::Ui::OListViewItem::key( id, b ); + break; + } + + return str; +} diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index 6a80f70..8b3814a 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h @@ -110,6 +110,8 @@ class MScanListItem: public Opie::Ui::OListViewItem virtual void serializeTo( QDataStream& s ) const; virtual void serializeFrom( QDataStream& s ); + virtual QString key( int id, bool )const; + private: QString _type; QString _essid; -- cgit v0.9.0.2