NDEVR
API Documentation
GPSDialog

The main GPS configuration dialog providing connection management, satellite status display, quality indicators, and file-based GPS input. More...

Collaboration diagram for GPSDialog:
[legend]

Public Member Functions

 GPSDialog (GPSSensor *sensor, QWidget *parent=nullptr)
 Constructs the GPS dialog for the given sensor.
 ~GPSDialog ()
 Destructor.
void acceptedSignal ()
 Emitted when the user accepts the dialog.
void addConfigCallback (GNSSConfigCallback *callback)
 Adds a configuration callback option to the dialog.
void addTab (QWidget *tab)
 Adds a tab widget to the dialog's tab bar.
virtual bool event (QEvent *event) override
 Handles generic events for the dialog.
GPSSensorgps ()
 Returns the GPS sensor being configured.
virtual void hideEvent (QHideEvent *event) override
 Handles the dialog hide event.
void newGPSSignal ()
 Emitted when a new GPS sensor is chosen.
void paintEvent (QPaintEvent *) override
 Paints the dialog background.
void setGPSSensor (GPSSensor *sensor)
 Sets the GPS sensor for this dialog.
void showAcceptButton (bool show_accept)
 Shows or hides the accept button at the bottom of the dialog.
virtual void showEvent (QShowEvent *event) override
 Handles the dialog show event.
QSize sizeHint () const override
 Returns the preferred size for this dialog.

Protected Member Functions

void disconnectGNSS ()
 Disconnects the current GNSS connection.
ContainerWidgetBasemainContainer () const
 Returns the main container widget of this dialog.
void setAutoConnect (bool autoconnect)
 Sets whether the GPS should auto-connect on startup.
void setConnectionInfo (ConnectionInfo info)
 Sets the connection info for the GPS sensor.

Protected Attributes

QPixmap m_background
 Background image for the dialog.
Buffer< GNSSConfigCallback * > m_config_callbacks
 Registered configuration callbacks.
Buffer< Button * > m_connection_buttons
 Buttons for each connection type.
Buffer< ConnectionDialogFactory * > m_connection_dialog_factories
 Factories for creating connection dialogs.
Buffer< ConnectionDialog * > m_connection_dialogs
 Active connection dialog instances.
FileChooserDialogm_file_chooser_dialog = nullptr
 File chooser for GPS file selection.
InfoPipem_log = nullptr
 Log for status messages.
GPSSensorm_sensor = nullptr
 The GPS sensor being configured.
Dictionary< String, QCustomLabel * > m_stream_speed_widgets
 Labels showing stream speed per connection.
Ui::GPSDialogUI * ui = nullptr
 The auto-generated UI form.

Detailed Description

The main GPS configuration dialog providing connection management, satellite status display, quality indicators, and file-based GPS input.

Definition at line 31 of file GPSDialog.h.

Constructor & Destructor Documentation

◆ GPSDialog()

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

Constructs the GPS dialog for the given sensor.

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

Member Function Documentation

◆ addConfigCallback()

void GPSDialog::addConfigCallback ( GNSSConfigCallback * callback)

Adds a configuration callback option to the dialog.

Parameters
[in]callbackThe configuration callback to add.

◆ addTab()

void GPSDialog::addTab ( QWidget * tab)

Adds a tab widget to the dialog's tab bar.

Parameters
[in]tabThe widget to add as a tab.

◆ event()

virtual bool GPSDialog::event ( QEvent * event)
overridevirtual

Handles generic events for the dialog.

Parameters
[in]eventThe event to handle.
Returns
True if the event was handled.

References event().

Referenced by event(), hideEvent(), and showEvent().

◆ gps()

GPSSensor * GPSDialog::gps ( )

Returns the GPS sensor being configured.

Returns
Pointer to the GPS sensor.

◆ hideEvent()

virtual void GPSDialog::hideEvent ( QHideEvent * event)
overridevirtual

Handles the dialog hide event.

Parameters
[in]eventThe hide event.

References event().

◆ mainContainer()

ContainerWidgetBase * GPSDialog::mainContainer ( ) const
protected

Returns the main container widget of this dialog.

Returns
Pointer to the container widget.

◆ paintEvent()

void GPSDialog::paintEvent ( QPaintEvent * )
override

Paints the dialog background.

Parameters
[in]eventThe paint event.

◆ setAutoConnect()

void GPSDialog::setAutoConnect ( bool autoconnect)
protected

Sets whether the GPS should auto-connect on startup.

Parameters
[in]autoconnectWhether to auto-connect.

◆ setConnectionInfo()

void GPSDialog::setConnectionInfo ( ConnectionInfo info)
protected

Sets the connection info for the GPS sensor.

Parameters
[in]infoThe connection info to apply.

◆ setGPSSensor()

void GPSDialog::setGPSSensor ( GPSSensor * sensor)

Sets the GPS sensor for this dialog.

Parameters
[in]sensorThe GPS sensor to configure.

◆ showAcceptButton()

void GPSDialog::showAcceptButton ( bool show_accept)

Shows or hides the accept button at the bottom of the dialog.

Parameters
[in]show_acceptWhether to show the accept button.

◆ showEvent()

virtual void GPSDialog::showEvent ( QShowEvent * event)
overridevirtual

Handles the dialog show event.

Parameters
[in]eventThe show event.

References event().

◆ sizeHint()

QSize GPSDialog::sizeHint ( ) const
override

Returns the preferred size for this dialog.

Returns
The recommended size hint.

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