• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. Kirigami
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Kirigami"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Related Pages

Class Picker

About

QtQuick plugins to build user interfaces based on the KDE UX guidelines

Maintainer
Marco Martin
Supported platforms
Android, Linux
Community
IRC: #plasma on Freenode
Mailing list: plasma-devel
Use with CMake
find_package(KF5Kirigami)
target_link_libraries(yourapp KF5::Kirigami)
Clone
git clone git://anongit.kde.org/kirigami1.git
Browse source
Kirigami on cgit.kde.org

Kirigami

  • View on LXR
  • org
  • kde
  • kirigami
  • AbstractApplicationWindow
Properties | Public Member Functions | List of all members
org::kde::kirigami::AbstractApplicationWindow Class Reference
Inheritance diagram for org::kde::kirigami::AbstractApplicationWindow:
Inheritance graph
[legend]

Properties

AbstractDrawer contextDrawer
 
bool controlsVisible
 
AbstractDrawer globalDrawer
 
var header
 
Item pageStack
 
bool reachableMode
 
bool wideScreen
 

Public Member Functions

void applicationWindow ()
 
void hidePassiveNotification ()
 
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 recomended by the HIG and provided by ApplicationWindow.

It is recomended 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

Example usage:

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

Definition at line 78 of file AbstractApplicationWindow.qml.

Property Documentation

AbstractDrawer org::kde::kirigami::AbstractApplicationWindow::contextDrawer

contextDrawer: AbstractDrawer The drawer for context-dependednt actions, that will be opened by sliding from the right screen edge or by dragging the ActionButton to the left.

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 1.0 as Kirigami
Kirigami.ApplicationWindow {
[...]
contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer
}
[...]
}
import org.kde.kirigami 1.0 as Kirigami
Kirigami.Page {
[...]
contextualActions: [
Kirigami.Action {
iconName: "edit"
text: "Action text"
onTriggered: {
// do stuff
}
},
Kirigami.Action {
iconName: "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 192 of file AbstractApplicationWindow.qml.

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

controlsVisible: bool This property controls wether the standard chrome of the app, such as the Action button, the drawer handles and the application header should be visible or not.

Definition at line 129 of file AbstractApplicationWindow.qml.

AbstractDrawer org::kde::kirigami::AbstractApplicationWindow::globalDrawer

globalDrawer: AbstractDrawer The drawer for global actions, that will be opened by sliding from the left screen edge or by dragging the ActionButton to the right.

It is recommended to use the GlobalDrawer class here

Definition at line 136 of file AbstractApplicationWindow.qml.

var org::kde::kirigami::AbstractApplicationWindow::header

header: ApplicationHeader An item that can be used as a title for the application.

Scrolling the main page will make it taller or shorter (trough the point of going away) It's a behavior similar to the typical mobile web browser adressbar the minimum, preferred and maximum heights of the item can be controlled with

  • Layout.minimumHeight: default is 0, i.e. hidden
  • Layout.preferredHeight: default is Units.gridUnit * 1.6
  • Layout.maximumHeight: default is Units.gridUnit * 3

To achieve a titlebar that stays completely fixed just set the 3 sizes as the same //FIXME: this should become an actual ApplicationHeader

Definition at line 122 of file AbstractApplicationWindow.qml.

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

pageStack: StackView Readonly.

The stack used to allocate the pages and to manage the transitions between them. Put a container here, such as QQuickControls PageStack

Definition at line 87 of file AbstractApplicationWindow.qml.

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

reachableMode: bool When true 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, tis property has no effect.

Definition at line 200 of file AbstractApplicationWindow.qml.

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

wideScreen: bool If true the application is considered to be in "widescreen" mode, such as on desktops or horizontal tablets.

Different styles can have an own logic for deciding this

Definition at line 142 of file AbstractApplicationWindow.qml.

Member Function Documentation

void org::kde::kirigami::AbstractApplicationWindow::applicationWindow ( )
Returns
a pointer to this application window can be used anywhere in the application.
void org::kde::kirigami::AbstractApplicationWindow::hidePassiveNotification ( )

Hide the passive notification, if any is shown.

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

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:
  • AbstractApplicationWindow.qml
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Fri Feb 17 2017 11:09:23 by doxygen 1.8.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal