Extending Qt Creator Manual | IRunConfigurationFactory

Extending Qt Creator Manual 4.4.0

# IRunConfigurationFactory Class

(ProjectExplorer::IRunConfigurationFactory)

The IRunConfigurationFactory class restores run configurations from settings. More...

Header: | #include <IRunConfigurationFactory>

- List of all members, including inherited members

## Public Types

enum | CreationMode { UserCreate, AutoCreate }

## Public Functions

| IRunConfigurationFactory(QObject *parent = nullptr)
virtual QList<Core::Id> | availableCreationIds(Target *parent, CreationMode mode = UserCreate) const = 0
virtual bool | canClone(Target *parent, RunConfiguration *product) const = 0
virtual bool | canCreate(Target *parent, Core::Id id) const = 0
virtual bool | canRestore(Target *parent, const QVariantMap &map) const = 0
virtual RunConfiguration * | clone(Target *parent, RunConfiguration *product) = 0
RunConfiguration * | create(Target *parent, Core::Id id)
virtual QString | displayNameForId(Core::Id id) const = 0
RunConfiguration * | restore(Target *parent, const QVariantMap &map)

## Signals

void | availableCreationIdsChanged()

## Static Public Members

IRunConfigurationFactory * | find(Target *parent, const QVariantMap &map)
IRunConfigurationFactory * | find(Target *parent, RunConfiguration *rc)
QList<IRunConfigurationFactory *> | find(Target *parent)

## Detailed Description

The IRunConfigurationFactory class restores run configurations from settings.

The run configuration factory is used for restoring run configurations from settings and for creating new run configurations in the Run Settings dialog. To restore run configurations, use the `bool canRestore(Target *parent, const QString &id)` and `RunConfiguration* create(Target *parent, const QString &id)` functions.

To generate a list of creatable run configurations, use the `QStringList availableCreationIds(Target *parent)` and `QString displayNameForType(const QString&)` functions. To create a run configuration, use `create()`.

## Member Type Documentation

### enum IRunConfigurationFactory::CreationMode

## Member Function Documentation

### IRunConfigurationFactory::IRunConfigurationFactory(QObject *parent = nullptr)

Default constructs an instance of IRunConfigurationFactory.

### `[pure virtual]` QList<Core::Id> IRunConfigurationFactory::availableCreationIds(Target *parent, CreationMode mode = UserCreate) const

### `[signal]` void IRunConfigurationFactory::availableCreationIdsChanged()

### `[pure virtual]` bool IRunConfigurationFactory::canClone(Target *parent, RunConfiguration *product) const

### `[pure virtual]` bool IRunConfigurationFactory::canCreate(Target *parent, Core::Id id) const

### `[pure virtual]` bool IRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const

### `[pure virtual]` RunConfiguration *IRunConfigurationFactory::clone(Target *parent, RunConfiguration *product)

### RunConfiguration *IRunConfigurationFactory::create(Target *parent, Core::Id id)

### `[pure virtual]` QString IRunConfigurationFactory::displayNameForId(Core::Id id) const

Translates the types to names to display to the user.

### `[static]` IRunConfigurationFactory *IRunConfigurationFactory::find(Target *parent, const QVariantMap &map)

### `[static]` IRunConfigurationFactory *IRunConfigurationFactory::find(Target *parent, RunConfiguration *rc)

### `[static]` QList<IRunConfigurationFactory *> IRunConfigurationFactory::find(Target *parent)

### RunConfiguration *IRunConfigurationFactory::restore(Target *parent, const QVariantMap &map)