Commit Graph

13 Commits

Author SHA1 Message Date
hjk
ba06114afa Utils: Improve handling of BoolAspects used for checked QGroupBoxes
Make the group box a registered subwidget of the BoolAspect, so it
properly triggers the necessary behavior in BaseAspect::isDirty.

Change-Id: I9f6291d87ef7ce4067e0d235de8b5be24de79a93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-06 11:28:08 +00:00
hjk
baa794a7ba Utils: Use a full layout row for an aspect for Columns and Forms
Avoids some boilerplate on the user code side.

This seems to be the only existing case. If there'd ever be a case where
this is not appropriate, an extra Row { ... } would solve it.

Change-Id: I1ae1102e895640c0acc03b4949e3baabecfcdc49
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-25 04:53:05 +00:00
hjk
62974b0ad9 Subversion: Aspectify settings
Change-Id: I60a563511fce2e6487e8050541cedb086b0ab4e1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-22 06:42:08 +00:00
hjk
035a6ff031 Utils: Avoid intermediate widgets when using LayoutBuilder
In most cases, the layout constructed in the builder was set
on a widget which in turn was put into a vbox in the actual
widget. This is not necessary, but needs some re-ordering.

Also make sure that using not-yet-parented widgets during
layout construction does not cause visible artifacts.

Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-16 11:37:44 +00:00
hjk
687597152e LayoutBuilder: Introduce markers for space and stretch
... and groupbox titles.

Change-Id: Ie57d7857230692f599de8d362c570b9163626dee
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-02 12:31:14 +00:00
hjk
434c624b6f LayoutBuilder: Add support for VBoxLayout and HBoxLayout
Change-Id: Ieeef8244a05ffb1b642843c6471f92e2b154cf8a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-26 13:29:31 +00:00
hjk
7527bbcf2c ProjectExplorer: Move KitAspect related layout code
... from KitManagerConfigWidget to KitAspectWidget (which is not
really a widget, but...)

The modification for the alignment handling only affect this use
here. Long term I hope this can be handled centrally (e.g. always
use the special form label alignment for labels in the first column
when some LayoutBuilder bool property is set, instead of doing that
for each use), so this is not necessarily a final API.

Change-Id: I678dba45ee68ca9706569715d232f98363de8636
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-09 09:05:57 +00:00
hjk
bc4e76f76b Revert "Utils: Remove the text option for LayoutItem"
This reverts commit 5154e1eb02.

For some yet unknown reason, this renders the whole sublayout read-only.

Change-Id: Ide1587382392a57643bed1b3cdd7d8987dbdab57
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-28 15:11:49 +00:00
hjk
5154e1eb02 Utils: Remove the text option for LayoutItem
This is converted to QLabels on the Qt side anyway, so we can can
just do that and avoid the special casing later for form layouts
later and gain the functionality for grids.

Use the opportunity to make the all mouse-selectable.

Change-Id: I37830b028b8d2987ea4925f364c79e905be725c8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-28 08:40:29 +00:00
hjk
d97c431a00 Utils: Add some documentation for LayoutBuilder and BaseAspect
... and some related classes and an enum.

This is not a complete documentation for all aspect classes.

Change-Id: I2d98aec012394cc4016e571884b861db7a498b1b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-09-25 09:20:05 +00:00
hjk
2cabd2ceb5 Utils: Consolidate LayoutBuilder interface a bit
- the var args template for addItems was overkill creating a lot of
  instantiations. Use a temporary list instead.
- allow default constructed LayoutItems to be used for an empty cell,
  avoiding the use of a QLabel with empty text
- add an addRow({...}) overload as convenience shortcut for
  .startNewRow().addItems({...}
- rename startNewRow() to finishRow()

Change-Id: I6d49dacbac3d7acf140ca526884ba1ceeeca2e0d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-24 10:32:26 +00:00
hjk
4907ad090a Utils: Fix warning when destroying a grid-based LayoutBuilder
Change-Id: I816133b6b26ecaf546484b93dbc95666910f992a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 10:21:07 +00:00
hjk
cec468d78a Utils/ProjectExplorer: Move re-usabled bits of aspects to Utils
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.

This is mostly mechanical, with various include/using changes
to make it compile.

Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-23 07:44:42 +00:00