aboutsummaryrefslogtreecommitdiffstats
path: root/settingsdialog.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-12 22:21:54 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-12 22:21:54 +0000
commit4bacdcf43d14193cdc864e03ac21317e1405c2c5 (patch)
treef9e08481796f49a2fbc0fcf7f62fbe441795aab3 /settingsdialog.cpp
parentminor beautifying in keyimportdetails (diff)
downloadgpg4usb-4bacdcf43d14193cdc864e03ac21317e1405c2c5.tar.gz
gpg4usb-4bacdcf43d14193cdc864e03ac21317e1405c2c5.zip
added advamced settings tab with steganography and disable steganography per default
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@700 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'settingsdialog.cpp')
-rwxr-xr-xsettingsdialog.cpp54
1 files changed, 38 insertions, 16 deletions
diff --git a/settingsdialog.cpp b/settingsdialog.cpp
index 34501fe..fdead2b 100755
--- a/settingsdialog.cpp
+++ b/settingsdialog.cpp
@@ -29,11 +29,14 @@ SettingsDialog::SettingsDialog(QWidget *parent)
appearanceTab = new AppearanceTab;
mimeTab = new MimeTab;
keyserverTab = new KeyserverTab;
+ advancedTab = new AdvancedTab;
tabWidget->addTab(generalTab, tr("General"));
tabWidget->addTab(appearanceTab, tr("Appearance"));
tabWidget->addTab(mimeTab, tr("PGP/Mime"));
tabWidget->addTab(keyserverTab, tr("Keyserver"));
+ tabWidget->addTab(advancedTab, tr("Advanced"));
+
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
@@ -56,6 +59,7 @@ void SettingsDialog::accept()
mimeTab->applySettings();
appearanceTab->applySettings();
keyserverTab->applySettings();
+ advancedTab->applySettings();
close();
}
@@ -92,15 +96,6 @@ GeneralTab::GeneralTab(QWidget *parent)
importConfirmationBox->setLayout(importConfirmationBoxLayout);
/*****************************************
- * Steganography Box
- *****************************************/
- QGroupBox *steganoBox = new QGroupBox(tr("Show Steganography Options [Advanced]"));
- QHBoxLayout *steganoBoxLayout = new QHBoxLayout();
- steganoCheckBox= new QCheckBox(tr("Show Steganographic Options."), this);
- steganoBoxLayout->addWidget(steganoCheckBox);
- steganoBox->setLayout(steganoBoxLayout);
-
- /*****************************************
* Language Select Box
*****************************************/
QGroupBox *langBox = new QGroupBox(tr("Language"));
@@ -121,7 +116,6 @@ GeneralTab::GeneralTab(QWidget *parent)
mainLayout->addWidget(rememberPasswordBox);
mainLayout->addWidget(saveCheckedKeysBox);
mainLayout->addWidget(importConfirmationBox);
- mainLayout->addWidget(steganoBox);
mainLayout->addWidget(langBox);
setSettings();
mainLayout->addStretch(1);
@@ -156,10 +150,6 @@ void GeneralTab::setSettings()
if (settings.value("general/confirmImportKeys",Qt::Checked).toBool()){
importConfirmationCheckBox->setCheckState(Qt::Checked);
}
-
- if (settings.value("general/steganography",Qt::Checked).toBool()){
- steganoCheckBox->setCheckState(Qt::Checked);
- }
}
/***********************************
@@ -174,8 +164,6 @@ void GeneralTab::applySettings()
settings.setValue("general/rememberPassword", rememberPasswordCheckBox->isChecked());
settings.setValue("int/lang", lang.key(langSelectBox->currentText()));
settings.setValue("general/confirmImportKeys", importConfirmationCheckBox->isChecked());
- settings.setValue("general/steganography", steganoCheckBox->isChecked());
-
}
// http://www.informit.com/articles/article.aspx?p=1405555&seqNum=3
@@ -449,3 +437,37 @@ void KeyserverTab::applySettings()
QSettings settings;
settings.setValue("keyserver/defaultKeyServer",comboBox->currentText());
}
+
+AdvancedTab::AdvancedTab(QWidget *parent)
+ : QWidget(parent)
+{
+ /*****************************************
+ * Steganography Box
+ *****************************************/
+ QGroupBox *steganoBox = new QGroupBox(tr("Show Steganography Options [Advanced]"));
+ QHBoxLayout *steganoBoxLayout = new QHBoxLayout();
+ steganoCheckBox= new QCheckBox(tr("Show Steganographic Options."), this);
+ steganoBoxLayout->addWidget(steganoCheckBox);
+ steganoBox->setLayout(steganoBoxLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(steganoBox);
+ setSettings();
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+
+}
+
+void AdvancedTab::setSettings()
+{
+ QSettings settings;
+ if (settings.value("advanced/steganography").toBool()){
+ steganoCheckBox->setCheckState(Qt::Checked);
+ }
+}
+
+void AdvancedTab::applySettings()
+{
+ QSettings settings;
+ settings.setValue("advanced/steganography", steganoCheckBox->isChecked());
+}