Allows the user to assign a keystroke to an action by displaying a button with the current keystroke assignment that when clicked, records a new keyboard assignment.
More...
|
|
KeyControllerBase * | m_controller = nullptr |
| | The key controller being edited.
|
|
Button * | m_current_button = nullptr |
| | The button currently waiting for a new keystroke.
|
|
String | m_current_id |
| | The identifier of the action currently being re-bound.
|
|
bool | m_is_init = false |
| | Whether the widget has been initialized.
|
|
QGridLayout * | m_layout = nullptr |
| | The grid layout for key binding rows.
|
|
QCustomScrollArea * | m_scroll_area = nullptr |
| | The scroll area containing the key binding rows.
|
|
QBoxLayout * | m_scroll_area_layout = nullptr |
| | The layout inside the scroll area.
|
|
bool | m_show_grab_volume_keys = false |
| | Whether to display the volume key grab option.
|
Allows the user to assign a keystroke to an action by displaying a button with the current keystroke assignment that when clicked, records a new keyboard assignment.
Definition at line 18 of file KeystrokeWidget.h.
◆ KeystrokeWidget() [1/2]
| KeystrokeWidget::KeystrokeWidget |
( |
QWidget * | parent = nullptr | ) |
|
Constructs a KeystrokeWidget with no initial controller.
- Parameters
-
| [in] | parent | The parent widget. |
◆ KeystrokeWidget() [2/2]
| KeystrokeWidget::KeystrokeWidget |
( |
KeyControllerBase * | controller, |
|
|
QWidget * | parent = nullptr ) |
Constructs a KeystrokeWidget bound to the given key controller.
- Parameters
-
| [in] | controller | The key controller whose bindings will be displayed. |
| [in] | parent | The parent widget. |
◆ event()
| bool KeystrokeWidget::event |
( |
QEvent * | event | ) |
|
|
override |
Processes generic events, including key events for recording new bindings.
- Parameters
-
| [in] | event | The event to process. |
- Returns
- True if the event was handled.
References event().
Referenced by event().
◆ processKeyEvent()
Processes a key event to record a new key binding assignment.
- Parameters
-
| [in] | key_event | The key event to process. |
| [in] | lookup | The design object lookup context. |
| [in] | camera | The camera context. |
- Returns
- True if the key event was consumed for binding assignment.
Implements KeyControllerBase.
◆ setController()
Sets the key controller whose bindings this widget will display and edit.
- Parameters
-
| [in] | controller | The key controller to bind to. |
◆ setShowGrabVolumeKeys()
| void KeystrokeWidget::setShowGrabVolumeKeys |
( |
bool | show | ) |
|
Sets whether the option to grab hardware volume keys is displayed.
- Parameters
-
| [in] | show | True to show the volume key grab option. |
◆ setup() [1/2]
Sets up the UI for a BasicKeyController with simple key bindings.
- Parameters
-
| [in] | key_controller | The basic key controller to populate from. |
◆ setup() [2/2]
Sets up the UI for a full KeyController with advanced key bindings.
- Parameters
-
| [in] | key_controller | The key controller to populate from. |
The documentation for this class was generated from the following file: