NDEVR
API Documentation
PhysicalCameraView

A Viewport that represents a physical camera stream, or real world camera view. More...

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

Classes

struct  OutputCodec
 Describes a video output codec with an identifier and display name. More...
struct  OutputMux
 Describes a video output muxer/container format with an identifier and display name. More...
struct  ToolButtonSettings
 Configuration flags controlling which tool buttons are visible in the camera toolbar. More...

Public Types

enum  ViewMode { e_loading , e_error , e_camera }
 Describes the current display mode of the camera view. More...

Public Member Functions

StringView activeCodec () const
 Returns the currently active codec identifier.
StringView activeVideoMux () const
 Returns the currently active video muxer identifier.
QWidget * activeWidget () const
 Returns the currently active widget in the stacked display.
virtual void addWidget (const QPointer< QWidget > &button) override
 Adds an overlay widget to the camera view.
ToolButtonSettings buttonSettings () const
 Returns the current toolbar button visibility settings.
virtual ConstPointer< Cameracamera () const override
 Returns a read-only pointer to the Camera.
virtual DynamicPointer< Cameracamera () override
 Returns a mutable pointer to the Camera.
bool event (QEvent *event) override
 Processes a Qt event.
virtual QImage grabFramebuffer ()
 Captures the current frame as a QImage.
virtual UUID id () const override
 Returns the unique identifier for this camera view.
ButtoninvertImageButton () const
 Returns the invert colors button.
void leaveEvent (QEvent *leave) override
 Handles the mouse leaving the widget area.
ButtonlightButton () const
 Returns the light toggle button.
virtual QPointer< QWidget > lightingSliderWidget ()
 Returns the lighting brightness slider widget.
LogPtr log () const
 Returns the current logger.
fltp08 maxZoomOut () const
 Returns the maximum zoom-out factor for this camera.
void mediaEnd ()
 Slot called when media playback reaches the end.
void mediaError ()
 Slot called when a media playback error occurs.
void mediaOpening ()
 Slot called when media is opening/buffering.
void mediaPlayingSlot ()
 Slot called when media playback begins.
void mediaStateChanged ()
 Slot called when the media player state changes.
void mediaStopped ()
 Slot called when media playback is stopped.
void mouseReleaseEvent (QMouseEvent *releaseEvent) override
 Handles mouse release events for the camera view.
RecordingState recordingState () const override
 Returns the current recording state.
ButtonrefreshButton () const
 Returns the refresh/reconnect button.
virtual void removeWidget (const QPointer< QWidget > &button) override
 Removes an overlay widget from the camera view.
void requestLight (bool light_on)
 Emitted to request turning the camera light on or off.
void requestLightBrightness (fltp04 percent)
 Emitted to request a specific light brightness level.
virtual void resetToolRibbon () override
 Resets the tool ribbon to its default configuration.
File screenshotPath () const
 Returns the configured screenshot output path.
void setAutoRotateCamera (bool auto_rotate)
 Enables or disables automatic camera rotation based on device orientation.
void setButtonSettings (const ToolButtonSettings &settings)
 Applies new toolbar button visibility settings.
void setConnectingIcon (const StringView &image)
 Sets the icon shown while the camera is connecting.
void setConnectingMessage (const TranslatedString &message)
 Sets the message displayed while the camera is connecting.
void setErrorIcon (const StringView &image)
 Sets the icon shown when the camera is in an error state.
void setErrorState (bool is_in_error_state)
 Sets whether the camera is in an error state, updating the display accordingly.
virtual void setIconSizeMultiplier (fltp04 multiplier) override
 Sets a multiplier for toolbar icon sizes.
void setLightBrightness (fltp04 percent)
 Sets the brightness level of the camera light.
void setLog (LogPtr log)
 Sets the logger for this camera view.
void setReadyForImageCapture (bool ready)
 Sets whether the camera is ready to capture an image.
void setRecordingElapsedTime (const TimeSpan &span)
 Updates the displayed recording elapsed time.
