AltBrowser
Public Types | |
enum class | ViewType { Grid , List } |
Properties | |
int | count |
int | currentIndex |
Item | currentView |
bool | enableLassoSelection |
Component | gridDelegate |
alias | gridView |
alias | holder |
Component | listDelegate |
alias | listView |
var | model |
bool | selectionMode |
int | viewType |
Properties inherited from Page | |
bool | altHeader |
bool | autoHideFooter |
int | autoHideFooterDelay |
int | autoHideFooterMargins |
bool | autoHideHeader |
int | autoHideHeaderDelay |
int | autoHideHeaderMargins |
int | bottomMargin |
alias | content |
Flickable | flickable |
bool | floatingFooter |
bool | floatingHeader |
alias | footBar |
Item | footer |
alias | footerColumn |
alias | footerContainer |
int | footerPositioning |
alias | headBar |
Item | header |
int | headerColorSet |
alias | headerColumn |
alias | headerContainer |
int | headerPositioning |
alias | internalHeight |
int | leftMargin |
int | margins |
alias | pageContent |
int | rightMargin |
bool | showTitle |
string | title |
int | topMargin |
Public Member Functions | |
void | toggle () |
Additional Inherited Members | |
Signals inherited from Page | |
void | goBackTriggered () |
void | goForwardTriggered () |
Detailed Description
A convinient way of switching between a grid an a list view.
- Since
- org.mauikit.controls 1.0
This controls inherits from MauiKit Page, to checkout its inherited properties refer to the docs.
- See also
- Page
- Note
- This control supports the attached
Controls.showCSD
property to display the window control buttons when using CSD.
The AltBrowser makes use of the GridView and ListBrowser components, there is a property to dinamically switch between the two.
For some navigation patterns is a good idea to provide a grid view when the application screen size is wide enough to fit numerous items and a list view when the space is contrained - since the list is much more compact - and makes navigation quicker.
- See also
- viewType
Notes
The data model is shared by both of the view types, but the delagates to be used have to be assigment for each one.
- See also
- listDelegate
- gridDelegate
There is a MauiKit Holder element that can be used to display a placeholder message, for example, when the views are empty.
- See also
- holder
You can find a more complete example at this link.
Definition at line 72 of file AltBrowser.qml.
Member Enumeration Documentation
◆ ViewType
|
strong |
Definition at line 94 of file AltBrowser.qml.
Property Documentation
◆ count
|
read |
The total amount of items in the current view.
- Remarks
- This property is read-only
Definition at line 157 of file AltBrowser.qml.
◆ currentIndex
|
read |
The index of the current item selected in either view type.
This value is synced to both view types.
Definition at line 112 of file AltBrowser.qml.
◆ currentView
|
read |
The current view being used, the GridView or the ListBrowser.
To access the precise view use the aliases for the GridView or ListView.
- Remarks
- This property is read-only
Definition at line 85 of file AltBrowser.qml.
◆ enableLassoSelection
|
read |
Allow the lasso selection for multiple items with mouse or track based input methods.
Definition at line 128 of file AltBrowser.qml.
◆ gridDelegate
|
read |
The delegate to be used by the GridView.
Definition at line 120 of file AltBrowser.qml.
◆ gridView
|
read |
The GridBrowser used as the grid view alternative.
- Remarks
- This property is read-only
Definition at line 146 of file AltBrowser.qml.
◆ holder
|
read |
Item to set a place holder emoji and message.
For more details on its properties check the Holder component.
- See also
- Holder
Definition at line 140 of file AltBrowser.qml.
◆ listDelegate
|
read |
The delegate to be used by the ListBrowser.
Definition at line 116 of file AltBrowser.qml.
◆ listView
|
read |
The ListBrowser used as the list view alternative.
- Remarks
- This property is read-only
Definition at line 152 of file AltBrowser.qml.
◆ model
|
read |
The shared data model to be used by both view types.
Definition at line 124 of file AltBrowser.qml.
◆ selectionMode
|
read |
Allow the selection mode, which sets the views in the mode to accept to select multiple items.
Definition at line 132 of file AltBrowser.qml.
◆ viewType
|
read |
Sets the view type that's going to be in use.
The type can be one of:
- ViewType.Grid
- ViewType.List The default
- See also
- ViewType
Definition at line 107 of file AltBrowser.qml.
Member Function Documentation
◆ toggle()
void AltBrowser::toggle | ( | ) |
Toggle between the two views.
If in list view then switches to grid, and from grid to list.
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.