kdeui Library API Documentation

KActionCollection Class Reference

A managed set of KAction objects. More...

#include <kaction.h>

Inheritance diagram for KActionCollection:

QObject List of all members.

Public Slots

void clear ()
 Clears the entire actionCollection, deleting all actions.


Public Methods

 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.

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 addDocCollection (KActionCollection *pDoc)
 Doc/View model.

virtual KAccelaccel ()
KAccelkaccel ()
 Returns the KAccel object of the most recently set widget.

virtual uint count () const
 Returns the KAccel object associated with widget #.

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 setXMLFile (const QString &)
 Use this to tell the KActionCollection what rc file its configuration is stored in.


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

References KNotifyClient::instance(), QObject::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 3157 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 3172 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 3182 of file kaction.cpp.

KAccel * KActionCollection::accel   [virtual]
 

Deprecated:
Deprecated because of ambiguous name. Use kaccel()

Definition at line 3371 of file kaction.cpp.

References kaccel().

KAccel * KActionCollection::kaccel  
 

Returns the KAccel object of the most recently set widget.

Definition at line 3287 of file kaction.cpp.

Referenced by accel().

uint KActionCollection::count   [virtual]
 

Returns the KAccel object associated with widget #.

Definition at line 3420 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 3410 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 3415 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 3475 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 3370 of file kaction.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:03 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001