NDEVR
API Documentation
PointScannerKeyController

Keyboard shortcut controller for the point scanner dialog. More...

Inheritance diagram for PointScannerKeyController:
[legend]
Collaboration diagram for PointScannerKeyController:
[legend]

Public Member Functions

virtual bool processKeyEvent (const StringView &id, const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera) override
 Process a key event and dispatch scanner actions.
virtual void resetKeyControllerToDefaults () override
 Reset all key bindings to their factory defaults.
virtual void setDialog (PointScannerDialog *dialog)
 Set the scanner dialog that receives dispatched actions.
Public Member Functions inherited from BasicKeyController
 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 TranslatedStringkeyControllerTitle () 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 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

PointScannerDialog * m_dialog = nullptr
 Target dialog for dispatched actions.
Protected Attributes inherited from BasicKeyController
TranslatedString m_key_controller_title
 The display title for this key controller.
Buffer< KeyOptionm_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.

Detailed Description

Keyboard shortcut controller for the point scanner dialog.


Maps key events to ScanDialogAction commands such as taking readings, controlling scans, and toggling lights.

Definition at line 35 of file PointScannerKeyController.h.

Member Function Documentation

◆ processKeyEvent()

virtual bool PointScannerKeyController::processKeyEvent ( const StringView & id,
const KeyEvent & key_event,
DesignObjectLookup * lookup,
Camera * camera )
overridevirtual

Process a key event and dispatch scanner actions.

Parameters
[in]idThe key controller identifier.
[in]key_eventThe key event to process.
[in]lookupThe design object lookup for scene context.
[in]cameraThe active camera.
Returns
True if the event was handled.

Implements BasicKeyController.

◆ setDialog()

virtual void PointScannerKeyController::setDialog ( PointScannerDialog * dialog)
virtual

Set the scanner dialog that receives dispatched actions.

Parameters
[in]dialogThe point scanner dialog.

The documentation for this class was generated from the following file: