diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-02-10 07:35:59 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-02-10 07:35:59 +0100 |
commit | 733b0ff713eb28c7c4b7dab5d3de423f784f2734 (patch) | |
tree | 447ed05bbae040838559498bd72adcf97eb81af4 /qfunctionconfigurator | |
parent | 48461f79f824cf9fc6987ef309125ec9c6cf5be9 (diff) |
don't load spline config twice
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.cpp | 10 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.h | 5 |
2 files changed, 3 insertions, 12 deletions
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); |