Added QML components for aperture, exposure, iso, noise reduction and flicker reduction
[harmattan/cameraplus] / lib / qtcamaperture.cpp
1 #include "qtcamaperture.h"
2 #include "qtcamcapability_p.h"
3
4 // TODO: hardcoded
5 #define APERTURE_MIN 0
6 #define APERTURE_MAX 255
7
8 QtCamAperture::QtCamAperture(QtCamDevice *dev, QObject *parent) :
9   QtCamCapability(new QtCamCapabilityPrivate(dev, QtCamCapability::Aperture, "aperture"),
10                   parent) {
11
12 }
13
14 QtCamAperture::~QtCamAperture() {
15
16 }
17
18 unsigned int QtCamAperture::value() {
19   unsigned int val = 0;
20
21   if (!d_ptr->uintValue(&val)) {
22     return 0;
23   }
24
25   return val;
26 }
27
28 bool QtCamAperture::setValue(unsigned int val) {
29   return d_ptr->setUintValue(val);
30 }
31
32 unsigned int QtCamAperture::minimumValue() {
33   return APERTURE_MIN;
34 }
35
36 unsigned int QtCamAperture::maximumValue() {
37   return APERTURE_MAX;
38 }