Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (show 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 | |||
@@ -10,31 +10,35 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ***********************************************************************/ | 14 | ***********************************************************************/ |
15 | 15 | ||
16 | // Qt | ||
17 | |||
18 | #include <qpushbutton.h> | ||
19 | #include <qmessagebox.h> | ||
20 | #include <qcombobox.h> | ||
21 | #include <qspinbox.h> | ||
22 | #include <qsocketnotifier.h> | ||
23 | |||
24 | // Opie | 16 | // Opie |
25 | 17 | ||
26 | #ifdef QWS | 18 | #ifdef QWS |
27 | #include <opie/odevice.h> | 19 | #include <opie/odevice.h> |
28 | using namespace Opie; | 20 | using namespace Opie; |
29 | #endif | 21 | #endif |
30 | 22 | ||
23 | #ifdef QWS | ||
31 | #include <opie2/oapplication.h> | 24 | #include <opie2/oapplication.h> |
25 | #else | ||
26 | #include <qapplication.h> | ||
27 | #endif | ||
32 | #include <opie2/onetwork.h> | 28 | #include <opie2/onetwork.h> |
33 | #include <opie2/opcap.h> | 29 | #include <opie2/opcap.h> |
34 | 30 | ||
31 | // Qt | ||
32 | |||
33 | #include <qpushbutton.h> | ||
34 | #include <qmessagebox.h> | ||
35 | #include <qcombobox.h> | ||
36 | #include <qspinbox.h> | ||
37 | #include <qsocketnotifier.h> | ||
38 | |||
35 | // Standard | 39 | // Standard |
36 | 40 | ||
37 | #include <assert.h> | 41 | #include <assert.h> |
38 | #include <errno.h> | 42 | #include <errno.h> |
39 | #include <unistd.h> | 43 | #include <unistd.h> |
40 | #include <string.h> | 44 | #include <string.h> |
@@ -140,13 +144,17 @@ void Wellenreiter::startStopClicked() | |||
140 | { | 144 | { |
141 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 145 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
142 | 146 | ||
143 | iface->setChannelHopping(); // stop hopping channels | 147 | iface->setChannelHopping(); // stop hopping channels |
144 | pcap->close(); | 148 | pcap->close(); |
145 | sniffing = false; | 149 | sniffing = false; |
150 | #ifdef QWS | ||
146 | oApp->setTitle(); | 151 | oApp->setTitle(); |
152 | #else | ||
153 | qApp->mainWidget()->setCaption( "Wellenreiter II" ); | ||
154 | #endif | ||
147 | 155 | ||
148 | // get interface name from config window | 156 | // get interface name from config window |
149 | const QString& interface = configwindow->interfaceName->currentText(); | 157 | const QString& interface = configwindow->interfaceName->currentText(); |
150 | ONetwork* net = ONetwork::instance(); | 158 | ONetwork* net = ONetwork::instance(); |
151 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); | 159 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); |
152 | 160 | ||
@@ -218,11 +226,15 @@ void Wellenreiter::startStopClicked() | |||
218 | iface->setChannelHopping( 1000 ); //use interval from config window | 226 | iface->setChannelHopping( 1000 ); //use interval from config window |
219 | 227 | ||
220 | // connect | 228 | // connect |
221 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 229 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
222 | 230 | ||
223 | logwindow->log( "(i) Daemon has been started." ); | 231 | logwindow->log( "(i) Daemon has been started." ); |
232 | #ifdef QWS | ||
224 | oApp->setTitle( "Scanning ..." ); | 233 | oApp->setTitle( "Scanning ..." ); |
234 | #else | ||
235 | qApp->mainWidget()->setCaption( "Wellenreiter II / Scanning ..." ); | ||
236 | #endif | ||
225 | sniffing = true; | 237 | sniffing = true; |
226 | 238 | ||
227 | } | 239 | } |
228 | } | 240 | } |