ListBrowser
Properties | |
alias | atYBeginning |
alias | atYEnd |
alias | availableHeight |
alias | availableWidth |
alias | bottomPadding |
alias | cacheBuffer |
alias | contentHeight |
alias | contentWidth |
alias | contentX |
alias | contentY |
alias | count |
alias | currentIndex |
alias | currentItem |
alias | delegate |
bool | enableLassoSelection |
alias | flickable |
alias | footer |
alias | header |
alias | holder |
int | horizontalScrollBarPolicy |
alias | lassoRec |
alias | leftPadding |
alias | model |
alias | orientation |
alias | padding |
alias | rightPadding |
alias | scrollView |
alias | section |
bool | selectionMode |
alias | snapMode |
alias | spacing |
alias | topPadding |
int | verticalScrollBarPolicy |
Signals | |
void | areaClicked (var mouse) |
void | areaRightClicked () |
void | itemsSelected (var indexes) |
void | keyPress (var event) |
Additional Inherited Members | |
Public Member Functions inherited from QtQuick.Item | |
childAt (real x, real y) | |
bool | contains (point point) |
dumpItemTree () | |
forceActiveFocus () | |
forceActiveFocus (Qt::FocusReason reason) | |
bool | grabToImage (callback, targetSize) |
point | mapFromGlobal (real x, real y) |
point | mapFromItem (Item item, point p) |
point | mapFromItem (Item item, real x, real y) |
rect | mapFromItem (Item item, real x, real y, real width, real height) |
rect | mapFromItem (Item item, rect r) |
point | mapToGlobal (real x, real y) |
point | mapToItem (Item item, point p) |
point | mapToItem (Item item, real x, real y) |
rect | mapToItem (Item item, real x, real y, real width, real height) |
rect | mapToItem (Item item, rect r) |
nextItemInFocusChain (bool forward) | |
Detailed Description
A browser view with a list layout.
This controls inherits from QQC2 Item, to checkout its inherited properties refer to the Qt Docs.
This component might seem similar to QQC2 ListView - and it does uses it underneath - but this one includes a few more predefined elements, such as a placeholder element, pinch to zoom gestures, lasso selection support, and some predefined behaviour.
Structure
The browser has a dedicated placeholder element handled by MauiKit Holder, where a message can be set when the view is on a determined state the user should be warned about, such as if the view is empty, or not search results were found.
- See also
- Holder
The lasso selection feature works with a mouse or a track-pad, and allows to select multiple items in the browser-view that are under the lasso rectangle area. A signal is emitted when the selection has been triggered - this is when the lasso rectangle is released - sending as an argument an array of numbers representing the indexes of the selected items.
- See also
- itemsSelected
- Note
- Consider using as the delegate elements the MauiKit ListBrowserDelegate.
To position the delegates you can use the ListView attached properties, such as ListView.view.width
to set the width of the delegate correctly.
You can find a more complete example at this link.
Definition at line 64 of file ListBrowser.qml.
Property Documentation
◆ atYBeginning
|
read |
Whether the view is positioned at the beginning on the Y axis.
- Remarks
- This property is read-only
Meant to be used if the view orientation
has been set to vertical.
Definition at line 172 of file ListBrowser.qml.
◆ atYEnd
|
read |
Whether the view is positioned at the end on the Y axis.
- Remarks
- This property is read-only
Meant to be used if the view orientation
has been set to vertical.
Definition at line 165 of file ListBrowser.qml.
◆ availableHeight
|
read |
The actual height of the view-port.
- Remarks
- This property is read-only
This is the actual height without any padding.
Definition at line 270 of file ListBrowser.qml.
◆ availableWidth
|
read |
The actual width of the view-port.
- Remarks
- This property is read-only
This is the actual width without any padding.
Definition at line 264 of file ListBrowser.qml.
◆ bottomPadding
|
read |
◆ cacheBuffer
|
read |
The cache buffer.
Refer to the QQC2 ListView for proper documentation.
Definition at line 118 of file ListBrowser.qml.
◆ contentHeight
|
read |
The total height of all the elements listed in the view.
Definition at line 153 of file ListBrowser.qml.
◆ contentWidth
|
read |
The total width of all the elements.
Definition at line 158 of file ListBrowser.qml.
◆ contentX
|
read |
Definition at line 96 of file ListBrowser.qml.
◆ contentY
|
read |
The position of the view contents on the Y axis.
The position of the view contents on the X axis.
Definition at line 91 of file ListBrowser.qml.
◆ count
|
read |
The total amount of elements listed in the view.
Definition at line 112 of file ListBrowser.qml.
◆ currentIndex
|
read |
The index number of the current element selected.
- Note
- To no break any binding, use the
setCurrentIndex
function.
Definition at line 102 of file ListBrowser.qml.
◆ currentItem
|
read |
The current item selected.
Definition at line 107 of file ListBrowser.qml.
◆ delegate
|
read |
The component to be used as the delegate.
- Note
- Consider using the MauiKit delegate controls, such as ListBrowserDelegate, ListDelegate or LabelDelegate.
Definition at line 80 of file ListBrowser.qml.
◆ enableLassoSelection
|
read |
Whether to enable the lasso selection, to select multiple items.
By default this is set to false
.
- See also
- itemsSelected
Definition at line 236 of file ListBrowser.qml.
◆ flickable
|
read |
An alias to access the QQC2 ListView.
- Remarks
- This property is read-only
Definition at line 142 of file ListBrowser.qml.
◆ footer
|
read |
The footer section of the ListView element.
- See also
- flickable
Definition at line 258 of file ListBrowser.qml.
◆ header
|
read |
The header section of the ListView element.
- See also
- flickable
Definition at line 252 of file ListBrowser.qml.
◆ holder
|
read |
An alias to access the placeholder properties.
This is handled by a MauiKit Holder.
- See also
- Holder::title
- Holder::body
Definition at line 230 of file ListBrowser.qml.
◆ horizontalScrollBarPolicy
|
read |
The policy of the horizontal scroll bar from the scroll view.
- See also
- scrollView The default value of this is picked based on the Style property
Style.scrollBarPolicy
, unless the orientation of the view is set to vertical, in which case this is set to 'ScrollBar.AlwaysOff`. Possible values are:- ScrollBar.AlwaysOff
- ScrollBar.AlwaysOn
- ScrollBar.AsNeeded
Definition at line 222 of file ListBrowser.qml.
◆ lassoRec
|
read |
An alias to the lasso rectangle.
- Remarks
- This property is read-only
Definition at line 246 of file ListBrowser.qml.
◆ leftPadding
|
read |
◆ model
|
read |
The model to be used to populate the browsing view.
Definition at line 74 of file ListBrowser.qml.
◆ orientation
|
read |
The orientation of the list view.
By default this is set to ListView.Vertical
.
Definition at line 124 of file ListBrowser.qml.
◆ padding
|
read |
The total padding all around the list view.
The padding is added to the ScrollView. This is the same as setting scrollView.padding
.
Definition at line 202 of file ListBrowser.qml.
◆ rightPadding
|
read |
◆ scrollView
|
read |
An alias to access the QQC2 ScrollView.
- Remarks
- This property is read-only
Definition at line 148 of file ListBrowser.qml.
◆ section
|
read |
The section group property to set the ListView sections.
Refer to the Qt documentation on the ListView section.
Definition at line 86 of file ListBrowser.qml.
◆ selectionMode
|
read |
Definition at line 240 of file ListBrowser.qml.
◆ snapMode
|
read |
How to snap the elements of the list view while scrolling.
- Note
- See Qt documentation.
Definition at line 130 of file ListBrowser.qml.
◆ spacing
|
read |
The spacing between the elements in the list view.
By default this is set to Style.defaultSpacing
Definition at line 136 of file ListBrowser.qml.
◆ topPadding
|
read |
◆ verticalScrollBarPolicy
|
read |
The policy of the vertical scroll bar from the scroll view.
- See also
- scrollView The default value of this is picked based on the Style property
Style.scrollBarPolicy
, unless the orientation of the view is set to horizontal, in which case this is set to 'ScrollBar.AlwaysOff`. Possible values are:- ScrollBar.AlwaysOff
- ScrollBar.AlwaysOn
- ScrollBar.AsNeeded
Definition at line 212 of file ListBrowser.qml.
Member Function Documentation
◆ areaClicked
|
signal |
Emitted when an empty space of the background area has been clicked.
- Parameters
-
mouse Object with information about the click event.
◆ areaRightClicked
|
signal |
Emitted when an empty space of the area area background has been right clicked.
◆ itemsSelected
|
signal |
Emitted when the lasso selection has been released.
- Parameters
-
indexes A array of index numbers is sent as the argument, representing the index value of the items under the lasso rectangle area.
◆ keyPress
|
signal |
Emitted when a physical key from the device has been pressed.
- Parameters
-
event The object with information about the event.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.