3#include <NDEVR/QTModelManager.h>
4#include <NDEVR/Editor.h>
5#include <NDEVR/ApplicationOptions.h>
9 class MagnetometerCalibrationUI;
17 class CalibrationData;
119 Ui::MagnetometerCalibrationUI*
ui =
nullptr;
The default object to store data of any type that should persist through sessions of the application.
A core class where all Design Objects including models, materials, and geometries are stored.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Editor(QWidget *parent=nullptr)
Constructs an Editor with no design object target.
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
FileChooserDialog * fileChooser(bool is_save)
Returns or creates the file chooser dialog for saving or loading calibration data.
CalibrationData calibrationData() const
Returns the current calibration data.
void startRecording()
Begins recording magnetometer calibration samples.
Ui::MagnetometerCalibrationUI * ui
The auto-generated UI form.
OrientationSensor * m_sensor
The orientation sensor being calibrated.
FileChooserDialog * m_file_chooser
Dialog for saving or loading calibration files.
bool event(QEvent *event) override
Handles Qt events, including activation and show events.
bool m_is_finished
Whether the calibration process has finished.
bool m_show_matrix
Whether the calibration matrix is currently displayed.
bool m_is_activated
Whether the dialog has been activated and shown.
void setModelManager(DesignObjectLookup *manager)
Sets the design object lookup used for managing calibration data.
MagnetometerCalibrationDialog(QWidget *parent=nullptr)
Constructs a MagnetometerCalibrationDialog without a pre-existing design object.
void updateValues() override
Updates the displayed values from the current sensor and calibration state.
bool m_is_saving
Whether a save operation is currently in progress.
DesignObjectLookup * m_manager
The design object lookup for managing calibration data.
void init()
Initializes the UI elements and signal connections.
void showClear(bool show_clear)
Sets whether the clear button is visible.
void showMatrix(bool show_matrix)
Sets whether the calibration matrix is displayed.
static ApplicationOption< bool > default_show_clear
Default application setting for showing the clear button.
void requestCloseSignal()
Emitted when the dialog requests to be closed.
void createFileChooser()
Creates the file chooser dialog if it does not yet exist.
void cancel()
Cancels the current calibration process.
void toPDF()
Exports the calibration results to a PDF document.
bool isFinished() const
Returns whether the calibration process has finished.
bool m_show_popup
Whether to show a popup on calibration completion.
static ApplicationOption< bool > default_show_matrix
Default application setting for showing the calibration matrix.
Button * m_clear_button
Button to clear the current calibration data.
QTimer * m_countdown_timer
Timer used for calibration countdown display.
void setSensor(OrientationSensor *sensor)
Sets the orientation sensor to calibrate.
MagnetometerCalibrationDialog(const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
Constructs a MagnetometerCalibrationDialog for a specific design object.
Time m_start_time
The time when calibration recording started.
DesignObjectLookup * manager()
Returns the design object lookup used by this dialog.
Forward declaration for design object lookup service.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Represents a timestamp with utilities for manipulation and conversion.
The primary namespace for the NDEVR SDK.