author | mickeyl <mickeyl> | 2003-06-15 12:45:31 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-06-15 12:45:31 (UTC) |
commit | 6b682070b6d83f3537dd9fa5aee715ab142a04e6 (patch) (side-by-side diff) | |
tree | b152def34a4fe52ef6195af9c1c324b23a3d7981 /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | 7feda6ad0e05602d0a939f9867f296f62ae758cd (diff) | |
download | opie-6b682070b6d83f3537dd9fa5aee715ab142a04e6.zip opie-6b682070b6d83f3537dd9fa5aee715ab142a04e6.tar.gz opie-6b682070b6d83f3537dd9fa5aee715ab142a04e6.tar.bz2 |
basic framework for context menu "join network" established
just need to send the proper qcop messages now
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 2f26702..8a9e55d 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -19,24 +19,25 @@ #include "scanlist.h" #include "logwindow.h" #include "hexwindow.h" #include "configwindow.h" #include "statwindow.h" #include "graphwindow.h" #include "protolistview.h" // Opie #ifdef QWS #include <opie/odevice.h> +#include <qpe/qcopenvelope_qws.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 @@ -72,24 +73,26 @@ Wellenreiter::Wellenreiter( QWidget* parent ) // // detect operating system // #ifdef QWS QString sys; sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); _system = ODevice::inst()->system(); logwindow->log( sys ); #endif netview->setColumnWidthMode( 1, QListView::Manual ); + connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ), + this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) ); pcap = new OPacketCapturer(); } Wellenreiter::~Wellenreiter() { delete pcap; } void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) { @@ -479,12 +482,27 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa ODevice::inst()->keySound(); else if ( action == "LedOn" ) ODevice::inst()->setLedState( Led_Mail, Led_On ); else if ( action == "LedOff" ) ODevice::inst()->setLedState( Led_Mail, Led_Off ); else if ( action == "LogMessage" ) logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); else if ( action == "MessageBox" ) QMessageBox::information ( this, "Notification!", QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); } +void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) +{ + qDebug( "joinNetwork() - %s, %s, %d, %s", + (const char*) type, + (const char*) essid, + channel, + (const char*) macaddr ); + + // TODO: Stop scanning here + + QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); + msg << "test" << "test" << "test"; + +} + |