NDEVR
API Documentation
CameraPane

The default container for multiple Viewports in the NDEVR environment. More...

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

Public Member Functions

 CameraPane (QTWindowManager *window_manager, QTModelManager *manager, QWidget *parent=nullptr)
 Constructs a CameraPane that manages multiple viewport views.
void activeCameraChangedSignal ()
 Emitted when the active camera selection changes.
CustomDockButtonaddCameraButton ()
 Returns the button used to add new cameras.
bool addView (QPointer< DockWidget< CameraView > > view) override
 Adds a camera view to the pane.
void addWidget (const QPointer< QWidget > &widget)
 Adds an extra widget to the camera pane layout.
ViewportLayoutTheme cameraTheme () const
 Returns the current viewport layout theme.
void cameraThemeChanged (ViewportLayoutTheme theme)
 Emitted when the camera layout theme changes.
void createListeners (UUID id)
 Creates resource listeners for the camera with the given UUID.
void layoutViews (ViewportLayout camera_theme, DesignObjectLookup *manager, Buffer< QPointer< DockWidget< CameraView > > > &removed_views) override
 Rearranges all camera views according to the specified layout.
void makeCurrentConfigDefault ()
 Saves the current camera layout as the default configuration.
void onViewsSwapped (DockWidget< CameraView > *camera_a, DockWidget< CameraView > *camera_b) override
 Called when two camera views are swapped in the layout.
bool removeCamera (const DynamicPointer< Camera > &camera)
 Removes the specified camera from the pane.
bool removeCamera (const UUID &camera)
 Removes the camera with the given UUID from the pane.
bool removeView (QPointer< DockWidget< CameraView > > view) override
 Removes a camera view from the pane.
void removeWidget (const QPointer< QWidget > &widget)
 Removes an extra widget from the camera pane layout.
void setRibbonArea (RibbonArea ribbon_area)
 Sets the ribbon area where the camera toolbar is displayed.
void setSelectedCamera (UUID camera)
 Sets the currently selected camera by UUID.
void setTouchTheme (bool touch_theme)
 Enables or disables the touch-optimized theme for camera controls.
bool sharedToolbar () const
 Returns whether camera views share a single toolbar.
QSize sizeHint () const override
 Returns the recommended size for this widget.
void updateCamerasClosable () const
 Updates whether each camera view can be closed by the user.
Public Member Functions inherited from ViewportManager
virtual UUID activeViewport () const
 Returns the UUID of the currently active viewport.
virtual DockWidget< CameraView > * createView (DynamicPointer< Camera > &camera, DesignObjectLookup *manager)
 Creates a new viewport dock widget for the given camera.
virtual bool hasViewport (const UUID &id) const
 Checks whether a viewport with the given ID is managed.
virtual uint04 layoutIndex (const UUID &id) const
 Returns the layout index of the viewport with the given ID.
virtual CameraView * mainViewport ()
 Returns the main (primary) camera view.
virtual QCustomDockWidgetmainViewportDock ()
 Returns the dock widget containing the main viewport.
virtual void onGlobalLayoutUpdated (Buffer< QPointer< DockWidget< CameraView > > > &)
 Called when the global viewport layout has been updated.
virtual DockWidget< CameraView > * removeViewport (const UUID &id)
 Removes the viewport with the given ID from management.
virtual DockWidget< CameraView > * viewport (const UUID &id) const
 Returns the viewport dock widget with the given ID.
virtual Buffer< QPointer< DockWidget< CameraView > > > views () const
 Returns all managed viewport dock widgets.

Protected Member Functions

void onCameraDelete (UUID camera)
 Slot invoked when a camera is deleted.
void onClearAllSlot ()
 Slot invoked to clear all camera views from the pane.

Protected Attributes

CustomDockButtonm_add_camera_button = nullptr
 Button for adding new cameras.
ContainerWidgetm_camera_area
 The container managing the camera dock layout.
bool m_cameras_moveable
 Whether camera views can be rearranged by the user.
Dictionary< UUID, QTResourceListener * > m_click_listeners
 Listeners for camera click events.
Buffer< QPointer< QWidget > > m_extra_widgets
 Additional widgets embedded in the pane.
Dictionary< UUID, QTResourceListener * > m_hover_listeners
 Listeners for camera hover events.
QTModelManagerm_model_manager
 The model manager providing data context.
RibbonArea m_ribbon_area = RibbonArea::e_left
 The ribbon area position for the toolbar.
Toolbarm_toolbar
 The shared camera toolbar.
bool m_touch_theme
 Whether the touch-optimized theme is active.
QTWindowManagerm_window_manager
 The window manager for dialog and layout services.
Protected Attributes inherited from ViewportManager
UUID m_active_viewport = Constant<UUID>::Invalid
 The UUID of the currently active viewport.
ViewportLayout m_current_layout
 The current viewport layout arrangement.
bool m_is_dirty = false
 Whether the layout needs to be refreshed.