virtual void setRecordingState (RecordingState recording_state)
 Sets the video recording state and updates the UI accordingly.
void setScreenshotFileName (const StringView &file_name)
 Sets the base file name used for screenshot files.
void setScreenshotPath (const File &file)
 Sets the file path used for saving screenshots.
void setSettingsVisible (bool visible, PopupInfo info)
 Shows or hides the settings widget.
void setSettingsWidget (QWidget *settings_widget, bool is_popup=false)
 Sets a custom settings widget for camera configuration.
virtual void setSwapMode (SwapMode mode) override
 Sets the buffer swap mode for rendering.
virtual void setTouchTheme (bool touch_theme) override
 Enables or disables the touch-optimized theme.
void setupForCaptureMode (bool capture_mode)
 Configures the view for image capture mode, adjusting UI elements.
void setVideoOutputPath (const File &file)
 Sets the file path used for saving recorded video.
virtual void showToolRibbon (bool show_ribbon) override
 Shows or hides the tool ribbon overlay.
QWidget * stack () const
 Returns the stacked widget used for switching between view modes.
virtual void startNewRecording (StringView file_name=StringView())
 Begins a new video recording session.
virtual void stopAndSaveRecording ()
 Stops the current recording and saves the video file.
void takeImage ()
 Captures a screenshot from the current camera frame.
ButtontakeImageButton () const
 Returns the screenshot capture button.
void tryToConnect ()
 Attempts to establish a connection to the camera source.
virtual void updateView () override
 Refreshes the camera view display.
File videoPath () const
 Returns the configured video output path.
void windowCapturedEvent (QEvent *event)
 Handles events forwarded from the embedded window container.

Static Public Member Functions

static void ResetSettingsToDefaults ()
 Resets all camera-related application settings to their defaults.
static Buffer< PhysicalCameraView::OutputCodecSupportedOutputCodecs ()
 Returns a list of all video codecs supported by the current backend.
static Buffer< PhysicalCameraView::OutputMuxSupportedOutputMuxes ()
 Returns a list of all container/muxer formats supported by the current backend.

Static Public Attributes

static ApplicationOption< TimeSpandefault_buffer_time
 Default video buffer duration.
static ApplicationOption< Angle< fltp08 > > default_camera_angle_offset
 Default camera rotation angle offset.
static ApplicationOption< Stringdefault_camera_server_location
 Default camera server URL or address.
static ApplicationOption< Stringdefault_camera_server_password
 Default camera server password.
static ApplicationOption< uint04default_output_bitrate
 Default video output bitrate.
static ApplicationOption< Stringdefault_output_codec
 Default video codec.
static ApplicationOption< Stringdefault_output_extension
 Default video file extension.
static ApplicationOption< uint04default_output_fps
 Default video output frames per second.
static ApplicationOption< Stringdefault_output_mux
 Default video container/muxer format.
static Resource< Filedefault_screenshot_folder
 Default folder for saving screenshots.
static Resource< Filedefault_video_folder
 Default folder for saving recorded videos.
static Dictionary< UUID, PhysicalCameraView * > s_active_logging
 Registry of camera views with active logging.
static ApplicationOption< bool > write_video_to_memory
 Whether to buffer video in memory before writing to disk.

Protected Member Functions

 PhysicalCameraView ()
 Default constructor for subclass use only.
 PhysicalCameraView (const DynamicPointer< Camera > &camera, QWidget *parent=nullptr)
 Constructs a PhysicalCameraView for the given camera.
virtual QWidget * cameraToolbar () override
 Returns the camera toolbar widget.
virtual void cleanup ()
 Performs cleanup of camera resources before destruction.
void closeEvent (QCloseEvent *event) override
 Handles the widget close event, performing cleanup.
virtual ToolButtonSettings defaultButtonSettings () const
 Returns the default toolbar button visibility settings for this camera type.
void displayCamera (QCustomStackedWidget::StackAnimationDirection=QCustomStackedWidget::e_automatic)
 Displays the live camera panel.
