summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/configwindow.cpp
authormickeyl <mickeyl>2003-09-25 15:02:43 (UTC)
committer mickeyl <mickeyl>2003-09-25 15:02:43 (UTC)
commit9047b6d4ffe0cbcecd90fd994ce2353277c378a1 (patch) (side-by-side diff)
treec649c9c85c9c5846c0019e26bb3aaafbfbc76757 /noncore/net/wellenreiter/gui/configwindow.cpp
parent990e3c5834b33227b327e1fec0d7f7f429e75952 (diff)
downloadopie-9047b6d4ffe0cbcecd90fd994ce2353277c378a1.zip
opie-9047b6d4ffe0cbcecd90fd994ce2353277c378a1.tar.gz
opie-9047b6d4ffe0cbcecd90fd994ce2353277c378a1.tar.bz2
start with persistent configuration
Diffstat (limited to 'noncore/net/wellenreiter/gui/configwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp67
1 files changed, 49 insertions, 18 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index a331925..d255c6a 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -56,24 +56,27 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
}
- // try to guess device type
- QFile m( "/proc/modules" );
- if ( m.open( IO_ReadOnly ) )
+ if ( !load() ) // no configuration present
{
- int devicetype(0);
- QString line;
- QTextStream modules( &m );
- while( !modules.atEnd() && !devicetype )
+ // try to guess device type
+ QFile m( "/proc/modules" );
+ if ( m.open( IO_ReadOnly ) )
{
- modules >> line;
- if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO;
- else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP;
- else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG;
- else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO;
- }
- if ( devicetype )
- {
- deviceType->setCurrentItem( devicetype );
- _guess = devicetype;
- qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
+ int devicetype(0);
+ QString line;
+ QTextStream modules( &m );
+ while( !modules.atEnd() && !devicetype )
+ {
+ modules >> line;
+ if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO;
+ else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP;
+ else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG;
+ else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO;
+ }
+ if ( devicetype )
+ {
+ deviceType->setCurrentItem( devicetype );
+ _guess = devicetype;
+ qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
+ }
}
}
@@ -96,4 +99,10 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
+WellenreiterConfigWindow::~WellenreiterConfigWindow()
+{
+ save();
+}
+
+
int WellenreiterConfigWindow::driverType() const
{
@@ -209,2 +218,24 @@ int WellenreiterConfigWindow::gpsPort() const
return useGPS() ? gpsdPort->value() : -1;
}
+
+
+bool WellenreiterConfigWindow::load()
+{
+#ifdef Q_WS_X11
+ #warning Persistent Configuration not yet implemented for standalone X11 build
+ return false;
+#else
+ qDebug( "loading configuration settings..." );
+ return true;
+#endif
+}
+
+
+void WellenreiterConfigWindow::save()
+{
+#ifdef Q_WS_X11
+ #warning Persistent Configuration not yet implemented for standalone X11 build
+#else
+ qDebug( "saving configuration settings..." );
+#endif
+}