.TH "KGlobalAccel" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KGlobalAccel \- KGlobalAccel allows you to have global accelerators that are independent of the focused window. Configurable global shortcut support.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kglobalaccel.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKGlobalAccel\fP (\fBQObject\fP *pParent, const  char *psName=0)"
.br
.RI "\fICreates a new KGlobalAccel object with the given \fBpParent\fP and \fBpsName\fP. \fP"
.ti -1c
.RI "bool \fBisEnabled\fP ()"
.br
.RI "\fIChecks whether the accelerators are enabled. \fP"
.ti -1c
.RI "void \fBsetEnabled\fP (bool bEnabled)"
.br
.RI "\fIChecks whether the accelerators are enabled. \fP"
.ti -1c
.RI "KAccelAction * \fBinsert\fP (const  \fBQString\fP &sAction, const  \fBQString\fP &sLabel, const  \fBQString\fP &sWhatsThis, const  KShortcut &cutDef3, const  KShortcut &cutDef4, const  \fBQObject\fP *pObjSlot, const  char *psMethodSlot, bool bConfigurable=true, bool bEnabled=true)"
.br
.RI "\fICreate an accelerator action. \fP"
.ti -1c
.RI "bool \fBremove\fP (const  \fBQString\fP &sAction)"
.br
.RI "\fIRemoves the accelerator action identified by the name. \fP"
.ti -1c
.RI "KAccelAction * \fBinsert\fP (const  \fBQString\fP &sName, const  \fBQString\fP &sLabel)"
.br
.RI "\fIUse this to insert a label into the action list. \fP"
.ti -1c
.RI "bool \fBupdateConnections\fP ()"
.br
.RI "\fIUpdates the connections of the accelerations after changing them. \fP"
.ti -1c
.RI "const  KShortcut & \fBshortcut\fP (const  \fBQString\fP &sAction) const "
.br
.RI "\fISet the shortcut to be associated with the action named by \fCsAction\fP. \fP"
.ti -1c
.RI "bool \fBsetShortcut\fP (const  \fBQString\fP &sAction, const  KShortcut &shortcut)"
.br
.RI "\fISet the shortcut to be associated with the action named by \fCsAction\fP. \fP"
.ti -1c
.RI "bool \fBsetSlot\fP (const  \fBQString\fP &sAction, const  \fBQObject\fP *pObjSlot, const  char *psMethodSlot)"
.br
.RI "\fISet the slot to be called when the shortcut of the action named by \fCsAction\fP is pressed. \fP"
.ti -1c
.RI "bool \fBsetEnabled\fP (const  \fBQString\fP &sAction, bool bEnabled)"
.br
.RI "\fIEnable or disable the action named by \fCsAction\fP. \fP"
.ti -1c
.RI "const  \fBQString\fP & \fBconfigGroup\fP () const "
.br
.RI "\fIReturns the configuration group that is used to save the accelerators. \fP"
.ti -1c
.RI "void \fBsetConfigGroup\fP (const  \fBQString\fP &cg)"
.br
.RI "\fISets the configuration group that is used to save the accelerators. \fP"
.ti -1c
.RI "bool \fBreadSettings\fP (\fBKConfigBase\fP *pConfig=0)"
.br
.RI "\fIRead all shortcuts from \fCpConfig\fP, or (if \fCpConfig\fP is zero) from the application's configuration file \fBKGlobal::config\fP(). \fP"
.ti -1c
.RI "bool \fBwriteSettings\fP (\fBKConfigBase\fP *pConfig=0) const "
.br
.RI "\fIWrite the current shortcuts to \fCpConfig\fP, or (if \fCpConfig\fP is zero) to the application's configuration file. \fP"
.ti -1c
.RI "bool \fBwriteSettings\fP (\fBKConfigBase\fP *pConfig, bool bGlobal) const "
.br
.RI "\fIWrite the current shortcuts to \fCpConfig\fP, or (if \fCpConfig\fP is zero) to the application's configuration file. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "bool \fBuseFourModifierKeys\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKGlobalAccelPrivate\fP"
.br
.ti -1c
.RI "class \fBKAccelShortcutList\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
KGlobalAccel allows you to have global accelerators that are independent of the focused window. Configurable global shortcut support. 

