Search for usage in LXR

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

Public Types

enum  DisplayHint {
  NoPreference = 0, IconOnly = 1, KeepVisible = 2, AlwaysHide = 4,
  HideChildIndicator = 8


QQC2 Action
list< QtObject > children
Component displayComponent
int displayHint
bool expandible
alias iconName
alias iconSource
bool separator
string tooltip
bool visible
var visibleChildren

Public Member Functions

void displayHintSet (hint)
- Public Member Functions inherited from QtQuick.Controls.Action
void toggle (source)
 toggled (checked)
 toggled (source)
void trigger (source)
void trigger (source)
 triggered (source)
 triggered (source)

Detailed Description

An item that represents an abstract Action.

Definition at line 14 of file Action.qml.

Member Enumeration Documentation

◆ DisplayHint

Hints for implementations using Actions indicating preferences about how to display the action.

Since 2.14, use Kirigami.DisplayHint instead.

Definition at line 134 of file Action.qml.

Property Documentation

◆ Action

QQC2 org::kde::kirigami::Action::Action

This property holds the parent action.

Definition at line 66 of file Action.qml.

◆ children

list< Action > Action::children

This property holds a list of child actions.

This is the default property

This is useful for tree-like menus, such as the GlobalDrawer.

Example usage:

text: "Tools"
text: "Action1"
text: "Action2"

Definition at line 119 of file Action.qml.

◆ displayComponent

Component org::kde::kirigami::Action::displayComponent

This property holds the component that should be used for displaying this action.

This can be used to display custom components in the toolbar.
KDE Frameworks 5.65
org.kde.kirigami 2.12

Definition at line 98 of file Action.qml.

◆ displayHint

Kirigami DisplayHint Action::displayHint

This property sets this action's display type.

These are provided to implementations to indicate a preference for certain display styles.

default: Kirigami.DisplayHint.NoPreference

This property contains only preferences, implementations may choose to disregard them.
See also
org.kde.kirigami 2.12

Definition at line 80 of file Action.qml.

◆ expandible

bool org::kde::kirigami::Action::expandible

This property sets whether this action becomes a title displaying its child actions as sub-items in GlobalDrawers and ContextDrawers.

default: false

org.kde.kirigami 2.6

Definition at line 62 of file Action.qml.

◆ iconName

string Action::iconName

This property holds the icon name for the action.

This will pick the icon with the given name from the current theme.

Use the property instead.

Definition at line 31 of file Action.qml.

◆ iconSource

url Action::iconSource

This property holds an url to an icon file or resource url for the action.

Use this if you want a specific file rather than an icon from the theme.
Use icon.source property instead.

Definition at line 38 of file Action.qml.

◆ separator

bool org::kde::kirigami::Action::separator

This property sets whether this action is a separator action.

default: false

Definition at line 53 of file Action.qml.

◆ tooltip

string org::kde::kirigami::Action::tooltip

This property holds the tooltip text that is shown when the cursor is hovering over the control.

Leaving this undefined or setting it to an empty string means that no tooltip will be shown when the cursor is hovering over the control that triggers the tooltip.

Tooltips may not be supported on all platforms.

Definition at line 47 of file Action.qml.

◆ visible

bool org::kde::kirigami::Action::visible

This property holds whether the graphic representation of the action is supposed to be visible.

It's up to the action representation to honor this property.

default: true

Definition at line 25 of file Action.qml.

◆ visibleChildren

list< Action > Action::visibleChildren

This property holds the action's visible child actions.

This property is read-only

Definition at line 129 of file Action.qml.

Member Function Documentation

◆ displayHintSet()

void org::kde::kirigami::Action::displayHintSet ( hint  )

This is a helper function to check if a certain display hint has been set.

This function is mostly convenience to enforce the mutual exclusivity of KeepVisible and AlwaysHide.

hintThe display hint to check if it is set.
true if the hint was set for this action, false if not.
Since 2.14, Use DisplayHint.displayHintSet(action, hint) instead.
org.kde.kirigami 2.12

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 Fri Sep 22 2023 04:08:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.