class PROJECTEXPLORER_EXPORT IRunConfigurationFactory
: public QObject{
Q_OBJECT
public:
explicit IRunConfigurationFactory
(QObject *parent
= 0);
virtual ~IRunConfigurationFactory();
enum CreationMode {UserCreate, AutoCreate};
virtual QList<Core::Id> availableCreationIds(Target *parent, CreationMode mode = UserCreate) const = 0;
virtual QString displayNameForId
(Core
::Id id
) const = 0;
virtual bool canCreate(Target *parent, Core::Id id) const = 0;
RunConfiguration *create(Target *parent, Core::Id id);
virtual bool canRestore(Target *parent, const QVariantMap &map) const = 0;
RunConfiguration *restore(Target *parent, const QVariantMap &map);
virtual bool canClone(Target *parent, RunConfiguration *product) const = 0;
virtual RunConfiguration *clone(Target *parent, RunConfiguration *product) = 0;
static IRunConfigurationFactory *find(Target *parent, const QVariantMap &map);
static IRunConfigurationFactory *find(Target *parent, RunConfiguration *rc);
static QList<IRunConfigurationFactory *> find(Target *parent);
signals:
void availableCreationIdsChanged();
private:
virtual RunConfiguration *doCreate(Target *parent, Core::Id id) = 0;
virtual RunConfiguration *doRestore(Target *parent, const QVariantMap &map) = 0;
};
class PROJECTEXPLORER_EXPORT IRunConfigurationFactory : public QObject
{
Q_OBJECT
public:
explicit IRunConfigurationFactory(QObject *parent = 0);
virtual ~IRunConfigurationFactory();
enum CreationMode {UserCreate, AutoCreate};
virtual QList<Core::Id> availableCreationIds(Target *parent, CreationMode mode = UserCreate) const = 0;
virtual QString displayNameForId(Core::Id id) const = 0;
virtual bool canCreate(Target *parent, Core::Id id) const = 0;
RunConfiguration *create(Target *parent, Core::Id id);
virtual bool canRestore(Target *parent, const QVariantMap &map) const = 0;
RunConfiguration *restore(Target *parent, const QVariantMap &map);
virtual bool canClone(Target *parent, RunConfiguration *product) const = 0;
virtual RunConfiguration *clone(Target *parent, RunConfiguration *product) = 0;
static IRunConfigurationFactory *find(Target *parent, const QVariantMap &map);
static IRunConfigurationFactory *find(Target *parent, RunConfiguration *rc);
static QList<IRunConfigurationFactory *> find(Target *parent);
signals:
void availableCreationIdsChanged();
private:
virtual RunConfiguration *doCreate(Target *parent, Core::Id id) = 0;
virtual RunConfiguration *doRestore(Target *parent, const QVariantMap &map) = 0;
};
To copy to clipboard, switch view to plain text mode
Bookmarks