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