org::kde::kirigami::AbstractApplicationWindow

Search for usage in LXR

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

Properties

OverlayDrawer contextDrawer
 
bool controlsVisible
 
OverlayDrawer globalDrawer
 
Item pageStack
 
Action quitAction
 
bool reachableMode
 
bool reachableModeEnabled
 
bool wideScreen
 

Public Member Functions

void applicationWindow ()
 
void hidePassiveNotification (index=0)
 
void showPassiveNotification (message, timeout, actionText, callBack)
 

Detailed Description

A window that provides some basic features needed for all apps Use this class only if you need a custom content for your application, different from the Page Row behavior recommended by the HIG and provided by ApplicationWindow.

It is recommended to use ApplicationWindow instead

See also
ApplicationWindow

It's usually used as a root QML component for the application. It provides support for a central page stack, side drawers and a top ApplicationHeader, as well as basic support for the Android back button

Setting a width and height property on the ApplicationWindow will set its initial size, but it won't set it as an automatically binding. to resize programmatically the ApplicationWindow they need to be assigned again in an imperative fashion

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.ApplicationWindow {
[...]
globalDrawer: Kirigami.GlobalDrawer {
actions: [
Kirigami.Action {
text: "View"
icon.name: "view-list-icons"
Kirigami.Action {
text: "action 1"
}
Kirigami.Action {
text: "action 2"
}
Kirigami.Action {
text: "action 3"
}
},
Kirigami.Action {
text: "Sync"
icon.name: "folder-sync"
}
]
}
contextDrawer: Kirigami.ContextDrawer {
}
pageStack: PageStack {
...
}
[...]
}

Definition at line 72 of file AbstractApplicationWindow.qml.

Property Documentation

◆ contextDrawer

org::kde::kirigami::ContextDrawer org::kde::kirigami::AbstractApplicationWindow::contextDrawer
read

This property holds the drawer for context-dependent actions.

The drawer that will be opened by sliding from the right screen edge or by dragging the ActionButton to the left.

Note
It is recommended to use the ContextDrawer class here.

The contents of the context drawer should depend from what page is loaded in the main pageStack

Example usage:

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

When this page will be the current one, the context drawer will visualize contextualActions defined as property in that page.

Definition at line 161 of file AbstractApplicationWindow.qml.

◆ controlsVisible

bool org::kde::kirigami::AbstractApplicationWindow::controlsVisible
read

This property sets whether the standard chrome of the app is visible.

These are the action button, the drawer handles, and the application header.

default: true

Definition at line 89 of file AbstractApplicationWindow.qml.

◆ globalDrawer

org::kde::kirigami::OverlayDrawer org::kde::kirigami::AbstractApplicationWindow::globalDrawer
read

This property holds the drawer for global actions.

This drawer can be opened by sliding from the left screen edge or by dragging the ActionButton to the right.

Note
It is recommended to use the GlobalDrawer here.

Definition at line 99 of file AbstractApplicationWindow.qml.

◆ pageStack

Item org::kde::kirigami::AbstractApplicationWindow::pageStack
read

This property holds the stack used to allocate the pages and to manage the transitions between them.

Put a container here, such as QtQuick.Controls.StackView.

Definition at line 81 of file AbstractApplicationWindow.qml.

◆ quitAction

Action org::kde::kirigami::AbstractApplicationWindow::quitAction
read

This property holds a standard action that will quit the application when triggered.

Its properties have the following values:

text: "Quit"
icon.name: "application-exit-symbolic";
shortcut: StandardKey.Quit
[...]
Since
5.76
Remarks
This property is read-only

Definition at line 190 of file AbstractApplicationWindow.qml.

◆ reachableMode

bool org::kde::kirigami::AbstractApplicationWindow::reachableMode
read

This property tells whether the application is in reachable mode for single hand use.

The whole content of the application is moved down the screen to be reachable with the thumb. If wideScreen is true, or reachableModeEnabled is false, this property has no effect.

default: false

Definition at line 171 of file AbstractApplicationWindow.qml.

◆ reachableModeEnabled

bool org::kde::kirigami::AbstractApplicationWindow::reachableModeEnabled
read

This property sets whether the application will go into reachable mode on pull down.

Definition at line 175 of file AbstractApplicationWindow.qml.

◆ wideScreen

bool org::kde::kirigami::AbstractApplicationWindow::wideScreen
read

This property tells whether the application is in "widescreen" mode.

This is enabled on desktops or horizontal tablets.

Note
Different styles can have their own logic for deciding this.

Definition at line 107 of file AbstractApplicationWindow.qml.

Member Function Documentation

◆ applicationWindow()

void org::kde::kirigami::AbstractApplicationWindow::applicationWindow ( )

This function returns application window's object anywhere in the application.

Returns
a pointer to this application window can be used anywhere in the application.

◆ hidePassiveNotification()

void org::kde::kirigami::AbstractApplicationWindow::hidePassiveNotification ( index  = 0)

This function hides the passive notification at specified index, if any is shown.

Parameters
indexIndex of the notification to hide. Default is 0 (oldest notification).

◆ showPassiveNotification()

void org::kde::kirigami::AbstractApplicationWindow::showPassiveNotification ( message  ,
timeout  ,
actionText  ,
callBack   
)

This function shows a little passive notification at the bottom of the app window lasting for few seconds, with an optional action button.

Parameters
messageThe text message to be shown to the user.
timeoutHow long to show the message: possible values: "short", "long" or the number of milliseconds
actionTextText in the action button, if any.
callBackA JavaScript function that will be executed when the user clicks the button.

The documentation for this class was generated from the following file:
const QList< QKeySequence > & shortcut(StandardShortcut id)
OverlayDrawer contextDrawer
This property holds the drawer for context-dependent actions.
Item pageStack
This property holds the stack used to allocate the pages and to manage the transitions between them.
OverlayDrawer globalDrawer
This property holds the drawer for global actions.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Jan 27 2023 07:54:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.