Added ImageSettings::currentResolution and methods to find ImageResolution and set it
[harmattan/cameraplus] / declarative / plugin.h
1 // -*- c++ -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22
23 #ifndef PLUGIN_H
24 #define PLUGIN_H
25
26 #if defined(QT4)
27 #include <QDeclarativeExtensionPlugin>
28 #elif defined(QT5)
29 #include <QQmlExtensionPlugin>
30 #endif
31
32 #if defined(QT4)
33 class Plugin : public QDeclarativeExtensionPlugin {
34 #elif defined(QT5)
35 class Plugin : public QQmlExtensionPlugin {
36 #endif
37
38   Q_OBJECT
39
40 #if defined(QT5)
41   Q_PLUGIN_METADATA(IID "QtCamera");
42 #endif
43
44 public:
45   Plugin(QObject *parent = 0);
46   ~Plugin();
47
48 #if defined(QT4)
49   void initializeEngine(QDeclarativeEngine *engine, const char *uri);
50 #elif defined(QT5)
51   void initializeEngine(QQmlEngine *engine, const char *uri);
52 #endif
53
54   void registerTypes(const char *uri);
55 };
56
57 #endif /* PLUGIN_H */