• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KGlobalAccel Class Reference

#include <kglobalaccel.h>

Inheritance diagram for KGlobalAccel:

Inheritance graph
[legend]

List of all members.


Detailed Description

Configurable global shortcut support.

KGlobalAccel allows you to have global accelerators that are independent of the focused window. Unlike regular shortcuts, the application's window does not need focus for them to be activated.

See also:
KKeyChooser

KKeyDialog

Definition at line 44 of file kglobalaccel.h.


Public Member Functions

QList< QStringList > allActionsForComponent (const QStringList &actionId)
QList< QStringList > allMainComponents ()
bool isEnabled () const
void overrideMainComponentData (const KComponentData &componentData)
void setEnabled (bool enabled)

Static Public Member Functions

static QStringList findActionNameSystemwide (const QKeySequence &seq)
static bool promptStealShortcutSystemwide (QWidget *parent, const QStringList &actionIdentifier, const QKeySequence &seq)
static KGlobalAccel * self ()
static void stealShortcutSystemwide (const QKeySequence &seq)

Member Function Documentation

QList< QStringList > KGlobalAccel::allActionsForComponent ( const QStringList &  actionId  ) 

Return the full actionIds of all actions with global shortcuts for the main component specified by actionId.

Only the the ComponentUnique part of actionId will be used; the other members of the actionId QStringList will be ignored.

Definition at line 411 of file kglobalaccel.cpp.

QList< QStringList > KGlobalAccel::allMainComponents (  ) 

Return the unique and common names of all main components that have global shortcuts.

The action strings of the returned actionId stringlists will be empty.

Definition at line 405 of file kglobalaccel.cpp.

QStringList KGlobalAccel::findActionNameSystemwide ( const QKeySequence &  seq  )  [static]

Return the name of the action that uses the given key sequence.

This applies to all actions with global shortcuts in any KDE application.

See also:
promptStealShortcutSystemwide(), stealShorctutSystemwide()

Definition at line 418 of file kglobalaccel.cpp.

bool KGlobalAccel::isEnabled (  )  const

Checks whether the accelerators are enabled.

Returns:
true if the KGlobalAccel is enabled

Definition at line 121 of file kglobalaccel.cpp.

void KGlobalAccel::overrideMainComponentData ( const KComponentData &  componentData  ) 

Set the KComponentData for which to manipulate shortcuts.

This is for exceptional situations, when you want to modify the shortcuts of another application as if they were yours. You cannot have your own working global shortcuts in a module/application using this special functionality. All global shortcuts of KActions will essentially be proxies. Be sure to set the default global shortcuts of the proxy KActions to the same as those on the receiving end. An example use case is the KControl Module for the window manager KWin, which has no own facility for users to change its global shortcuts.

Parameters:
componentData a KComponentData about the application for which you want to manipulate shortcuts.

Definition at line 147 of file kglobalaccel.cpp.

bool KGlobalAccel::promptStealShortcutSystemwide ( QWidget *  parent,
const QStringList &  actionIdentifier,
const QKeySequence &  seq 
) [static]

Show a messagebox to inform the user that a global shorcut is already occupied, and ask to take it away from its current action.

This is GUI only, so nothing will be actually changed.

See also:
stealShorctutSystemwide()

Definition at line 425 of file kglobalaccel.cpp.

KGlobalAccel * KGlobalAccel::self (  )  [static]

Returns (and creates if necessary) the singleton instance.

Definition at line 154 of file kglobalaccel.cpp.

void KGlobalAccel::setEnabled ( bool  enabled  ) 

Enables or disables the KGlobalAccel.

Parameters:
enabled true if the KGlobalAccel should be enabled, false if it should be disabled.

Definition at line 127 of file kglobalaccel.cpp.

void KGlobalAccel::stealShortcutSystemwide ( const QKeySequence &  seq  )  [static]

Take away the given shortcut from the named action it belongs to.

This applies to all actions with global shortcuts in any KDE application.

See also:
promptStealShortcutSystemwide()

Definition at line 444 of file kglobalaccel.cpp.


The documentation for this class was generated from the following files:
  • kglobalaccel.h
  • kglobalaccel.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal