API Documentation
Loading...
Searching...
No Matches
DesignWidget.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: DesignWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/QTModelManager.h>
34#include <QWidget>
35namespace Ui
36{
37 class DesignWidgetUI;
38}
39namespace NDEVR
40{
41 class BasicThread;
42 class CameraLocationCombo;
43 class ColorByValueWidget;
44 class QTResourceListener;
45 /**--------------------------------------------------------------------------------------------------
46 \brief A widget showing key properties of a DesignObject selection, used primarily in a SelectionWidget
47 **/
48 class DesignWidget : public QWidget
49 {
50 Q_OBJECT
51 public:
53 {
54 bool has_solid = false;
55 bool has_lines = false;
56 bool has_points = false;
57 bool has_mesh = false;
58 bool has_visible_mesh = false;
59 bool has_visible_filled = false;
60 bool has_visible_lines = false;
61 bool has_visible_points = false;
62 bool has_visible_solid = false;
63 bool has_wireframe = false;
64 bool has_two_sided = false;
66 bool has_gridlines = false;
67 bool can_fill_holes = false;
69 bool holes_filled = false;
72 };
73 public:
79 friend class DesignCalcThread;
80 DesignWidget(QTModelManager* model_manager, QWidget* parent);
81 virtual ~DesignWidget();
82 void setModelIDs(const Buffer<UUID>& model_ids);
84 void refreshFromModel(const UUID& id);
85 QSize minimumSizeHint() const override;
86 void setHorizontal(bool is_horizontal);
87 void setMode(const WidgetMode mode);
88 void clear();
90 Buffer<UUID> modelIDs() const { return m_model_ids; }
92 protected:
94 void collectProperties(PropertiesStruct& properties) const;
95 void setupMaterialSection(Model& model, uint04 duration);
96 void updateVolumeAndAreaWidget(const Vector<2, fltp08>& volume_and_area);
97#if NDEVR_SUPPORTS_THREADING
99#endif
101 protected:
107 Ui::DesignWidgetUI* ui;
108 CameraLocationCombo* m_camera_location_combo;
109#if NDEVR_SUPPORTS_THREADING
111#endif
115 };
116}
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A widget showing key properties of a DesignObject selection, used primarily in a SelectionWidget.
Definition DesignWidget.h:49
void collectProperties(PropertiesStruct &properties) const
Buffer< UUID > m_model_ids
Definition DesignWidget.h:104
QSize minimumSizeHint() const override
virtual ~DesignWidget()
void setModelIDs(const Buffer< UUID > &model_ids)
Thread * createCalcThread()
PropertiesStruct m_properties
Definition DesignWidget.h:102
bool m_is_horizontal
Definition DesignWidget.h:103
Buffer< Model > models() const
void setHorizontal(bool is_horizontal)
DesignWidget(QTModelManager *model_manager, QWidget *parent)
Vector< 2, fltp08 > m_last_volume_area
Definition DesignWidget.h:105
void setMode(const WidgetMode mode)
const PropertiesStruct & propertiesStruct() const
Definition DesignWidget.h:89
void updateVolumeAndAreaWidget(const Vector< 2, fltp08 > &volume_and_area)
CameraLocationCombo * m_camera_location_combo
Definition DesignWidget.h:108
Thread * m_volume_thread
Definition DesignWidget.h:110
friend class DesignCalcThread
Definition DesignWidget.h:79
QTResourceListener * m_units_listener
Definition DesignWidget.h:113
void refreshFromModel(const UUID &id)
Buffer< UUID > modelIDs() const
Definition DesignWidget.h:90
void setupMaterialSection(Model &model, uint04 duration)
QTModelManager * m_model_manager
Definition DesignWidget.h:106
Ui::DesignWidgetUI * ui
Definition DesignWidget.h:107
WidgetMode m_mode
Definition DesignWidget.h:112
bool m_is_volume_queued
Definition DesignWidget.h:114
void onMaterialModeButtonClicked()
WidgetMode
Definition DesignWidget.h:75
@ e_measurement
Definition DesignWidget.h:77
@ e_normal
Definition DesignWidget.h:76
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Definition QTModelManager.h:105
Definition QTTools.h:168
A thread is a single sequence stream within the software.
Definition Thread.h:67
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
Definition ACIColor.h:37
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
Definition FontEditor.h:6
Definition DesignWidget.h:53
bool has_two_sided_option
Definition DesignWidget.h:65
bool has_solid
Definition DesignWidget.h:54
bool has_visible_points
Definition DesignWidget.h:61
fltp08 thickness_weight
Definition DesignWidget.h:71
bool has_visible_mesh
Definition DesignWidget.h:58
bool has_visible_filled
Definition DesignWidget.h:59
bool has_visible_solid
Definition DesignWidget.h:62
bool has_gridlines
Definition DesignWidget.h:66
bool has_visible_lines
Definition DesignWidget.h:60
fltp08 avg_thickness
Definition DesignWidget.h:70
bool can_fill_holes
Definition DesignWidget.h:67
bool has_wireframe
Definition DesignWidget.h:63
bool has_mesh
Definition DesignWidget.h:57
bool has_lines
Definition DesignWidget.h:55
bool holes_filled
Definition DesignWidget.h:69
bool can_fill_visible_holes
Definition DesignWidget.h:68
bool has_two_sided
Definition DesignWidget.h:64
bool has_points
Definition DesignWidget.h:56