]> git.sesse.net Git - nageru/blob - nageru/analyzer.h
IWYU-fix nageru/*.h.
[nageru] / nageru / analyzer.h
1 #ifndef _ANALYZER_H
2 #define _ANALYZER_H 1
3
4 #include <QImage>
5 #include <QMainWindow>
6 #include <QString>
7 #include <QTimer>
8 #include <QObject>
9 #include <QWidget>
10
11 #include <string>
12
13 #include <epoxy/gl.h>
14 #include <epoxy/gl_generated.h>
15
16 #include "mixer.h"
17
18 class QObject;
19 class QOpenGLContext;
20 class QSurface;
21
22 namespace Ui {
23 class Analyzer;
24 }  // namespace Ui
25
26 namespace movit {
27 class ResourcePool;
28 }  // namespace movit
29
30 class Analyzer : public QMainWindow
31 {
32         Q_OBJECT
33
34 public:
35         Analyzer();
36         ~Analyzer();
37         void update_channel_name(Mixer::Output output, const std::string &name);
38         void mixer_shutting_down();
39
40 public slots:
41         void relayout();
42
43 private:
44         void grab_clicked();
45         void signal_changed();
46         void grab_pixel(int x, int y);
47         bool eventFilter(QObject *watched, QEvent *event) override;
48         void resizeEvent(QResizeEvent *event) override;
49         void showEvent(QShowEvent *event) override;
50
51         Ui::Analyzer *ui;
52         QSurface *surface;
53         QOpenGLContext *context;
54         GLuint pbo;
55         movit::ResourcePool *resource_pool = nullptr;
56         QImage grabbed_image;
57         QTimer grab_timer;
58         int last_x = -1, last_y = -1;
59 };
60
61 #endif  // !defined(_ANALYZER_H)