NDEVR
API Documentation
MagnetometerWidget.h
1#pragma once
2#include <QWidget>
3namespace NDEVR
4{
5 class ProgressWidget;
6 struct PopupInfo;
7 class Button;
8 class QCustomLabel;
10 class QCustomLineEdit;
11
17 class MagnetometerWidget : public QWidget
18 {
19 public:
24 MagnetometerWidget(QWidget* parent = nullptr);
30 public:
35 static void SetMagneticCalibrationCallback(const std::function<void(PopupInfo info, OrientationSensor* sensor)>& function);
36 protected:
40 void init();
41 protected slots:
43 protected:
44 static std::function<void(PopupInfo info, OrientationSensor* sensor)> s_magnetic_calibration_function;
45 protected:
51 };
52}
A core widget that allows the user to click one of many button types.
Definition Button.h:68
OrientationSensor * m_sensor
The orientation sensor providing magnetometer data.
static void SetMagneticCalibrationCallback(const std::function< void(PopupInfo info, OrientationSensor *sensor)> &function)
Sets the global callback invoked when magnetic calibration is requested.
Button * m_enable_button
Button to enable or disable the magnetometer.
QCustomLabel * m_compass_label
Label displaying the current compass heading.
QCustomLineEdit * m_grid_compass_offset
Line edit for the grid-to-compass offset angle.
static std::function< void(PopupInfo info, OrientationSensor *sensor)> s_magnetic_calibration_function
Global callback for magnetic calibration requests.
ProgressWidget * m_intensity
Progress widget showing magnetic field intensity.
void setSensor(OrientationSensor *sensor)
Sets the orientation sensor whose magnetometer data is displayed.
void onUpdatedSlot()
Slot called when the magnetometer data is updated.
MagnetometerWidget(QWidget *parent=nullptr)
Constructs a MagnetometerWidget.
void init()
Initializes the UI layout and child widgets.
Forward declaration for design object lookup service.
Displays the progress, either horizontally as a bar or as a round spin dial.
Displays translated text.
A line edit allows users to enter and edit a single line of plain text with useful editing functions,...
The primary namespace for the NDEVR SDK.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16