Also move constructor and distructor implementation to the header file.
#include "qtcamvideomode.h"
#include "qtcamgraphicsviewfinder.h"
#include "qtcamconfig.h"
-#include "notifications.h"
+#include "declarativeqtcameranotifications.h"
#include "notificationscontainer.h"
#include "sounds.h"
#include <QDeclarativeInfo>
return m_cam->config()->videoSuffix();
}
-Notifications *Camera::notifications() const {
+DeclarativeQtCameraNotifications *Camera::notifications() const {
return m_notifications->notifications();
}
-void Camera::setNotifications(Notifications *notifications) {
+void Camera::setNotifications(DeclarativeQtCameraNotifications *notifications) {
if (m_notifications->setNotifications(notifications)) {
if (Sounds *s = dynamic_cast<Sounds *>(notifications)) {
class QtCamera;
class QtCamDevice;
class QtCamGraphicsViewfinder;
-class Notifications;
+class DeclarativeQtCameraNotifications;
class NotificationsContainer;
class Zoom;
class Flash;
Q_PROPERTY(bool running READ isRunning NOTIFY runningStateChanged);
Q_PROPERTY(QString imageSuffix READ imageSuffix CONSTANT);
Q_PROPERTY(QString videoSuffix READ videoSuffix CONSTANT);
- Q_PROPERTY(Notifications *notifications READ notifications WRITE setNotifications NOTIFY notificationsChanged);
+ Q_PROPERTY(DeclarativeQtCameraNotifications *notifications READ notifications WRITE setNotifications NOTIFY notificationsChanged);
Q_PROPERTY(QRectF renderArea READ renderArea NOTIFY renderAreaChanged);
Q_PROPERTY(QSizeF videoResolution READ videoResolution NOTIFY videoResolutionChanged);
QString imageSuffix() const;
QString videoSuffix() const;
- Notifications *notifications() const;
- void setNotifications(Notifications *notifications);
+ DeclarativeQtCameraNotifications *notifications() const;
+ void setNotifications(DeclarativeQtCameraNotifications *notifications);
Zoom *zoom() const;
Flash *flash() const;
colortone.h exposure.h aperture.h iso.h noisereduction.h \
flickerreduction.h videomute.h metadata.h imagesettings.h \
imageresolutionmodel.h videosettings.h videoresolutionmodel.h \
- notifications.h notificationscontainer.h sounds.h focus.h autofocus.h \
+ notificationscontainer.h sounds.h focus.h autofocus.h \
roi.h
SOURCES += plugin.cpp previewprovider.cpp camera.cpp mode.cpp imagemode.cpp videomode.cpp \
colortone.cpp exposure.cpp aperture.cpp iso.cpp noisereduction.cpp \
flickerreduction.cpp videomute.cpp metadata.cpp imagesettings.cpp \
imageresolutionmodel.cpp videosettings.cpp videoresolutionmodel.cpp \
- notifications.cpp notificationscontainer.cpp sounds.cpp focus.cpp autofocus.cpp \
+ notificationscontainer.cpp sounds.cpp focus.cpp autofocus.cpp \
roi.cpp
+
+HEADERS += declarativeqtcameranotifications.h
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef NOTIFICATIONS_H
-#define NOTIFICATIONS_H
+#ifndef DECLARATIVE_QT_CAMERA_NOTIFICATIONS_H
+#define DECLARATIVE_QT_CAMERA_NOTIFICATIONS_H
#include <QObject>
-class Notifications {
+class DeclarativeQtCameraNotifications {
public:
- Notifications();
- virtual ~Notifications();
+ DeclarativeQtCameraNotifications() {}
+ virtual ~DeclarativeQtCameraNotifications() {}
virtual void imageCaptureStarted() = 0;
virtual void imageCaptureEnded() = 0;
virtual void videoRecordingEnded() = 0;
virtual void autoFocusAcquired() = 0;
};
-Q_DECLARE_INTERFACE(Notifications, "org.foolab.qml.CameraPlus/1.0");
+Q_DECLARE_INTERFACE(DeclarativeQtCameraNotifications, "org.foolab.qml.CameraPlus.Notifications/1.0");
-#endif /* NOTIFICATIONS_H */
+#endif /* DECLARATIVE_QT_CAMERA_NOTIFICATIONS_H */
+++ /dev/null
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "notifications.h"
-
-Notifications::Notifications() {
-
-}
-
-Notifications::~Notifications() {
-
-}
#include "notificationscontainer.h"
#include "qtcamdevice.h"
#include "qtcamnotifications.h"
-#include "notifications.h"
+#include "declarativeqtcameranotifications.h"
NotificationsContainer::NotificationsContainer(QObject *parent) :
QObject(parent), m_dev(0), m_notifications(0) {
}
}
-Notifications *NotificationsContainer::notifications() const {
+DeclarativeQtCameraNotifications *NotificationsContainer::notifications() const {
return m_notifications;
}
-bool NotificationsContainer::setNotifications(Notifications *notifications) {
+bool NotificationsContainer::setNotifications(DeclarativeQtCameraNotifications *notifications) {
QMutexLocker lock(&m_mutex);
if (m_notifications != notifications) {
#include <QMutex>
class QtCamDevice;
-class Notifications;
+class DeclarativeQtCameraNotifications;
class NotificationsContainer : public QObject {
Q_OBJECT
~NotificationsContainer();
void setDevice(QtCamDevice *dev);
- Notifications *notifications() const;
- bool setNotifications(Notifications *notifications);
+ DeclarativeQtCameraNotifications *notifications() const;
+ bool setNotifications(DeclarativeQtCameraNotifications *notifications);
private slots:
void imageCaptureStarted();
private:
QPointer<QtCamDevice> m_dev;
- Notifications *m_notifications;
+ DeclarativeQtCameraNotifications *m_notifications;
QMutex m_mutex;
};
#include "imageresolutionmodel.h"
#include "videosettings.h"
#include "videoresolutionmodel.h"
-#include "notifications.h"
+#include "declarativeqtcameranotifications.h"
#include "sounds.h"
#include <QtDeclarative>
qmlRegisterType<ImageSettings>(uri, MAJOR, MINOR, "ImageSettings");
qmlRegisterType<VideoSettings>(uri, MAJOR, MINOR, "VideoSettings");
qmlRegisterType<Sounds>(uri, MAJOR, MINOR, "Sounds");
- qmlRegisterInterface<Notifications>("Notifications");
+ qmlRegisterInterface<DeclarativeQtCameraNotifications>("DeclarativeQtCameraNotifications");
qmlRegisterUncreatableType<ImageResolutionModel>(uri, MAJOR, MINOR, "ImageResolutionModel",
"ImageResolutionModel can be obtained from ImageSettings");
#define SOUNDS_H
#include <QObject>
-#include "notifications.h"
+#include "declarativeqtcameranotifications.h"
#include <canberra.h>
class QtCamConfig;
class QDBusServiceWatcher;
-class Sounds : public QObject, public Notifications {
+class Sounds : public QObject, public DeclarativeQtCameraNotifications {
Q_OBJECT
- Q_INTERFACES(Notifications);
+ Q_INTERFACES(DeclarativeQtCameraNotifications);
Q_PROPERTY(bool mute READ isMuted WRITE setMuted NOTIFY muteChanged);