NDEVR
API Documentation
MagneticDeclinationDialog

Dialog which allows user to set or calculate the magnetic declination. More...

Collaboration diagram for MagneticDeclinationDialog:
[legend]

Public Member Functions

 MagneticDeclinationDialog (DesignObjectLookup *lookup, QWidget *parent=nullptr)
 Constructs a MagneticDeclinationDialog.
void onFinishedSignal (PopupInfo info)
 Emitted when the declination dialog workflow is finished.
void showMagnetometerOptionsPopup (PopupInfo info)
 Displays a popup with magnetometer options.

Static Public Member Functions

static void RegisterDialog (DesignObjectLookup *lookup)
 Registers this dialog type with the application for the given lookup.
static void SetSensor (OrientationSensor *sensor)
 Sets the orientation sensor used for magnetic readings.

Protected Member Functions

void updateCalculation ()
 Recalculates the magnetic declination from current inputs.
void updateMagneticReference (const Angle< fltp08 > &angle)
 Updates the stored magnetic reference angle.
void updateMagnetReadingButton ()
 Updates the magnetometer reading button state based on sensor availability.

Protected Attributes

Buttonm_finish_button
 Button to confirm and apply the declination value.
QCustomLineEditm_line_edit
 Line edit for entering the declination angle manually.
QCustomLineEditm_magnetic_angle
 Line edit displaying the measured magnetic angle.
QGroupBox * m_magnetic_reading_group
 Group box containing magnetic reading controls.
QGroupBox * m_magnetic_value_group
 Group box containing magnetic value entry controls.
Buttonm_magnetometer_button
 Button to access magnetometer calibration.
MagnetometerWidgetm_magnetometer_widget = nullptr
 Widget showing live magnetometer state.
Buttonm_measure_button
 Button to take a magnetic reference measurement.
OrientationOperationsWidgetm_ops_widget
 Widget for orientation-related operations.
Angle< fltp08m_reference_angle = Constant<Angle<fltp08>>::Invalid
 The known reference angle for declination calculation.

Static Protected Attributes

static QPointer< OrientationSensors_magnetic_reading_callback
 Shared sensor used for magnetic readings across instances.

Detailed Description

Dialog which allows user to set or calculate the magnetic declination.


https://en.wikipedia.org/wiki/Magnetic_declination

Definition at line 23 of file MagneticDeclinationDialog.h.

Constructor & Destructor Documentation

◆ MagneticDeclinationDialog()

MagneticDeclinationDialog::MagneticDeclinationDialog ( DesignObjectLookup * lookup,
QWidget * parent = nullptr )

Constructs a MagneticDeclinationDialog.

Parameters
[in]lookupThe DesignObjectLookup for accessing design objects.
[in]parentThe parent widget.

Member Function Documentation

◆ RegisterDialog()

void MagneticDeclinationDialog::RegisterDialog ( DesignObjectLookup * lookup)
static

Registers this dialog type with the application for the given lookup.

Parameters
[in]lookupThe DesignObjectLookup to register with.

◆ SetSensor()

void MagneticDeclinationDialog::SetSensor ( OrientationSensor * sensor)
static

Sets the orientation sensor used for magnetic readings.

Parameters
[in]sensorThe OrientationSensor to use for declination measurements.

◆ showMagnetometerOptionsPopup()

void MagneticDeclinationDialog::showMagnetometerOptionsPopup ( PopupInfo info)

Displays a popup with magnetometer options.

Parameters
[in]infoThe PopupInfo controlling popup appearance and behavior.

◆ updateMagneticReference()

void MagneticDeclinationDialog::updateMagneticReference ( const Angle< fltp08 > & angle)
protected

Updates the stored magnetic reference angle.

Parameters
[in]angleThe new magnetic reference angle.

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