Introduce the Capability base class for all capabilities.
It has only one property for now (isSupported).
Conflicts:
declarative/declarative.pro
declarative/plugin.cpp
26 files changed:
#include "qtcamaperture.h"
Aperture::Aperture(QtCamDevice *dev, QObject *parent) :
#include "qtcamaperture.h"
Aperture::Aperture(QtCamDevice *dev, QObject *parent) :
m_aperture(new QtCamAperture(dev, this)) {
m_aperture(new QtCamAperture(dev, this)) {
+ setCapability(m_aperture);
+
QObject::connect(m_aperture, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_aperture, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_aperture, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
QObject::connect(m_aperture, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_aperture, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_aperture, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
#ifndef APERTURE_H
#define APERTURE_H
#ifndef APERTURE_H
#define APERTURE_H
class QtCamAperture;
class QtCamDevice;
class QtCamAperture;
class QtCamDevice;
-class Aperture : public QObject {
+class Aperture : public Capability {
Q_OBJECT
Q_PROPERTY(unsigned int value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(unsigned int value READ value WRITE setValue NOTIFY valueChanged);
#include "colortone.h"
ColorTone::ColorTone(QtCamDevice *dev, QObject *parent) :
#include "colortone.h"
ColorTone::ColorTone(QtCamDevice *dev, QObject *parent) :
m_color(new QtCamColorTone(dev, this)) {
m_color(new QtCamColorTone(dev, this)) {
+ setCapability(m_color);
+
QObject::connect(m_color, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
QObject::connect(m_color, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
#ifndef COLOR_TONE_H
#define COLOR_TONE_H
#ifndef COLOR_TONE_H
#define COLOR_TONE_H
#include "qtcamcolortone.h"
class QtCamDevice;
#include "qtcamcolortone.h"
class QtCamDevice;
-class ColorTone : public QObject {
+class ColorTone : public Capability {
Q_OBJECT
Q_PROPERTY(ColorToneMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(ColorToneMode value READ value WRITE setValue NOTIFY valueChanged);
flickerreduction.h videomute.h metadata.h imagesettings.h \
imageresolutionmodel.h videosettings.h videoresolutionmodel.h \
notificationscontainer.h sounds.h focus.h autofocus.h \
flickerreduction.h videomute.h metadata.h imagesettings.h \
imageresolutionmodel.h videosettings.h videoresolutionmodel.h \
notificationscontainer.h sounds.h focus.h autofocus.h \
- roi.h cameraconfig.h videoplayer.h viewfinder.h
+ roi.h cameraconfig.h videoplayer.h viewfinder.h capability.h
SOURCES += plugin.cpp previewprovider.cpp camera.cpp mode.cpp imagemode.cpp videomode.cpp \
zoom.cpp flash.cpp scene.cpp evcomp.cpp videotorch.cpp whitebalance.cpp \
SOURCES += plugin.cpp previewprovider.cpp camera.cpp mode.cpp imagemode.cpp videomode.cpp \
zoom.cpp flash.cpp scene.cpp evcomp.cpp videotorch.cpp whitebalance.cpp \
flickerreduction.cpp videomute.cpp metadata.cpp imagesettings.cpp \
imageresolutionmodel.cpp videosettings.cpp videoresolutionmodel.cpp \
notificationscontainer.cpp sounds.cpp focus.cpp autofocus.cpp \
flickerreduction.cpp videomute.cpp metadata.cpp imagesettings.cpp \
imageresolutionmodel.cpp videosettings.cpp videoresolutionmodel.cpp \
notificationscontainer.cpp sounds.cpp focus.cpp autofocus.cpp \
- roi.cpp cameraconfig.cpp videoplayer.cpp viewfinder.cpp
+ roi.cpp cameraconfig.cpp videoplayer.cpp viewfinder.cpp capability.cpp
PLUGIN_IMPORT_PATH = QtCamera
target.path = $$[QT_INSTALL_IMPORTS]/$$PLUGIN_IMPORT_PATH
PLUGIN_IMPORT_PATH = QtCamera
target.path = $$[QT_INSTALL_IMPORTS]/$$PLUGIN_IMPORT_PATH
#include "qtcamevcomp.h"
EvComp::EvComp(QtCamDevice *dev, QObject *parent) :
#include "qtcamevcomp.h"
EvComp::EvComp(QtCamDevice *dev, QObject *parent) :
m_evComp(new QtCamEvComp(dev, this)) {
m_evComp(new QtCamEvComp(dev, this)) {
+ setCapability(m_evComp);
+
QObject::connect(m_evComp, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_evComp, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_evComp, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
QObject::connect(m_evComp, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_evComp, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_evComp, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
#ifndef EV_COMP_H
#define EV_COMP_H
#ifndef EV_COMP_H
#define EV_COMP_H
class QtCamEvComp;
class QtCamDevice;
class QtCamEvComp;
class QtCamDevice;
-class EvComp : public QObject {
+class EvComp : public Capability {
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged);
#include "qtcamexposure.h"
Exposure::Exposure(QtCamDevice *dev, QObject *parent) :
#include "qtcamexposure.h"
Exposure::Exposure(QtCamDevice *dev, QObject *parent) :
m_exposure(new QtCamExposure(dev, this)) {
m_exposure(new QtCamExposure(dev, this)) {
+ setCapability(m_exposure);
+
QObject::connect(m_exposure, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_exposure, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_exposure, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
QObject::connect(m_exposure, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_exposure, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_exposure, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
#ifndef EXPOSURE_H
#define EXPOSURE_H
#ifndef EXPOSURE_H
#define EXPOSURE_H
class QtCamExposure;
class QtCamDevice;
class QtCamExposure;
class QtCamDevice;
-class Exposure : public QObject {
+class Exposure : public Capability {
Q_OBJECT
Q_PROPERTY(unsigned int value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(unsigned int value READ value WRITE setValue NOTIFY valueChanged);
#include "flash.h"
Flash::Flash(QtCamDevice *dev, QObject *parent) :
#include "flash.h"
Flash::Flash(QtCamDevice *dev, QObject *parent) :
m_flash(new QtCamFlash(dev, this)) {
m_flash(new QtCamFlash(dev, this)) {
+ setCapability(m_flash);
+
QObject::connect(m_flash, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_flash, SIGNAL(flashReadyChanged()), this, SIGNAL(readyChanged()));
}
QObject::connect(m_flash, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_flash, SIGNAL(flashReadyChanged()), this, SIGNAL(readyChanged()));
}
#ifndef FLASH_H
#define FLASH_H
#ifndef FLASH_H
#define FLASH_H
#include "qtcamflash.h"
class QtCamDevice;
#include "qtcamflash.h"
class QtCamDevice;
-class Flash : public QObject {
+class Flash : public Capability {
Q_OBJECT
Q_PROPERTY(FlashMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(FlashMode value READ value WRITE setValue NOTIFY valueChanged);
#include "flickerreduction.h"
FlickerReduction::FlickerReduction(QtCamDevice *dev, QObject *parent) :
#include "flickerreduction.h"
FlickerReduction::FlickerReduction(QtCamDevice *dev, QObject *parent) :
m_fr(new QtCamFlickerReduction(dev, this)) {
m_fr(new QtCamFlickerReduction(dev, this)) {
QObject::connect(m_fr, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
QObject::connect(m_fr, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
#ifndef FLICKER_REDUCTION_H
#define FLICKER_REDUCTION_H
#ifndef FLICKER_REDUCTION_H
#define FLICKER_REDUCTION_H
#include "qtcamflickerreduction.h"
class QtCamDevice;
#include "qtcamflickerreduction.h"
class QtCamDevice;
-class FlickerReduction : public QObject {
+class FlickerReduction : public Capability {
Q_OBJECT
Q_PROPERTY(FlickerReductionMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(FlickerReductionMode value READ value WRITE setValue NOTIFY valueChanged);
#include "focus.h"
Focus::Focus(QtCamDevice *dev, QObject *parent) :
#include "focus.h"
Focus::Focus(QtCamDevice *dev, QObject *parent) :
m_f(new QtCamFocus(dev, this)) {
m_f(new QtCamFocus(dev, this)) {
QObject::connect(m_f, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
QObject::connect(m_f, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
#ifndef FOCUS_H
#define FOCUS_H
#ifndef FOCUS_H
#define FOCUS_H
#include "qtcamfocus.h"
class QtCamDevice;
#include "qtcamfocus.h"
class QtCamDevice;
-class Focus : public QObject {
+class Focus : public Capability {
Q_OBJECT
Q_PROPERTY(FocusMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(FocusMode value READ value WRITE setValue NOTIFY valueChanged);
#include "qtcamiso.h"
Iso::Iso(QtCamDevice *dev, QObject *parent) :
#include "qtcamiso.h"
Iso::Iso(QtCamDevice *dev, QObject *parent) :
m_iso(new QtCamIso(dev, this)) {
m_iso(new QtCamIso(dev, this)) {
+ setCapability(m_iso);
+
QObject::connect(m_iso, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_iso, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_iso, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
QObject::connect(m_iso, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_iso, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_iso, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
#ifndef ISO_H
#define ISO_H
#ifndef ISO_H
#define ISO_H
class QtCamIso;
class QtCamDevice;
class QtCamIso;
class QtCamDevice;
-class Iso : public QObject {
+class Iso : public Capability {
Q_OBJECT
Q_PROPERTY(unsigned int value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(unsigned int value READ value WRITE setValue NOTIFY valueChanged);
#include "noisereduction.h"
NoiseReduction::NoiseReduction(QtCamDevice *dev, QObject *parent) :
#include "noisereduction.h"
NoiseReduction::NoiseReduction(QtCamDevice *dev, QObject *parent) :
m_nr(new QtCamNoiseReduction(dev, this)) {
m_nr(new QtCamNoiseReduction(dev, this)) {
QObject::connect(m_nr, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
QObject::connect(m_nr, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
#ifndef NOISE_REDUCTION_H
#define NOISE_REDUCTION_H
#ifndef NOISE_REDUCTION_H
#define NOISE_REDUCTION_H
#include "qtcamnoisereduction.h"
class QtCamDevice;
#include "qtcamnoisereduction.h"
class QtCamDevice;
-class NoiseReduction : public QObject {
+class NoiseReduction : public Capability {
Q_OBJECT
Q_PROPERTY(NoiseReductionMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(NoiseReductionMode value READ value WRITE setValue NOTIFY valueChanged);
#include "cameraconfig.h"
#include "videoplayer.h"
#include "viewfinder.h"
#include "cameraconfig.h"
#include "videoplayer.h"
#include "viewfinder.h"
#if defined(QT4)
#include <QDeclarativeEngine>
#elif defined(QT5)
#if defined(QT4)
#include <QDeclarativeEngine>
#elif defined(QT5)
qmlRegisterType<VideoPlayer>("QtCameraExtras", MAJOR, MINOR, "VideoPlayer");
qmlRegisterType<Viewfinder>(uri, MAJOR, MINOR, "Viewfinder");
qmlRegisterType<VideoPlayer>("QtCameraExtras", MAJOR, MINOR, "VideoPlayer");
qmlRegisterType<Viewfinder>(uri, MAJOR, MINOR, "Viewfinder");
+ qmlRegisterType<Capability>();
#include "scene.h"
Scene::Scene(QtCamDevice *dev, QObject *parent) :
#include "scene.h"
Scene::Scene(QtCamDevice *dev, QObject *parent) :
m_scene(new QtCamScene(dev, this)) {
m_scene(new QtCamScene(dev, this)) {
+ setCapability(m_scene);
+
QObject::connect(m_scene, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
QObject::connect(m_scene, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
#ifndef SCENE_H
#define SCENE_H
#ifndef SCENE_H
#define SCENE_H
#include "qtcamscene.h"
class QtCamDevice;
#include "qtcamscene.h"
class QtCamDevice;
-class Scene : public QObject {
+class Scene : public Capability {
Q_OBJECT
Q_PROPERTY(SceneMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(SceneMode value READ value WRITE setValue NOTIFY valueChanged);
#include "whitebalance.h"
WhiteBalance::WhiteBalance(QtCamDevice *dev, QObject *parent) :
#include "whitebalance.h"
WhiteBalance::WhiteBalance(QtCamDevice *dev, QObject *parent) :
m_wb(new QtCamWhiteBalance(dev, this)) {
m_wb(new QtCamWhiteBalance(dev, this)) {
QObject::connect(m_wb, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
QObject::connect(m_wb, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
}
#ifndef WHITE_BALANCE_H
#define WHITE_BALANCE_H
#ifndef WHITE_BALANCE_H
#define WHITE_BALANCE_H
#include "qtcamwhitebalance.h"
class QtCamDevice;
#include "qtcamwhitebalance.h"
class QtCamDevice;
-class WhiteBalance : public QObject {
+class WhiteBalance : public Capability {
Q_OBJECT
Q_PROPERTY(WhiteBalanceMode value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(WhiteBalanceMode value READ value WRITE setValue NOTIFY valueChanged);
#include "qtcamzoom.h"
Zoom::Zoom(QtCamDevice *dev, QObject *parent) :
#include "qtcamzoom.h"
Zoom::Zoom(QtCamDevice *dev, QObject *parent) :
m_zoom(new QtCamZoom(dev, this)) {
m_zoom(new QtCamZoom(dev, this)) {
+ setCapability(m_zoom);
+
QObject::connect(m_zoom, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_zoom, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_zoom, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
QObject::connect(m_zoom, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
QObject::connect(m_zoom, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
QObject::connect(m_zoom, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
#ifndef ZOOM_H
#define ZOOM_H
#ifndef ZOOM_H
#define ZOOM_H
class QtCamZoom;
class QtCamDevice;
class QtCamZoom;
class QtCamDevice;
-class Zoom : public QObject {
+class Zoom : public Capability {
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged);
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged);