Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index be1245e..a006a3c 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -16,2 +16,3 @@ #include "scanlist.h" +#include "configwindow.h" @@ -22,2 +23,7 @@ +#ifdef QWS +#include <opie/odevice.h> +using namespace Opie; +#endif + MScanListView::MScanListView( QWidget* parent, const char* name ) @@ -144,3 +150,2 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo s.sprintf( "(i) new network: '%s'", (const char*) essid ); - network = new MScanListItem( this, "networks", essid, QString::null, 0, 0, 0 ); @@ -194,2 +199,4 @@ MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QS qDebug( "creating scanlist item" ); + if ( WellenreiterConfigWindow::instance() && type == "networks" ) + playSound( WellenreiterConfigWindow::instance()->soundOnNetwork() ); decorateItem( type, essid, macaddr, wep, channel, signal ); @@ -273,2 +280,3 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, + void MScanListItem::setManufacturer( const QString& manufacturer ) @@ -278,2 +286,14 @@ void MScanListItem::setManufacturer( const QString& manufacturer ) + +void MScanListItem::playSound( const QString& sound ) const +{ + #ifdef QWS + if ( sound == "Ignore" ) return; + else if ( sound == "Touch" ) ODevice::inst()->touchSound(); + else if ( sound == "Key" ) ODevice::inst()->keySound(); + else if ( sound == "Alarm" ) ODevice::inst()->alarmSound(); + #endif +} + + void MScanListItem::receivedBeacon() @@ -286,2 +306,4 @@ void MScanListItem::receivedBeacon() setText( col_lastseen, QTime::currentTime().toString() ); + if ( WellenreiterConfigWindow::instance() ) + playSound( WellenreiterConfigWindow::instance()->soundOnBeacon() ); } |