Commit 672576e5 authored by dt's avatar dt
Browse files

Qt4BaseTargetFactory: Introduce iconForId()

to be used on the new target setup page
parent 80f78eaa
......@@ -81,6 +81,13 @@ QString Qt4DesktopTargetFactory::displayNameForId(const QString &id) const
return QString();
}
QIcon Qt4DesktopTargetFactory::iconForId(const QString &id) const
{
if (id == QLatin1String(Constants::DESKTOP_TARGET_ID))
return qApp->style()->standardIcon(QStyle::SP_ComputerIcon);
return QIcon();
}
bool Qt4DesktopTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
{
if (!qobject_cast<Qt4Project *>(parent))
......
......@@ -47,6 +47,7 @@ public:
QStringList supportedTargetIds(ProjectExplorer::Project *parent) const;
QString displayNameForId(const QString &id) const;
QIcon iconForId(const QString &id) const;
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
......
......@@ -84,6 +84,13 @@ QString Qt4SimulatorTargetFactory::displayNameForId(const QString &id) const
return QString();
}
QIcon Qt4SimulatorTargetFactory::iconForId(const QString &id) const
{
if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
return QIcon(":/projectexplorer/images/SymbianEmulator.png");
return QIcon();
}
bool Qt4SimulatorTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
{
if (!qobject_cast<Qt4Project *>(parent))
......
......@@ -49,6 +49,7 @@ public:
QStringList supportedTargetIds(ProjectExplorer::Project *parent) const;
QString displayNameForId(const QString &id) const;
QIcon iconForId(const QString &id) const;
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
......
......@@ -94,6 +94,12 @@ QString Qt4MaemoTargetFactory::displayNameForId(const QString &id) const
return QString();
}
QIcon Qt4MaemoTargetFactory::iconForId(const QString &id) const
{
Q_UNUSED(id)
return QIcon(":/projectexplorer/images/MaemoDevice.png");
}
bool Qt4MaemoTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
{
if (!qobject_cast<Qt4Project *>(parent))
......
......@@ -48,6 +48,7 @@ public:
QStringList supportedTargetIds(ProjectExplorer::Project *parent) const;
QString displayNameForId(const QString &id) const;
QIcon iconForId(const QString &id) const;
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
......
......@@ -89,6 +89,15 @@ QString Qt4SymbianTargetFactory::displayNameForId(const QString &id) const
return Qt4SymbianTarget::defaultDisplayName(id);
}
QIcon Qt4SymbianTargetFactory::iconForId(const QString &id) const
{
if (id == QLatin1String(Constants::S60_EMULATOR_TARGET_ID))
return QIcon(":/projectexplorer/images/SymbianEmulator.png");
if (id == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
return QIcon(":/projectexplorer/images/SymbianDevice.png");
return QIcon();
}
bool Qt4SymbianTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
{
if (!qobject_cast<Qt4Project *>(parent))
......
......@@ -48,6 +48,7 @@ public:
QStringList supportedTargetIds(ProjectExplorer::Project *parent) const;
bool supportsTargetId(const QString &id) const;
QString displayNameForId(const QString &id) const;
QIcon iconForId(const QString &id) const;
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
......
......@@ -116,6 +116,9 @@ public:
const QString &id,
QList<BuildConfigurationInfo> infos) = 0;
/// only used in the TargetSetupPage
virtual QIcon iconForId(const QString &id) const = 0;
static Qt4BaseTargetFactory *qt4BaseTargetFactoryForId(const QString &id);
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment