summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2012-02-07 13:52:21 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-07 09:04:23 +0100
commitd0595cbca486dede7fbbb0fb5208ed5cc313dd43 (patch)
treecd84174dceee1da24635d5f97b2c4ecb6aa47fac
parent96aa2e9af703d50f9f1ef8b3139aa2c1cde233cc (diff)
Updated declarative camera image processing with C++ API changes
Changed ranges and meaning of image adjustments parameters. Change-Id: I1710bfabc4f216c83df7983a871bffb474cfbcc2 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
-rw-r--r--src/imports/multimedia/qdeclarativecameraimageprocessing.cpp43
-rw-r--r--src/imports/multimedia/qdeclarativecameraimageprocessing_p.h40
2 files changed, 42 insertions, 41 deletions
diff --git a/src/imports/multimedia/qdeclarativecameraimageprocessing.cpp b/src/imports/multimedia/qdeclarativecameraimageprocessing.cpp
index 3880b486..96ab1a13 100644
--- a/src/imports/multimedia/qdeclarativecameraimageprocessing.cpp
+++ b/src/imports/multimedia/qdeclarativecameraimageprocessing.cpp
@@ -103,15 +103,16 @@ void QDeclarativeCameraImageProcessing::setWhiteBalanceMode(QDeclarativeCameraIm
\qmlproperty int CameraImageProcessing::manualWhiteBalance
The color temperature used when in manual white balance mode (WhiteBalanceManual).
+ The units are Kelvin.
\sa whiteBalanceMode
*/
-int QDeclarativeCameraImageProcessing::manualWhiteBalance() const
+qreal QDeclarativeCameraImageProcessing::manualWhiteBalance() const
{
return m_imageProcessing->manualWhiteBalance();
}
-void QDeclarativeCameraImageProcessing::setManualWhiteBalance(int colorTemp) const
+void QDeclarativeCameraImageProcessing::setManualWhiteBalance(qreal colorTemp) const
{
if (manualWhiteBalance() != colorTemp) {
m_imageProcessing->setManualWhiteBalance(colorTemp);
@@ -122,15 +123,15 @@ void QDeclarativeCameraImageProcessing::setManualWhiteBalance(int colorTemp) con
/*!
\qmlproperty int CameraImageProcessing::contrast
- Image contrast.
- Valid contrast values range between -100 and 100, the default is 0.
+ Image contrast adjustment.
+ Valid contrast adjustment values range between -1.0 and 1.0, with a default of 0.
*/
-int QDeclarativeCameraImageProcessing::contrast() const
+qreal QDeclarativeCameraImageProcessing::contrast() const
{
return m_imageProcessing->contrast();
}
-void QDeclarativeCameraImageProcessing::setContrast(int value)
+void QDeclarativeCameraImageProcessing::setContrast(qreal value)
{
if (value != contrast()) {
m_imageProcessing->setContrast(value);
@@ -141,15 +142,15 @@ void QDeclarativeCameraImageProcessing::setContrast(int value)
/*!
\qmlproperty int CameraImageProcessing::saturation
- Image saturation.
- Valid saturation values range between -100 and 100, the default is 0.
+ Image saturation adjustment.
+ Valid saturation adjustment values range between -1.0 and 1.0, the default is 0.
*/
-int QDeclarativeCameraImageProcessing::saturation() const
+qreal QDeclarativeCameraImageProcessing::saturation() const
{
return m_imageProcessing->saturation();
}
-void QDeclarativeCameraImageProcessing::setSaturation(int value)
+void QDeclarativeCameraImageProcessing::setSaturation(qreal value)
{
if (value != saturation()) {
m_imageProcessing->setSaturation(value);
@@ -160,17 +161,17 @@ void QDeclarativeCameraImageProcessing::setSaturation(int value)
/*!
\qmlproperty int CameraImageProcessing::sharpeningLevel
- Level of sharpening applied to image.
+ Adjustment of sharpening level applied to image.
- Valid sharpening level values range between -1 for default sharpening level,
- 0 for sharpening disabled and 100 for maximum sharpening applied.
+ Valid sharpening level values range between -1.0 for for sharpening disabled,
+ 0 for default sharpening level and 1.0 for maximum sharpening applied.
*/
-int QDeclarativeCameraImageProcessing::sharpeningLevel() const
+qreal QDeclarativeCameraImageProcessing::sharpeningLevel() const
{
return m_imageProcessing->sharpeningLevel();
}
-void QDeclarativeCameraImageProcessing::setSharpeningLevel(int value)
+void QDeclarativeCameraImageProcessing::setSharpeningLevel(qreal value)
{
if (value != sharpeningLevel()) {
m_imageProcessing->setSharpeningLevel(value);
@@ -181,17 +182,17 @@ void QDeclarativeCameraImageProcessing::setSharpeningLevel(int value)
/*!
\qmlproperty int CameraImageProcessing::denoisingLevel
- Level of denoising applied to image.
+ Adjustment of denoising applied to image.
- Valid denoising level values range between -1 for default denoising level,
- 0 for denoising disabled and 100 for maximum denoising applied.
+ Valid denoising level values range between -1.0 for for denoising disabled,
+ 0 for default denoising level and 1.0 for maximum denoising applied.
*/
-int QDeclarativeCameraImageProcessing::denoisingLevel() const
+qreal QDeclarativeCameraImageProcessing::denoisingLevel() const
{
return m_imageProcessing->denoisingLevel();
}
-void QDeclarativeCameraImageProcessing::setDenoisingLevel(int value)
+void QDeclarativeCameraImageProcessing::setDenoisingLevel(qreal value)
{
if (value != denoisingLevel()) {
m_imageProcessing->setDenoisingLevel(value);
@@ -204,7 +205,7 @@ void QDeclarativeCameraImageProcessing::setDenoisingLevel(int value)
*/
/*!
- \qmlsignal Camera::manualWhiteBalanceChanged(int)
+ \qmlsignal Camera::manualWhiteBalanceChanged(qreal)
*/
QT_END_NAMESPACE
diff --git a/src/imports/multimedia/qdeclarativecameraimageprocessing_p.h b/src/imports/multimedia/qdeclarativecameraimageprocessing_p.h
index 5490adea..0f6b6223 100644
--- a/src/imports/multimedia/qdeclarativecameraimageprocessing_p.h
+++ b/src/imports/multimedia/qdeclarativecameraimageprocessing_p.h
@@ -68,11 +68,11 @@ class QDeclarativeCameraImageProcessing : public QObject
Q_ENUMS(WhiteBalanceMode)
Q_PROPERTY(WhiteBalanceMode whiteBalanceMode READ whiteBalanceMode WRITE setWhiteBalanceMode NOTIFY whiteBalanceModeChanged)
- Q_PROPERTY(int manualWhiteBalance READ manualWhiteBalance WRITE setManualWhiteBalance NOTIFY manualWhiteBalanceChanged)
- Q_PROPERTY(int contrast READ contrast WRITE setContrast NOTIFY contrastChanged)
- Q_PROPERTY(int saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
- Q_PROPERTY(int sharpeningLevel READ sharpeningLevel WRITE setSharpeningLevel NOTIFY sharpeningLevelChanged)
- Q_PROPERTY(int denoisingLevel READ denoisingLevel WRITE setDenoisingLevel NOTIFY denoisingLevelChanged)
+ Q_PROPERTY(qreal manualWhiteBalance READ manualWhiteBalance WRITE setManualWhiteBalance NOTIFY manualWhiteBalanceChanged)
+ Q_PROPERTY(qreal contrast READ contrast WRITE setContrast NOTIFY contrastChanged)
+ Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
+ Q_PROPERTY(qreal sharpeningLevel READ sharpeningLevel WRITE setSharpeningLevel NOTIFY sharpeningLevelChanged)
+ Q_PROPERTY(qreal denoisingLevel READ denoisingLevel WRITE setDenoisingLevel NOTIFY denoisingLevelChanged)
public:
enum WhiteBalanceMode {
@@ -91,30 +91,30 @@ public:
~QDeclarativeCameraImageProcessing();
WhiteBalanceMode whiteBalanceMode() const;
- int manualWhiteBalance() const;
+ qreal manualWhiteBalance() const;
- int contrast() const;
- int saturation() const;
- int sharpeningLevel() const;
- int denoisingLevel() const;
+ qreal contrast() const;
+ qreal saturation() const;
+ qreal sharpeningLevel() const;
+ qreal denoisingLevel() const;
public Q_SLOTS:
void setWhiteBalanceMode(QDeclarativeCameraImageProcessing::WhiteBalanceMode mode) const;
- void setManualWhiteBalance(int colorTemp) const;
+ void setManualWhiteBalance(qreal colorTemp) const;
- void setContrast(int value);
- void setSaturation(int value);
- void setSharpeningLevel(int value);
- void setDenoisingLevel(int value);
+ void setContrast(qreal value);
+ void setSaturation(qreal value);
+ void setSharpeningLevel(qreal value);
+ void setDenoisingLevel(qreal value);
Q_SIGNALS:
void whiteBalanceModeChanged(QDeclarativeCameraImageProcessing::WhiteBalanceMode) const;
- void manualWhiteBalanceChanged(int) const;
+ void manualWhiteBalanceChanged(qreal) const;
- void contrastChanged(int);
- void saturationChanged(int);
- void sharpeningLevelChanged(int);
- void denoisingLevelChanged(int);
+ void contrastChanged(qreal);
+ void saturationChanged(qreal);
+ void sharpeningLevelChanged(qreal);
+ void denoisingLevelChanged(qreal);
private:
friend class QDeclarativeCamera;