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:
@@ -137,14 +137,14 @@ QString GLSLFileWizard::fileContents(const QString &, ShaderType shaderType) con
|
||||
return contents;
|
||||
}
|
||||
|
||||
QWizard *GLSLFileWizard::createWizardDialog(QWidget *parent, const QString &defaultPath,
|
||||
const WizardPageList &extensionPages) const
|
||||
QWizard *GLSLFileWizard::createWizardDialog(QWidget *parent,
|
||||
const Core::WizardDialogParameters &wizardDialogParameters) const
|
||||
{
|
||||
GLSLFileWizardDialog *wizardDialog = new GLSLFileWizardDialog(parent);
|
||||
wizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
|
||||
setupWizard(wizardDialog);
|
||||
wizardDialog->setPath(defaultPath);
|
||||
foreach (QWizardPage *p, extensionPages)
|
||||
wizardDialog->setPath(wizardDialogParameters.defaultPath());
|
||||
foreach (QWizardPage *p, wizardDialogParameters.extensionPages())
|
||||
BaseFileWizard::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p));
|
||||
return wizardDialog;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user