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 @@ | |||
16 | #include "scanlist.h" | 16 | #include "scanlist.h" |
17 | #include "configwindow.h" | ||
17 | 18 | ||
@@ -22,2 +23,7 @@ | |||
22 | 23 | ||
24 | #ifdef QWS | ||
25 | #include <opie/odevice.h> | ||
26 | using namespace Opie; | ||
27 | #endif | ||
28 | |||
23 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 29 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
@@ -144,3 +150,2 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
144 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); | 150 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); |
145 | |||
146 | network = new MScanListItem( this, "networks", essid, QString::null, 0, 0, 0 ); | 151 | network = new MScanListItem( this, "networks", essid, QString::null, 0, 0, 0 ); |
@@ -194,2 +199,4 @@ MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QS | |||
194 | qDebug( "creating scanlist item" ); | 199 | qDebug( "creating scanlist item" ); |
200 | if ( WellenreiterConfigWindow::instance() && type == "networks" ) | ||
201 | playSound( WellenreiterConfigWindow::instance()->soundOnNetwork() ); | ||
195 | decorateItem( type, essid, macaddr, wep, channel, signal ); | 202 | decorateItem( type, essid, macaddr, wep, channel, signal ); |
@@ -273,2 +280,3 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, | |||
273 | 280 | ||
281 | |||
274 | void MScanListItem::setManufacturer( const QString& manufacturer ) | 282 | void MScanListItem::setManufacturer( const QString& manufacturer ) |
@@ -278,2 +286,14 @@ void MScanListItem::setManufacturer( const QString& manufacturer ) | |||
278 | 286 | ||
287 | |||
288 | void MScanListItem::playSound( const QString& sound ) const | ||
289 | { | ||
290 | #ifdef QWS | ||
291 | if ( sound == "Ignore" ) return; | ||
292 | else if ( sound == "Touch" ) ODevice::inst()->touchSound(); | ||
293 | else if ( sound == "Key" ) ODevice::inst()->keySound(); | ||
294 | else if ( sound == "Alarm" ) ODevice::inst()->alarmSound(); | ||
295 | #endif | ||
296 | } | ||
297 | |||
298 | |||
279 | void MScanListItem::receivedBeacon() | 299 | void MScanListItem::receivedBeacon() |
@@ -286,2 +306,4 @@ void MScanListItem::receivedBeacon() | |||
286 | setText( col_lastseen, QTime::currentTime().toString() ); | 306 | setText( col_lastseen, QTime::currentTime().toString() ); |
307 | if ( WellenreiterConfigWindow::instance() ) | ||
308 | playSound( WellenreiterConfigWindow::instance()->soundOnBeacon() ); | ||
287 | } | 309 | } |