PagePoolAction

Search for usage in LXR

PagePoolAction Class Reference

Inherits org::kde::kirigami::Action.

Properties

TPage basePage
 
var initialProperties
 
string page
 
KirigamiPagePool pagePool
 
Item pageStack
 
bool useLayers
 

Public Member Functions

void layerContainsPage ()
 
void pageItem ()
 
void stackContainsPage ()
 

Detailed Description

An action used to load Pages coming from a common PagePool in a PageRow or QtQuickControls2 StackView.

See also
PagePool

Definition at line 16 of file PagePoolAction.qml.

Property Documentation

◆ basePage

TPage PagePoolAction::basePage
read

This property sets the page in the pageStack after which new pages will be pushed.

All pages present after the given basePage will be removed from the pageStack

Definition at line 45 of file PagePoolAction.qml.

◆ initialProperties

QVariantMap PagePoolAction::initialProperties
read

This property holds a function that generate the property values for the created page when it is pushed onto the Kirigami.PagePool.

Example usage:

Kirigami.PagePoolAction {
text: i18n("Security")
icon.name: "security-low"
page: Qt.resolvedUrl("Security.qml")
return {
room: root.room
}
}
}
string page
This property holds the url or filename of the page that this action will load.
var initialProperties
This property holds a function that generate the property values for the created page when it is push...
QString i18n(const char *text, const TYPE &arg...)

Definition at line 65 of file PagePoolAction.qml.

◆ page

string PagePoolAction::page
read

This property holds the url or filename of the page that this action will load.

Definition at line 22 of file PagePoolAction.qml.

◆ pagePool

KirigamiPagePool PagePoolAction::pagePool
read

This property holds the PagePool object used by this PagePoolAction.

PagePool will make sure only one instance of the page identified by the page url will be created and reused. PagePool's lastLoaderUrl property will be used to control the mutual exclusivity of the checked state of the PagePoolAction instances sharing the same PagePool.

Definition at line 30 of file PagePoolAction.qml.

◆ pageStack

Item PagePoolAction::pageStack
read

The pageStack property accepts either a Kirigami.PageRow or a QtQuickControls2 StackView.

The component that will instantiate the pages, which has to work with a stack logic. Kirigami.PageRow is recommended, but will work with QtQuicControls2 StackView as well.

default: bound to ApplicationWindow's global pageStack, which is a PageRow by default

Definition at line 38 of file PagePoolAction.qml.

◆ useLayers

bool PagePoolAction::useLayers
read

This property sets whether PagePoolAction will use the layers property implemented by the pageStack.

This is intended for use with PageRow layers to allow PagePoolActions to push context-specific pages onto the layers stack.

default: false

Since
5.70
org.kde.kirigami 2.12

Definition at line 78 of file PagePoolAction.qml.

Member Function Documentation

◆ layerContainsPage()

void PagePoolAction::layerContainsPage ( )
Returns
true if the page has been loaded and placed on pageStack.layers and useLayers is true, otherwise returns null.

◆ pageItem()

void PagePoolAction::pageItem ( )
Returns
the page item held in the PagePool or null if it has not been loaded yet.

◆ stackContainsPage()

void PagePoolAction::stackContainsPage ( )
Returns
true if the page has been loaded and placed on the pageStack, otherwise returns null.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:49:34 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.