34#include <NDEVR/QTDesignObject.h>
35#include <NDEVR/Model.h>
36#include <NDEVR/DesignParameter.h>
37#include <NDEVR/Pointer.h>
38#include <QAbstractTableModel>
39#include <QItemDelegate>
62 bool editorEvent(QEvent* event, QAbstractItemModel* model,
const QStyleOptionViewItem& option,
const QModelIndex& index)
override;
122 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
123 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
124 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
125 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
126 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
144 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
The equivelent of std::vector but with a bit more control.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
A core class that represents a node on model hierarchy.
void setTarget(const DynamicPointer< QTDesignObject > &root)
Sets the target design object whose vertices are displayed.
void cacheValues()
Rebuilds the cached vertex values from the target geometry.
void displayLineworkEditor(uint04 vertex_index, PopupInfo info)
Displays a linework editor dialog for a specific vertex.
bool m_has_primitive_edit_column
Whether a primitive edit button column is shown.
void onClicked(const QModelIndex &index, QRect rect)
Handles a click on a table cell, potentially opening an editor.
uint04 m_num_of_decimal
Number of decimal places for display.
void setParametersToGlobalLinework()
Configures the view to show global linework parameters.
QTVertexManagerView(const DynamicPointer< QTDesignObject > &root, QObject *parent=nullptr)
Constructs a vertex manager view targeting a specific design object.
void setParametersToLocalLocations()
Configures the view to show local location parameters.
bool isEditable() const
Checks whether the table is currently editable.
void deletedSlot()
Handles deletion of the target design object.
void setParameters(const Buffer< DesignParameter > ¶ms, bool enable_edit, bool enable_primitive_edit)
Sets the design parameters displayed as columns in the table.
bool m_is_editable
Whether the table allows editing.
void contentsChanged()
Emitted when vertex data changes.
void setParametersToGlobalLocations()
Configures the view to show global location parameters.
QTVertexManagerView(QObject *parent=nullptr)
Constructs an empty vertex manager view.
bool m_is_global
Whether to use global transforms.
Buffer< DesignParameterAccumulator > m_properties
The design parameters used as table columns.
void updateSlot()
Handles updates to the target design object.
DynamicPointer< QTDesignObject > m_root
The target design object.
void setEditable(bool editable)
Enables or disables editing of vertex values.
void setUseGlobalTransform(bool toggle)
Sets whether to use global transforms when displaying vertex positions.
bool m_has_vertex_edit_column
Whether a vertex edit button column is shown.
UUID m_vertex_highlight_id
UUID of the highlighted vertex decoration.
void autoPopulateColumns()
Automatically populates column parameters based on the target geometry.
void onHovered(const QModelIndex &index, QRect rect)
Handles a hover event on a table cell.
bool isSpecialCallbackIndex(const QModelIndex &index) const
Checks whether the given index corresponds to a special callback column.
DynamicPointer< QTDesignObject > target() const
Retrieves the current target design object.
Model model() const
Retrieves the model associated with the current target.
bool m_is_linework
Whether the geometry is linework type.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
Handles editor events such as clicks on vertex table cells.
VertexTableDelegate(QObject *parent=nullptr)
Constructs a VertexTableDelegate.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...