API Documentation
Loading...
Searching...
No Matches
AlignmentWidget.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#if NDEVR_CALIBRATION
4#include <NDEVR/BaseValues.h>
5#include <QWidget>
6namespace NDEVR
7{
8 class OrientationSensor;
9 class AlignGyroButton;
10 class PropertiesButton;
11 class QTModelManager;
12 class MagnetometerWidget;
13 class Button;
14 struct PopupInfo;
15 /**--------------------------------------------------------------------------------------------------
16 \brief A widget that allows the user to align, check, or define the orientation for a OrientationSensor.
17 **/
18 class HARDWARE_WIDGETS_API AlignmentWidget : public QWidget
19 {
20 Q_OBJECT
21 public:
22 AlignmentWidget(QTModelManager* manager, QWidget* parent = nullptr);
23 AlignmentWidget(QWidget* parent = nullptr);
24 void setModelManager(QTModelManager* manager);
25 void setSensor(OrientationSensor* sensor);
26 void showCalibrationOptionsPopup(PopupInfo info);
27 void showMagnetometerOptionsPopup(PopupInfo info);
28 AlignGyroButton* calibrationButton() const;
29 Button* magnetometerButton() const;
30 static void SetMagneticCalibrationCallback(const std::function<void(PopupInfo info, OrientationSensor* sensor)>& function);
31 signals:
32 void updatedSignal();
33 protected slots:
34 void updatedSlot();
35 protected:
36 void init();
37 protected:
38 static std::function<void(PopupInfo info, OrientationSensor* sensor)> s_magnetic_calibration_function;
39 protected:
40 AlignGyroButton* m_calibrate_button;
41 MagnetometerWidget* m_magnetometer_widget = nullptr;
42 Button* m_magnetometer_button;
43 PropertiesButton* m_properties_button;
44 OrientationSensor* m_sensor;
45 QTModelManager* m_manager;
46 uint01 m_last_state;
47 bool m_is_calibrating;
48 };
49}
50#endif
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:56
Definition ACIColor.h:37
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80