Kirigami-addons
kirigamiactioncollection.cpp
300void KirigamiActionCollection::setDefaultShortcuts(QAction *action, const QList<QKeySequence> &shortcuts)
369void KirigamiActionCollection::writeSettings(KConfigGroup *config, bool writeAll, QAction *oneAction) const
383 for (QMap<QString, QAction *>::ConstIterator it = d->actionByName.constBegin(); it != d->actionByName.constEnd(); ++it) {
static Q_INVOKABLE bool authorizeAction(const QString &action)
Persistent
Global
void deleteEntry(const char *key, WriteConfigFlags pFlags=Normal)
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString readEntry(const char *key, const char *aDefault=nullptr) const
bool exists() const
bool sync() override
A container for a set of QAction objects.
Definition kirigamiactioncollection.h:44
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
static QList< QKeySequence > defaultShortcuts(QAction *action)
Get the default shortcuts for the given action.
Definition kirigamiactioncollection.cpp:290
void connectNotify(const QMetaMethod &signal) override
Overridden to perform connections when someone wants to know whether an action was highlighted or tri...
Definition kirigamiactioncollection.cpp:467
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 void setShortcutsConfigurable(QAction *action, bool configurable)
Indicate whether the user may configure the action's shortcuts.
Definition kirigamiactioncollection.cpp:313
static void setDefaultShortcut(QAction *action, const QKeySequence &shortcut)
Set the default shortcut for the given action.
Definition kirigamiactioncollection.cpp:295
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
static bool isShortcutsConfigurable(QAction *action)
Returns true if the given action's shortcuts may be configured by the user.
Definition kirigamiactioncollection.cpp:306
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.
void addActions(const QList< QAction * > &actions)
Adds a list of actions to the collection.
Definition kirigamiactioncollection.cpp:260
void setConfigGroup(const QString &group)
Sets group as the KConfig group with which settings will be loaded and saved.
Definition kirigamiactioncollection.cpp:323
void setConfigGlobal(bool global)
Set whether this action collection's configuration should be global to KDE ( true ),...
Definition kirigamiactioncollection.cpp:333
static Q_INVOKABLE void setDefaultShortcuts(QAction *action, const QList< QKeySequence > &shortcuts)
Set the default shortcuts for the given action.
Definition kirigamiactioncollection.cpp:300
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
static QKeySequence defaultShortcut(QAction *action)
Get the default primary shortcut for the given action.
Definition kirigamiactioncollection.cpp:284
QString name(StandardAction id)
QActionGroup * actionGroup() const const
void setEnabled(bool)
void hovered()
void setShortcuts(QKeySequence::StandardKey key)
QList< QKeySequence > shortcuts() const const
text
void triggered(bool checked)
void setVisible(bool)
applicationName
applicationDisplayName
QList< QKeySequence > listFromString(const QString &str, SequenceFormat format)
QString listToString(const QList< QKeySequence > &list, SequenceFormat format)
void append(QList< T > &&value)
T & first()
qsizetype indexOf(const AT &value, qsizetype from) const const
bool isEmpty() const const
qsizetype removeAll(const AT &t)
void removeAt(qsizetype i)
T value(qsizetype i) const const
ConstIterator
size_type remove(const Key &key)
QByteArray methodSignature() const const
Q_EMITQ_EMIT
bool blockSignals(bool block)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual void connectNotify(const QMetaMethod &signal)
void destroyed(QObject *obj)
bool disconnect(const QMetaObject::Connection &connection)
objectName
QVariant property(const char *name) const const
T qobject_cast(QObject *object)
QObject * sender() const const
void setObjectName(QAnyStringView name)
bool setProperty(const char *name, QVariant &&value)
iterator insert(const T &value)
QList< T > values() const const
QString asprintf(const char *cformat,...)
bool isEmpty() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QVariant fromValue(T &&value)
bool isValid() const const
bool toBool() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.