• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. The KDE Frameworks
  3. Kirigami2
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Kirigami2"
  • 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 human interface guidelines

Maintainer
Marco Martin
Supported platforms
Android, FreeBSD, iOS, Linux, MacOSX, Windows
Community
IRC: #kde-kirigami on Freenode
Mailing list: plasma-devel
Use with CMake
find_package(KF5Kirigami2)
target_link_libraries(yourapp KF5::Kirigami2)
Clone
git clone git://anongit.kde.org/kirigami.git
Browse source
Kirigami2 on cgit.kde.org

Kirigami2

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

Properties

alias __data
 
Item activeFocusItem
 
Item contentItem
 
OverlayDrawer contextDrawer
 
bool controlsVisible
 
Item footer
 
OverlayDrawer globalDrawer
 
Item header
 
alias overlay
 
Item pageStack
 
bool reachableMode
 
bool reachableModeEnabled
 
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 recommended by the HIG and provided by ApplicationItem.

It is recommended to use ApplicationItem instead

See also
ApplicationItem

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 2.4 as Kirigami
Kirigami.ApplicationItem {
[...]
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 79 of file AbstractApplicationItem.qml.

Property Documentation

alias org::kde::kirigami::AbstractApplicationItem::__data

contentItem: Item This property holds the Item of the main part of the Application UI

Remarks
This is the default property

Definition at line 222 of file AbstractApplicationItem.qml.

Item org::kde::kirigami::AbstractApplicationItem::activeFocusItem

copatibility with Applicationwindow

Remarks
This property is read-only

Definition at line 95 of file AbstractApplicationItem.qml.

Item org::kde::kirigami::AbstractApplicationItem::contentItem
Remarks
This property is read-only

Definition at line 225 of file AbstractApplicationItem.qml.

OverlayDrawer org::kde::kirigami::AbstractApplicationItem::contextDrawer

contextDrawer: OverlayDrawer The drawer for context-dependent 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 2.4 as Kirigami
Kirigami.ApplicationItem {
[...]
contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer
}
[...]
}
import org.kde.kirigami 2.4 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 204 of file AbstractApplicationItem.qml.

bool org::kde::kirigami::AbstractApplicationItem::controlsVisible

controlsVisible: bool This property controls whether 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 141 of file AbstractApplicationItem.qml.

Item org::kde::kirigami::AbstractApplicationItem::footer

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

Definition at line 134 of file AbstractApplicationItem.qml.

OverlayDrawer org::kde::kirigami::AbstractApplicationItem::globalDrawer

globalDrawer: OverlayDrawer 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 148 of file AbstractApplicationItem.qml.

Item org::kde::kirigami::AbstractApplicationItem::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 addressbar 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

Definition at line 129 of file AbstractApplicationItem.qml.

Item org::kde::kirigami::AbstractApplicationItem::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 88 of file AbstractApplicationItem.qml.

bool org::kde::kirigami::AbstractApplicationItem::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, or reachableModeEnabled is false, tis property has no effect.

Definition at line 212 of file AbstractApplicationItem.qml.

bool org::kde::kirigami::AbstractApplicationItem::reachableModeEnabled

When true the application will go into reachable mode on pull down.

Definition at line 216 of file AbstractApplicationItem.qml.

bool org::kde::kirigami::AbstractApplicationItem::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 154 of file AbstractApplicationItem.qml.

Member Function Documentation

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

Hide the passive notification, if any is shown.

void org::kde::kirigami::AbstractApplicationItem::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:
  • AbstractApplicationItem.qml
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Thu Dec 5 2019 03:54:03 by doxygen 1.8.11 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