summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-12 23:56:15 (UTC)
committer zecke <zecke>2005-03-12 23:56:15 (UTC)
commiteaec48ce99bc4e2f4e53dbd539a031b3ed993fb3 (patch) (unidiff)
tree0b88cd5c35336003b06a9df3717435a1ad396f09
parent0dde10390f3b9c85030741e861d893a6a78fbbb1 (diff)
downloadopie-eaec48ce99bc4e2f4e53dbd539a031b3ed993fb3.zip
opie-eaec48ce99bc4e2f4e53dbd539a031b3ed993fb3.tar.gz
opie-eaec48ce99bc4e2f4e53dbd539a031b3ed993fb3.tar.bz2
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]
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp21
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h2
2 files changed, 23 insertions, 0 deletions
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()
567 567
568} 568}
569 569
570QString MScanListItem::key( int id, bool b )const {
571 QString str;
572
573 /*
574 * Pad the amount of received packages, number
575 * of the channel.
576 */
577 switch( id ) {
578 case col_sig:
579 str = text(col_sig).rightJustify( 20, '0' );
580 break;
581 case col_channel:
582 str = text(col_channel).rightJustify( 2, '0' );
583 break;
584 default:
585 str = Opie::Ui::OListViewItem::key( id, b );
586 break;
587 }
588
589 return str;
590}
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
110 virtual void serializeTo( QDataStream& s ) const; 110 virtual void serializeTo( QDataStream& s ) const;
111 virtual void serializeFrom( QDataStream& s ); 111 virtual void serializeFrom( QDataStream& s );
112 112
113 virtual QString key( int id, bool )const;
114
113 private: 115 private:
114 QString _type; 116 QString _type;
115 QString _essid; 117 QString _essid;