KActionCollection Class Reference
A managed set of KAction objects. More...
#include <kactioncollection.h>
Inheritance diagram for KActionCollection:

Public Slots | |
void | clear () |
Signals | |
void | inserted (KAction *) |
void | removed (KAction *) |
void | actionHighlighted (KAction *action) |
void | actionHighlighted (KAction *action, bool highlight) |
void | actionStatusText (const QString &text) |
void | clearStatusText () |
Public Member Functions | |
KActionCollection (QWidget *parent, const char *name=0, KInstance *instance=0) | |
KActionCollection (QWidget *watch, QObject *parent, const char *name=0, KInstance *instance=0) | |
KActionCollection (const KActionCollection ©) | |
virtual void | setWidget (QWidget *widget) |
void | setAutoConnectShortcuts (bool) |
bool | isAutoConnectShortcuts () |
bool | addDocCollection (KActionCollection *pDoc) |
virtual KAccel * | accel () KDE_DEPRECATED |
virtual const KAccel * | accel () const KDE_DEPRECATED |
KAccel * | kaccel () |
const KAccel * | kaccel () const |
KAccel * | builderKAccel () const |
virtual uint | count () const |
bool | isEmpty () const |
virtual KAction * | action (int index) const |
virtual KAction * | action (const char *name, const char *classname=0) const |
virtual QStringList | groups () const |
virtual KActionPtrList | actions (const QString &group) const |
virtual KActionPtrList | actions () const |
bool | readShortcutSettings (const QString &sConfigGroup=QString::null, KConfigBase *pConfig=0) |
bool | writeShortcutSettings (const QString &sConfigGroup=QString::null, KConfigBase *pConfig=0) const |
void | setInstance (KInstance *instance) |
KInstance * | instance () const |
void | setXMLFile (const QString &) |
const QString & | xmlFile () const |
void | setHighlightingEnabled (bool enable) |
bool | highlightingEnabled () const |
void | connectHighlight (QWidget *container, KAction *action) |
void | disconnectHighlight (QWidget *container, KAction *action) |
KActionCollection (QObject *parent, const char *name=0, KInstance *instance=0) | |
void | insert (KAction *action) |
void | remove (KAction *action) |
KAction * | take (KAction *action) |
KActionCollection | operator+ (const KActionCollection &) const |
KActionCollection & | operator= (const KActionCollection &) |
KActionCollection & | operator+= (const KActionCollection &) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
A managed set of KAction objects.
Definition at line 64 of file kactioncollection.h.
Constructor & Destructor Documentation
|
Use this constructor if you want the collection's actions to restrict their accelerator keys to
If you don't require shortcuts, you can pass a null to the Definition at line 87 of file kactioncollection.cpp. References endl(), kdDebug(), and setWidget(). |
Member Function Documentation
|
This sets the widget to which the keyboard shortcuts should be attached. You only need to call this if a null pointer was passed in the constructor. Definition at line 137 of file kactioncollection.cpp. References endl(), kdWarning(), and setWidget(). Referenced by KActionCollection(), and setWidget(). |
|
This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction. Set to 'false' if you will be loading XML-based settings. This is automatically done by KParts. The default is 'true'.
Definition at line 152 of file kactioncollection.cpp. References setAutoConnectShortcuts(). Referenced by setAutoConnectShortcuts(). |
|
This indicates whether new actions which are created in this collection have their keyboard shortcuts automatically connected on construction.
Definition at line 157 of file kactioncollection.cpp. |
|
Doc/View model. This lets you add the action collection of a document to a view's action collection. Definition at line 162 of file kactioncollection.cpp. References addDocCollection(). Referenced by addDocCollection(). |
|
Definition at line 354 of file kactioncollection.cpp. References kaccel(). |
|
Definition at line 355 of file kactioncollection.cpp. References kaccel(). |
|
Returns the KAccel object of the most recently set widget.
Definition at line 267 of file kactioncollection.cpp. Referenced by accel(). |
|
Returns the KAccel object of the most recently set widget. Const version for convenience. Definition at line 276 of file kactioncollection.cpp. |
|
Returns the number of actions in the collection.
Definition at line 403 of file kactioncollection.cpp. |
|
Return the KAction* at position "index" in the action collection.
Definition at line 385 of file kactioncollection.cpp. References action(), and QAsciiDictIterator::current(). Referenced by KXMLGUIClient::action(), action(), and KXMLGUIClient::stateChanged(). |
|
Find an action (optionally, of a given subclass of KAction) in the action collection.
Definition at line 358 of file kactioncollection.cpp. References action(), and QAsciiDictIterator::current(). |
|
Returns a list of all the groups of all the KActions in this action collection.
Definition at line 408 of file kactioncollection.cpp. References QAsciiDictIterator::current(). |
|
Returns the list of actions in a particular managed by this action collection.
Definition at line 420 of file kactioncollection.cpp. References QValueList::append(), QAsciiDictIterator::current(), and QString::isEmpty(). |
|
Returns the list of actions managed by this action collection.
Definition at line 434 of file kactioncollection.cpp. References QValueList::append(), and QAsciiDictIterator::current(). |
|
Used for reading shortcut configuration from a non-XML rc file.
Definition at line 393 of file kactioncollection.cpp. References readShortcutSettings(). Referenced by readShortcutSettings(). |
|
Used for writing shortcut configuration to a non-XML rc file.
Definition at line 398 of file kactioncollection.cpp. References writeShortcutSettings(). Referenced by writeShortcutSettings(). |
|
The instance with which this class is associated.
Definition at line 453 of file kactioncollection.cpp. Referenced by KKeyChooser::insert(), KPasteTextAction::plug(), KToolBarPopupAction::plug(), KActionMenu::plug(), KRecentFilesAction::plug(), and KAction::plug(). |
|
Use this to tell the KActionCollection what rc file its configuration is stored in.
Definition at line 458 of file kactioncollection.cpp. References setXMLFile(). Referenced by KXMLGUIClient::setXMLFile(), and setXMLFile(). |
|
The rc file in which the current configuration is stored.
Definition at line 463 of file kactioncollection.cpp. |
|
Enable highlighting notification for specific KActions.
Definition at line 468 of file kactioncollection.cpp. References setHighlightingEnabled(). Referenced by setHighlightingEnabled(). |
|
Return whether highlighting notifications are enabled.
Definition at line 473 of file kactioncollection.cpp. |
|
Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar.
Definition at line 478 of file kactioncollection.cpp. References QPtrList::append(), connectHighlight(), and QObject::destroyed(). Referenced by connectHighlight(), KActionMenu::plug(), and KAction::plug(). |
|
Disconnect highlight notifications for a particular pair of contianer and action.
Definition at line 511 of file kactioncollection.cpp. References QPtrList::count(), disconnectHighlight(), and QPtrList::removeRef(). Referenced by disconnectHighlight(), and KAction::unplug(). |
|
Emitted when "action" is highlighted.
|
|
Emitted when "action" is highlighed or loses highlighting.
|
|
Add an action to the collection. Generally you don't have to call this. The action inserts itself automatically into its parent collection. This can be useful however for a short-lived collection (e.g. for a popupmenu, where the signals from the collection are needed too). (don't forget that in the simple case, a list of actions should be a simple KActionPtrList). If you manually insert actions into a 2nd collection, don't forget to take them out again before destroying the collection.
Definition at line 350 of file kactioncollection.cpp. References insert(). Referenced by insert(). |
|
Removes an action from the collection and deletes it. Since the KAction destructor removes the action from the collection, you generally don't have to call this.
Definition at line 351 of file kactioncollection.cpp. References remove(). Referenced by remove(). |
|
Removes an action from the collection. Since the KAction destructor removes the action from the collection, you generally don't have to call this.
Definition at line 352 of file kactioncollection.cpp. References take(). Referenced by take(), and KAction::~KAction(). |
|
Clears the entire actionCollection, deleting all actions.
Definition at line 353 of file kactioncollection.cpp. |
The documentation for this class was generated from the following files: