Extending Qt Creator Manual | RunConfiguration

Extending Qt Creator Manual 4.5.2

# RunConfiguration Class

(ProjectExplorer::RunConfiguration)

The RunConfiguration class is the base class for a run configuration. More...

Header: | #include <RunConfiguration>
Inherits: | ProjectExplorer::StatefulProjectConfiguration

- List of all members, including inherited members

## Public Types

enum | ConfigurationState { Configured, UnConfigured, Waiting }

## Public Functions

| ~RunConfiguration() override
virtual Abi | abi() const
void | addExtraAspect(IRunConfigurationAspect *aspect)
virtual QString | buildSystemTarget() const
virtual QWidget * | createConfigurationWidget() = 0
virtual Utils::OutputFormatter * | createOutputFormatter() const
virtual ConfigurationState | ensureConfigured(QString *errorMessage = nullptr)
IRunConfigurationAspect * | extraAspect(Core::Id id) const
T * | extraAspect() const
QList<IRunConfigurationAspect *> | extraAspects() const
virtual bool | isConfigured() const
Target * | target() const

## Reimplemented Public Functions

virtual QString | disabledReason() const override
virtual bool | fromMap(const QVariantMap &map) override
virtual bool | isActive() const override
virtual Project * | project() const override
virtual QVariantMap | toMap() const override

- 2 public functions inherited from ProjectExplorer::StatefulProjectConfiguration
- 13 public functions inherited from ProjectExplorer::ProjectConfiguration

## Signals

void | configurationFinished()
void | requestRunActionsUpdate()

- 1 signal inherited from ProjectExplorer::StatefulProjectConfiguration
- 2 signals inherited from ProjectExplorer::ProjectConfiguration

## Static Public Members

void | registerAspect()
RunConfiguration * | startupRunConfiguration()

## Protected Functions

| RunConfiguration(Target *target)
BuildConfiguration * | activeBuildConfiguration() const
void | copyFrom(const RunConfiguration *source)
void | initialize(Core::Id id)
virtual void | updateEnabledState()

- 2 protected functions inherited from ProjectExplorer::StatefulProjectConfiguration
- 2 protected functions inherited from ProjectExplorer::ProjectConfiguration

## Detailed Description

The RunConfiguration class is the base class for a run configuration.

A run configuration specifies how a target should be run, while a runner does the actual running.

The target owns the RunConfiguraitons and a RunControl will need to copy all necessary data as the RunControl may continue to exist after the RunConfiguration has been destroyed.

A RunConfiguration disables itself when the project is parsing or has no parsing data available. The disabledReason() method can be used to get a user-facing string describing why the RunConfiguration considers itself unfit for use.

Override updateEnabledState() to change the enabled state handling. Override disabledReasons() to provide better/more descriptions to the user.

Connect signals that may change enabled state of your RunConfiguration to updateEnabledState.

## Member Type Documentation

### enum RunConfiguration::ConfigurationState

## Member Function Documentation

### `[protected]` RunConfiguration::RunConfiguration(Target *target)

Default constructs an instance of RunConfiguration.

### RunConfiguration::~RunConfiguration()

Destroys the instance of RunConfiguration.

### `[virtual]` Abi RunConfiguration::abi() const

### `[protected]` BuildConfiguration *RunConfiguration::activeBuildConfiguration() const

### void RunConfiguration::addExtraAspect(IRunConfigurationAspect *aspect)

### `[virtual]` QString RunConfiguration::buildSystemTarget() const

### `[signal]` void RunConfiguration::configurationFinished()

### `[protected]` void RunConfiguration::copyFrom(const RunConfiguration *source)

### `[pure virtual]` QWidget *RunConfiguration::createConfigurationWidget()

### `[virtual]` Utils::OutputFormatter *RunConfiguration::createOutputFormatter() const

### `[override virtual]` QString RunConfiguration::disabledReason() const

### `[virtual]` ConfigurationState RunConfiguration::ensureConfigured(QString *errorMessage = nullptr)

### IRunConfigurationAspect *RunConfiguration::extraAspect(Core::Id id) const

### T *RunConfiguration::extraAspect() const

### QList<IRunConfigurationAspect *> RunConfiguration::extraAspects() const

Returns extra aspects.

See also ProjectExplorer::IRunConfigurationAspect.

### `[override virtual]` bool RunConfiguration::fromMap(const QVariantMap &map)

### `[protected]` void RunConfiguration::initialize(Core::Id id)

### `[override virtual]` bool RunConfiguration::isActive() const

### `[virtual]` bool RunConfiguration::isConfigured() const

### `[override virtual]` Project *RunConfiguration::project() const

### `[static]` void RunConfiguration::registerAspect()

### `[signal]` void RunConfiguration::requestRunActionsUpdate()

### `[static]` RunConfiguration *RunConfiguration::startupRunConfiguration()

Returns the RunConfiguration of the currently active target of the startup project, if such exists, or `nullptr` otherwise.

### Target *RunConfiguration::target() const

### `[override virtual]` QVariantMap RunConfiguration::toMap() const

### `[virtual protected]` void RunConfiguration::updateEnabledState()