Wizards: changes the structure of Wizards

This patch introduces platforms as a top level topic when choosing
a wizard. Also I changed the categories and priorities.

Details:

1. I did change the way the dialog/view is structured in newdialog.cpp

2. I added platformName() and supportsPlatform() to BaseQtVersion.
   I needed two functions because the Simulator does not provide a platform
   and therefore has no platformName but supports two platforms.
   I still have to turn the platform names into proper constants.

3. I changed the categories and priorities to get the layout that was
   discussed. (I had to touch quite alot of files but this is mostly trivial)

4. I added a combobox that allows filtering for platforms.

5. I added flags() to IWizard to indicate that a wizard is platform independent.

Change-Id: I86c7ad628a431ad06505c76580885c6e6c3ddc23
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
Thomas Hartmann
2012-02-08 17:25:35 +01:00
committed by Alessandro Portale
parent ea23486847
commit 95a028e835
63 changed files with 667 additions and 172 deletions

View File

@@ -87,6 +87,7 @@ public:
QString category;
QString displayCategory;
Core::FeatureSet requiredFeatures;
Core::IWizard::WizardFlags flags;
};
BaseFileWizardParameterData::BaseFileWizardParameterData(IWizard::WizardKind k) :
@@ -232,6 +233,15 @@ void BaseFileWizardParameters::setDisplayCategory(const QString &v)
m_d->displayCategory = v;
}
Core::IWizard::WizardFlags BaseFileWizardParameters::flags() const
{
return m_d->flags;
}
void BaseFileWizardParameters::setFlags(Core::IWizard::WizardFlags flags)
{
m_d->flags = flags;
}
/*!
\class Core::Internal::WizardEventLoop
\brief Special event loop that runs a QWizard and terminates if the page changes.
@@ -407,7 +417,7 @@ QString BaseFileWizard::displayCategory() const
return d->m_parameters.displayCategory();
}
void BaseFileWizard::runWizard(const QString &path, QWidget *parent)
void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QString &platform)
{
QTC_ASSERT(!path.isEmpty(), return);
@@ -437,11 +447,10 @@ void BaseFileWizard::runWizard(const QString &path, QWidget *parent)
// Create dialog and run it. Ensure that the dialog is deleted when
// leaving the func, but not before the IFileWizardExtension::process
// has been called
const QScopedPointer<QWizard> wizard(createWizardDialog(parent,
WizardDialogParameters(path,
allExtensionPages,
QString(),
requiredFeatures())));
const QScopedPointer<QWizard> wizard(createWizardDialog(parent, WizardDialogParameters(path,
allExtensionPages,
platform,
requiredFeatures())));
QTC_ASSERT(!wizard.isNull(), return);
GeneratedFiles files;
@@ -525,6 +534,11 @@ Core::FeatureSet BaseFileWizard::requiredFeatures() const
return d->m_parameters.requiredFeatures();
}
Core::IWizard::WizardFlags BaseFileWizard::flags() const
{
return d->m_parameters.flags();
}
/*!
\fn virtual QWizard *Core::BaseFileWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,