From 6b67a11032779ff3a7a78a57e8d2bb2cd8b7e525 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Fri, 6 Jan 2012 15:21:38 +1000 Subject: Add the spot for spot metering mode. Not yet fully documented in QML - needs a bit of an overhaul first. Change-Id: Ic11684858fb872d0b4dcedf60b390571371db252 Reviewed-by: Dmytro Poplavskiy --- src/multimedia/camera/qcameraexposure.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/multimedia/camera/qcameraexposure.cpp') diff --git a/src/multimedia/camera/qcameraexposure.cpp b/src/multimedia/camera/qcameraexposure.cpp index 5c75ad9e2..a618fa317 100644 --- a/src/multimedia/camera/qcameraexposure.cpp +++ b/src/multimedia/camera/qcameraexposure.cpp @@ -311,6 +311,33 @@ void QCameraExposure::setMeteringMode(QCameraExposure::MeteringMode mode) d_func()->exposureControl->setMeteringMode(mode); } +/*! + \property QCameraExposure::spotMeteringPoint + + When supported, this property 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. + \since 1.1 + */ + +QPointF QCameraExposure::spotMeteringPoint() const +{ + return d_func()->exposureControl ? d_func()->exposureControl->exposureParameter(QCameraExposureControl::SpotMeteringPoint).toPointF() : QPointF(); +} + +void QCameraExposure::setSpotMeteringPoint(const QPointF &point) +{ + if (d_func()->exposureControl) + d_func()->exposureControl->setExposureParameter(QCameraExposureControl::SpotMeteringPoint, point); +} + + /*! Returns true if the metering \a mode is supported. \since 1.1 -- cgit v1.2.3