|
VR-Engage
2.2
|
Implements the logic behind SAR settings dialog based on the humble dialog pattern. This class mediates between the user interface and the SAR settings manager, handling user inputs, validating settings, and persisting configurations. It connects UI signals to appropriate settings update actions.
#include <sarSettingsLogic.h>
Public Member Functions | |
| DtSarSettingsLogic (makVrv::DtDe &de, DtSarSettingsDialog &iFace, makVrv::DtPersistenceControlsInterface &pIFace) | |
| virtual | ~DtSarSettingsLogic () override |
| virtual void | sendSettingsToGui () |
| void | slot_onOwnshipModeChanged (int val) |
| void | slot_onOwnshipEntityNameChanged (const std::string &val) |
| void | slot_onOwnshipObserverNameChanged (const std::string &val) |
| void | slot_onOwnshipAbsoluteLatChanged (double val) |
| void | slot_onOwnshipAbsoluteLonChanged (double val) |
| void | slot_onOwnshipAbsoluteAltChanged (double val) |
| void | slot_onTargetModeChanged (int val) |
| void | slot_onTargetEntityNameChanged (const std::string &val) |
| void | slot_onTargetSensorNameChanged (const std::string &val) |
| void | slot_onTargetAbsoluteLatChanged (double val) |
| void | slot_onTargetAbsoluteLonChanged (double val) |
| void | slot_onTargetAbsoluteAltChanged (double val) |
| void | slot_onImageSizeXChanged (int val) |
| void | slot_onImageSizeYChanged (int val) |
| void | slot_onImageRotationChanged (int val) |
| void | slot_onImageFormatChanged (int val) |
| void | slot_onImageDataTypeChanged (int val) |
| void | slot_onSensorToUseChanged (const std::string &val) |
| void | slot_onSaveOnServerChanged (bool val) |
| void | slot_onServerSavePathChanged (const std::string &val) |
| void | slot_onPowerChanged (double val) |
| void | slot_onDownrangeChanged (double val) |
| void | slot_onCrossrangeChanged (double val) |
| void | slot_onServerIpChanged (const std::string &val) |
| void | slot_onServerPortChanged (int val) |
| void | slot_onOpenSarResponseWindowChanged (bool val) |
| void | slot_onResetConnectionButtonPressed () |
| virtual void | settingsRestored (const makVrv::DtSettingsBackup *b) |
| virtual void | slot_onIsConnectedChanged (bool val) |
| virtual void | slot_onValidOwnshipEntitiesChanged (const std::vector< std::string > &validEntities) |
| virtual void | slot_onValidTargetEntitiesChanged (const std::vector< std::string > &validEntities) |
| virtual void | slot_onValidObserversChanged (const std::vector< std::string > &validObservers) |
| virtual void | slot_onValidTargetSensorsChanged (const std::vector< std::string > &validSensors) |
| virtual void | slot_onSettingsValidChanged (bool valid, const std::string &tooltip) |
Persistence Slots | |
| virtual void | on_import () |
| virtual void | on_export () |
| virtual void | on_importFilePathChosen (const std::string &filePath) |
| virtual void | on_exportFilePathChosen (const std::string &filePath) |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| DtSarSettingsDialog & | myInterface |
| makVrv::DtPersistenceControlsInterface & | myPersistenceInterface |
| makVre::DtSarSettingsLogic::DtSarSettingsLogic | ( | makVrv::DtDe & | de, |
| DtSarSettingsDialog & | iFace, | ||
| makVrv::DtPersistenceControlsInterface & | pIFace ) |
Constructor.
| de | Reference to the display element |
| iFace | Reference to the SAR settings dialog interface |
| pIFace | Reference to the persistence controls interface |
References de().
|
overridevirtual |
Virtual destructor.
|
virtual |
Updates the GUI with current settings values.
Retrieves current settings from the manager and forwards them to the UI controls
| void makVre::DtSarSettingsLogic::slot_onOwnshipModeChanged | ( | int | val | ) |
Handles changes to the ownship mode.
| val | New ownship mode value |
| void makVre::DtSarSettingsLogic::slot_onOwnshipEntityNameChanged | ( | const std::string & | val | ) |
Handles changes to the ownship entity name.
| val | New entity name |
| void makVre::DtSarSettingsLogic::slot_onOwnshipObserverNameChanged | ( | const std::string & | val | ) |
Handles changes to the ownship observer name.
| val | New observer name |
| void makVre::DtSarSettingsLogic::slot_onOwnshipAbsoluteLatChanged | ( | double | val | ) |
Handles changes to the ownship absolute latitude.
| val | New latitude value |
| void makVre::DtSarSettingsLogic::slot_onOwnshipAbsoluteLonChanged | ( | double | val | ) |
Handles changes to the ownship absolute longitude.
| val | New longitude value |
| void makVre::DtSarSettingsLogic::slot_onOwnshipAbsoluteAltChanged | ( | double | val | ) |
Handles changes to the ownship absolute altitude.
| val | New altitude value |
| void makVre::DtSarSettingsLogic::slot_onTargetModeChanged | ( | int | val | ) |
Handles changes to the target mode.
| val | New target mode value |
| void makVre::DtSarSettingsLogic::slot_onTargetEntityNameChanged | ( | const std::string & | val | ) |
Handles changes to the target entity name.
| val | New entity name |
| void makVre::DtSarSettingsLogic::slot_onTargetSensorNameChanged | ( | const std::string & | val | ) |
Handles changes to the target sensor name.
| val | New sensor name |
| void makVre::DtSarSettingsLogic::slot_onTargetAbsoluteLatChanged | ( | double | val | ) |
Handles changes to the target absolute latitude.
| val | New latitude value |
| void makVre::DtSarSettingsLogic::slot_onTargetAbsoluteLonChanged | ( | double | val | ) |
Handles changes to the target absolute longitude.
| val | New longitude value |
| void makVre::DtSarSettingsLogic::slot_onTargetAbsoluteAltChanged | ( | double | val | ) |
Handles changes to the target absolute altitude.
| val | New altitude value |
| void makVre::DtSarSettingsLogic::slot_onImageSizeXChanged | ( | int | val | ) |
Handles changes to the image X size.
| val | New X size value |
| void makVre::DtSarSettingsLogic::slot_onImageSizeYChanged | ( | int | val | ) |
Handles changes to the image Y size.
| val | New Y size value |
| void makVre::DtSarSettingsLogic::slot_onImageRotationChanged | ( | int | val | ) |
Handles changes to the image rotation.
| val | New rotation value |
| void makVre::DtSarSettingsLogic::slot_onImageFormatChanged | ( | int | val | ) |
Handles changes to the image format.
| val | New format index |
| void makVre::DtSarSettingsLogic::slot_onImageDataTypeChanged | ( | int | val | ) |
Handles changes to the image data type.
| val | New data type index |
| void makVre::DtSarSettingsLogic::slot_onSensorToUseChanged | ( | const std::string & | val | ) |
Handles changes to the sensor to use.
| val | New sensor name |
| void makVre::DtSarSettingsLogic::slot_onSaveOnServerChanged | ( | bool | val | ) |
Handles changes to the save on server setting.
| val | New save on server state |
| void makVre::DtSarSettingsLogic::slot_onServerSavePathChanged | ( | const std::string & | val | ) |
Handles changes to the server save path.
| val | New save path |
| void makVre::DtSarSettingsLogic::slot_onPowerChanged | ( | double | val | ) |
Handles changes to the radar power.
| val | New power value |
| void makVre::DtSarSettingsLogic::slot_onDownrangeChanged | ( | double | val | ) |
Handles changes to the downrange.
| val | New downrange value |
| void makVre::DtSarSettingsLogic::slot_onCrossrangeChanged | ( | double | val | ) |
Handles changes to the crossrange.
| val | New crossrange value |
| void makVre::DtSarSettingsLogic::slot_onServerIpChanged | ( | const std::string & | val | ) |
Handles changes to the server IP address.
| val | New IP address |
| void makVre::DtSarSettingsLogic::slot_onServerPortChanged | ( | int | val | ) |
Handles changes to the server port.
| val | New port number |
| void makVre::DtSarSettingsLogic::slot_onOpenSarResponseWindowChanged | ( | bool | val | ) |
Handles changes to the open SAR response window setting.
| val | New open response window state |
| void makVre::DtSarSettingsLogic::slot_onResetConnectionButtonPressed | ( | ) |
Handles the reset connection button press.
|
virtual |
Handles import button press.
Initiates the settings import process
|
virtual |
Handles export button press.
Initiates the settings export process
|
virtual |
Handles the selection of an import file path.
| filePath | Path to the file to import settings from |
|
virtual |
Handles the selection of an export file path.
| filePath | Path to the file to export settings to |
|
virtual |
Called when settings have been restored.
| b | Pointer to the settings backup that was restored |
Updates the GUI when settings have been restored from backup
|
virtual |
Handles changes to the connection status.
| val | New connection status |
|
virtual |
Handles changes to the list of valid ownship entities.
| validEntities | List of valid entity names for ownship |
|
virtual |
Handles changes to the list of valid target entities.
| validEntities | List of valid entity names for target |
|
virtual |
Handles changes to the list of valid observers.
| validObservers | List of valid observer names |
|
virtual |
Handles changes to the list of valid target sensors.
| validSensors | List of valid sensor names for target |
|
virtual |
Handles changes to the settings validity state.
| valid | Whether the current settings are valid |
| tooltip | Tooltip text explaining validation issues if invalid |
|
protected |
Reference to the display element.
|
protected |
Reference to the SAR settings dialog interface.
|
protected |
Reference to the persistence controls interface.