33#include <NDEVR/QTDesignObject.h>
35#include <NDEVR/DesignObjectWidgetInterface.h>
36#include <NDEVR/QTTools.h>
37#include <NDEVR/Camera.h>
38#include <NDEVR/Pointer.h>
39#include <NDEVR/TimeSpan.h>
41#include <QActionGroup>
void setup(bool include_combo)
Initializes the combo with menu actions and signal connections.
QAction * m_front
Action to snap camera to front view.
bool m_include_combo
Whether combo-style dropdown behavior is enabled.
QActionGroup * m_view_mode_group
Group for perspective/orthographic toggle.
bool m_has_pending
Whether a pending update is queued.
void addTarget(const DynamicPointer< QTDesignObject > &object) override
Adds a design object target to this widget.
bool m_is_relative_combo
Whether this combo uses relative snap locations.
Button * m_combo
The button hosting the snap location menu.
virtual void onTargetUpdated(UUID) override
Called when a target design object is updated.
void requestSettingsSignal()
Emitted to request that the camera settings dialog be shown.
TimeSpan m_animation_time
Duration of the camera snap animation.
void removeTarget(const DynamicPointer< QTDesignObject > &object) override
Removes a design object target from this widget.
void valueChanged()
Called when the selected snap location value changes.
void setCamera(const DynamicPointer< Camera > &camera)
Sets the camera whose snap location is controlled by this combo.
CameraLocationCombo(QTModelManager *manager, Button *combo, bool include_combo)
Constructs a CameraLocationCombo without an initial camera.
QTModelManager * m_manager
The model manager providing data context.
void setupMenu()
Creates and populates the snap location menu with available view options.
void setManager(QTModelManager *manager)
Sets the model manager for this combo.
QAction * m_top
Action to snap camera to top view.
DynamicPointer< Camera > m_camera
The camera controlled by this combo.
QAction * m_orthographic
Action to switch to orthographic projection.
CameraLocationCombo(QTModelManager *manager, DynamicPointer< Camera > camera, Button *combo, bool include_combo)
Constructs a CameraLocationCombo with a specific camera.
QAction * m_settings
Action to open camera settings.
QAction * m_perspective
Action to switch to perspective projection.
QActionGroup * m_view_location_group
Group for snap location actions.
QAction * m_left
Action to snap camera to left view.
QMenu * m_menu
The popup menu containing snap location options.
QAction * m_bottom
Action to snap camera to bottom view.
QAction * m_back
Action to snap camera to back view.
void onZoom(SnapLocation location)
Snaps the camera to the specified location.
QAction * m_right
Action to snap camera to right view.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
QTResourceListener(const std::function< void()> &callback, QObject *parent)
Constructs a resource listener that invokes the given callback on the UI thread.
Stores a time span, or difference between two times, with an optional start time.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
SnapLocation
A list of directions that a view can be pointed relative to an object or scene.