MauiKit Controls
ToolActions.qml
13 * <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-control.html">This control inherits from QQC2 Control, to checkout its inherited properties refer to the Qt Docs.</a>
17 * @image html Misc/toolactions.png "[1] Non-checkable. [2] Checkable non-auto-exclusive. [3] Checkable and autoexclusive"
20 * This control supports checkable and non-checkable actions. Also auto-exclusive and non-auto-exclusive actions.
22 * When enabling the `autoExclusive` property, then only one action in the group can be marked as checked at the time.
24 * There is also the option to collapse the actions into a single button with a popup menu where the actions are listed, this is useful when the available space changes and the control needs to be made more compact to save space.
28 * If only two actions are added and marked as auto-exclusive, then this control has the option to enable a `cyclic` behavior, which means that toggling one button will activate the next action in line and cyclic around.
91 * <a href="https://invent.kde.org/maui/mauikit/-/blob/qt6-2/examples/ToolActions.qml">You can find a more complete example at this link.</a>
103 padding: 0
109 * @brief The list of QQC2 Action to be listed. These can be declared a children elements of this control.
120 * @brief Whether the action button can be checked. If enabled, then the state will be styled accordingly.
137 * @brief Whether two actions can be triggered in a cyclic manner. So one press will activate the next action and then cycle around to the first one again.
151 readonly property bool canCyclic : control.cyclic && control.count === 2 && control.autoExclusive
166 * @brief Whether the control should display all the actions as buttons in a row, or to collapse them into a popup menu.
207 sourceComponent: control.expanded ? _rowComponent : (control.canCyclic ? _buttonComponent : _toolButtonMenuComponent)
272 color: (checked || down ? Maui.Theme.highlightColor : ( hovered ? Maui.Theme.hoverColor : Maui.Theme.backgroundColor))
458 icon.color: m_action ? (m_action.icon.color && m_action.icon.color.length ? m_action.icon.color : (pressed || checked ? control.Maui.Theme.highlightedTextColor : control.Maui.Theme.textColor)) : control.Maui.Theme.textColor
void uncheck(except)
Forces to uncheck all the actions except the one action sent as the argument.
bool autoExclusive
Whether this control should only allow one action to be checked at the time.
Definition ToolActions.qml:108
bool expanded
Whether the control should display all the actions as buttons in a row, or to collapse them into a po...
Definition ToolActions.qml:154
string defaultIconName
The icon name to be used in the button that opens the menu popup, when the view is collapsed.
Definition ToolActions.qml:159
QString name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:11:16 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:11:16 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.