Diffstat (limited to 'noncore/net/wellenreiter/gui/configwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index ae149e2..1670f93 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -13,12 +13,13 @@ | |||
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | /* LOCAL */ | 16 | /* LOCAL */ |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "mainwindow.h" | 18 | #include "mainwindow.h" |
19 | #include "protolistview.h" | ||
19 | 20 | ||
20 | /* OPIE */ | 21 | /* OPIE */ |
21 | #include <opie2/onetwork.h> | 22 | #include <opie2/onetwork.h> |
22 | #ifdef QWS | 23 | #ifdef QWS |
23 | #include <opie2/oapplication.h> | 24 | #include <opie2/oapplication.h> |
24 | #include <opie2/oconfig.h> | 25 | #include <opie2/oconfig.h> |
@@ -181,13 +182,16 @@ bool WellenreiterConfigWindow::isChannelChecked( int channel ) const | |||
181 | case 9: return channel9->isOn(); | 182 | case 9: return channel9->isOn(); |
182 | case 10: return channel10->isOn(); | 183 | case 10: return channel10->isOn(); |
183 | case 11: return channel11->isOn(); | 184 | case 11: return channel11->isOn(); |
184 | case 12: return channel12->isOn(); | 185 | case 12: return channel12->isOn(); |
185 | case 13: return channel13->isOn(); | 186 | case 13: return channel13->isOn(); |
186 | case 14: return channel14->isOn(); | 187 | case 14: return channel14->isOn(); |
188 | default: return false; | ||
187 | } | 189 | } |
190 | |||
191 | |||
188 | } | 192 | } |
189 | 193 | ||
190 | 194 | ||
191 | void WellenreiterConfigWindow::changedDeviceType(int t) | 195 | void WellenreiterConfigWindow::changedDeviceType(int t) |
192 | { | 196 | { |
193 | if ( t != DEVTYPE_FILE ) return; | 197 | if ( t != DEVTYPE_FILE ) return; |
@@ -214,25 +218,25 @@ void WellenreiterConfigWindow::synchronizeActionsAndScripts() | |||
214 | //newNetworkScript->setEnabled( newNetworkAction->currentItem() == 4 ); | 218 | //newNetworkScript->setEnabled( newNetworkAction->currentItem() == 4 ); |
215 | //newClientScript->setEnabled( newClientAction->currentItem() == 4 ); | 219 | //newClientScript->setEnabled( newClientAction->currentItem() == 4 ); |
216 | //newStationScript->setEnabled( newStationAction->currentItem() == 4 ); | 220 | //newStationScript->setEnabled( newStationAction->currentItem() == 4 ); |
217 | } | 221 | } |
218 | 222 | ||
219 | 223 | ||
220 | void WellenreiterConfigWindow::changedNetworkAction(int t) | 224 | void WellenreiterConfigWindow::changedNetworkAction(int ) |
221 | { | 225 | { |
222 | synchronizeActionsAndScripts(); | 226 | synchronizeActionsAndScripts(); |
223 | } | 227 | } |
224 | 228 | ||
225 | 229 | ||
226 | void WellenreiterConfigWindow::changedClientAction(int t) | 230 | void WellenreiterConfigWindow::changedClientAction(int ) |
227 | { | 231 | { |
228 | synchronizeActionsAndScripts(); | 232 | synchronizeActionsAndScripts(); |
229 | } | 233 | } |
230 | 234 | ||
231 | 235 | ||
232 | void WellenreiterConfigWindow::changedStationAction(int t) | 236 | void WellenreiterConfigWindow::changedStationAction(int ) |
233 | { | 237 | { |
234 | synchronizeActionsAndScripts(); | 238 | synchronizeActionsAndScripts(); |
235 | } | 239 | } |
236 | 240 | ||
237 | 241 | ||
238 | void WellenreiterConfigWindow::getCaptureFileNameClicked() | 242 | void WellenreiterConfigWindow::getCaptureFileNameClicked() |
@@ -277,23 +281,22 @@ const QString WellenreiterConfigWindow::gpsHost() const | |||
277 | return useGPS() ? gpsdHost->currentText() : QString::null; | 281 | return useGPS() ? gpsdHost->currentText() : QString::null; |
278 | } | 282 | } |
279 | 283 | ||
280 | 284 | ||
281 | int WellenreiterConfigWindow::gpsPort() const | 285 | int WellenreiterConfigWindow::gpsPort() const |
282 | { | 286 | { |
283 | bool ok; | ||
284 | return useGPS() ? gpsdPort->value() : -1; | 287 | return useGPS() ? gpsdPort->value() : -1; |
285 | } | 288 | } |
286 | 289 | ||
287 | 290 | ||
288 | void WellenreiterConfigWindow::performAction( const QString& type, | 291 | void WellenreiterConfigWindow::performAction( const QString& type, |
289 | const QString& essid, | 292 | const QString& essid, |
290 | const QString& mac, | 293 | const QString& mac, |
291 | bool wep, | 294 | bool wep, |
292 | int channel, | 295 | int channel, |
293 | int signal | 296 | int /* signal */ |
294 | /* , const GpsLocation& loc */ ) | 297 | /* , const GpsLocation& loc */ ) |
295 | { | 298 | { |
296 | int action; | 299 | int action; |
297 | QString script; | 300 | QString script; |
298 | 301 | ||
299 | if ( type == "network" ) | 302 | if ( type == "network" ) |
@@ -314,13 +317,13 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
314 | else | 317 | else |
315 | { | 318 | { |
316 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; | 319 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; |
317 | return; | 320 | return; |
318 | } | 321 | } |
319 | 322 | ||
320 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; | 323 | odebug << "for event '" << type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; |
321 | 324 | ||
322 | switch( action ) | 325 | switch( action ) |
323 | { | 326 | { |
324 | case 0: /* Ignore */ return; | 327 | case 0: /* Ignore */ return; |
325 | case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; | 328 | case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; |
326 | case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; | 329 | case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; |
@@ -401,12 +404,13 @@ void WellenreiterConfigWindow::load() | |||
401 | adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) ); | 404 | adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) ); |
402 | 405 | ||
403 | c->setGroup( "Capture" ); | 406 | c->setGroup( "Capture" ); |
404 | writeCaptureFile->setChecked( c->readBoolEntry( "writeCaptureFile", true ) ); | 407 | writeCaptureFile->setChecked( c->readBoolEntry( "writeCaptureFile", true ) ); |
405 | captureFileName->setEnabled( writeCaptureFile->isChecked() ); | 408 | captureFileName->setEnabled( writeCaptureFile->isChecked() ); |
406 | getCaptureFileName->setEnabled( writeCaptureFile->isChecked() ); | 409 | getCaptureFileName->setEnabled( writeCaptureFile->isChecked() ); |
410 | parsePackets->setEnabled( writeCaptureFile->isChecked() ); | ||
407 | captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); | 411 | captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); |
408 | hexViewBufferUnlimited->setChecked( c->readBoolEntry( "hexViewBufferUnlimited", true ) ); | 412 | hexViewBufferUnlimited->setChecked( c->readBoolEntry( "hexViewBufferUnlimited", true ) ); |
409 | hexViewBufferLimited->setChecked( !c->readBoolEntry( "hexViewBufferUnlimited", true ) ); | 413 | hexViewBufferLimited->setChecked( !c->readBoolEntry( "hexViewBufferUnlimited", true ) ); |
410 | hexViewBufferSize->setValue( c->readNumEntry( "hexViewBufferSize", 2000 ) ); | 414 | hexViewBufferSize->setValue( c->readNumEntry( "hexViewBufferSize", 2000 ) ); |
411 | 415 | ||
412 | c->setGroup( "UI" ); | 416 | c->setGroup( "UI" ); |