NDEVR
API Documentation
GNSSStatusWidget

A compact widget displaying the current GNSS connection status, accuracy, and an LED indicator for quick visual assessment. More...

Collaboration diagram for GNSSStatusWidget:
[legend]

Public Member Functions

 GNSSStatusWidget (const UUID &active_sensor, QWidget *parent=nullptr)
 Constructs the status widget for a sensor identified by UUID.
 GNSSStatusWidget (GPSSensor *sensor, QWidget *parent=nullptr)
 Constructs the status widget for a specific GPS sensor.
 GNSSStatusWidget (QWidget *parent=nullptr)
 Constructs the status widget with no sensor.
virtual ~GNSSStatusWidget ()
 Destructor.
void setHorizontal (bool is_horizontal)
 Sets whether the widget lays out horizontally or vertically.
void setSensor (const UUID &active_sensor)
 Sets the sensor by UUID.
void setSensor (GPSSensor *sensor)
 Sets the GPS sensor to display status for.
void statusChangedSignal () const
 Emitted when the status indicator changes.
RGBColor statusColor () const
 Returns the current status indicator color.

Protected Member Functions

void init ()
 Initializes the widget layout and sub-widgets.
void updatedSlot ()
 Slot called when the sensor data is updated.

Protected Attributes

QGroupBox * m_accuracy_box
 Group box for the accuracy section.
UUID m_active_sensor = Constant<UUID>::Invalid
 The UUID of the active sensor.
QCustomLabelm_gps_accuracy = nullptr
 Label displaying accuracy value.
Buttonm_gps_status = nullptr
 Button displaying GPS status text.
bool m_is_horizontal = true
 Whether the layout is horizontal.
LEDLightWidgetm_led_widget = nullptr
 LED indicator for connection quality.
GPSSensorm_sensor = nullptr
 The GPS sensor instance.
QGroupBox * m_status_box
 Group box for the status section.

Detailed Description

A compact widget displaying the current GNSS connection status, accuracy, and an LED indicator for quick visual assessment.

Definition at line 101 of file GPSWidget.h.

Constructor & Destructor Documentation

◆ GNSSStatusWidget() [1/3]

GNSSStatusWidget::GNSSStatusWidget ( QWidget * parent = nullptr)
explicit

Constructs the status widget with no sensor.

Parameters
[in]parentOptional parent widget.

◆ GNSSStatusWidget() [2/3]

GNSSStatusWidget::GNSSStatusWidget ( const UUID & active_sensor,
QWidget * parent = nullptr )
explicit

Constructs the status widget for a sensor identified by UUID.

Parameters
[in]active_sensorThe sensor UUID.
[in]parentOptional parent widget.

◆ GNSSStatusWidget() [3/3]

GNSSStatusWidget::GNSSStatusWidget ( GPSSensor * sensor,
QWidget * parent = nullptr )
explicit

Constructs the status widget for a specific GPS sensor.

Parameters
[in]sensorThe GPS sensor.
[in]parentOptional parent widget.

Member Function Documentation

◆ setHorizontal()

void GNSSStatusWidget::setHorizontal ( bool is_horizontal)

Sets whether the widget lays out horizontally or vertically.

Parameters
[in]is_horizontalTrue for horizontal layout.

◆ setSensor() [1/2]

void GNSSStatusWidget::setSensor ( const UUID & active_sensor)

Sets the sensor by UUID.

Parameters
[in]active_sensorThe sensor UUID.

◆ setSensor() [2/2]

void GNSSStatusWidget::setSensor ( GPSSensor * sensor)

Sets the GPS sensor to display status for.

Parameters
[in]sensorThe GPS sensor.

◆ statusColor()

RGBColor GNSSStatusWidget::statusColor ( ) const

Returns the current status indicator color.

Returns
The RGB color representing the current status.

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