diff options
author | hjk <hjk@qt.io> | 2019-10-15 17:20:51 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-10-18 12:24:39 +0000 |
commit | 6eaf239777a3166f2504b0dff90bb4afcacba89f (patch) | |
tree | 32a2ffa2028e3ba487d62b380e40aab866c1e39f /src/plugins/android/androidrunconfiguration.cpp | |
parent | 02350520c211bf5aa4f2804c1d19d28d710daa20 (diff) |
ProjectExplorer: Prepare more flexibility to aspect layouting
This hides the explicit use of a QFormLayout from the aspect
interface in a new LayoutBuilder class. That currently works
only on a QFormLayout in the back, but opens the possibility
to use e.g. a QGridLayout as use on the Kits and some option
pages.
The aspects now only announce sub-widgets they like to add,
actuall positioning is does by a new LayoutBuilder class,
also cramming several widgets in an hbox in the right column
of the QFormLayout is done there.
Change-Id: I2b788192c465f2ab82261849d34e514697c5a491
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/android/androidrunconfiguration.cpp')
-rw-r--r-- | src/plugins/android/androidrunconfiguration.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/android/androidrunconfiguration.cpp b/src/plugins/android/androidrunconfiguration.cpp index 01b0c6050af..ac4aa5f0c0c 100644 --- a/src/plugins/android/androidrunconfiguration.cpp +++ b/src/plugins/android/androidrunconfiguration.cpp @@ -62,13 +62,13 @@ BaseStringListAspect::BaseStringListAspect(const QString &settingsKey, Core::Id BaseStringListAspect::~BaseStringListAspect() = default; -void BaseStringListAspect::addToConfigurationLayout(QFormLayout *layout) +void BaseStringListAspect::addToLayout(LayoutBuilder &builder) { QTC_CHECK(!m_widget); - m_widget = new AdbCommandsWidget(layout->parentWidget()); + m_widget = new AdbCommandsWidget; m_widget->setCommandList(m_value); m_widget->setTitleText(m_label); - layout->addRow(m_widget); + builder.addItem(m_widget.data()); connect(m_widget.data(), &AdbCommandsWidget::commandsChanged, this, [this] { m_value = m_widget->commandsList(); emit changed(); |