 |
Sayonara Player
|
24 #include "ShortcutIdentifier.h"
25 #include "Utils/Pimpl.h"
29 #define ShortcutHandlerPrivate private
58 ShortcutHandlerPrivate:
60 void removeQtShortcut(QShortcut* qshortcut);
120 QKeySequence sequence()
const;
133 QString databaseKey()
const;
147 void connect(QWidget* parent, T func, Qt::ShortcutContext context=Qt::WindowShortcut)
152 parent->connect(sc, &QShortcut::activated, func);
163 void connect(QWidget* parent, QObject* receiver,
const char* slot, Qt::ShortcutContext context=Qt::WindowShortcut);
Shortcut(const Shortcut &other)
Copy constructor.
static Shortcut getInvalid()
get a raw and invalid shortcut. This function is used instead of the default constructor
const QStringList & shortcuts() const
get a human-readable list of mapped shortcuts
Shortcut(ShortcutIdentifier identifier, const QStringList &defaultShortcuts)
Shortcut.
Shortcut(ShortcutIdentifier identifier, const QString &defaultShortcut)
Shortcut.
A singleton class for retrieving shortcuts.
Definition: ShortcutHandler.h:42
bool isValid() const
Check if the shortcut is valid or if it was retrieved via getInvalid()
QStringList defaultShortcut() const
get a human-readable list of mapped default shortcuts
QList< QKeySequence > sequences() const
get a list key squences mapped to this shortcut
QString name() const
get the human-readable name of the shortcut
void connect(QWidget *parent, QObject *receiver, const char *slot, Qt::ShortcutContext context=Qt::WindowShortcut)
create a qt shortcut for a widget
void connect(QWidget *parent, T func, Qt::ShortcutContext context=Qt::WindowShortcut)
create a qt shortcut for a widget
Definition: Shortcut.h:147
void changeShortcut(const QStringList &shortcuts)
A single shortcut managed by ShortcutHandler. This class holds information about the default shortcut...
Definition: Shortcut.h:42
ShortcutIdentifier identifier() const
get the unique identifier