![]() |
NDEVR
API Documentation
|
A Model function allows a user to interact with the program to perform a task on models. More...
Public Member Functions | |
| virtual bool | canAutoFinishNow () const |
| Checks whether the function can automatically finish in its current state. | |
| virtual SubSelectionMode | defaultSelectionMode () const =0 |
| Returns the default sub-selection mode for this function. | |
| virtual TranslatedString | expandedHint () const |
| Returns an expanded hint with more detailed description of the function. | |
| virtual TranslatedString | group () const |
| Returns the group or category this function belongs to for UI organization. | |
| virtual TranslatedString | hint () const |
| Returns a short hint or tooltip string describing the function. | |
| virtual bool | isSelecting () const =0 |
| Checks whether the function is currently in a selection state. | |
| virtual void | onCancel ()=0 |
| Called when the function's operation is cancelled. | |
| virtual void | onSelect (const Buffer< UUID > &) |
| Called when objects are selected during this function's operation. | |
| virtual bool | processKeyEvent (const KeyEvent &, DesignObjectLookup *, Camera *) |
| Processes a keyboard event during this function's operation. | |
| virtual bool | processMouseEvent (MouseControllerEvent &) |
| Processes a mouse controller event during this function's operation. | |
| virtual void | refreshState (ModelEditController &controller)=0 |
| Refreshes the internal state of this function based on the current controller state. | |
| 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. | |
| virtual bool | selectionModeAllowed (const SubSelectionMode &mode) const =0 |
| Checks whether a given sub-selection mode is valid for this function. | |
| virtual void | setupFilters (SelectionController *) |
| Sets up selection filters on the given selection controller for this function. | |
| virtual bool | shouldShowInterface () const |
| Checks whether this function should display a UI interface panel. | |
Public Attributes | |
| 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 | |
| virtual void | setController (ModelEditController *controller) |
| Sets the owning controller for this function. | |
Protected Attributes | |
| ModelEditController * | m_controller = nullptr |
| Pointer to the owning ModelEditController. | |
A Model function allows a user to interact with the program to perform a task on models.
ModelFunction is an abstract interface representing a user-driven operation that can be performed on models in the scene. Subclasses implement specific behaviors such as drawing, measuring, or editing model geometry. Each function manages its own selection state and can process mouse and key events.
Definition at line 49 of file ModelEditController.h.
|
inlinevirtual |
Checks whether the function can automatically finish in its current state.
Definition at line 110 of file ModelEditController.h.
|
pure virtual |
Returns the default sub-selection mode for this function.
Implemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
|
inlinevirtual |
Returns an expanded hint with more detailed description of the function.
Reimplemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
Definition at line 75 of file ModelEditController.h.
|
virtual |
Returns the group or category this function belongs to for UI organization.
Reimplemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
|
inlinevirtual |
Returns a short hint or tooltip string describing the function.
Reimplemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
Definition at line 69 of file ModelEditController.h.
|
pure virtual |
Checks whether the function is currently in a selection state.
Implemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
Called when objects are selected during this function's operation.
| [in] | selected_ids | The UUIDs of the selected objects. |
Reimplemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
Definition at line 128 of file ModelEditController.h.
|
inlinevirtual |
Processes a keyboard event during this function's operation.
| [in] | event | The key event to process. |
| [in] | lookup | The design object lookup for scene queries. |
| [in] | camera | The active camera. |
Reimplemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
Definition at line 98 of file ModelEditController.h.
|
inlinevirtual |
Processes a mouse controller event during this function's operation.
| [in] | event | The mouse controller event to process. |
Reimplemented in PaintCommandWidget.
Definition at line 89 of file ModelEditController.h.
|
pure virtual |
Refreshes the internal state of this function based on the current controller state.
| [in] | controller | The model edit controller managing this function. |
Implemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
|
pure virtual |
Checks whether a given sub-selection mode is valid for this function.
| [in] | mode | The sub-selection mode to check. |
Implemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
|
protectedvirtual |
Sets the owning controller for this function.
| [in] | controller | The model edit controller that owns this function. |
|
inlinevirtual |
Sets up selection filters on the given selection controller for this function.
| [in] | controller | The selection controller to configure. |
Reimplemented in FrameOfReferenceCommandWidget, GeometrySurfacingFunction, PaintCommandWidget, and ScaleCommandWidget.
Definition at line 122 of file ModelEditController.h.
|
inlinevirtual |
Checks whether this function should display a UI interface panel.
Reimplemented in QtModelFunction.
Definition at line 155 of file ModelEditController.h.