NDEVR
API Documentation
QTVertexManagerViewfinal

A Qt compatible AbstractTableModel for showing properties around a series of Geometry Vertex objects. More...

Collaboration diagram for QTVertexManagerView:
[legend]

Public Member Functions

 QTVertexManagerView (const DynamicPointer< QTDesignObject > &root, QObject *parent=nullptr)
 Constructs a vertex manager view targeting a specific design object.
 QTVertexManagerView (QObject *parent=nullptr)
 Constructs an empty vertex manager view.
void autoPopulateColumns ()
 Automatically populates column parameters based on the target geometry.
void contentsChanged ()
 Emitted when vertex data changes.
void displayLineworkEditor (uint04 vertex_index, PopupInfo info)
 Displays a linework editor dialog for a specific vertex.
bool isEditable () const
 Checks whether the table is currently editable.
bool isSpecialCallbackIndex (const QModelIndex &index) const
 Checks whether the given index corresponds to a special callback column.
Model model () const
 Retrieves the model associated with the current target.
void onClicked (const QModelIndex &index, QRect rect)
 Handles a click on a table cell, potentially opening an editor.
void onHovered (const QModelIndex &index, QRect rect)
 Handles a hover event on a table cell.
void setEditable (bool editable)
 Enables or disables editing of vertex values.
void setParameters (const Buffer< DesignParameter > &params, bool enable_edit, bool enable_primitive_edit)
 Sets the design parameters displayed as columns in the table.
void setParametersToGlobalLinework ()
 Configures the view to show global linework parameters.
void setParametersToGlobalLocations ()
 Configures the view to show global location parameters.
void setParametersToLocalLocations ()
 Configures the view to show local location parameters.
void setTarget (const DynamicPointer< QTDesignObject > &root)
 Sets the target design object whose vertices are displayed.
void setUseGlobalTransform (bool toggle)
 Sets whether to use global transforms when displaying vertex positions.
DynamicPointer< QTDesignObjecttarget () const
 Retrieves the current target design object.

Protected Member Functions

void cacheValues ()
 Rebuilds the cached vertex values from the target geometry.
void deletedSlot ()
 Handles deletion of the target design object.
void updateSlot ()
 Handles updates to the target design object.

Protected Attributes

bool m_has_primitive_edit_column = false
 Whether a primitive edit button column is shown.
bool m_has_vertex_edit_column = false
 Whether a vertex edit button column is shown.
bool m_is_editable = false
 Whether the table allows editing.
bool m_is_global = false
 Whether to use global transforms.
bool m_is_linework = false
 Whether the geometry is linework type.
uint04 m_num_of_decimal
 Number of decimal places for display.
Buffer< DesignParameterAccumulatorm_properties
 The design parameters used as table columns.
DynamicPointer< QTDesignObjectm_root
 The target design object.
UUID m_vertex_highlight_id = Constant<UUID>::Invalid
 UUID of the highlighted vertex decoration.

Detailed Description

A Qt compatible AbstractTableModel for showing properties around a series of Geometry Vertex objects.


Definition at line 68 of file QTVertexManagerView.h.

Constructor & Destructor Documentation

◆ QTVertexManagerView() [1/2]

QTVertexManagerView::QTVertexManagerView ( QObject * parent = nullptr)

Constructs an empty vertex manager view.

Parameters
[in]parentThe parent QObject.

Referenced by QTVertexManagerView().

◆ QTVertexManagerView() [2/2]

QTVertexManagerView::QTVertexManagerView ( const DynamicPointer< QTDesignObject > & root,
QObject * parent = nullptr )

Constructs a vertex manager view targeting a specific design object.

Parameters
[in]rootThe design object whose vertices to display.
[in]parentThe parent QObject.

References QTVertexManagerView().

Member Function Documentation

◆ displayLineworkEditor()

void QTVertexManagerView::displayLineworkEditor ( uint04 vertex_index,
PopupInfo info )

Displays a linework editor dialog for a specific vertex.

Parameters
[in]vertex_indexThe index of the vertex to edit.
[in]infoThe popup positioning information.

◆ isEditable()

bool QTVertexManagerView::isEditable ( ) const
inline

Checks whether the table is currently editable.

Returns
True if editing is enabled.

Definition at line 160 of file QTVertexManagerView.h.

References m_is_editable.

◆ isSpecialCallbackIndex()

bool QTVertexManagerView::isSpecialCallbackIndex ( const QModelIndex & index) const

Checks whether the given index corresponds to a special callback column.

Parameters
[in]indexThe model index to check.
Returns
True if the index is a special callback column.

◆ model()

Model QTVertexManagerView::model ( ) const

Retrieves the model associated with the current target.

Returns
The Model object.

◆ onClicked()

void QTVertexManagerView::onClicked ( const QModelIndex & index,
QRect rect )

Handles a click on a table cell, potentially opening an editor.

Parameters
[in]indexThe clicked model index.
[in]rectThe bounding rectangle of the cell.

◆ onHovered()

void QTVertexManagerView::onHovered ( const QModelIndex & index,
QRect rect )

Handles a hover event on a table cell.

Parameters
[in]indexThe hovered model index.
[in]rectThe bounding rectangle of the cell.

◆ setEditable()

void QTVertexManagerView::setEditable ( bool editable)

Enables or disables editing of vertex values.

Parameters
[in]editableWhether editing is allowed.

◆ setParameters()

void QTVertexManagerView::setParameters ( const Buffer< DesignParameter > & params,
bool enable_edit,
bool enable_primitive_edit )

Sets the design parameters displayed as columns in the table.

Parameters
[in]paramsThe parameters to display.
[in]enable_editWhether vertex editing is enabled.
[in]enable_primitive_editWhether primitive editing is enabled.

◆ setTarget()

void QTVertexManagerView::setTarget ( const DynamicPointer< QTDesignObject > & root)

Sets the target design object whose vertices are displayed.

Parameters
[in]rootThe design object to target.

◆ setUseGlobalTransform()

void QTVertexManagerView::setUseGlobalTransform ( bool toggle)
inline

Sets whether to use global transforms when displaying vertex positions.

Parameters
[in]toggleTrue to use global transforms, false for local.

Definition at line 106 of file QTVertexManagerView.h.

References m_is_global.

◆ target()

DynamicPointer< QTDesignObject > QTVertexManagerView::target ( ) const

Retrieves the current target design object.

Returns
A dynamic pointer to the target QTDesignObject.

The documentation for this class was generated from the following file: