diff options
author | hjk <hjk@qt.io> | 2018-03-22 15:45:38 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-03-29 14:27:06 +0000 |
commit | 1c006e406fd94fd6f85902cb9aec3ec06ed79057 (patch) | |
tree | fe18cd686008590e9933c31f23b1a691bd556021 /src/plugins/projectexplorer/runconfigurationaspects.h | |
parent | 454e9ee5ca9d8266ab8e5a654a1d4e7a04b40833 (diff) |
ProjectExplorer: Introduce and use a ExecutableAspect
... to hold the label with the executable's name in the
RunConfiguration widgets.
This basically follows suit on {WorkingDirectory,Arguments}Aspect,
allowing for some centralized handling of decorations on invalid
names etc.
Implementation is even simpler as this is read-only and not saved
in settings envisioned use cases.
Change-Id: I20c5c19e5f19ba8367afc0d04ed2ac3681e6491d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/runconfigurationaspects.h')
-rw-r--r-- | src/plugins/projectexplorer/runconfigurationaspects.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.h b/src/plugins/projectexplorer/runconfigurationaspects.h index 4d94396ba5..711de65bb3 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.h +++ b/src/plugins/projectexplorer/runconfigurationaspects.h @@ -32,6 +32,7 @@ QT_BEGIN_NAMESPACE class QCheckBox; +class QLabel; class QFormLayout; class QToolButton; QT_END_NAMESPACE @@ -126,4 +127,27 @@ private: QPointer<Utils::FancyLineEdit> m_chooser; }; +class PROJECTEXPLORER_EXPORT ExecutableAspect : public IRunConfigurationAspect +{ + Q_OBJECT + +public: + ExecutableAspect(RunConfiguration *runConfig, + bool isRemote = false, + const QString &label = QString()); + + void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout); + + Utils::FileName executable() const; + void setExecutable(const Utils::FileName &executable); + +private: + QString executableText() const; + + Utils::FileName m_executable; + bool m_isRemote = false; + QString m_labelString; + QPointer<QLabel> m_executableDisplay; +}; + } // namespace ProjectExplorer |