Action

Properties | |
QtObject | _private |
var | changedEntries |
string | configFile |
QtObject | engine |
QtObject | pageStack |
int | viewMode |
bool | visibleWhenDisabled |
![]() | |
list< QtObject > | children |
Component | displayComponent |
int | displayHint |
bool | expandible |
alias | iconName |
alias | iconSource |
bool | separator |
string | tooltip |
bool | visible |
var | visibleChildren |
Signals | |
void | entryEvent (QtObject entry, int event) |
Public Member Functions | |
void | showEntryDetails (providerId, entryId) |
void | showHotNewStuff () |
![]() | |
void | displayHintSet (hint) |
![]() | |
void | toggle (source) |
toggled (checked) | |
toggled (source) | |
void | trigger (source) |
void | trigger (source) |
triggered (source) | |
triggered (source) | |
Additional Inherited Members | |
![]() | |
enum | DisplayHint { NoPreference, IconOnly, KeepVisible, AlwaysHide, HideChildIndicator } |
Detailed Description
An action which when triggered will open a NewStuff.Dialog or a NewStuff.Page, depending on settings.
This component is equivalent to the old Button component, but functions in more modern applications
The following is a simple example of how to use this Action to show wallpapers from the KDE Store, on a system where Plasma has been installed (and consequently the wallpaper knsrc file is available). This also shows how to make the action push a page to a pageStack rather than opening a dialog:
- See also
- NewStuff.Button
- Since
- 5.81
Definition at line 40 of file Action.qml.
Property Documentation
◆ _private
|
read |
- Remarks
- This property is read-only
Definition at line 116 of file Action.qml.
◆ changedEntries
|
read |
Contains the entries which have been changed.
- Note
- This is cleared when the page is shown, so the changed entries are those changed since the page was opened most recently (rather than the lifetime of the instance of the Action component)
- Deprecated:
- Since 5.82, use entryEvent instead
Definition at line 81 of file Action.qml.
◆ configFile
|
read |
The configuration file to use for the Page created by this action.
Definition at line 54 of file Action.qml.
◆ engine
|
read |
The engine which handles the content in this Action This will be null until the action has been triggered the first time.
- Remarks
- This property is read-only
Definition at line 73 of file Action.qml.
◆ pageStack
|
read |
If this is set, the action will push a NewStuff.Page onto this page stack (and request it is made visible if triggered again).
If you do not set this property, the action will spawn a NewStuff.Dialog instead.
- Note
- If you are building a KCM, set this to your
kcm
object.
Definition at line 67 of file Action.qml.
◆ viewMode
|
read |
The default view mode of the page spawned by this action.
This should be set using the NewStuff.Page.ViewMode enum
- See also
- NewStuff.Page.ViewMode
Definition at line 60 of file Action.qml.
◆ visibleWhenDisabled
|
read |
If this is true (default is false), the action will be shown when the Kiosk settings are such that Get Hot New Stuff is disallowed (and any other time enabled is set to false).
Usually you would want to leave this alone, but occasionally you may have a reason to leave a action in place that the user is unable to enable.
Definition at line 102 of file Action.qml.
Member Function Documentation
◆ entryEvent
|
signal |
This forwards the entry changed event from the QtQuick engine.
- See also
- Engine::entryEvent
◆ showEntryDetails()
void Action::showEntryDetails | ( | providerId | , |
entryId | |||
) |
Show the details page for a specific entry.
If you call this function before the engine initialisation has been completed, the action itself will be postponed until that has happened.
- Parameters
-
providerId The provider ID for the entry you wish to show details for entryId The unique ID for the entry you wish to show details for
- Since
- 5.79
◆ showHotNewStuff()
void Action::showHotNewStuff | ( | ) |
Show the page/dialog (same as activating the action), if allowed by the Kiosk settings.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:11:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.