Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (show 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 @@ | |||
19 | #include "scanlist.h" | 19 | #include "scanlist.h" |
20 | #include "logwindow.h" | 20 | #include "logwindow.h" |
21 | #include "hexwindow.h" | 21 | #include "hexwindow.h" |
22 | #include "configwindow.h" | 22 | #include "configwindow.h" |
23 | #include "statwindow.h" | 23 | #include "statwindow.h" |
24 | #include "graphwindow.h" | 24 | #include "graphwindow.h" |
25 | #include "protolistview.h" | 25 | #include "protolistview.h" |
26 | 26 | ||
27 | // Opie | 27 | // Opie |
28 | 28 | ||
29 | #ifdef QWS | 29 | #ifdef QWS |
30 | #include <opie/odevice.h> | 30 | #include <opie/odevice.h> |
31 | #include <qpe/qcopenvelope_qws.h> | ||
31 | using namespace Opie; | 32 | using namespace Opie; |
32 | #endif | 33 | #endif |
33 | 34 | ||
34 | #ifdef QWS | 35 | #ifdef QWS |
35 | #include <opie2/oapplication.h> | 36 | #include <opie2/oapplication.h> |
36 | #else | 37 | #else |
37 | #include <qapplication.h> | 38 | #include <qapplication.h> |
38 | #endif | 39 | #endif |
39 | #include <opie2/onetwork.h> | 40 | #include <opie2/onetwork.h> |
40 | #include <opie2/opcap.h> | 41 | #include <opie2/opcap.h> |
41 | 42 | ||
42 | // Qt | 43 | // Qt |
@@ -72,24 +73,26 @@ Wellenreiter::Wellenreiter( QWidget* parent ) | |||
72 | // | 73 | // |
73 | // detect operating system | 74 | // detect operating system |
74 | // | 75 | // |
75 | 76 | ||
76 | #ifdef QWS | 77 | #ifdef QWS |
77 | QString sys; | 78 | QString sys; |
78 | sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); | 79 | sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); |
79 | _system = ODevice::inst()->system(); | 80 | _system = ODevice::inst()->system(); |
80 | logwindow->log( sys ); | 81 | logwindow->log( sys ); |
81 | #endif | 82 | #endif |
82 | 83 | ||
83 | netview->setColumnWidthMode( 1, QListView::Manual ); | 84 | netview->setColumnWidthMode( 1, QListView::Manual ); |
85 | connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ), | ||
86 | this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) ); | ||
84 | pcap = new OPacketCapturer(); | 87 | pcap = new OPacketCapturer(); |
85 | } | 88 | } |
86 | 89 | ||
87 | 90 | ||
88 | Wellenreiter::~Wellenreiter() | 91 | Wellenreiter::~Wellenreiter() |
89 | { | 92 | { |
90 | delete pcap; | 93 | delete pcap; |
91 | } | 94 | } |
92 | 95 | ||
93 | 96 | ||
94 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) | 97 | void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) |
95 | { | 98 | { |
@@ -479,12 +482,27 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa | |||
479 | ODevice::inst()->keySound(); | 482 | ODevice::inst()->keySound(); |
480 | else if ( action == "LedOn" ) | 483 | else if ( action == "LedOn" ) |
481 | ODevice::inst()->setLedState( Led_Mail, Led_On ); | 484 | ODevice::inst()->setLedState( Led_Mail, Led_On ); |
482 | else if ( action == "LedOff" ) | 485 | else if ( action == "LedOff" ) |
483 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); | 486 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); |
484 | else if ( action == "LogMessage" ) | 487 | else if ( action == "LogMessage" ) |
485 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 488 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
486 | else if ( action == "MessageBox" ) | 489 | else if ( action == "MessageBox" ) |
487 | QMessageBox::information ( this, "Notification!", | 490 | QMessageBox::information ( this, "Notification!", |
488 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 491 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
489 | } | 492 | } |
490 | 493 | ||
494 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) | ||
495 | { | ||
496 | qDebug( "joinNetwork() - %s, %s, %d, %s", | ||
497 | (const char*) type, | ||
498 | (const char*) essid, | ||
499 | channel, | ||
500 | (const char*) macaddr ); | ||
501 | |||
502 | // TODO: Stop scanning here | ||
503 | |||
504 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); | ||
505 | msg << "test" << "test" << "test"; | ||
506 | |||
507 | } | ||
508 | |||