28 #include <QStringList> 30 #include <QKeySequence> 31 #include "Helper/Settings/SayonaraClass.h" 46 QStringList _default_shortcuts;
47 QStringList _shortcuts;
72 Shortcut(
ShortcutWidget* parent,
const QString& identifier,
const QString& name,
const QString& default_shortcut);
80 Shortcut(
ShortcutWidget* parent,
const QString& identifier,
const QString& name,
const QStringList& default_shortcuts);
145 for(QShortcut* sc : shortcuts){
146 parent->connect(sc, &QShortcut::activated, func);
QList< QKeySequence > get_sequences() const
get a list key squences mapped to this shortcut
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
QString get_name() const
get the human-readable name of the shortcut
QString get_identifier() const
get the unique identifier
static Shortcut getInvalid()
get a raw and invalid shortcut. This function is used instead of the default constructor ...
bool is_valid() const
Check if the shortcut is valid or if it was retrieved via getInvalid()
A single shortcut managed by ShortcutHandler. This class holds information about the default shortcut...
Definition: Shortcut.h:42
void create_qt_shortcut(QWidget *parent, T func)
create a qt shortcut for a widget
Definition: Shortcut.h:142
QStringList get_default() const
get a human-readable list of mapped default shortcuts
void change_shortcut(const QStringList &shortcuts)
QStringList get_shortcuts() const
get a human-readable list of mapped shortcuts