org::kde::kirigami::GlobalDrawer

Search for usage in LXR

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

Properties

list< QtObject > actions
 
alias bannerImageSource
 
bool bannerVisible
 
bool collapseButtonVisible
 
alias content
 
Action currentSubMenu
 
Item header
 
bool isMenu
 
bool resetMenuOnTriggered
 
bool showContentWhenCollapsed
 
bool showHeaderWhenCollapsed
 
bool showTopContentWhenCollapsed
 
alias title
 
alias titleIcon
 
alias topContent
 
- Properties inherited from org::kde::kirigami::templates::OverlayDrawer
QtObject __internal
 
bool animating
 
bool collapsed
 
int collapsedSize
 
bool collapsible
 
bool drawerOpen
 
bool enabled
 
Item handle
 
IconPropertiesGroup handleClosedIcon
 
string handleClosedToolTip
 
IconPropertiesGroup handleOpenIcon
 
string handleOpenToolTip
 
bool handleVisible
 
bool peeking
 

Signals

void bannerClicked ()
 

Public Member Functions

void resetMenu ()
 

Detailed Description

A drawer specialization intended for the global actions of the application valid regardless of the application state (think about the menubar of a desktop application).

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.ApplicationWindow {
[...]
globalDrawer: Kirigami.GlobalDrawer {
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"
}
]
}
[...]
}

Definition at line 50 of file GlobalDrawer.qml.

Property Documentation

list< Action > org::kde::kirigami::GlobalDrawer::actions

The list of actions can be nested having a tree structure.

A tree depth bigger than 2 is discouraged.

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.ApplicationWindow {
[...]
globalDrawer: Kirigami.GlobalDrawer {
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"
}
]
}
[...]
}

Definition at line 106 of file GlobalDrawer.qml.

string org::kde::kirigami::GlobalDrawer::bannerImageSource

An image to be used as background for the title and icon for a decorative purpose.

It accepts any url format supported by Image

Definition at line 69 of file GlobalDrawer.qml.

bool org::kde::kirigami::GlobalDrawer::bannerVisible

if true the banner area, which can contain an image, an icon and a title will be visible.

By default the banner will be visible only on mobile platforms

Since
2.12

Definition at line 121 of file GlobalDrawer.qml.

bool org::kde::kirigami::GlobalDrawer::collapseButtonVisible

When the sidebar is collapsible, this controls the visibility of the collapse button.

Since
2.12

Definition at line 215 of file GlobalDrawer.qml.

list< Item > org::kde::kirigami::GlobalDrawer::content

Any random Item can be instantiated inside the drawer and will be displayed underneath the actions list.

Remarks
This is the default property

This is the default property.

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.ApplicationWindow {
[...]
globalDrawer: Kirigami.GlobalDrawer {
actions: [...]
Button {
text: "Button"
onClicked: //do stuff
}
}
[...]
}

Definition at line 147 of file GlobalDrawer.qml.

Action org::kde::kirigami::GlobalDrawer::currentSubMenu

Points to the action acting as a submenu.

Remarks
This property is read-only

Definition at line 200 of file GlobalDrawer.qml.

Item org::kde::kirigami::GlobalDrawer::header

an item that will stay on top of the drawer, and if the drawer contents can be scrolled, this item will stay still and won't scroll.

Intended mainly for toolbars

Since
2.12

Definition at line 114 of file GlobalDrawer.qml.

bool org::kde::kirigami::GlobalDrawer::isMenu

When true the global drawer becomes a menu on the desktop.

Defauls to false.

Since
2.11

Definition at line 205 of file GlobalDrawer.qml.

bool org::kde::kirigami::GlobalDrawer::resetMenuOnTriggered

On the actions menu, whenever a leaf action is triggered, the menu will reset to its parent.

Definition at line 195 of file GlobalDrawer.qml.

bool org::kde::kirigami::GlobalDrawer::showContentWhenCollapsed

If true, when the drawer is collapsed as a sidebar, the content items at the bottom will be hidden (default false).

If you want to keep some items visible and some invisible, set this to false and control the visibility/opacity of individual items, binded to the collapsed property

Since
2.5

Definition at line 179 of file GlobalDrawer.qml.

bool org::kde::kirigami::GlobalDrawer::showTopContentWhenCollapsed

If true, when the drawer is collapsed as a sidebar, the top content items at the top will be hidden (default false).

If you want to keep some items visible and some invisible, set this to false and control the visibility/opacity of individual items, binded to the collapsed property

Since
2.5

Definition at line 188 of file GlobalDrawer.qml.

string org::kde::kirigami::GlobalDrawer::title

A title to be displayed on top of the drawer.

Definition at line 56 of file GlobalDrawer.qml.

list< Item > org::kde::kirigami::GlobalDrawer::topContent

Items that will be instantiated inside the drawer and will be displayed on top of the actions list.

Example usage:

import org.kde.kirigami 2.4 as Kirigami
Kirigami.ApplicationWindow {
[...]
globalDrawer: Kirigami.GlobalDrawer {
actions: [...]
topContent: [Button {
text: "Button"
onClicked: //do stuff
}]
}
[...]
}

Definition at line 170 of file GlobalDrawer.qml.

Member Function Documentation

void org::kde::kirigami::GlobalDrawer::bannerClicked ( )
signal

Notifies that the banner has been clicked.

void org::kde::kirigami::GlobalDrawer::resetMenu ( )

Reverts the menu back to its initial state.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Sep 23 2021 22:38:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.