QCameraExposureControl 类

QCameraExposureControl 类允许控制摄像头曝光参数。 更多...

头: #include <QCameraExposureControl>
qmake: QT += multimedia
继承: QMediaControl

该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

公共类型

enum ExposureParameter { ISO, Aperture, ShutterSpeed, ExposureCompensation, FlashPower, …, ExtendedExposureParameter }

公共函数

virtual ~QCameraExposureControl ()
virtual QVariant actualValue (QCameraExposureControl::ExposureParameter 参数 ) const = 0
virtual bool isParameterSupported (QCameraExposureControl::ExposureParameter 参数 ) const = 0
virtual QVariant requestedValue (QCameraExposureControl::ExposureParameter 参数 ) const = 0
virtual bool setValue (QCameraExposureControl::ExposureParameter 参数 , const QVariant & value ) = 0
virtual QVariantList supportedParameterRange (QCameraExposureControl::ExposureParameter 参数 , bool * continuous ) const = 0

信号

void actualValueChanged (int 参数 )
void parameterRangeChanged (int 参数 )
void requestedValueChanged (int 参数 )

保护函数

QCameraExposureControl (QObject * parent = nullptr)

QCameraExposureControl_iid

详细描述

The QCameraExposure class is the usual method of adjusting exposure related parameters when using camera functionality. This class provides a more complete but less easy to use interface, and also forms the interface to implement when writing a new implementation of QCamera 功能。

You can adjust a number of parameters that will affect images and video taken with the corresponding QCamera object - see the ExposureParameter 枚举。

The interface name of QCameraExposureControl is org.qt-project.qt.cameraexposurecontrol/5.0 作为定义在 QCameraExposureControl_iid .

另请参阅 QCameraExposure and QCamera .

成员类型文档编制

enum QCameraExposureControl:: ExposureParameter

常量 描述
QCameraExposureControl::ISO 0 Camera ISO sensitivity, specified as integer value.
QCameraExposureControl::Aperture 1 Lens aperture is specified as an qreal F number. The supported apertures list can change depending on the focal length, in such a case the exposureParameterRangeChanged() signal is emitted.
QCameraExposureControl::ShutterSpeed 2 Shutter speed in seconds, specified as qreal.
QCameraExposureControl::ExposureCompensation 3 Exposure compensation, specified as qreal EV value.
QCameraExposureControl::FlashPower 4 Manual flash power, specified as qreal value. Accepted power range is [0..1.0], with 0 value means no flash and 1.0 corresponds to full flash power.

此值仅使用于 手动闪光模式 .

常量 描述
QCameraExposureControl::TorchPower 6 Manual torch power, specified as qreal value. Accepted power range is [0..1.0], with 0 value means no light and 1.0 corresponds to full torch power.

此值仅使用于 手电筒闪光模式 .

常量 描述
QCameraExposureControl::FlashCompensation 5 Flash compensation, specified as qreal EV value.
QCameraExposureControl::SpotMeteringPoint 7 The relative frame coordinate of the point to use for exposure metering in spot metering mode, specified as a QPointF .
QCameraExposureControl::ExposureMode 8 Camera exposure mode.
QCameraExposureControl::MeteringMode 9 Camera metering mode.
QCameraExposureControl::ExtendedExposureParameter 1000 The base value for platform specific extended parameters. For such parameters the sequential values starting from ExtendedExposureParameter should be used.

成员函数文档编制

[protected] QCameraExposureControl:: QCameraExposureControl ( QObject * parent = nullptr)

构造摄像头曝光控制对象采用 parent .

[signal] void QCameraExposureControl:: actualValueChanged ( int 参数 )

Signal emitted when the actual exposure 参数 value has changed, usually in result of auto exposure algorithms or manual exposure parameter applied.

该函数在 Qt 5.0 引入。

[signal] void QCameraExposureControl:: parameterRangeChanged ( int 参数 )

Signal emitted when the supported range of exposure 参数 values has changed.

该函数在 Qt 5.0 引入。

[signal] void QCameraExposureControl:: requestedValueChanged ( int 参数 )

Signal emitted when the requested exposure 参数 value has changed, usually in result of setValue () 调用。

该函数在 Qt 5.0 引入。

[虚拟] QCameraExposureControl:: ~QCameraExposureControl ()

Destroys the camera exposure control object.

[pure virtual] QVariant QCameraExposureControl:: actualValue ( QCameraExposureControl::ExposureParameter 参数 ) const

Returns the actual exposure 参数 value, or invalid QVariant() if the value is unknown or not supported.

The actual parameter value may differ for the requested one if automatic mode is selected or camera supports only limited set of values within the supported range.

该函数在 Qt 5.0 引入。

[pure virtual] bool QCameraExposureControl:: isParameterSupported ( QCameraExposureControl::ExposureParameter 参数 ) const

Returns true is exposure 参数 is supported by backend.

该函数在 Qt 5.0 引入。

[pure virtual] QVariant QCameraExposureControl:: requestedValue ( QCameraExposureControl::ExposureParameter 参数 ) const

Returns the requested exposure 参数 值。

该函数在 Qt 5.0 引入。

[pure virtual] bool QCameraExposureControl:: setValue ( QCameraExposureControl::ExposureParameter 参数 , const QVariant & value )

Set the exposure 参数 to value . If a null or invalid QVariant is passed, backend should choose the value automatically, and if possible report the actual value to user with QCameraExposureControl::actualValue ().

Returns true if parameter is supported and value is correct.

该函数在 Qt 5.0 引入。

[pure virtual] QVariantList QCameraExposureControl:: supportedParameterRange ( QCameraExposureControl::ExposureParameter 参数 , bool * continuous ) const

Returns the list of supported 参数 values;

If the camera supports arbitrary exposure parameter value within the supported range, * continuous 被设为 true,否则 * continuous 被设为 false。

该函数在 Qt 5.0 引入。

宏文档编制

QCameraExposureControl_iid

org.qt-project.qt.cameraexposurecontrol/5.0

定义接口名为 QCameraExposureControl 类。