QCameraExposure Class

The QCameraExposure class provides interface for exposure related camera settings. More...

Header: #include <QCameraExposure>
qmake: QT += multimedia
Inherits: QObject

Public Types

enum ExposureMode { ExposureAuto, ExposureManual, ExposurePortrait, ExposureNight, ExposureBacklight, …, ExposureModeVendor }
enum FlashMode { FlashAuto, FlashOff, FlashOn, FlashRedEyeReduction, FlashFill, …, FlashManual }
flags FlashModes
enum MeteringMode { MeteringMatrix, MeteringAverage, MeteringSpot }

Properties

Public Functions

qreal aperture() const
qreal exposureCompensation() const
QCameraExposure::ExposureMode exposureMode() const
QCameraExposure::FlashModes flashMode() const
bool isAvailable() const
bool isExposureModeSupported(QCameraExposure::ExposureMode mode) const
bool isFlashModeSupported(QCameraExposure::FlashModes mode) const
bool isFlashReady() const
bool isMeteringModeSupported(QCameraExposure::MeteringMode mode) const
int isoSensitivity() const
QCameraExposure::MeteringMode meteringMode() const
qreal requestedAperture() const
int requestedIsoSensitivity() const
qreal requestedShutterSpeed() const
void setSpotMeteringPoint(const QPointF &point)
qreal shutterSpeed() const
QPointF spotMeteringPoint() const
QList<qreal> supportedApertures(bool *continuous = nullptr) const
QList<int> supportedIsoSensitivities(bool *continuous = nullptr) const
QList<qreal> supportedShutterSpeeds(bool *continuous = nullptr) const

Public Slots

void setAutoAperture()
void setAutoIsoSensitivity()
void setAutoShutterSpeed()
void setExposureCompensation(qreal ev)
void setExposureMode(QCameraExposure::ExposureMode mode)
void setFlashMode(QCameraExposure::FlashModes mode)
void setManualAperture(qreal aperture)
void setManualIsoSensitivity(int iso)
void setManualShutterSpeed(qreal seconds)
void setMeteringMode(QCameraExposure::MeteringMode mode)

Signals

void apertureChanged(qreal value)
void apertureRangeChanged()
void exposureCompensationChanged(qreal value)
void flashReady(bool ready)
void isoSensitivityChanged(int value)
void shutterSpeedChanged(qreal speed)
void shutterSpeedRangeChanged()

Protected Functions

virtual ~QCameraExposure()

Detailed Description

Member Type Documentation

enum QCameraExposure::ExposureMode

ConstantValueDescription
QCameraExposure::ExposureAuto0Automatic mode.
QCameraExposure::ExposureManual1Manual mode.
QCameraExposure::ExposurePortrait2Portrait exposure mode.
QCameraExposure::ExposureNight3Night mode.
QCameraExposure::ExposureBacklight4Backlight exposure mode.
QCameraExposure::ExposureSpotlight5Spotlight exposure mode.
QCameraExposure::ExposureSports6Spots exposure mode.
QCameraExposure::ExposureSnow7Snow exposure mode.
QCameraExposure::ExposureBeach8Beach exposure mode.
QCameraExposure::ExposureLargeAperture9Use larger aperture with small depth of field.
QCameraExposure::ExposureSmallAperture10Use smaller aperture.
QCameraExposure::ExposureAction11Action mode. Since 5.5
QCameraExposure::ExposureLandscape12Landscape mode. Since 5.5
QCameraExposure::ExposureNightPortrait13Night portrait mode. Since 5.5
QCameraExposure::ExposureTheatre14Theatre mode. Since 5.5
QCameraExposure::ExposureSunset15Sunset mode. Since 5.5
QCameraExposure::ExposureSteadyPhoto16Steady photo mode. Since 5.5
QCameraExposure::ExposureFireworks17Fireworks mode. Since 5.5
QCameraExposure::ExposureParty18Party mode. Since 5.5
QCameraExposure::ExposureCandlelight19Candlelight mode. Since 5.5
QCameraExposure::ExposureBarcode20Barcode mode. Since 5.5
QCameraExposure::ExposureModeVendor1000The base value for device specific exposure modes.

