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:
@@ -53,16 +53,18 @@ class Html5AppWizardDialog : public AbstractMobileAppWizardDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Html5AppWizardDialog(QWidget *parent = 0);
|
||||
explicit Html5AppWizardDialog(QWidget *parent, const Core::WizardDialogParameters ¶meters);
|
||||
|
||||
private:
|
||||
class Html5AppWizardOptionsPage *m_htmlOptionsPage;
|
||||
friend class Html5AppWizard;
|
||||
};
|
||||
|
||||
Html5AppWizardDialog::Html5AppWizardDialog(QWidget *parent)
|
||||
: AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(), QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX))
|
||||
, m_htmlOptionsPage(0)
|
||||
Html5AppWizardDialog::Html5AppWizardDialog(QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters)
|
||||
: AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(),
|
||||
QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX), parameters),
|
||||
m_htmlOptionsPage(0)
|
||||
{
|
||||
setWindowTitle(tr("New HTML5 Application"));
|
||||
setIntroDescription(tr("This wizard generates a HTML5 application project."));
|
||||
@@ -116,9 +118,10 @@ Core::BaseFileWizardParameters Html5AppWizard::parameters()
|
||||
return parameters;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *Html5AppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
AbstractMobileAppWizardDialog *Html5AppWizard::createWizardDialogInternal(QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters) const
|
||||
{
|
||||
d->wizardDialog = new Html5AppWizardDialog(parent);
|
||||
d->wizardDialog = new Html5AppWizardDialog(parent, parameters);
|
||||
d->wizardDialog->m_htmlOptionsPage->setTouchOptimizationEndabled(
|
||||
d->app->touchOptimizedNavigationEnabled());
|
||||
return d->wizardDialog;
|
||||
|
||||
Reference in New Issue
Block a user