summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp20
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
@@ -17,29 +17,26 @@
#include "configwindow.h"
#include "logwindow.h"
#include <assert.h>
#include <qcursor.h>
#include <qdatetime.h>
#include <qtextstream.h>
#include <qpopupmenu.h>
#include <qcheckbox.h>
#ifdef QWS
#include <qpe/qpeapplication.h>
-#include <opie/odevice.h>
-using namespace Opie;
#endif
-
#ifdef QWS
#include <qpe/resource.h>
#else
#include "resource.h"
#endif
const int col_type = 0;
const int col_essid = 0;
const int col_sig = 1;
const int col_ap = 2;
const int col_channel = 3;
const int col_wep = 4;
@@ -412,26 +409,28 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
// MScanListItem
//============================================================
MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr,
bool wep, int channel, int signal )
:OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ),
_type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ),
_channel( channel ), _signal( signal ), _beacons( 1 )
{
#ifdef DEBUG
qDebug( "creating scanlist item" );
#endif
- if ( WellenreiterConfigWindow::instance() && type == "network" )
- playSound( WellenreiterConfigWindow::instance()->soundOnNetwork() );
+
+ if ( WellenreiterConfigWindow::instance() )
+ WellenreiterConfigWindow::instance()->performAction( type ); // better use signal/slot combination here
+
decorateItem( type, essid, macaddr, wep, channel, signal );
}
MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr,
bool wep, int channel, int signal )
:OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null )
{
#ifdef DEBUG
qDebug( "creating scanlist item" );
#endif
decorateItem( type, essid, macaddr, wep, channel, signal );
}
@@ -530,35 +529,24 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
void MScanListItem::setManufacturer( const QString& manufacturer )
{
setText( col_manuf, manufacturer );
}
void MScanListItem::setLocation( const QString& location )
{
setText( col_location, location );
}
-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()
{
_beacons++;
#ifdef DEBUG
qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons );
#endif
setText( col_sig, QString::number( _beacons ) );
setText( col_lastseen, QTime::currentTime().toString() );
MScanListItem* p = (MScanListItem*) parent();
if ( p ) p->receivedBeacon();