KirigamiActions::ActionCollections Class

class KirigamiActions::ActionCollections

This Singleton class contains all the ActionCollection instances used in this application, retrievable by their unique name. More...

Header: #include <Kirigami/ActionCollection/ActionCollections>

Public Functions

ActionCollections(QObject *parent = nullptr)
KirigamiActions::ActionCollection *collection(const QString &name)
QList<KirigamiActions::ActionCollection *> collections()
KirigamiActions::ActionCollection *createCollection(const QString &name, const QString &text)

Signals

void collectionInserted(KirigamiActions::ActionCollection *collection)
void collectionRemoved(KirigamiActions::ActionCollection *collection)

Static Public Members

KirigamiActions::ActionCollections *self()

Detailed Description

Member Function Documentation

[explicit] ActionCollections::ActionCollections(QObject *parent = nullptr)

This shouldn't be explicitly called, rather the single global instance accessed with ActionCollections::self() parent Any QObject to be used as parent

KirigamiActions::ActionCollection *ActionCollections::collection(const QString &name)

Returns the ActionCollection instance uniquely identified by the provided name. If no collection with this name exists, nullptr will be returned.

name The collection name we are searching for

[signal] void ActionCollections::collectionInserted(KirigamiActions::ActionCollection *collection)

Emitted when a new ActionCollection instance has been created.

collection The new collection that has been created

[signal] void ActionCollections::collectionRemoved(KirigamiActions::ActionCollection *collection)

Emitted when an ActionCollection instance is being destroyed or made otherwise unavailable.

collection The collection that has just been removed

QList<KirigamiActions::ActionCollection *> ActionCollections::collections()

Returns the list of evenry ActionCollection existing in the application.

KirigamiActions::ActionCollection *ActionCollections::createCollection(const QString &name, const QString &text)

Creates a new collection identified by the given unique name, and the given user readable text label. Returns the created collection, or nullptr if a collection with the given name was already present.

name The name for the new collection text The text label for the new collection

[static] KirigamiActions::ActionCollections *ActionCollections::self()

Returns the global singleton instance of this class. Always use this instead of manually creating one.