Action
Properties | |
string | configFile |
NewStuffEngine | engine |
Item | pageStack |
Window | transientParent |
int | viewMode |
bool | visibleWhenDisabled |
Signals | |
void | entryEvent (var entry, int event) |
Public Member Functions | |
void | showHotNewStuff () |
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 41 of file Action.qml.
Property Documentation
◆ configFile
|
read |
The configuration file to use for the Page created by this action.
Definition at line 55 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 76 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 70 of file Action.qml.
◆ transientParent
|
read |
The parent window for the dialog created by invoking the action.
- Since
- 6.1
Definition at line 95 of file Action.qml.
◆ viewMode
|
read |
The view mode of the page spawned by this action, which overrides the default one (ViewMode.Tiles).
This should be set using the NewStuff.Page.ViewMode enum. Note that ViewMode.Icons has been removed, and asking for it will return ViewMode.Tiles.
- See also
- NewStuff.Page.ViewMode
Definition at line 63 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 88 of file Action.qml.
Member Function Documentation
◆ entryEvent
|
signal |
This forwards the entry changed event from the QtQuick engine.
- See also
- Engine::entryEvent
◆ 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-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:49:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.