Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index d89c71f..470646d 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -23,17 +23,14 @@ | |||
23 | #include <qtextstream.h> | 23 | #include <qtextstream.h> |
24 | #include <qpopupmenu.h> | 24 | #include <qpopupmenu.h> |
25 | #include <qcheckbox.h> | 25 | #include <qcheckbox.h> |
26 | 26 | ||
27 | #ifdef QWS | 27 | #ifdef QWS |
28 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
29 | #include <opie/odevice.h> | ||
30 | using namespace Opie; | ||
31 | #endif | 29 | #endif |
32 | 30 | ||
33 | |||
34 | #ifdef QWS | 31 | #ifdef QWS |
35 | #include <qpe/resource.h> | 32 | #include <qpe/resource.h> |
36 | #else | 33 | #else |
37 | #include "resource.h" | 34 | #include "resource.h" |
38 | #endif | 35 | #endif |
39 | 36 | ||
@@ -418,14 +415,16 @@ MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QS | |||
418 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), | 415 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), |
419 | _channel( channel ), _signal( signal ), _beacons( 1 ) | 416 | _channel( channel ), _signal( signal ), _beacons( 1 ) |
420 | { | 417 | { |
421 | #ifdef DEBUG | 418 | #ifdef DEBUG |
422 | qDebug( "creating scanlist item" ); | 419 | qDebug( "creating scanlist item" ); |
423 | #endif | 420 | #endif |
424 | if ( WellenreiterConfigWindow::instance() && type == "network" ) | 421 | |
425 | playSound( WellenreiterConfigWindow::instance()->soundOnNetwork() ); | 422 | if ( WellenreiterConfigWindow::instance() ) |
423 | WellenreiterConfigWindow::instance()->performAction( type ); // better use signal/slot combination here | ||
424 | |||
426 | decorateItem( type, essid, macaddr, wep, channel, signal ); | 425 | decorateItem( type, essid, macaddr, wep, channel, signal ); |
427 | } | 426 | } |
428 | 427 | ||
429 | MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, | 428 | MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, |
430 | bool wep, int channel, int signal ) | 429 | bool wep, int channel, int signal ) |
431 | :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) | 430 | :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) |
@@ -536,23 +535,12 @@ void MScanListItem::setManufacturer( const QString& manufacturer ) | |||
536 | void MScanListItem::setLocation( const QString& location ) | 535 | void MScanListItem::setLocation( const QString& location ) |
537 | { | 536 | { |
538 | setText( col_location, location ); | 537 | setText( col_location, location ); |
539 | } | 538 | } |
540 | 539 | ||
541 | 540 | ||
542 | void MScanListItem::playSound( const QString& sound ) const | ||
543 | { | ||
544 | #ifdef QWS | ||
545 | if ( sound == "Ignore" ) return; | ||
546 | else if ( sound == "Touch" ) ODevice::inst()->touchSound(); | ||
547 | else if ( sound == "Key" ) ODevice::inst()->keySound(); | ||
548 | else if ( sound == "Alarm" ) ODevice::inst()->alarmSound(); | ||
549 | #endif | ||
550 | } | ||
551 | |||
552 | |||
553 | void MScanListItem::receivedBeacon() | 541 | void MScanListItem::receivedBeacon() |
554 | { | 542 | { |
555 | _beacons++; | 543 | _beacons++; |
556 | #ifdef DEBUG | 544 | #ifdef DEBUG |
557 | qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons ); | 545 | qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons ); |
558 | #endif | 546 | #endif |