]> git.sesse.net Git - kdenlive/commitdiff
Moves VideoGLWidget into widgets folder.
authorJean-Nicolas Artaud <jeannicolasartaud@gmail.com>
Tue, 14 Jan 2014 23:23:22 +0000 (00:23 +0100)
committerJean-Nicolas Artaud <jeannicolasartaud@gmail.com>
Tue, 14 Jan 2014 23:23:22 +0000 (00:23 +0100)
src/CMakeLists.txt
src/monitor.h
src/videoglwidget.h [deleted file]
src/widgets/videoglwidget.cpp [moved from src/videoglwidget.cpp with 78% similarity]
src/widgets/videoglwidget.h [new file with mode: 0644]

index 7caa091b1dc93c0636535989786172c6d84676b2..ad661ad6bf46a7fc519647fd5e8eefa9971c14b7 100644 (file)
@@ -260,7 +260,7 @@ kde4_add_ui_files(kdenlive_UIS
 )
 
 if(OPENGL_FOUND)
-  list(APPEND kdenlive_SRCS videoglwidget.cpp)
+  list(APPEND kdenlive_SRCS widgets/videoglwidget.cpp)
 endif(OPENGL_FOUND)
 
 if(BUILD_JogShuttle)
index dde2828b06f7a8ee833c604de2c93cda13b15175..e65f2ec98469e30172eb9de3358a55e305d939dc 100644 (file)
@@ -27,7 +27,7 @@
 #include "timecodedisplay.h"
 #include "abstractmonitor.h"
 #ifdef USE_OPENGL
-#include "videoglwidget.h"
+#include "widgets/videoglwidget.h"
 #endif
 
 #include <QLabel>
diff --git a/src/videoglwidget.h b/src/videoglwidget.h
deleted file mode 100644 (file)
index 99e22e4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#ifndef VIDEOGLWIDGET_H
-#define VIDEOGLWIDGET_H
-
-#include <QGLWidget>
-
-class VideoGLWidget : public QGLWidget
-{
-    Q_OBJECT
-
-public:
-    explicit VideoGLWidget(QWidget *parent = 0);
-    ~VideoGLWidget();
-    void activateMonitor();
-    QSize minimumSizeHint() const;
-    QSize sizeHint() const;
-    void setImageAspectRatio(double ratio);
-    void setBackgroundColor(const QColor &color) {
-        m_backgroundColor = color;
-    }
-
-public slots:
-    void showImage(const QImage &image);
-
-protected:
-    void initializeGL();
-    void resizeGL(int width, int height);
-    void resizeEvent(QResizeEvent* event);
-    void paintGL();
-    void mouseDoubleClickEvent(QMouseEvent * event);
-
-private:
-    int x, y, w, h;
-    int m_image_width, m_image_height;
-    GLuint m_texture;
-    double m_display_ratio;
-    QColor m_backgroundColor;
-    Qt::WindowFlags m_baseFlags;
-};
-
-#endif
similarity index 78%
rename from src/videoglwidget.cpp
rename to src/widgets/videoglwidget.cpp
index 3da19948159ba2cb78ab9f571bfdb7e814c67f95..375f2d6b916a5a9b443ed3ab13fb8a9515219d33 100644 (file)
@@ -1,3 +1,22 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *               2014 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 <QtGui>
 #include <QtOpenGL>
@@ -6,7 +25,7 @@
 #else
 #include <GL/glu.h>
 #endif
-#include "videoglwidget.h"
+#include "widgets/videoglwidget.h"
 
 #ifndef GL_TEXTURE_RECTANGLE_EXT
 #define GL_TEXTURE_RECTANGLE_EXT GL_TEXTURE_RECTANGLE_NV
diff --git a/src/widgets/videoglwidget.h b/src/widgets/videoglwidget.h
new file mode 100644 (file)
index 0000000..de2304f
--- /dev/null
@@ -0,0 +1,60 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *               2014 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 VIDEOGLWIDGET_H
+#define VIDEOGLWIDGET_H
+
+#include <QGLWidget>
+
+class VideoGLWidget : public QGLWidget
+{
+    Q_OBJECT
+
+public:
+    explicit VideoGLWidget(QWidget *parent = 0);
+    ~VideoGLWidget();
+    void activateMonitor();
+    QSize minimumSizeHint() const;
+    QSize sizeHint() const;
+    void setImageAspectRatio(double ratio);
+    void setBackgroundColor(const QColor &color) {
+        m_backgroundColor = color;
+    }
+
+public slots:
+    void showImage(const QImage &image);
+
+protected:
+    void initializeGL();
+    void resizeGL(int width, int height);
+    void resizeEvent(QResizeEvent* event);
+    void paintGL();
+    void mouseDoubleClickEvent(QMouseEvent * event);
+
+private:
+    int x, y, w, h;
+    int m_image_width, m_image_height;
+    GLuint m_texture;
+    double m_display_ratio;
+    QColor m_backgroundColor;
+    Qt::WindowFlags m_baseFlags;
+};
+
+#endif