13 #ifndef QmitkHotkeyLineEdit_h
14 #define QmitkHotkeyLineEdit_h
19 #include <QKeySequence>
A QLineEdit that captures keyboard shortcuts (hotkeys).
virtual QString GetKeySequenceAsString()
Get the currently configured key sequence as a string.
void keyPressEvent(QKeyEvent *event) override
static const std::string TOOLTIP
Default tooltip text displayed on the widget.
virtual QKeySequence GetKeySequence()
Get the currently configured key sequence.
bool Matches(QKeyEvent *event)
Check whether a key event matches the stored key sequence.
QmitkHotkeyLineEdit(const QKeySequence &qKeySequence, QWidget *parent=nullptr)
Construct a hotkey line edit with an initial key sequence.
virtual void SetKeySequence(const QKeySequence &qKeySequence)
Programmatically set the key sequence.
virtual void SetKeySequence(const QString &qKeySequenceAsString)
Programmatically set the key sequence from a string.
QmitkHotkeyLineEdit(const QString &qQString, QWidget *parent=nullptr)
Construct a hotkey line edit with an initial key sequence string.
QKeySequence m_KeySequence
void LineEditTextChanged(const QString &)
QmitkHotkeyLineEdit(QWidget *parent=nullptr)
Construct a hotkey line edit with no initial key sequence.