Search for usage in LXR

GlobalShortcut Class Reference

#include <globalshortcut.h>

Public Member Functions

 GlobalShortcut (const QString &uniqueName, const QString &friendlyName, GlobalShortcutContext *context)
GlobalShortcutContextcontext ()
GlobalShortcutContext const * context () const
QList< int > defaultKeys () const
QString friendlyName () const
bool isActive () const
bool isFresh () const
bool isPresent () const
bool isSessionShortcut () const
QList< int > keys () const
 operator KGlobalShortcutInfo () const
void setActive ()
void setDefaultKeys (const QList< int >)
void setFriendlyName (const QString &)
void setInactive ()
void setIsFresh (bool)
void setIsPresent (bool)
void setKeys (const QList< int >)
QString uniqueName () const
void unRegister ()

Detailed Description

Represents a global shortcut.

This class can handle multiple keys (default and active). This feature isn't used currently. kde4 only allows setting one key per global shortcut.
Michael Jansen [email protected][email protected]icha[email protected]el-ja[email protected]nsen[email protected].biz

Definition at line 25 of file globalshortcut.h.

Member Function Documentation

GlobalShortcutContext * GlobalShortcut::context ( )

Returns the context the shortcuts belongs to.

Definition at line 98 of file globalshortcut.cpp.

QList< int > GlobalShortcut::defaultKeys ( ) const

Returns the default keys for this shortcut.

Definition at line 156 of file globalshortcut.cpp.

QString GlobalShortcut::friendlyName ( ) const

Return the friendly display name for this shortcut.

Definition at line 118 of file globalshortcut.cpp.

bool GlobalShortcut::isActive ( ) const

Check if the shortcut is active. It's keys are grabbed.

Definition at line 66 of file globalshortcut.cpp.

bool GlobalShortcut::isFresh ( ) const

Check if the shortcut is fresh/new. Is an internal state.

Definition at line 71 of file globalshortcut.cpp.

bool GlobalShortcut::isPresent ( ) const

Check if the shortcut is present. It application is running.

Definition at line 76 of file globalshortcut.cpp.

bool GlobalShortcut::isSessionShortcut ( ) const

Returns true if the shortcut is a session shortcut.

Definition at line 81 of file globalshortcut.cpp.

QList< int > GlobalShortcut::keys ( ) const

Returns a list of keys associated with this shortcut.

Definition at line 128 of file globalshortcut.cpp.

void GlobalShortcut::setActive ( )

Activates the shortcut. The keys are grabbed.

Definition at line 166 of file globalshortcut.cpp.

void GlobalShortcut::setDefaultKeys ( const QList< int >  newKeys)

Sets the default keys for this shortcut.

Definition at line 161 of file globalshortcut.cpp.

void GlobalShortcut::setFriendlyName ( const QString name)

Sets the friendly name for the shortcut. For display.

Definition at line 123 of file globalshortcut.cpp.

void GlobalShortcut::setInactive ( )

Sets the shortcut inactive. No longer grabs the keys.

Definition at line 183 of file globalshortcut.cpp.

void GlobalShortcut::setKeys ( const QList< int >  newKeys)

Sets the keys activated with this shortcut. The old keys are freed.

Definition at line 133 of file globalshortcut.cpp.

QString GlobalShortcut::uniqueName ( ) const

Returns the unique name aka id for the shortcuts.

Definition at line 108 of file globalshortcut.cpp.

void GlobalShortcut::unRegister ( )

Remove this shortcut and it's siblings.

Definition at line 113 of file globalshortcut.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Oct 22 2021 22:55:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.