KActionCollection

Search for usage in LXR

#include <KActionCollection>

Inheritance diagram for KActionCollection:

Properties

QString configGroup
 
bool configIsGlobal
 
- Properties inherited from QObject
 objectName
 

Signals

QT_MOC_COMPAT void actionHighlighted (QAction *action)
 
void actionHovered (QAction *action)
 
void actionTriggered (QAction *action)
 
void changed ()
 
void inserted (QAction *action)
 
QT_MOC_COMPAT void removed (QAction *action)
 

Public Member Functions

 KActionCollection (QObject *parent, const QString &cName=QString())
 
 ~KActionCollection () override
 
QActionaction (int index) const
 
QActionaction (const QString &name) const
 
const QList< QActionGroup * > actionGroups () const
 
QList< QAction * > actions () const
 
const QList< QAction * > actionsWithoutGroup () const
 
template<class ActionType >
ActionType * add (const QString &name, const QObject *receiver=nullptr, const char *member=nullptr)
 
template<class ActionType >
ActionType * add (const QString &name, const Receiver *receiver, Func slot)
 
Q_INVOKABLE QActionaddAction (const QString &name, QAction *action)
 
QActionaddAction (KStandardAction::StandardAction actionType, const QObject *receiver=nullptr, const char *member=nullptr)
 
QActionaddAction (KStandardAction::StandardAction actionType, const QString &name, const QObject *receiver=nullptr, const char *member=nullptr)
 
QActionaddAction (KStandardAction::StandardAction actionType, const QString &name, const Receiver *receiver, Func slot)
 
QActionaddAction (const QString &name, const QObject *receiver=nullptr, const char *member=nullptr)
 
QActionaddAction (const QString &name, const Receiver *receiver, Func slot)
 
void addActions (const QList< QAction * > &actions)
 
void addAssociatedWidget (QWidget *widget)
 
QList< QWidget * > associatedWidgets () const
 
void associateWidget (QWidget *widget) const
 
void clear ()
 
void clearAssociatedWidgets ()
 
QString componentDisplayName () const
 
QString componentName () const
 
QString configGroup () const
 
bool configIsGlobal () const
 
int count () const
 
QKeySequence defaultShortcut (QAction *action) const
 
QList< QKeySequencedefaultShortcuts (QAction *action) const
 
void exportGlobalShortcuts (KConfigGroup *config, bool writeDefaults=false) const
 
void importGlobalShortcuts (KConfigGroup *config)
 
bool isEmpty () const
 
bool isShortcutsConfigurable (QAction *action) const
 
const KXMLGUIClientparentGUIClient () const
 
void readSettings (KConfigGroup *config=nullptr)
 
void removeAction (QAction *action)
 
void removeAssociatedWidget (QWidget *widget)
 
void setComponentDisplayName (const QString &displayName)
 
void setComponentName (const QString &componentName)
 
void setConfigGlobal (bool global)
 
void setConfigGroup (const QString &group)
 
void setDefaultShortcut (QAction *action, const QKeySequence &shortcut)
 
Q_INVOKABLE void setDefaultShortcuts (QAction *action, const QList< QKeySequence > &shortcuts)
 
void setShortcutsConfigurable (QAction *action, bool configurable)
 
QActiontakeAction (QAction *action)
 
void writeSettings (KConfigGroup *config=nullptr, bool writeDefaults=false, QAction *oneAction=nullptr) const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static const QList< KActionCollection * > & allCollections ()
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Protected Slots

virtual QT_MOC_COMPAT void slotActionHighlighted ()
 
virtual void slotActionTriggered ()
 

Protected Member Functions

void connectNotify (const QMetaMethod &signal) override
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

A container for a set of QAction objects.

KActionCollection manages a set of QAction objects. It allows them to be grouped for organized presentation of configuration to the user, saving + loading of configuration, and optionally for automatic plugging into specified widget(s).

Additionally, KActionCollection provides several convenience functions for locating named actions, and actions grouped by QActionGroup.

Note
If you create your own action collection and need to assign shortcuts to the actions within, you have to call associateWidget() or addAssociatedWidget() to have them working.

Definition at line 47 of file kactioncollection.h.

Constructor & Destructor Documentation

KActionCollection::KActionCollection ( QObject parent,
const QString cName = QString() 
)
explicit

Constructor.

Allows specification of a component name other than the default application name, where needed (remember to call setComponentDisplayName() too).

Definition at line 105 of file kactioncollection.cpp.

KActionCollection::~KActionCollection ( )
override

Destructor.

Definition at line 126 of file kactioncollection.cpp.

Member Function Documentation

QAction * KActionCollection::action ( int  index) const

Return the QAction* at position index in the action collection.

This is equivalent to actions().value(index);

Definition at line 149 of file kactioncollection.cpp.

QAction * KActionCollection::action ( const QString name) const

Get the action with the given name from the action collection.

Parameters
nameName of the QAction
Returns
A pointer to the QAction in the collection which matches the parameters or null if nothing matches.

Definition at line 138 of file kactioncollection.cpp.

const QList< QActionGroup * > KActionCollection::actionGroups ( ) const

Returns the list of all QActionGroups associated with actions in this action collection.

Definition at line 227 of file kactioncollection.cpp.

QT_MOC_COMPAT void KActionCollection::actionHighlighted ( QAction action)
signal

Indicates that action was highlighted (hovered over).

Deprecated:
Since 5.0. Replaced by actionHovered(QAction* action);
void KActionCollection::actionHovered ( QAction action)
signal

Indicates that action was hovered.

QList< QAction * > KActionCollection::actions ( ) const

Returns the list of QActions which belong to this action collection.

The list is guaranteed to be in the same order the action were put into the collection.

Definition at line 211 of file kactioncollection.cpp.

const QList< QAction * > KActionCollection::actionsWithoutGroup ( ) const

Returns the list of QActions without an QAction::actionGroup() which belong to this action collection.

Definition at line 216 of file kactioncollection.cpp.

void KActionCollection::actionTriggered ( QAction action)
signal

Indicates that action was triggered.

template<class ActionType >
ActionType* KActionCollection::add ( const QString name,
const QObject receiver = nullptr,
const char *  member = nullptr 
)
inline

Creates a new action under the given name, adds it to the collection and connects the action's triggered(bool) signal to the specified receiver/member.

The receiver slot may accept either a bool or no parameters at all (i.e. slotTriggered(bool) or slotTriggered() ). The type of the action is specified by the template parameter ActionType.

NOTE: KDE prior to 4.2 connected the triggered() signal instead of the triggered(bool) signal.

The KActionCollection takes ownership of the action object.

Parameters
nameThe internal name of the action (e.g. "file-open").
receiverThe QObject to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
memberThe SLOT to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
Returns
new action of the given type ActionType.
See also
addAction()

Definition at line 490 of file kactioncollection.h.

template<class ActionType >
ActionType* KActionCollection::add ( const QString name,
const Receiver *  receiver,
Func  slot 
)
inline

This is the same as add(const QString &name, const QObject *receiver, const char *member) using new style connect syntax.

Parameters
nameThe internal name of the action (e.g. "file-open").
receiverThe QObject to connect the triggered(bool) signal to.
slotThe slot or lambda to connect the triggered(bool) signal to.
Returns
new action of the given type ActionType.
See also
add(const QString &, const QObject *, const char *)
Since
5.28

Definition at line 514 of file kactioncollection.h.

QAction * KActionCollection::addAction ( const QString name,
QAction action 
)

Add an action under the given name to the collection.

Inserting an action that was previously inserted under a different name will replace the old entry, i.e. the action will not be available under the old name anymore but only under the new one.

Inserting an action under a name that is already used for another action will replace the other action in the collection (but will not delete it).

If KAuthorized::authorizeAction() reports that the action is not authorized, it will be disabled and hidden.

The ownership of the action object is not transferred. If the action is destroyed it will be removed automatically from the KActionCollection.

Parameters
nameThe name by which the action be retrieved again from the collection.
actionThe action to add.
Returns
the same as the action given as parameter. This is just for convenience (chaining calls) and consistency with the other addAction methods, you can also simply ignore the return value.

Definition at line 238 of file kactioncollection.cpp.

QAction * KActionCollection::addAction ( KStandardAction::StandardAction  actionType,
const QObject receiver = nullptr,
const char *  member = nullptr 
)

