3 #include "qtcamaperture.h"
5 Aperture::Aperture(QObject *parent) :
11 Aperture::~Aperture() {
13 delete m_aperture; m_aperture = 0;
17 void Aperture::deviceChanged() {
19 delete m_aperture; m_aperture = 0;
22 if (m_cam->device()) {
23 m_aperture = new QtCamAperture(m_cam->device(), this);
24 QObject::connect(m_aperture, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
25 QObject::connect(m_aperture, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
26 QObject::connect(m_aperture, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
30 emit minimumChanged();
31 emit maximunmChanged();
34 unsigned int Aperture::value() {
35 return m_aperture ? m_aperture->value() : 0;
38 void Aperture::setValue(unsigned int val) {
40 m_aperture->setValue(val);
44 unsigned int Aperture::minimum() {
45 return m_aperture ? m_aperture->minimumValue() : 0;
48 unsigned int Aperture::maximum() {
49 return m_aperture ? m_aperture->maximumValue() : 0;