diff options
-rw-r--r-- | facetracknoir/curve-config.cpp | 6 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.cpp | 10 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.h | 5 |
3 files changed, 5 insertions, 16 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp index 1e911ddd..2bff009a 100644 --- a/facetracknoir/curve-config.cpp +++ b/facetracknoir/curve-config.cpp @@ -83,10 +83,8 @@ void CurveConfigurationDialog::loadSettings() { for (int i = 0; i < 6; i++) { - configs[i]->setConfig(&mainApp->axis(i).curve, currentFile); - alt_configs[i]->setConfig(&mainApp->axis(i).curveAlt, currentFile); - configs[i]->loadSettings(currentFile); - alt_configs[i]->loadSettings(currentFile); + configs[i]->setConfig(&mainApp->axis(i).curve); + alt_configs[i]->setConfig(&mainApp->axis(i).curveAlt); } } diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp index b959b56c..55d1e1bc 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.cpp +++ b/qfunctionconfigurator/qfunctionconfigurator.cpp @@ -36,7 +36,7 @@ QFunctionConfigurator::QFunctionConfigurator(QWidget *parent) setMouseTracking(true); } -void QFunctionConfigurator::setConfig(FunctionConfig* config, QString settingsFile) { +void QFunctionConfigurator::setConfig(FunctionConfig* config) { QSettings settings("opentrack"); // Registry settings (in HK_USER) QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) @@ -48,14 +48,6 @@ void QFunctionConfigurator::setConfig(FunctionConfig* config, QString settingsFi update(); } -void QFunctionConfigurator::loadSettings(QString settingsFile) { - - QSettings iniFile( settingsFile, QSettings::IniFormat ); // Application settings (in INI-file) - if (_config) { - _config->loadSettings(iniFile); - } -} - void QFunctionConfigurator::saveSettings(QString settingsFile) { QSettings iniFile( settingsFile, QSettings::IniFormat ); // Application settings (in INI-file) diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h index bb2aced0..1f6b4f78 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.h +++ b/qfunctionconfigurator/qfunctionconfigurator.h @@ -34,9 +34,8 @@ public: QFunctionConfigurator(QWidget *parent = 0); FunctionConfig* config(); - void setConfig(FunctionConfig* config, QString settingsFile); // Connect the FunctionConfig to the Widget. - void loadSettings(QString settingsFile); // Load the FunctionConfig (points) from the INI-file - void saveSettings(QString settingsFile); // Save the FunctionConfig (points) to the INI-file + void setConfig(FunctionConfig* config); + void saveSettings(QString settingsFile); signals: void CurveChanged(bool); |