Unlike \fBKAccel\fP it does not matter which window is currently active.
.PP
\fBSee also:\fP
.RS 4
\fBKAccel\fP 
.PP
\fBKAccelShortcutList\fP 
.PP
\fBKKeyChooser\fP 
.PP
\fBKKeyDialog\fP 
.RE
.PP

.PP
Definition at line 45 of file kglobalaccel.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KGlobalAccel::KGlobalAccel (\fBQObject\fP * pParent, const char * psName = 0)"
.PP
Creates a new KGlobalAccel object with the given \fBpParent\fP and \fBpsName\fP. \fBParameters:\fP
.RS 4
\fIpParent\fP the parent of the \fBQObject\fP 
.br
\fIpsName\fP the name of the \fBQObject\fP
.RE
.PP
Definition at line 16 of file kglobalaccel.cpp.
.SH "Member Function Documentation"
.PP 
.SS "bool KGlobalAccel::isEnabled ()"
.PP
Checks whether the accelerators are enabled. \fBReturns:\fP
.RS 4
true if the KGlobalAccel is enabled
.RE
.PP
Definition at line 39 of file kglobalaccel.cpp.
.SS "void KGlobalAccel::setEnabled (bool bEnabled)"
.PP
Checks whether the accelerators are enabled. \fBReturns:\fP
.RS 4
true if the KGlobalAccel is enabled
.RE
.PP
Definition at line 42 of file kglobalaccel.cpp.
.SS "KAccelAction * KGlobalAccel::insert (const \fBQString\fP & sAction, const \fBQString\fP & sLabel, const \fBQString\fP & sWhatsThis, const KShortcut & cutDef3, const KShortcut & cutDef4, const \fBQObject\fP * pObjSlot, const char * psMethodSlot, bool bConfigurable = true, bool bEnabled = true)"
.PP
Create an accelerator action. Usage: 
.PP
.nf

 insert( 'Do Something', i18n('Do Something'),
   i18n('This action allows you to do something really great with this program to '
        'the currently open document.'),
   ALT+CTRL+Key_Q, KKey::QtWIN+CTRL+Key_Q, this, SLOT(slotDoSomething()) );
	 *
