Implemented QtCamFlickerReduction
[harmattan/cameraplus] / imports / plugin.cpp
1 #include "plugin.h"
2 #include "imagemode.h"
3 #include "videomode.h"
4 #include "camera.h"
5 #include "previewprovider.h"
6 #include "capability.h"
7 #include "zoom.h"
8 #include "flash.h"
9 #include "scene.h"
10 #include "evcomp.h"
11 #include "videotorch.h"
12 #include "whitebalance.h"
13 #include "colortone.h"
14
15 #include <QtDeclarative>
16
17 #define URI "QtCamera"
18 #define MAJOR 1
19 #define MINOR 0
20
21 void Plugin::registerTypes(QDeclarativeEngine *engine) {
22   qmlRegisterType<Camera>(URI, MAJOR, MINOR, "Camera");
23   qmlRegisterType<ImageMode>(URI, MAJOR, MINOR, "ImageMode");
24   qmlRegisterType<VideoMode>(URI, MAJOR, MINOR, "VideoMode");
25   qmlRegisterType<Zoom>(URI, MAJOR, MINOR, "Zoom");
26   qmlRegisterType<Flash>(URI, MAJOR, MINOR, "Flash");
27   qmlRegisterType<Scene>(URI, MAJOR, MINOR, "Scene");
28   qmlRegisterType<EvComp>(URI, MAJOR, MINOR, "EvComp");
29   qmlRegisterType<VideoTorch>(URI, MAJOR, MINOR, "VideoTorch");
30   qmlRegisterType<WhiteBalance>(URI, MAJOR, MINOR, "WhiteBalance");
31   qmlRegisterType<ColorTone>(URI, MAJOR, MINOR, "ColorTone");
32   qmlRegisterType<Mode>();
33   qmlRegisterType<Capability>();
34
35   engine->addImageProvider("preview", new PreviewProvider);
36 }