org::kde::kirigami::Action

Public Types | |
enum | DisplayHint { DisplayHint::NoPreference = 0, DisplayHint::IconOnly = 1, DisplayHint::KeepVisible = 2, DisplayHint::AlwaysHide = 4, DisplayHint::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) |
Detailed Description
An item that represents an abstract Action.
Definition at line 14 of file Action.qml.
Member Enumeration Documentation
◆ DisplayHint
|
strong |
Hints for implementations using Actions indicating preferences about how to display the action.
- See also
- org::kde::kirigami::DisplayHint
- Deprecated:
- since 2.14, use Kirigami.DisplayHint instead.
Enumerator | |
---|---|
NoPreference | Indicates there is no specific preference. |
IconOnly | Only display an icon for this Action. |
KeepVisible | Try to keep the action visible even when space constrained. Mutually exclusive with AlwaysHide, KeepVisible has priority. |
AlwaysHide | If possible, hide the action in an overflow menu or similar location. Mutually exclusive with KeepVisible, KeepVisible has priority. |
HideChildIndicator | When this action has children, do not display any indicator (like a menu arrow) for this action. |
Definition at line 134 of file Action.qml.
Property Documentation
◆ Action
|
read |
This property holds the parent action.
Definition at line 65 of file Action.qml.
◆ 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:
Definition at line 118 of file Action.qml.
◆ 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
- 5.65
- 2.12
Definition at line 97 of file Action.qml.
◆ 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
- org::kde::kirigami::DisplayHint
- Since
- 2.12
Definition at line 78 of file Action.qml.
◆ 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
- 2.6
Definition at line 61 of file Action.qml.
◆ 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 icon.name instead.
Definition at line 31 of file Action.qml.
◆ 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.name instead.
Definition at line 38 of file Action.qml.
◆ separator
|
read |
This property sets whether this action is a separator action.
default: false
Definition at line 52 of file Action.qml.
◆ 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 46 of file Action.qml.
◆ 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
|
read |
This property holds the action's visible child actions.
- Remarks
- This property is read-only
Definition at line 128 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
-
hint The display hint to check if it is set.
- See also
- org::kde::kirigami::DisplayHint
- Deprecated:
- since 2.14, Use DisplayHint.displayHintSet(action, hint) instead.
- Returns
- true if the hint was set for this action, false if not.
- Since
- 2.12
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:08:36 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.