API Documentation
Loading...
Searching...
No Matches
OrientationOperationsWidget.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: StationSetupEditor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/Editor.h>
34#include <NDEVR/OrientationOperations.h>
35namespace Ui
36{
37 class OrientationOperationsUI;
38}
39namespace NDEVR
40{
41 class Button;
42 class DesignObjectLookup;
43 class QCustomLineEdit;
45 {
46 Q_OBJECT
47 public:
49 {
50 public:
51 virtual QWidget* createGNSSWidget(UUID gps_name, QCustomLineEdit* orientation_edit, uint01 axis) = 0;
52 };
53 OrientationOperationsWidget(uint01 dimension, const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr);
54 OrientationOperationsWidget(uint01 dimension, DesignObjectLookup* lookup, QWidget* parent = nullptr);
56 void init();
57 void updateValues() override;
58 QSize sizeHint() const override;
59 void updateVisibleWidgets();
60 void setIsGeoReference(bool is_geo_reference);
61 void setDialToModelIcon();
62 void setIsMagneticReference(bool is_magnetic_reference, DesignObjectLookup* lookup);
63 static void SetGNSSCallback(GNSSCallback* callback);
64 static void SetGridMagnetCallback(const std::function<void(Button*)>& function);
65 DesignObjectLookup* lookup();
66 OrientationOperations operations() const;
67 void updateDialImages();
68 void setAngle(const Angle<fltp08>& angle);
69 bool fullscreenTouch() const final override { return true; };
70 virtual bool event(QEvent* event) override;
71 public slots:
72 void onCopyFromExistingSlot();
73 void onSpecifiedAngleUpdatedSlot();
74 void onCalculatedUpdatedSlot();
75 void updateOrientationFromDialogSlot();
76 void updateOrientationCalcOptionsSlot();
77 signals:
79 protected:
80 void updateReletiveCombos();
81 bool isPrismModel() const;
82 void updateComputedPosition();
83 void updateTitles(OrientationOperations::AzimuthType type);
84 void updateOrientation(const Matrix<fltp08>& matrix);
85 protected:
86 Ui::OrientationOperationsUI* ui;
88 bool m_is_geo_reference = false;
89 bool m_is_magnet_reference = false;
90 bool m_has_offset = false;
91 bool m_use_model_icon = false;
92 QWidget* m_orientation_gnss_widget = nullptr;
93 DesignObjectLookup* m_lookup = nullptr;
94 public:
96 static std::function<void(Button*)> s_magnetic_callback;
97 //QTimer* m_prism_timer;
98 };
99}
#define NDEVR_API
Definition DLLInfo.h:67
Stores an angle in an optimized format.
Definition StringStream.h:352
Definition Button.h:60
Definition DesignObjectLookup.h:61
Definition Pointer.hpp:303
Definition Editor.h:45
Definition Matrix.hpp:173
Definition OrientationOperations.h:8
AzimuthType
Definition OrientationOperations.h:11
Definition OrientationOperationsWidget.h:49
virtual QWidget * createGNSSWidget(UUID gps_name, QCustomLineEdit *orientation_edit, uint01 axis)=0
Definition OrientationOperationsWidget.h:45
static GNSSCallback * s_gnss_reading_callback
Definition OrientationOperationsWidget.h:95
const uint01 m_dimension
Definition OrientationOperationsWidget.h:87
Ui::OrientationOperationsUI * ui
Definition OrientationOperationsWidget.h:86
static std::function< void(Button *)> s_magnetic_callback
Definition OrientationOperationsWidget.h:96
void updateMagneticReferenceSignal(const Angle< fltp08 > &angle)
bool fullscreenTouch() const final override
Definition OrientationOperationsWidget.h:69
Definition QCustomLineEdit.h:118
Definition UUID.h:66
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:98
Definition FontEditor.h:6