NDEVR
API Documentation
ScaleCommandWidget

A widget that is shown when the user scales a 3D model. More...

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

Public Member Functions

 ScaleCommandWidget (QTModelManager *manager)
 Constructs a scale command widget for the given model manager.
virtual SubSelectionMode defaultSelectionMode () const override
 Retrieves the default sub-selection mode for scaling.
virtual QWidget * editWidget () override
 Retrieves the edit widget for displaying scale controls.
virtual TranslatedString expandedHint () const override
 Retrieves an expanded hint with more detail about the scale command.
virtual TranslatedString group () const override
 Retrieves the command group name for UI categorization.
virtual TranslatedString hint () const override
 Retrieves a short hint describing the scale command.
virtual bool isSelecting () const override
 Checks whether the widget is currently in a selection state.
virtual void onCancel () override
 Cancels the current scale operation.
virtual void onSelect (const Buffer< UUID > &selection) override
 Handles selection of objects for the scale operation.
virtual bool processKeyEvent (const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override
 Processes a keyboard event during the scale operation.
virtual void refreshState (ModelEditController &controller) override
 Refreshes the widget state from the model edit controller.
virtual bool selectionModeAllowed (const SubSelectionMode &mode) const override
 Checks whether a given sub-selection mode is allowed during scaling.
virtual void setupFilters (SelectionController *controller) override
 Sets up selection filters for the scale operation.
Public Member Functions inherited from QtModelFunction
virtual bool shouldShowInterface () const override
 Returns whether the function should show a UI interface.
Public Member Functions inherited from ModelFunction
virtual bool canAutoFinishNow () const
 Checks whether the function can automatically finish in its current state.
virtual bool processMouseEvent (MouseControllerEvent &)
 Processes a mouse controller event during this function's operation.
virtual void requestCancel ()
 Requests cancellation of the current function through the controller.
virtual void requestFinish ()
 Requests that the function finishes its operation through the controller.
virtual void requestFinishSelection ()
 Requests that the selection phase of this function be completed.

Protected Attributes

QTModelManagerm_manager
 The model manager providing objects to scale.
Protected Attributes inherited from ModelFunction
ModelEditController * m_controller = nullptr
 Pointer to the owning ModelEditController.

Additional Inherited Members

Public Attributes inherited from ModelFunction
String icon
 The icon identifier used for toolbar/menu display.
UUID id
 Unique identifier for this model function.
TranslatedString name
 The display name of the function shown in UI.
Protected Member Functions inherited from ModelFunction
virtual void setController (ModelEditController *controller)
 Sets the owning controller for this function.

Detailed Description

A widget that is shown when the user scales a 3D model.


Definition at line 9 of file ScaleCommandWidget.h.

Constructor & Destructor Documentation

◆ ScaleCommandWidget()

ScaleCommandWidget::ScaleCommandWidget ( QTModelManager * manager)

Constructs a scale command widget for the given model manager.

Parameters
[in]managerThe model manager providing the objects to scale.

References ScaleCommandWidget().

Referenced by ScaleCommandWidget().

Member Function Documentation

◆ defaultSelectionMode()

virtual SubSelectionMode ScaleCommandWidget::defaultSelectionMode ( ) const
overridevirtual

Retrieves the default sub-selection mode for scaling.

Returns
The default SubSelectionMode.

Implements ModelFunction.

◆ editWidget()

virtual QWidget * ScaleCommandWidget::editWidget ( )
overridevirtual

Retrieves the edit widget for displaying scale controls.

Returns
A pointer to this widget.

Implements QtModelFunction.

◆ expandedHint()

virtual TranslatedString ScaleCommandWidget::expandedHint ( ) const
overridevirtual

Retrieves an expanded hint with more detail about the scale command.

Returns
The translated expanded hint string.

Reimplemented from ModelFunction.

◆ group()

virtual TranslatedString ScaleCommandWidget::group ( ) const
overridevirtual

Retrieves the command group name for UI categorization.

Returns
The translated group name.

Reimplemented from ModelFunction.

◆ hint()

virtual TranslatedString ScaleCommandWidget::hint ( ) const
overridevirtual

Retrieves a short hint describing the scale command.

Returns
The translated hint string.

Reimplemented from ModelFunction.

◆ isSelecting()

virtual bool ScaleCommandWidget::isSelecting ( ) const
overridevirtual

Checks whether the widget is currently in a selection state.

Returns
True if currently selecting.

Implements ModelFunction.

◆ onSelect()

virtual void ScaleCommandWidget::onSelect ( const Buffer< UUID > & selection)
overridevirtual

Handles selection of objects for the scale operation.

Parameters
[in]selectionThe UUIDs of the selected objects.

Reimplemented from ModelFunction.

◆ processKeyEvent()

virtual bool ScaleCommandWidget::processKeyEvent ( const KeyEvent & event,
DesignObjectLookup * lookup,
Camera * camera )
overridevirtual

Processes a keyboard event during the scale operation.

Parameters
[in]eventThe key event to process.
[in]lookupThe design object lookup.
[in]cameraThe active camera.
Returns
True if the event was handled.

Reimplemented from ModelFunction.

◆ refreshState()

virtual void ScaleCommandWidget::refreshState ( ModelEditController & controller)
overridevirtual

Refreshes the widget state from the model edit controller.

Parameters
[in]controllerThe model edit controller providing current state.

Implements ModelFunction.

◆ selectionModeAllowed()

virtual bool ScaleCommandWidget::selectionModeAllowed ( const SubSelectionMode & mode) const
overridevirtual

Checks whether a given sub-selection mode is allowed during scaling.

Parameters
[in]modeThe sub-selection mode to check.
Returns
True if the mode is allowed.

Implements ModelFunction.

◆ setupFilters()

virtual void ScaleCommandWidget::setupFilters ( SelectionController * controller)
overridevirtual

Sets up selection filters for the scale operation.

Parameters
[in]controllerThe selection controller to configure.

Reimplemented from ModelFunction.


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