author | mickeyl <mickeyl> | 2004-01-03 18:27:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-03 18:27:07 (UTC) |
commit | 3889c8f853aa2d128f54389b17f08fc7b9150788 (patch) (side-by-side diff) | |
tree | 692bf0541e19d19f9ac93059463e4c4eb2e43e5f /noncore/net/wellenreiter/gui/scanlist.cpp | |
parent | c69a2abd7718d8acddb4ce96a1909b33056e2dcd (diff) | |
download | opie-3889c8f853aa2d128f54389b17f08fc7b9150788.zip opie-3889c8f853aa2d128f54389b17f08fc7b9150788.tar.gz opie-3889c8f853aa2d128f54389b17f08fc7b9150788.tar.bz2 |
show GPS coordinates in the more common DMS format
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 9 |
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 @@ -184,17 +184,17 @@ void MScanListView::addNewItem( const QString& type, // no essid to reduce clutter, maybe later we have a nick or stationname to display!? #ifdef DEBUG qDebug( "inserting new station %s", (const char*) macaddr ); #endif MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); station->setManufacturer( mac.manufacturer() ); - station->setLocation( loc.latitude, loc.longitude ); + station->setLocation( loc.dmsPosition() ); if ( type == "managed" ) { s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); } else { s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); @@ -528,22 +528,19 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, void MScanListItem::setManufacturer( const QString& manufacturer ) { setText( col_manuf, manufacturer ); } -void MScanListItem::setLocation( const float& latitude, const float& longitude ) +void MScanListItem::setLocation( const QString& location ) { - if ( latitude == 0.0 || longitude == 0.0 ) - setText( col_location, "N/A" ); - else - setText( col_location, QString().sprintf( "%.2f / %.2f", latitude, longitude ) ); + setText( col_location, location ); } void MScanListItem::playSound( const QString& sound ) const { #ifdef QWS if ( sound == "Ignore" ) return; else if ( sound == "Touch" ) ODevice::inst()->touchSound(); |