NDEVR
API Documentation
ModelCommandsWidget

A widget for interfacing with ModelEditController to allow the user to edit or modify objects in the 3D environment. More...

Inheritance diagram for ModelCommandsWidget:
[legend]
Collaboration diagram for ModelCommandsWidget:
[legend]

Public Member Functions

 ModelCommandsWidget (QTModelManager *manager, QWidget *parent=nullptr)
 Constructs the model commands widget for editing 3D objects.
virtual ~ModelCommandsWidget ()
 Destroys the model commands widget and releases resources.
void controlModeSet (ModelEditController::ModelEditMode mode)
 Emitted when the model editing mode changes.
void removeControl (bool keep_existing)
 Removes the active editing control.
void requestVisibleSignal (bool visible)
 Emitted to request visibility changes for this widget.
void setControl (ModelEditController::ModelEditMode mode)
 Activates the specified model editing mode.
void setControl (UUID mode)
 Activates a custom model editing function by UUID.
void setControlEnabled (bool is_enabled)
 Enables or disables the model editing controls.
void setupCommandModeRibbon (RibbonGroup *group)
 Sets up ribbon buttons for model edit command modes (move, rotate, scale, etc.).
void updateCheckedButtons ()
 Updates the checked state of all mode buttons to reflect the current mode.

Protected Member Functions

void init ()
 Initializes internal state, UI elements, and signal connections.
void onSelectedSlot (Buffer< UUID > ids, bool is_selected)
 Slot called when objects are selected or deselected in the scene.
void refreshButtonEnabled ()
 Refreshes the enabled state of all buttons based on the current selection.
void refreshMaskWidgets ()
 Refreshes the mask widgets based on the current selection state.
void refreshUI (bool force)
 Refreshes the UI to reflect the current editing state.
void setupForOffsetCommand ()
 Sets up the UI for the model offset command.
void setupForVertexOffsetCommand ()
 Sets up the UI for the vertex offset command.
void updateSelectionMode (bool force)
 Updates the sub-selection mode UI (vertex, edge, face, etc.).

Detailed Description

A widget for interfacing with ModelEditController to allow the user to edit or modify objects in the 3D environment.


Definition at line 75 of file ModelCommandsWidget.h.

Constructor & Destructor Documentation

◆ ModelCommandsWidget()

ModelCommandsWidget::ModelCommandsWidget ( QTModelManager * manager,
QWidget * parent = nullptr )

Constructs the model commands widget for editing 3D objects.

Parameters
[in]managerThe model manager providing scene data.
[in]parentThe optional parent widget.

Member Function Documentation

◆ controlModeSet()

void ModelCommandsWidget::controlModeSet ( ModelEditController::ModelEditMode mode)

Emitted when the model editing mode changes.

Parameters
[in]modeThe newly set edit mode.

◆ onSelectedSlot()

void ModelCommandsWidget::onSelectedSlot ( Buffer< UUID > ids,
bool is_selected )
protected

Slot called when objects are selected or deselected in the scene.

Parameters
[in]idsThe UUIDs of the affected objects.
[in]is_selectedWhether the objects were selected or deselected.

◆ refreshUI()

void ModelCommandsWidget::refreshUI ( bool force)
protected

Refreshes the UI to reflect the current editing state.

Parameters
[in]forceWhether to force a full refresh.

◆ removeControl()

void ModelCommandsWidget::removeControl ( bool keep_existing)

Removes the active editing control.

Parameters
[in]keep_existingWhether to preserve the existing mouse controller.

◆ requestVisibleSignal()

void ModelCommandsWidget::requestVisibleSignal ( bool visible)

Emitted to request visibility changes for this widget.

Parameters
[in]visibleWhether the widget should be visible.

◆ setControl() [1/2]

void ModelCommandsWidget::setControl ( ModelEditController::ModelEditMode mode)

Activates the specified model editing mode.

Parameters
[in]modeThe edit mode to set.

◆ setControl() [2/2]

void ModelCommandsWidget::setControl ( UUID mode)

Activates a custom model editing function by UUID.

Parameters
[in]modeThe UUID of the custom edit function.

◆ setControlEnabled()

void ModelCommandsWidget::setControlEnabled ( bool is_enabled)

Enables or disables the model editing controls.

Parameters
[in]is_enabledWhether the controls should be enabled.

◆ setupCommandModeRibbon()

void ModelCommandsWidget::setupCommandModeRibbon ( RibbonGroup * group)

Sets up ribbon buttons for model edit command modes (move, rotate, scale, etc.).

Parameters
[in]groupThe ribbon group to populate.

◆ updateSelectionMode()

void ModelCommandsWidget::updateSelectionMode ( bool force)
protected

Updates the sub-selection mode UI (vertex, edge, face, etc.).

Parameters
[in]forceWhether to force an update even if mode has not changed.

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