Diffstat (limited to 'noncore/net/wellenreiter/gui/configwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index da39113..bfdb20a 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -2,74 +2,70 @@ | |||
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Wellenreiter II. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
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 | /* LOCAL */ | 16 | /* LOCAL */ |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "mainwindow.h" | 18 | #include "mainwindow.h" |
19 | 19 | ||
20 | /* OPIE */ | 20 | /* OPIE */ |
21 | #include <opie2/onetwork.h> | 21 | #include <opie2/onetwork.h> |
22 | #ifdef QWS | 22 | #ifdef QWS |
23 | #include <opie2/oapplication.h> | 23 | #include <opie2/oapplication.h> |
24 | #include <opie2/oconfig.h> | 24 | #include <opie2/oconfig.h> |
25 | #include <opie2/odevice.h> | 25 | #include <opie2/odevice.h> |
26 | using namespace Opie; | 26 | #include <opie2/odebug.h> |
27 | using namespace Opie::Core; | ||
28 | using namespace Opie::Net; | ||
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | /* QT */ | 31 | /* QT */ |
30 | #include <qapplication.h> | 32 | #include <qapplication.h> |
31 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
32 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
33 | #include <qfile.h> | 35 | #include <qfile.h> |
34 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
35 | #include <qlayout.h> | 37 | #include <qlayout.h> |
36 | #include <qmap.h> | 38 | #include <qmap.h> |
37 | #include <qpushbutton.h> | 39 | #include <qpushbutton.h> |
38 | #include <qtabwidget.h> | 40 | #include <qtabwidget.h> |
39 | #include <qtoolbutton.h> | 41 | #include <qtoolbutton.h> |
40 | #include <qspinbox.h> | 42 | #include <qspinbox.h> |
41 | #include <qtextstream.h> | 43 | #include <qtextstream.h> |
42 | 44 | ||
43 | /* POSIX */ | 45 | /* STD */ |
44 | #include <assert.h> | 46 | #include <assert.h> |
45 | 47 | ||
46 | using namespace Opie::Core; | ||
47 | using namespace Opie::Net; | ||
48 | using namespace Opie::Core; | ||
49 | using namespace Opie::Net; | ||
50 | using namespace Opie::Core; | ||
51 | using namespace Opie::Net; | ||
52 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; | 48 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; |
53 | 49 | ||
54 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) | 50 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) |
55 | :WellenreiterConfigBase( parent, name, true, f ) | 51 | :WellenreiterConfigBase( parent, name, true, f ) |
56 | { | 52 | { |
57 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; | 53 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; |
58 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; | 54 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; |
59 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; | 55 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; |
60 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; | 56 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; |
61 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; | 57 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; |
62 | _devicetype[ "<file>" ] = DEVTYPE_FILE; | 58 | _devicetype[ "<file>" ] = DEVTYPE_FILE; |
63 | 59 | ||
64 | // gather possible interface names from ONetwork | 60 | // gather possible interface names from ONetwork |
65 | ONetwork* net = ONetwork::instance(); | 61 | ONetwork* net = ONetwork::instance(); |
66 | ONetwork::InterfaceIterator it = net->iterator(); | 62 | ONetwork::InterfaceIterator it = net->iterator(); |
67 | while ( it.current() ) | 63 | while ( it.current() ) |
68 | { | 64 | { |
69 | if ( it.current()->isWireless() ) | 65 | if ( it.current()->isWireless() ) |
70 | interfaceName->insertItem( it.current()->name() ); | 66 | interfaceName->insertItem( it.current()->name() ); |
71 | ++it; | 67 | ++it; |
72 | } | 68 | } |
73 | 69 | ||
74 | load(); | 70 | load(); |
75 | 71 | ||
@@ -95,70 +91,70 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char | |||
95 | 91 | ||
96 | // hide tab4 (parse) until Wellenreiter 1.2 | 92 | // hide tab4 (parse) until Wellenreiter 1.2 |
97 | tab->removePage( tab_4 ); | 93 | tab->removePage( tab_4 ); |
98 | }; | 94 | }; |
99 | 95 | ||
100 | 96 | ||
101 | void WellenreiterConfigWindow::accept() | 97 | void WellenreiterConfigWindow::accept() |
102 | { | 98 | { |
103 | save(); | 99 | save(); |
104 | QDialog::accept(); | 100 | QDialog::accept(); |
105 | } | 101 | } |
106 | 102 | ||
107 | 103 | ||
108 | WellenreiterConfigWindow::~WellenreiterConfigWindow() | 104 | WellenreiterConfigWindow::~WellenreiterConfigWindow() |
109 | { | 105 | { |
110 | } | 106 | } |
111 | 107 | ||
112 | 108 | ||
113 | void WellenreiterConfigWindow::performAutodetection() | 109 | void WellenreiterConfigWindow::performAutodetection() |
114 | { | 110 | { |
115 | //TODO: insert modal splash screen here | 111 | //TODO: insert modal splash screen here |
116 | // and sleep a second, so that it looks | 112 | // and sleep a second, so that it looks |
117 | // like we're actually doing something fancy... ;-) | 113 | // like we're actually doing something fancy... ;-) |
118 | 114 | ||
119 | qDebug( "WellenreiterConfigWindow::performAutodetection()" ); | 115 | odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; |
120 | 116 | ||
121 | // try to guess device type | 117 | // try to guess device type |
122 | QFile m( "/proc/modules" ); | 118 | QFile m( "/proc/modules" ); |
123 | if ( m.open( IO_ReadOnly ) ) | 119 | if ( m.open( IO_ReadOnly ) ) |
124 | { | 120 | { |
125 | int devicetype(0); | 121 | int devicetype(0); |
126 | QString line; | 122 | QString line; |
127 | QTextStream modules( &m ); | 123 | QTextStream modules( &m ); |
128 | while( !modules.atEnd() && !devicetype ) | 124 | while( !modules.atEnd() && !devicetype ) |
129 | { | 125 | { |
130 | modules >> line; | 126 | modules >> line; |
131 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; | 127 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; |
132 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; | 128 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; |
133 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; | 129 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; |
134 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; | 130 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; |
135 | } | 131 | } |
136 | if ( devicetype ) | 132 | if ( devicetype ) |
137 | { | 133 | { |
138 | deviceType->setCurrentItem( devicetype ); | 134 | deviceType->setCurrentItem( devicetype ); |
139 | _guess = devicetype; | 135 | _guess = devicetype; |
140 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); | 136 | odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; |
141 | } | 137 | } |
142 | } | 138 | } |
143 | } | 139 | } |
144 | 140 | ||
145 | 141 | ||
146 | int WellenreiterConfigWindow::driverType() const | 142 | int WellenreiterConfigWindow::driverType() const |
147 | { | 143 | { |
148 | QString name = deviceType->currentText(); | 144 | QString name = deviceType->currentText(); |
149 | if ( _devicetype.contains( name ) ) | 145 | if ( _devicetype.contains( name ) ) |
150 | { | 146 | { |
151 | return _devicetype[name]; | 147 | return _devicetype[name]; |
152 | } | 148 | } |
153 | else | 149 | else |
154 | { | 150 | { |
155 | return 0; | 151 | return 0; |
156 | } | 152 | } |
157 | }; | 153 | }; |
158 | 154 | ||
159 | 155 | ||
160 | int WellenreiterConfigWindow::hoppingInterval() const | 156 | int WellenreiterConfigWindow::hoppingInterval() const |
161 | { | 157 | { |
162 | return hopInterval->cleanText().toInt(); | 158 | return hopInterval->cleanText().toInt(); |
163 | } | 159 | } |
164 | 160 | ||
@@ -220,49 +216,49 @@ void WellenreiterConfigWindow::synchronizeActionsAndScripts() | |||
220 | } | 216 | } |
221 | 217 | ||
222 | 218 | ||
223 | void WellenreiterConfigWindow::changedNetworkAction(int t) | 219 | void WellenreiterConfigWindow::changedNetworkAction(int t) |
224 | { | 220 | { |
225 | synchronizeActionsAndScripts(); | 221 | synchronizeActionsAndScripts(); |
226 | } | 222 | } |
227 | 223 | ||
228 | 224 | ||
229 | void WellenreiterConfigWindow::changedClientAction(int t) | 225 | void WellenreiterConfigWindow::changedClientAction(int t) |
230 | { | 226 | { |
231 | synchronizeActionsAndScripts(); | 227 | synchronizeActionsAndScripts(); |
232 | } | 228 | } |
233 | 229 | ||
234 | 230 | ||
235 | void WellenreiterConfigWindow::changedStationAction(int t) | 231 | void WellenreiterConfigWindow::changedStationAction(int t) |
236 | { | 232 | { |
237 | synchronizeActionsAndScripts(); | 233 | synchronizeActionsAndScripts(); |
238 | } | 234 | } |
239 | 235 | ||
240 | 236 | ||
241 | void WellenreiterConfigWindow::getCaptureFileNameClicked() | 237 | void WellenreiterConfigWindow::getCaptureFileNameClicked() |
242 | { | 238 | { |
243 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); | 239 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); |
244 | qDebug( "name = %s", (const char*) name ); | 240 | odebug << "name = " << (const char*) name << "" << oendl; |
245 | if ( !name.isEmpty() ) | 241 | if ( !name.isEmpty() ) |
246 | { | 242 | { |
247 | captureFileName->setText( name ); | 243 | captureFileName->setText( name ); |
248 | } | 244 | } |
249 | } | 245 | } |
250 | 246 | ||
251 | 247 | ||
252 | void WellenreiterConfigWindow::channelAllClicked(int state) | 248 | void WellenreiterConfigWindow::channelAllClicked(int state) |
253 | { | 249 | { |
254 | bool b = state; | 250 | bool b = state; |
255 | channel1->setChecked( b ); | 251 | channel1->setChecked( b ); |
256 | channel2->setChecked( b ); | 252 | channel2->setChecked( b ); |
257 | channel3->setChecked( b ); | 253 | channel3->setChecked( b ); |
258 | channel4->setChecked( b ); | 254 | channel4->setChecked( b ); |
259 | channel5->setChecked( b ); | 255 | channel5->setChecked( b ); |
260 | channel6->setChecked( b ); | 256 | channel6->setChecked( b ); |
261 | channel7->setChecked( b ); | 257 | channel7->setChecked( b ); |
262 | channel8->setChecked( b ); | 258 | channel8->setChecked( b ); |
263 | channel9->setChecked( b ); | 259 | channel9->setChecked( b ); |
264 | channel10->setChecked( b ); | 260 | channel10->setChecked( b ); |
265 | channel11->setChecked( b ); | 261 | channel11->setChecked( b ); |
266 | channel12->setChecked( b ); | 262 | channel12->setChecked( b ); |
267 | channel13->setChecked( b ); | 263 | channel13->setChecked( b ); |
268 | channel14->setChecked( b ); | 264 | channel14->setChecked( b ); |
@@ -295,94 +291,94 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
295 | int channel, | 291 | int channel, |
296 | int signal | 292 | int signal |
297 | /* , const GpsLocation& loc */ ) | 293 | /* , const GpsLocation& loc */ ) |
298 | { | 294 | { |
299 | int action; | 295 | int action; |
300 | QString script; | 296 | QString script; |
301 | 297 | ||
302 | if ( type == "network" ) | 298 | if ( type == "network" ) |
303 | { | 299 | { |
304 | action = newNetworkAction->currentItem(); | 300 | action = newNetworkAction->currentItem(); |
305 | script = newNetworkScript->text(); | 301 | script = newNetworkScript->text(); |
306 | } | 302 | } |
307 | else if ( type == "managed" || type == "adhoc" ) | 303 | else if ( type == "managed" || type == "adhoc" ) |
308 | { | 304 | { |
309 | action = newClientAction->currentItem(); | 305 | action = newClientAction->currentItem(); |
310 | script = newClientScript->text(); | 306 | script = newClientScript->text(); |
311 | } | 307 | } |
312 | else if ( type == "station" ) | 308 | else if ( type == "station" ) |
313 | { | 309 | { |
314 | action = newStationAction->currentItem(); | 310 | action = newStationAction->currentItem(); |
315 | script = newStationScript->text(); | 311 | script = newStationScript->text(); |
316 | } | 312 | } |
317 | else | 313 | else |
318 | { | 314 | { |
319 | qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type ); | 315 | owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << (const char*) type << "'" << oendl; |
320 | return; | 316 | return; |
321 | } | 317 | } |
322 | 318 | ||
323 | qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); | 319 | odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << (const char*) script << "')" << oendl; |
324 | 320 | ||
325 | switch( action ) | 321 | switch( action ) |
326 | { | 322 | { |
327 | case 0: /* Ignore */ return; | 323 | case 0: /* Ignore */ return; |
328 | case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; | 324 | case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; |
329 | case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; | 325 | case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; |
330 | case 3: /* Blink LED */ break; //FIXME: Implement this | 326 | case 3: /* Blink LED */ break; //FIXME: Implement this |
331 | case 4: /* Run Script */ | 327 | case 4: /* Run Script */ |
332 | { | 328 | { |
333 | /** | 329 | /** |
334 | * | 330 | * |
335 | * Script Substitution Information: | 331 | * Script Substitution Information: |
336 | * | 332 | * |
337 | * $SSID = SSID | 333 | * $SSID = SSID |
338 | * $MAC = MAC | 334 | * $MAC = MAC |
339 | * $WEP = Wep | 335 | * $WEP = Wep |
340 | * $CHAN = Channel | 336 | * $CHAN = Channel |
341 | * | 337 | * |
342 | **/ | 338 | **/ |
343 | script = script.replace( QRegExp( "$SSID" ), essid ); | 339 | script = script.replace( QRegExp( "$SSID" ), essid ); |
344 | script = script.replace( QRegExp( "$MAC" ), mac ); | 340 | script = script.replace( QRegExp( "$MAC" ), mac ); |
345 | script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); | 341 | script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); |
346 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); | 342 | script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); |
347 | 343 | ||
348 | qDebug( "going to call script '%s'", (const char*) script ); | 344 | odebug << "going to call script '" << (const char*) script << "'" << oendl; |
349 | ::system( script ); | 345 | ::system( script ); |
350 | qDebug( "script returned." ); | 346 | odebug << "script returned." << oendl; |
351 | return; | 347 | return; |
352 | } | 348 | } |
353 | default: assert( false ); | 349 | default: assert( false ); |
354 | } | 350 | } |
355 | } | 351 | } |
356 | 352 | ||
357 | 353 | ||
358 | void WellenreiterConfigWindow::load() | 354 | void WellenreiterConfigWindow::load() |
359 | { | 355 | { |
360 | #ifdef Q_WS_X11 | 356 | #ifdef Q_WS_X11 |
361 | #warning Persistent Configuration not yet implemented for standalone X11 build | 357 | #warning Persistent Configuration not yet implemented for standalone X11 build |
362 | performAutodetection(); | 358 | performAutodetection(); |
363 | #else | 359 | #else |
364 | qDebug( "loading configuration settings..." ); | 360 | odebug << "loading configuration settings..." << oendl; |
365 | 361 | ||
366 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | 362 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ |
367 | 363 | ||
368 | OConfig* c = oApp->config(); | 364 | OConfig* c = oApp->config(); |
369 | 365 | ||
370 | c->setGroup( "Interface" ); | 366 | c->setGroup( "Interface" ); |
371 | 367 | ||
372 | QString interface = c->readEntry( "name", "<none>" ); | 368 | QString interface = c->readEntry( "name", "<none>" ); |
373 | if ( interface != "<none>" ) | 369 | if ( interface != "<none>" ) |
374 | { | 370 | { |
375 | #if QT_VERSION < 300 | 371 | #if QT_VERSION < 300 |
376 | interfaceName->insertItem( interface, 0 ); | 372 | interfaceName->insertItem( interface, 0 ); |
377 | interfaceName->setCurrentItem( 0 ); | 373 | interfaceName->setCurrentItem( 0 ); |
378 | #else | 374 | #else |
379 | interfaceName->setCurrentText( interface ); | 375 | interfaceName->setCurrentText( interface ); |
380 | #endif | 376 | #endif |
381 | 377 | ||
382 | QString device = c->readEntry( "type", "<select>" ); | 378 | QString device = c->readEntry( "type", "<select>" ); |
383 | #if QT_VERSION < 300 | 379 | #if QT_VERSION < 300 |
384 | for ( int i = 0; i < deviceType->count(); ++i ) | 380 | for ( int i = 0; i < deviceType->count(); ++i ) |
385 | { | 381 | { |
386 | if ( deviceType->text( i ) == device ) | 382 | if ( deviceType->text( i ) == device ) |
387 | { | 383 | { |
388 | deviceType->setCurrentItem( i ); | 384 | deviceType->setCurrentItem( i ); |
@@ -418,49 +414,49 @@ void WellenreiterConfigWindow::load() | |||
418 | newStationScript->setText( c->readEntry( "newStationScript", "" ) ); | 414 | newStationScript->setText( c->readEntry( "newStationScript", "" ) ); |
419 | synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand | 415 | synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand |
420 | 416 | ||
421 | c->setGroup( "GPS" ); | 417 | c->setGroup( "GPS" ); |
422 | enableGPS->setChecked( c->readBoolEntry( "use", false ) ); | 418 | enableGPS->setChecked( c->readBoolEntry( "use", false ) ); |
423 | #if QT_VERSION < 300 | 419 | #if QT_VERSION < 300 |
424 | gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 ); | 420 | gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 ); |
425 | gpsdHost->setCurrentItem( 0 ); | 421 | gpsdHost->setCurrentItem( 0 ); |
426 | #else | 422 | #else |
427 | gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) ); | 423 | gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) ); |
428 | #endif | 424 | #endif |
429 | gpsdPort->setValue( c->readNumEntry( "port", 2947 ) ); | 425 | gpsdPort->setValue( c->readNumEntry( "port", 2947 ) ); |
430 | startGPS->setChecked( c->readBoolEntry( "start", false ) ); | 426 | startGPS->setChecked( c->readBoolEntry( "start", false ) ); |
431 | commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) ); | 427 | commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) ); |
432 | 428 | ||
433 | #endif | 429 | #endif |
434 | } | 430 | } |
435 | 431 | ||
436 | 432 | ||
437 | void WellenreiterConfigWindow::save() | 433 | void WellenreiterConfigWindow::save() |
438 | { | 434 | { |
439 | #ifdef Q_WS_X11 | 435 | #ifdef Q_WS_X11 |
440 | #warning Persistent Configuration not yet implemented for standalone X11 build | 436 | #warning Persistent Configuration not yet implemented for standalone X11 build |
441 | #else | 437 | #else |
442 | qDebug( "saving configuration settings..." ); | 438 | odebug << "saving configuration settings..." << oendl; |
443 | 439 | ||
444 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | 440 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ |
445 | 441 | ||
446 | OConfig* c = oApp->config(); | 442 | OConfig* c = oApp->config(); |
447 | 443 | ||
448 | c->setGroup( "Interface" ); | 444 | c->setGroup( "Interface" ); |
449 | c->writeEntry( "name", interfaceName->currentText() ); | 445 | c->writeEntry( "name", interfaceName->currentText() ); |
450 | c->writeEntry( "type", deviceType->currentText() ); | 446 | c->writeEntry( "type", deviceType->currentText() ); |
451 | c->writeEntry( "prism", prismHeader->isChecked() ); | 447 | c->writeEntry( "prism", prismHeader->isChecked() ); |
452 | c->writeEntry( "hop", hopChannels->isChecked() ); | 448 | c->writeEntry( "hop", hopChannels->isChecked() ); |
453 | c->writeEntry( "interval", hopInterval->value() ); | 449 | c->writeEntry( "interval", hopInterval->value() ); |
454 | c->writeEntry( "adaptive", adaptiveHopping->isChecked() ); | 450 | c->writeEntry( "adaptive", adaptiveHopping->isChecked() ); |
455 | 451 | ||
456 | c->setGroup( "Capture" ); | 452 | c->setGroup( "Capture" ); |
457 | c->writeEntry( "filename", captureFileName->text() ); | 453 | c->writeEntry( "filename", captureFileName->text() ); |
458 | 454 | ||
459 | c->setGroup( "UI" ); | 455 | c->setGroup( "UI" ); |
460 | c->writeEntry( "lookupVendor", lookupVendor->isChecked() ); | 456 | c->writeEntry( "lookupVendor", lookupVendor->isChecked() ); |
461 | c->writeEntry( "openTree", openTree->isChecked() ); | 457 | c->writeEntry( "openTree", openTree->isChecked() ); |
462 | c->writeEntry( "disablePM", disablePM->isChecked() ); | 458 | c->writeEntry( "disablePM", disablePM->isChecked() ); |
463 | c->writeEntry( "newNetworkAction", newNetworkAction->currentItem() ); | 459 | c->writeEntry( "newNetworkAction", newNetworkAction->currentItem() ); |
464 | c->writeEntry( "newNetworkScript", newNetworkScript->text() ); | 460 | c->writeEntry( "newNetworkScript", newNetworkScript->text() ); |
465 | c->writeEntry( "newClientAction", newClientAction->currentItem() ); | 461 | c->writeEntry( "newClientAction", newClientAction->currentItem() ); |
466 | c->writeEntry( "newClientScript", newClientScript->text() ); | 462 | c->writeEntry( "newClientScript", newClientScript->text() ); |