.TH "KGlobalAccel" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.ti -1c
.RI "bool \fBisEnabled\fP ()"
.br
.ti -1c
.RI "void \fBsetEnabled\fP (bool bEnabled)"
.br
.ti -1c
.RI "KAccelAction * \fBinsert\fP (const \fBQString\fP &sAction, const \fBQString\fP &sLabel, const \fBQString\fP &sWhatsThis, const \fBKShortcut\fP &cutDef3, const \fBKShortcut\fP &cutDef4, const \fBQObject\fP *pObjSlot, const char *psMethodSlot, bool bConfigurable=true, bool bEnabled=true)"
.br
.ti -1c
.RI "bool \fBremove\fP (const \fBQString\fP &sAction)"
.br
.ti -1c
.RI "KAccelAction * \fBinsert\fP (const \fBQString\fP &sName, const \fBQString\fP &sLabel)"
.br
.ti -1c
.RI "bool \fBupdateConnections\fP ()"
.br
.ti -1c
.RI "const \fBKShortcut\fP & \fBshortcut\fP (const \fBQString\fP &sAction) const "
.br
.ti -1c
.RI "bool \fBsetShortcut\fP (const \fBQString\fP &sAction, const \fBKShortcut\fP &shortcut)"
.br
.ti -1c
.RI "bool \fBsetSlot\fP (const \fBQString\fP &sAction, const \fBQObject\fP *pObjSlot, const char *psMethodSlot)"
.br
.ti -1c
.RI "bool \fBsetActionEnabled\fP (const \fBQString\fP &sAction, bool bEnable)"
.br
.ti -1c
.RI "\fBQString\fP \fBlabel\fP (const \fBQString\fP &sAction) const "
.br
.ti -1c
.RI "const \fBQString\fP & \fBconfigGroup\fP () const "
.br
.ti -1c
.RI "void \fBsetConfigGroup\fP (const \fBQString\fP &cg)"
.br
.ti -1c
.RI "bool \fBreadSettings\fP (\fBKConfigBase\fP *pConfig=0)"
.br
.ti -1c
.RI "bool \fBwriteSettings\fP (\fBKConfigBase\fP *pConfig=0) const "
.br
.ti -1c
.RI "bool \fBwriteSettings\fP (\fBKConfigBase\fP *pConfig, bool bGlobal) const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static 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 = \fC0\fP)"
.PP
Creates a new KGlobalAccel object with the given pParent and psName. 
.PP
\fBParameters:\fP
.RS 4
\fIpParent\fP the parent of the \fBQObject\fP 
.br
\fIpsName\fP the name of the \fBQObject\fP
.RE
.PP

.PP
Definition at line 39 of file kglobalaccel.cpp.
.PP
References endl().
.SH "Member Function Documentation"
.PP 
.SS "bool KGlobalAccel::isEnabled ()"
.PP
Checks whether the accelerators are enabled. 
.PP
\fBReturns:\fP
.RS 4
true if the KGlobalAccel is enabled
.RE
.PP

.PP
Definition at line 62 of file kglobalaccel.cpp.
.SS "void KGlobalAccel::setEnabled (bool bEnabled)"
.PP
Enables or disables the KGlobalAccel. 
.PP
\fBParameters:\fP
.RS 4
\fIbEnabled\fP true if the KGlobalAccel should be enabled, false if it should be disabled.
.RE
.PP

.PP
Definition at line 65 of file kglobalaccel.cpp.
.SS "KAccelAction * KGlobalAccel::insert (const \fBQString\fP & sAction, const \fBQString\fP & sLabel, const \fBQString\fP & sWhatsThis, const \fBKShortcut\fP & cutDef3, const \fBKShortcut\fP & cutDef4, const \fBQObject\fP * pObjSlot, const char * psMethodSlot, bool bConfigurable = \fCtrue\fP, bool bEnabled = \fCtrue\fP)"
.PP
Create an accelerator action. 
.PP
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()) );
     *

.fi
.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

.PP
Definition at line 68 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::remove (const \fBQString\fP & sAction)"
.PP
Removes the accelerator action identified by the name. 
.PP
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

.PP
Definition at line 84 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. 
.PP
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

.PP
Definition at line 79 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::updateConnections ()"
.PP
Updates the connections of the accelerations after changing them. 
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise
.RE
.PP

.PP
Definition at line 81 of file kglobalaccel.cpp.
.SS "const \fBKShortcut\fP & KGlobalAccel::shortcut (const \fBQString\fP & sAction) const"
.PP
Return the shortcut associated with the action named by \fCsAction\fP. 
.PP
\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

.PP
Definition at line 87 of file kglobalaccel.cpp.
.PP
References KShortcut::null().
.SS "bool KGlobalAccel::setShortcut (const \fBQString\fP & sAction, const \fBKShortcut\fP & shortcut)"
.PP
Set the shortcut to be associated with the action named by \fCsAction\fP. 
.PP
\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

.PP
Definition at line 93 of file kglobalaccel.cpp.
.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. 
.PP
\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

.PP
Definition at line 95 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::setActionEnabled (const \fBQString\fP & sAction, bool bEnable)"
.PP
Enables or disables action \fCsAction\fP. 
.PP
\fBSince:\fP
.RS 4
3.4 
.RE
.PP

.PP
Definition at line 102 of file kglobalaccel.cpp.
.SS "\fBQString\fP KGlobalAccel::label (const \fBQString\fP & sAction) const"
.PP
Return the label (i18n'ized short description) associated with the action named by \fCsAction\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIsAction\fP the name of the action 
.RE
.PP
\fBReturns:\fP
.RS 4
the label 
.RE
.PP
\fBSince:\fP
.RS 4
3.3
.RE
.PP

.PP
Definition at line 97 of file kglobalaccel.cpp.
.SS "const \fBQString\fP & KGlobalAccel::configGroup () const"
.PP
Returns the configuration group that is used to save the accelerators. 
.PP
\fBReturns:\fP
.RS 4
the configuration group 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKConfig\fP
.RE
.PP

.PP
Definition at line 107 of file kglobalaccel.cpp.
.SS "void KGlobalAccel::setConfigGroup (const \fBQString\fP & cg)"
.PP
Sets the configuration group that is used to save the accelerators. 
.PP
\fBParameters:\fP
.RS 4
\fIcg\fP the configuration group 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKConfig\fP
.RE
.PP

.PP
Definition at line 110 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::readSettings (\fBKConfigBase\fP * pConfig = \fC0\fP)"
.PP
Read all shortcuts from \fCpConfig\fP, or (if \fCpConfig\fP is zero) from the application's configuration file \fBKGlobal::config()\fP. 
.PP
\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

.PP
Definition at line 113 of file kglobalaccel.cpp.
.SS "bool KGlobalAccel::writeSettings (\fBKConfigBase\fP * pConfig = \fC0\fP) const"
.PP
Write the current shortcuts to \fCpConfig\fP, or (if \fCpConfig\fP is zero) to the application's configuration file. 
.PP
\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

.PP
Definition at line 115 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. 
.PP
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

.PP
Definition at line 117 of file kglobalaccel.cpp.

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