Implemented QtCamEvComp and QtCamVideoTorch
[harmattan/cameraplus] / lib / qtcamevcomp.cpp
1 #include "qtcamevcomp.h"
2 #include "qtcamcapability_p.h"
3
4 #define EV_COMP_MIN -2.5
5 #define EV_COMP_MAX +2.5
6
7 QtCamEvComp::QtCamEvComp(QtCamDevice *dev, QObject *parent) :
8   QtCamCapability(new QtCamCapabilityPrivate(dev, QtCamCapability::EvComp, "ev-compensation"),
9                   parent) {
10
11 }
12
13 QtCamEvComp::~QtCamEvComp() {
14
15 }
16
17 qreal QtCamEvComp::value() {
18   qreal val = 0.0;
19
20   if (!d_ptr->floatValue(&val)) {
21     return 0.0;
22   }
23
24   return val;
25 }
26
27 bool QtCamEvComp::setValue(qreal val) {
28   return d_ptr->setFloatValue(val);
29 }
30
31 qreal QtCamEvComp::minimumValue() {
32   return EV_COMP_MIN;
33 }
34
35 qreal QtCamEvComp::maximumValue() {
36   return EV_COMP_MAX;
37 }