Kirigami-addons
kirigamiactioncollection.h
118 void writeSettings(KConfigGroup *config = nullptr, bool writeDefaults = false, QAction *oneAction = nullptr) const;
165 * Returns the list of QActions without an QAction::actionGroup() which belong to this action collection.
221 /// Overridden to perform connections when someone wants to know whether an action was highlighted or triggered
245 * If the action is destroyed it will be removed automatically from the KirigamiActionCollection.
261 * If the action is destroyed it will be removed automatically from the KirigamiActionCollection.
303 inline QAction *addAction(KStandardActions::StandardAction actionType, const QString &name, const Receiver *receiver, Func slot)
306 inline typename std::enable_if<!std::is_convertible<Func, const char *>::value, QAction>::type *
307 addAction(KStandardActions::StandardAction actionType, const QString &name, const Receiver *receiver, Func slot)
361 inline typename std::enable_if<!std::is_convertible<Func, const char *>::value, QAction>::type *
398 Q_INVOKABLE static void setDefaultShortcuts(QAction *action, const QList<QKeySequence> &shortcuts);
void changed()
Emitted when an action has been inserted into, or removed from, this action collection.
void inserted(QAction *action)
Indicates that action was inserted into this action collection.
void actionTriggered(QAction *action)
Indicates that action was triggered.
void writeSettings(KConfigGroup *config=nullptr, bool writeDefaults=false, QAction *oneAction=nullptr) const
Write the current configurable key associations to config.
Definition kirigamiactioncollection.cpp:369
QAction * takeAction(QAction *action)
Removes an action from the collection.
Definition kirigamiactioncollection.cpp:272
void removeAction(QAction *action)
Removes an action from the collection and deletes it.
Definition kirigamiactioncollection.cpp:267
KirigamiActionCollection(QObject *parent, const QString &cName=QString())
Constructor.
Definition kirigamiactioncollection.cpp:69
void setComponentDisplayName(const QString &displayName)
Set the component display name associated with this action collection.
Definition kirigamiactioncollection.cpp:130
QString componentName() const
The component name with which this class is associated.
Definition kirigamiactioncollection.cpp:125
int count() const
Returns the number of actions in the collection.
Definition kirigamiactioncollection.cpp:106
const QList< QAction * > actionsWithoutGroup() const
Returns the list of QActions without an QAction::actionGroup() which belong to this action collection...
Definition kirigamiactioncollection.cpp:151
static const QList< KirigamiActionCollection * > & allCollections()
Access the list of all action collections in existence for this app.
Definition kirigamiactioncollection.cpp:493
bool isEmpty() const
Returns whether the action collection is empty or not.
Definition kirigamiactioncollection.cpp:111
Q_INVOKABLE QAction * addAction(const QString &name, QAction *action)
Add an action under the given name to the collection.
Definition kirigamiactioncollection.cpp:173
void setComponentName(const QString &componentName)
Set the componentName associated with this action collection.
Definition kirigamiactioncollection.cpp:116
void readSettings(KConfigGroup *config=nullptr)
Read all key associations from config.
Definition kirigamiactioncollection.cpp:338
void actionHovered(QAction *action)
Indicates that action was hovered.
ActionType * add(const QString &name, const Receiver *receiver, Func slot)
Creates a new action under the given name, adds it to the collection and connects the action's trigge...
Definition kirigamiactioncollection.h:334
void addActions(const QList< QAction * > &actions)
Adds a list of actions to the collection.
Definition kirigamiactioncollection.cpp:260
QAction * addAction(const QString &name, const Receiver *receiver, Func slot)
Creates a new action under the given name to the collection and connects the action's triggered(bool)...
Definition kirigamiactioncollection.h:358
void setConfigGroup(const QString &group)
Sets group as the KConfig group with which settings will be loaded and saved.
Definition kirigamiactioncollection.cpp:323
QAction * addAction(KStandardActions::StandardAction actionType, const QString &name, const Receiver *receiver, Func slot)
Creates a new standard action, adds it to the collection and connects the action's triggered(bool) si...
Definition kirigamiactioncollection.h:303
void setConfigGlobal(bool global)
Set whether this action collection's configuration should be global to KDE ( true ),...
Definition kirigamiactioncollection.cpp:333
QList< QAction * > actions() const
Returns the list of QActions which belong to this action collection.
Definition kirigamiactioncollection.cpp:146
QAction * action(int index) const
Return the QAction* at position index in the action collection.
Definition kirigamiactioncollection.cpp:100
QString componentDisplayName() const
The display name for the associated component.
Definition kirigamiactioncollection.cpp:135
const QList< QActionGroup * > actionGroups() const
Returns the list of all QActionGroups associated with actions in this action collection.
Definition kirigamiactioncollection.cpp:162
void clear()
Clears the entire action collection, deleting all actions.
Definition kirigamiactioncollection.cpp:82
StandardAction
QAction * create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional< Qt::ConnectionType > connectionType=std::nullopt)
void triggered(bool checked)
QObject(QObject *parent)
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual void connectNotify(const QMetaMethod &signal)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.