forked from qt-creator/qt-creator
Wizards: refactoring - adding WizardDialogParameters
The Wizards itself (derived from IWizard) and the dialogs implementing the wizards were quite discoupled. Since I want to add parameters that are delivered from IWizard::run to the dialog a I added WizardDialogParameters. Examples of paramters I want to add are the choosen platform and the choosen subOption/template for this wizard. Change-Id: I9c0ae2901e3d46d3c36a3f433f4d7d508a6ba74e Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
@@ -52,7 +52,7 @@ class QtQuickAppWizardDialog : public AbstractMobileAppWizardDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QtQuickAppWizardDialog(QWidget *parent = 0);
|
||||
explicit QtQuickAppWizardDialog(QWidget *parent, const Core::WizardDialogParameters ¶meters);
|
||||
|
||||
protected:
|
||||
bool validateCurrentPage();
|
||||
@@ -66,8 +66,11 @@ private:
|
||||
friend class QtQuickAppWizard;
|
||||
};
|
||||
|
||||
QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent)
|
||||
: AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(4, 7, 0), QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX))
|
||||
QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters)
|
||||
: AbstractMobileAppWizardDialog(parent,
|
||||
QtSupport::QtVersionNumber(4, 7, 0),
|
||||
QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX), parameters)
|
||||
{
|
||||
setWindowTitle(tr("New Qt Quick Application"));
|
||||
setIntroDescription(tr("This wizard generates a Qt Quick application project."));
|
||||
@@ -147,9 +150,10 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
|
||||
return parameters;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters) const
|
||||
{
|
||||
d->wizardDialog = new QtQuickAppWizardDialog(parent);
|
||||
d->wizardDialog = new QtQuickAppWizardDialog(parent, parameters);
|
||||
d->wizardDialog->m_componentOptionsPage->setComponentSet(d->app->componentSet());
|
||||
return d->wizardDialog;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user