enum QCameraExposure::FlashMode
flags QCameraExposure::FlashModes

ConstantValueDescription
QCameraExposure::FlashAuto0x1Automatic flash.
QCameraExposure::FlashOff0x2Flash is Off.
QCameraExposure::FlashOn0x4Flash is On.
QCameraExposure::FlashRedEyeReduction0x8Red eye reduction flash.
QCameraExposure::FlashFill0x10Use flash to fillin shadows.
QCameraExposure::FlashTorch0x20Constant light source. If supported, torch can be enabled without loading the camera.
QCameraExposure::FlashVideoLight0x40Constant light source, useful for video capture. The light is turned on only while camera is active.
QCameraExposure::FlashSlowSyncFrontCurtain0x80Use the flash in conjunction with a slow shutter speed. This mode allows better exposure of distant objects and/or motion blur effect.
QCameraExposure::FlashSlowSyncRearCurtain0x100The similar mode to FlashSlowSyncFrontCurtain but flash is fired at the end of exposure.
QCameraExposure::FlashManual0x200Flash power is manualy set.

The FlashModes type is a typedef for QFlags<FlashMode>. It stores an OR combination of FlashMode values.

enum QCameraExposure::MeteringMode

ConstantValueDescription
QCameraExposure::MeteringMatrix1Matrix metering mode.
QCameraExposure::MeteringAverage2Center weighted average metering mode.
QCameraExposure::MeteringSpot3Spot metering mode.

Property Documentation

aperture : const qreal

Lens aperture is specified as an F number, the ratio of the focal length to effective aperture diameter.

Access functions:

qreal aperture() const

Notifier signal:

void apertureChanged(qreal value)

See also supportedApertures(), setAutoAperture(), setManualAperture(), and requestedAperture().

exposureCompensation : qreal

Exposure compensation in EV units.

Exposure compensation property allows to adjust the automatically calculated exposure.

Access functions:

qreal exposureCompensation() const
void setExposureCompensation(qreal ev)

Notifier signal:

void exposureCompensationChanged(qreal value)

exposureMode : QCameraExposure::ExposureMode

This property holds the exposure mode being used.

Access functions:

QCameraExposure::ExposureMode exposureMode() const
void setExposureMode(QCameraExposure::ExposureMode mode)

See also QCameraExposure::isExposureModeSupported().

flashMode : QCameraExposure::FlashModes

This property holds the flash mode being used.

Usually the single QCameraExposure::FlashMode flag is used, but some non conflicting flags combination are also allowed, like QCameraExposure::FlashManual | QCameraExposure::FlashSlowSyncRearCurtain.

Access functions:

QCameraExposure::FlashModes flashMode() const
void setFlashMode(QCameraExposure::FlashModes mode)

See also QCameraExposure::isFlashModeSupported() and QCameraExposure::isFlashReady().

flashReady : const bool

Indicates if the flash is charged and ready to use.

Access functions:

bool isFlashReady() const

Notifier signal:

void flashReady(bool ready)

isoSensitivity : const int

This property holds the sensor ISO sensitivity.

Access functions:

int isoSensitivity() const

Notifier signal:

void isoSensitivityChanged(int value)

See also supportedIsoSensitivities(), setAutoIsoSensitivity(), and setManualIsoSensitivity().

meteringMode : QCameraExposure::MeteringMode

This property holds the metering mode being used.

Access functions:

QCameraExposure::MeteringMode meteringMode() const
void setMeteringMode(QCameraExposure::MeteringMode mode)

See also QCameraExposure::isMeteringModeSupported().

shutterSpeed : const qreal

Camera's shutter speed in seconds.

Access functions:

qreal shutterSpeed() const

Notifier signal:

void shutterSpeedChanged(qreal speed)

See also supportedShutterSpeeds(), setAutoShutterSpeed(), and setManualShutterSpeed().

Member Function Documentation

[signal] void QCameraExposure::apertureChanged(qreal value)

Signal emitted when aperature changes to value.

Note: Notifier signal for property aperture.

[signal] void QCameraExposure::apertureRangeChanged()

