KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Properties | List of all members
KWin::ShortcutHandler Class Reference

#include <shortcuthandler.h>

Inheritance diagram for KWin::ShortcutHandler:

Signals

void nameChanged ()
 
void textChanged ()
 
void sequenceChanged ()
 
void activated ()
 

Public Member Functions

 ShortcutHandler (QObject *parent=nullptr)
 
void classBegin () override
 
void componentComplete () override
 
QString name () const
 
void setName (const QString &name)
 
QString text () const
 
void setText (const QString &text)
 
QVariant sequence () const
 
void setSequence (const QVariant &sequence)
 

Properties

QString name
 
QString text
 
QVariant sequence
 

Detailed Description

The ShortcutHandler type provides a way to register global key shorcuts.

Example usage:

name: "Activate Something"
text: i18n("Activate Something")
sequence: "Meta+Ctrl+S"
onActivated: doSomething()
}

Definition at line 32 of file shortcuthandler.h.

Constructor & Destructor Documentation

◆ ShortcutHandler()

KWin::ShortcutHandler::ShortcutHandler ( QObject * parent = nullptr)
explicit

Definition at line 17 of file shortcuthandler.cpp.

Member Function Documentation

◆ activated

void KWin::ShortcutHandler::activated ( )
signal

◆ classBegin()

void KWin::ShortcutHandler::classBegin ( )
override

Definition at line 22 of file shortcuthandler.cpp.

◆ componentComplete()

void KWin::ShortcutHandler::componentComplete ( )
override

Definition at line 26 of file shortcuthandler.cpp.

◆ name()

QString KWin::ShortcutHandler::name ( ) const

Definition at line 44 of file shortcuthandler.cpp.

◆ nameChanged

void KWin::ShortcutHandler::nameChanged ( )
signal

◆ sequence()

QVariant KWin::ShortcutHandler::sequence ( ) const

Definition at line 77 of file shortcuthandler.cpp.

◆ sequenceChanged

void KWin::ShortcutHandler::sequenceChanged ( )
signal

◆ setName()

void KWin::ShortcutHandler::setName ( const QString & name)

Definition at line 49 of file shortcuthandler.cpp.

◆ setSequence()

void KWin::ShortcutHandler::setSequence ( const QVariant & sequence)

Definition at line 82 of file shortcuthandler.cpp.

◆ setText()

void KWin::ShortcutHandler::setText ( const QString & text)

Definition at line 66 of file shortcuthandler.cpp.

◆ text()

QString KWin::ShortcutHandler::text ( ) const

Definition at line 61 of file shortcuthandler.cpp.

◆ textChanged

void KWin::ShortcutHandler::textChanged ( )
signal

Property Documentation

◆ name

QString KWin::ShortcutHandler::name
readwrite

This property specifies the unique shortcut identifier, not localized.

The shortcut name cannot be changed once the ShortcutHandler is constructed.

Definition at line 42 of file shortcuthandler.h.

◆ sequence

QVariant KWin::ShortcutHandler::sequence
readwrite

This property holds the key sequence for this shortcut. The key sequence can be specified using a string containing a sequence of keys that are needed to be pressed to activate the shortcut, e.g. Meta+K.

The key sequence is optional. If omitted, the user can assign a key sequence to this shortcut in system settings.

The key sequence cannot be changed once the ShortcutHandler is constructed.

Definition at line 57 of file shortcuthandler.h.

◆ text

QString KWin::ShortcutHandler::text
readwrite

This property specifies human readable name of the shortcut.

Definition at line 46 of file shortcuthandler.h.


The documentation for this class was generated from the following files: