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
26 class VideoGLWidget : public QGLWidget
31 explicit VideoGLWidget(QWidget *parent = 0, QGLWidget *share = 0);
33 void activateMonitor();
34 QSize minimumSizeHint() const;
35 QSize sizeHint() const;
36 void setImageAspectRatio(double ratio);
37 void setBackgroundColor(const QColor &color) {
38 m_backgroundColor = color;
42 void showImage(const QImage &image);
43 void showImage(GLuint);
47 void resizeGL(int width, int height);
48 void resizeEvent(QResizeEvent* event);
50 void mouseDoubleClickEvent(QMouseEvent * event);
54 int m_image_width, m_image_height;
55 GLuint m_texture, m_other_texture;
56 double m_display_ratio;
57 QColor m_backgroundColor;
58 Qt::WindowFlags m_baseFlags;