PageRow
Properties | |
alias | columnView |
alias | currentIndex |
alias | currentItem |
int | defaultColumnWidth |
alias | depth |
alias | globalToolBar |
var | initialPage |
alias | interactive |
alias | items |
Item | lastItem |
alias | layers |
alias | leadingVisibleItem |
OverlayDrawer | leftSidebar |
bool | popHiddenPages |
alias | separatorVisible |
alias | trailingVisibleItem |
alias | visibleItems |
bool | wideMode |
Signals | |
void | pageInserted (int position, Item page) |
void | pagePushed (Item page) |
void | pageRemoved (Item page) |
Public Member Functions | |
void | clear () |
void | flickBack () |
void | get (idx) |
void | goBack (event=null) |
void | goForward () |
void | insertPage (position, page, properties) |
void | movePage (fromPos, toPos) |
void | pop (page) |
void | push (page, properties) |
void | pushDialogLayer (page, properties={}, windowProperties={}) |
void | removePage (page) |
void | replace (page, properties) |
Detailed Description
PageRow implements a row-based navigation model, which can be used with a set of interlinked information pages.
Pages are pushed in the back of the row and the view scrolls until that row is visualized. A PageRow can show a single page or a multiple set of columns, depending on the window width: on a phone a single column should be fullscreen, while on a tablet or a desktop more than one column should be visible.
@inherits QtQuick.Templates.Control
Definition at line 21 of file PageRow.qml.
Property Documentation
◆ columnView
|
read |
This property holds the ColumnView that this PageRow owns.
Generally, you shouldn't need to change the value of this property.
- Since
- 2.12
Definition at line 71 of file PageRow.qml.
◆ currentIndex
|
read |
This property holds the index of the currently active page.
- See also
- currentItem
Definition at line 50 of file PageRow.qml.
◆ currentItem
|
read |
This property holds the currently visible/active page.
- Remarks
- This property is read-only
Because of the ability to display multiple pages, it will hold the currently active page.
Definition at line 44 of file PageRow.qml.
◆ defaultColumnWidth
|
read |
This property holds the default width for a column.
default: 20 * Kirigami.Units.gridUnit
- Note
- Pages can override it using implicitWidth, Layout.fillWidth, Layout.minimumWidth etc.
Definition at line 112 of file PageRow.qml.
◆ depth
|
read |
This property holds the number of pages currently pushed onto the view.
- Remarks
- This property is read-only
Definition at line 29 of file PageRow.qml.
◆ globalToolBar
|
read |
This property sets the appearance of an optional global toolbar for the whole PageRow.
- Remarks
- This property is read-only
It's a grouped property comprised of the following properties:
- style (
Kirigami.ApplicationHeaderStyle
): can have the following values:Auto
: Depending on application formfactor, it can behave automatically like other values, such as a Breadcrumb on mobile and ToolBar on desktop.Breadcrumb
: It will show a breadcrumb of all the page titles in the stack, for easy navigation.Titles
: Each page will only have its own title on top.ToolBar
: Each page will have the title on top together buttons and menus to represent all of the page actions. Not available on Mobile systems.None
: No global toolbar will be shown.
actualStyle
: This will represent the actual style of the toolbar; it can be different from style in the case style is Auto.showNavigationButtons
: OR flags combination of Kirigami.ApplicationHeaderStyle.ShowBackButton and Kirigami.ApplicationHeaderStyle.ShowForwardButton.toolbarActionAlignment: Qt::Alignment
: How to horizontally align the actions when using the ToolBar style. Note that anything but Qt.AlignRight will cause the title to be hidden (default:Qt.AlignRight
).minimumHeight: int
Minimum height of the header, which will be resized when scrolling. Only in Mobile mode (default:preferredHeight
, sliding but no scaling).preferredHeight: int
The height the toolbar will usually have.leftReservedSpace: int, readonly
How many pixels of extra space are reserved at the left of the page toolbar (typically for navigation buttons or a drawer handle).rightReservedSpace: int, readonly
How many pixels of extra space are reserved at the right of the page toolbar (typically for a drawer handle).
- Since
- 5.48
Definition at line 160 of file PageRow.qml.
◆ initialPage
|
read |
This property sets the initial page for this PageRow.
Definition at line 55 of file PageRow.qml.
◆ interactive
|
read |
This property sets whether it is possible to go back/forward by swiping with a gesture on the content view.
default: true
Definition at line 121 of file PageRow.qml.
◆ items
|
read |
This property holds the present pages in the PageRow.
- Remarks
- This property is read-only
- Since
- 2.6
Definition at line 78 of file PageRow.qml.
◆ lastItem
|
read |
This property holds the last page in the row.
- Remarks
- This property is read-only
Definition at line 35 of file PageRow.qml.
◆ layers
|
read |
This property holds the modal layers.
Sometimes an application needs a modal page that always covers all the rows. For instance the full screen image of an image viewer or a settings page.
- Since
- 5.38
Definition at line 180 of file PageRow.qml.
◆ leadingVisibleItem
|
read |
This property holds the first page in the PageRow that is at least partially visible.
- Remarks
- This property is read-only
- Note
- Pages before that one (the one contained in the property) will be out of the viewport.
- See also
- ColumnView::leadingVisibleItem
- Since
- 2.6
Definition at line 95 of file PageRow.qml.
◆ leftSidebar
|
read |
This property assigns a drawer as an internal left sidebar for this PageRow.
In this case, when open and not modal, the drawer contents will be in the same layer as the base pagerow. Pushing any other layer on top will cover the sidebar.
- Since
- 5.84
Definition at line 170 of file PageRow.qml.
◆ popHiddenPages
|
read |
This property holds whether to automatically pop pages at the top of the stack if they are not visible.
If a user navigates to a previous page on the stack (ex. pressing back button) and pages above it on the stack are not visible, they will be popped if this property is true.
- Since
- 5.101
Definition at line 189 of file PageRow.qml.
◆ separatorVisible
|
read |
This property sets whether the separators between pages should be displayed.
default: true
- Since
- 5.38
Definition at line 136 of file PageRow.qml.
◆ trailingVisibleItem
|
read |
This property holds the last page in the PageRow that is at least partially visible.
- Remarks
- This property is read-only
- Note
- Pages after that one (the one contained in the property) will be out of the viewport.
- See also
- ColumnView::trailingVisibleItem
- Since
- 2.6
Definition at line 104 of file PageRow.qml.
◆ visibleItems
|
read |
This property holds all visible pages in the PageRow, excluding those which are scrolled away.
- Remarks
- This property is read-only
- Since
- 2.6
Definition at line 86 of file PageRow.qml.
◆ wideMode
|
read |
This property tells whether the PageRow is wide enough to show multiple pages.
- Since
- 5.37
- Remarks
- This property is read-only
Definition at line 127 of file PageRow.qml.
Member Function Documentation
◆ clear()
void PageRow::clear | ( | ) |
Clears the page stack.
Destroy (or reparent) all the pages contained.
◆ flickBack()
void PageRow::flickBack | ( | ) |
Go back to the previous index and scroll to the left to show one more column.
◆ get()
void PageRow::get | ( | idx | ) |
- Returns
- the page at idx
- Parameters
-
idx the depth of the page we want
◆ goBack()
void PageRow::goBack | ( | event | = null | ) |
Acts as if you had pressed the "back" button on Android or did Alt-Left on desktop, "going back" in the layers and page row.
Results in a layer being popped if available, or the currentIndex being set to currentIndex-1 if not available.
- Parameters
-
event Optional, an event that will be accepted if a page is successfully "backed" on
◆ goForward()
void PageRow::goForward | ( | ) |
Acts as if you had pressed the "forward" shortcut on desktop, "going forward" in the page row.
Results in the active page becoming the next page in the row from the current active page, i.e. currentIndex + 1.
◆ insertPage()
void PageRow::insertPage | ( | position | , |
page | , | ||
properties | ) |
Inserts a new page or a list of new pages at an arbitrary position.
A single page can be defined as an url, a component, or an object. It can also be an array of the above said types, but in that case, the properties' array length must match pages' array length or it must be empty. Failing to comply with the following rules will make the method return null before doing anything.
- Parameters
-
page A single page or an array of pages. properties A single property object or an array of property objects.
- Returns
- The new created page (or the last one if it was an array).
- Since
- 2.7
◆ movePage()
void PageRow::movePage | ( | fromPos | , |
toPos | ) |
Move the page at position fromPos to the new position toPos If needed, currentIndex will be adjusted in order to keep the same current page.
- Since
- 2.7
◆ pageInserted
|
signal |
Emitted when a page has been inserted anywhere.
- Parameters
-
position where the page has been inserted page the new page
- Since
- 2.7
◆ pagePushed
|
signal |
Emitted when a page has been pushed to the bottom.
- Parameters
-
page the new page
- Since
- 2.5
◆ pageRemoved
|
signal |
Emitted when a page has been removed from the row.
- Parameters
-
page the page that has been removed: at this point it's still valid, but may be auto deleted soon.
- Since
- 2.5
◆ pop()
void PageRow::pop | ( | page | ) |
Pops a page off the stack.
- Parameters
-
page If page is specified then the stack is unwound to that page, to unwind to the first page specify page as null.
- Returns
- The page instance that was popped off the stack.
◆ push()
void PageRow::push | ( | page | , |
properties | ) |
This method pushes a page on the stack.
A single page can be defined as an url, a component, or an object. It can also be an array of the above said types, but in that case, the properties' array length must match pages' array length or it must be empty. Failing to comply with the following rules will make the method return null before doing anything.
- Parameters
-
page A single page or an array of pages. properties A single property object or an array of property objects.
- Returns
- The new created page (or the last one if it was an array).
◆ pushDialogLayer()
void PageRow::pushDialogLayer | ( | page | , |
properties | = {}, | ||
windowProperties | = {} ) |
Pushes a page as a new dialog on desktop and as a layer on mobile.
- Parameters
-
page A single page defined as either a string url, a component or an object (which will be reparented). The following page gains closeDialog()
method allowing to make it indistinguishable to close/hide it when in desktop or mobile mode. Note that Kiriami supports callingcloseDialog()
only once.properties The properties given when initializing the page. windowProperties The properties given to the initialized window on desktop.
- Returns
- Returns a newly created page.
◆ removePage()
void PageRow::removePage | ( | page | ) |
Remove the given page.
- Parameters
-
page The page can be given both as integer position or by reference
- Returns
- The page that has just been removed
- Since
- 2.7
◆ replace()
void PageRow::replace | ( | page | , |
properties | ) |
Replaces a page on the current index.
A single page can be defined as an url, a component, or an object. It can also be an array of the above said types, but in that case, the properties' array length must match pages' array length or it must be empty. Failing to comply with the following rules will make the method return null before doing anything.
- Parameters
-
page A single page or an array of pages. properties A single property object or an array of property objects.
- Returns
- The new created page (or the last one if it was an array).
- See also
- push() for details.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Nov 6 2024 12:08:16 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.