API Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
DeploymentWidgets.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/OrientationSensor.h>
4#include <NDEVR/QCustomCombobox.h>
5#include <NDEVR/ResizeVisibleAnimation.h>
6namespace NDEVR
7{
8 class OrientationSensor;
9 class WindowManager;
10 class QTModelManager;
11 class AlignmentWidget;
12 class Button;
13 class CustomUnit;
14 /**--------------------------------------------------------------------------------------------------
15 \brief A CustomUnit that is used to define the length of a Deployment.
16 **/
18 {
19 public:
21 static constexpr const char* DeploymentLengthUnitName() { return "DeploymentLengthUnit"; }
22 };
23 /**--------------------------------------------------------------------------------------------------
24 \brief Provides a list of options for the user to select how to perform a particular Deployment.
25 **/
27 {
28 Q_OBJECT
29 public:
30 explicit DeploymentModeCombobox(QWidget* parent = nullptr);
33 signals:
35 protected slots:
38 protected:
39 void fixedHeadingChosen(bool has_calculated_yaw);
40 void roddedModeChosen(bool has_calculated_yaw);
41 void gyroModeChosen(bool use_compass, bool is_free_hanging = false);
42 protected:
50 bool m_is_showing_calibrate = false;
53 };
54 /**--------------------------------------------------------------------------------------------------
55 \brief Provides a list of quick options for the desired Segment length for a Deployment.
56 **/
58 {
59 Q_OBJECT
60 public:
61 static TranslatedString DistanceValueString(fltp08 value, bool show_only_native);
62 public:
63 DeploymentLengthCombobox(QWidget* parent = nullptr);
64 void setLengths(const Buffer<fltp08>& lengths);
66 void setCustomDeploymentSettings(const String& settings);
67 signals:
69 protected:
71 protected:
73 };
74 /**--------------------------------------------------------------------------------------------------
75 \brief A widget used for allowing the user to quickly setup an OrientationSensor for a Deployment.
76 **/
78 {
79 Q_OBJECT
80 public:
81 explicit DeploymentWidget(QWidget* parent = nullptr);
84 void setupGyroButton(Button* button);
86 void setIgnoreSounds(bool ignore_sounds);
87 void setDeploymentWidgetEnabled(bool enabled);
89 void setAllowModeSwitch(bool allow);
90#if NDEVR_CALIBRATION
91 Button* calibrationButton();
92 void setAllowEditCalibration(bool allow);
93 void setAllowVerifyCalibration(bool allow);
94 void setAllowNewCalibration(bool allow);
95 void showCalibrationOptionsPopup(PopupInfo info);
96#endif
97 signals:
99 protected slots:
102 protected:
106 AlignmentWidget* m_calibration_widget;
108 bool m_is_enabled = true;
109 };
110
111}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:56
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A core widget that allows the user to click one of many button types.
Definition Button.h:66
Provides a list of quick options for the desired Segment length for a Deployment.
Definition DeploymentWidgets.h:58
const String & customDeploymentSettings() const
DeploymentLengthCombobox(QWidget *parent=nullptr)
static TranslatedString DistanceValueString(fltp08 value, bool show_only_native)
void setLengths(const Buffer< fltp08 > &lengths)
void setCustomDeploymentSettings(const String &settings)
String m_custom_deployment_settings
Definition DeploymentWidgets.h:72
Provides a list of options for the user to select how to perform a particular Deployment.
Definition DeploymentWidgets.h:27
uint04 m_rodded_mode_index
Definition DeploymentWidgets.h:44
DeploymentModeCombobox(QWidget *parent=nullptr)
void roddedModeChosen(bool has_calculated_yaw)
OrientationSensor * m_sensor
Definition DeploymentWidgets.h:52
uint04 m_free_hanging_index
Definition DeploymentWidgets.h:47
void setSensor(OrientationSensor *sensor)
void fixedHeadingChosen(bool has_calculated_yaw)
uint04 m_gyro_mode_index
Definition DeploymentWidgets.h:48
uint04 m_compass_and_gyro_mode_index
Definition DeploymentWidgets.h:46
GyroState m_last_gyro_state
Definition DeploymentWidgets.h:51
uint04 m_compass_mode_index
Definition DeploymentWidgets.h:45
uint04 m_fixed_mode_index
Definition DeploymentWidgets.h:43
void gyroModeChosen(bool use_compass, bool is_free_hanging=false)
uint04 m_mode_count
Definition DeploymentWidgets.h:49
A CustomUnit that is used to define the length of a Deployment.
Definition DeploymentWidgets.h:18
static constexpr const char * DeploymentLengthUnitName()
Definition DeploymentWidgets.h:21
static DynamicPointer< CustomUnit > DeploymentLengthUnit()
A widget used for allowing the user to quickly setup an OrientationSensor for a Deployment.
Definition DeploymentWidgets.h:78
void setAllowModeSwitch(bool allow)
void requestMagnetometerCalibrationSignal()
void setModelManager(QTModelManager *manager)
Buffer< QPointer< Button > > m_magnetometer_buttons
Definition DeploymentWidgets.h:104
void setDeploymentWidgetEnabled(bool enabled)
void setIgnoreSounds(bool ignore_sounds)
void showMagnetometerOptionsPopup(PopupInfo info)
OrientationSensor * m_sensor
Definition DeploymentWidgets.h:105
void setupGyroButton(Button *button)
Buffer< QPointer< Button > > m_gyro_buttons
Definition DeploymentWidgets.h:103
void setSensor(OrientationSensor *sensor)
DeploymentModeCombobox * m_mode_combo
Definition DeploymentWidgets.h:107
DeploymentWidget(QWidget *parent=nullptr)
AlignmentWidget * m_calibration_widget
Definition DeploymentWidgets.h:106
void setupMagnetometerButton(Button *button)
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
Used to report the orientation of a Hardware object within 3D space.
Definition OrientationSensor.h:86
A compact way to present a list of options to the user.
Definition QCustomCombobox.h:53
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Definition QTModelManager.h:105
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
GyroState
Used by OrientationSensor to display the current state of any available gyro.
Definition OrientationSensor.h:43
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Class which is used to pass arguments and requests for creating a popup dialog or widget....
Definition PopupInfo.h:15