NDEVR
API Documentation
GPSWidget.h
1#pragma once
2#include "DLLInfo.h"
3#include "GPSInterface/Headers/GPSSensor.h"
4#include "Widgets/Headers/Button.h"
5#include <NDEVR/PositionSensor.h>
6#include <QPointer>
7#include <QTabWidget>
8
9class QGroupBox;
10namespace NDEVR
11{
12
13 class Button;
15 class CSignalQuality;
16 class CAzimuthElevationWnd;
17 class LEDLightWidget;
18 class QTModelManager;
19 class GPSDialog;
20 class QCustomLabel;
21 struct PopupInfo;
23
39
42 {
43 Q_OBJECT
44 public:
47 explicit GNSSOpenSettingsButton(QWidget* parent = nullptr);
51 explicit GNSSOpenSettingsButton(GPSSensor* sensor, QWidget* parent = nullptr);
55 explicit GNSSOpenSettingsButton(const UUID& active_sensor, QWidget* parent = nullptr);
63 void setSensor(const UUID& sensor);
66 void setTakeLocationReading(bool value) { m_take_location_reading = value; };
75 GPSSensor* sensor() const;
76 protected slots:
81 signals:
86 protected:
88 void init();
92 protected:
93 UUID m_active_sensor = Constant<UUID>::Invalid;
94 GPSSensor* m_sensor = nullptr;
95 QPointer<GPSDialog> m_gps_dialog;
98 };
99
101 class GPS_INTERFACE_API GNSSStatusWidget : public QWidget
102 {
103 Q_OBJECT
104 public:
107 explicit GNSSStatusWidget(QWidget* parent = nullptr);
111 explicit GNSSStatusWidget(const UUID& active_sensor, QWidget* parent = nullptr);
115 explicit GNSSStatusWidget(GPSSensor* sensor, QWidget* parent = nullptr);
120 void setSensor(const UUID& active_sensor);
123 void setSensor(GPSSensor* sensor);
126 void setHorizontal(bool is_horizontal);
130 signals:
133 protected:
135 void init();
136 protected slots:
139 protected:
140 Button* m_gps_status = nullptr;
141 QGroupBox* m_status_box;
142 QGroupBox* m_accuracy_box;
145 UUID m_active_sensor = Constant<UUID>::Invalid;
146 GPSSensor* m_sensor = nullptr;
147 bool m_is_horizontal = true;
148 };
149
151 class GPS_INTERFACE_API GPSWidget : public QWidget
152 {
153 Q_OBJECT
154 public:
157 explicit GPSWidget(QWidget* parent = nullptr);
161 explicit GPSWidget(const UUID& active_sensor, QWidget* parent = nullptr);
165 explicit GPSWidget(GPSSensor* sensor, QWidget* parent = nullptr);
167 virtual ~GPSWidget();
173 void setSensor(const UUID& active_sensor);
179 void setTakeLocationReading(bool value);
192 signals:
200 protected slots:
205 protected:
207 void init();
208 protected:
210 UUID m_active_sensor = Constant<UUID>::Invalid;
211 GPSSensor* m_sensor = nullptr;
216 };
217}
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
A core widget that allows the user to click one of many button types.
Definition Button.h:68
Button(QWidget *parent=nullptr)
Constructs a Button with an optional parent widget.
A bar chart widget that displays per-satellite signal quality (SNR) with animated transitions and con...
A dialog that allows the user to set a Coordinate projection for the current project.
A button that opens the GPS settings dialog when clicked, displaying the current connection status an...
Definition GPSWidget.h:42
void setSensor(const UUID &sensor)
Sets the GPS sensor by UUID.
void hideGPSDialogSlot()
Slot called to hide the GPS dialog.
void setTakeOrientationReading(bool value)
Sets whether to take orientation readings.
Definition GPSWidget.h:69
UUID m_active_sensor
The UUID of the active sensor.
Definition GPSWidget.h:93
void setTakeLocationReading(bool value)
Sets whether to take location readings.
Definition GPSWidget.h:66
GNSSOpenSettingsButton(const UUID &active_sensor, QWidget *parent=nullptr)
Constructs the button for a sensor identified by UUID.
bool m_take_location_reading
Whether location readings are enabled.
Definition GPSWidget.h:97
GPSSensor * sensor() const
Returns the associated GPS sensor.
void _setSensor(GPSSensor *sensor)
Internal setter for the GPS sensor.
GNSSOpenSettingsButton(GPSSensor *sensor, QWidget *parent=nullptr)
Constructs the button for a specific GPS sensor.
void setSensor(GPSSensor *sensor)
Sets the GPS sensor to use.
void newGPSChosenSignal()
Emitted when a new GPS sensor is chosen.
void onUpdatedSlot()
Slot called when the sensor data is updated.
void init()
Initializes the button UI and signal connections.
GNSSQualitySettings qualitySettings() const
Returns the current quality settings for readings.
GPSSensor * m_sensor
The GPS sensor instance.
Definition GPSWidget.h:94
GNSSOpenSettingsButton(QWidget *parent=nullptr)
Constructs the button with no sensor.
virtual ~GNSSOpenSettingsButton()
Destructor.
bool m_take_orientation_reading
Whether orientation readings are enabled.
Definition GPSWidget.h:96
QPointer< GPSDialog > m_gps_dialog
The GPS settings dialog.
Definition GPSWidget.h:95
void onUpdatedSignal()
Emitted when sensor data is updated.
void updatedSlot()
Slot called when the sensor data is updated.
virtual ~GNSSStatusWidget()
Destructor.
void setHorizontal(bool is_horizontal)
Sets whether the widget lays out horizontally or vertically.
GNSSStatusWidget(GPSSensor *sensor, QWidget *parent=nullptr)
Constructs the status widget for a specific GPS sensor.
bool m_is_horizontal
Whether the layout is horizontal.
Definition GPSWidget.h:147
QGroupBox * m_accuracy_box
Group box for the accuracy section.
Definition GPSWidget.h:142
QCustomLabel * m_gps_accuracy
Label displaying accuracy value.
Definition GPSWidget.h:143
void statusChangedSignal() const
Emitted when the status indicator changes.
RGBColor statusColor() const
Returns the current status indicator color.
LEDLightWidget * m_led_widget
LED indicator for connection quality.
Definition GPSWidget.h:144
UUID m_active_sensor
The UUID of the active sensor.
Definition GPSWidget.h:145
void setSensor(GPSSensor *sensor)
Sets the GPS sensor to display status for.
Button * m_gps_status
Button displaying GPS status text.
Definition GPSWidget.h:140
GNSSStatusWidget(const UUID &active_sensor, QWidget *parent=nullptr)
Constructs the status widget for a sensor identified by UUID.
void setSensor(const UUID &active_sensor)
Sets the sensor by UUID.
GPSSensor * m_sensor
The GPS sensor instance.
Definition GPSWidget.h:146
void init()
Initializes the widget layout and sub-widgets.
QGroupBox * m_status_box
Group box for the status section.
Definition GPSWidget.h:141
GNSSStatusWidget(QWidget *parent=nullptr)
Constructs the status widget with no sensor.
The main GPS configuration dialog providing connection management, satellite status display,...
Definition GPSDialog.h:32
A GPS sensor implementation that receives NMEA data from serial connections, files,...
Definition GPSSensor.h:61
virtual ~GPSWidget()
Destructor.
void newGPSChosenSignal()
Emitted when a new GPS sensor is chosen.
void readingTakenSignal(TakeReadingData data) const
Emitted when a reading has been taken with the accumulated data.
GPSWidget(GPSSensor *sensor, QWidget *parent=nullptr)
Constructs the GPS widget for a specific GPS sensor.
GNSSOpenSettingsButton * m_gps_settings_button
Button to open GPS settings.
Definition GPSWidget.h:213
UUID m_active_sensor
The UUID of the active sensor.
Definition GPSWidget.h:210
void setSensor(const UUID &active_sensor)
Sets the sensor by UUID.
TakeReadingData m_take_reading_data
Current take-reading accumulation state.
Definition GPSWidget.h:209
void updatedSignal()
Emitted when the sensor data is updated.
void setSensor(GPSSensor *sensor)
Sets the GPS sensor to use.
GPSPoint currentGPS() const
Returns the current GPS point data.
bool m_take_location_reading
Whether location readings are enabled.
Definition GPSWidget.h:215
GPSSensor * m_sensor
The GPS sensor instance.
Definition GPSWidget.h:211
void updatedSlot()
Slot called when the sensor data is updated.
void updateReadingSlot()
Slot called to update the take-reading accumulation.
GPSWidget(QWidget *parent=nullptr)
Constructs the GPS widget with no sensor.
Button * m_take_reading_button
Button to start/stop taking a reading.
Definition GPSWidget.h:212
Vertex< 3, fltp08 > currentLocation() const
Returns the current 3D location from the GPS sensor.
GPSSensor * sensor() const
Returns the associated GPS sensor.
void setTakeOrientationReading(bool value)
Sets whether to take orientation readings.
void setTakeLocationReading(bool value)
Sets whether to take location readings.
GNSSQualitySettings qualitySettings() const
Returns the current quality settings for readings.
void init()
Initializes the widget layout and sub-widgets.
bool m_take_orientation_reading
Whether orientation readings are enabled.
Definition GPSWidget.h:214
GPSWidget(const UUID &active_sensor, QWidget *parent=nullptr)
Constructs the GPS widget for a sensor identified by UUID.
Displays a simple light widget that can be set to blink or change colors.
Displays translated text.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:57
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:62
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
A point in N-dimensional space, used primarily for spatial location information.
Definition Vertex.hpp:44
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
GNSSQuality
Describes the quality level of a GNSS position fix.
Definition GPSPoint.h:16
Configures quality-dependent settings for GNSS readings, including sample counts, timing,...
A geographic coordinate point produced by a GNSS receiver.
Definition GPSPoint.h:36
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16
Holds accumulated data during a take-reading operation, including sample counts, averaged position,...
Definition GPSWidget.h:27
uint04 orientation_count
Number of orientation samples accumulated.
Definition GPSWidget.h:33
Time start_time
Time when the reading operation started.
Definition GPSWidget.h:36
uint04 location_count
Number of location samples accumulated.
Definition GPSWidget.h:32
TimeSpan take_reading_sample_time
Required sampling duration.
Definition GPSWidget.h:30
Vertex< 3, fltp08 > location
Averaged location position.
Definition GPSWidget.h:34
uint04 take_reading_sample_count
Required number of samples.
Definition GPSWidget.h:29
bool is_active
Whether a reading is currently in progress.
Definition GPSWidget.h:37
Vector< 3, Angle< fltp08 > > orientation
Averaged orientation angles.
Definition GPSWidget.h:35
GNSSQuality quality
The GNSS quality level during the reading.
Definition GPSWidget.h:28