diff options
Diffstat (limited to 'FTNoIR_Protocol_FT/ftnoir_protocol_FT_dialog.cpp')
-rw-r--r-- | FTNoIR_Protocol_FT/ftnoir_protocol_FT_dialog.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/FTNoIR_Protocol_FT/ftnoir_protocol_FT_dialog.cpp b/FTNoIR_Protocol_FT/ftnoir_protocol_FT_dialog.cpp index 62584b43..678b3a5f 100644 --- a/FTNoIR_Protocol_FT/ftnoir_protocol_FT_dialog.cpp +++ b/FTNoIR_Protocol_FT/ftnoir_protocol_FT_dialog.cpp @@ -50,7 +50,18 @@ QWidget() // Connect Qt signals to member-functions
connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
-// connect(ui.chkTIRViews, SIGNAL(stateChanged(int)), this, SLOT(chkTIRViewsChanged()));
+ connect(ui.chkTIRViews, SIGNAL(stateChanged(int)), this, SLOT(chkTIRViewsChanged()));
+ connect(ui.chkStartDummy, SIGNAL(stateChanged(int)), this, SLOT(settingChanged()));
+
+ aFileName = QCoreApplication::applicationDirPath() + "/TIRViews.dll";
+ if ( !QFile::exists( aFileName ) ) {
+ ui.chkTIRViews->setChecked( false );
+ ui.chkTIRViews->setEnabled ( false );
+ save();
+ }
+ else {
+ ui.chkTIRViews->setEnabled ( true );
+ }
theProtocol = NULL;
@@ -65,11 +76,6 @@ FTControls::~FTControls() { qDebug() << "~FTControls() says: started";
}
-void FTControls::Release()
-{
- delete this;
-}
-
//
// Initialize tracker-client-dialog
//
@@ -144,6 +150,11 @@ void FTControls::loadSettings() { // ui.chkTIRViews->setChecked (iniFile.value ( "useTIRViews", 0 ).toBool());
iniFile.endGroup ();
+ iniFile.beginGroup ( "FTIR" );
+ ui.chkTIRViews->setChecked (iniFile.value ( "useTIRViews", 0 ).toBool());
+ ui.chkStartDummy->setChecked (iniFile.value ( "useDummyExe", 1 ).toBool());
+ iniFile.endGroup ();
+
settingsDirty = false;
}
@@ -157,7 +168,11 @@ void FTControls::save() { QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup ( "FT" );
-// iniFile.setValue ( "useTIRViews", ui.chkTIRViews->isChecked() );
+ iniFile.endGroup ();
+
+ iniFile.beginGroup ( "FTIR" );
+ iniFile.setValue ( "useTIRViews", ui.chkTIRViews->isChecked() );
+ iniFile.setValue ( "useDummyExe", ui.chkStartDummy->isChecked() );
iniFile.endGroup ();
settingsDirty = false;
|