VR-Engage  2.2
Loading...
Searching...
No Matches
sarSettingsDialog.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file sarSettingsDialog.h
7//! \brief Defines the SAR settings dialog UI component
8//! \ingroup sarClient
9
10#pragma once
11
13#include "ui_SarSettingsDialog.h"
14
15#include <vrvCore/DtDe.h>
16
17#include <QDialog>
18
19namespace makVrv
20{
21//! \brief Forward declaration of the observer class
22class DtObserver;
23
24//! \brief Forward declaration of the persistence toolbar widget class
25class DtPersistenceToolbarWidget;
26} // namespace makVrv
27
28namespace makVre
29{
30//! \brief Forward declaration of the SAR settings logic class
32
33//! \brief Dialog for configuring Synthetic Aperture Radar settings
34//!
35//! The DtSarSettingsDialog provides a user interface for configuring various
36//! SAR settings including image parameters, ownship/target positioning,
37//! server connection settings, and other SAR-related options. It implements
38//! the SAR settings interface to communicate with the SAR settings manager.
39class DtSarSettingsDialog : public QDialog, public Ui::SarSettingsDialog, public makVrv::DtSarSettingsInterface
40{
41 Q_OBJECT
42
43public:
44 //! \brief Constructor
45 //! \param de Reference to the display element
46 //! \param parent Pointer to the parent widget
47 DtSarSettingsDialog(makVrv::DtDe& de, QWidget* parent);
48
49 //! \brief Virtual destructor
50 virtual ~DtSarSettingsDialog() override;
51
52 //! \brief Sets the list of available observers
53 //! \param observers Vector of observer names
54 //!
55 //! Updates the observer selection dropdown with available observer names
56 void setObservers(const std::vector<std::string>& observers);
57
58 //! \brief Updates dialog controls with current settings from the manager
59 //!
60 //! Refreshes all UI fields with the current state from the SAR settings manager
62
63 //! \brief Sets the ownship mode
64 //! \param val Mode value (typically 0=Entity, 1=Absolute Position)
65 virtual void setOwnshipMode(int val) override;
66
67 //! \brief Sets the ownship observer name
68 //! \param val Observer name for the ownship
69 virtual void setOwnshipObserverName(const std::string& val) override;
70
71 //! \brief Sets the ownship entity name
72 //! \param val Entity name for the ownship
73 virtual void setOwnshipEntityName(const std::string& val) override;
74
75 //! \brief Sets the ownship absolute position X coordinate
76 //! \param val X coordinate value (typically longitude)
77 virtual void setOwnshipAbsolutePositionX(double val) override;
78
79 //! \brief Sets the ownship absolute position Y coordinate
80 //! \param val Y coordinate value (typically latitude)
81 virtual void setOwnshipAbsolutePositionY(double val) override;
82
83 //! \brief Sets the ownship absolute position Z coordinate
84 //! \param val Z coordinate value (typically altitude)
85 virtual void setOwnshipAbsolutePositionZ(double val) override;
86
87 //! \brief Sets the target mode
88 //! \param val Mode value (typically 0=Entity, 1=Absolute Position)
89 virtual void setTargetMode(int val) override;
90
91 //! \brief Sets the target entity name
92 //! \param val Entity name for the target
93 virtual void setTargetEntityName(const std::string& val) override;
94
95 //! \brief Sets the target sensor name
96 //! \param val Sensor name for the target
97 virtual void setTargetSensorName(const std::string& val) override;
98
99 //! \brief Sets the target absolute position X coordinate
100 //! \param val X coordinate value (typically longitude)
101 virtual void setTargetAbsolutePositionX(double val) override;
102
103 //! \brief Sets the target absolute position Y coordinate
104 //! \param val Y coordinate value (typically latitude)
105 virtual void setTargetAbsolutePositionY(double val) override;
106
107 //! \brief Sets the target absolute position Z coordinate
108 //! \param val Z coordinate value (typically altitude)
109 virtual void setTargetAbsolutePositionZ(double val) override;
110
111 //! \brief Sets the image X dimension (width)
112 //! \param val Width in pixels
113 virtual void setImageSizeX(int val) override;
114
115 //! \brief Sets the image Y dimension (height)
116 //! \param val Height in pixels
117 virtual void setImageSizeY(int val) override;
118
119 //! \brief Sets the image rotation
120 //! \param val Rotation angle in degrees
121 virtual void setImageRotation(int val) override;
122
123 //! \brief Sets the image format
124 //! \param val Format value (index into image format options)
125 virtual void setImageFormat(int val) override;
126
127 //! \brief Sets the image data type
128 //! \param val Data type value (index into data type options)
129 virtual void setImageDataType(int val) override;
130
131 //! \brief Sets the sensor to use
132 //! \param val Sensor index value
133 virtual void setSensorToUse(int val) override;
134
135 //! \brief Sets whether to save images on the RadarFx server
136 //! \param val True to save on server, false otherwise
137 virtual void setSaveOnServer(bool val) override;
138
139 //! \brief Sets the server save path
140 //! \param val Path on server where images will be saved
141 virtual void setServerSavePath(const std::string& val) override;
142
143 //! \brief Sets the radar power level
144 //! \param val Power level value
145 virtual void setPower(double val) override;
146
147 //! \brief Sets the downrange (distance in direction of aircraft heading)
148 //! \param val Downrange value in meters
149 virtual void setDownrange(double val) override;
150
151 //! \brief Sets the crossrange (distance perpendicular to aircraft heading)
152 //! \param val Crossrange value in meters
153 virtual void setCrossrange(double val) override;
154
155 //! \brief Sets the RadarFx server IP address
156 //! \param val IP address as a string
157 virtual void setServerIp(const std::string& val) override;
158
159 //! \brief Sets the RadarFx server port number
160 //! \param val Port number
161 virtual void setServerPort(int val) override;
162
163 //! \brief Sets whether to automatically open the SAR response window
164 //! \param val True to open window, false otherwise
165 virtual void setOpenSarResponseWindow(bool val) override;
166
167 //! \name Qt Slots
168private slots:
169 //! @{
170 //! \brief Handles OK button click
171 //! Applies settings and closes the dialog
173
174 //! \brief Handles Cancel button click
175 //! Discards changes and closes the dialog
177
178 //! \brief Handles changes to the ownship mode
180
181 //! \brief Handles changes to the ownship entity name
182 //! \param name New entity name
183 void slot_onOwnshipEntityNameChanged(const QString& name);
184
185 //! \brief Handles changes to the ownship observer name
186 //! \param name New observer name
187 void slot_onOwnshipObserverNameChanged(const QString& name);
188
189 //! \brief Handles changes to the ownship absolute latitude
190 //! \param value New latitude value
191 void slot_onOwnshipAbsLatChanged(double value);
192
193 //! \brief Handles changes to the ownship absolute longitude
194 //! \param value New longitude value
195 void slot_onOwnshipAbsLonChanged(double value);
196
197 //! \brief Handles changes to the ownship absolute altitude
198 //! \param value New altitude value
199 void slot_onOwnshipAbsAltChanged(double value);
200
201 //! \brief Handles changes to the target mode
203
204 //! \brief Handles changes to the target entity name
205 //! \param name New entity name
206 void slot_onTargetEntityNameChanged(const QString& name);
207
208 //! \brief Handles changes to the target sensor name
209 //! \param name New sensor name
210 void slot_onTargetSensorNameChanged(const QString& name);
211
212 //! \brief Handles changes to the target absolute latitude
213 //! \param value New latitude value
214 void slot_onTargetAbsLatChanged(double value);
215
216 //! \brief Handles changes to the target absolute longitude
217 //! \param value New longitude value
218 void slot_onTargetAbsLonChanged(double value);
219
220 //! \brief Handles changes to the target absolute altitude
221 //! \param value New altitude value
222 void slot_onTargetAbsAltChanged(double value);
223
224 //! \brief Handles changes to the image X size
225 //! \param value New X size value
227
228 //! \brief Handles changes to the image Y size
229 //! \param value New Y size value
231
232 //! \brief Handles changes to the image rotation
233 //! \param value New rotation value
235
236 //! \brief Handles changes to the image format
237 //! \param index New format index
239
240 //! \brief Handles changes to the image data type
241 //! \param index New data type index
243
244 //! \brief Handles changes to the sensor to use
245 //! \param name New sensor name
246 void slot_onSensorToUseChanged(const QString& name);
247
248 //! \brief Handles changes to the save on server setting
249 //! \param state New checkbox state
251
252 //! \brief Handles changes to the server save path
253 //! \param path New save path
254 void slot_onServerSavePathChanged(const QString& path);
255
256 //! \brief Handles changes to the radar power
257 //! \param value New power value
258 void slot_onPowerChanged(double value);
259
260 //! \brief Handles changes to the downrange
261 //! \param value New downrange value
262 void slot_onDownrangeChanged(double value);
263
264 //! \brief Handles changes to the crossrange
265 //! \param value New crossrange value
266 void slot_onCrossrangeChanged(double value);
267
268 //! \brief Handles changes to the server IP address
269 //! \param ip New IP address
270 void slot_onServerIpChanged(const QString& ip);
271
272 //! \brief Handles changes to the server port
273 //! \param port New port number
274 void slot_onServerPortChanged(const QString& port);
275
276 //! \brief Handles changes to the open SAR response window setting
277 //! \param state New checkbox state
279
280 //! \brief Handles reset connection button press
282 //! @}
283
284protected:
285 //! \brief Reference to the display element
286 makVrv::DtDe& myDe;
287
288 //! \brief Pointer to the persistence toolbar widget
289 makVrv::DtPersistenceToolbarWidget* myPersistenceToolbar;
290
291 //! \brief Pointer to the SAR settings logic component
293};
294} // namespace makVre
void slot_onImageFormatChanged(int index)
Handles changes to the image format.
void slot_onSaveOnServerChanged(int state)
Handles changes to the save on server setting.
virtual void setTargetEntityName(const std::string &val) override
Sets the target entity name.
virtual void setTargetAbsolutePositionZ(double val) override
Sets the target absolute position Z coordinate.
void slot_onOwnshipObserverNameChanged(const QString &name)
Handles changes to the ownship observer name.
void slot_onOwnshipAbsAltChanged(double value)
Handles changes to the ownship absolute altitude.
virtual ~DtSarSettingsDialog() override
Virtual destructor.
virtual void setImageSizeX(int val) override
Sets the image X dimension (width)
void CancelButtonClicked()
Handles Cancel button click Discards changes and closes the dialog.
makVrv::DtDe & myDe
Reference to the display element.
Definition sarSettingsDialog.h:286
virtual void setDownrange(double val) override
Sets the downrange (distance in direction of aircraft heading)
virtual void setSensorToUse(int val) override
Sets the sensor to use.
void slot_onCrossrangeChanged(double value)
Handles changes to the crossrange.
void slot_onSensorToUseChanged(const QString &name)
Handles changes to the sensor to use.
void slot_onOwnshipEntityNameChanged(const QString &name)
Handles changes to the ownship entity name.
void slot_onTargetAbsLatChanged(double value)
Handles changes to the target absolute latitude.
void slot_onImageRotationChanged(int value)
Handles changes to the image rotation.
void slot_onTargetSensorNameChanged(const QString &name)
Handles changes to the target sensor name.
virtual void setServerPort(int val) override
Sets the RadarFx server port number.
virtual void setSaveOnServer(bool val) override
Sets whether to save images on the RadarFx server.
DtSarSettingsLogic * myLogic
Pointer to the SAR settings logic component.
Definition sarSettingsDialog.h:292
void slot_onTargetModeChanged()
Handles changes to the target mode.
void slot_onTargetEntityNameChanged(const QString &name)
Handles changes to the target entity name.
virtual void setServerSavePath(const std::string &val) override
Sets the server save path.
virtual void setOpenSarResponseWindow(bool val) override
Sets whether to automatically open the SAR response window.
makVrv::DtPersistenceToolbarWidget * myPersistenceToolbar
Pointer to the persistence toolbar widget.
Definition sarSettingsDialog.h:289
virtual void setImageSizeY(int val) override
Sets the image Y dimension (height)
void slot_onDownrangeChanged(double value)
Handles changes to the downrange.
virtual void setOwnshipEntityName(const std::string &val) override
Sets the ownship entity name.
virtual void setImageFormat(int val) override
Sets the image format.
virtual void setOwnshipObserverName(const std::string &val) override
Sets the ownship observer name.
void updateSettingsFromManager()
Updates dialog controls with current settings from the manager.
void slot_onImageSizeXChanged(int value)
Handles changes to the image X size.
void slot_onResetConnectionButtonPressed()
Handles reset connection button press.
virtual void setImageRotation(int val) override
Sets the image rotation.
void slot_onServerIpChanged(const QString &ip)
Handles changes to the server IP address.
virtual void setServerIp(const std::string &val) override
Sets the RadarFx server IP address.
void slot_onImageDataTypeChanged(int index)
Handles changes to the image data type.
virtual void setTargetMode(int val) override
Sets the target mode.
virtual void setImageDataType(int val) override
Sets the image data type.
virtual void setTargetAbsolutePositionY(double val) override
Sets the target absolute position Y coordinate.
virtual void setOwnshipAbsolutePositionZ(double val) override
Sets the ownship absolute position Z coordinate.
virtual void setCrossrange(double val) override
Sets the crossrange (distance perpendicular to aircraft heading)
void slot_onOwnshipAbsLatChanged(double value)
Handles changes to the ownship absolute latitude.
DtSarSettingsDialog(makVrv::DtDe &de, QWidget *parent)
Constructor.
virtual void setOwnshipMode(int val) override
Sets the ownship mode.
virtual void setPower(double val) override
Sets the radar power level.
virtual void setOwnshipAbsolutePositionY(double val) override
Sets the ownship absolute position Y coordinate.
virtual void setTargetSensorName(const std::string &val) override
Sets the target sensor name.
void slot_onOpenSarResponseWindowChanged(int state)
Handles changes to the open SAR response window setting.
void OkButtonClicked()
Handles OK button click Applies settings and closes the dialog.
void setObservers(const std::vector< std::string > &observers)
Sets the list of available observers.
void slot_onImageSizeYChanged(int value)
Handles changes to the image Y size.
void slot_onTargetAbsAltChanged(double value)
Handles changes to the target absolute altitude.
void slot_onServerPortChanged(const QString &port)
Handles changes to the server port.
void slot_onPowerChanged(double value)
Handles changes to the radar power.
virtual void setTargetAbsolutePositionX(double val) override
Sets the target absolute position X coordinate.
void slot_onTargetAbsLonChanged(double value)
Handles changes to the target absolute longitude.
virtual void setOwnshipAbsolutePositionX(double val) override
Sets the ownship absolute position X coordinate.
void slot_onOwnshipModeChanged()
Handles changes to the ownship mode.
void slot_onOwnshipAbsLonChanged(double value)
Handles changes to the ownship absolute longitude.
void slot_onServerSavePathChanged(const QString &path)
Handles changes to the server save path.
Logic component for managing SAR settings.
Definition sarSettingsLogic.h:41
Interface for SAR settings components based on the humble dialog pattern.
Definition sarSettingsInterface.h:25
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28
Defines the SAR settings interface for communicating with SAR settings components.
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.