Represents extra widget for changing single keyboard shortcut.
More...
#include <shortcutcatcher.h>
|
void | shortcutChanged (const QKeySequence &seguence) |
|
|
void | startRecording () |
|
void | doneRecording () |
|
|
class | ShortcutButton |
|
class | DynamicShortcutsWidget |
|
Represents extra widget for changing single keyboard shortcut.
Definition at line 41 of file shortcutcatcher.h.
ShortcutCatcher::ShortcutCatcher |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Constructor.
- Parameters
-
parent | Pointer to parent widget. |
Definition at line 38 of file shortcutcatcher.cpp.
41 m_layout =
new QHBoxLayout(
this);
42 m_layout->setMargin(0);
43 m_layout->setSpacing(1);
48 m_btnReset->setFocusPolicy(Qt::NoFocus);
49 m_btnReset->setToolTip(tr(
"Reset to original shortcut."));
54 m_btnClear->setFocusPolicy(Qt::NoFocus);
55 m_btnClear->setToolTip(tr(
"Clear current shortcut."));
59 m_btnChange->setFocusPolicy(Qt::StrongFocus);
60 m_btnChange->setToolTip(tr(
"Click and hit new shortcut."));
63 m_layout->addWidget(m_btnChange);
64 m_layout->addWidget(m_btnReset);
65 m_layout->addWidget(m_btnClear);
68 connect(m_btnReset, SIGNAL(clicked()),
this, SLOT(
resetShortcut()));
69 connect(m_btnClear, SIGNAL(clicked()),
this, SLOT(
clearShortcut()));
70 connect(m_btnChange, SIGNAL(clicked()),
this, SLOT(startRecording()));
void updateDisplayShortcut()
Updates text displayed in catcher according to active shortcut.
void resetShortcut()
Resets active shortcut to default shortcut.
void clearShortcut()
Clears current active shortcut.
static IconFactory * instance()
Singleton getter.
void ShortcutCatcher::setDefaultShortcut |
( |
const QKeySequence & |
key | ) |
|
|
inline |
Sets default shortcut for the widget.
- Parameters
-
Definition at line 68 of file shortcutcatcher.h.
69 m_defaultSequence = key;
void setShortcut(const QKeySequence &key)
Sets active shortcut for the widget.
void ShortcutCatcher::setShortcut |
( |
const QKeySequence & |
key | ) |
|
|
inline |
Sets active shortcut for the widget.
- Parameters
-
Definition at line 75 of file shortcutcatcher.h.
76 m_currentSequence = key;
QKeySequence ShortcutCatcher::shortcut |
( |
| ) |
const |
|
inline |
Access to active shortcut.
- Returns
- Returns active shortcut.
Definition at line 62 of file shortcutcatcher.h.
63 return m_currentSequence;
The documentation for this class was generated from the following files: