From a9242b3a1dfd0bb3b8d93b809fe6587e8938e410 Mon Sep 17 00:00:00 2001 From: ubbo Date: Thu, 19 Jan 2012 09:05:23 +0000 Subject: add OpenHelp on final page git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@763 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- wizard.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'wizard.cpp') diff --git a/wizard.cpp b/wizard.cpp index 433a201..c2c2d9a 100644 --- a/wizard.cpp +++ b/wizard.cpp @@ -49,14 +49,18 @@ Wizard::Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent) settings.remove("wizard/nextPage"); connect(this, SIGNAL(accepted()), this, SLOT(wizardAccepted())); + connect(this, SIGNAL(openHelp(QString)), parentWidget(), SLOT(openHelp(QString))); } void Wizard::wizardAccepted() { - qDebug() << "noShow: " << field("showWizard").toBool(); QSettings settings; // Don't show is mapped to show -> negation settings.setValue("wizard/showWizard", !field("showWizard").toBool()); + + if(field("openHelp").toBool()) { + emit openHelp("docu.html#content"); + } } IntroPage::IntroPage(QWidget *parent) @@ -341,11 +345,16 @@ ConclusionPage::ConclusionPage(QWidget *parent) dontShowWizardCheckBox = new QCheckBox(tr("Dont show the wizard again.")); dontShowWizardCheckBox->setChecked(Qt::Checked); + openHelpCheckBox = new QCheckBox(tr("Open offline help.")); + openHelpCheckBox->setChecked(Qt::Checked); + registerField("showWizard", dontShowWizardCheckBox); + registerField("openHelp", openHelpCheckBox); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(bottomLabel); layout->addWidget(dontShowWizardCheckBox); + layout->addWidget(openHelpCheckBox); setLayout(layout); setVisible(true); } -- cgit v1.2.3