populate post capture model when page is current and clear it when we leave
[harmattan/cameraplus] / lib / qtcamviewfinderrenderer.h
index 4415862..a172d5b 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 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
 
 #include <QObject>
 #include <gst/gst.h>
+#include <QRectF>
 
 class QtCamConfig;
 class QMetaObject;
-class QPainter;
+class QMatrix4x4;
 class QSizeF;
 
 class QtCamViewfinderRenderer : public QObject {
@@ -40,16 +41,23 @@ public:
 
   virtual ~QtCamViewfinderRenderer();
 
-  virtual void paint(QPainter *painter) = 0;
+  virtual void paint(const QMatrix4x4& matrix, const QRectF& viewport) = 0;
   virtual void resize(const QSizeF& size) = 0;
   virtual void reset() = 0;
   virtual GstElement *sinkElement() = 0;
 
+  virtual QRectF renderArea() = 0;
+  virtual QSizeF videoResolution() = 0;
+
+  virtual bool needsNativePainting() = 0;
+
 protected:
   QtCamViewfinderRenderer(QtCamConfig *config, QObject *parent = 0);
 
 signals:
   void updateRequested();
+  void renderAreaChanged();
+  void videoResolutionChanged();
 };
 
 #define QT_CAM_VIEWFINDER_RENDERER(key, klass) \