NDEVR
API Documentation
CameraLocationCombo

Sets up a button to be a combobox with the various snap locations of a camera. More...

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

Public Member Functions

 CameraLocationCombo (QTModelManager *manager, Button *combo, bool include_combo)
 Constructs a CameraLocationCombo without an initial camera.
 CameraLocationCombo (QTModelManager *manager, DynamicPointer< Camera > camera, Button *combo, bool include_combo)
 Constructs a CameraLocationCombo with a specific camera.
void addTarget (const DynamicPointer< QTDesignObject > &object) override
 Adds a design object target to this widget.
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 the camera settings dialog be shown.
void setCamera (const DynamicPointer< Camera > &camera)
 Sets the camera whose snap location is controlled by this combo.
void setManager (QTModelManager *manager)
 Sets the model manager for this combo.
void setup (bool include_combo)
 Initializes the combo with menu actions and signal connections.
void setupMenu ()
 Creates and populates the snap location menu with available view options.
void valueChanged ()
 Called when the selected snap location value changes.
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, fltp08bounds () const
 Returns the combined 3D bounding box of all target design objects.
void clearTargets ()
 Removes all target design objects from this widget.
QTModelManagermanager () const
 Returns the current model manager.
Buffer< Modelmodels () 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< UUIDtargetIDs () const
 Returns the UUIDs of all current target design objects.

Protected Attributes

TimeSpan m_animation_time
 Duration of the camera snap animation.
QAction * m_back = nullptr
 Action to snap camera to back view.
QAction * m_bottom = nullptr
 Action to snap camera to bottom view.
DynamicPointer< Cameram_camera
 The camera controlled by this combo.
Buttonm_combo = nullptr
 The button hosting the snap location menu.
QAction * m_front = nullptr
 Action to snap camera to front view.
bool m_has_pending = false
 Whether a pending update is queued.
bool m_include_combo = true
 Whether combo-style dropdown behavior is enabled.
bool m_is_relative_combo = false
 Whether this combo uses relative snap locations.
QAction * m_left = nullptr
 Action to snap camera to left view.
QTModelManagerm_manager = nullptr
 The model manager providing data context.
QMenu * m_menu = nullptr
 The popup menu containing snap location options.
QAction * m_orthographic = nullptr
 Action to switch to orthographic projection.
QAction * m_perspective = nullptr
 Action to switch to perspective projection.
QAction * m_right = nullptr
 Action to snap camera to right view.
QAction * m_settings = nullptr
 Action to open camera settings.
QAction * m_top = nullptr
 Action to snap camera to top view.
QActionGroup * m_view_location_group = nullptr
 Group for snap location actions.
QActionGroup * m_view_mode_group = nullptr
 Group for perspective/orthographic toggle.
Protected Attributes inherited from DesignObjectWidgetInterface
DesignObjectInterfacem_interface
 The internal QObject-based implementation handling signals and target storage.

Additional Inherited Members

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.

Detailed Description

Sets up a button to be a combobox with the various snap locations of a camera.


See SnapLocation

Definition at line 50 of file CameraLocationCombo.h.

Constructor & Destructor Documentation

◆ CameraLocationCombo() [1/2]

CameraLocationCombo::CameraLocationCombo ( QTModelManager * manager,
Button * combo,
bool include_combo )

Constructs a CameraLocationCombo without an initial camera.

Parameters
[in]managerThe model manager providing data context.
[in]comboThe button that hosts the combo menu.
[in]include_comboWhether to include the combo-style dropdown behavior.

References DesignObjectWidgetInterface::manager().

◆ CameraLocationCombo() [2/2]

CameraLocationCombo::CameraLocationCombo ( QTModelManager * manager,
DynamicPointer< Camera > camera,
Button * combo,
bool include_combo )

Constructs a CameraLocationCombo with a specific camera.

Parameters
[in]managerThe model manager providing data context.
[in]cameraThe camera whose snap location is controlled.
[in]comboThe button that hosts the combo menu.
[in]include_comboWhether to include the combo-style dropdown behavior.

References DesignObjectWidgetInterface::manager().

Member Function Documentation

◆ addTarget()

void CameraLocationCombo::addTarget ( const DynamicPointer< QTDesignObject > & object)
overridevirtual

Adds a design object target to this widget.

Parameters
[in]objectThe design object to add.

Reimplemented from DesignObjectWidgetInterface.

◆ onTargetUpdated()

virtual void CameraLocationCombo::onTargetUpdated ( UUID )
overridevirtual

Called when a target design object is updated.

Parameters
[in]idThe UUID of the updated target (unused parameter name).

Reimplemented from DesignObjectWidgetInterface.

◆ onZoom()

void CameraLocationCombo::onZoom ( SnapLocation location)

Snaps the camera to the specified location.

Parameters
[in]locationThe snap location to move the camera to.

◆ removeTarget()

void CameraLocationCombo::removeTarget ( const DynamicPointer< QTDesignObject > & object)
overridevirtual

Removes a design object target from this widget.

Parameters
[in]objectThe design object to remove.

Reimplemented from DesignObjectWidgetInterface.

◆ setCamera()

void CameraLocationCombo::setCamera ( const DynamicPointer< Camera > & camera)

Sets the camera whose snap location is controlled by this combo.

Parameters
[in]cameraThe camera to bind.

◆ setManager()

void CameraLocationCombo::setManager ( QTModelManager * manager)

Sets the model manager for this combo.

Parameters
[in]managerThe model manager to use.

References DesignObjectWidgetInterface::manager().

◆ setup()

void CameraLocationCombo::setup ( bool include_combo)

Initializes the combo with menu actions and signal connections.

Parameters
[in]include_comboWhether to include the combo-style dropdown behavior.

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