1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
3 * 2014 by Jean-Nicolas Artaud (jeannicolasartaud@gmail.com) *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
21 #ifndef VIDEOGLWIDGET_H
22 #define VIDEOGLWIDGET_H
30 class VideoGLWidget : public QGLWidget
35 explicit VideoGLWidget(QWidget *parent = 0, QGLWidget *share = 0);
37 void activateMonitor();
38 QSize minimumSizeHint() const;
39 QSize sizeHint() const;
40 void setImageAspectRatio(double ratio);
41 void setBackgroundColor(const QColor &color) {
42 m_backgroundColor = color;
46 void showImage(const QImage &image);
47 void showImage(Mlt::Frame*, GLuint);
51 void resizeGL(int width, int height);
52 void resizeEvent(QResizeEvent* event);
54 void mouseDoubleClickEvent(QMouseEvent * event);
58 int m_image_width, m_image_height;
61 GLuint m_frame_texture;
62 double m_display_ratio;
63 QColor m_backgroundColor;
64 Qt::WindowFlags m_baseFlags;