Creates a new standard action, adds it to the collection and connects the action's triggered(bool) signal to the specified receiver/member.

The newly created action is also returned.

Note
Using KStandardAction::OpenRecent will cause a different signal than triggered(bool) to be used, see KStandardAction for more information.

The action can be retrieved later from the collection by its standard name as per KStandardAction::stdName.

The KActionCollection takes ownership of the action object.

Parameters
actionTypeThe standard action type of the action to create.
receiverThe QObject to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
memberThe SLOT to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
Returns
new action of the given type ActionType.

Definition at line 373 of file kactioncollection.cpp.

QAction * KActionCollection::addAction ( KStandardAction::StandardAction  actionType,
const QString name,
const QObject receiver = nullptr,
const char *  member = nullptr 
)

Creates a new standard action, adds to the collection under the given name and connects the action's triggered(bool) signal to the specified receiver/member.

The newly created action is also returned.

Note
Using KStandardAction::OpenRecent will cause a different signal than triggered(bool) to be used, see KStandardAction for more information.

The action can be retrieved later from the collection by the specified name.

The KActionCollection takes ownership of the action object.

Parameters
actionTypeThe standard action type of the action to create.
nameThe name by which the action be retrieved again from the collection.
receiverThe QObject to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
memberThe SLOT to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
Returns
new action of the given type ActionType.

Definition at line 379 of file kactioncollection.cpp.

QAction* KActionCollection::addAction ( KStandardAction::StandardAction  actionType,
const QString name,
const Receiver *  receiver,
Func  slot 
)
inline

This is the same as addAction(KStandardAction::StandardAction actionType, const QString &name, const QObject *receiver, const char *member) using new style connect syntax.

Parameters
actionTypeThe standard action type of the action to create.
nameThe name by which the action be retrieved again from the collection.
receiverThe QObject to connect the triggered(bool) signal to.
slotThe slot or lambda to connect the triggered(bool) signal to.
Returns
new action of the given type ActionType.
See also
addAction(KStandardAction::StandardAction, const QString &, const QObject *, const char *)
Since
5.80

Definition at line 430 of file kactioncollection.h.

QAction * KActionCollection::addAction ( const QString name,
const QObject receiver = nullptr,
const char *  member = nullptr 
)

Creates a new action under the given name to the collection and connects the action's triggered(bool) signal to the specified receiver/member.

The newly created action is returned.

NOTE: KDE prior to 4.2 used the triggered() signal instead of the triggered(bool) signal.

Inserting an action that was previously inserted under a different name will replace the old entry, i.e. the action will not be available under the old name anymore but only under the new one.

Inserting an action under a name that is already used for another action will replace the other action in the collection.

The KActionCollection takes ownership of the action object.

Parameters
nameThe name by which the action be retrieved again from the collection.
receiverThe QObject to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
memberThe SLOT to connect the triggered(bool) signal to. Leave nullptr if no connection is desired.
Returns
new action of the given type ActionType.

Definition at line 393 of file kactioncollection.cpp.

QAction* KActionCollection::addAction ( const QString name,
const Receiver *  receiver,
Func  slot 
)
inline

This is the same as addAction(const QString &name, const QObject *receiver, const char *member) using new style connect syntax.

Parameters
nameThe internal name of the action (e.g. "file-open").
receiverThe QObject to connect the triggered(bool) signal to.
slotThe slot or lambda to connect the triggered(bool) signal to.
Returns
new action of the given type ActionType.
See also
addAction(const QString &, const QObject *, const char *)
Since
5.28

Definition at line 540 of file kactioncollection.h.

void KActionCollection::addActions ( const QList< QAction * > &  actions)

Adds a list of actions to the collection.

The objectName of the actions is used as their internal name in the collection.

The ownership of the action objects is not transferred. If the action is destroyed it will be removed automatically from the KActionCollection.

Uses addAction(const QString&, QAction*).

Parameters
actionsthe list of the actions to add.
See also
addAction()
Since
5.0

Definition at line 341 of file kactioncollection.cpp.

void KActionCollection::addAssociatedWidget ( QWidget widget)

Associate all actions in this collection to the given widget, including any actions added after this association is made.

