- Qt 5.3
- Qt Multimedia
- C++ Classes
- QCameraViewfinderSettingsControl
- Qt 5.3.2 Reference Documentation

# QCameraViewfinderSettingsControl Class

The QCameraViewfinderSettingsControl class provides an abstract class for controlling camera viewfinder parameters. More...

Header: | `#include <QCameraViewfinderSettingsControl>`
qmake: | `QT += multimedia`
Inherits: | QMediaControl.

- List of all members, including inherited members

## Public Types

enum | ViewfinderParameter { Resolution, PixelAspectRatio, MinimumFrameRate, MaximumFrameRate, PixelFormat, UserParameter }

## Public Functions

| ~QCameraViewfinderSettingsControl()
virtual bool | isViewfinderParameterSupported(ViewfinderParameter parameter) const = 0
virtual void | setViewfinderParameter(ViewfinderParameter parameter, const QVariant & value) = 0
virtual QVariant | viewfinderParameter(ViewfinderParameter parameter) const = 0

## Protected Functions

| QCameraViewfinderSettingsControl(QObject * parent = 0)

## Macros

| QCameraViewfinderSettingsControl_iid

## Detailed Description

The QCameraViewfinderSettingsControl class provides an abstract class for controlling camera viewfinder parameters.

The interface name of QCameraViewfinderSettingsControl is `org.qt-project.qt.cameraviewfindersettingscontrol/5.0` as defined in QCameraViewfinderSettingsControl_iid.

See also QMediaService::requestControl() and QCamera.

## Member Type Documentation

### enum QCameraViewfinderSettingsControl::ViewfinderParameter

Constant | Value | Description
--- | --- | ---
`QCameraViewfinderSettingsControl::Resolution` | `0` | Viewfinder resolution, QSize.
`QCameraViewfinderSettingsControl::PixelAspectRatio` | `1` | Pixel aspect ratio, QSize as in QVideoSurfaceFormat::pixelAspectRatio
`QCameraViewfinderSettingsControl::MinimumFrameRate` | `2` | Minimum viewfinder frame rate, qreal
`QCameraViewfinderSettingsControl::MaximumFrameRate` | `3` | Maximum viewfinder frame rate, qreal
`QCameraViewfinderSettingsControl::PixelFormat` | `4` | Viewfinder pixel format, QVideoFrame::PixelFormat
`QCameraViewfinderSettingsControl::UserParameter` | `1000` | The base value for platform specific extended parameters. For such parameters the sequential values starting from UserParameter shuld be used.

## Member Function Documentation

### QCameraViewfinderSettingsControl::QCameraViewfinderSettingsControl(QObject * parent = 0)`[protected]`

Constructs a camera viewfinder control object with parent.

### QCameraViewfinderSettingsControl::~QCameraViewfinderSettingsControl()

Destroys the camera viewfinder control object.

### bool QCameraViewfinderSettingsControl::isViewfinderParameterSupported(ViewfinderParameter parameter) const`[pure virtual]`

Returns true if configuration of viewfinder parameter is supported by camera backend.

### void QCameraViewfinderSettingsControl::setViewfinderParameter(ViewfinderParameter parameter, const QVariant & value)`[pure virtual]`

Set the prefferred value of viewfinder parameter.

Calling this while the camera is active may result in the camera being stopped and reloaded. If video recording is in progress, this call may be ignored.

If an unsupported parameter is specified the camera may fail to load, or the setting may be ignored.

Viewfinder parameters may also depend on other camera settings, especially in video capture mode. If camera configuration conflicts with viewfinder settings, the camara configuration is usually preferred.

See also viewfinderParameter().

### QVariant QCameraViewfinderSettingsControl::viewfinderParameter(ViewfinderParameter parameter) const`[pure virtual]`

Returns the value of viewfinder parameter.

See also setViewfinderParameter().

## Macro Documentation

### QCameraViewfinderSettingsControl_iid

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

Defines the interface name of the QCameraViewfinderSettingsControl class.