diff options
| author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-18 22:57:33 +0100 |
|---|---|---|
| committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-18 22:57:33 +0100 |
| commit | 04822ac44a8c45e9d4ff1e8205d4482bd5d1afb7 (patch) | |
| tree | c6e18e3f7b06200d4cc7e34e1ad600ea76641b62 /wizard.cpp | |
| parent | instantly apply language selection in wizard (diff) | |
| download | gpg4usb-04822ac44a8c45e9d4ff1e8205d4482bd5d1afb7.tar.gz gpg4usb-04822ac44a8c45e9d4ff1e8205d4482bd5d1afb7.zip | |
save 'showWizard' to settings on finishing wizard
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@753 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'wizard.cpp')
| -rw-r--r-- | wizard.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -41,6 +41,15 @@ Wizard::Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent) QSettings settings; setStartId(settings.value("wizard/page", -1).toInt()); settings.remove("wizard/page"); + + connect(this, SIGNAL(accepted()), this, SLOT(wizardAccepted())); + +} + +void Wizard::wizardAccepted() { + qDebug() << "noShow: " << field("showWizard").toBool(); + QSettings settings; + settings.setValue("wizard/showWizard", field("showWizard").toBool()); } IntroPage::IntroPage(QWidget *parent) @@ -328,6 +337,8 @@ ConclusionPage::ConclusionPage(QWidget *parent) dontShowWizardCheckBox = new QCheckBox(tr("Dont show the wizard again.")); dontShowWizardCheckBox->setChecked(Qt::Checked); + registerField("showWizard", dontShowWizardCheckBox); + QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(bottomLabel); layout->addWidget(dontShowWizardCheckBox); @@ -337,13 +348,5 @@ ConclusionPage::ConclusionPage(QWidget *parent) int ConclusionPage::nextId() const { - QSettings settings; - qDebug() << "dont show" << dontShowWizardCheckBox->isChecked(); - if (dontShowWizardCheckBox->isChecked()) - { - settings.setValue("wizard/showWizard", false); - } else { - settings.setValue("wizard/showWizard", true); - } return -1; } |
