kdecore Library API Documentation

KAccelBase Class Reference

Inheritance diagram for KAccelBase:

KAccelPrivate KGlobalAccelPrivate KGlobalAccelPrivate KGlobalAccelPrivate List of all members.

Public Types

enum  Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 }
enum  Signal { KEYCODE_CHANGED }

Public Member Functions

 KAccelBase (int fInitCode)
virtual ~KAccelBase ()
uint actionCount () const
KAccelActionsactions ()
bool isEnabled () const
KAccelActionactionPtr (const QString &sAction)
const KAccelActionactionPtr (const QString &sAction) const
KAccelActionactionPtr (const KKey &key)
KAccelActionactionPtr (const KKeyServer::Key &key)
const QStringconfigGroup () const
void setConfigGroup (const QString &group)
void setConfigGlobal (bool global)
virtual void setEnabled (bool bEnabled)=0
bool getAutoUpdate ()
bool setAutoUpdate (bool bAuto)
KAccelActioninsert (const QString &sName, const QString &sDesc)
KAccelActioninsert (const QString &sAction, const QString &sDesc, const QString &sHelp, const KShortcut &rgCutDefaults3, const KShortcut &rgCutDefaults4, const QObject *pObjSlot, const char *psMethodSlot, bool bConfigurable=true, bool bEnabled=true)
bool remove (const QString &sAction)
bool setActionSlot (const QString &sAction, const QObject *pObjSlot, const char *psMethodSlot)
bool updateConnections ()
bool setShortcut (const QString &sAction, const KShortcut &cut)
bool setActionEnabled (const QString &sAction, bool bEnable)
void readSettings (KConfigBase *pConfig=0)
void writeSettings (KConfigBase *pConfig=0) const
QPopupMenucreatePopupMenu (QWidget *pParent, const KKeySequence &)

Protected Types

typedef QMap< KKeyServer::Key,
ActionInfo
KKeyToActionMap

Protected Member Functions

void slotRemoveAction (KAccelAction *)
void createKeyList (QValueVector< struct X > &rgKeys)
bool insertConnection (KAccelAction *)
bool removeConnection (KAccelAction *)
virtual bool emitSignal (Signal)=0
virtual bool connectKey (KAccelAction &, const KKeyServer::Key &)=0
virtual bool connectKey (const KKeyServer::Key &)=0
virtual bool disconnectKey (KAccelAction &, const KKeyServer::Key &)=0
virtual bool disconnectKey (const KKeyServer::Key &)=0

Protected Attributes

KAccelActions m_rgActions
KKeyToActionMap m_mapKeyToAction
QValueList< KAccelAction * > m_rgActionsNonUnique
bool m_bNativeKeys
bool m_bEnabled
bool m_bConfigIsGlobal
QString m_sConfigGroup
bool m_bAutoUpdate
KAccelActionmtemp_pActionRemoving

Friends

class KAccelActions

Classes

struct  ActionInfo

Detailed Description

Definition at line 121 of file kaccelbase.h.


Member Function Documentation

void KAccelBase::readSettings KConfigBase pConfig = 0  ) 
 

Read all key associations from config, or (if config is zero) from the application's configuration file KGlobal::config().

The group in which the configuration is stored can be set with setConfigGroup().

Definition at line 562 of file kaccelbase.cpp.

References m_bAutoUpdate, m_rgActions, m_sConfigGroup, KAccelActions::readActions(), and updateConnections().

Referenced by KGlobalAccel::readSettings(), and KAccel::readSettings().

void KAccelBase::writeSettings KConfigBase pConfig = 0  )  const
 

Write the current configurable associations to config, or (if config is zero) to the application's configuration file.

Definition at line 569 of file kaccelbase.cpp.

References m_bConfigIsGlobal, m_rgActions, m_sConfigGroup, and KAccelActions::writeActions().

Referenced by KGlobalAccel::writeSettings(), and KAccel::writeSettings().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Nov 1 10:31:52 2005 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003