]> git.sesse.net Git - kdenlive/commitdiff
Moves VideoSurface into widgets folder.
authorJean-Nicolas Artaud <jeannicolasartaud@gmail.com>
Tue, 14 Jan 2014 22:58:15 +0000 (23:58 +0100)
committerJean-Nicolas Artaud <jeannicolasartaud@gmail.com>
Tue, 14 Jan 2014 22:58:15 +0000 (23:58 +0100)
src/abstractmonitor.cpp
src/abstractmonitor.h
src/mltdevicecapture.cpp
src/monitor.cpp
src/recmonitor.cpp
src/widgets/CMakeLists.txt
src/widgets/videosurface.cpp [new file with mode: 0644]
src/widgets/videosurface.h [new file with mode: 0644]

index c4fa50e626d88883af09da68a889bc32709490df..dc9ccd646c9288e682965c9503d06871c63916cc 100644 (file)
@@ -160,24 +160,4 @@ void VideoContainer::switchFullScreen()
     }
 }
 
-VideoSurface::VideoSurface(QWidget* parent) :
-    QWidget(parent)
-{
-    // MonitorRefresh is used as container for the SDL display (it's window id is passed to SDL)
-    setAttribute(Qt::WA_PaintOnScreen);
-    setAttribute(Qt::WA_OpaquePaintEvent);
-    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-    setAttribute(Qt::WA_NoSystemBackground);
-    //setUpdatesEnabled(false);
-}
-
-void VideoSurface::paintEvent(QPaintEvent *event)
-{
-    Q_UNUSED(event)
-    //WARNING: This might trigger unnecessary refreshes from MLT's producer, but without this,
-    // as soon as monitor is covered by a popup menu or another window, image is corrupted.
-    emit refreshMonitor();
-}
-
-
 #include "abstractmonitor.moc"
index 6d222b16774e35253abdd5838c415642b1f945cf..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
 {
@@ -74,22 +76,6 @@ signals:
     void audioSamplesSignal(const 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 );
-};
-
-
 class AbstractMonitor : public QWidget
 {
     Q_OBJECT
index 53cea103aab8d002dd8aaf6bc6392509f5104671..c94f896dd2707840e243a43acfd3037407b0d7d7 100644 (file)
@@ -19,6 +19,7 @@
 #include "mltdevicecapture.h"
 #include "kdenlivesettings.h"
 #include "definitions.h"
+#include "widgets/videosurface.h"
 
 #include <mlt++/Mlt.h>
 
index 09487a96774f51cad8430324ba67e1f49b3e9c89..2b8cd627b7276942a20936f2e85647b526e3978d 100644 (file)
@@ -24,6 +24,7 @@
 #include "abstractclipitem.h"
 #include "monitorscene.h"
 #include "widgets/monitoreditwidget.h"
+#include "widgets/videosurface.h"
 #include "kdenlivesettings.h"
 
 #include <KDebug>
index e66a8f1572378476d6ca443285c4a25a2ef7b8ca..f54e678b17e4f869115834f9b8f5b6b0890fc3a4 100644 (file)
@@ -26,6 +26,7 @@
 #include "monitormanager.h"
 #include "monitor.h"
 #include "profilesdialog.h"
+#include "widgets/videosurface.h"
 
 #include <KDebug>
 #include <KLocalizedString>
index 2b3e574e8fb5f53654c74a17025805613b9ba2db..3a4abc2d389c25097d46674924af64b47a9ad694 100644 (file)
@@ -13,5 +13,6 @@ set(kdenlive_SRCS
   widgets/noteswidget.cpp
   widgets/renderwidget.cpp
   widgets/titlewidget.cpp
+  widgets/videosurface.cpp
   PARENT_SCOPE
 )
diff --git a/src/widgets/videosurface.cpp b/src/widgets/videosurface.cpp
new file mode 100644 (file)
index 0000000..e837986
--- /dev/null
@@ -0,0 +1,42 @@
+/***************************************************************************
+ *   Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *               2013 by Jean-Nicolas Artaud (jeannicolasartaud@gmail.com) *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program 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 General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
+ ***************************************************************************/
+
+#include "widgets/videosurface.h"
+
+
+VideoSurface::VideoSurface(QWidget* parent) :
+    QWidget(parent)
+{
+    // MonitorRefresh is used as container for the SDL display (it's window id is passed to SDL)
+    setAttribute(Qt::WA_PaintOnScreen);
+    setAttribute(Qt::WA_OpaquePaintEvent);
+    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+    setAttribute(Qt::WA_NoSystemBackground);
+    //setUpdatesEnabled(false);
+}
+
+void VideoSurface::paintEvent(QPaintEvent *event)
+{
+    Q_UNUSED(event)
+    //WARNING: This might trigger unnecessary refreshes from MLT's producer, but without this,
+    // as soon as monitor is covered by a popup menu or another window, image is corrupted.
+    emit refreshMonitor();
+}
+
diff --git a/src/widgets/videosurface.h b/src/widgets/videosurface.h
new file mode 100644 (file)
index 0000000..bcdcac9
--- /dev/null
@@ -0,0 +1,39 @@
+/***************************************************************************
+ *   Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *               2013 by Jean-Nicolas Artaud (jeannicolasartaud@gmail.com) *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program 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 General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
+ ***************************************************************************/
+
+#ifndef VIDEOSURFACE_H
+#define VIDEOSURFACE_H
+
+#include <QWidget>
+
+class VideoSurface : public QWidget
+{
+    Q_OBJECT
+public:
+    VideoSurface(QWidget *parent = 0);
+
+signals:
+    void refreshMonitor();
+
+protected:
+    virtual void paintEvent ( QPaintEvent * event );
+};
+
+#endif // VIDEOSURFACE_H