Provides access to a local camera on the system, such as a webcam or camera for a phone.
More...
|
|
| LocalPhysicalCameraView () |
| | Default constructor.
|
| | LocalPhysicalCameraView (const DynamicPointer< Camera > &camera, QWidget *parent=nullptr) |
| | Constructs a view for a specific camera.
|
| virtual | ~LocalPhysicalCameraView () |
| | Destructor.
|
|
void | adjustCrossHairs () |
| | Adjusts the cross-hair overlay to match the current view size.
|
| fltp08 | defaultScale () const |
| | Gets the default scale factor for the camera view.
|
| bool | event (QEvent *event) override |
| | Handles general events for the camera view.
|
| void | findBestFormat (const QCameraDevice &camera_evice) |
| | Selects the best camera format for the given device.
|
|
virtual void | refreshInstance () override |
| | Refreshes the camera instance and reconnects if needed.
|
| virtual void | resizeEvent (QResizeEvent *event) override |
| | Handles resize events by adjusting the video and cross-hairs.
|
| virtual bool | setCameraSource (const QCameraDevice &connection_id) |
| | Sets the camera source from a QCameraDevice.
|
| virtual bool | setCameraSource (const StringView &connection_id) override |
| | Sets the camera source by connection identifier string.
|
| virtual void | setCameraZoom (fltp08 zoom) override |
| | Sets the zoom level for the camera display.
|
| virtual void | setRemoteSource (const StringView &remote) |
| | Sets a remote media source URL for the camera view.
|
|
void | setToDefaultCamera () |
| | Sets the camera source to the system default camera.
|
| LocalVideoRenderer * | videoWidget () |
| | Gets the video renderer widget.
|
| 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< Camera > | camera () const override |
| | Returns a read-only pointer to the Camera.
|
| virtual DynamicPointer< Camera > | camera () 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.
|
| Button * | invertImageButton () const |
| | Returns the invert colors button.
|
| void | leaveEvent (QEvent *leave) override |
| | Handles the mouse leaving the widget area.
|
| Button * | lightButton () 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.
|
| Button * | refreshButton () 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.
|
| Button * | takeImageButton () 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.
|
|
|
QAudioInput * | m_audio_input = nullptr |
| | The audio input for recording.
|
|
Button * | m_camera_flash_button |
| | Button for toggling camera flash.
|
|
QMediaCaptureSession * | m_capture_session = nullptr |
| | The media capture session.
|
|
QGraphicsLineItem * | m_cross_hair_x = nullptr |
| | Horizontal cross-hair overlay line.
|
|
QGraphicsLineItem * | m_cross_hair_y = nullptr |
| | Vertical cross-hair overlay line.
|
|
QGraphicsView * | m_graphics_view |
| | The graphics view for video display.
|
|
QImageCapture * | m_image_capture = nullptr |
| | The image capture handler.
|
|
QMediaPlayer * | m_media_player = nullptr |
| | The media player for remote sources.
|
|
QMediaRecorder * | m_media_recorder = nullptr |
| | The media recorder for video recording.
|
|
QCamera * | m_q_camera = nullptr |
| | The Qt camera device.
|
|
File | m_screenshot_location |
| | The file path for screenshot output.
|
|
QCustomComboBox * | m_selection_combo |
| | Combo box for selecting camera sources.
|
|
LocalVideoRenderer * | m_video_widget = nullptr |
| | The video renderer widget.
|
|
File | m_active_record_path |
| | The file path of the active recording.
|
|
bool | m_application_exiting = false |
| | Whether the application is shutting down.
|
|
QPointer< QCustomSlider > | m_brightness_slider |
| | The slider controlling light brightness.
|
|
QPointer< QWidget > | m_brightness_slider_widget |
| | Container widget for the brightness slider.
|
|
DynamicPointer< Camera > | m_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.
|
|
Button * | m_ruler_button = nullptr |
| | The button to toggle ruler visibility.
|
|
QPointer< CameraRulerMenu > | m_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.
|
|
Ruler * | m_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.
|
|
Toolbar * | m_toolbar = nullptr |
| | The camera toolbar widget.
|
|
Ruler * | m_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.
|
|
WindowContainer * | m_view_panel |
| | The container holding the camera rendering surface.
|
|
Ui::PhysicalCameraViewUI * | ui |
| | The auto-generated UI form.
|
Provides access to a local camera on the system, such as a webcam or camera for a phone.
Definition at line 67 of file LocalPhysicalCameraView.h.