RunControl Class

(ProjectExplorer::RunControl)

The RunControl class instances represent one item that is run. More...

Header: #include <RunControl>
Inherits: QObject

Public Types

enum StopResult { StoppedSynchronously, AsynchronousStop }

Public Functions

RunControl(RunConfiguration *runConfiguration, Core::Id mode)
~RunControl() override
Abi abi() const
virtual void appendMessage(const QString &msg, Utils::OutputFormat format)
Utils::ProcessHandle applicationProcessHandle() const
virtual void bringApplicationToForeground()
bool canReUseOutputPane(const RunControl *other) const
const Connection &connection() const
IDevice::ConstPtr device() const
virtual QString displayName() const
Utils::Icon icon() const
bool isRunning() const
Utils::OutputFormatter *outputFormatter() const
Project *project() const
virtual bool promptToStop(bool *optionalPrompt = nullptr) const
RunConfiguration *runConfiguration() const
Core::Id runMode() const
const Runnable &runnable() const
void setApplicationProcessHandle(const Utils::ProcessHandle &handle)
void setConnection(const Connection &connection)
void setDisplayName(const QString &displayName)
void setIcon(const Utils::Icon &icon)
void setRunnable(const Runnable &runnable)
virtual void start() = 0
virtual StopResult stop() = 0
virtual bool supportsReRunning() const
  • 32 public functions inherited from QObject

Signals

void appendMessageRequested(ProjectExplorer::RunControl *runControl, const QString &msg, Utils::OutputFormat format)
void applicationProcessHandleChanged()
void finished()
void started()

Protected Functions

void reportApplicationStart()
void reportApplicationStop()
bool showPromptToStopDialog(const QString &title, const QString &text, const QString &stopButtonText = QString(), const QString &cancelButtonText = QString(), bool *prompt = nullptr) const
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The RunControl class instances represent one item that is run.

Member Type Documentation

enum RunControl::StopResult

Member Function Documentation

RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode)

Default constructs an instance of RunControl.

RunControl::~RunControl()

Destroys the instance of RunControl.

Abi RunControl::abi() const

[virtual] void RunControl::appendMessage(const QString &msg, Utils::OutputFormat format)

[signal] void RunControl::appendMessageRequested(ProjectExplorer::RunControl *runControl, const QString &msg, Utils::OutputFormat format)

Utils::ProcessHandle RunControl::applicationProcessHandle() const

A handle to the application process.

This is typically a process id, but should be treated as opaque handle to the process controled by this RunControl.

See also setApplicationProcessHandle().

[signal] void RunControl::applicationProcessHandleChanged()

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

[virtual] void RunControl::bringApplicationToForeground()

Brings the application determined by this RunControl's applicationProcessHandle to the foreground.

The default implementation raises the application on Mac, and does nothing elsewhere.

bool RunControl::canReUseOutputPane(const RunControl *other) const

const Connection &RunControl::connection() const

See also setConnection().

IDevice::ConstPtr RunControl::device() const

[virtual] QString RunControl::displayName() const

See also setDisplayName().

[signal] void RunControl::finished()

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

Utils::Icon RunControl::icon() const

Returns the icon to be shown in the Outputwindow.

TODO the icon differs currently only per "mode", so this is more flexible than it needs to be.

See also setIcon().

bool RunControl::isRunning() const

Utils::OutputFormatter *RunControl::outputFormatter() const

Project *RunControl::project() const

[virtual] bool RunControl::promptToStop(bool *optionalPrompt = nullptr) const

Prompts to stop. If optionalPrompt is passed, a Do not ask again checkbox is displayed and the result is returned in *optionalPrompt.

[protected] void RunControl::reportApplicationStart()

[protected] void RunControl::reportApplicationStop()

RunConfiguration *RunControl::runConfiguration() const

Core::Id RunControl::runMode() const

const Runnable &RunControl::runnable() const

See also setRunnable().

void RunControl::setApplicationProcessHandle(const Utils::ProcessHandle &handle)

See also applicationProcessHandle().

void RunControl::setConnection(const Connection &connection)

See also connection().

void RunControl::setDisplayName(const QString &displayName)

See also displayName().

void RunControl::setIcon(const Utils::Icon &icon)

See also icon().

void RunControl::setRunnable(const Runnable &runnable)

See also runnable().

[protected] bool RunControl::showPromptToStopDialog(const QString &title, const QString &text, const QString &stopButtonText = QString(), const QString &cancelButtonText = QString(), bool *prompt = nullptr) const

Prompts to terminate the application with the Do not ask again checkbox.

[pure virtual] void RunControl::start()

[signal] void RunControl::started()

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

[pure virtual] StopResult RunControl::stop()

[virtual] bool RunControl::supportsReRunning() const