summaryrefslogtreecommitdiff
path: root/noncore/net
Unidiff
Diffstat (limited to 'noncore/net') (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
@@ -558,12 +558,33 @@ void MScanListItem::receivedBeacon()
558 _beacons++; 558 _beacons++;
559 #ifdef DEBUG 559 #ifdef DEBUG
560 odebug << "MScanListItem " << _macaddr << ": received beacon #" << _beacons << "" << oendl; 560 odebug << "MScanListItem " << _macaddr << ": received beacon #" << _beacons << "" << oendl;
561 #endif 561 #endif
562 setText( col_sig, QString::number( _beacons ) ); 562 setText( col_sig, QString::number( _beacons ) );
563 setText( col_lastseen, QTime::currentTime().toString() ); 563 setText( col_lastseen, QTime::currentTime().toString() );
564 564
565 MScanListItem* p = (MScanListItem*) parent(); 565 MScanListItem* p = (MScanListItem*) parent();
566 if ( p ) p->receivedBeacon(); 566 if ( p ) p->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
@@ -101,24 +101,26 @@ class MScanListItem: public Opie::Ui::OListViewItem
101 int beacons() { return _beacons; }; 101 int beacons() { return _beacons; };
102 102
103 void setSignal( int signal ) { /* TODO */ }; 103 void setSignal( int signal ) { /* TODO */ };
104 void receivedBeacon(); 104 void receivedBeacon();
105 105
106 void setManufacturer( const QString& manufacturer ); 106 void setManufacturer( const QString& manufacturer );
107 void setLocation( const QString& location ); 107 void setLocation( const QString& location );
108 108
109 virtual Opie::Ui::OListViewItem* childFactory(); 109 virtual Opie::Ui::OListViewItem* childFactory();
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;
116 QString _macaddr; 118 QString _macaddr;
117 bool _wep; 119 bool _wep;
118 int _channel; 120 int _channel;
119 int _signal; 121 int _signal;
120 int _beacons; 122 int _beacons;
121 123
122}; 124};
123 125
124//****************************** MScanListViewFactory **************************************************************** 126//****************************** MScanListViewFactory ****************************************************************