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
@@ -80,7 +80,7 @@ QDeclarativeTorch::QDeclarativeTorch(QObject *parent)
|
||||
m_flash = service ? service->requestControl<QCameraFlashControl*>() : 0;
|
||||
|
||||
if (m_exposure)
|
||||
connect(m_exposure, SIGNAL(exposureParameterChanged(int)), SLOT(parameterChanged(int)));
|
||||
connect(m_exposure, SIGNAL(valueChanged(int)), SLOT(parameterChanged(int)));
|
||||
|
||||
// XXX There's no signal for flash mode changed
|
||||
}
|
||||
@@ -153,7 +153,7 @@ int QDeclarativeTorch::power() const
|
||||
if (!m_exposure)
|
||||
return 0;
|
||||
|
||||
return m_exposure->exposureParameter(QCameraExposureControl::FlashPower).toInt();
|
||||
return m_exposure->requestedValue(QCameraExposureControl::TorchPower).toInt();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -166,10 +166,8 @@ void QDeclarativeTorch::setPower(int power)
|
||||
return;
|
||||
|
||||
power = qBound(0, power, 100);
|
||||
if (this->power() != power) {
|
||||
m_exposure->setExposureParameter(QCameraExposureControl::FlashPower, power);
|
||||
emit powerChanged();
|
||||
}
|
||||
if (this->power() != power)
|
||||
m_exposure->setValue(QCameraExposureControl::TorchPower, power);
|
||||
}
|
||||
|
||||
/* Check for changes in flash power */
|
||||
|
||||
Reference in New Issue
Block a user