X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=analyzer.h;h=b5aad15c5e400075ac10890353841f5baf43e6a8;hb=4a0187ffb4075b4d217b8d9e9c96cac548b199d8;hp=68fb14e608511c4a88e7817ccef689644c59ba57;hpb=6223907d8b15692270399abd1e94b1ae51551046;p=nageru diff --git a/analyzer.h b/analyzer.h index 68fb14e..b5aad15 100644 --- a/analyzer.h +++ b/analyzer.h @@ -1,12 +1,17 @@ #ifndef _ANALYZER_H #define _ANALYZER_H 1 -#include #include +#include #include +#include + +#include #include +#include "mixer.h" + class QObject; class QOpenGLContext; class QSurface; @@ -19,18 +24,26 @@ namespace movit { class ResourcePool; } // namespace movit -class Analyzer : public QDialog +class Analyzer : public QMainWindow { Q_OBJECT public: Analyzer(); ~Analyzer(); + void update_channel_name(Mixer::Output output, const std::string &name); + void mixer_shutting_down(); + +public slots: + void relayout(); private: void grab_clicked(); void signal_changed(); + void grab_pixel(int x, int y); bool eventFilter(QObject *watched, QEvent *event) override; + void resizeEvent(QResizeEvent *event) override; + void showEvent(QShowEvent *event) override; Ui::Analyzer *ui; QSurface *surface; @@ -38,6 +51,8 @@ private: GLuint pbo; movit::ResourcePool *resource_pool = nullptr; QImage grabbed_image; + QTimer grab_timer; + int last_x = -1, last_y = -1; }; #endif // !defined(_ANALYZER_H)