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 class DesignWidget : public QWidget
46 {
47 Q_OBJECT
48 public:
50 {
51 bool has_solid = false;
52 bool has_lines = false;
53 bool has_points = false;
54 bool has_mesh = false;
55 bool has_visible_mesh = false;
56 bool has_visible_filled = false;
57 bool has_visible_lines = false;
58 bool has_visible_points = false;
59 bool has_visible_solid = false;
60 bool has_wireframe = false;
61 bool has_two_sided = false;
63 bool has_gridlines = false;
64 bool can_fill_holes = false;
66 bool holes_filled = false;
69 };
70 public:
76 friend class DesignCalcThread;
77 DesignWidget(QTModelManager* model_manager, QWidget* parent);
78 virtual ~DesignWidget();
79 void setModelIDs(const Buffer<UUID>& model_ids);
80 void refreshFromModels();
81 void refreshFromModel(const UUID& id);
82 QSize minimumSizeHint() const override;
83 void setHorizontal(bool is_horizontal);
84 void setMode(const WidgetMode mode);
85 void clear();
87 Buffer<UUID> modelIDs() const { return m_model_ids; }
88 Buffer<Model> models() const;
89 protected:
91 void collectProperties(PropertiesStruct& properties) const;
92 void setupMaterialSection(Model& model, uint04 duration);
93 void updateVolumeAndAreaWidget(const Vector<2, fltp08>& volume_and_area);
94#if NDEVR_SUPPORTS_THREADING
96#endif
97 void updateProperties();
98 protected:
104 Ui::DesignWidgetUI* ui;
105 CameraLocationCombo* m_camera_location_combo;
106#if NDEVR_SUPPORTS_THREADING
108#endif
112 };
113}
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Definition DesignWidget.cpp:250
Definition DesignWidget.h:46
void collectProperties(PropertiesStruct &properties) const
Definition DesignWidget.cpp:400
Buffer< UUID > m_model_ids
Definition DesignWidget.h:101
QSize minimumSizeHint() const override
Definition DesignWidget.cpp:671
void setModelIDs(const Buffer< UUID > &model_ids)
Definition DesignWidget.cpp:392
Thread * createCalcThread()
Definition DesignWidget.cpp:309
PropertiesStruct m_properties
Definition DesignWidget.h:99
bool m_is_horizontal
Definition DesignWidget.h:100
Buffer< Model > models() const
Definition DesignWidget.cpp:153
void updateProperties()
Definition DesignWidget.cpp:565
void setHorizontal(bool is_horizontal)
Definition DesignWidget.cpp:114
DesignWidget(QTModelManager *model_manager, QWidget *parent)
Definition DesignWidget.cpp:15
Vector< 2, fltp08 > m_last_volume_area
Definition DesignWidget.h:102
void setMode(const WidgetMode mode)
Definition DesignWidget.cpp:164
const PropertiesStruct & propertiesStruct() const
Definition DesignWidget.h:86
void updateVolumeAndAreaWidget(const Vector< 2, fltp08 > &volume_and_area)
Definition DesignWidget.cpp:226
CameraLocationCombo * m_camera_location_combo
Definition DesignWidget.h:105
Thread * m_volume_thread
Definition DesignWidget.h:107
QTResourceListener * m_units_listener
Definition DesignWidget.h:110
void refreshFromModel(const UUID &id)
Definition DesignWidget.cpp:541
Buffer< UUID > modelIDs() const
Definition DesignWidget.h:87
void setupMaterialSection(Model &model, uint04 duration)
Definition DesignWidget.cpp:315
void clear()
Definition DesignWidget.cpp:186
virtual ~DesignWidget()
Definition DesignWidget.cpp:377
void refreshFromModels()
Definition DesignWidget.cpp:503
QTModelManager * m_model_manager
Definition DesignWidget.h:103
Ui::DesignWidgetUI * ui
Definition DesignWidget.h:104
WidgetMode m_mode
Definition DesignWidget.h:109
bool m_is_volume_queued
Definition DesignWidget.h:111
void onMaterialModeButtonClicked()
Definition DesignWidget.cpp:132
WidgetMode
Definition DesignWidget.h:72
@ e_measurement
Definition DesignWidget.h:74
@ e_normal
Definition DesignWidget.h:73
Definition Model.h:54
Definition QTModelManager.h:94
Definition QTTools.h:183
A thread is a single sequence stream within the software.
Definition Thread.h:66
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:62
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:115
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:176
Definition FontEditor.h:6
Definition DesignWidget.h:50
bool has_two_sided_option
Definition DesignWidget.h:62
bool has_solid
Definition DesignWidget.h:51
bool has_visible_points
Definition DesignWidget.h:58
fltp08 thickness_weight
Definition DesignWidget.h:68
bool has_visible_mesh
Definition DesignWidget.h:55
bool has_visible_filled
Definition DesignWidget.h:56
bool has_visible_solid
Definition DesignWidget.h:59
bool has_gridlines
Definition DesignWidget.h:63
bool has_visible_lines
Definition DesignWidget.h:57
fltp08 avg_thickness
Definition DesignWidget.h:67
bool can_fill_holes
Definition DesignWidget.h:64
bool has_wireframe
Definition DesignWidget.h:60
bool has_mesh
Definition DesignWidget.h:54
bool has_lines
Definition DesignWidget.h:52
bool holes_filled
Definition DesignWidget.h:66
bool can_fill_visible_holes
Definition DesignWidget.h:65
bool has_two_sided
Definition DesignWidget.h:61
bool has_points
Definition DesignWidget.h:53