-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index d695c17..245290d 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -9,32 +9,33 @@ | |||
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "scanlist.h" | 16 | #include "scanlist.h" |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "logwindow.h" | 18 | #include "logwindow.h" |
19 | 19 | ||
20 | #include <assert.h> | 20 | #include <assert.h> |
21 | #include <qcursor.h> | 21 | #include <qcursor.h> |
22 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
23 | #include <qtextstream.h> | 23 | #include <qtextstream.h> |
24 | #include <qpopupmenu.h> | 24 | #include <qpopupmenu.h> |
25 | #include <qcheckbox.h> | ||
25 | 26 | ||
26 | #ifdef QWS | 27 | #ifdef QWS |
27 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
28 | #include <opie/odevice.h> | 29 | #include <opie/odevice.h> |
29 | using namespace Opie; | 30 | using namespace Opie; |
30 | #endif | 31 | #endif |
31 | 32 | ||
32 | 33 | ||
33 | #ifdef QWS | 34 | #ifdef QWS |
34 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
35 | #else | 36 | #else |
36 | #include "resource.h" | 37 | #include "resource.h" |
37 | #endif | 38 | #endif |
38 | 39 | ||
39 | const int col_type = 0; | 40 | const int col_type = 0; |
40 | const int col_essid = 0; | 41 | const int col_essid = 0; |
@@ -456,32 +457,38 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, | |||
456 | setText( col_sig, QString::number( signal ) ); | 457 | setText( col_sig, QString::number( signal ) ); |
457 | if ( channel != -1 ) | 458 | if ( channel != -1 ) |
458 | setText( col_channel, QString::number( channel ) ); | 459 | setText( col_channel, QString::number( channel ) ); |
459 | 460 | ||
460 | setText( col_firstseen, QTime::currentTime().toString() ); | 461 | setText( col_firstseen, QTime::currentTime().toString() ); |
461 | //setText( col_lastseen, QTime::currentTime().toString() ); | 462 | //setText( col_lastseen, QTime::currentTime().toString() ); |
462 | 463 | ||
463 | listView()->triggerUpdate(); | 464 | listView()->triggerUpdate(); |
464 | 465 | ||
465 | this->type = type; | 466 | this->type = type; |
466 | _type = type; | 467 | _type = type; |
467 | _essid = essid; | 468 | _essid = essid; |
468 | _macaddr = macaddr; | 469 | _macaddr = macaddr; |
469 | _channel = channel; | 470 | _channel = channel; |
470 | _beacons = 1; | 471 | _beacons = 1; |
471 | _signal = 0; | 472 | _signal = 0; |
473 | |||
474 | if ( WellenreiterConfigWindow::instance()->openTree->isChecked() ) | ||
475 | { | ||
476 | listView()->ensureItemVisible( this ); | ||
477 | } | ||
478 | |||
472 | } | 479 | } |
473 | 480 | ||
474 | 481 | ||
475 | void MScanListItem::setManufacturer( const QString& manufacturer ) | 482 | void MScanListItem::setManufacturer( const QString& manufacturer ) |
476 | { | 483 | { |
477 | setText( col_manuf, manufacturer ); | 484 | setText( col_manuf, manufacturer ); |
478 | } | 485 | } |
479 | 486 | ||
480 | 487 | ||
481 | void MScanListItem::setLocation( const float& latitude, const float& longitude ) | 488 | void MScanListItem::setLocation( const float& latitude, const float& longitude ) |
482 | { | 489 | { |
483 | if ( latitude == 0.0 || longitude == 0.0 ) | 490 | if ( latitude == 0.0 || longitude == 0.0 ) |
484 | setText( col_location, "N/A" ); | 491 | setText( col_location, "N/A" ); |
485 | else | 492 | else |
486 | setText( col_location, QString().sprintf( "%.2f / %.2f", latitude, longitude ) ); | 493 | setText( col_location, QString().sprintf( "%.2f / %.2f", latitude, longitude ) ); |
487 | } | 494 | } |