8 #ifndef ecvModalShortcut_h
9 #define ecvModalShortcut_h
15 #include <QKeySequence>
59 Qt::ShortcutContext contextArea = Qt::WindowShortcut);
72 void setEnabled(
bool shouldEnable,
bool changeFocus =
true);
118 QAction* action =
nullptr,
119 QWidget* parent =
nullptr);
Manage key sequences used for shortcuts.
Manage an action and/or widget's responsivity to a shortcut.
void setEnabled(bool shouldEnable, bool changeFocus=true)
ecvModalShortcut(const QKeySequence &key, QAction *action=nullptr, QWidget *parent=nullptr)
QPointer< QAction > m_action
~ecvModalShortcut() override
QPointer< QShortcut > m_shortcut
void setContextWidget(QWidget *contextWidget, Qt::ShortcutContext contextArea=Qt::WindowShortcut)
QKeySequence keySequence() const