API Documentation
Loading...
Searching...
No Matches
BoundsWidget.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/Bounds.h>
35#include <NDEVR/Unit.h>
36#include <NDEVR/Matrix.h>
37#include <QPointer>
38#include <QWidget>
39class QGridLayout;
40namespace NDEVR
41{
42 template<class t_type>
43 class ConstPointer;
44 struct Unit;
45 class PointWidget;
46 class NDEVR_WIDGETS_API BoundsWidget : public QWidget
47 {
48 Q_OBJECT
49 public:
50 BoundsWidget(QWidget* parent = nullptr);
51 void setDimensionCount(uint01 dim_count);
52 void setUnitToApplicationSpatialUnit();
53 void setUnitToApplicationOrientationUnit();
54 void setUnitToApplicationAngleUnit();
55 void setEditable(bool editable);
56 void setBounds(const Bounds<3, fltp08>& bounds);
57 void setMinPoint(const Vertex<3, fltp08>& point);
58 void setMaxPoint(const Vertex<3, fltp08>& point);
59 void setStep(fltp08 step);
60 void setUseLabelAbreviation(bool use_label_abv);
61 void setDefaultBounds(const Bounds<3, fltp08>& bounds);
62 void setUnit(const ConstPointer<Unit>& unit);
63 const ConstPointer<Unit>& unit() const;
64 void setTransform(const Matrix<fltp08>& mat);
65 void setLabel(uint01 dimension, const TranslatedString& label);
66 void setSurveySettings(QWidget* survey_settings);
67 void setDecimalCount(uint04 count);
68 Bounds<3, fltp08> calculateBounds() const;
69 Bounds<3, fltp08> getBounds() const;
70 Bounds<3, fltp08> placeholderBounds() const;
71 void setNumberOfLines(uint04 line_count);
72 bool isDefault() const;
73 signals:
74 void edited2();
77 protected slots:
78 void onUpdatedSlot();
79 void onFinishedSlot();
80 protected:
81 void refreshLayout();
82 void _setUnit(const ConstPointer<Unit>& unit);
83 protected:
86 QGridLayout* m_layout;
87 };
88}
89
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
Definition BoundsWidget.h:47
void _setUnit(const ConstPointer< Unit > &unit)
QGridLayout * m_layout
Definition BoundsWidget.h:86
PointWidget * m_min
Definition BoundsWidget.h:84
PointWidget * m_max
Definition BoundsWidget.h:85
void surveySettingsRequested()
Definition GraphicsPipeline.h:42
Definition Matrix.hpp:173
Definition PointWidget.h:60
Definition TranslatedString.h:9
A vertex.
Definition Vertex.hpp:54
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
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