virtual void displayCurrentViewTab (QCustomStackedWidget::StackAnimationDirection=QCustomStackedWidget::e_automatic)
 Switches to the appropriate view tab based on the current view mode.
void displayError (const TranslatedString &error, QCustomStackedWidget::StackAnimationDirection=QCustomStackedWidget::e_automatic)
 Displays the error panel with a message.
void displayFinder (QCustomStackedWidget::StackAnimationDirection=QCustomStackedWidget::e_automatic)
 Displays the connection/finder panel.
virtual bool finishRecord (File file)
 Finalizes a recording and saves the output file.
virtual void handleError ()
 Handles a camera error by updating the display and notifying the user.
virtual int heightForWidth (int w) const override
 Returns the preferred height for the given width, maintaining aspect ratio.
virtual void init ()
 Initializes the UI, toolbar, and internal state after construction.
virtual void invertScreenColors (bool invert)
 Inverts the screen colors for the camera display.
void keyPressEvent (QKeyEvent *event) override
 Handles key press events for camera shortcuts.
void keyReleaseEvent (QKeyEvent *event) override
 Handles key release events.
void networkRequestReady ()
 Handles a completed network request for the camera stream.
void pause ()
 Pauses the camera stream playback.
virtual bool pauseRecord (bool paused, const File &file)
 Pauses or resumes the current recording.
void processCapturedImage (const QPixmap &img)
 Processes a captured image for saving or display.
virtual File recordPath (StringView name, bool is_finished_recording) const
 Computes the file path for a recording.
virtual void refreshInstance ()
 Refreshes the camera instance, reconnecting if needed.
virtual bool setCameraSource (const StringView &camera_info)
 Sets the camera source by connection string or identifier.
void setExposureCompensation (int index)
 Sets the exposure compensation level.
void setMuted (bool)
 Mutes or unmutes the audio from the camera stream.
virtual QPointer< QWidget > settingsWidget ()
 Returns the settings widget for this camera view.
void setupRulers ()
 Creates and configures the measurement ruler overlays.
virtual QSize sizeHint () const override
 Returns the recommended size for this widget.
void sourceChanged ()
 Handles a change in the camera source.
QCustomStackedWidgetstackedWidget () const
 Returns the stacked widget used for switching between view panels.
void startCamera ()
 Starts the camera stream.
virtual bool startRecord (const File &file)
 Begins recording video to the specified file.
void stop ()
 Stops the camera stream completely.
void stopCamera ()
 Stops the camera stream.
virtual bool takeImage (const File &file)
 Captures a single image and saves it to the specified file.
void toggleLock ()
 Toggles the lock state of the camera controls.
void updateCameraRotation ()
 Updates the camera rotation based on device orientation or user settings.
void updateCameraWindowSize ()
 Resizes the camera rendering surface to match the widget dimensions.
void updateRulers ()
 Updates the ruler display to match the current zoom and position.
WindowContainerwindowContainer () const
 Returns the window container holding the camera rendering surface.

Protected Attributes

File m_active_record_path
 The file path of the active recording.
bool m_application_exiting = false
 Whether the application is shutting down.
QPointer< QCustomSliderm_brightness_slider
 The slider controlling light brightness.
QPointer< QWidget > m_brightness_slider_widget
 Container widget for the brightness slider.
DynamicPointer< Cameram_camera
 The camera being displayed.
String m_connecting_icon
 Resource identifier for the connecting state icon.
TranslatedString m_connecting_message
 The message displayed while connecting.
String m_error_icon
 Resource identifier for the error state icon.
String m_file_name
 The current recording file name.
bool m_is_black_and_white = false
 Whether the display is in black and white mode.
bool m_is_capturing_image = false
 Whether an image capture is in progress.
bool m_is_in_error_state = false
 Whether the camera is in an error state.
bool m_is_inverted_color = false
 Whether the display colors are inverted.
bool m_is_playing = false
 Whether the camera stream is currently playing.
TranslatedString m_last_error
 The most recent error message.
bool m_lock_controls = false
 Whether the camera controls are locked.
LogPtr m_log
 Logger for camera events and errors.
String m_output_codec
 The active video codec identifier.
String m_output_mux
 The active video container/muxer identifier.
RecordingState m_recording_state = RecordingState::e_stopped
 The current video recording state.
Buttonm_ruler_button = nullptr
 The button to toggle ruler visibility.
QPointer< CameraRulerMenum_ruler_combo
 The ruler configuration menu widget.
String m_screenshot_file_name
 Base file name template for screenshots.
File m_screenshot_path
 The directory path for saving screenshots.
bool m_settings_popup = true
 Whether the settings widget displays as a popup.
QPointer< QWidget > m_settings_widget
 The optional settings widget for camera configuration.
bool m_show_edge_ruler = false
 Whether the side ruler is visible.
bool m_show_top_ruler = false
 Whether the top ruler is visible.
Rulerm_side_ruler = nullptr
 The side measurement ruler overlay.
QTimer * m_timeout_timer = nullptr
 Timer for connection timeout detection.
ToolButtonSettings m_tool_button_settings
 Current toolbar button visibility configuration.
bool m_tool_temp_showing = false
 Whether the toolbar is temporarily shown on hover.
Toolbarm_toolbar = nullptr
 The camera toolbar widget.
Rulerm_top_ruler = nullptr
 The top measurement ruler overlay.
File m_video_path
 The directory path for saving videos.
ViewMode m_view_mode = e_loading
 The current display mode of the view.
WindowContainerm_view_panel
 The container holding the camera rendering surface.
Ui::PhysicalCameraViewUI * ui
 The auto-generated UI form.

Detailed Description

A Viewport that represents a physical camera stream, or real world camera view.


Definition at line 62 of file PhysicalCameraView.h.

Member Enumeration Documentation

◆ ViewMode

Describes the current display mode of the camera view.

Enumerator
e_loading 

The camera is loading or connecting.

e_error 

An error occurred with the camera stream.

e_camera 

The camera stream is actively displayed.

Definition at line 69 of file PhysicalCameraView.h.

Constructor & Destructor Documentation

◆ PhysicalCameraView()

PhysicalCameraView::PhysicalCameraView ( const DynamicPointer< Camera > & camera,
QWidget * parent = nullptr )
protected

Constructs a PhysicalCameraView for the given camera.

Parameters
[in]cameraThe Camera to display.
[in]parentThe parent QWidget, or nullptr for no parent.

References PhysicalCameraView(), and camera().

Member Function Documentation

◆ activeCodec()

StringView PhysicalCameraView::activeCodec ( ) const

Returns the currently active codec identifier.

Returns
A StringView of the active codec ID.

◆ activeVideoMux()

StringView PhysicalCameraView::activeVideoMux ( ) const

Returns the currently active video muxer identifier.

Returns
A StringView of the active muxer ID.

◆ activeWidget()

QWidget * PhysicalCameraView::activeWidget ( ) const

Returns the currently active widget in the stacked display.

Returns
A pointer to the active QWidget.

◆ addWidget()

virtual void PhysicalCameraView::addWidget ( const QPointer< QWidget > & button)
overridevirtual

Adds an overlay widget to the camera view.

Parameters
[in]buttonThe widget to add.

◆ buttonSettings()

ToolButtonSettings PhysicalCameraView::buttonSettings ( ) const
inline

Returns the current toolbar button visibility settings.

Returns
The ToolButtonSettings structure.

Definition at line 282 of file PhysicalCameraView.h.

References m_tool_button_settings.

◆ camera() [1/2]

virtual ConstPointer< Camera > PhysicalCameraView::camera ( ) const
inlineoverridevirtual

◆ camera() [2/2]

virtual DynamicPointer< Camera > PhysicalCameraView::camera ( )
inlineoverridevirtual

Returns a mutable pointer to the Camera.

Returns
A DynamicPointer to the Camera.

Definition at line 277 of file PhysicalCameraView.h.

References m_camera.

◆ cameraToolbar()

