A widget for interfacing with GeometryMaker to allow the user to draw 3D objects or shapes.
More...
|
|
Resource< Model * > | root_model |
| | The root model under which new geometry is created.
|
A widget for interfacing with GeometryMaker to allow the user to draw 3D objects or shapes.
Definition at line 55 of file DrawCommandsWidget.h.
◆ DrawCommandsWidget()
| DrawCommandsWidget::DrawCommandsWidget |
( |
QTModelManager * | manager, |
|
|
QWidget * | parent = nullptr ) |
◆ addCustomDrawWidget()
Registers a custom editor widget for a specific drawing mode.
- Parameters
-
| [in] | create_mode | The geometry creation mode. |
| [in] | widget | The custom editor widget. |
◆ controlModeSet()
Emitted when the geometry creation mode changes.
- Parameters
-
| [in] | mode | The new geometry creation mode. |
References mode().
◆ customEditor()
| Editor * DrawCommandsWidget::customEditor |
( |
| ) |
|
|
protected |
Returns the custom editor for the current drawing mode, if any.
- Returns
- A pointer to the custom Editor, or nullptr.
◆ hideEvent()
| void DrawCommandsWidget::hideEvent |
( |
QHideEvent * | event | ) |
|
|
override |
Handles the hide event by cleaning up active drawing state.
- Parameters
-
◆ mode()
◆ onDeletedSlot()
| void DrawCommandsWidget::onDeletedSlot |
( |
UUID | id | ) |
|
|
protected |
Slot called when a drawn object is deleted.
- Parameters
-
| [in] | id | The UUID of the deleted object. |
◆ onSelectedSlot()
| void DrawCommandsWidget::onSelectedSlot |
( |
Buffer< UUID > | ids, |
|
|
bool | is_selected ) |
|
protected |
Slot called when objects are selected or deselected in the viewport.
- Parameters
-
| [in] | ids | The UUIDs of the affected objects. |
| [in] | is_selected | Whether the objects are now selected. |
◆ refreshUI()
| void DrawCommandsWidget::refreshUI |
( |
bool | force | ) |
|
|
protected |
Refreshes the UI to reflect the current drawing state.
- Parameters
-
| [in] | force | Whether to force a full refresh even if state appears unchanged. |
◆ removeControl()
| void DrawCommandsWidget::removeControl |
( |
bool | keep_existing | ) |
|
Removes the active drawing control, optionally preserving existing geometry.
- Parameters
-
| [in] | keep_existing | Whether to keep the geometry created so far. |
◆ removeCustomDrawWidget()
Removes a custom editor widget for a specific drawing mode.
- Parameters
-
| [in] | create_mode | The geometry creation mode. |
◆ requestVisibleSignal()
| bool DrawCommandsWidget::requestVisibleSignal |
( |
bool | visible | ) |
|
Emitted to request that this widget be shown or hidden.
- Parameters
-
| [in] | visible | Whether the widget should be visible. |
- Returns
- True if the request was accepted.
◆ setControl()
Activates the specified geometry creation mode.
- Parameters
-
| [in] | mode | The geometry creation mode to set. |
References mode().
◆ setControlEnabled()
| void DrawCommandsWidget::setControlEnabled |
( |
bool | enabled | ) |
|
Enables or disables the drawing controls.
- Parameters
-
| [in] | enabled | Whether drawing is enabled. |
◆ setStep()
Slot called to advance to a specific drawing step.
- Parameters
-
| [in] | step | The step index. |
| [in] | mode | The geometry spec mode for the step. |
References mode().
◆ setupRibbon()
| void DrawCommandsWidget::setupRibbon |
( |
RibbonGroup * | group, |
|
|
bool | add_2D, |
|
|
bool | add_3D ) |
Populates a ribbon group with draw mode buttons for 2D and/or 3D shapes.
- Parameters
-
| [in] | group | The ribbon group to populate. |
| [in] | add_2D | Whether to include 2D drawing modes. |
| [in] | add_3D | Whether to include 3D drawing modes. |
◆ setupRibbon2D()
Sets up 2D drawing mode buttons in the ribbon.
- Parameters
-
| [in] | index | The starting button index. |
| [in] | group | The ribbon group to populate. |
◆ setupRibbon3D()
Sets up 3D drawing mode buttons in the ribbon.
- Parameters
-
| [in] | index | The starting button index. |
| [in] | group | The ribbon group to populate. |
◆ setupRibbonStep()
| void DrawCommandsWidget::setupRibbonStep |
( |
RibbonGroup * | group | ) |
|
Populates a ribbon group with step-by-step drawing controls.
- Parameters
-
| [in] | group | The ribbon group to populate. |
◆ setupRibbonSteps()
| void DrawCommandsWidget::setupRibbonSteps |
( |
RibbonGroup * | group | ) |
|
|
protected |
Sets up ribbon step buttons within the given group.
- Parameters
-
| [in] | group | The ribbon group to populate. |
◆ showLocalRibbon()
| void DrawCommandsWidget::showLocalRibbon |
( |
bool | show_ribbon | ) |
|
Shows or hides the local ribbon containing draw mode buttons.
- Parameters
-
| [in] | show_ribbon | Whether to show the ribbon. |
◆ specIcon()
Returns the icon name for the given geometry spec mode.
- Parameters
-
| [in] | spec | The geometry specification mode. |
- Returns
- The icon name string.
◆ specText()
Returns the display text for the given geometry spec mode.
- Parameters
-
| [in] | spec | The geometry specification mode. |
- Returns
- The translated display text.
The documentation for this class was generated from the following file: