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;
44 /**--------------------------------------------------------------------------------------------------
45 \brief A popup Editor dialog for showing options or information related to the orientation of an Object
46 layer or Calibration. Objects can be set to rotate along a given axis.
47 **/
49 {
50 Q_OBJECT
51 public:
53 {
54 public:
55 virtual QWidget* createGNSSWidget(UUID gps_name, QCustomLineEdit* orientation_edit, uint01 axis) = 0;
56 };
57 OrientationOperationsWidget(uint01 dimension, const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr);
58 OrientationOperationsWidget(uint01 dimension, DesignObjectLookup* lookup, QWidget* parent = nullptr);
60 void init();
61 void updateValues() override;
62 QSize sizeHint() const override;
64 void setIsGeoReference(bool is_geo_reference);
66 void setIsMagneticReference(bool is_magnetic_reference, DesignObjectLookup* lookup);
67 static void SetGNSSCallback(GNSSCallback* callback);
68 static void SetGridMagnetCallback(const std::function<void(Button*)>& function);
72 void setAngle(const Angle<fltp08>& angle);
73 bool fullscreenTouch() const final override { return true; };
74 virtual bool event(QEvent* event) override;
75 public slots:
81 signals:
83 protected:
85 bool isPrismModel() const;
88 void updateOrientation(const Matrix<fltp08>& matrix);
89 protected:
90 Ui::OrientationOperationsUI* ui;
92 bool m_is_geo_reference = false;
93 bool m_is_magnet_reference = false;
94 bool m_has_offset = false;
95 bool m_use_model_icon = false;
96 QWidget* m_orientation_gnss_widget = nullptr;
97 DesignObjectLookup* m_lookup = nullptr;
98 public:
100 static std::function<void(Button*)> s_magnetic_callback;
101 //QTimer* m_prism_timer;
102 };
103}
#define NDEVR_API
Definition DLLInfo.h:50
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
A core widget that allows the user to click one of many button types.
Definition Button.h:66
A core class where all Design Objects including models, materials, and geometries are stored....
Definition DesignObjectLookup.h:65
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
A base class for displaying options for editing a single DesignObject, typically a Model.
Definition Editor.h:48
Definition Matrix.hpp:176
Allows for easy manipulation of a Models orientation.
Definition OrientationOperations.h:11
AzimuthType
Definition OrientationOperations.h:14
Definition OrientationOperationsWidget.h:53
virtual QWidget * createGNSSWidget(UUID gps_name, QCustomLineEdit *orientation_edit, uint01 axis)=0
A popup Editor dialog for showing options or information related to the orientation of an Object laye...
Definition OrientationOperationsWidget.h:49
const uint01 m_dimension
Definition OrientationOperationsWidget.h:91
void setIsMagneticReference(bool is_magnetic_reference, DesignObjectLookup *lookup)
QSize sizeHint() const override
static GNSSCallback * s_gnss_reading_callback
Definition OrientationOperationsWidget.h:99
virtual bool event(QEvent *event) override
Ui::OrientationOperationsUI * ui
Definition OrientationOperationsWidget.h:90
static void SetGNSSCallback(GNSSCallback *callback)
OrientationOperations operations() const
void setIsGeoReference(bool is_geo_reference)
void updateMagneticReferenceSignal(const Angle< fltp08 > &angle)
void updateOrientation(const Matrix< fltp08 > &matrix)
static std::function< void(Button *)> s_magnetic_callback
Definition OrientationOperationsWidget.h:100
void updateTitles(OrientationOperations::AzimuthType type)
static void SetGridMagnetCallback(const std::function< void(Button *)> &function)
void setAngle(const Angle< fltp08 > &angle)
OrientationOperationsWidget(uint01 dimension, const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
OrientationOperationsWidget(uint01 dimension, DesignObjectLookup *lookup, QWidget *parent=nullptr)
DesignObjectLookup * lookup()
bool fullscreenTouch() const final override
Definition OrientationOperationsWidget.h:73
A line edit allows users to enter and edit a single line of plain text with useful editing functions,...
Definition QCustomLineEdit.h:56
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
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:80
Definition FontEditor.h:6