org::kde::kirigami::Action

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
}
 

Properties

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.

Deprecated:
Since 2.14, use Kirigami.DisplayHint instead.

Definition at line 134 of file Action.qml.

Property Documentation

◆ Action

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

This property holds the parent action.

Definition at line 66 of file Action.qml.

◆ children

list< Action > Action::children
read

This property holds a list of child actions.

Remarks
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
read

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

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

Definition at line 98 of file Action.qml.

◆ displayHint

Kirigami DisplayHint Action::displayHint
read

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

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

Definition at line 80 of file Action.qml.

◆ expandible

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

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

default: false

Since
org.kde.kirigami 2.6

Definition at line 62 of file Action.qml.

◆ iconName

string Action::iconName
read

This property holds the icon name for the action.

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

Deprecated:
Use the icon.name property instead.

Definition at line 31 of file Action.qml.

◆ iconSource

url Action::iconSource
read

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

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

Definition at line 38 of file Action.qml.

◆ separator

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

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
read

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.

Warning
Tooltips may not be supported on all platforms.

Definition at line 47 of file Action.qml.

◆ visible

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

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
read

This property holds the action's visible child actions.

Remarks
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.

Parameters
hintThe display hint to check if it is set.
Returns
true if the hint was set for this action, false if not.
Deprecated:
Since 2.14, Use DisplayHint.displayHintSet(action, hint) instead.
Since
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.