Olive
viewerwindow.h
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef VIEWERWINDOW_H
22 #define VIEWERWINDOW_H
23 
24 #include <QOpenGLWidget>
25 #include <QTimer>
26 
27 class QMutex;
28 class QMenu;
29 class QShortcut;
30 
31 class ViewerWindow : public QOpenGLWidget {
32  Q_OBJECT
33 public:
34  ViewerWindow(QWidget *parent);
35  void set_texture(GLuint t, double iar, QMutex *imutex);
36 protected:
37  virtual void keyPressEvent(QKeyEvent*) override;
38  virtual void mousePressEvent(QMouseEvent*) override;
39  virtual void mouseMoveEvent(QMouseEvent*) override;
40 
41  virtual void paintGL() override;
42 private:
43  GLuint texture;
44  double ar;
45  QMutex* mutex;
46 
47  // exit full screen message
48  QTimer fullscreen_msg_timer;
49  bool show_fullscreen_msg;
50  QRect fullscreen_msg_rect;
51 private slots:
52  void fullscreen_msg_timeout();
53 };
54 
55 #endif // VIEWERWINDOW_H
Definition: viewerwindow.h:31