]> git.sesse.net Git - kdenlive/blobdiff - src/abstractmonitor.h
Moves VideoSurface into widgets folder.
[kdenlive] / src / abstractmonitor.h
index db7ab3a5a241f8138eddcfff01ab0616efc53408..e81d6339d1ed29acaa4865bb4eb2bdb457aa7a4b 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef ABSTRACTMONITOR_H
 #define ABSTRACTMONITOR_H
 
-#include "definitions.h"
+#include <stdint.h>
 
 #include <QObject>
 #include <QVector>
 #include <QImage>
 #include <QFrame>
 
-#include <stdint.h>
+#include "definitions.h"
+#include "widgets/videosurface.h"
 
 class MonitorManager;
 class VideoContainer;
+class VideoSurface;
 
 class AbstractRender: public QObject
 {
@@ -41,7 +43,13 @@ Q_OBJECT public:
      *  @param name A unique identifier for this renderer
      *  @param winid The parent widget identifier (required for SDL display). Set to 0 for OpenGL rendering
      *  @param profile The MLT profile used for the renderer (default one will be used if empty). */
-    explicit AbstractRender(Kdenlive::MONITORID name, QWidget *parent = 0):QObject(parent), sendFrameForAnalysis(false), analyseAudio(false), m_name(name) {}
+    explicit AbstractRender(Kdenlive::MonitorId name, QWidget *parent = 0)
+        : QObject(parent),
+          sendFrameForAnalysis(false),
+          analyseAudio(false),
+          m_name(name)
+    {
+    }
 
     /** @brief Destroy the MLT Renderer. */
     virtual ~AbstractRender() {}
@@ -62,34 +70,18 @@ private:
     
 signals:
     /** @brief The renderer refreshed the current frame. */
-    void frameUpdated(QImage);
+    void frameUpdated(const QImage &);
 
     /** @brief This signal contains the audio of the current frame. */
-    void audioSamplesSignal(QVector<int16_t>,int,int,int);
-};
-
-
-
-class VideoSurface : public QWidget
-{
-    Q_OBJECT
-public:
-    VideoSurface(QWidget *parent = 0);
-    
-signals:
-    void refreshMonitor();
-
-protected:
-    virtual void paintEvent ( QPaintEvent * event );
+    void audioSamplesSignal(const QVector<int16_t>&,int,int,int);
 };
 
-
 class AbstractMonitor : public QWidget
 {
     Q_OBJECT
 public:
-    AbstractMonitor(Kdenlive::MONITORID id, MonitorManager *manager, QWidget *parent = 0);
-    Kdenlive::MONITORID id() {return m_id;}
+    AbstractMonitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *parent = 0);
+    Kdenlive::MonitorId id() {return m_id;}
     virtual ~AbstractMonitor();
     virtual AbstractRender *abstractRender() = 0;
     bool isActive() const;
@@ -107,7 +99,7 @@ public slots:
     virtual void slotSwitchFullScreen() = 0;
 
 protected:
-    Kdenlive::MONITORID m_id;
+    Kdenlive::MonitorId m_id;
     MonitorManager *m_monitorManager;
 };