virtual QWidget * PhysicalCameraView::cameraToolbar ( )
overrideprotectedvirtual

Returns the camera toolbar widget.

Returns
A pointer to the toolbar QWidget.

◆ closeEvent()

void PhysicalCameraView::closeEvent ( QCloseEvent * event)
overrideprotected

Handles the widget close event, performing cleanup.

Parameters
[in]eventThe close event.

References event().

◆ defaultButtonSettings()

virtual ToolButtonSettings PhysicalCameraView::defaultButtonSettings ( ) const
protectedvirtual

Returns the default toolbar button visibility settings for this camera type.

Returns
The default ToolButtonSettings.

Reimplemented in VncCameraView.

◆ displayCamera()

void PhysicalCameraView::displayCamera ( QCustomStackedWidget::StackAnimationDirection = QCustomStackedWidget::e_automatic)
protected

Displays the live camera panel.

Parameters
[in]directionThe stack animation direction.

References QCustomStackedWidgetBase::e_automatic.

◆ displayCurrentViewTab()

virtual void PhysicalCameraView::displayCurrentViewTab ( QCustomStackedWidget::StackAnimationDirection = QCustomStackedWidget::e_automatic)
protectedvirtual

Switches to the appropriate view tab based on the current view mode.

Parameters
[in]directionThe stack animation direction.

References QCustomStackedWidgetBase::e_automatic.

◆ displayError()

void PhysicalCameraView::displayError ( const TranslatedString & error,
QCustomStackedWidget::StackAnimationDirection = QCustomStackedWidget::e_automatic )
protected

Displays the error panel with a message.

Parameters
[in]errorThe error message to display.
[in]directionThe stack animation direction.

References QCustomStackedWidgetBase::e_automatic.

◆ displayFinder()

void PhysicalCameraView::displayFinder ( QCustomStackedWidget::StackAnimationDirection = QCustomStackedWidget::e_automatic)
protected

Displays the connection/finder panel.

Parameters
[in]directionThe stack animation direction.

References QCustomStackedWidgetBase::e_automatic.

◆ event()

bool PhysicalCameraView::event ( QEvent * event)
override

Processes a Qt event.

Parameters
[in]eventThe event to process.
Returns
True if the event was handled.

References event().

Referenced by closeEvent(), event(), keyPressEvent(), keyReleaseEvent(), and windowCapturedEvent().

◆ finishRecord()

virtual bool PhysicalCameraView::finishRecord ( File file)
protectedvirtual

Finalizes a recording and saves the output file.

Parameters
[in]fileThe output file path.
Returns
True if the recording was finalized successfully.

Reimplemented in LocalPhysicalCameraView, RasterCameraView, and VLCCameraView.

◆ grabFramebuffer()

virtual QImage PhysicalCameraView::grabFramebuffer ( )
virtual

Captures the current frame as a QImage.

Returns
The captured QImage.

Reimplemented in RasterCameraView, RealSenseCameraView, and VLCCameraView.

◆ heightForWidth()

virtual int PhysicalCameraView::heightForWidth ( int w) const
overrideprotectedvirtual

Returns the preferred height for the given width, maintaining aspect ratio.

Parameters
[in]wThe target width.
Returns
The computed height.

◆ id()

virtual UUID PhysicalCameraView::id ( ) const
inlineoverridevirtual

Returns the unique identifier for this camera view.

Returns
The UUID of the associated Camera.

Definition at line 267 of file PhysicalCameraView.h.

References guid, and m_camera.

◆ invertImageButton()

Button * PhysicalCameraView::invertImageButton ( ) const

Returns the invert colors button.

Returns
A pointer to the invert-image Button.

◆ invertScreenColors()

virtual void PhysicalCameraView::invertScreenColors ( bool invert)
protectedvirtual

Inverts the screen colors for the camera display.

Parameters
[in]invertWhether to invert colors.

Reimplemented in LocalPhysicalCameraView, RasterCameraView, RealSenseCameraView, VLCCameraView, and VncCameraView.

◆ keyPressEvent()

