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

# QCameraZoomControl Class

The QCameraZoomControl class supplies control for optical and digital camera zoom. More...

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

- List of all members, including inherited members

## Public Functions

| ~QCameraZoomControl()
virtual qreal | currentDigitalZoom() const = 0
virtual qreal | currentOpticalZoom() const = 0
virtual qreal | maximumDigitalZoom() const = 0
virtual qreal | maximumOpticalZoom() const = 0
virtual qreal | requestedDigitalZoom() const = 0
virtual qreal | requestedOpticalZoom() const = 0
virtual void | zoomTo(qreal optical, qreal digital) = 0

## Signals

void | currentDigitalZoomChanged(qreal zoom)
void | currentOpticalZoomChanged(qreal zoom)
void | maximumDigitalZoomChanged(qreal zoom)
void | maximumOpticalZoomChanged(qreal zoom)
void | requestedDigitalZoomChanged(qreal zoom)
void | requestedOpticalZoomChanged(qreal zoom)

## Protected Functions

| QCameraZoomControl(QObject * parent = 0)

## Macros

| QCameraZoomControl_iid

## Detailed Description

The QCameraZoomControl class supplies control for optical and digital camera zoom.

The interface name of QCameraZoomControl is `org.qt-project.qt.camerazoomcontrol/5.0` as defined in QCameraZoomControl_iid.

See also QMediaService::requestControl() and QCamera.

## Member Function Documentation

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

Constructs a camera zoom control object with parent.

### QCameraZoomControl::~QCameraZoomControl()

Destruct the camera zoom control object.

### qreal QCameraZoomControl::currentDigitalZoom() const`[pure virtual]`

Return the current digital zoom value.

### void QCameraZoomControl::currentDigitalZoomChanged(qreal zoom)`[signal]`

Signal emitted when the current digital zoom value changed.

### qreal QCameraZoomControl::currentOpticalZoom() const`[pure virtual]`

Return the current optical zoom value.

### void QCameraZoomControl::currentOpticalZoomChanged(qreal zoom)`[signal]`

Signal emitted when the current optical zoom value changed.

### qreal QCameraZoomControl::maximumDigitalZoom() const`[pure virtual]`

Returns the maximum digital zoom value, or 1.0 if digital zoom is not supported.

### void QCameraZoomControl::maximumDigitalZoomChanged(qreal zoom)`[signal]`

Signal emitted when the maximum supported digital zoom value changed.

The maximum supported zoom value can depend on other camera settings, like capture mode or resolution.

### qreal QCameraZoomControl::maximumOpticalZoom() const`[pure virtual]`

Returns the maximum optical zoom value, or 1.0 if optical zoom is not supported.

### void QCameraZoomControl::maximumOpticalZoomChanged(qreal zoom)`[signal]`

Signal emitted when the maximum supported optical zoom value changed.

The maximum supported zoom value can depend on other camera settings, like focusing mode.

### qreal QCameraZoomControl::requestedDigitalZoom() const`[pure virtual]`

Return the requested digital zoom value.

### void QCameraZoomControl::requestedDigitalZoomChanged(qreal zoom)`[signal]`

Signal emitted when the requested digital zoom value changed.

### qreal QCameraZoomControl::requestedOpticalZoom() const`[pure virtual]`

Return the requested optical zoom value.

### void QCameraZoomControl::requestedOpticalZoomChanged(qreal zoom)`[signal]`

Signal emitted when the requested optical zoom value changed.

### void QCameraZoomControl::zoomTo(qreal optical, qreal digital)`[pure virtual]`

Sets optical and digital zoom values.

Zooming can be asynchronous with value changes reported with currentDigitalZoomChanged() and currentOpticalZoomChanged() signals.

The backend should expect and correctly handle frequent zoomTo() calls during zoom animations or slider movements.

## Macro Documentation

### QCameraZoomControl_iid

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

Defines the interface name of the QCameraZoomControl class.