![]() |
NDEVR
API Documentation
|
A widget that can be displayed for setting the location of a camera. More...
Public Member Functions | |
| CameraLocationWidget (QTModelManager *manager) | |
| Constructs a CameraLocationWidget without an initial camera. | |
| CameraLocationWidget (QTModelManager *manager, DynamicPointer< Camera > camera) | |
| Constructs a CameraLocationWidget bound to the given camera. | |
| void | addTarget (const DynamicPointer< QTDesignObject > &object) override |
| Adds a design object target to this widget. | |
| DynamicPointer< Camera > | camera () const |
| Returns the currently bound camera. | |
| virtual void | onTargetUpdated (UUID) override |
| Called when a target design object is updated. | |
| void | onZoom (SnapLocation location) |
| Snaps the camera to the specified location. | |
| void | removeTarget (const DynamicPointer< QTDesignObject > &object) override |
| Removes a design object target from this widget. | |
| void | requestSettingsSignal () |
| Emitted to request that camera settings be shown. | |
| void | setCamera (const DynamicPointer< Camera > &camera) |
| Sets the camera whose location is controlled by this widget. | |
| void | setupAutoCamera () |
| Configures auto-camera behavior for automatic view adjustment. | |
| void | setupMenu () |
| Creates and populates the menu with snap location options. | |
| void | valueChanged () |
| Called when the selected camera location value changes. | |
| QWidget * | widget () const |
| Returns the underlying QWidget for this camera location widget. | |
| Public Member Functions inherited from QTResourceListener | |
| QTResourceListener (const std::function< void()> &callback, QObject *parent) | |
| Constructs a resource listener that invokes the given callback on the UI thread. | |
| void | onChanged () override final |
| Invokes the stored callback on the main UI thread. | |
| Public Member Functions inherited from QTAbstractResourceListener | |
| QTAbstractResourceListener (QObject *parent=nullptr) | |
| Constructs a resource listener tied to a Qt parent object for automatic lifetime management. | |
| Public Member Functions inherited from ResourceListener | |
| ResourceListener () | |
| Constructs a default ResourceListener. | |
| virtual | ~ResourceListener () |
| Virtual destructor. | |
| virtual void | addInfoParent (const ResourceBase *info) |
| Registers a ResourceBase as a parent that this listener is observing. | |
| void | changeValue () |
| Triggers the value changed callback for this listener. | |
| void | disable (bool disable) |
| Enables or disables this listener. | |
| void | disconnectListener () |
| Disconnects this listener from all parent resources it is subscribed to. | |
| uint04 | getInfoParentSize () const |
| Returns the number of parent resources this listener is subscribed to. | |
| virtual void | removeInfoParent (const ResourceBase *info) |
| Removes a ResourceBase from the list of parents this listener is observing. | |
| Public Member Functions inherited from DesignObjectWidgetInterface | |
| virtual Bounds< 3, fltp08 > | bounds () const |
| Returns the combined 3D bounding box of all target design objects. | |
| void | clearTargets () |
| Removes all target design objects from this widget. | |
| QTModelManager * | manager () const |
| Returns the current model manager. | |
| Buffer< Model > | models () const |
| Returns all target objects as Models. | |
| virtual void | removeTarget (const UUID &object) |
| Removes a specific target by UUID. | |
| void | setManager (QTModelManager *manager) |
| Sets the model manager used for UUID-based lookups. | |
| void | setTarget (const DynamicPointer< QTDesignObject > &object) |
| Sets a single target design object, replacing any existing targets. | |
| void | setTargetID (const UUID &object) |
| Sets a single target by UUID, replacing any existing targets. | |
| void | setTargetIDs (const Buffer< UUID > &objects) |
| Sets multiple targets by UUID, replacing any existing targets. | |
| void | setTargets (const Buffer< DynamicPointer< QTDesignObject > > &objects) |
| Sets multiple target design objects, replacing any existing targets. | |
| Buffer< UUID > | targetIDs () const |
| Returns the UUIDs of all current target design objects. | |
Protected Member Functions | |
| void | setup () |
| Initializes the widget layout and connects signals. | |
| Protected Member Functions inherited from QTAbstractResourceListener | |
| bool | hasBeenPosted () |
| Returns whether a change notification has been posted but not yet executed. | |
| bool | isSafeToDelete () |
| Returns whether it is safe to delete this listener (i.e., not in the middle of a callback). | |
| Protected Member Functions inherited from DesignObjectWidgetInterface | |
| const Dictionary< UUID, DynamicPointer< QTDesignObject > > & | targets () const |
| Returns a const reference to the dictionary of all targets. | |
Protected Attributes | |
| DynamicPointer< Camera > | m_active_camera |
| The camera controlled by this widget. | |
| TimeSpan | m_animation_time |
| Duration of the camera snap animation. | |
| Button * | m_back = nullptr |
| Button to snap camera to back view. | |
| Button * | m_bottom = nullptr |
| Button to snap camera to bottom view. | |
| Button * | m_front = nullptr |
| Button to snap camera to front view. | |
| bool | m_has_pending |
| Whether a pending update is queued. | |
| Button * | m_left = nullptr |
| Button to snap camera to left view. | |
| QTModelManager * | m_manager = nullptr |
| The model manager providing data context. | |
| QRadioButton * | m_orthographic = nullptr |
| Radio button for orthographic projection. | |
| QRadioButton * | m_perspective = nullptr |
| Radio button for perspective projection. | |
| Button * | m_right = nullptr |
| Button to snap camera to right view. | |
| QAction * | m_settings = nullptr |
| Action to open camera settings. | |
| Button * | m_top = nullptr |
| Button to snap camera to top view. | |
| QWidget * | m_widget |
| The container widget for this camera location UI. | |
| Protected Attributes inherited from DesignObjectWidgetInterface | |
| DesignObjectInterface * | m_interface |
| The internal QObject-based implementation handling signals and target storage. | |
A widget that can be displayed for setting the location of a camera.
See SnapLocation
Definition at line 53 of file CameraLocationWidget.h.
| CameraLocationWidget::CameraLocationWidget | ( | QTModelManager * | manager | ) |
Constructs a CameraLocationWidget without an initial camera.
| [in] | manager | The model manager providing data context. |
References DesignObjectWidgetInterface::manager().
| CameraLocationWidget::CameraLocationWidget | ( | QTModelManager * | manager, |
| DynamicPointer< Camera > | camera ) |
Constructs a CameraLocationWidget bound to the given camera.
| [in] | manager | The model manager providing data context. |
| [in] | camera | The camera whose location is controlled. |
References camera(), and DesignObjectWidgetInterface::manager().
|
overridevirtual |
Adds a design object target to this widget.
| [in] | object | The design object to add. |
Reimplemented from DesignObjectWidgetInterface.
| DynamicPointer< Camera > CameraLocationWidget::camera | ( | ) | const |
Returns the currently bound camera.
Referenced by CameraLocationWidget(), and setCamera().
|
overridevirtual |
Called when a target design object is updated.
| [in] | id | The UUID of the updated target (unused parameter name). |
Reimplemented from DesignObjectWidgetInterface.
| void CameraLocationWidget::onZoom | ( | SnapLocation | location | ) |
Snaps the camera to the specified location.
| [in] | location | The snap location to move the camera to. |
|
overridevirtual |
Removes a design object target from this widget.
| [in] | object | The design object to remove. |
Reimplemented from DesignObjectWidgetInterface.
| void CameraLocationWidget::setCamera | ( | const DynamicPointer< Camera > & | camera | ) |
| QWidget * CameraLocationWidget::widget | ( | ) | const |
Returns the underlying QWidget for this camera location widget.