Diffstat (limited to 'noncore/net/wellenreiter/gui/configwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index bfdb20a..279b39c 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -228,25 +228,25 @@ void WellenreiterConfigWindow::changedClientAction(int t) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | 230 | ||
231 | void WellenreiterConfigWindow::changedStationAction(int t) | 231 | void WellenreiterConfigWindow::changedStationAction(int t) |
232 | { | 232 | { |
233 | synchronizeActionsAndScripts(); | 233 | synchronizeActionsAndScripts(); |
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | void WellenreiterConfigWindow::getCaptureFileNameClicked() | 237 | void WellenreiterConfigWindow::getCaptureFileNameClicked() |
238 | { | 238 | { |
239 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); | 239 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); |
240 | odebug << "name = " << (const char*) name << "" << oendl; | 240 | odebug << "name = " << name << "" << oendl; |
241 | if ( !name.isEmpty() ) | 241 | if ( !name.isEmpty() ) |
242 | { | 242 | { |
243 | captureFileName->setText( name ); | 243 | captureFileName->setText( name ); |
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | 247 | ||
248 | void WellenreiterConfigWindow::channelAllClicked(int state) | 248 | void WellenreiterConfigWindow::channelAllClicked(int state) |
249 | { | 249 | { |
250 | bool b = state; | 250 | bool b = state; |
251 | channel1->setChecked( b ); | 251 | channel1->setChecked( b ); |
252 | channel2->setChecked( b ); | 252 | channel2->setChecked( b ); |
@@ -303,54 +303,54 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
303 | else if ( type == "managed" || type == "adhoc" ) | 303 | else if ( type == "managed" || type == "adhoc" ) |
304 | { | 304 | { |
305 | action = newClientAction->currentItem(); | 305 | action = newClientAction->currentItem(); |
306 | script = newClientScript->text(); | 306 | script = newClientScript->text(); |
307 | } | 307 | } |
308 | else if ( type == "station" ) | 308 | else if ( type == "station" ) |
309 | { | 309 | { |
310 | action = newStationAction->currentItem(); | 310 | action = newStationAction->currentItem(); |
311 | script = newStationScript->text(); | 311 | script = newStationScript->text(); |
312 | } | 312 | } |
313 | else | 313 | else |
314 | { | 314 | { |
315 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << (const char*) type << "'" << oendl; | 315 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; |
316 | return; | 316 | return; |
317 | } | 317 | } |
318 | 318 | ||
319 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << (const char*) script << "')" << oendl; | 319 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; |
320 | 320 | ||
321 | switch( action ) | 321 | switch( action ) |
322 | { | 322 | { |
323 | case 0: /* Ignore */ return; | 323 | case 0: /* Ignore */ return; |
324 | case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; | 324 | case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; |
325 | case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; | 325 | case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; |
326 | case 3: /* Blink LED */ break; //FIXME: Implement this | 326 | case 3: /* Blink LED */ break; //FIXME: Implement this |
327 | case 4: /* Run Script */ | 327 | case 4: /* Run Script */ |
328 | { | 328 | { |
329 | /** | 329 | /** |
330 | * | 330 | * |
331 | * Script Substitution Information: | 331 | * Script Substitution Information: |
332 | * | 332 | * |
333 | * $SSID = SSID | 333 | * $SSID = SSID |
334 | * $MAC = MAC | 334 | * $MAC = MAC |
335 | * $WEP = Wep | 335 | * $WEP = Wep |
336 | * $CHAN = Channel | 336 | * $CHAN = Channel |
337 | * | 337 | * |
338 | **/ | 338 | **/ |
339 | script = script.replace( QRegExp( "$SSID" ), essid ); | 339 | script = script.replace( QRegExp( "$SSID" ), essid ); |
340 | script = script.replace( QRegExp( "$MAC" ), mac ); | 340 | script = script.replace( QRegExp( "$MAC" ), mac ); |
341 | script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); | 341 | script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); |
342 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); | 342 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); |
343 | 343 | ||
344 | odebug << "going to call script '" << (const char*) script << "'" << oendl; | 344 | odebug << "going to call script '" << script << "'" << oendl; |
345 | ::system( script ); | 345 | ::system( script ); |
346 | odebug << "script returned." << oendl; | 346 | odebug << "script returned." << oendl; |
347 | return; | 347 | return; |
348 | } | 348 | } |
349 | default: assert( false ); | 349 | default: assert( false ); |
350 | } | 350 | } |
351 | } | 351 | } |
352 | 352 | ||
353 | 353 | ||
354 | void WellenreiterConfigWindow::load() | 354 | void WellenreiterConfigWindow::load() |
355 | { | 355 | { |
356 | #ifdef Q_WS_X11 | 356 | #ifdef Q_WS_X11 |