summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/configwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/configwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp31
1 files changed, 31 insertions, 0 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
@@ -55,6 +55,8 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
++it;
}
+ if ( !load() ) // no configuration present
+ {
// try to guess device type
QFile m( "/proc/modules" );
if ( m.open( IO_ReadOnly ) )
@@ -77,6 +79,7 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
}
}
+ }
#ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here
QPushButton* okButton = new QPushButton( "ok", this );
@@ -95,6 +98,12 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
};
+WellenreiterConfigWindow::~WellenreiterConfigWindow()
+{
+ save();
+}
+
+
int WellenreiterConfigWindow::driverType() const
{
QString name = deviceType->currentText();
@@ -208,3 +217,25 @@ int WellenreiterConfigWindow::gpsPort() const
bool ok;
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
+}