KXmlGui
kactioncollection.cpp
169 qCWarning(DEBUG_KXMLGUI) << "KActionCollection::setComponentName does not work on a KActionCollection containing actions!" << cName;
252 qCDebug(DEBUG_KXMLGUI) << "Registering action " << objectName << " under new name " << indexName;
259 qCCritical(DEBUG_KXMLGUI) << "Changing action name from " << objectName << " to " << indexName << "\nignored because of active global shortcut.";
367 QAction *KActionCollection::addAction(KStandardAction::StandardAction actionType, const QObject *receiver, const char *member)
373 QAction *KActionCollection::addAction(KStandardAction::StandardAction actionType, const QString &name,
376 // pass 0 as parent, because if the parent is a KActionCollection KStandardAction::create automatically
388 QAction *KActionCollection::addAction(const QString &name, const QObject *receiver, const char *member)
413 void KActionCollection::setDefaultShortcuts(QAction *action, const QList<QKeySequence> &shortcuts)
471 KGlobalAccel::self()->setShortcut(action, QKeySequence::listFromString(entry), KGlobalAccel::NoAutoloading);
535 qCCritical(DEBUG_KXMLGUI) << "Skipped exporting Shortcut for action without name " << action->text() << "!";
541 bool bSameAsDefault = (KGlobalAccel::self()->shortcut(action) == KGlobalAccel::self()->defaultShortcut(action));
607 qCCritical(DEBUG_KXMLGUI) << "Skipped writing shortcut for action " << actionName << "(" << action->text() << ")!";
628 //qCDebug(DEBUG_KXMLGUI) << "act_elem.attributes().count() = " << act_elem.attributes().count();
645 void KActionCollection::writeSettings(KConfigGroup *config, bool writeAll, QAction *oneAction) const
678 qCCritical(DEBUG_KXMLGUI) << "Skipped saving Shortcut for action without name " << action->text() << "!";
812 connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(_k_associatedWidgetDestroyed(QObject*)));
823 disconnect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(_k_associatedWidgetDestroyed(QObject*)));
text
static QString readConfigFile(const QString &filename, const QString &componentName=QString())
Definition: kxmlguifactory.cpp:102
bool sync() override
void removeAssociatedWidget(QWidget *widget)
Remove an association between all actions in this collection and the given widget, i.e.
Definition: kactioncollection.cpp:816
void associateWidget(QWidget *widget) const
Associate all actions in this collection to the given widget.
Definition: kactioncollection.cpp:797
void triggered(bool checked)
bool isShortcutsConfigurable(QAction *action) const
Returns true if the given action's shortcuts may be configured by the user.
Definition: kactioncollection.cpp:419
Persistent
QActionGroup * actionGroup() const const
QString asprintf(const char *cformat,...)
NoAutoloading
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document...
Definition: kxmlguiclient.h:39
const QList< QActionGroup * > actionGroups() const
Returns the list of all QActionGroups associated with actions in this action collection.
Definition: kactioncollection.cpp:221
QList< QKeySequence > listFromString(const QString &str, QKeySequence::SequenceFormat format)
void addAction(QAction *action)
void setConfigGlobal(bool global)
Set whether this action collection's configuration should be global to KDE ( true )...
Definition: kactioncollection.cpp:446
QList< QWidget * > associatedWidgets() const
Return a list of all associated widgets.
Definition: kactioncollection.cpp:860
void addActions(QList< QAction * > actions)
QString listToString(const QList< QKeySequence > &list, QKeySequence::SequenceFormat format)
void setShortcutsConfigurable(QAction *action, bool configurable)
Indicate whether the user may configure the action's shortcuts.
Definition: kactioncollection.cpp:426
QByteArray methodSignature() const const
Global
QObject * sender() const const
QAction * create(StandardAction id, const QObject *recvr, Func slot, QObject *parent)
QT_MOC_COMPAT void removed(QAction *action)
Indicates that action was removed from this action collection.
StandardAction
void actionTriggered(QAction *action)
Indicates that action was triggered.
Q_INVOKABLE void setDefaultShortcuts(QAction *action, const QList< QKeySequence > &shortcuts)
Set the default shortcuts for the given action.
Definition: kactioncollection.cpp:413
const QList< QAction * > actionsWithoutGroup() const
Returns the list of QActions without an QAction::actionGroup() which belong to this action collection...
Definition: kactioncollection.cpp:210
static const QList< KActionCollection * > & allCollections()
Access the list of all action collections in existence for this app.
Definition: kactioncollection.cpp:792
QMap::const_iterator constBegin() const const
void setVisible(bool)
void inserted(QAction *action)
Indicates that action was inserted into this action collection.
void removeAt(int i)
QList< QKeySequence > shortcuts() const const
KActionCollection(QObject *parent, const QString &cName=QString())
Constructor.
Definition: kactioncollection.cpp:100
void setDefaultShortcut(QAction *action, const QKeySequence &shortcut)
Set the default shortcut for the given action.
Definition: kactioncollection.cpp:408
T value() const const
Q_INVOKABLE QAction * addAction(const QString &name, QAction *action)
Add an action under the given name to the collection.
Definition: kactioncollection.cpp:232
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
virtual QString xmlFile() const
This will return the name of the XML file as set by setXMLFile().
Definition: kxmlguiclient.cpp:139
bool configIsGlobal() const
Returns whether this action collection's configuration should be global to KDE ( true )...
QSet::iterator insert(const T &value)
QList< QKeySequence > defaultShortcuts(QAction *action) const
Get the default shortcuts for the given action.
Definition: kactioncollection.cpp:403
void setComponentName(const QString &componentName)
Set the componentName associated with this action collection.
Definition: kactioncollection.cpp:160
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
int count() const
Returns the number of actions in the collection.
Definition: kactioncollection.cpp:150
T value(int i) const const
int indexOf(const T &value, int from) const const
void deleteEntry(const QString &pKey, WriteConfigFlags pFlags=Normal)
void append(const T &value)
void setShortcuts(const QList< QKeySequence > &shortcuts)
QVariant property(const char *name) const const
bool exists() const
bool isEmpty() const const
QString objectName() const const
bool isEmpty() const const
int removeAll(const T &value)
QList< QAction * > actions() const
Returns the list of QActions which belong to this action collection.
Definition: kactioncollection.cpp:205
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
void changed()
Emitted when an action has been inserted into, or removed from, this action collection.
void connectNotify(const QMetaMethod &signal) override
Overridden to perform connections when someone wants to know whether an action was highlighted or tri...
Definition: kactioncollection.cpp:760
QList< QKeySequence > shortcut(const QAction *action) const
T & first()
void removeAction(QAction *action)
Removes an action from the collection and deletes it.
Definition: kactioncollection.cpp:342
QT_MOC_COMPAT void actionHighlighted(QAction *action)
Indicates that action was highlighted (hovered over).
QAction * takeAction(QAction *action)
Removes an action from the collection.
Definition: kactioncollection.cpp:347
void addActions(const QList< QAction * > &actions)
Adds a list of actions to the collection.
Definition: kactioncollection.cpp:335
virtual void connectNotify(const QMetaMethod &signal)
bool blockSignals(bool block)
QDomNode removeChild(const QDomNode &oldChild)
void setParent(QObject *parent)
void clear()
Clears the entire action collection, deleting all actions.
Definition: kactioncollection.cpp:126
bool contains(const T &value) const const
QVariant fromValue(const T &value)
static bool saveConfigFile(const QDomDocument &doc, const QString &filename, const QString &componentName=QString())
Definition: kxmlguifactory.cpp:147
QString componentDisplayName() const
The display name for the associated component.
Definition: kactioncollection.cpp:189
static KGlobalAccel * self()
void clearAssociatedWidgets()
Clear all associated widgets and remove the actions from those widgets.
Definition: kactioncollection.cpp:865
void actionHovered(QAction *action)
Indicates that action was hovered.
QObject(QObject *parent)
void exportGlobalShortcuts(KConfigGroup *config, bool writeDefaults=false) const
Export the current configurable global key associations to config.
Definition: kactioncollection.cpp:515
bool hasShortcut(const QAction *action) const
void hovered()
void writeSettings(KConfigGroup *config=nullptr, bool writeDefaults=false, QAction *oneAction=nullptr) const
Write the current configurable key associations to config.
Definition: kactioncollection.cpp:645
bool isEmpty() const
Returns whether the action collection is empty or not.
Definition: kactioncollection.cpp:155
void removeAction(QAction *action)
void addAssociatedWidget(QWidget *widget)
Associate all actions in this collection to the given widget, including any actions added after this ...
Definition: kactioncollection.cpp:806
bool toBool() const const
bool isValid() const const
QAction * action(int index) const
Return the QAction* at position index in the action collection.
Definition: kactioncollection.cpp:144
bool setProperty(const char *name, const QVariant &value)
void setComponentDisplayName(const QString &displayName)
Set the component display name associated with this action collection.
Definition: kactioncollection.cpp:184
QList< QKeySequence > defaultShortcut(const QAction *action) const
const KXMLGUIClient * parentGUIClient() const
The parent KXMLGUIClient, or null if not available.
Definition: kactioncollection.cpp:200
KCONFIGCORE_EXPORT bool authorizeAction(const QString &action)
QKeySequence defaultShortcut(QAction *action) const
Get the default primary shortcut for the given action.
Definition: kactioncollection.cpp:397
void setConfigGroup(const QString &group)
Sets group as the KConfig group with which settings will be loaded and saved.
Definition: kactioncollection.cpp:436
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QList< QAction * > actions() const const
T qobject_cast(QObject *object)
QObject * parent() const const
void readSettings(KConfigGroup *config=nullptr)
Read all key associations from config.
Definition: kactioncollection.cpp:483
T readEntry(const QString &key, const T &aDefault) const
bool setShortcut(QAction *action, const QList< QKeySequence > &shortcut, GlobalShortcutLoading loadFlag=Autoloading)
QString applicationDisplayName()
QString componentName() const
The component name with which this class is associated.
Definition: kactioncollection.cpp:179
virtual QT_MOC_COMPAT void slotActionHighlighted()
Definition: kactioncollection.cpp:726
static QDomElement actionPropertiesElement(QDomDocument &doc)
Definition: kxmlguifactory.cpp:728
void destroyed(QObject *obj)
void setEnabled(bool)
QString configGroup() const
Returns the KConfig group with which settings will be loaded and saved.
Q_EMITQ_EMIT
static QDomElement findActionByName(QDomElement &elem, const QString &sName, bool create)
Definition: kxmlguifactory.cpp:742
QString applicationName()
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
void importGlobalShortcuts(KConfigGroup *config)
Import from config all configurable global key associations.
Definition: kactioncollection.cpp:451
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 22:52:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 22:52:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.