X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=video_widget.h;h=56cf92862605d41b82e56caf90f9d834c4ec64e7;hb=d86834b0c2ecc2df21d70a7db8a2a9d949dccc74;hp=801d5cdb6844565e1c7de2853a06de28bc6e99ee;hpb=3ea646d51ad82169f61354700d729c703d31c9d3;p=pkanalytics diff --git a/video_widget.h b/video_widget.h index 801d5cd..56cf928 100644 --- a/video_widget.h +++ b/video_widget.h @@ -39,6 +39,11 @@ public: void paintGL() override; void wheelEvent(QWheelEvent *event) override; + // For dragging. + void mousePressEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); + void mouseMoveEvent(QMouseEvent *e); + signals: void position_changed(uint64_t pos); @@ -92,6 +97,9 @@ private: std::string pathname; + bool dragging = false; + float last_drag_x, last_drag_y; + void producer_thread_func(); bool play_video(const std::string &pathname); void internal_rewind();