org.kde.koala

Class KGlobalAccel

public class KGlobalAccel extends QObject

KGlobalAccel allows you to have global accelerators that are independent of the focused window. Unlike KAccel it does not matter which window is currently active.

See Also: KAccel KAccelShortcutList KKeyChooser KKeyDialog

UNKNOWN: Configurable global shortcut support.

Constructor Summary
protected KGlobalAccel(Class dummy)
KGlobalAccel(QObject pParent, String psName)
Creates a new KGlobalAccel object with the given pParent and psName.
KGlobalAccel(QObject pParent)
Method Summary
static voidblockShortcuts(boolean block)
StringclassName()
StringconfigGroup()
Returns the configuration group that is used to save the accelerators.
voiddisableBlocking(boolean disable)
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
KAccelActioninsert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, QObject pObjSlot, String psMethodSlot, boolean bConfigurable, boolean bEnabled)
Create an accelerator action.
KAccelActioninsert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, QObject pObjSlot, String psMethodSlot, boolean bConfigurable)
KAccelActioninsert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, QObject pObjSlot, String psMethodSlot)
KAccelActioninsert(String sName, String sLabel)
Use this to insert a label into the action list.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisEnabled()
Checks whether the accelerators are enabled.
Stringlabel(String sAction)
Return the label (i18n'ized short description) associated with the action named by sAction.
QMetaObjectmetaObject()
booleanreadSettings(KConfigBase pConfig)
Read all shortcuts from pConfig, or (if pConfig is zero) from the application's configuration file KGlobal.config().
booleanreadSettings()
booleanremove(String sAction)
Removes the accelerator action identified by the name.
booleansetActionEnabled(String sAction, boolean bEnable)
Enables or disables action sAction.
voidsetConfigGroup(String cg)
Sets the configuration group that is used to save the accelerators.
booleansetShortcut(String sAction, KShortcut shortcut)
Set the shortcut to be associated with the action named by sAction.
booleansetSlot(String sAction, QObject pObjSlot, String psMethodSlot)
Set the slot to be called when the shortcut of the action named by sAction is pressed.
KShortcutshortcut(String sAction)
Return the shortcut associated with the action named by sAction.
booleanupdateConnections()
Updates the connections of the accelerations after changing them.
static booleanuseFourModifierKeys()
KAccelActions.useFourModifierKeys().
booleanwriteSettings(KConfigBase pConfig)
Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration file.
booleanwriteSettings()
booleanwriteSettings(KConfigBase pConfig, boolean bGlobal)
Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration file.

Constructor Detail

KGlobalAccel

protected KGlobalAccel(Class dummy)

KGlobalAccel

public KGlobalAccel(QObject pParent, String psName)
Creates a new KGlobalAccel object with the given pParent and psName.

Parameters: pParent the parent of the QObject psName the name of the QObject

UNKNOWN: Creates a new KGlobalAccel object with the given pParent and psName.

KGlobalAccel

public KGlobalAccel(QObject pParent)

Method Detail

blockShortcuts

public static void blockShortcuts(boolean block)

UNKNOWN:

className

public String className()

configGroup

public String configGroup()
Returns the configuration group that is used to save the accelerators.

Returns: the configuration group

See Also: KConfig

UNKNOWN: Returns the configuration group that is used to save the accelerators.

disableBlocking

public void disableBlocking(boolean disable)

UNKNOWN:

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

insert

public KAccelAction insert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, QObject pObjSlot, String psMethodSlot, boolean bConfigurable, boolean bEnabled)
Create an accelerator action. Usage:
		 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()") );
		

Parameters: sAction The internal name of the action. sLabel An i18n'ized short description of the action displayed when using KKeyChooser to reconfigure the shortcuts. sWhatsThis An extended description of the action. cutDef3 The default 3 modifier scheme shortcut. cutDef4 The default 4 modifier scheme shortcut. pObjSlot Pointer to the slot object. psMethodSlot Pointer to the slot method. bConfigurable Allow the user to change this shortcut if set to 'true'. bEnabled The action will be activated by the shortcut if set to 'true'.

