diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-28 00:39:25 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-28 00:39:25 +0100 |
commit | e7877ebef831f1cb36f911e2784af8268c26b5bb (patch) | |
tree | ca61551c7797380013390f2ec036b4004c5d2293 /ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp | |
parent | a4fe36ce7b86fbc9527da067a14682b82ef62e7a (diff) |
simconnect: allow for multiple manifest attempts
Diffstat (limited to 'ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp')
-rw-r--r-- | ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp index c2ddb72a..fb822145 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc_dialog.cpp @@ -39,8 +39,8 @@ QWidget() ui.setupUi( this ); // Connect Qt signals to member-functions - connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); - connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); //connect(ui.cbxSelectPPJoyNumber, SIGNAL(currentIndexChanged(int)), this, SLOT(virtualJoystickSelected( int ))); theProtocol = NULL; @@ -118,7 +118,13 @@ void SCControls::doCancel() { // Load the current Settings from the currently 'active' INI-file. // void SCControls::loadSettings() { - + QSettings settings("opentrack"); + QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); + QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) + iniFile.beginGroup ( "FSX" ); + int act = iniFile.value("version", 0).toInt(); + iniFile.endGroup(); + ui.comboBox->setCurrentIndex(act); settingsDirty = false; } @@ -126,7 +132,12 @@ void SCControls::loadSettings() { // Save the current Settings to the currently 'active' INI-file. // void SCControls::save() { - + QSettings settings("opentrack"); + QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); + QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) + iniFile.beginGroup ( "FSX" ); + iniFile.setValue("version", ui.comboBox->currentIndex()); + iniFile.endGroup(); settingsDirty = false; } |