This does not change the action's shortcut context, so if you need to have the actions only trigger when the widget has focus, you'll need to set the shortcut context on each action to Qt::WidgetShortcut (or better still, Qt::WidgetWithChildrenShortcut with Qt 4.4+)

Definition at line 801 of file kactioncollection.cpp.

const QList< KActionCollection * > & KActionCollection::allCollections ( )
static

Access the list of all action collections in existence for this app.

Definition at line 787 of file kactioncollection.cpp.

QList< QWidget * > KActionCollection::associatedWidgets ( ) const

Return a list of all associated widgets.

Definition at line 857 of file kactioncollection.cpp.

void KActionCollection::associateWidget ( QWidget widget) const

Associate all actions in this collection to the given widget.

Unlike addAssociatedWidget(), this method only adds all current actions in the collection to the given widget. Any action added after this call will not be added to the given widget automatically. So this is just a shortcut for a foreach loop and a widget->addAction call.

Definition at line 792 of file kactioncollection.cpp.

void KActionCollection::changed ( )
signal

Emitted when an action has been inserted into, or removed from, this action collection.

Since
5.66
void KActionCollection::clear ( )

Clears the entire action collection, deleting all actions.

Definition at line 131 of file kactioncollection.cpp.

void KActionCollection::clearAssociatedWidgets ( )

Clear all associated widgets and remove the actions from those widgets.

Definition at line 862 of file kactioncollection.cpp.

QString KActionCollection::componentDisplayName ( ) const

The display name for the associated component.

Definition at line 195 of file kactioncollection.cpp.

QString KActionCollection::componentName ( ) const

The component name with which this class is associated.

Definition at line 185 of file kactioncollection.cpp.

QString KActionCollection::configGroup ( ) const

Returns the KConfig group with which settings will be loaded and saved.

bool KActionCollection::configIsGlobal ( ) const

Returns whether this action collection's configuration should be global to KDE ( true ), or specific to the application ( false ).

void KActionCollection::connectNotify ( const QMetaMethod signal)
overrideprotectedvirtual

Overridden to perform connections when someone wants to know whether an action was highlighted or triggered.

Reimplemented from QObject.

Definition at line 757 of file kactioncollection.cpp.

int KActionCollection::count ( ) const

Returns the number of actions in the collection.

This is equivalent to actions().count().

Definition at line 155 of file kactioncollection.cpp.

QKeySequence KActionCollection::defaultShortcut ( QAction action) const

Get the default primary shortcut for the given action.

Parameters
actionthe action for which the default primary shortcut should be returned.
Returns
the default primary shortcut of the given action
Since
5.0

Definition at line 402 of file kactioncollection.cpp.

QList< QKeySequence > KActionCollection::defaultShortcuts ( QAction action) const

Get the default shortcuts for the given action.

Parameters
actionthe action for which the default shortcuts should be returned.
Returns
the default shortcuts of the given action
Since
5.0

Definition at line 408 of file kactioncollection.cpp.

void KActionCollection::exportGlobalShortcuts ( KConfigGroup config,
bool  writeDefaults = false 
) const

Export the current configurable global key associations to config.

Since
4.1
Parameters
configConfig object to save to
writeDefaultsset to true to write settings which are already at defaults.

Definition at line 518 of file kactioncollection.cpp.

void KActionCollection::importGlobalShortcuts ( KConfigGroup config)

Import from config all configurable global key associations.

Since
4.1
Parameters
configConfig object to read from

Definition at line 456 of file kactioncollection.cpp.

void KActionCollection::inserted ( QAction action)
signal

Indicates that action was inserted into this action collection.

bool KActionCollection::isEmpty ( ) const

Returns whether the action collection is empty or not.

Definition at line 160 of file kactioncollection.cpp.

bool KActionCollection::isShortcutsConfigurable ( QAction action) const

Returns true if the given action's shortcuts may be configured by the user.

Parameters
actionthe action for the hint should be verified.
Since
5.0

Definition at line 424 of file kactioncollection.cpp.

const KXMLGUIClient * KActionCollection::parentGUIClient ( ) const

The parent KXMLGUIClient, or null if not available.

Definition at line 206 of file kactioncollection.cpp.

void KActionCollection::readSettings ( KConfigGroup config = nullptr)

Read all key associations from config.

