VR-Engage  2.2
Loading...
Searching...
No Matches
sarSettingsLogic.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2025 MAK Technologies
3 * All rights reserved.
4 *****************************************************************************/
5
6//! \file sarSettingsLogic.h
7//! \brief Defines the SAR settings logic component for managing SAR configuration
8//! \ingroup sarClient
9
10#pragma once
11
12#include "sarSettingsManager.h"
13#include "sarClientPlugin.h"
14#include <vrvUtil/DtSignalConnectionManager.h>
15
16namespace makVrv
17{
18//! \brief Forward declaration of the display element class
19class DtDe;
20
21//! \brief Forward declaration of the settings backup class
22class DtSettingsBackup;
23
24//! \brief Forward declaration of the persistence controls interface class
25class DtPersistenceControlsInterface;
26} // namespace makVrv
27
28namespace makVre
29{
30//! \brief Forward declaration of the SAR settings dialog class
32
33//! \brief Logic component for managing SAR settings
34//!
35//! Implements the logic behind SAR settings dialog based on the humble dialog pattern.
36//! This class mediates between the user interface and the SAR settings manager,
37//! handling user inputs, validating settings, and persisting configurations.
38//! It connects UI signals to appropriate settings update actions.
39//! \ingroup sarClient
40class DT_DLL_sarClient DtSarSettingsLogic : private makVrv::DtSignalConnectionManager
41{
42public:
43 //! \brief Constructor
44 //! \param de Reference to the display element
45 //! \param iFace Reference to the SAR settings dialog interface
46 //! \param pIFace Reference to the persistence controls interface
47 DtSarSettingsLogic(makVrv::DtDe& de, DtSarSettingsDialog& iFace, makVrv::DtPersistenceControlsInterface& pIFace);
48
49 //! \brief Virtual destructor
50 virtual ~DtSarSettingsLogic() override;
51
52 //! \brief Updates the GUI with current settings values
53 //!
54 //! Retrieves current settings from the manager and forwards them to the UI controls
55 virtual void sendSettingsToGui();
56
57 //! \brief Handles changes to the ownship mode
58 //! \param val New ownship mode value
60
61 //! \brief Handles changes to the ownship entity name
62 //! \param val New entity name
63 void slot_onOwnshipEntityNameChanged(const std::string& val);
64
65 //! \brief Handles changes to the ownship observer name
66 //! \param val New observer name
67 void slot_onOwnshipObserverNameChanged(const std::string& val);
68
69 //! \brief Handles changes to the ownship absolute latitude
70 //! \param val New latitude value
72
73 //! \brief Handles changes to the ownship absolute longitude
74 //! \param val New longitude value
76
77 //! \brief Handles changes to the ownship absolute altitude
78 //! \param val New altitude value
80
81 //! \brief Handles changes to the target mode
82 //! \param val New target mode value
84
85 //! \brief Handles changes to the target entity name
86 //! \param val New entity name
87 void slot_onTargetEntityNameChanged(const std::string& val);
88
89 //! \brief Handles changes to the target sensor name
90 //! \param val New sensor name
91 void slot_onTargetSensorNameChanged(const std::string& val);
92
93 //! \brief Handles changes to the target absolute latitude
94 //! \param val New latitude value
96
97 //! \brief Handles changes to the target absolute longitude
98 //! \param val New longitude value
100
101 //! \brief Handles changes to the target absolute altitude
102 //! \param val New altitude value
104
105 //! \brief Handles changes to the image X size
106 //! \param val New X size value
108
109 //! \brief Handles changes to the image Y size
110 //! \param val New Y size value
112
113 //! \brief Handles changes to the image rotation
114 //! \param val New rotation value
116
117 //! \brief Handles changes to the image format
118 //! \param val New format index
120
121 //! \brief Handles changes to the image data type
122 //! \param val New data type index
124
125 //! \brief Handles changes to the sensor to use
126 //! \param val New sensor name
127 void slot_onSensorToUseChanged(const std::string& val);
128
129 //! \brief Handles changes to the save on server setting
130 //! \param val New save on server state
132
133 //! \brief Handles changes to the server save path
134 //! \param val New save path
135 void slot_onServerSavePathChanged(const std::string& val);
136
137 //! \brief Handles changes to the radar power
138 //! \param val New power value
139 void slot_onPowerChanged(double val);
140
141 //! \brief Handles changes to the downrange
142 //! \param val New downrange value
143 void slot_onDownrangeChanged(double val);
144
145 //! \brief Handles changes to the crossrange
146 //! \param val New crossrange value
147 void slot_onCrossrangeChanged(double val);
148
149 //! \brief Handles changes to the server IP address
150 //! \param val New IP address
151 void slot_onServerIpChanged(const std::string& val);
152
153 //! \brief Handles changes to the server port
154 //! \param val New port number
156
157 //! \brief Handles changes to the open SAR response window setting
158 //! \param val New open response window state
160
161 //! \brief Handles the reset connection button press
163
164 //! \name Persistence Slots
165 //! @{
166
167 //! \brief Handles import button press
168 //!
169 //! Initiates the settings import process
170 virtual void on_import();
171
172 //! \brief Handles export button press
173 //!
174 //! Initiates the settings export process
175 virtual void on_export();
176
177 //! \brief Handles the selection of an import file path
178 //! \param filePath Path to the file to import settings from
179 virtual void on_importFilePathChosen(const std::string& filePath);
180
181 //! \brief Handles the selection of an export file path
182 //! \param filePath Path to the file to export settings to
183 virtual void on_exportFilePathChosen(const std::string& filePath);
184 //! @}
185
186 //! \brief Called when settings have been restored
187 //! \param b Pointer to the settings backup that was restored
188 //!
189 //! Updates the GUI when settings have been restored from backup
190 virtual void settingsRestored(const makVrv::DtSettingsBackup* b);
191
192 //! \brief Handles changes to the connection status
193 //! \param val New connection status
194 virtual void slot_onIsConnectedChanged(bool val);
195
196 //! \brief Handles changes to the list of valid ownship entities
197 //! \param validEntities List of valid entity names for ownship
198 virtual void slot_onValidOwnshipEntitiesChanged(const std::vector<std::string>& validEntities);
199
200 //! \brief Handles changes to the list of valid target entities
201 //! \param validEntities List of valid entity names for target
202 virtual void slot_onValidTargetEntitiesChanged(const std::vector<std::string>& validEntities);
203
204 //! \brief Handles changes to the list of valid observers
205 //! \param validObservers List of valid observer names
206 virtual void slot_onValidObserversChanged(const std::vector<std::string>& validObservers);
207
208 //! \brief Handles changes to the list of valid target sensors
209 //! \param validSensors List of valid sensor names for target
210 virtual void slot_onValidTargetSensorsChanged(const std::vector<std::string>& validSensors);
211
212 //! \brief Handles changes to the settings validity state
213 //! \param valid Whether the current settings are valid
214 //! \param tooltip Tooltip text explaining validation issues if invalid
215 virtual void slot_onSettingsValidChanged(bool valid, const std::string& tooltip);
216
217protected:
218 //! \brief Reference to the display element
219 makVrv::DtDe& myDe;
220
221 //! \brief Reference to the SAR settings dialog interface
223
224 //! \brief Reference to the persistence controls interface
225 makVrv::DtPersistenceControlsInterface& myPersistenceInterface;
226};
227} // namespace makVre
Dialog for configuring Synthetic Aperture Radar settings.
Definition sarSettingsDialog.h:40
makVrv::DtPersistenceControlsInterface & myPersistenceInterface
Reference to the persistence controls interface.
Definition sarSettingsLogic.h:225
void slot_onImageSizeYChanged(int val)
Handles changes to the image Y size.
void slot_onTargetEntityNameChanged(const std::string &val)
Handles changes to the target entity name.
void slot_onOwnshipObserverNameChanged(const std::string &val)
Handles changes to the ownship observer name.
void slot_onSaveOnServerChanged(bool val)
Handles changes to the save on server setting.
void slot_onServerIpChanged(const std::string &val)
Handles changes to the server IP address.
virtual void on_export()
Handles export button press.
virtual void slot_onValidTargetSensorsChanged(const std::vector< std::string > &validSensors)
Handles changes to the list of valid target sensors.
makVrv::DtDe & myDe
Reference to the display element.
Definition sarSettingsLogic.h:219
virtual void slot_onValidOwnshipEntitiesChanged(const std::vector< std::string > &validEntities)
Handles changes to the list of valid ownship entities.
void slot_onOpenSarResponseWindowChanged(bool val)
Handles changes to the open SAR response window setting.
void slot_onResetConnectionButtonPressed()
Handles the reset connection button press.
void slot_onServerSavePathChanged(const std::string &val)
Handles changes to the server save path.
void slot_onImageFormatChanged(int val)
Handles changes to the image format.
void slot_onImageSizeXChanged(int val)
Handles changes to the image X size.
void slot_onImageDataTypeChanged(int val)
Handles changes to the image data type.
void slot_onOwnshipAbsoluteAltChanged(double val)
Handles changes to the ownship absolute altitude.
virtual void slot_onSettingsValidChanged(bool valid, const std::string &tooltip)
Handles changes to the settings validity state.
void slot_onOwnshipAbsoluteLonChanged(double val)
Handles changes to the ownship absolute longitude.
void slot_onSensorToUseChanged(const std::string &val)
Handles changes to the sensor to use.
virtual void on_import()
Handles import button press.
void slot_onCrossrangeChanged(double val)
Handles changes to the crossrange.
void slot_onOwnshipEntityNameChanged(const std::string &val)
Handles changes to the ownship entity name.
virtual void on_exportFilePathChosen(const std::string &filePath)
Handles the selection of an export file path.
virtual ~DtSarSettingsLogic() override
Virtual destructor.
void slot_onTargetAbsoluteLonChanged(double val)
Handles changes to the target absolute longitude.
void slot_onServerPortChanged(int val)
Handles changes to the server port.
virtual void settingsRestored(const makVrv::DtSettingsBackup *b)
Called when settings have been restored.
virtual void sendSettingsToGui()
Updates the GUI with current settings values.
void slot_onOwnshipModeChanged(int val)
Handles changes to the ownship mode.
virtual void slot_onValidTargetEntitiesChanged(const std::vector< std::string > &validEntities)
Handles changes to the list of valid target entities.
void slot_onImageRotationChanged(int val)
Handles changes to the image rotation.
void slot_onDownrangeChanged(double val)
Handles changes to the downrange.
void slot_onTargetModeChanged(int val)
Handles changes to the target mode.
DtSarSettingsLogic(makVrv::DtDe &de, DtSarSettingsDialog &iFace, makVrv::DtPersistenceControlsInterface &pIFace)
Constructor.
void slot_onOwnshipAbsoluteLatChanged(double val)
Handles changes to the ownship absolute latitude.
virtual void on_importFilePathChosen(const std::string &filePath)
Handles the selection of an import file path.
void slot_onTargetAbsoluteLatChanged(double val)
Handles changes to the target absolute latitude.
DtSarSettingsDialog & myInterface
Reference to the SAR settings dialog interface.
Definition sarSettingsLogic.h:222
void slot_onTargetAbsoluteAltChanged(double val)
Handles changes to the target absolute altitude.
virtual void slot_onValidObserversChanged(const std::vector< std::string > &validObservers)
Handles changes to the list of valid observers.
void slot_onPowerChanged(double val)
Handles changes to the radar power.
virtual void slot_onIsConnectedChanged(bool val)
Handles changes to the connection status.
void slot_onTargetSensorNameChanged(const std::string &val)
Handles changes to the target sensor name.
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28
Defines DLL export macros for the SAR client plugin.
#define DT_DLL_sarClient
Definition sarClientPlugin.h:19
Defines the settings manager for SAR configuration.
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.