void PhysicalCameraView::keyPressEvent ( QKeyEvent * event)
overrideprotected

Handles key press events for camera shortcuts.

Parameters
[in]eventThe key event.

References event().

◆ keyReleaseEvent()

void PhysicalCameraView::keyReleaseEvent ( QKeyEvent * event)
overrideprotected

Handles key release events.

Parameters
[in]eventThe key event.

References event().

◆ leaveEvent()

void PhysicalCameraView::leaveEvent ( QEvent * leave)
override

Handles the mouse leaving the widget area.

Parameters
[in]leaveThe leave event.

◆ lightButton()

Button * PhysicalCameraView::lightButton ( ) const

Returns the light toggle button.

Returns
A pointer to the light Button.

◆ lightingSliderWidget()

virtual QPointer< QWidget > PhysicalCameraView::lightingSliderWidget ( )
virtual

Returns the lighting brightness slider widget.

Returns
A QPointer to the slider widget, or null if none exists.

◆ log()

LogPtr PhysicalCameraView::log ( ) const
inline

Returns the current logger.

Returns
The LogPtr associated with this view.

Definition at line 227 of file PhysicalCameraView.h.

References m_log.

Referenced by VLCCameraView::VLCCameraView(), and setLog().

◆ maxZoomOut()

fltp08 PhysicalCameraView::maxZoomOut ( ) const

Returns the maximum zoom-out factor for this camera.

Returns
The maximum zoom-out value.

◆ mouseReleaseEvent()

void PhysicalCameraView::mouseReleaseEvent ( QMouseEvent * releaseEvent)
override

Handles mouse release events for the camera view.

Parameters
[in]releaseEventThe mouse release event.

◆ pauseRecord()

virtual bool PhysicalCameraView::pauseRecord ( bool paused,
const File & file )
protectedvirtual

Pauses or resumes the current recording.

Parameters
[in]pausedWhether to pause (true) or resume (false).
[in]fileThe active recording file path.
Returns
True if the state change succeeded.

Reimplemented in LocalPhysicalCameraView.

◆ processCapturedImage()

void PhysicalCameraView::processCapturedImage ( const QPixmap & img)
protected

Processes a captured image for saving or display.

Parameters
[in]imgThe captured QPixmap.

◆ recordingState()

RecordingState PhysicalCameraView::recordingState ( ) const
inlineoverride

Returns the current recording state.

Returns
The current RecordingState.

Definition at line 257 of file PhysicalCameraView.h.

References m_recording_state.

◆ recordPath()

virtual File PhysicalCameraView::recordPath ( StringView name,
bool is_finished_recording ) const
protectedvirtual

Computes the file path for a recording.

Parameters
[in]nameThe base file name.
[in]is_finished_recordingWhether the recording is complete.
Returns
The computed File path.

◆ refreshButton()

Button * PhysicalCameraView::refreshButton ( ) const

Returns the refresh/reconnect button.

Returns
A pointer to the refresh Button.

◆ removeWidget()

virtual void PhysicalCameraView::removeWidget ( const QPointer< QWidget > & button)
overridevirtual

Removes an overlay widget from the camera view.

Parameters
[in]buttonThe widget to remove.

◆ screenshotPath()

File PhysicalCameraView::screenshotPath ( ) const

Returns the configured screenshot output path.

Returns
The screenshot File path.

◆ setAutoRotateCamera()

void PhysicalCameraView::setAutoRotateCamera ( bool auto_rotate)

Enables or disables automatic camera rotation based on device orientation.

Parameters
[in]auto_rotateWhether to auto-rotate.

◆ setButtonSettings()

void PhysicalCameraView::setButtonSettings ( const ToolButtonSettings & settings)

Applies new toolbar button visibility settings.

Parameters
[in]settingsThe ToolButtonSettings to apply.

◆ setCameraSource()

virtual bool PhysicalCameraView::setCameraSource ( const StringView & camera_info)
protectedvirtual

Sets the camera source by connection string or identifier.