If config is zero, read all key associations from the application's configuration file KSharedConfig::openConfig(), in the group set by setConfigGroup().

Definition at line 487 of file kactioncollection.cpp.

void KActionCollection::removeAction ( QAction action)

Removes an action from the collection and deletes it.

Parameters
actionThe action to remove.

Definition at line 348 of file kactioncollection.cpp.

void KActionCollection::removeAssociatedWidget ( QWidget widget)

Remove an association between all actions in this collection and the given widget, i.e.

remove those actions from the widget, and stop associating newly added actions as well.

Definition at line 813 of file kactioncollection.cpp.

QT_MOC_COMPAT void KActionCollection::removed ( QAction action)
signal

Indicates that action was removed from this action collection.

Deprecated:
Since 5.0, use changed() (added in 5.66) instead.
void KActionCollection::setComponentDisplayName ( const QString displayName)

Set the component display name associated with this action collection.

(e.g. for the toolbar editor) KXMLGUIClient::setComponentName takes care of calling this.

Definition at line 190 of file kactioncollection.cpp.

void KActionCollection::setComponentName ( const QString componentName)

Set the componentName associated with this action collection.

Warning
Don't call this method on a KActionCollection that contains actions. This is not supported.
Parameters
componentDatathe name which is to be associated with this action collection, or QString() to indicate the app name. This is used to load/save settings into XML files. KXMLGUIClient::setComponentName takes care of calling this.

Definition at line 165 of file kactioncollection.cpp.

void KActionCollection::setConfigGlobal ( bool  global)

Set whether this action collection's configuration should be global to KDE ( true ), or specific to the application ( false ).

Definition at line 451 of file kactioncollection.cpp.

void KActionCollection::setConfigGroup ( const QString group)

Sets group as the KConfig group with which settings will be loaded and saved.

Definition at line 441 of file kactioncollection.cpp.

void KActionCollection::setDefaultShortcut ( QAction action,
const QKeySequence shortcut 
)

Set the default shortcut for the given action.

Since 5.2, this also calls action->setShortcut(shortcut), i.e. the default shortcut is made active initially.

Parameters
actionthe action for which the default shortcut should be set.
shortcutthe shortcut to use for the given action in its specified shortcutContext()
Since
5.0

Definition at line 413 of file kactioncollection.cpp.

void KActionCollection::setDefaultShortcuts ( QAction action,
const QList< QKeySequence > &  shortcuts 
)

Set the default shortcuts for the given action.

Since 5.2, this also calls action->setShortcuts(shortcuts), i.e. the default shortcut is made active initially.

Parameters
actionthe action for which the default shortcut should be set.
shortcutsthe shortcuts to use for the given action in its specified shortcutContext()
Since
5.0

Definition at line 418 of file kactioncollection.cpp.

void KActionCollection::setShortcutsConfigurable ( QAction action,
bool  configurable 
)

Indicate whether the user may configure the action's shortcuts.

Parameters
actionthe action for the hint should be verified.
configurableset to true if the shortcuts of the given action may be configured by the user, otherwise false.
Since
5.0

Definition at line 431 of file kactioncollection.cpp.

void KActionCollection::slotActionHighlighted ( )
protectedvirtualslot
Deprecated:
Since 5.0. Replaced by slotActionHovered();

Definition at line 723 of file kactioncollection.cpp.

QAction * KActionCollection::takeAction ( QAction action)

Removes an action from the collection.

The ownership of the action object is not changed.

Parameters
actionthe action to remove.

Definition at line 353 of file kactioncollection.cpp.

void KActionCollection::writeSettings ( KConfigGroup config = nullptr,
bool  writeDefaults = false,
QAction oneAction = nullptr 
) const

Write the current configurable key associations to config.

What the function does if config is zero depends. If this action collection belongs to a KXMLGUIClient the setting are saved to the kxmlgui definition file. If not the settings are written to the applications config file.

Note
oneAction and writeDefaults have no meaning for the kxmlgui configuration file.
Parameters
configConfig object to save to, or null (see above)
writeDefaultsset to true to write settings which are already at defaults.
oneActionpass an action here if you just want to save the values for one action, eg. if you know that action is the only one which has changed.

Definition at line 644 of file kactioncollection.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Aug 2 2021 22:50:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.