class KAccelActions

A collection of accelerator actions. More...

Internal Use Only
Definition#include <kaccelaction.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

This class represents a collection of KAccelAction objects.

See also: KAccelAction

 KAccelActions ()

KAccelActions

Creates a new, empty KAccelActions object.

 KAccelActions ( const KAccelActions& )

KAccelActions

Copy constructor (deep copy).

 ~KAccelActions ()

~KAccelActions

[virtual]

void  clear ()

clear

Removes all items from this collection.

bool  init ( const KAccelActions &actions )

init

Initializes this object with the given actions. It will make a deep copy of all actions.

Parameters:
actionsthe actions to copy

Returns: true if successful, false otherwise

bool  init ( KConfigBase& config, const QString& sGroup )

init

Loads the actions from the given configuration file.

Parameters:
configthe configuration file to load from
sGroupthe group in the configuration file

Returns: true if successful, false otherwise

void  updateShortcuts ( KAccelActions &shortcuts )

updateShortcuts

Updates the shortcuts of all actions in this object with the shortcuts from the given object.

Parameters:
shortcutsthe collection that contains the new shortcuts

int  actionIndex ( const QString& sAction )

actionIndex

[const]

Retrieves the index of the action with the given name.

Parameters:
sActionthe action to search

Returns: the index of the action, or -1 if not found

KAccelAction*  actionPtr ( uint index )

actionPtr

Returns the action with the given index.

Parameters:
indexthe index of an action. You must not use an index that is too high.

Returns: the KAccelAction with the given index

See also: count()

const KAccelAction*  actionPtr ( uint index )

actionPtr

[const]

Returns the action with the given index.

Parameters:
indexthe index of an action. You must not use an index that is too high.

Returns: the KAccelAction with the given index

See also: count()

KAccelAction*  actionPtr ( const QString& sAction )

actionPtr

Returns the action with the given name.

Parameters:
aActionthe name of the action to search

Returns: the KAccelAction with the given name, or 0 if not found

const KAccelAction*  actionPtr ( const QString& sAction )

actionPtr

[const]

Returns the action with the given name.

Parameters:
aActionthe name of the action to search

Returns: the KAccelAction with the given name, or 0 if not found

KAccelAction*  actionPtr ( KKeySequence cut )

actionPtr

Returns the action with the given key sequence.

Parameters:
cutthe sequence to search for

Returns: the KAccelAction with the given sequence, or 0 if not found

KAccelAction&  operator [] ( uint index )

operator []

Returns the action with the given index.

Parameters:
indexthe index of an action. You must not use an index that is too high.

Returns: the KAccelAction with the given index

See also: actionPtr(), count()

const KAccelAction&  operator [] ( uint index )

operator []

[const]

Returns the action with the given index.

Parameters:
indexthe index of an action. You must not use an index that is too high.

Returns: the KAccelAction with the given index

See also: actionPtr(), count()

KAccelAction*  insert ( const QString& sAction, const QString& sLabel, const QString& sWhatsThis, const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, const QObject* pObjSlot = 0, const char* psMethodSlot = 0, bool bConfigurable = true, bool bEnabled = true )

insert

Inserts an action into the collection.

Parameters:
sNamethe name of the accelerator
sLabelthe label of the accelerator (i18n!)
sWhatsThisthe What's This text (18n!)
cutDef3the default shortcut for 3 modifier systems
cutDef4the default shortcut for 4 modifier systems
pObjSlotthe receiver of a signal when the key has been pressed
psMethodSlotthe slot to connect for key presses. Receives an int, as set by setID(), as only argument
bConfigurableif true the user can configure the shortcut
bEnabledtrue if the accelerator should be enabled

Returns: the new action

KAccelAction*  insert ( const QString& sName, const QString& sLabel )

insert

Inserts an action into the collection.

Parameters:
sNamethe name of the accelerator
sLabelthe label of the accelerator (i18n!)

Returns: the new action

bool  remove ( const QString& sAction )

remove

Removes the given action.

Parameters:
sActionthe name of the action.

Returns: true if successful, false otherwise

bool  readActions ( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 )

readActions

Loads the actions from the given configuration file.

Parameters:
sConfigGroupthe group in the configuration file
pConfigthe configuration file to load from

Returns: true if successful, false otherwise

bool  writeActions ( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0, bool bWriteAll = false, bool bGlobal = false )

writeActions

[const]

Writes the actions to the given configuration file.

Parameters:
sConfigGroupthe group in the configuration file
pConfigthe configuration file to save to
bWriteAlltrue to write all actions
bGlobaltrue to write to the global configuration file

Returns: true if successful, false otherwise

void  emitKeycodeChanged ()

emitKeycodeChanged

Emit a keycodeChanged signal.

uint  count ()

count

[const]

Returns the number of actions in the collection.

Returns: the number of actions

KAccelBase* m_pKAccelBase

m_pKAccelBase

[protected]

KAccelAction** m_prgActions

m_prgActions

[protected]

uint m_nSizeAllocated

m_nSizeAllocated

[protected]

uint m_nSize

m_nSize

[protected]

void  resize ( uint )

resize

[protected]

void  insertPtr ( KAccelAction* )

insertPtr

[protected]


Generated by: caleb on tcdevel on Tue Jan 28 12:54:04 2003, using kdoc $.