Dictionary< UUID, QPointer< DockWidget< CameraView > > > m_view_docks
 Map of viewport UUIDs to their dock widgets.

Detailed Description

The default container for multiple Viewports in the NDEVR environment.


Definition at line 55 of file CameraPane.h.

Constructor & Destructor Documentation

◆ CameraPane()

CameraPane::CameraPane ( QTWindowManager * window_manager,
QTModelManager * manager,
QWidget * parent = nullptr )

Constructs a CameraPane that manages multiple viewport views.

Parameters
[in]window_managerThe window manager for dialog and layout services.
[in]managerThe model manager providing data context.
[in]parentThe optional parent widget.

Member Function Documentation

◆ addCameraButton()

CustomDockButton * CameraPane::addCameraButton ( )

Returns the button used to add new cameras.

Returns
The add-camera dock button.

◆ addView()

bool CameraPane::addView ( QPointer< DockWidget< CameraView > > view)
overridevirtual

Adds a camera view to the pane.

Parameters
[in]viewThe dock widget containing the camera view to add.
Returns
True if the view was successfully added.

Implements ViewportManager.

◆ addWidget()

void CameraPane::addWidget ( const QPointer< QWidget > & widget)

Adds an extra widget to the camera pane layout.

Parameters
[in]widgetThe widget to add.

◆ cameraTheme()

ViewportLayoutTheme CameraPane::cameraTheme ( ) const
inline

Returns the current viewport layout theme.

Returns
The active ViewportLayoutTheme.

Definition at line 75 of file CameraPane.h.

References ViewportManager::m_current_layout.

◆ cameraThemeChanged()

void CameraPane::cameraThemeChanged ( ViewportLayoutTheme theme)

Emitted when the camera layout theme changes.

Parameters
[in]themeThe new viewport layout theme.

◆ createListeners()

void CameraPane::createListeners ( UUID id)

Creates resource listeners for the camera with the given UUID.

Parameters
[in]idThe UUID of the camera to listen to.

◆ layoutViews()

void CameraPane::layoutViews ( ViewportLayout camera_theme,
DesignObjectLookup * manager,
Buffer< QPointer< DockWidget< CameraView > > > & removed_views )
overridevirtual

Rearranges all camera views according to the specified layout.

Parameters
[in]camera_themeThe viewport layout configuration to apply.
[in]managerThe design object lookup for resolving references.
[in]removed_viewsOutput buffer receiving views that were removed during layout.

Reimplemented from ViewportManager.

◆ onCameraDelete()

void CameraPane::onCameraDelete ( UUID camera)
protected

Slot invoked when a camera is deleted.

Parameters
[in]cameraThe UUID of the deleted camera.

◆ onViewsSwapped()

void CameraPane::onViewsSwapped ( DockWidget< CameraView > * camera_a,
DockWidget< CameraView > * camera_b )
overridevirtual

Called when two camera views are swapped in the layout.

Parameters
[in]camera_aThe first camera dock widget.
[in]camera_bThe second camera dock widget.

Reimplemented from ViewportManager.

◆ removeCamera() [1/2]

bool CameraPane::removeCamera ( const DynamicPointer< Camera > & camera)

Removes the specified camera from the pane.

Parameters
[in]cameraThe camera to remove.
Returns
True if the camera was successfully removed.

◆ removeCamera() [2/2]

bool CameraPane::removeCamera ( const UUID & camera)

Removes the camera with the given UUID from the pane.

Parameters
[in]cameraThe UUID of the camera to remove.
Returns
True if the camera was successfully removed.

◆ removeView()

bool CameraPane::removeView ( QPointer< DockWidget< CameraView > > view)
overridevirtual

Removes a camera view from the pane.

Parameters
[in]viewThe dock widget containing the camera view to remove.
Returns
True if the view was successfully removed.

Implements ViewportManager.

◆ removeWidget()

void CameraPane::removeWidget ( const QPointer< QWidget > & widget)

Removes an extra widget from the camera pane layout.

Parameters
[in]widgetThe widget to remove.

◆ setRibbonArea()

void CameraPane::setRibbonArea ( RibbonArea ribbon_area)

Sets the ribbon area where the camera toolbar is displayed.

Parameters
[in]ribbon_areaThe ribbon area position.

◆ setSelectedCamera()

void CameraPane::setSelectedCamera ( UUID camera)

Sets the currently selected camera by UUID.

Parameters
[in]cameraThe UUID of the camera to select.

◆ setTouchTheme()

void CameraPane::setTouchTheme ( bool touch_theme)

Enables or disables the touch-optimized theme for camera controls.

Parameters
[in]touch_themeWhether to use the touch-friendly layout.

◆ sharedToolbar()

bool CameraPane::sharedToolbar ( ) const

Returns whether camera views share a single toolbar.

Returns
True if a shared toolbar is active.

◆ sizeHint()

QSize CameraPane::sizeHint ( ) const
override

Returns the recommended size for this widget.

Returns
The preferred QSize.

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