Search for usage in LXR

GlobalShortcut Class Reference

#include <globalshortcut.h>

Public Member Functions

 GlobalShortcut (const QString &uniqueName, const QString &friendlyName, GlobalShortcutContext *context)
GlobalShortcutContextcontext ()
const GlobalShortcutContextcontext () const
QList< QKeySequencedefaultKeys () const
QString friendlyName () const
bool isActive () const
bool isFresh () const
bool isPresent () const
bool isSessionShortcut () const
QList< QKeySequencekeys () const
 operator KGlobalShortcutInfo () const
void setActive ()
void setDefaultKeys (const QList< QKeySequence > &)
void setFriendlyName (const QString &)
void setInactive ()
void setIsFresh (bool)
void setIsPresent (bool)
void setKeys (const QList< QKeySequence > &)
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 26 of file globalshortcut.h.

Member Function Documentation

◆ context()

const GlobalShortcutContext * GlobalShortcut::context ( )

Returns the context the shortcuts belongs to.

Definition at line 96 of file globalshortcut.cpp.

◆ defaultKeys()

QList< QKeySequence > GlobalShortcut::defaultKeys ( ) const

Returns the default keys for this shortcut.

Definition at line 164 of file globalshortcut.cpp.

◆ friendlyName()

QString GlobalShortcut::friendlyName ( ) const

Return the friendly display name for this shortcut.

Definition at line 116 of file globalshortcut.cpp.

◆ isActive()

bool GlobalShortcut::isActive ( ) const

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

Definition at line 60 of file globalshortcut.cpp.

◆ isFresh()

bool GlobalShortcut::isFresh ( ) const

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

Definition at line 65 of file globalshortcut.cpp.

◆ isPresent()

bool GlobalShortcut::isPresent ( ) const

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

Definition at line 70 of file globalshortcut.cpp.

◆ isSessionShortcut()

bool GlobalShortcut::isSessionShortcut ( ) const

Returns true if the shortcut is a session shortcut.

Definition at line 75 of file globalshortcut.cpp.

◆ keys()

QList< QKeySequence > GlobalShortcut::keys ( ) const

Returns a list of keys associated with this shortcut.

Definition at line 126 of file globalshortcut.cpp.

◆ setActive()

void GlobalShortcut::setActive ( )

Activates the shortcut. The keys are grabbed.

Definition at line 174 of file globalshortcut.cpp.

◆ setDefaultKeys()

void GlobalShortcut::setDefaultKeys ( const QList< QKeySequence > &  newKeys)

Sets the default keys for this shortcut.

Definition at line 169 of file globalshortcut.cpp.

◆ setFriendlyName()

void GlobalShortcut::setFriendlyName ( const QString name)

Sets the friendly name for the shortcut. For display.

Definition at line 121 of file globalshortcut.cpp.

◆ setInactive()

void GlobalShortcut::setInactive ( )

Sets the shortcut inactive. No longer grabs the keys.

Definition at line 191 of file globalshortcut.cpp.

◆ setKeys()

void GlobalShortcut::setKeys ( const QList< QKeySequence > &  newKeys)

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

Definition at line 131 of file globalshortcut.cpp.

◆ uniqueName()

QString GlobalShortcut::uniqueName ( ) const

Returns the unique name aka id for the shortcuts.

Definition at line 106 of file globalshortcut.cpp.

◆ unRegister()

void GlobalShortcut::unRegister ( )

Remove this shortcut and it's siblings.

Definition at line 111 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-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:10:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.