API Documentation
Loading...
Searching...
No Matches
PointWidget.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: PointWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/QTTools.h>
35#include <NDEVR/Vertex.h>
36#include <NDEVR/Unit.h>
37#include <NDEVR/Pointer.h>
38#include <NDEVR/Matrix.h>
39#include <QPointer>
40namespace Ui
41{
42 class PointWidgetUI;
43}
44class QGridLayout;
45namespace NDEVR
46{
47 class QCustomLabel;
48 class QCustomLineEdit;
49 class DimensionWidgets;
50 class GNSSCallback;
52 {
53 public:
54 virtual void preTransform(Vertex<3, fltp08>& point) = 0;
55 virtual void postTransform(Vertex<3, fltp08>& point) = 0;
56 virtual bool isValid() const = 0;
57 };
58
59 class NDEVR_WIDGETS_API PointWidget : public QWidget
60 {
61 Q_OBJECT
62 public:
63
65 {
66 public:
67 virtual QWidget* createGNSSWidget(UUID gps_name, PointWidget* point_widget) = 0;
68 };
69 PointWidget(QWidget* parent = nullptr);
70 void setDimensionCount(uint01 dim_count);
71 void setUnitToApplicationSpatialUnit();
72 void setUnitToApplicationOrientationUnit();
73 void setUnitToApplicationAngleUnit();
74 void setUnitToApplicationDistanceUnit();
75 void setEditable(bool editable);
76 void setMinPoint(const Vertex<3, fltp08>& point);
77 void setMaxPoint(const Vertex<3, fltp08>& point);
78 void setStep(fltp08 step);
79 void setUseLabelAbreviation(bool use_label_abv);
80 void setFontMultiplier(fltp04 size_mult);
81 void setPoint(Vertex<2, fltp08> point);
82 void setPoint(Vertex<3, fltp08> point);
83 void setPoint(Vertex<4, fltp08> point);
84 void setDefaultPoint(const Vertex<3, fltp08>& point);
85 void setUnit(const ConstPointer<Unit>& unit);
86 const ConstPointer<Unit>& unit() const;
87 void setTransform(const Matrix<fltp08>& mat);
88 void setLabel(uint01 dimension, const TranslatedString& label);
89 void setSurveySettings(QWidget* survey_settings);
90 void setDecimalCount(uint04 count);
91 Vertex<3, fltp08> calculatePoint() const;
92 Vertex<3, fltp08> getPoint() const;
93 Vertex<3, fltp08> placeholderPoint() const;
94 void setNumberOfLines(uint04 line_count);
95 bool isDefault() const;
96 void setPreTransform(PreTransform* transform);
97 QPointer<QWidget> surveySettings() const { return m_survey_settings; }
98 signals:
99 void edited2();
102 protected slots:
103 void onUpdatedSlot();
104 void onFinishedSlot();
105 protected:
106 void refreshLayout();
107 void _setUnit(const ConstPointer<Unit>& unit);
108 protected:
119 QGridLayout* m_layout;
120 PreTransform* m_pre_transform = nullptr;
121 QPointer<QWidget> m_survey_settings = nullptr;
123 };
124}
125
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
Definition GraphicsPipeline.h:42
Definition Matrix.hpp:173
Definition PointWidget.h:65
virtual QWidget * createGNSSWidget(UUID gps_name, PointWidget *point_widget)=0
Definition PointWidget.h:60
bool m_use_label_abv
Definition PointWidget.h:122
Matrix< fltp08 > m_matrix
Definition PointWidget.h:110
Vertex< 3, fltp08 > m_default_point
Definition PointWidget.h:114
Vector< 4, TranslatedString > m_custom_labels
Definition PointWidget.h:115
fltp08 m_w_point
Definition PointWidget.h:113
QGridLayout * m_layout
Definition PointWidget.h:119
Vertex< 3, fltp08 > m_point
Definition PointWidget.h:112
QTResourceListener * m_default_units_listener
Definition PointWidget.h:109
Vector< 4, DimensionWidgets * > m_dimension_widgets
Definition PointWidget.h:116
uint01 m_dimension_count
Definition PointWidget.h:117
uint04 m_layout_line_count
Definition PointWidget.h:118
QPointer< QWidget > surveySettings() const
Definition PointWidget.h:97
ConstPointer< Unit > m_unit
Definition PointWidget.h:111
void surveySettingsRequested()
Definition PointWidget.h:52
virtual void preTransform(Vertex< 3, fltp08 > &point)=0
virtual void postTransform(Vertex< 3, fltp08 > &point)=0
virtual bool isValid() const =0
Definition QTTools.h:183
Definition TranslatedString.h:9
Definition UUID.h:66
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
A vertex.
Definition Vertex.hpp:54
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition FontEditor.h:6