API Documentation
Loading...
Searching...
No Matches
MagnetometerCalibrationDialog.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/QTModelManager.h>
4#include <NDEVR/Editor.h>
5#include <NDEVR/ApplicationOptions.h>
6#include <QWidget>
7namespace Ui
8{
9 class MagnetometerCalibrationUI;
10}
11namespace NDEVR
12{
13 class OrientationSensor;
14 class QTModelManager;
15 class Button;
16 class FileChooserDialog;
17 class MagneticCalibrationData;
18
19 /**--------------------------------------------------------------------------------------------------
20 Class: MagneticDeclinationDialog
21
22 \brief Dialog which allows user to edit or create a MagneticCalibrationData object
23 \ingroup Hardware Magnetometer Widget Dialog
24 *-----------------------------------------------------------------------------------------------**/
26 {
27 Q_OBJECT
28 public:
29 MagnetometerCalibrationDialog(const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr);
30 MagnetometerCalibrationDialog(QWidget* parent = nullptr);
31 void init();
32 void setModelManager(DesignObjectLookup* manager);
33 void setSensor(OrientationSensor* sensor);
34 #if NDEVR_VIEWPORT
35 void toPDF();
36 #endif
37 bool event(QEvent* event) override;
38 bool isFinished() const;
39 DesignObjectLookup* manager();
40 void cancel();
41 void startRecording();
42 void showMatrix(bool show_matrix);
43 void showClear(bool show_clear);
44 MagneticCalibrationData calibrationData() const;
45 void updateValues() override;
46 signals:
48 protected:
49 FileChooserDialog* fileChooser(bool is_save);
50 void createFileChooser();
51 public:
54 protected:
55 Ui::MagnetometerCalibrationUI* ui = nullptr;
56 OrientationSensor* m_sensor = nullptr;
57 DesignObjectLookup* m_manager = nullptr;
58 FileChooserDialog* m_file_chooser = nullptr;
59 QTimer* m_countdown_timer = nullptr;
60 Button* m_clear_button = nullptr;
61 Time m_start_time = Constant<Time>::NaN;
62 bool m_show_popup = true;
63 bool m_is_finished = false;
64 bool m_is_activated = false;
65 bool m_is_saving = false;
66 bool m_show_matrix = true;
67 };
68}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:74
The default object to store data of any type that should persist through sessions of the application.
Definition Button.h:57
Definition Button.h:60
Definition DesignObjectLookup.h:61
Definition Pointer.hpp:303
Definition Editor.h:45
Definition FileChooserDialog.h:68
Stores magnetic calibration data as a Model including the transformation and calibration points.
Definition MagneticCalibration.h:16
Dialog which allows user to edit or create a MagneticCalibrationData object.
Definition MagnetometerCalibrationDialog.h:26
static ApplicationOption< bool > default_show_matrix
Definition MagnetometerCalibrationDialog.h:52
static ApplicationOption< bool > default_show_clear
Definition MagnetometerCalibrationDialog.h:53
Used to report the orientation of a Hardware object within 3D space.
Definition OrientationSensor.h:88
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Definition ACIColor.h:37
Definition FontEditor.h:6
Definition BaseValues.hpp:272