![]() |
NDEVR
API Documentation
|
Assigns actions to key presses and registers them as a program-wide service. More...
Public Member Functions | |
| BasicKeyController (const TranslatedString &key_controller_title) | |
| Constructs a BasicKeyController with the given title. | |
| virtual void | addKeyOption (const KeyOption &option) |
| Adds a new key option mapping to this controller. | |
| const Buffer< KeyOption > & | currentKeyMaps () const |
| Returns the current set of key option mappings. | |
| virtual void | getINI (INIFactory &factory) override |
| Serializes or deserializes key controller settings to/from an INI file. | |
| const TranslatedString & | keyControllerTitle () const |
| Returns the display title of this key controller. | |
| bool | processKeyEvent (const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera) final override |
| Processes a key event by matching it against registered key options. | |
| virtual bool | processKeyEvent (const StringView &id, const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera)=0 |
| Processes a key event identified by its string ID. | |
| virtual void | resetKeyControllerToDefaults ()=0 |
| Resets all key mappings to their default values. | |
| virtual void | setKeyOption (const KeyOption &option) |
| Sets or updates an existing key option mapping. | |
| Public Member Functions inherited from INIInterface | |
| INIInterface () | |
| Constructs an INIInterface with no default INI file. | |
| INIInterface (const File &default_ini) | |
| Constructs an INIInterface with the specified default INI file. | |
| virtual | ~INIInterface () |
| Virtual destructor for safe polymorphic cleanup. | |
| virtual void | finishReadingINI (INIFactory &) |
| Called after reading an INI file. | |
| virtual void | prepareForINI (INIFactory &) |
| Called before reading or writing an INI file. | |
| virtual bool | readINIOptions () |
| Reads INI options from the default INI file. | |
| virtual bool | readINIOptions (File &ini_file) |
| Reads INI options from the specified INI file. | |
| virtual bool | saveINIOptions (bool multithead=false) |
| Saves INI options to the default INI file. | |
| virtual bool | saveINIOptions (File &ini_file, bool multithead=false) |
| Saves INI options to the specified INI file. | |
| void | setDefaultINIFile (const File &file) |
| Sets the default INI file path used for reading and writing options. | |
| virtual void | writeToLog (const StringView &title, LogPtr log, uint01 log_level=2U) |
| Writes the current INI options to the specified log with a title. | |
| virtual void | writeToLog (LogPtr log, uint01 log_level=2U) |
| Writes the current INI options to the specified log. | |
Protected Attributes | |
| TranslatedString | m_key_controller_title |
| The display title for this key controller. | |
| Buffer< KeyOption > | m_key_options |
| The collection of registered key option mappings. | |
| bool | m_save_ini_on_change_key_option_change = false |
| Whether to automatically save INI settings when a key option changes. | |
| Protected Attributes inherited from INIInterface | |
| File | m_default_ini |
| The default file path used for reading and writing INI options. | |
Assigns actions to key presses and registers them as a program-wide service.
Definition at line 77 of file KeyController.h.
| BasicKeyController::BasicKeyController | ( | const TranslatedString & | key_controller_title | ) |
Constructs a BasicKeyController with the given title.
| [in] | key_controller_title | The display title for this key controller. |
|
virtual |
Adds a new key option mapping to this controller.
| [in] | option | The key option to add. |
Returns the current set of key option mappings.
Definition at line 115 of file KeyController.h.
References m_key_options.
|
overridevirtual |
Serializes or deserializes key controller settings to/from an INI file.
| [in] | factory | The INI factory used for reading or writing settings. |
Implements INIInterface.
|
inline |
Returns the display title of this key controller.
Definition at line 110 of file KeyController.h.
References m_key_controller_title.
|
finaloverridevirtual |
Processes a key event by matching it against registered key options.
| [in] | key_event | The key event to process. |
| [in] | lookup | The design object lookup context. |
| [in] | camera | The active camera context. |
Implements KeyControllerBase.
|
pure virtual |
Processes a key event identified by its string ID.
Subclasses implement specific behavior.
| [in] | id | The string identifier of the key option that matched. |
| [in] | key_event | The key event to process. |
| [in] | lookup | The design object lookup context. |
| [in] | camera | The active camera context. |
Implemented in NDEVRRibbon, PointScannerKeyController, QCustomMessageBox, and SelectionWidget.
|
pure virtual |
Resets all key mappings to their default values.
Subclasses must implement this.
Implemented in NDEVRRibbon, PointScannerKeyController, QCustomMessageBox, and SelectionWidget.
|
virtual |
Sets or updates an existing key option mapping.
| [in] | option | The key option to set. |