MauiKit Controls
SelectionBar.qml
33 * <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-item.html">This controls inherits from QQC2 Item, to checkout its inherited properties refer to the Qt Docs.</a>
38 * This control provides methods to append and query elements added to it. To add elements, it is necesary to map them,
51 * This control is styled as a floating bar, so it can be placed on top of its parent contents; due to this behavior it is a good idea to pair it with a MauiKit Page as its footer, and set the Page property `floatingFooter: true`.
53 * Most of the times this will be uses along with a browsing view, such as a ListBrowser or GridBrowser, which will list the items to be added or removed from the selection.
56 * For the floating selection bar to not get on the way of the contents, the Page property `flickable` needs to be set to the flickable element of the browsing view, such as the ListBrowser::flickable.
60 * Below you will find a more complete example of the functionality of these three controls out together.
70 * flickable: _listBrowser.flickable //helps to keep the content from under the selection bar at the end.
113 * function onUriAdded(uri) //watch when an uri is successfully added and mark the delegate as checked
121 * function onCleared() //watch when the selection has been cleared and uncheck all the delegates
136 * } // when the item is toggled, we mark it as checked and add it to the selection bar, otherwise we unchecked it and remove it from selection.
170 * <a href="https://invent.kde.org/maui/mauikit/-/blob/qt6-2/examples/SelectionBar.qml">You can find a more complete example at this link.</a>
180 implicitHeight: _layout.implicitHeight + Maui.Style.space.big
193 control.close()
197 }
202 Keys.enabled: true
206 * All of the actions listed in here will be visible, to hide some use the `hiddenActions` property.
212 * @brief List of action that won't be shown inside of the bar, but instead will always be hidden and listed in a dedicated overflow menu button.
223 * @brief The list of items can be displayed in a popup. This property defines the maximum height the popup list.
229 * @brief By default the selection bar was designed to be floating and thus has rounded border corners.
237 * If single selection is set to true then only a single item can be appended, if another item is added then it replaces the previous one.
264 * The model use to feed the popup list is a QQC2 ListModel, populated by the `item` passed as the argument to the `append` method.
285 }
288 * @brief Emitted when the selection is cleared either by the constrain of the single selection or by manually calling the clear method.
290 signal cleared()
295 signal exitClicked()
299 * @paran index the index number of the item clicked. Use the `itemAt` function to get to the item.
306 * @paran index the index number of the item clicked. Use the `itemAt` function to get to the item.
324 * @brief Emitted when an item is newly added to the selection. This signal only sends the URI of the item.
330 * @brief Emitted when an item has been removed from the selection. This signal only sends the URI of the item.
361 {
365 Loader
380 height: Math.min(Math.min(400, control.maxListHeight), selectionList.contentHeight) + Maui.Style.space.big
467 Maui.Theme.highlightColor : Qt.tint(control.Maui.Theme.textColor, Qt.rgba(control.Maui.Theme.backgroundColor.r, control.Maui.Theme.backgroundColor.g, control.Maui.Theme.backgroundColor.b, 0.9))
670 * @note Note that this is the index of the internal list on how items were added, and not the original index of the source list used to make the selection.
729 * @param item a map to be used to represent the item in the model. For example a valid item map would be: `({'title': "A title", 'icon': "love"})`
An alternative to QQC2 ToolBar, with a custom horizontal layout - divided into three main sections - ...
Definition ToolBar.qml:115
int count
The total amount of items in the toolbar sections, items can be non-visible and sum-up.
Definition ToolBar.qml:217
int timeout
KIOWIDGETS_EXPORT DropJob * drop(const QDropEvent *dropEvent, const QUrl &destUrl, DropJobFlags dropjobFlags, JobFlags flags=DefaultFlags)
QAction * close(const QObject *recvr, const char *slot, QObject *parent)
QAction * open(const QObject *recvr, const char *slot, QObject *parent)
QAction * clear(const QObject *recvr, const char *slot, QObject *parent)
visible
String
visible
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.