KActionCollection class Reference (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KActionCollection Class Reference

A managed set of KAction objects. More...

`#include <kaction.h>`

Inheritance diagram for KActionCollection:

[legend]
Collaboration diagram for KActionCollection:

[legend]
List of all members.

## Public Slots
void | clear ()
| Clears the entire actionCollection, deleting all actions.
## 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)
| Use this constructor if you want the collection's actions to restrict their accelerator keys to `watch` rather than the `parent`.
| KActionCollection (const KActionCollection &copy)
virtual void | setWidget (QWidget *widget)
| This sets the widget to which the keyboard shortcuts should be attached.
void | setAutoConnectShortcuts (bool)
| This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction.
bool | isAutoConnectShortcuts ()
bool | addDocCollection (KActionCollection *pDoc)
| Doc/View model.
virtual KAccel * | accel ()
| This class or method is obsolete, it is provided for compatibility only. Deprecated because of ambiguous name.
virtual const KAccel * | accel () const
KAccel * | kaccel ()
| Returns the KAccel object of the most recently set widget.
const KAccel * | kaccel () const
KAccel * | builderKAccel () const
virtual uint | count () const
| Returns the KAccel object associated with widget #.
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)
| Used for reading shortcut configuration from a non-XML rc file.
bool | writeShortcutSettings (const QString &sConfigGroup=QString::null, KConfigBase *pConfig=0) const
| Used for writing shortcut configuration to a non-XML rc file.
void | setInstance (KInstance *instance)
KInstance * | instance () const
void | setXMLFile (const QString &)
| Use this to tell the KActionCollection what rc file its configuration is stored in.
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 *)
void | remove (KAction *)
KAction * | take (KAction *)
KActionCollection | operator+ (const KActionCollection &) const
KActionCollection & | operator= (const KActionCollection &)
KActionCollection & | operator+= (const KActionCollection &)
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)
## Friends
class | KAction
class | KXMLGUIClient

## Detailed Description

A managed set of KAction objects.

Definition at line 1761 of file kaction.h.

## Constructor & Destructor Documentation

KActionCollection::KActionCollection | ( | QWidget * | watch,
|  | QObject * | parent,
|  | const char * | name = 0,
|  | KInstance * | instance = 0
| ) |

| Use this constructor if you want the collection's actions to restrict their accelerator keys to `watch` rather than the `parent`. If you don't require shortcuts, you can pass a null to the `watch` parameter. Definition at line 3103 of file kaction.cpp. References KStdAccel::name(), and setWidget().

## Member Function Documentation

void KActionCollection::setWidget | ( | QWidget * | widget | ) | `[virtual]`

| 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 3153 of file kaction.cpp. Referenced by KActionCollection(), and KEditToolbarWidget::KEditToolbarWidget().

void KActionCollection::setAutoConnectShortcuts | ( | bool |  | ) |

| 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 3168 of file kaction.cpp.

bool KActionCollection::addDocCollection | ( | KActionCollection * | pDoc | ) |

| Doc/View model. This lets you add the action collection of a document to a view's action collection. Definition at line 3178 of file kaction.cpp.

KAccel * KActionCollection::accel | ( |  | ) | `[virtual]`

| This class or method is obsolete, it is provided for compatibility only. Deprecated because of ambiguous name. Use kaccel() Definition at line 3367 of file kaction.cpp. References kaccel().

KAccel * KActionCollection::kaccel | ( |  | ) |

| Returns the KAccel object of the most recently set widget. Definition at line 3283 of file kaction.cpp. Referenced by accel().

uint KActionCollection::count | ( |  | ) | const`[virtual]`

| Returns the KAccel object associated with widget #. Definition at line 3416 of file kaction.cpp.

bool KActionCollection::readShortcutSettings | ( | const QString & | sConfigGroup = QString::null,
|  | KConfigBase * | pConfig = 0
| ) |

| Used for reading shortcut configuration from a non-XML rc file. Definition at line 3406 of file kaction.cpp.

bool KActionCollection::writeShortcutSettings | ( | const QString & | sConfigGroup = QString::null,
|  | KConfigBase * | pConfig = 0
| ) | const

| Used for writing shortcut configuration to a non-XML rc file. Definition at line 3411 of file kaction.cpp.

void KActionCollection::setXMLFile | ( | const QString & |  | ) |

| Use this to tell the KActionCollection what rc file its configuration is stored in. Definition at line 3471 of file kaction.cpp. Referenced by KXMLGUIClient::setXMLFile().

void KActionCollection::clear | ( |  | ) | `[slot]`

| Clears the entire actionCollection, deleting all actions. See also: #remove Definition at line 3366 of file kaction.cpp.

The documentation for this class was generated from the following files:

- kaction.h
- kaction.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:58:40 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001