NDEVR
API Documentation
VertexTable.h
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: VertexTable
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/QTDesignObject.h>
35#include <QTableView>
36namespace NDEVR
37{
42 class NDEVR_API VertexTable : public QTableView
43 {
44 public:
49 VertexTable(QWidget* parent = nullptr);
55 VertexTable(const DynamicPointer<QTDesignObject>& root, QWidget* parent = nullptr);
66 bool event(QEvent* event) override;
85 void setParameters(const Buffer<DesignParameter>& params, bool enable_vertex_edit, bool enable_primitive_edit);
90 void setEditable(bool editable);
95 protected:
99 void init();
100 protected:
102 };
103}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
A Qt compatible AbstractTableModel for showing properties around a series of Geometry Vertex objects.
VertexTable(QWidget *parent=nullptr)
Constructs an empty vertex table.
void autoPopulateColumns()
Automatically populates the table columns based on the target geometry data.
void init()
Initializes the table view and internal model.
void setParametersToGlobalLinework()
Configures the table to display global linework data for each vertex.
void setEditable(bool editable)
Enables or disables editing of vertex data in the table.
bool event(QEvent *event) override
Handles Qt events, including retranslation events.
void setTarget(const DynamicPointer< QTDesignObject > &root)
Sets the target design object whose vertices are displayed.
void setParametersToGlobalLocations()
Configures the table to display global location coordinates for each vertex.
VertexTable(const DynamicPointer< QTDesignObject > &root, QWidget *parent=nullptr)
Constructs a vertex table targeting a specific design object.
QTVertexManagerView * m_manager
The vertex manager view model backing this table.
void updateHeaderSizes()
Updates the column header sizes to fit the current content.
void setParameters(const Buffer< DesignParameter > &params, bool enable_vertex_edit, bool enable_primitive_edit)
Sets the displayed parameters and editing permissions for the table.
The primary namespace for the NDEVR SDK.