org::kde::kirigami::ContextDrawer

Search for usage in LXR

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

Properties

var actions
 
alias footer
 
alias header
 
Page page
 
string title
 
- Properties inherited from org::kde::kirigami::templates::OverlayDrawer
QtObject __internal
 
bool animating
 
bool collapsed
 
int collapsedSize
 
bool collapsible
 
bool drawerOpen
 
Item handle
 
string handleClosedToolTip
 
string handleOpenToolTip
 
bool handleVisible
 
IconPropertiesGroup
 
bool peeking
 

Detailed Description

A specialized type of drawer that will show a list of actions relevant to the application's current page.

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
}
}
]
[...]
}
See also
Human Interface Guidelines on Context Drawers
KDE Human Interface Guidelines' Short Introduction of Context Drawers

Definition at line 55 of file ContextDrawer.qml.

Property Documentation

◆ actions

list< Action > org::kde::kirigami::ContextDrawer::actions
read

This can be any type of object that a ListView can accept as model.

It expects items compatible with either QtQuick.Controls.Action or Kirigami.Action.

See also
QtQuick.Controls.Action
kirigami::Action

Definition at line 74 of file ContextDrawer.qml.

◆ footer

Component org::kde::kirigami::ContextDrawer::footer
read

Arbitrary content to show below the list view.

Since
org.kde.kirigami 2.7

Definition at line 90 of file ContextDrawer.qml.

◆ header

Component org::kde::kirigami::ContextDrawer::header
read

Arbitrary content to show above the list view.

default: an Item containing a Kirigami.Heading that displays a title whose text is controlled by the title property.

Since
org.kde.kirigami 2.7

Definition at line 84 of file ContextDrawer.qml.

◆ title

string org::kde::kirigami::ContextDrawer::title
read

A title for the action list that will be shown to the user when opens the drawer.

default: qsTr("Actions")

Definition at line 64 of file ContextDrawer.qml.


The documentation for this class was generated from the following file:
var actions
This can be any type of object that a ListView can accept as model.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:05:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.