summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-12-08 18:15:53 (UTC)
committer mickeyl <mickeyl>2003-12-08 18:15:53 (UTC)
commit415be5248b30b9d1e4d1880e03d429b80610aafd (patch) (unidiff)
tree9069337a8b673599b2aeab7b4fc8cd79d05d40e8
parentbb4cc2c9e5b583daa8da5cfc64b010e3aa8136ed (diff)
downloadopie-415be5248b30b9d1e4d1880e03d429b80610aafd.zip
opie-415be5248b30b9d1e4d1880e03d429b80610aafd.tar.gz
opie-415be5248b30b9d1e4d1880e03d429b80610aafd.tar.bz2
write config
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 68da712..f536f4e 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -280,66 +280,68 @@ void WellenreiterConfigWindow::load()
280 280
281 prismHeader->setChecked( c->readBoolEntry( "prism", false ) ); 281 prismHeader->setChecked( c->readBoolEntry( "prism", false ) );
282 hopChannels->setChecked( c->readBoolEntry( "hop", true ) ); 282 hopChannels->setChecked( c->readBoolEntry( "hop", true ) );
283 hopInterval->setValue( c->readNumEntry( "interval", 250 ) ); 283 hopInterval->setValue( c->readNumEntry( "interval", 250 ) );
284 adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) ); 284 adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) );
285 285
286 c->setGroup( "Capture" ); 286 c->setGroup( "Capture" );
287 captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); 287 captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) );
288 288
289 c->setGroup( "UI" ); 289 c->setGroup( "UI" );
290 lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) ); 290 lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) );
291 openTree->setChecked( c->readBoolEntry( "openTree", true ) ); 291 openTree->setChecked( c->readBoolEntry( "openTree", true ) );
292 disablePM->setChecked( c->readBoolEntry( "disablePM", true ) ); 292 disablePM->setChecked( c->readBoolEntry( "disablePM", true ) );
293 293
294 c->setGroup( "GPS" ); 294 c->setGroup( "GPS" );
295 enableGPS->setChecked( c->readBoolEntry( "use", false ) ); 295 enableGPS->setChecked( c->readBoolEntry( "use", false ) );
296#if QT_VERSION < 300 296#if QT_VERSION < 300
297 gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 ); 297 gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 );
298 gpsdHost->setCurrentItem( 0 ); 298 gpsdHost->setCurrentItem( 0 );
299#else 299#else
300 gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) ); 300 gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) );
301#endif 301#endif
302 gpsdPort->setValue( c->readNumEntry( "port", 2947 ) ); 302 gpsdPort->setValue( c->readNumEntry( "port", 2947 ) );
303 startGPS->setChecked( c->readBoolEntry( "start", false ) ); 303 startGPS->setChecked( c->readBoolEntry( "start", false ) );
304 commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) ); 304 commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) );
305 305
306#endif 306#endif
307} 307}
308 308
309 309
310void WellenreiterConfigWindow::save() 310void WellenreiterConfigWindow::save()
311{ 311{
312#ifdef Q_WS_X11 312#ifdef Q_WS_X11
313 #warning Persistent Configuration not yet implemented for standalone X11 build 313 #warning Persistent Configuration not yet implemented for standalone X11 build
314#else 314#else
315 qDebug( "saving configuration settings..." ); 315 qDebug( "saving configuration settings..." );
316 316
317 /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ 317 /* This is dumb monkey typing stuff... We _need_ to do this automatically! */
318 318
319 OConfig* c = oApp->config(); 319 OConfig* c = oApp->config();
320 320
321 c->setGroup( "Interface" ); 321 c->setGroup( "Interface" );
322 c->writeEntry( "name", interfaceName->currentText() ); 322 c->writeEntry( "name", interfaceName->currentText() );
323 c->writeEntry( "type", deviceType->currentText() ); 323 c->writeEntry( "type", deviceType->currentText() );
324 c->writeEntry( "prism", prismHeader->isChecked() ); 324 c->writeEntry( "prism", prismHeader->isChecked() );
325 c->writeEntry( "hop", hopChannels->isChecked() ); 325 c->writeEntry( "hop", hopChannels->isChecked() );
326 c->writeEntry( "interval", hopInterval->value() ); 326 c->writeEntry( "interval", hopInterval->value() );
327 c->writeEntry( "adaptive", adaptiveHopping->isChecked() ); 327 c->writeEntry( "adaptive", adaptiveHopping->isChecked() );
328 328
329 c->setGroup( "Capture" ); 329 c->setGroup( "Capture" );
330 c->writeEntry( "filename", captureFileName->text() ); 330 c->writeEntry( "filename", captureFileName->text() );
331 331
332 c->setGroup( "UI" ); 332 c->setGroup( "UI" );
333 c->writeEntry( "lookupVendor", lookupVendor->isChecked() ); 333 c->writeEntry( "lookupVendor", lookupVendor->isChecked() );
334 c->writeEntry( "openTree", openTree->isChecked() ); 334 c->writeEntry( "openTree", openTree->isChecked() );
335 c->writeEntry( "disablePM", disablePM->isChecked() ); 335 c->writeEntry( "disablePM", disablePM->isChecked() );
336 336
337 c->setGroup( "GPS" ); 337 c->setGroup( "GPS" );
338 c->writeEntry( "use", enableGPS->isChecked() ); 338 c->writeEntry( "use", enableGPS->isChecked() );
339 c->writeEntry( "host", gpsdHost->currentText() ); 339 c->writeEntry( "host", gpsdHost->currentText() );
340 c->writeEntry( "port", gpsdPort->value() ); 340 c->writeEntry( "port", gpsdPort->value() );
341 c->writeEntry( "start", startGPS->isChecked() ); 341 c->writeEntry( "start", startGPS->isChecked() );
342 c->writeEntry( "command", commandGPS->text() ); 342 c->writeEntry( "command", commandGPS->text() );
343 343
344 c->write();
345
344#endif 346#endif
345} 347}