KAccelBase Class Reference

Inheritance diagram for KAccelBase:

KAccelPrivate KGlobalAccelPrivate KGlobalAccelPrivate KGlobalAccelPrivate List of all members.

Detailed Description

Definition at line 121 of file kaccelbase.h.


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
virtual bool isEnabledInternal () const

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

Member Enumeration Documentation

enum KAccelBase::Init
 

Initialization mode of the KAccelBase, used in constructor.

Definition at line 125 of file kaccelbase.h.

enum KAccelBase::Signal
 

Enum for kinds of signals which may be emitted.

Definition at line 128 of file kaccelbase.h.


Constructor & Destructor Documentation

KAccelBase::KAccelBase int  fInitCode  ) 
 

Constructor.

fInitCode should be a bitwise OR of values from the Init enum.

Definition at line 46 of file kaccelbase.cpp.


Member Function Documentation

uint KAccelBase::actionCount  )  const
 

Returns number of actions in this handler.

Definition at line 63 of file kaccelbase.cpp.

KAccelAction * KAccelBase::actionPtr const KKeyServer::Key key  ) 
 

Basically the same as above, except a KKeyServer::Key already has a key mapping defined (either NATIVE_KEYS or not).

Definition at line 78 of file kaccelbase.cpp.

KAccelAction * KAccelBase::actionPtr const KKey key  ) 
 

Returns a pointer to the KAccelAction associated with the key key.

This function takes into account the key mapping defined in the constructor.

May return 0 if no (or more than one) action is associated with the key.

Definition at line 86 of file kaccelbase.cpp.

const KAccelAction * KAccelBase::actionPtr const QString sAction  )  const
 

Const version of the above.

Definition at line 75 of file kaccelbase.cpp.

KAccelAction * KAccelBase::actionPtr const QString sAction  ) 
 

Returns a pointer to the KAccelAction named sAction.

Definition at line 72 of file kaccelbase.cpp.

KAccelActions & KAccelBase::actions  ) 
 

Returns a list of all the actions in this handler.

Definition at line 64 of file kaccelbase.cpp.

const QString& KAccelBase::configGroup  )  const [inline]
 

Returns the name of the configuration group these accelerators are stored in.

The default is "Shortcuts".

Definition at line 163 of file kaccelbase.h.

bool KAccelBase::getAutoUpdate  )  [inline]
 

Returns whether autoupdate is enabled for these accelerators.

Definition at line 171 of file kaccelbase.h.

bool KAccelBase::isEnabled  )  const
 

Returns whether this accelerator handler is enabled or not.

Definition at line 65 of file kaccelbase.cpp.

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 567 of file kaccelbase.cpp.

bool KAccelBase::setAutoUpdate bool  bAuto  ) 
 

Enables (or disables) autoupdate for these accelerators.

Returns:
the value of autoupdate before the call.

Definition at line 119 of file kaccelbase.cpp.

void KAccelBase::setConfigGroup const QString group  ) 
 

Set the group (in the configuration file) for storing accelerators.

Definition at line 93 of file kaccelbase.cpp.

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 574 of file kaccelbase.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys