QCameraExposure API refactoring
QCameraExposureControl: Separated requested from actual exposure values. Removed ParameterFlags, it's confusing and seldom used. Moved ExposureMode and MeteringMode to parameters. QCameraExposure: Added requestedAperture/ShutterSpeed/Iso getters Change-Id: I408586d85e6c9de0c8a711c32b3c90ea46052270 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
a9d78fbec9
commit
2db9b4b1c8
@@ -65,45 +65,30 @@ public:
|
||||
~QCameraExposureControl();
|
||||
|
||||
enum ExposureParameter {
|
||||
InvalidParameter = 0,
|
||||
ISO = 1,
|
||||
Aperture = 2,
|
||||
ShutterSpeed = 3,
|
||||
ExposureCompensation = 4,
|
||||
FlashPower = 5,
|
||||
FlashCompensation = 6,
|
||||
SpotMeteringPoint = 7,
|
||||
ISO,
|
||||
Aperture,
|
||||
ShutterSpeed,
|
||||
ExposureCompensation,
|
||||
FlashPower,
|
||||
FlashCompensation,
|
||||
TorchPower,
|
||||
SpotMeteringPoint,
|
||||
ExposureMode,
|
||||
MeteringMode,
|
||||
ExtendedExposureParameter = 1000
|
||||
};
|
||||
|
||||
enum ParameterFlag {
|
||||
AutomaticValue = 0x01,
|
||||
ReadOnly = 0x02,
|
||||
ContinuousRange = 0x04
|
||||
};
|
||||
Q_DECLARE_FLAGS(ParameterFlags, ParameterFlag)
|
||||
|
||||
virtual QCameraExposure::ExposureMode exposureMode() const = 0;
|
||||
virtual void setExposureMode(QCameraExposure::ExposureMode mode) = 0;
|
||||
virtual bool isExposureModeSupported(QCameraExposure::ExposureMode mode) const = 0;
|
||||
|
||||
virtual QCameraExposure::MeteringMode meteringMode() const = 0;
|
||||
virtual void setMeteringMode(QCameraExposure::MeteringMode mode) = 0;
|
||||
virtual bool isMeteringModeSupported(QCameraExposure::MeteringMode mode) const = 0;
|
||||
|
||||
virtual bool isParameterSupported(ExposureParameter parameter) const = 0;
|
||||
virtual QVariant exposureParameter(ExposureParameter parameter) const = 0;
|
||||
virtual ParameterFlags exposureParameterFlags(ExposureParameter parameter) const = 0;
|
||||
virtual QVariantList supportedParameterRange(ExposureParameter parameter) const = 0;
|
||||
virtual bool setExposureParameter(ExposureParameter parameter, const QVariant& value) = 0;
|
||||
virtual QVariantList supportedParameterRange(ExposureParameter parameter, bool *continuous) const = 0;
|
||||
|
||||
virtual QString extendedParameterName(ExposureParameter parameter) = 0;
|
||||
virtual QVariant requestedValue(ExposureParameter parameter) const = 0;
|
||||
virtual QVariant actualValue(ExposureParameter parameter) const = 0;
|
||||
virtual bool setValue(ExposureParameter parameter, const QVariant& value) = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
void flashReady(bool);
|
||||
|
||||
void exposureParameterChanged(int parameter);
|
||||
void exposureParameterRangeChanged(int parameter);
|
||||
void requestedValueChanged(int parameter);
|
||||
void actualValueChanged(int parameter);
|
||||
void parameterRangeChanged(int parameter);
|
||||
|
||||
protected:
|
||||
QCameraExposureControl(QObject* parent = 0);
|
||||
@@ -112,12 +97,12 @@ protected:
|
||||
#define QCameraExposureControl_iid "com.nokia.Qt.QCameraExposureControl/1.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QCameraExposureControl, QCameraExposureControl_iid)
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QCameraExposureControl::ParameterFlags)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Q_DECLARE_METATYPE(QCameraExposureControl::ExposureParameter)
|
||||
|
||||
Q_MEDIA_ENUM_DEBUG(QCameraExposureControl, ExposureParameter)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user