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 <dmytro.poplavskiy@nokia.com>
This commit is contained in:
Michael Goddard
2012-01-06 15:21:38 +10:00
committed by Qt by Nokia
parent c97f5f8c2e
commit 6b67a11032
11 changed files with 137 additions and 5 deletions

View File

@@ -235,6 +235,10 @@ void tst_QCamera::testSimpleCameraExposure()
cameraExposure->setMeteringMode(QCameraExposure::MeteringSpot);
QCOMPARE(cameraExposure->meteringMode(), QCameraExposure::MeteringMatrix);
QCOMPARE(cameraExposure->spotMeteringPoint(), QPointF());
cameraExposure->setSpotMeteringPoint(QPointF(0.5f, 0.5f));
QCOMPARE(cameraExposure->spotMeteringPoint(), QPointF());
QCOMPARE(cameraExposure->exposureCompensation(), 0.0);
cameraExposure->setExposureCompensation(2.0);
QCOMPARE(cameraExposure->exposureCompensation(), 0.0);
@@ -626,6 +630,15 @@ void tst_QCamera::testCameraExposure()
cameraExposure->setMeteringMode(QCameraExposure::MeteringSpot);
QCOMPARE(cameraExposure->meteringMode(), QCameraExposure::MeteringSpot);
cameraExposure->setSpotMeteringPoint(QPointF(0.5f, 0.25f));
QCOMPARE(cameraExposure->spotMeteringPoint(), QPointF(0.5f, 0.25f));
cameraExposure->setSpotMeteringPoint(QPointF(0.25f, 56.3f));
QCOMPARE(cameraExposure->spotMeteringPoint(), QPointF(0.5f, 0.25f));
cameraExposure->setSpotMeteringPoint(QPointF(0, 0));
QCOMPARE(cameraExposure->spotMeteringPoint(), QPointF(0, 0));
cameraExposure->setSpotMeteringPoint(QPointF(1, 1));
QCOMPARE(cameraExposure->spotMeteringPoint(), QPointF(1, 1));
QCOMPARE(cameraExposure->exposureCompensation(), 0.0);
cameraExposure->setExposureCompensation(2.0);
QCOMPARE(cameraExposure->exposureCompensation(), 2.0);