UNKNOWN: Create an accelerator action.

insert

public KAccelAction insert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, QObject pObjSlot, String psMethodSlot, boolean bConfigurable)

insert

public KAccelAction insert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, QObject pObjSlot, String psMethodSlot)

insert

public KAccelAction insert(String sName, String sLabel)
Use this to insert a label into the action list. This will be displayed when the user configures shortcuts.

Parameters: sName of the of the action to insert sLabel a user-readable (i18n!) name for the action

Returns: the KAccelAction of the action

UNKNOWN: Use this to insert a label into the action list.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isEnabled

public boolean isEnabled()
Checks whether the accelerators are enabled.

Returns: true if the KGlobalAccel is enabled

UNKNOWN: Checks whether the accelerators are enabled.

label

public String label(String sAction)
Return the label (i18n'ized short description) associated with the action named by sAction.

Parameters: sAction the name of the action

Returns: the label

UNKNOWN: Return the label (i18n'ized short description) associated with the action named by sAction.

metaObject

public QMetaObject metaObject()

readSettings

public boolean readSettings(KConfigBase pConfig)
Read all shortcuts from pConfig, or (if pConfig is zero) from the application's configuration file KGlobal.config().

Parameters: pConfig the configuration file to read from, or 0 for the application configuration file

Returns: true if successful, false otherwise

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

readSettings

public boolean readSettings()

remove

public boolean remove(String sAction)
Removes the accelerator action identified by the name. Remember to also call updateConnections().

Parameters: sAction the name of the action to remove

UNKNOWN: Removes the accelerator action identified by the name.

setActionEnabled

public boolean setActionEnabled(String sAction, boolean bEnable)
Enables or disables action sAction.

UNKNOWN: Enables or disables action sAction.

setConfigGroup

public void setConfigGroup(String cg)
Sets the configuration group that is used to save the accelerators.

Parameters: cg the configuration group

See Also: KConfig

UNKNOWN: Sets the configuration group that is used to save the accelerators.

setShortcut

public boolean setShortcut(String sAction, KShortcut shortcut)
Set the shortcut to be associated with the action named by sAction.

Parameters: sAction the name of the action shortcut the shortcut for the action

Returns: true if successful, false otherwise

UNKNOWN: Set the shortcut to be associated with the action named by sAction.

setSlot

public boolean setSlot(String sAction, QObject pObjSlot, String psMethodSlot)
Set the slot to be called when the shortcut of the action named by sAction is pressed.

Parameters: sAction the name of the action pObjSlot the receiver of the signal psMethodSlot the slot to receive the signal

Returns: true if successful, false otherwise

UNKNOWN: Set the slot to be called when the shortcut of the action named by sAction is pressed.

shortcut

public KShortcut shortcut(String sAction)
Return the shortcut associated with the action named by sAction.

Parameters: sAction the name of the action

Returns: the shortcut. If the action does not exist a null shortcut will be returned.

UNKNOWN: Return the shortcut associated with the action named by sAction.

updateConnections

public boolean updateConnections()
Updates the connections of the accelerations after changing them.

Returns: true if successful, false otherwise

UNKNOWN: Updates the connections of the accelerations after changing them.

useFourModifierKeys

public static boolean useFourModifierKeys()
KAccelActions.useFourModifierKeys().

UNKNOWN:

writeSettings

public boolean writeSettings(KConfigBase pConfig)
Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration file.

Parameters: pConfig the configuration file to read from, or 0 for the application configuration file

Returns: true if successful, false otherwise

UNKNOWN: Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration file.

writeSettings

public boolean writeSettings()

writeSettings

public boolean writeSettings(KConfigBase pConfig, boolean bGlobal)
Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration file. Alternatively, if bGlobal is true, then write to kdeglobals.

Parameters: pConfig the configuration file to read from, or 0 for the application configuration file bGlobal if true write the configuration to the kde global settings

Returns: true if successful, false otherwise

UNKNOWN: Write the current shortcuts to pConfig, or (if pConfig is zero) to the application's configuration file.