summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 1cca507..d89c71f 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -180,25 +180,25 @@ void MScanListView::addNewItem( const QString& type,
180 } 180 }
181 181
182 182
183 // insert new station as child from network 183 // insert new station as child from network
184 // no essid to reduce clutter, maybe later we have a nick or stationname to display!? 184 // no essid to reduce clutter, maybe later we have a nick or stationname to display!?
185 185
186 #ifdef DEBUG 186 #ifdef DEBUG
187 qDebug( "inserting new station %s", (const char*) macaddr ); 187 qDebug( "inserting new station %s", (const char*) macaddr );
188 #endif 188 #endif
189 189
190 MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); 190 MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal );
191 station->setManufacturer( mac.manufacturer() ); 191 station->setManufacturer( mac.manufacturer() );
192 station->setLocation( loc.latitude, loc.longitude ); 192 station->setLocation( loc.dmsPosition() );
193 193
194 if ( type == "managed" ) 194 if ( type == "managed" )
195 { 195 {
196 s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); 196 s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel );
197 } 197 }
198 else 198 else
199 { 199 {
200 s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); 200 s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel );
201 } 201 }
202 MLogWindow::logwindow()->log( s ); 202 MLogWindow::logwindow()->log( s );
203 203
204} 204}
@@ -524,30 +524,27 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
524 listView()->ensureItemVisible( this ); 524 listView()->ensureItemVisible( this );
525 } 525 }
526 526
527} 527}
528 528
529 529
530void MScanListItem::setManufacturer( const QString& manufacturer ) 530void MScanListItem::setManufacturer( const QString& manufacturer )
531{ 531{
532 setText( col_manuf, manufacturer ); 532 setText( col_manuf, manufacturer );
533} 533}
534 534
535 535
536void MScanListItem::setLocation( const float& latitude, const float& longitude ) 536void MScanListItem::setLocation( const QString& location )
537{ 537{
538 if ( latitude == 0.0 || longitude == 0.0 ) 538 setText( col_location, location );
539 setText( col_location, "N/A" );
540 else
541 setText( col_location, QString().sprintf( "%.2f / %.2f", latitude, longitude ) );
542} 539}
543 540
544 541
545void MScanListItem::playSound( const QString& sound ) const 542void MScanListItem::playSound( const QString& sound ) const
546{ 543{
547 #ifdef QWS 544 #ifdef QWS
548 if ( sound == "Ignore" ) return; 545 if ( sound == "Ignore" ) return;
549 else if ( sound == "Touch" ) ODevice::inst()->touchSound(); 546 else if ( sound == "Touch" ) ODevice::inst()->touchSound();
550 else if ( sound == "Key" ) ODevice::inst()->keySound(); 547 else if ( sound == "Key" ) ODevice::inst()->keySound();
551 else if ( sound == "Alarm" ) ODevice::inst()->alarmSound(); 548 else if ( sound == "Alarm" ) ODevice::inst()->alarmSound();
552 #endif 549 #endif
553} 550}