org::kde::kirigami::PageRow

Properties | |
alias | columnView |
alias | currentIndex |
alias | currentItem |
int | defaultColumnWidth |
alias | depth |
alias | firstVisibleItem |
alias | globalToolBar |
variant | initialPage |
alias | interactive |
alias | items |
Item | lastItem |
alias | lastVisibleItem |
alias | layers |
OverlayDrawer | leftSidebar |
bool | popHiddenPages |
alias | separatorVisible |
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.
Items 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 multple pages at the same time, 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 can be visible at the same time.
Example usage:
- See also
- kirigami::ColumnViewAttached
Definition at line 27 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
- org.kde.kirigami 2.12
Definition at line 74 of file PageRow.qml.
◆ currentIndex
|
read |
This property holds the index of the currently active page.
- See also
- ::currentItem
Definition at line 51 of file PageRow.qml.
◆ currentItem
|
read |
This property points to the currently active page.
Definition at line 45 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 111 of file PageRow.qml.
◆ depth
|
read |
This property holds the number of items currently pushed onto the view.
Definition at line 34 of file PageRow.qml.
◆ firstVisibleItem
|
read |
This property holds the first page in the PageRow that is at least partially visible.
- Note
- Pages before that one (the one contained in the property) will be out of the viewport.
- See also
- kirigami::ColumnView::firstVisibleItem
- Since
- org.kde.kirigami 2.6
Definition at line 95 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
This grouped property has the following sub-properties:
style: ApplicationHeaderStyle::Status
: how the top bar controls should be represented to the user.actualStyle
: this property holds the currently used style. It can be different whenstyle
is set toApplicationHeaderStyle.Auto
showNavigationButtons: ApplicationHeaderStyle::NavigationButton
: a combination of flags that determines whether to show the back and forward button.toolbarActionAlignment: Qt::Alignment
: how to horizontally align the actions when using theApplicationHeaderStyle.ToolBar
style. Note that anything butQt.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.maximumHeight: int
The height the toolbar will have in mobile mode when the app is in reachable mode (default: preferredHeight * 1.5).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
- KDE Frameworks 5.48
Definition at line 156 of file PageRow.qml.
◆ initialPage
|
read |
This property sets the initial page/s for this PageRow.
- Note
- This can optionally be set to an array of pages by using the JavaScript array notation [].
Definition at line 57 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 120 of file PageRow.qml.
◆ items
|
read |
This property holds a list of all pages in the PageRow.
- Since
- org.kde.kirigami 2.6
Definition at line 80 of file PageRow.qml.
◆ lastItem
|
read |
This property holds the last page in the row.
- Remarks
- This property is read-only
Definition at line 40 of file PageRow.qml.
◆ lastVisibleItem
|
read |
This property holds the last page in the PageRow that is at least partially visible.
- Note
- Pages after that one (the one contained in the property) will be out of the viewport.
- See also
- kirigami::ColumnView::lastVisibleItem
- Since
- org.kde.kirigami 2.6
Definition at line 103 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
- KDE Frameworks 5.38
Definition at line 176 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
- KDE Frameworks 5.84
Definition at line 166 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
- KDE Frameworks 5.101
Definition at line 185 of file PageRow.qml.
◆ separatorVisible
|
read |
This property sets whether the separators between pages should be displayed.
default: true
- Since
- KDE Frameworks 5.38
Definition at line 135 of file PageRow.qml.
◆ visibleItems
|
read |
This property holds all visible pages in the PageRow, excluding those which are scrolled away.
- Since
- org.kde.kirigami 2.6
Definition at line 87 of file PageRow.qml.
◆ wideMode
|
read |
This property specifies whether the PageRow is wide enough to show multiple pages.
- Since
- KDE Frameworks 5.37
- Remarks
- This property is read-only
Definition at line 126 of file PageRow.qml.
Member Function Documentation
◆ clear()
void org::kde::kirigami::PageRow::clear | ( | ) |
Clears the page stack.
Destroy (or reparent) all the pages contained.
◆ flickBack()
void org::kde::kirigami::PageRow::flickBack | ( | ) |
Go back to the previous index and scroll to the left to show one more column.
◆ get()
void org::kde::kirigami::PageRow::get | ( | idx | ) |
- Returns
- the page at idx
- Parameters
-
idx the depth of the page we want
◆ goBack()
void org::kde::kirigami::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 org::kde::kirigami::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 org::kde::kirigami::PageRow::insertPage | ( | position | , |
page | , | ||
properties | |||
) |
Inserts a new page or a list of new pages at an arbitrary position.
The page can be defined as a component, item or string. If an item is used then the page will get re-parented. If a string is used then it is interpreted as a url that is used to load a page component. The current Page will not be changed, currentIndex will be adjusted accordingly if needed to keep the same current page.
- Parameters
-
page The page can also be given as an array of pages. In this case all those pages will be pushed onto the stack. The items in the stack can be components, items or strings just like for single pages. Additionally an object can be used, which specifies a page and an optional properties property. This can be used to push multiple pages while still giving each of them properties. When an array is used the transition animation will only be to the last page. properties The properties argument is optional and allows defining a map of properties to set on the page. If page is actually an array of pages, properties should also be an array of key/value maps
- Returns
- The new created page (or the last one if it was an array)
- Since
- org.kde.kirigami 2.7
◆ movePage()
void org::kde::kirigami::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
- org.kde.kirigami 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
- org.kde.kirigami 2.7
◆ pagePushed
|
signal |
Emitted when a page has been pushed to the bottom.
- Parameters
-
page the new page
- Since
- org.kde.kirigami 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
- org.kde.kirigami 2.5
◆ pop()
void org::kde::kirigami::PageRow::pop | ( | page | ) |
Pops a page off the stack and all the pages after it.
- 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 org::kde::kirigami::PageRow::push | ( | page | , |
properties | |||
) |
Pushes a page on the stack.
The page can be defined as a component, item or string. If an item is used then the page will get re-parented. If a string is used then it is interpreted as a url that is used to load a page component. The last pushed page will become the current item.
- Parameters
-
page The page can also be given as an array of pages. In this case all those pages will be pushed onto the stack. The items in the stack can be components, items or strings just like for single pages. Additionally an object can be used, which specifies a page and an optional properties property. This can be used to push multiple pages while still giving each of them properties. When an array is used the transition animation will only be to the last page. properties The properties argument is optional and allows defining a map of properties to set on the page. If page is actually an array of pages, properties should also be an array of key/value maps
- Returns
- The new created page (or the last one if it was an array)
◆ pushDialogLayer()
void org::kde::kirigami::PageRow::pushDialogLayer | ( | page | , |
properties | = {} , |
||
windowProperties | = {} |
||
) |
Pushes a page as a new dialog on desktop and as a layer on mobile.
- Parameters
-
page The page can be defined as a component, item or string. If an item is used then the page will get re-parented. If a string is used then it is interpreted as a url that is used to load a page component. Once pushed the page gains the methods closeDialog
allowing to close itself. Kirigami only supports callingcloseDialog
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 org::kde::kirigami::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
- org.kde.kirigami 2.7
◆ replace()
void org::kde::kirigami::PageRow::replace | ( | page | , |
properties | |||
) |
Replaces a page on the stack.
- Parameters
-
page The page can also be given as an array of pages. In this case all those pages will be pushed onto the stack. The items in the stack can be components, items or strings just like for single pages. the current page and all pagest after it in the stack will be removed. Additionally an object can be used, which specifies a page and an optional properties property. This can be used to push multiple pages while still giving each of them properties. When an array is used the transition animation will only be to the last page. properties The properties argument is optional and allows defining a map of properties to set on the page.
- See also
- ::push() for details.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:07:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.