NDEVR
API Documentation
AlignmentWidget.h
1#pragma once
2#include "DLLInfo.h"
3#if NDEVR_CALIBRATION
4#include <NDEVR/BaseValues.h>
5#include <QWidget>
6namespace NDEVR
7{
9 class AlignGyroButton;
10 class PropertiesButton;
11 class QTModelManager;
14 class Button;
15 struct PopupInfo;
20 class HARDWARE_WIDGETS_API AlignmentWidget : public QWidget
21 {
22 Q_OBJECT
23 public:
29 AlignmentWidget(QTModelManager* manager, QWidget* parent = nullptr);
34 AlignmentWidget(QWidget* parent = nullptr);
39 void setModelManager(QTModelManager* manager);
44 void setSensor(OrientationSensor* sensor);
49 void showCalibrationOptionsPopup(PopupInfo info);
54 void showMagnetometerOptionsPopup(PopupInfo info);
59 void showBubbleLevelPopup(PopupInfo info);
64 AlignGyroButton* calibrationButton() const;
69 Button* magnetometerButton() const;
74 Button* bubbleLevelButton() const;
79 static void SetMagneticCalibrationCallback(const std::function<void(PopupInfo info, OrientationSensor* sensor)>& function);
80 signals:
81 void updatedSignal();
82 protected slots:
84 void updatedSlot();
85 protected:
87 void init();
88 protected:
89 static std::function<void(PopupInfo info, OrientationSensor* sensor)> s_magnetic_calibration_function;
90 protected:
91 AlignGyroButton* m_calibrate_button;
92 Button* m_bubble_level_button;
93 Button* m_magnetometer_button;
94 MagnetometerWidget* m_magnetometer_widget = nullptr;
95 BubbleLevelWidget* m_bubble_widget = nullptr;
96 PropertiesButton* m_properties_button;
97 OrientationSensor* m_sensor;
98 QTModelManager* m_manager;
99 uint01 m_last_state;
100 bool m_is_calibrating;
101 };
102}
103#endif
A widget that displays a 2D bubble level visualization based on tilt angles from an OrientationSensor...
A core widget that allows the user to click one of many button types.
Definition Button.h:68
Widget for displaying the live state of a magnetometer object.
Forward declaration for design object lookup service.
A button that opens the properties dialog for a given design object when clicked.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
The primary namespace for the NDEVR SDK.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16