Parameters
[in]camera_infoThe source identifier or URL.
Returns
True if the source was set successfully.

Reimplemented in LocalPhysicalCameraView, RasterCameraView, VLCCameraView, and VncCameraView.

◆ setConnectingIcon()

void PhysicalCameraView::setConnectingIcon ( const StringView & image)

Sets the icon shown while the camera is connecting.

Parameters
[in]imageThe resource identifier for the connecting icon.

◆ setConnectingMessage()

void PhysicalCameraView::setConnectingMessage ( const TranslatedString & message)

Sets the message displayed while the camera is connecting.

Parameters
[in]messageThe connecting status message.

◆ setErrorIcon()

void PhysicalCameraView::setErrorIcon ( const StringView & image)

Sets the icon shown when the camera is in an error state.

Parameters
[in]imageThe resource identifier for the error icon.

◆ setErrorState()

void PhysicalCameraView::setErrorState ( bool is_in_error_state)

Sets whether the camera is in an error state, updating the display accordingly.

Parameters
[in]is_in_error_stateWhether the camera has an error.

◆ setExposureCompensation()

void PhysicalCameraView::setExposureCompensation ( int index)
protected

Sets the exposure compensation level.

Parameters
[in]indexThe exposure compensation index.

◆ setIconSizeMultiplier()

virtual void PhysicalCameraView::setIconSizeMultiplier ( fltp04 multiplier)
overridevirtual

Sets a multiplier for toolbar icon sizes.

Parameters
[in]multiplierThe icon size multiplier.

◆ setLightBrightness()

void PhysicalCameraView::setLightBrightness ( fltp04 percent)

Sets the brightness level of the camera light.

Parameters
[in]percentThe brightness as a fraction from 0.0 to 1.0.

◆ setLog()

void PhysicalCameraView::setLog ( LogPtr log)

Sets the logger for this camera view.

Parameters
[in]logThe log pointer to use.

References log().

◆ setMuted()

void PhysicalCameraView::setMuted ( bool )
protected

Mutes or unmutes the audio from the camera stream.

Parameters
[in]mutedWhether to mute.

◆ setReadyForImageCapture()

void PhysicalCameraView::setReadyForImageCapture ( bool ready)

Sets whether the camera is ready to capture an image.

Parameters
[in]readyWhether image capture is ready.

◆ setRecordingElapsedTime()

void PhysicalCameraView::setRecordingElapsedTime ( const TimeSpan & span)

Updates the displayed recording elapsed time.

Parameters
[in]spanThe elapsed time since recording began.

◆ setRecordingState()

virtual void PhysicalCameraView::setRecordingState ( RecordingState recording_state)
virtual

Sets the video recording state and updates the UI accordingly.

Parameters
[in]recording_stateThe new recording state.

Reimplemented in RasterCameraView, RealSenseCameraView, and VLCCameraView.

◆ setScreenshotFileName()

void PhysicalCameraView::setScreenshotFileName ( const StringView & file_name)

Sets the base file name used for screenshot files.

Parameters
[in]file_nameThe screenshot file name template.

◆ setScreenshotPath()

void PhysicalCameraView::setScreenshotPath ( const File & file)
inline

Sets the file path used for saving screenshots.

Parameters
[in]fileThe screenshot output path.

Definition at line 135 of file PhysicalCameraView.h.

References file, and m_screenshot_path.

◆ setSettingsVisible()

void PhysicalCameraView::setSettingsVisible ( bool visible,
PopupInfo info )

Shows or hides the settings widget.

Parameters
[in]visibleWhether to show the settings.
[in]infoPopup display options.

◆ setSettingsWidget()

void PhysicalCameraView::setSettingsWidget ( QWidget * settings_widget,
bool is_popup = false )

Sets a custom settings widget for camera configuration.

Parameters
[in]settings_widgetThe widget to use for settings.
[in]is_popupWhether the settings should appear as a popup.

◆ setSwapMode()

virtual void PhysicalCameraView::setSwapMode ( SwapMode mode)
overridevirtual

Sets the buffer swap mode for rendering.

Parameters
[in]modeThe SwapMode to use.

◆ settingsWidget()

virtual QPointer< QWidget > PhysicalCameraView::settingsWidget ( )
protectedvirtual

Returns the settings widget for this camera view.

Returns
A QPointer to the settings widget.

Reimplemented in VncCameraView.

◆ setTouchTheme()

virtual void PhysicalCameraView::setTouchTheme ( bool touch_theme)
overridevirtual

Enables or disables the touch-optimized theme.

Parameters
[in]touch_themeWhether to use the touch theme.

◆ setupForCaptureMode()

void PhysicalCameraView::setupForCaptureMode ( bool capture_mode)

Configures the view for image capture mode, adjusting UI elements.

Parameters
[in]capture_modeWhether to enable capture mode.

◆ setVideoOutputPath()

void PhysicalCameraView::setVideoOutputPath ( const File & file)

Sets the file path used for saving recorded video.

Parameters
[in]fileThe video output path.

◆ showToolRibbon()

virtual void PhysicalCameraView::showToolRibbon ( bool show_ribbon)
overridevirtual

Shows or hides the tool ribbon overlay.

Parameters
[in]show_ribbonWhether to show the ribbon.

Reimplemented in VncCameraView.

◆ sizeHint()

virtual QSize PhysicalCameraView::sizeHint ( ) const
overrideprotectedvirtual

Returns the recommended size for this widget.

Returns
The preferred QSize.

◆ stack()

QWidget * PhysicalCameraView::stack ( ) const

Returns the stacked widget used for switching between view modes.

Returns
A pointer to the stack QWidget.

◆ stackedWidget()

QCustomStackedWidget * PhysicalCameraView::stackedWidget ( ) const
protected

Returns the stacked widget used for switching between view panels.

Returns
A pointer to the QCustomStackedWidget.

◆ startNewRecording()

virtual void PhysicalCameraView::startNewRecording ( StringView file_name = StringView())
virtual

Begins a new video recording session.

Parameters
[in]file_nameOptional base file name for the recording.

◆ startRecord()

virtual bool PhysicalCameraView::startRecord ( const File & file)
protectedvirtual

Begins recording video to the specified file.

Parameters
[in]fileThe output file path.
Returns
True if recording started successfully.

Reimplemented in LocalPhysicalCameraView, RasterCameraView, RealSenseCameraView, and VLCCameraView.

◆ SupportedOutputCodecs()

Buffer< PhysicalCameraView::OutputCodec > PhysicalCameraView::SupportedOutputCodecs ( )
static

Returns a list of all video codecs supported by the current backend.

Returns
A Buffer of OutputCodec descriptors.

◆ SupportedOutputMuxes()

Buffer< PhysicalCameraView::OutputMux > PhysicalCameraView::SupportedOutputMuxes ( )
static

Returns a list of all container/muxer formats supported by the current backend.

Returns
A Buffer of OutputMux descriptors.

◆ takeImage()

virtual bool PhysicalCameraView::takeImage ( const File & file)
protectedvirtual

Captures a single image and saves it to the specified file.

Parameters
[in]fileThe output file path.
Returns
True if the image was captured successfully.

Reimplemented in LocalPhysicalCameraView, RasterCameraView, RealSenseCameraView, VLCCameraView, and VncCameraView.

◆ takeImageButton()

Button * PhysicalCameraView::takeImageButton ( ) const

Returns the screenshot capture button.

Returns
A pointer to the take-image Button.

◆ videoPath()

File PhysicalCameraView::videoPath ( ) const

Returns the configured video output path.

Returns
The video File path.

◆ windowCapturedEvent()

void PhysicalCameraView::windowCapturedEvent ( QEvent * event)

Handles events forwarded from the embedded window container.

Parameters
[in]eventThe captured event.

References event().

◆ windowContainer()

WindowContainer * PhysicalCameraView::windowContainer ( ) const
protected

Returns the window container holding the camera rendering surface.

Returns
A pointer to the WindowContainer.

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