From: Mohammed Sameer Date: Sun, 9 Sep 2012 20:03:36 +0000 (+0300) Subject: Added a method to obtain the QtCamDevice from the mode X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=76ef574e1792ea34aeaafbd73c9d61f0fd38d89e;p=harmattan%2Fcameraplus Added a method to obtain the QtCamDevice from the mode --- diff --git a/lib/qtcammode.cpp b/lib/qtcammode.cpp index 30a8be2..9cc5721 100644 --- a/lib/qtcammode.cpp +++ b/lib/qtcammode.cpp @@ -182,3 +182,7 @@ void QtCamMode::setPreviewSize(const QSize& size) { void QtCamMode::setFileName(const QString& fileName) { d_ptr->doneHandler->fileName = fileName; } + +QtCamDevice *QtCamMode::device() const { + return d_ptr->dev->q_ptr; +} diff --git a/lib/qtcammode.h b/lib/qtcammode.h index e8a9e54..68407c6 100644 --- a/lib/qtcammode.h +++ b/lib/qtcammode.h @@ -10,6 +10,7 @@ class QtCamModePrivate; class QtCamDevicePrivate; class QSize; class QImage; +class QtCamDevice; class QtCamMode : public QObject { Q_OBJECT @@ -29,6 +30,8 @@ public: virtual void applySettings() = 0; + QtCamDevice *device() const; + public slots: void activate();