Added a method to obtain the QtCamDevice from the mode
authorMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 20:03:36 +0000 (23:03 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 23:01:31 +0000 (02:01 +0300)
lib/qtcammode.cpp
lib/qtcammode.h

index 30a8be2..9cc5721 100644 (file)
@@ -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;
+}
index e8a9e54..68407c6 100644 (file)
@@ -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();