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 @@ -34,15 +34,16 @@ using namespace Opie::Net; #include <qcombobox.h> #include <qfile.h> #include <qlineedit.h> #include <qlayout.h> #include <qmap.h> #include <qpushbutton.h> +#include <qradiobutton.h> +#include <qspinbox.h> #include <qtabwidget.h> #include <qtoolbutton.h> -#include <qspinbox.h> #include <qtextstream.h> /* STD */ #include <assert.h> WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; @@ -109,13 +110,13 @@ WellenreiterConfigWindow::~WellenreiterConfigWindow() void WellenreiterConfigWindow::performAutodetection() { //TODO: insert modal splash screen here // and sleep a second, so that it looks // like we're actually doing something fancy... ;-) - odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; + odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; // try to guess device type QFile m( "/proc/modules" ); if ( m.open( IO_ReadOnly ) ) { int devicetype(0); @@ -130,13 +131,13 @@ void WellenreiterConfigWindow::performAutodetection() else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; } if ( devicetype ) { deviceType->setCurrentItem( devicetype ); _guess = devicetype; - odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; + odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; } } } int WellenreiterConfigWindow::driverType() const @@ -234,13 +235,13 @@ void WellenreiterConfigWindow::changedStationAction(int t) } void WellenreiterConfigWindow::getCaptureFileNameClicked() { QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); - odebug << "name = " << name << "" << oendl; + odebug << "name = " << name << "" << oendl; if ( !name.isEmpty() ) { captureFileName->setText( name ); } } @@ -309,17 +310,17 @@ void WellenreiterConfigWindow::performAction( const QString& type, { action = newStationAction->currentItem(); script = newStationScript->text(); } else { - owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; + owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << type << "'" << oendl; return; } - odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; + odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl; switch( action ) { case 0: /* Ignore */ return; case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; @@ -338,15 +339,15 @@ void WellenreiterConfigWindow::performAction( const QString& type, **/ script = script.replace( QRegExp( "$SSID" ), essid ); script = script.replace( QRegExp( "$MAC" ), mac ); script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); - odebug << "going to call script '" << script << "'" << oendl; + odebug << "going to call script '" << script << "'" << oendl; ::system( script ); - odebug << "script returned." << oendl; + odebug << "script returned." << oendl; return; } default: assert( false ); } } @@ -354,13 +355,13 @@ void WellenreiterConfigWindow::performAction( const QString& type, void WellenreiterConfigWindow::load() { #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build performAutodetection(); #else - odebug << "loading configuration settings..." << oendl; + odebug << "loading configuration settings..." << oendl; /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ OConfig* c = oApp->config(); c->setGroup( "Interface" ); @@ -432,13 +433,13 @@ void WellenreiterConfigWindow::load() void WellenreiterConfigWindow::save() { #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build #else - odebug << "saving configuration settings..." << oendl; + odebug << "saving configuration settings..." << oendl; /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ OConfig* c = oApp->config(); c->setGroup( "Interface" ); @@ -471,6 +472,12 @@ void WellenreiterConfigWindow::save() c->writeEntry( "command", commandGPS->text() ); c->write(); #endif } + + +int WellenreiterConfigWindow::hexViewBuffer() const +{ + return hexViewBufferUnlimited->isChecked() ? -1 : hexViewBufferSize->value(); +} |