diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-03-12 11:20:32 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-03-12 11:20:32 +0100 |
commit | 1606cf1b330269dba769f299f5446108ef062ff3 (patch) | |
tree | e0a01697b272df7dc3de11a5258ff70294304354 /src/plugins/qt4projectmanager/wizards/qtwizard.h | |
parent | e82219b344ee471dbb5d8e7f1351404ff9616d6c (diff) | |
download | qt-creator-1606cf1b330269dba769f299f5446108ef062ff3.tar.gz |
Wizards/Custom Wizards: Add code.
Task-number: QTCREATORBUG-423
Diffstat (limited to 'src/plugins/qt4projectmanager/wizards/qtwizard.h')
-rw-r--r-- | src/plugins/qt4projectmanager/wizards/qtwizard.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.h b/src/plugins/qt4projectmanager/wizards/qtwizard.h index e305324a5a..760a72095d 100644 --- a/src/plugins/qt4projectmanager/wizards/qtwizard.h +++ b/src/plugins/qt4projectmanager/wizards/qtwizard.h @@ -32,6 +32,7 @@ #include "qtprojectparameters.h" #include <projectexplorer/baseprojectwizarddialog.h> +#include <projectexplorer/customwizard/customwizard.h> #include <coreplugin/basefilewizard.h> @@ -77,6 +78,8 @@ public: // Query CppTools settings for the class wizard settings static bool lowerCaseFiles(); + static bool qt4ProjectPostGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage); + protected: static bool showModulesPageForApplications(); static bool showModulesPageForLibraries(); @@ -85,6 +88,25 @@ private: bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage); }; +// A custom wizard with an additional Qt 4 target page +class CustomQt4ProjectWizard : public ProjectExplorer::CustomProjectWizard { + Q_OBJECT +public: + explicit CustomQt4ProjectWizard(const Core::BaseFileWizardParameters& baseFileParameters, + QObject *parent = 0); + + virtual QWizard *createWizardDialog(QWidget *parent, + const QString &defaultPath, + const WizardPageList &extensionPages) const; + static void registerSelf(); + +protected: + virtual bool postGenerateFiles(const QWizard *, const Core::GeneratedFiles &l, QString *errorMessage); + +private: + enum { targetPageId = 2 }; +}; + /* BaseQt4ProjectWizardDialog: Additionally offers modules page * and getter/setter for blank-delimited modules list, transparently * handling the visibility of the modules page list as well as a page @@ -93,13 +115,13 @@ private: class BaseQt4ProjectWizardDialog : public ProjectExplorer::BaseProjectWizardDialog { Q_OBJECT - protected: - explicit BaseQt4ProjectWizardDialog(bool showModulesPage, QWidget *parent = 0); explicit BaseQt4ProjectWizardDialog(bool showModulesPage, Utils::ProjectIntroPage *introPage, int introId = -1, QWidget *parent = 0); +public: + explicit BaseQt4ProjectWizardDialog(bool showModulesPage, QWidget *parent = 0); virtual ~BaseQt4ProjectWizardDialog(); int addModulesPage(int id = -1); @@ -107,7 +129,6 @@ protected: static QSet<QString> desktopTarget(); -public: QString selectedModules() const; void setSelectedModules(const QString &, bool lock = false); |