Diffstat (limited to 'noncore/net/wellenreiter/gui/configwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index 279b39c..89ed24c 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -37,9 +37,10 @@ using namespace Opie::Net; | |||
37 | #include <qlayout.h> | 37 | #include <qlayout.h> |
38 | #include <qmap.h> | 38 | #include <qmap.h> |
39 | #include <qpushbutton.h> | 39 | #include <qpushbutton.h> |
40 | #include <qradiobutton.h> | ||
41 | #include <qspinbox.h> | ||
40 | #include <qtabwidget.h> | 42 | #include <qtabwidget.h> |
41 | #include <qtoolbutton.h> | 43 | #include <qtoolbutton.h> |
42 | #include <qspinbox.h> | ||
43 | #include <qtextstream.h> | 44 | #include <qtextstream.h> |
44 | 45 | ||
45 | /* STD */ | 46 | /* STD */ |
@@ -112,7 +113,7 @@ void WellenreiterConfigWindow::performAutodetection() | |||
112 | // and sleep a second, so that it looks | 113 | // and sleep a second, so that it looks |
113 | // like we're actually doing something fancy... ;-) | 114 | // like we're actually doing something fancy... ;-) |
114 | 115 | ||
115 | odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; | 116 | odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; |
116 | 117 | ||
117 | // try to guess device type | 118 | // try to guess device type |
118 | QFile m( "/proc/modules" ); | 119 | QFile m( "/proc/modules" ); |
@@ -133,7 +134,7 @@ void WellenreiterConfigWindow::performAutodetection() | |||
133 | { | 134 | { |
134 | deviceType->setCurrentItem( devicetype ); | 135 | deviceType->setCurrentItem( devicetype ); |
135 | _guess = devicetype; | 136 | _guess = devicetype; |
136 | odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; | 137 | odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; |
137 | } | 138 | } |
138 | } | 139 | } |
139 | } | 140 | } |
@@ -237,7 +238,7 @@ void WellenreiterConfigWindow::changedStationAction(int t) | |||
237 | void WellenreiterConfigWindow::getCaptureFileNameClicked() | 238 | void WellenreiterConfigWindow::getCaptureFileNameClicked() |
238 | { | 239 | { |
239 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); | 240 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); |
240 | odebug << "name = " << name << "" << oendl; | 241 | odebug << "name = " << name << "" << oendl; |
241 | if ( !name.isEmpty() ) | 242 | if ( !name.isEmpty() ) |
242 | { | 243 | { |
243 | captureFileName->setText( name ); | 244 | captureFileName->setText( name ); |
@@ -312,11 +313,11 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
312 | } | 313 | } |
313 | else | 314 | else |
314 | { | 315 | { |
315 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; | 316 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; |
316 | return; | 317 | return; |
317 | } | 318 | } |
318 | 319 | ||
319 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; | 320 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; |
320 | 321 | ||
321 | switch( action ) | 322 | switch( action ) |
322 | { | 323 | { |
@@ -341,9 +342,9 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
341 | script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); | 342 | script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); |
342 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); | 343 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); |
343 | 344 | ||
344 | odebug << "going to call script '" << script << "'" << oendl; | 345 | odebug << "going to call script '" << script << "'" << oendl; |
345 | ::system( script ); | 346 | ::system( script ); |
346 | odebug << "script returned." << oendl; | 347 | odebug << "script returned." << oendl; |
347 | return; | 348 | return; |
348 | } | 349 | } |
349 | default: assert( false ); | 350 | default: assert( false ); |
@@ -357,7 +358,7 @@ void WellenreiterConfigWindow::load() | |||
357 | #warning Persistent Configuration not yet implemented for standalone X11 build | 358 | #warning Persistent Configuration not yet implemented for standalone X11 build |
358 | performAutodetection(); | 359 | performAutodetection(); |
359 | #else | 360 | #else |
360 | odebug << "loading configuration settings..." << oendl; | 361 | odebug << "loading configuration settings..." << oendl; |
361 | 362 | ||
362 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | 363 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ |
363 | 364 | ||
@@ -435,7 +436,7 @@ void WellenreiterConfigWindow::save() | |||
435 | #ifdef Q_WS_X11 | 436 | #ifdef Q_WS_X11 |
436 | #warning Persistent Configuration not yet implemented for standalone X11 build | 437 | #warning Persistent Configuration not yet implemented for standalone X11 build |
437 | #else | 438 | #else |
438 | odebug << "saving configuration settings..." << oendl; | 439 | odebug << "saving configuration settings..." << oendl; |
439 | 440 | ||
440 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | 441 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ |
441 | 442 | ||
@@ -474,3 +475,9 @@ void WellenreiterConfigWindow::save() | |||
474 | 475 | ||
475 | #endif | 476 | #endif |
476 | } | 477 | } |
478 | |||
479 | |||
480 | int WellenreiterConfigWindow::hexViewBuffer() const | ||
481 | { | ||
482 | return hexViewBufferUnlimited->isChecked() ? -1 : hexViewBufferSize->value(); | ||
483 | } | ||