ActionCollection QML Type

ActionCollection manages a set of ActionData objects. More...

Import Statement: import org.kde.kirigami.actioncollection
In C++: ActionCollection

Properties

Detailed Description

It allows them to be grouped for organized presentation of configuration to the user and saving + loading of shortcuts configuration.

 import org.kde.kirigami.actioncollection as AC
 ...
 AC.ActionCollection {
     name: "EditActions"
     AC.ActionData {
        name: "exampleAction"
        icon.name: "edit-copy"
        text: "Copy"
        defaultShortcut: StandardKey.Copy
     }
     ...
 }
 ...
 Kirigami.Action {
   id: copyAction
   AC.ActionCollection.collection: "EditActions"
   AC.ActionCollection.action: "exampleAction"
   onTriggered: {
       ...
   }
 }

Property Documentation

actions : list<ActionData>

All the actions this collection contains. It's the default property, so actionData instances can be declared just as children.

 AC.ActionCollection {
     name: "EditActions"
     AC.ActionData {
        name: "exampleAction"
        icon.name: "edit-copy"
        text: "Copy"
        defaultShortcut: StandardKey.Copy
     }
     AC.ActionData {
        name: "backAction"
        icon.name: "go previous"
        text: "Back"
     }
     ...
 }

name : string

The unique name of the collection within the whole application. It is required and should be set only once

text : string

User-readable label for this collection. This will be visible in the shortcut configuration page.