LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
The shortcuts utilities

Classes and functions related to shortcuts handling. More...

Classes

class  LC::Util::ShortcutManager
 Aids in providing configurable shortcuts. More...
 

Functions

void LC::Util::CreateShortcuts (const QList< QKeySequence > &seqs, const std::function< void()> &func, QWidget *parent)
 Makes func invokable with shortcuts in seq. More...
 
void LC::Util::CreateShortcuts (const QList< QKeySequence > &seqs, QObject *object, const char *metamethod, QWidget *parent)
 Makes metamethod invokable with shortcuts in seq. More...
 

Detailed Description

Classes and functions related to shortcuts handling.

Function Documentation

◆ CreateShortcuts() [1/2]

UTIL_SHORTCUTS_API void LC::Util::CreateShortcuts ( const QList< QKeySequence > &  seqs,
const std::function< void()> &  func,
QWidget *  parent 
)

Makes func invokable with shortcuts in seq.

This function creates one QShortcut object per each key sequence in seqs and calls func when one of the shortcuts is activated.

If seqs is empty, this function does nothing.

Parameters
[in]seqsThe list of key sequences to handle.
[in]funcThe function to invoke when one of key sequences in seqs is activated.
[in]parentThe parent object for the shortcuts.

Definition at line 19 of file util.cpp.

◆ CreateShortcuts() [2/2]

UTIL_SHORTCUTS_API void LC::Util::CreateShortcuts ( const QList< QKeySequence > &  seqs,
QObject *  object,
const char *  metamethod,
QWidget *  parent 
)

Makes metamethod invokable with shortcuts in seq.

This function creates one QShortcut object per each key sequence in seqs and calls metamethod of the given object when one of the shortcuts is activated.

If seqs is empty, this function does nothing.

Parameters
[in]seqsThe list of key sequences to handle.
[in]objectThe object whose metamethod should be invoked.
[in]metamethodThe metamethod to invoke when one of key sequences in seqs is activated.
[in]parentThe parent object for the shortcuts.

Definition at line 29 of file util.cpp.