Qt 5.11 | Qt Multimedia | C++ Classes | QCameraControl

Qt 5.11.3 Reference Documentation

# QCameraControl Class

The QCameraControl class is an abstract base class for classes that control still cameras or video cameras. More...

Header: | #include <QCameraControl>
qmake: | QT += multimedia
Inherits: | QMediaControl

- List of all members, including inherited members

## Public Types

enum | PropertyChangeType { CaptureMode, ImageEncodingSettings, VideoEncodingSettings, Viewfinder, ViewfinderSettings }

## Public Functions

virtual | ~QCameraControl()
virtual bool | canChangeProperty(QCameraControl::PropertyChangeType changeType, QCamera::Status status) const = 0
virtual QCamera::CaptureModes | captureMode() const = 0
virtual bool | isCaptureModeSupported(QCamera::CaptureModes mode) const = 0
virtual void | setCaptureMode(QCamera::CaptureModes) = 0
virtual void | setState(QCamera::State state) = 0
virtual QCamera::State | state() const = 0
virtual QCamera::Status | status() const = 0

## Signals

void | captureModeChanged(QCamera::CaptureModes mode)
void | error(int error, const QString &errorString)
void | stateChanged(QCamera::State)
void | statusChanged(QCamera::Status)

## Protected Functions

| QCameraControl(QObject *parent = nullptr)

## Macros

| QCameraControl_iid

## Detailed Description

The QCameraControl class is an abstract base class for classes that control still cameras or video cameras.

This service is provided by a QMediaService object via QMediaService::control(). It is used by QCamera.

The interface name of QCameraControl is `org.qt-project.qt.cameracontrol/5.0` as defined in QCameraControl_iid.

See also QMediaService::requestControl() and QCamera.

## Member Type Documentation

### enum QCameraControl::PropertyChangeType

Constant | Value | Description
--- | --- | ---
`QCameraControl::CaptureMode` | `1` | Indicates the capture mode is changed.
`QCameraControl::ImageEncodingSettings` | `2` | Image encoder settings are changed, including resolution.
`QCameraControl::VideoEncodingSettings` | `3` | Video encoder settings are changed, including audio, video and container settings.
`QCameraControl::Viewfinder` | `4` | Viewfinder is changed.
`QCameraControl::ViewfinderSettings` | `5` | Viewfinder settings are changed.

## Member Function Documentation

### `[protected]` QCameraControl::QCameraControl(QObject *parent = nullptr)

Constructs a camera control object with parent.

### `[virtual]` QCameraControl::~QCameraControl()

Destruct the camera control object.

### `[pure virtual]` bool QCameraControl::canChangeProperty(QCameraControl::PropertyChangeType changeType, QCamera::Status status) const

### `[pure virtual]` QCamera::CaptureModes QCameraControl::captureMode() const

See also setCaptureMode().

### `[signal]` void QCameraControl::captureModeChanged(QCamera::CaptureModes mode)

### `[signal]` void QCameraControl::error(int error, const QString &errorString)

### `[pure virtual]` bool QCameraControl::isCaptureModeSupported(QCamera::CaptureModes mode) const

### `[pure virtual]` void QCameraControl::setCaptureMode(QCamera::CaptureModes)

See also captureMode().

### `[pure virtual]` void QCameraControl::setState(QCamera::State state)

See also state().

### `[pure virtual]` QCamera::State QCameraControl::state() const

See also setState().

### `[signal]` void QCameraControl::stateChanged(QCamera::State)

### `[pure virtual]` QCamera::Status QCameraControl::status() const

### `[signal]` void QCameraControl::statusChanged(QCamera::Status)

## Macro Documentation

### QCameraControl_iid

`org.qt-project.qt.cameracontrol/5.0`

Defines the interface name of the QCameraControl class.