org::kde::kirigami::Page

Search for usage in LXR

org::kde::kirigami::Page Class Reference
Inheritance diagram for org::kde::kirigami::Page:

Properties

alias actions
 
alias contextualActions
 
Flickable flickable
 
Item globalToolBarItem
 
int globalToolBarStyle
 
ActionIconGroup icon
 
bool isCurrentPage
 
alias leftAction
 
alias mainAction
 
bool needsAttention
 
alias overlay
 
var progress
 
alias rightAction
 
Component titleDelegate
 

Signals

void backRequested (var event)
 
void contextualActionsAboutToShow ()
 

Detailed Description

Page is a container for all the app pages: everything pushed to the ApplicationWindow's pageStack should be a Page.

For content that should be scrollable, such as ListViews, use ScrollablePage instead.

See also
ScrollablePage

Definition at line 21 of file Page.qml.

Property Documentation

alias org::kde::kirigami::Page::actions

Actions properties are grouped.

import org.kde.kirigami 2.4 as Kirigami
Kirigami.Page {
main: Kirigami.Action {...}
left: Kirigami.Action {...}
right: Kirigami.Action {...}
Kirigami.Action {...},
Kirigami.Action {...}
]
}
}
Remarks
This property is read-only

Definition at line 160 of file Page.qml.

alias org::kde::kirigami::Page::contextualActions

actions.contextualActions: list<QtObject> Defines the contextual actions for the page: an easy way to assign actions in the right sliding panel

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.ApplicationWindow {
[...]
contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer
}
[...]
}
import org.kde.kirigami 2.4 as Kirigami
Kirigami.Page {
[...]
actions.contextualActions: [
Kirigami.Action {
icon.name: "edit"
text: "Action text"
onTriggered: {
// do stuff
}
},
Kirigami.Action {
icon.name: "edit"
text: "Action text"
onTriggered: {
// do stuff
}
}
]
[...]
}

Definition at line 77 of file Page.qml.

Flickable org::kde::kirigami::Page::flickable

flickable: Flickable if the central element of the page is a Flickable (ListView and Gridview as well) you can set it there.

normally, you wouldn't need to do that, but just use the ScrollablePage element instead

See also
ScrollablePage Use this if your flickable has some non standard properties, such as not covering the whole Page

Definition at line 32 of file Page.qml.

Item org::kde::kirigami::Page::globalToolBarItem

globalToolBarItem: Item The item used as global toolbar for the page present only if we are in a PageRow as a page or as a layer, and the style is either Titles or ToolBar

Since
2.5
Remarks
This property is read-only

Definition at line 232 of file Page.qml.

int org::kde::kirigami::Page::globalToolBarStyle

The style for the automatically generated global toolbar: by default the Page toolbar is the one set globally in the PageRow in its globalToolBar.style property.

A single page can override the application toolbar style for itself. It is discouraged to use this, except very specific exceptions, like a chat application which can't have controls on the bottom except the text field. If the Page is not in a PageRow, by default the toolbar will be invisible, so has to be explicitly set to Kirigami.ApplicationHeaderStyle.ToolBar if desired to be used in that case.

Definition at line 242 of file Page.qml.

ActionIconGroup org::kde::kirigami::Page::icon

icon: variant

The icon that represents this page.

Definition at line 194 of file Page.qml.

bool org::kde::kirigami::Page::isCurrentPage

isCurrentPage: bool

Specifies if it's the currently selected page in the window's pages row, or if layers are used whether this is the topmost item on the layers stack. If the page is not attached to either a column view or a stack view, expect this to be true.

Since
2.1
Remarks
This property is read-only

Definition at line 178 of file Page.qml.

alias org::kde::kirigami::Page::leftAction

actions.left: Action An optional extra action at the left of the main action button.

it can be a Kirigami.Action or a QAction

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.Page {
actions.left: Kirigami.Action {
icon.name: "edit"
onTriggered: {
// do stuff
}
}
}

Definition at line 119 of file Page.qml.

alias org::kde::kirigami::Page::mainAction

actions.main: Action An optional single action for the action button.

it can be a Kirigami.Action or a QAction

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.Page {
actions.main: Kirigami.Action {
icon.name: "edit"
onTriggered: {
// do stuff
}
}
}

Definition at line 98 of file Page.qml.

bool org::kde::kirigami::Page::needsAttention

needsAttention: bool

Whether this page needs user attention.

Definition at line 200 of file Page.qml.

alias org::kde::kirigami::Page::overlay

overlay: Item an item which stays on top of every other item in the page, if you want to make sure some elements are completely in a layer on top of the whole content, parent items to this one.

It's a "local" version of ApplicationWindow's overlay

Since
2.5
Remarks
This property is read-only

Definition at line 188 of file Page.qml.

var org::kde::kirigami::Page::progress

progress: real

Progress of a task this page is doing. Set to undefined to indicate that there are no ongoing tasks.

Definition at line 207 of file Page.qml.

alias org::kde::kirigami::Page::rightAction

actions.right: Action An optional extra action at the right of the main action button.

it can be a Kirigami.Action or a QAction

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.Page {
actions.right: Kirigami.Action {
icon.name: "edit"
onTriggered: {
// do stuff
}
}
}

Definition at line 140 of file Page.qml.

Component org::kde::kirigami::Page::titleDelegate

titleDelegate: Component The delegate which will be used to draw the page title.

It can be customized to put any kind of Item in there.

Since
2.7

Definition at line 213 of file Page.qml.

Member Function Documentation

void org::kde::kirigami::Page::backRequested ( var  event)
signal

emitted When the application requests a Back action For instance a global "back" shortcut or the Android Back button has been pressed.

The page can manage the back event by itself, and if it set event.accepted = true, it will stop the main application to manage the back event.

void org::kde::kirigami::Page::contextualActionsAboutToShow ( )
signal

contextualActionsAboutToShow: signal Emitted when a visualization for the actions is about to be shown, such as the toolbar menu or the contextDrawer

Since
2.7

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat May 15 2021 22:38:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.