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 /**--------------------------------------------------------------------------------------------------
47 \brief Allows the user to enter in a minimum and maximum value in N dimensions (up to 3).
48 **/
49 class NDEVR_WIDGETS_API BoundsWidget : public QWidget
50 {
51 Q_OBJECT
52 public:
53 BoundsWidget(QWidget* parent = nullptr);
54 void setDimensionCount(uint01 dim_count);
58 void setEditable(bool editable);
59 void setBounds(const Bounds<3, fltp08>& bounds);
60 void setMinPoint(const Vertex<3, fltp08>& point);
61 void setMaxPoint(const Vertex<3, fltp08>& point);
62 void setStep(fltp08 step);
63 void setUseLabelAbreviation(bool use_label_abv);
65 void setUnit(const ConstPointer<Unit>& unit);
66 const ConstPointer<Unit>& unit() const;
67 void setTransform(const Matrix<fltp08>& mat);
68 void setLabel(uint01 dimension, const TranslatedString& label);
69 void setSurveySettings(QWidget* survey_settings);
74 void setNumberOfLines(uint04 line_count);
75 bool isDefault() const;
76 signals:
77 void edited2();
80 protected slots:
83 private:
84 void refreshLayout();
85 void _setUnit(const ConstPointer<Unit>& unit);
86 protected:
89 QGridLayout* m_layout;
90 };
91}
92
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:59
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
Allows the user to enter in a minimum and maximum value in N dimensions (up to 3).
Definition BoundsWidget.h:50
void setNumberOfLines(uint04 line_count)
void setStep(fltp08 step)
void setMaxPoint(const Vertex< 3, fltp08 > &point)
void setDefaultBounds(const Bounds< 3, fltp08 > &bounds)
const ConstPointer< Unit > & unit() const
bool isDefault() const
void setMinPoint(const Vertex< 3, fltp08 > &point)
void setEditable(bool editable)
void setUnitToApplicationSpatialUnit()
void setUnitToApplicationAngleUnit()
QGridLayout * m_layout
Definition BoundsWidget.h:89
void setUseLabelAbreviation(bool use_label_abv)
Bounds< 3, fltp08 > getBounds() const
void setUnit(const ConstPointer< Unit > &unit)
PointWidget * m_min
Definition BoundsWidget.h:87
void setTransform(const Matrix< fltp08 > &mat)
void setDecimalCount(uint04 count)
PointWidget * m_max
Definition BoundsWidget.h:88
void setBounds(const Bounds< 3, fltp08 > &bounds)
void setUnitToApplicationOrientationUnit()
Bounds< 3, fltp08 > calculateBounds() const
void setDimensionCount(uint01 dim_count)
Bounds< 3, fltp08 > placeholderBounds() const
void setLabel(uint01 dimension, const TranslatedString &label)
void setSurveySettings(QWidget *survey_settings)
void surveySettingsRequested()
BoundsWidget(QWidget *parent=nullptr)
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition GraphicsPipeline.h:42
Definition Matrix.hpp:176
Allows the user to input an N-dimensional point (up to 4 dimensions) with an optinal unit....
Definition PointWidget.h:57
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
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
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149