NDEVR
API Documentation
MagnetometerCalibrationDialog

Dialog which allows user to edit or create a MagneticCalibrationData object. More...

Inheritance diagram for MagnetometerCalibrationDialog:
[legend]
Collaboration diagram for MagnetometerCalibrationDialog:
[legend]

Public Member Functions

 MagnetometerCalibrationDialog (const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
 Constructs a MagnetometerCalibrationDialog for a specific design object.
 MagnetometerCalibrationDialog (QWidget *parent=nullptr)
 Constructs a MagnetometerCalibrationDialog without a pre-existing design object.
CalibrationData calibrationData () const
 Returns the current calibration data.
void cancel ()
 Cancels the current calibration process.
bool event (QEvent *event) override
 Handles Qt events, including activation and show events.
void init ()
 Initializes the UI elements and signal connections.
bool isFinished () const
 Returns whether the calibration process has finished.
DesignObjectLookupmanager ()
 Returns the design object lookup used by this dialog.
void requestCloseSignal ()
 Emitted when the dialog requests to be closed.
void setModelManager (DesignObjectLookup *manager)
 Sets the design object lookup used for managing calibration data.
void setSensor (OrientationSensor *sensor)
 Sets the orientation sensor to calibrate.
void showClear (bool show_clear)
 Sets whether the clear button is visible.
void showMatrix (bool show_matrix)
 Sets whether the calibration matrix is displayed.
void startRecording ()
 Begins recording magnetometer calibration samples.
void toPDF ()
 Exports the calibration results to a PDF document.
void updateValues () override
 Updates the displayed values from the current sensor and calibration state.
Public Member Functions inherited from Editor
 Editor (const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
 Constructs an Editor targeting the given design object.
 Editor (QWidget *parent=nullptr)
 Constructs an Editor with no design object target.
virtual Buffer< QWidget * > bottomOptions ()
 Returns widgets to be placed at the bottom of the editor layout.
virtual StringView customDialogIcon () const
 Returns a custom icon name for the editor dialog, or an empty string if none.
virtual TranslatedString customDialogTitle () const
 Returns a custom title for the editor dialog, or an empty string if none.
virtual bool disableExport () const
 Returns whether exporting should be disabled for this editor.
Model getModel () const
 Returns the target design object as a Model.
DesignObject getObject () const
 Returns the target design object.
virtual bool isBusy () const
 Returns whether the editor is currently busy performing an operation.
void isBusyStatusChanged ()
 Emitted when the busy status of the editor changes.
virtual bool isHorizontal () const
 Returns whether the editor layout is horizontal.
virtual void moveTargetWithMouse ()
 Initiates interactive mouse-based movement of the target object in the viewport.
void objectUpdatedSignal ()
 Emitted when the target object has been updated.
virtual InterfaceOrientationControllerorientationController () const
 Returns the orientation controller associated with this editor.
virtual Buffer< QWidget * > printableWidgetOptions ()
 Returns option widgets to configure printing for this editor.
virtual Buffer< QWidget * > printableWidgets ()
 Returns the widgets that can be printed from this editor.
virtual void requestScrollEnabled (bool enabled)
 Requests enabling or disabling scrolling within the editor.
virtual void setHorizontal (bool horizontal)
 Sets whether the editor layout is horizontal.
virtual void setReadOnly (bool read_only)
 Sets whether the editor is in read-only mode.
virtual void setTarget (const DynamicPointer< QTDesignObject > &object)
 Sets the design object target for this editor.
virtual void setup (DesignObjectDialog *, const ShowPropertiesSettings &)
 Sets up the editor with a parent dialog and property display settings.
virtual EditorShowMode showMode () const
 Returns the preferred display mode for this editor.
const DynamicPointer< QTDesignObject > & target () const
 Returns the current design object target.

Static Public Attributes

static ApplicationOption< bool > default_show_clear
 Default application setting for showing the clear button.
static ApplicationOption< bool > default_show_matrix
 Default application setting for showing the calibration matrix.

Protected Member Functions

void createFileChooser ()
 Creates the file chooser dialog if it does not yet exist.
FileChooserDialogfileChooser (bool is_save)
 Returns or creates the file chooser dialog for saving or loading calibration data.
Protected Member Functions inherited from Editor
void onDesignObjectDeletedSlot ()
 Slot called when the target design object is deleted.
void onDesignObjectUpdateSlot ()
 Slot called when the target design object is updated.

Protected Attributes

Buttonm_clear_button = nullptr
 Button to clear the current calibration data.
QTimer * m_countdown_timer = nullptr
 Timer used for calibration countdown display.
FileChooserDialogm_file_chooser = nullptr
 Dialog for saving or loading calibration files.
bool m_is_activated = false
 Whether the dialog has been activated and shown.
bool m_is_finished = false
 Whether the calibration process has finished.
bool m_is_saving = false
 Whether a save operation is currently in progress.
DesignObjectLookupm_manager = nullptr
 The design object lookup for managing calibration data.
OrientationSensorm_sensor = nullptr
 The orientation sensor being calibrated.
bool m_show_matrix = true
 Whether the calibration matrix is currently displayed.
bool m_show_popup = true
 Whether to show a popup on calibration completion.
Time m_start_time = Constant<Time>::Invalid
 The time when calibration recording started.
Ui::MagnetometerCalibrationUI * ui = nullptr
 The auto-generated UI form.
Protected Attributes inherited from Editor
DynamicPointer< QTDesignObjectm_design_object
 The design object being edited.
bool m_is_read_only = false
 Whether the editor is in read-only mode.
InterfaceOrientationControllerm_orientation_controller
 The orientation controller for this editor.

Detailed Description

Dialog which allows user to edit or create a MagneticCalibrationData object.


Definition at line 24 of file MagnetometerCalibrationDialog.h.

Constructor & Destructor Documentation

◆ MagnetometerCalibrationDialog() [1/2]

MagnetometerCalibrationDialog::MagnetometerCalibrationDialog ( const DynamicPointer< QTDesignObject > & object,
QWidget * parent = nullptr )

Constructs a MagnetometerCalibrationDialog for a specific design object.

Parameters
[in]objectThe design object representing the calibration data.
[in]parentThe parent widget.

◆ MagnetometerCalibrationDialog() [2/2]

MagnetometerCalibrationDialog::MagnetometerCalibrationDialog ( QWidget * parent = nullptr)

Constructs a MagnetometerCalibrationDialog without a pre-existing design object.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ calibrationData()

CalibrationData MagnetometerCalibrationDialog::calibrationData ( ) const

Returns the current calibration data.

Returns
The CalibrationData collected during the calibration process.

◆ event()

bool MagnetometerCalibrationDialog::event ( QEvent * event)
override

Handles Qt events, including activation and show events.

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

References event().

Referenced by event().

◆ fileChooser()

FileChooserDialog * MagnetometerCalibrationDialog::fileChooser ( bool is_save)
protected

Returns or creates the file chooser dialog for saving or loading calibration data.

Parameters
[in]is_saveWhether the file chooser is for saving (true) or loading (false).
Returns
A pointer to the FileChooserDialog.

◆ isFinished()

bool MagnetometerCalibrationDialog::isFinished ( ) const

Returns whether the calibration process has finished.

Returns
True if calibration is complete.

◆ manager()

DesignObjectLookup * MagnetometerCalibrationDialog::manager ( )

Returns the design object lookup used by this dialog.

Returns
A pointer to the DesignObjectLookup.

Referenced by setModelManager().

◆ setModelManager()

void MagnetometerCalibrationDialog::setModelManager ( DesignObjectLookup * manager)

Sets the design object lookup used for managing calibration data.

Parameters
[in]managerThe DesignObjectLookup instance.

References manager().

◆ setSensor()

void MagnetometerCalibrationDialog::setSensor ( OrientationSensor * sensor)

Sets the orientation sensor to calibrate.

Parameters
[in]sensorThe OrientationSensor to use for calibration.

◆ showClear()

void MagnetometerCalibrationDialog::showClear ( bool show_clear)

Sets whether the clear button is visible.

Parameters
[in]show_clearWhether to show the clear button.

◆ showMatrix()

void MagnetometerCalibrationDialog::showMatrix ( bool show_matrix)

Sets whether the calibration matrix is displayed.

Parameters
[in]show_matrixWhether to show the matrix.

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