Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 3bff7c4..41ffdcc 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -4,43 +4,47 @@ ** This file is part of Opie Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ***********************************************************************/ -// Qt - -#include <qpushbutton.h> -#include <qmessagebox.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qsocketnotifier.h> - // Opie #ifdef QWS #include <opie/odevice.h> using namespace Opie; #endif +#ifdef QWS #include <opie2/oapplication.h> +#else +#include <qapplication.h> +#endif #include <opie2/onetwork.h> #include <opie2/opcap.h> +// Qt + +#include <qpushbutton.h> +#include <qmessagebox.h> +#include <qcombobox.h> +#include <qspinbox.h> +#include <qsocketnotifier.h> + // Standard #include <assert.h> #include <errno.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <stdlib.h> // Local #include "wellenreiter.h" @@ -134,25 +138,29 @@ void Wellenreiter::receivePacket(OPacket* p) netView()->addNewItem( type, essid, header->macAddress2().toString(), header->usesWep(), channel, 0 ); } void Wellenreiter::startStopClicked() { if ( sniffing ) { disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); iface->setChannelHopping(); // stop hopping channels pcap->close(); sniffing = false; + #ifdef QWS oApp->setTitle(); + #else + qApp->mainWidget()->setCaption( "Wellenreiter II" ); + #endif // get interface name from config window const QString& interface = configwindow->interfaceName->currentText(); ONetwork* net = ONetwork::instance(); iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // switch off monitor mode iface->setMonitorMode( false ); // switch off promisc flag iface->setPromiscuousMode( false ); //TODO: Display "please wait..." (use owait?) @@ -212,17 +220,21 @@ void Wellenreiter::startStopClicked() } // set capturer to non-blocking mode pcap->setBlocking( false ); // start channel hopper iface->setChannelHopping( 1000 ); //use interval from config window // connect connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); logwindow->log( "(i) Daemon has been started." ); + #ifdef QWS oApp->setTitle( "Scanning ..." ); + #else + qApp->mainWidget()->setCaption( "Wellenreiter II / Scanning ..." ); + #endif sniffing = true; } } |