source: s10k/Vago/abstractwizard.h@ 1092

Last change on this file since 1092 was 1061, checked in by s10k, 8 years ago

Added Vago 1.3

File size: 1.3 KB
Line 
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"
19class AbstractWizard: public QObject // for signals and slots
20{
21 Q_OBJECT // for signals and slots
22protected:
23 QWizard myWizard;
24 QString workspaceWizardLocation;
25 QSettings *vagoSettings;
26 Logger *myLogger;
27 QString appDir;
28protected:
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;
34protected slots:
35 void wizardFinished(int resultStatus);
36private:
37 bool hasRestartButton;
38private slots:
39 void pageChanged(int pageId);
40 void restartWizard();
41};
42
43#endif // ABSTRACTWIZARD_H
Note: See TracBrowser for help on using the repository browser.