summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp37
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h1
2 files changed, 30 insertions, 8 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 8c2c315..0bfc8e9 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -35,5 +35,5 @@ using namespace Opie;
#include <qcombobox.h>
#include <qspinbox.h>
-#include <qsocketnotifier.h>
+#include <qmainwindow.h>
// Standard
@@ -96,4 +96,5 @@ Wellenreiter::Wellenreiter( QWidget* parent )
}
+
Wellenreiter::~Wellenreiter()
{
@@ -104,4 +105,5 @@ Wellenreiter::~Wellenreiter()
}
+
void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
{
@@ -109,4 +111,25 @@ void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
}
+
+void Wellenreiter::channelHopped(int c)
+{
+ QString title = "Wellenreiter II -scan- [";
+ QString left;
+ if ( c > 1 ) left.fill( '.', c-1 );
+ title.append( left );
+ title.append( '|' );
+ if ( c < iface->channels() )
+ {
+ QString right;
+ right.fill( '.', iface->channels()-c );
+ title.append( right );
+ }
+ title.append( "]" );
+ //title.append( QString().sprintf( " %02d", c ) );
+ assert( parent() );
+ ( (QMainWindow*) parent() )->setCaption( title );
+}
+
+
void Wellenreiter::receivePacket(OPacket* p)
{
@@ -187,5 +210,5 @@ void Wellenreiter::receivePacket(OPacket* p)
(const char*) wlan->macAddress1().toString(true),
(const char*) wlan->macAddress3().toString(true) );
- netView()->traffic( "fromDS", wlan->macAddress2().toString(),
+ netView()->traffic( "IBSS", wlan->macAddress2().toString(),
wlan->macAddress1().toString(),
wlan->macAddress3().toString() );
@@ -200,5 +223,5 @@ void Wellenreiter::startStopClicked()
{
disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
-
+ disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
iface->setChannelHopping(); // stop hopping channels
pcap->close();
@@ -222,4 +245,6 @@ void Wellenreiter::startStopClicked()
system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess
logwindow->log( "(i) Stopped Scanning." );
+ assert( parent() );
+ ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" );
// message the user
@@ -282,11 +307,7 @@ void Wellenreiter::startStopClicked()
// connect
connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
+ connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
logwindow->log( "(i) Started Scanning." );
- #ifdef QWS
- oApp->setTitle( "Scanning ..." );
- #else
- qApp->mainWidget()->setCaption( "Wellenreiter II / Scanning ..." );
- #endif
sniffing = true;
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index ff73dd4..85f889b 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -49,4 +49,5 @@ class Wellenreiter : public WellenreiterBase {
public slots:
+ void channelHopped(int);
void receivePacket(OPacket*);
void startStopClicked();