.PP
.PP
\fBParameters:\fP
.RS 4
\fIsAction\fP The internal name of the action. 
.br
\fIsLabel\fP An i18n'ized short description of the action displayed when using \fBKKeyChooser\fP to reconfigure the shortcuts. 
.br
\fIsWhatsThis\fP An extended description of the action. 
.br
\fIcutDef3\fP The default 3 modifier scheme shortcut. 
.br
\fIcutDef4\fP The default 4 modifier scheme shortcut. 
.br
\fIpObjSlot\fP Pointer to the slot object. 
.br
\fIpsMethodSlot\fP Pointer to the slot method. 
.br
\fIbConfigurable\fP Allow the user to change this shortcut if set to 'true'. 
.br
\fIbEnabled\fP The action will be activated by the shortcut if set to 'true'.
.RE
.PP
Definition at line 45 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::remove (const \fBQString\fP & sAction)"
.PP
Removes the accelerator action identified by the name. Remember to also call \fBupdateConnections()\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIsAction\fP the name of the action to remove 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 61 of file kglobalaccel.cpp.
.SS "KAccelAction * KGlobalAccel::insert (const \fBQString\fP & sName, const \fBQString\fP & sLabel)"
.PP
Use this to insert a label into the action list. This will be displayed when the user configures shortcuts. 
.PP
\fBParameters:\fP
.RS 4
\fIsName\fP of the of the action to insert 
.br
\fIsLabel\fP a user-readable (i18n!) name for the action 
.RE
.PP
\fBReturns:\fP
.RS 4
the KAccelAction of the action
.RE
.PP
Definition at line 56 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::updateConnections ()"
.PP
Updates the connections of the accelerations after changing them. \fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP
Definition at line 58 of file kglobalaccel.cpp.
.SS "const  KShortcut & KGlobalAccel::shortcut (const \fBQString\fP & sAction) const"
.PP
Set the shortcut to be associated with the action named by \fCsAction\fP. \fBParameters:\fP
.RS 4
\fIsAction\fP the name of the action 
.RE
.PP
\fBReturns:\fP
.RS 4
the shortcut. If the action does not exist a null shortcut will be returned.
.RE
.PP
Definition at line 64 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::setShortcut (const \fBQString\fP & sAction, const KShortcut & shortcut)"
.PP
Set the shortcut to be associated with the action named by \fCsAction\fP. \fBParameters:\fP
.RS 4
\fIsAction\fP the name of the action 
.br
\fIshortcut\fP the shortcut for the action 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP
Definition at line 70 of file kglobalaccel.cpp.
.PP
References KStdAction::cut().
.SS "bool KGlobalAccel::setSlot (const \fBQString\fP & sAction, const \fBQObject\fP * pObjSlot, const char * psMethodSlot)"
.PP
Set the slot to be called when the shortcut of the action named by \fCsAction\fP is pressed. \fBParameters:\fP
.RS 4
\fIsAction\fP the name of the action 
.br
\fIpObjSlot\fP the receiver of the signal 
.br
\fIpsMethodSlot\fP the slot to receive the signal 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP
Definition at line 72 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::setEnabled (const \fBQString\fP & sAction, bool bEnabled)"
.PP
Enable or disable the action named by \fCsAction\fP. \fBParameters:\fP
.RS 4
\fIsAction\fP the name of the action 
.br
\fIbEnabled\fP true to enable, false to disable 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.SS "const  \fBQString\fP & KGlobalAccel::configGroup () const"
.PP
Returns the configuration group that is used to save the accelerators. \fBReturns:\fP
.RS 4
the configuration group 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKConfig\fP
.RE
.PP
Definition at line 75 of file kglobalaccel.cpp.
.SS "void KGlobalAccel::setConfigGroup (const \fBQString\fP & cg)"
.PP
Sets the configuration group that is used to save the accelerators. \fBParameters:\fP
.RS 4
\fIcg\fP the configuration group 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKConfig\fP
.RE
.PP
Definition at line 78 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::readSettings (\fBKConfigBase\fP * pConfig = 0)"
.PP
Read all shortcuts from \fCpConfig\fP, or (if \fCpConfig\fP is zero) from the application's configuration file \fBKGlobal::config\fP(). \fBParameters:\fP
.RS 4
\fIpConfig\fP the configuration file to read from, or 0 for the application configuration file 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP
Definition at line 81 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::writeSettings (\fBKConfigBase\fP * pConfig = 0) const"
.PP
Write the current shortcuts to \fCpConfig\fP, or (if \fCpConfig\fP is zero) to the application's configuration file. \fBParameters:\fP
.RS 4
\fIpConfig\fP the configuration file to read from, or 0 for the application configuration file 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSince:\fP
.RS 4
3.1
.RE
.PP
Definition at line 83 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::writeSettings (\fBKConfigBase\fP * pConfig, bool bGlobal) const"
.PP
Write the current shortcuts to \fCpConfig\fP, or (if \fCpConfig\fP is zero) to the application's configuration file. Alternatively, if bGlobal is true, then write to kdeglobals. 
.PP
\fBParameters:\fP
.RS 4
\fIpConfig\fP the configuration file to read from, or 0 for the application configuration file 
.br
\fIbGlobal\fP if true write the configuration to the kde global settings 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP
Definition at line 85 of file kglobalaccel.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
