ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/abstractwizard.h
Revision: 1093
Committed: Sat Dec 30 13:57:32 2017 UTC (7 years, 9 months ago) by s10k
Content type: text/x-chdr
File size: 1243 byte(s)
Log Message:
Vago 1.4

File Contents

# Content
1 #ifndef ABSTRACTWIZARD_H
2 #define ABSTRACTWIZARD_H
3
4 #include <QLabel>
5 #include <QVBoxLayout>
6 #include <QLineEdit>
7 #include <QRect>
8 #include <QDesktopWidget>
9 #include <QTextStream>
10 #include <QSettings>
11 #include <QWizard>
12 #include <QIcon>
13 #include <QPushButton>
14
15 // This abstract class allow us to re-use most of the code used in wizards.
16 // To create wizard use the WizardFactory class available in "wizardfactory.h"
17 class AbstractWizard: public QObject // for signals and slots
18 {
19 Q_OBJECT // for signals and slots
20 protected:
21 QWizard myWizard;
22 QString workspaceWizardLocation;
23 QSettings *vagoSettings;
24 QString appDir;
25 protected:
26 AbstractWizard(const QString &appDir, const QString &workspaceWizardLocation, QSettings *vagoSettings, const bool hasRestartButton);
27 virtual void exec()=0;
28 void showWizard(const QString &windowsTitle, const QString &windowsIcon);
29 QWizardPage* createIntroPage(const QString &text);
30 virtual void beforeClose(QDialog::DialogCode resultStatus)=0;
31 protected slots:
32 void wizardFinished(int resultStatus);
33 private:
34 bool hasRestartButton;
35 private slots:
36 void pageChanged(int pageId);
37 void restartWizard();
38 };
39
40 #endif // ABSTRACTWIZARD_H