Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
viewerwindow.h
Go to the documentation of this file.
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 showEvent(QShowEvent*) override;
38  virtual void keyPressEvent(QKeyEvent*) override;
39  virtual void mousePressEvent(QMouseEvent*) override;
40  virtual void mouseMoveEvent(QMouseEvent*) override;
41 
42  virtual void paintGL() override;
43 private:
44  GLuint texture;
45  double ar;
46  QMutex* mutex;
47 
48  // shortcuts
49  void shortcut_copier(QVector<QShortcut*>& shortcuts, QMenu* menu);
50  QVector<QShortcut*> shortcuts_;
51 
52  // exit full screen message
56 private slots:
58 };
59 
60 #endif // VIEWERWINDOW_H
GLuint texture
Definition: viewerwindow.h:44
QRect fullscreen_msg_rect
Definition: viewerwindow.h:55
virtual void mousePressEvent(QMouseEvent *) override
Definition: viewerwindow.cpp:96
virtual void keyPressEvent(QKeyEvent *) override
Definition: viewerwindow.cpp:90
ViewerWindow(QWidget *parent)
Definition: viewerwindow.cpp:36
QVector< QShortcut * > shortcuts_
Definition: viewerwindow.h:50
bool show_fullscreen_msg
Definition: viewerwindow.h:54
void set_texture(GLuint t, double iar, QMutex *imutex)
Definition: viewerwindow.cpp:48
void fullscreen_msg_timeout()
Definition: viewerwindow.cpp:192
virtual void mouseMoveEvent(QMouseEvent *) override
Definition: viewerwindow.cpp:102
void shortcut_copier(QVector< QShortcut * > &shortcuts, QMenu *menu)
Definition: viewerwindow.cpp:55
virtual void showEvent(QShowEvent *) override
Definition: viewerwindow.cpp:69
QTimer fullscreen_msg_timer
Definition: viewerwindow.h:53
QMutex * mutex
Definition: viewerwindow.h:46
virtual void paintGL() override
Definition: viewerwindow.cpp:110
double ar
Definition: viewerwindow.h:45
Definition: viewerwindow.h:31