org::kde::kirigami::templates::OverlayDrawer

Search for usage in LXR

org::kde::kirigami::templates::OverlayDrawer Class Reference
Inheritance diagram for org::kde::kirigami::templates::OverlayDrawer:

Properties

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

Overlay drawers are used to expose additional UI elements needed for small secondary tasks for which the main UI elements are not needed.

Since
2.2

Overlay drawers can be used to create two kinds of components, a modal drawer and an inline drawer. A modal drawer darkens the rest of the application and grabs focus until confirmed, whereas an inline drawer does not.

Unlike an OverlaySheet that appears in the center of the application, an OverlayDrawer can be attached to an edge of the application, usually the top or the bottom edges.

See also
Visit https://develop.kde.org/docs/getting-started/kirigami/components-drawers to read more about modal and non-modal drawers.

Example usage:

import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kirigami 2.20 as Kirigami
Kirigami.ApplicationWindow {
Kirigami.OverlayDrawer {
id: drawer
edge: Qt.BottomEdge
contentItem: RowLayout {
QQC2.Button {
text: "Close"
onClicked: drawer.close()
}
}
}
pageStack.initialPage: Kirigami.Page {
RowLayout {
QQC2.Button {
text: "Open drawer"
onClicked: {
drawer.modal = isModal.checked
drawer.open()
}
}
QQC2.CheckBox {
id: isModal
text: "Drawer is modal?"
}
}
}
}

Definition at line 31 of file templates/OverlayDrawer.qml.

Property Documentation

◆ __internal

QtObject org::kde::kirigami::templates::OverlayDrawer::__internal
read

Definition at line 188 of file templates/OverlayDrawer.qml.

◆ animating

bool org::kde::kirigami::templates::OverlayDrawer::animating
read

This property specifies whether the drawer is currently opening or closing itself.

Remarks
This property is read-only

Definition at line 56 of file templates/OverlayDrawer.qml.

◆ collapsed

bool org::kde::kirigami::templates::OverlayDrawer::collapsed
read

This property specifies whether the drawer is collapsed to a very thin sidebar, usually icon only.

When true, the drawer will be collapsed to a very thin sidebar, usually icon only.

default: false

See also
collapsible

Definition at line 78 of file templates/OverlayDrawer.qml.

◆ collapsedSize

int org::kde::kirigami::templates::OverlayDrawer::collapsedSize
read

This property holds the size of the collapsed drawer.

For vertical drawers this will be the width of the drawer and for horizontal drawers this will be the height of the drawer.

default: Kirigami.Units.iconSizes.medium , just enough to accommodate medium sized icons

Definition at line 88 of file templates/OverlayDrawer.qml.

◆ collapsible

bool org::kde::kirigami::templates::OverlayDrawer::collapsible
read

This property holds whether the drawer can be collapsed to a very thin, usually icon only sidebar.

Only modal drawers are collapsible. Collapsible is not supported in the mobile mode.

Since
org.kde.kirigami 2.5

Definition at line 66 of file templates/OverlayDrawer.qml.

◆ drawerOpen

bool org::kde::kirigami::templates::OverlayDrawer::drawerOpen
read

This property specifies whether the drawer is open and visible.

default: false

Definition at line 40 of file templates/OverlayDrawer.qml.

◆ handle

MouseArea org::kde::kirigami::templates::OverlayDrawer::handle
read

Readonly property that points to the item that will act as a physical handle for the drawer.

Remarks
This property is read-only

Definition at line 147 of file templates/OverlayDrawer.qml.

◆ handleClosedToolTip

string org::kde::kirigami::templates::OverlayDrawer::handleClosedToolTip
read

This property holds the tooltip displayed when the drawer is closed.

Since
org.kde.kirigami 2.15

Definition at line 133 of file templates/OverlayDrawer.qml.

◆ handleOpenToolTip

string org::kde::kirigami::templates::OverlayDrawer::handleOpenToolTip
read

This property holds the tooltip displayed when the drawer is open.

Since
org.kde.kirigami 2.15

Definition at line 128 of file templates/OverlayDrawer.qml.

◆ handleVisible

bool org::kde::kirigami::templates::OverlayDrawer::handleVisible
read

This property holds whether the handle is visible, to make opening the drawer easier.

Currently supported only on left and right drawers.

Definition at line 140 of file templates/OverlayDrawer.qml.

◆ IconPropertiesGroup

P org::kde::kirigami::templates::OverlayDrawer::IconPropertiesGroup
read

This property holds the options for handle's open icon.

This property holds the options for the handle's close icon.

This grouped property has the following sub-properties:

  • source: var: A Freedesktop standard icon name. The icon is pulled from system's icon theme.
  • color: color: An optional tint color for the icon.

If no custom icon is set, a menu icon is shown for the globalDrawer and an overflow menu icon is shown for the contextDrawer . That's the default for the GlobalDrawer and ContextDrawer components respectively.

For OverlayDrawer the default is view-right-close or view-left-close depending on the drawer location.

Since
org.kde.kirigami 2.5
Remarks
This property is read-only

This grouped property has the following sub-properties:

  • source: var: A Freedesktop standard icon name. The icon is pulled from system's icon theme.
  • color: color: An optional tint color for the icon.

If no custom icon is set, an X icon is shown, which will morph into the Menu or overflow icons.

For OverlayDrawer the default is view-right-new or view-left-new depending on the drawer location.

Since
org.kde.kirigami 2.5

Definition at line 107 of file templates/OverlayDrawer.qml.

◆ peeking

bool org::kde::kirigami::templates::OverlayDrawer::peeking
read

This property specifies whether the drawer is in a state between open and closed.

The drawer is visible but not completely open. This is usually the case when the user is dragging the drawer from a screen edge, so the user is "peeking" at what's in the drawer.

default: false

Definition at line 51 of file templates/OverlayDrawer.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Nov 28 2023 04:08:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.