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:
@@ -42,9 +42,9 @@ enum { IntroPageId = 0};
|
||||
|
||||
CustomWidgetWizardDialog::CustomWidgetWizardDialog(const QString &templateName,
|
||||
const QIcon &icon,
|
||||
const QList<QWizardPage*> &extensionPages,
|
||||
QWidget *parent) :
|
||||
BaseQt4ProjectWizardDialog(false, parent),
|
||||
QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters) :
|
||||
BaseQt4ProjectWizardDialog(false, parent, parameters),
|
||||
m_widgetsPage(new CustomWidgetWidgetsWizardPage),
|
||||
m_pluginPage(new CustomWidgetPluginWizardPage),
|
||||
m_widgetPageId(-1), m_pluginPageId(-1)
|
||||
@@ -61,7 +61,7 @@ CustomWidgetWizardDialog::CustomWidgetWizardDialog(const QString &templateName,
|
||||
wizardProgress()->item(m_widgetPageId)->setTitle(tr("Custom Widgets"));
|
||||
wizardProgress()->item(m_pluginPageId)->setTitle(tr("Plugin Details"));
|
||||
|
||||
foreach (QWizardPage *p, extensionPages)
|
||||
foreach (QWizardPage *p, parameters.extensionPages())
|
||||
Core::BaseFileWizard::applyExtensionPageShortTitle(this, addPage(p));
|
||||
connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotCurrentIdChanged(int)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user