Qt4ProjectManager: New TargetSetupPage

Rewrite the target setup page to look and baheve better.
Noteable better at:
- Disabling shadow building
- Deselecting whole targets
- Adding import directories

Api-wise, Targets derived from Qt4BaseTarget have two ways to customize
the targetsetuppage.

a) Reimplement availableBuildConfigurations
b) Leave createTargetSetupWidget and create(... Qt4TargetSetupWidget)
   in their default implementation. (Or only slightly customize like
   the desktop target does.)

Or:
a) Make a dummy implementation for availableBuildConfiguration
b) Replace createTargetSetupWidget and return your own widget
   (It should match the look and feel from the other widgets.)
   It needs to be derived from Qt4TargetSetupWidget
c) Also replace the create create(... Qt4TargetSetupWidget) function
   and set up the target anyway you want.
This commit is contained in:
dt
2011-02-21 15:30:05 +01:00
parent 672576e51e
commit 06ee3aee7f
23 changed files with 945 additions and 795 deletions

View File

@@ -117,21 +117,7 @@ AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWid
void QtQuickAppWizard::projectPathChanged(const QString &path) const
{
const QList<TargetSetupPage::ImportInfo> &qtVersions
= TargetSetupPage::importInfosForKnownQtVersions(path);
QList<TargetSetupPage::ImportInfo> qmlQtVersions;
foreach (const TargetSetupPage::ImportInfo &qtVersion, qtVersions) {
const QString versionString = qtVersion.version->qtVersionString();
bool isNumber;
const int majorVersion = versionString.mid(0, 1).toInt(&isNumber);
if (!isNumber || majorVersion < 4)
continue;
const int minorVersion = versionString.mid(2, 1).toInt(&isNumber);
if (!isNumber || (majorVersion == 4 && minorVersion < 7))
continue;
qmlQtVersions << qtVersion;
}
m_d->wizardDialog->m_targetsPage->setImportInfos(qmlQtVersions);
m_d->wizardDialog->m_targetsPage->setProFilePath(path);
}
void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,