A QLineEdit that captures keyboard shortcuts (hotkeys).
More...
#include <QmitkHotkeyLineEdit.h>
|
| | QmitkHotkeyLineEdit (QWidget *parent=nullptr) |
| | Construct a hotkey line edit with no initial key sequence. More...
|
| |
| | QmitkHotkeyLineEdit (const QKeySequence &qKeySequence, QWidget *parent=nullptr) |
| | Construct a hotkey line edit with an initial key sequence. More...
|
| |
| | QmitkHotkeyLineEdit (const QString &qQString, QWidget *parent=nullptr) |
| | Construct a hotkey line edit with an initial key sequence string. More...
|
| |
| virtual void | SetKeySequence (const QKeySequence &qKeySequence) |
| | Programmatically set the key sequence. More...
|
| |
| virtual void | SetKeySequence (const QString &qKeySequenceAsString) |
| | Programmatically set the key sequence from a string. More...
|
| |
| virtual QKeySequence | GetKeySequence () |
| | Get the currently configured key sequence. More...
|
| |
| virtual QString | GetKeySequenceAsString () |
| | Get the currently configured key sequence as a string. More...
|
| |
| bool | Matches (QKeyEvent *event) |
| | Check whether a key event matches the stored key sequence. More...
|
| |
|
| static const std::string | TOOLTIP |
| | Default tooltip text displayed on the widget. More...
|
| |
A QLineEdit that captures keyboard shortcuts (hotkeys).
This read-only line edit captures key press events and displays the resulting key sequence as text. It is used for configuring keyboard shortcuts in the application. Pressing Escape clears the current sequence.
- Note
- The line edit is read-only by default; key sequences are set via keyPressEvent rather than text input.
Definition at line 33 of file QmitkHotkeyLineEdit.h.
◆ QmitkHotkeyLineEdit() [1/3]
| QmitkHotkeyLineEdit::QmitkHotkeyLineEdit |
( |
QWidget * |
parent = nullptr | ) |
|
Construct a hotkey line edit with no initial key sequence.
- Parameters
-
| [in] | parent | The parent widget. |
◆ QmitkHotkeyLineEdit() [2/3]
| QmitkHotkeyLineEdit::QmitkHotkeyLineEdit |
( |
const QKeySequence & |
qKeySequence, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
Construct a hotkey line edit with an initial key sequence.
- Parameters
-
| [in] | qKeySequence | The initial key sequence. |
| [in] | parent | The parent widget. |
◆ QmitkHotkeyLineEdit() [3/3]
| QmitkHotkeyLineEdit::QmitkHotkeyLineEdit |
( |
const QString & |
qQString, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
Construct a hotkey line edit with an initial key sequence string.
- Parameters
-
| [in] | qQString | The initial key sequence as a string (e.g. "Ctrl+S"). |
| [in] | parent | The parent widget. |
◆ GetKeySequence()
| virtual QKeySequence QmitkHotkeyLineEdit::GetKeySequence |
( |
| ) |
|
|
virtual |
Get the currently configured key sequence.
- Returns
- The current QKeySequence.
◆ GetKeySequenceAsString()
| virtual QString QmitkHotkeyLineEdit::GetKeySequenceAsString |
( |
| ) |
|
|
virtual |
Get the currently configured key sequence as a string.
- Returns
- The key sequence string representation.
◆ Init()
| void QmitkHotkeyLineEdit::Init |
( |
| ) |
|
|
protected |
◆ keyPressEvent()
| void QmitkHotkeyLineEdit::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
◆ LineEditTextChanged
| void QmitkHotkeyLineEdit::LineEditTextChanged |
( |
const QString & |
| ) |
|
|
protectedslot |
◆ Matches()
| bool QmitkHotkeyLineEdit::Matches |
( |
QKeyEvent * |
event | ) |
|
Check whether a key event matches the stored key sequence.
- Parameters
-
| [in] | event | The key event to compare against. |
- Returns
- True if the event matches the stored key sequence.
◆ SetKeySequence() [1/2]
| virtual void QmitkHotkeyLineEdit::SetKeySequence |
( |
const QKeySequence & |
qKeySequence | ) |
|
|
virtual |
Programmatically set the key sequence.
- Parameters
-
| [in] | qKeySequence | The key sequence to set. |
◆ SetKeySequence() [2/2]
| virtual void QmitkHotkeyLineEdit::SetKeySequence |
( |
const QString & |
qKeySequenceAsString | ) |
|
|
virtual |
Programmatically set the key sequence from a string.
- Parameters
-
| [in] | qKeySequenceAsString | The key sequence string (e.g. "Ctrl+S"). |
◆ m_KeySequence
| QKeySequence QmitkHotkeyLineEdit::m_KeySequence |
|
protected |
◆ TOOLTIP
| const std::string QmitkHotkeyLineEdit::TOOLTIP |
|
static |
The documentation for this class was generated from the following file: