ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/abstractwizard.h
Revision: 1061
Committed: Fri Dec 9 19:04:18 2016 UTC (8 years, 10 months ago) by s10k
Content type: text/x-chdr
Original Path: Vago/trunk/Vago/abstractwizard.h
File size: 1304 byte(s)
Log Message:
Added Vago 1.3

File Contents

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