Signal emitted when aperature range has changed.

[signal] void QCameraExposure::exposureCompensationChanged(qreal value)

Signal emitted when the exposure compensation changes to value.

Note: Notifier signal for property exposureCompensation.

[signal] void QCameraExposure::flashReady(bool ready)

Signal the flash ready status has changed.

Note: Notifier signal for property flashReady.

[signal] void QCameraExposure::isoSensitivityChanged(int value)

Signal emitted when sensitivity changes to value.

Note: Notifier signal for property isoSensitivity.

[slot] void QCameraExposure::setAutoAperture()

Turn on auto aperture

[slot] void QCameraExposure::setAutoIsoSensitivity()

Turn on auto sensitivity

[slot] void QCameraExposure::setAutoShutterSpeed()

Turn on auto shutter speed

[slot] void QCameraExposure::setManualAperture(qreal aperture)

Sets the manual camera aperture value.

[slot] void QCameraExposure::setManualIsoSensitivity(int iso)

Sets the manual sensitivity to iso

[slot] void QCameraExposure::setManualShutterSpeed(qreal seconds)

Set the manual shutter speed to seconds

[signal] void QCameraExposure::shutterSpeedChanged(qreal speed)

Signals that a camera's shutter speed has changed.

Note: Notifier signal for property shutterSpeed.

[signal] void QCameraExposure::shutterSpeedRangeChanged()

Signal emitted when the shutter speed range has changed.

[virtual protected] QCameraExposure::~QCameraExposure()

Destroys the camera exposure object.

bool QCameraExposure::isAvailable() const

Returns true if exposure settings are supported by this camera.

bool QCameraExposure::isExposureModeSupported(QCameraExposure::ExposureMode mode) const

Returns true if the exposure mode is supported.

bool QCameraExposure::isFlashModeSupported(QCameraExposure::FlashModes mode) const

Returns true if the flash mode is supported.

bool QCameraExposure::isFlashReady() const

Returns true if flash is charged.

Note: Getter function for property flashReady.

bool QCameraExposure::isMeteringModeSupported(QCameraExposure::MeteringMode mode) const

Returns true if the metering mode is supported.

qreal QCameraExposure::requestedAperture() const

Returns the requested manual aperture or -1.0 if automatic aperture is turned on.

int QCameraExposure::requestedIsoSensitivity() const

Returns the requested ISO sensitivity or -1 if automatic ISO is turned on.

qreal QCameraExposure::requestedShutterSpeed() const

Returns the requested manual shutter speed in seconds or -1.0 if automatic shutter speed is turned on.

void QCameraExposure::setSpotMeteringPoint(const QPointF &point)

Allows setting the spot metering point to point.

See also spotMeteringPoint().

qreal QCameraExposure::shutterSpeed() const

Returns the current shutter speed in seconds.

Note: Getter function for property shutterSpeed.

QPointF QCameraExposure::spotMeteringPoint() const

When supported, the spot metering point is the (normalized) position of the point of the image where exposure metering will be performed. This is typically used to indicate an "interesting" area of the image that should be exposed properly.

The coordinates are relative frame coordinates: QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center, which is typically the default spot metering point.

The spot metering point is only used with spot metering mode.

See also setSpotMeteringPoint().

QList<qreal> QCameraExposure::supportedApertures(bool *continuous = nullptr) const

Returns the list of aperture values camera supports. The apertures list can change depending on the focal length, in such a case the apertureRangeChanged() signal is emitted.

If the camera supports arbitrary aperture values within the supported range, *continuous is set to true, otherwise *continuous is set to false.

QList<int> QCameraExposure::supportedIsoSensitivities(bool *continuous = nullptr) const

Returns the list of ISO senitivities camera supports.

If the camera supports arbitrary ISO sensitivities within the supported range, *continuous is set to true, otherwise *continuous is set to false.

QList<qreal> QCameraExposure::supportedShutterSpeeds(bool *continuous = nullptr) const

Returns the list of shutter speed values in seconds camera supports.

If the camera supports arbitrary shutter speed values within the supported range, *continuous is set to true, otherwise *continuous is set to false.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.