It will be used in the CppCheck option page.
The de-facto copy of utils/flowlayout.{cpp,h} is intentional
to keep the layout builder usable stand-alone.
Change-Id: Ibda3ece2aeb3cbb1badaf6083b52ebb63b6524ac
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The Id was only used in the demo. "ID" is Not exactly canonical naming,
but this clashes often with Utils::Id, so mis-spell until we settle on a
proper name.
Change-Id: I6fdf806c41abf224f7422ec6c9263db3eb357190
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
QSplitter is different insofar as that it doesn't have a Layout,
but a list of child widgets.
Change-Id: I4e1076e39d20df409c4bab93d79770b6d0e5aa8d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Intenally just wrapping a 'bindTo' result, but less trigger potential
for pointer related peladophobia
Change-Id: I25171a2675fb0474ce97c04552ac1cf5ffd6ee56
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
LayoutBuilder is meant to be an implementation detail nowadays.
Change-Id: I777ab934d3d405873e819eeddd27428d8c652f9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.
Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).
No direct access to the widget in creation, funnel out is
via the new bindTo() facility.
Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
layoutbuilder.{cpp,h} can now be re-used outside Creator
Change-Id: I306d2d8168d8a09658ea008f4606ca37a0dbbc01
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.
Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Originally the idea was to only expose LayoutBuilder, but we
are getting more and more related items. Be consequent now,
and have everything in Utils::Layouting, but not in nested classes.
Change-Id: Ic0f98595882e5c60a25c30ec52df4a0ea79bc0ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We have many horizontal separator lines in the UI, which are each time
repetitively created from a QFrame with some flags set. With the .ui
inlining, we will have more of these separators coming.
This change intoduces a Layouting::HorizontalRule LayoutItem and
replaces various existing QFarme separators with it.
Change-Id: I60bad89e2a2b777fbd2f9d0cf872af81e41dcfd7
Reviewed-by: hjk <hjk@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Weird, but makes GroupBox implementation less special and allows
several setters without resorting to using extra {...} there,
which would be needed e.g. for title _and_ toolTip.
Change-Id: Ie0e64a7bae15825292a473a1e973817be5c27fc4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Useful for layouts that should appear as forms but are using
QGridLayout for further alignment in the fields as e.g.
the Kit settings does.
Change-Id: Iec3195b1528dfe052eed5a34379a946db6bf8e54
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
More explicit and more potential options (e.g. "treat grid as form")
than a bool.
Change-Id: I89413efe30410160c38b0e524ba64288dde2332e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Originally we needed the real type of the widget for a while.
Not anymore.
Change-Id: Ida7e3eb4b091baee90d510c5f6ec05bbcedfc11f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A bit more explicit than the current mix of Space() and asserting {}.
Change-Id: Ia296b1d23294dfccd1e33827e136b821a4d2c6fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... as "standard" ways to define line breaks and simple stretch.
There have already been too many patterns to do it.
Break() and Stretch() still work for the patches in flight, but
they are planned to be removed.
Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This goes a bit in the direction of property settigs for
arbitrary layout items.
Change-Id: I98500e213e3b22cc99038a1bcf688183588be248
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It had a implicit vertical layout leading to unneded layout nesting
in quite a few cases. The price is an added Column { ... } in those
places where the implicit vertical layout was sufficient before.
Change-Id: I3ae1f03f9c1d691bd0c563b0447edd03ee02bbd2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
As a side-effect, this fixes adding stretch and space in the the dummy
vboxes for formlayout fields with more than two items that was
accidentally missing before.
Change-Id: I18e4755ccd3cd9e1de761b70dc621b17376277dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Round 2 - focus on sources.
For classes with initial in range [I-Z].
Try to keep the same separators between different kind of headers.
Change-Id: I8a7ab99bab8120ee72cda6433ee3dc6f260a4d76
Reviewed-by: hjk <hjk@qt.io>
A tab bar should span completely above the group that it "tabs", and
have no spacing to it. Otherwise there are funny visual artifacts, and
the visual correspondance is not clear.
Add an option for spacing to LayoutBuilder for that.
Change-Id: I5ca9dc713fff95599c9ec1cf90abe8473bc67c2a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
ElidingLabel with elided mode set other than Qt::ElideNone will not show
in case QFormLayout has QFormLayout::ExpandingFieldsGrow field growth
policy
Change-Id: I26db57fbeb2c921e054cf7dc18229ebddcb04530
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>