NDEVR
API Documentation
AlignGyroButton.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Button.h>
4#include <NDEVR/OrientationSensor.h>
5namespace NDEVR
6{
8 class WindowManager;
9 struct PopupInfo;
14 class HARDWARE_WIDGETS_API AlignGyroButton : public Button
15 {
16 Q_OBJECT
17 public:
22 explicit AlignGyroButton(QWidget* parent = nullptr);
27 void setSensor(OrientationSensor* sensor);
32 void setIgnoreSounds(bool ignore_sounds);
37 void setShowWide(bool show_wide);
42 void showCalibrationOptionsPopup(PopupInfo info);
47 void setAllowNewAlignment(bool allow);
52 void setAllowVerifyAlignment(bool allow);
57 void setAllowEditAlignment(bool allow);
58 signals:
59 void updatedSignal();
60 void editCalibrationSignal();
61 void requestedCalibrationSignal();
62 protected slots:
64 void updatedSlot();
66 void sensorDestroyedSlot();
67 protected:
72 void calibrateGyro(PopupInfo info);
77 void verifyGyro(PopupInfo info);
78 protected:
79 Time m_last_time = Time(0);
80 GyroState m_last_gyro_state;
81 OrientationSensor* m_sensor;
82 QTimer* m_stale_value_timer = nullptr;
83 bool m_show_wide;
84 bool m_ignore_sounds;
85 bool m_allow_new_alignment = true;
86 bool m_allow_verify_alignment = true;
87 bool m_allow_edit_alignment = true;
88 };
89}
A core widget that allows the user to click one of many button types.
Definition Button.h:68
Forward declaration for design object lookup service.
Manages all windows and logic surrounding dialogs and views for displaying and managing any environme...
The primary namespace for the NDEVR SDK.
GyroState
Used by OrientationSensor to display the current state of any available gyro.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16