X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mainwindow.h;h=4801667b5f2f1175e01394aa820d45abc8ca9f31;hb=c015224d38abb896d92c55f1b4517f0600828f68;hp=e9b8dc14ee1942f88387f57bf858e586bca3f519;hpb=3a2c9e40ad5550a729a754de5df83a0650724415;p=nageru diff --git a/mainwindow.h b/mainwindow.h index e9b8dc1..4801667 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -5,6 +5,8 @@ #include #include +#include "clip_list.h" + namespace Ui { class MainWindow; } // namespace Ui @@ -24,9 +26,42 @@ public: private: Player *preview_player, *live_player; + // State when doing a scrub operation on a timestamp with the mouse. + bool scrubbing = false; + int scrub_x_origin; // In pixels on the viewport. + int64_t scrub_pts_origin; + + // Which element (e.g. pts_in on clip 4) we are scrubbing. + enum ScrubType { SCRUBBING_CLIP_LIST, SCRUBBING_PLAYLIST } scrub_type; + int scrub_row; + int scrub_column; + + // Used to keep track of small mouse wheel motions on the camera index in the playlist. + int last_mousewheel_camera_row = -1; + int leftover_angle_degrees = 0; + + void cue_in_clicked(); + void cue_out_clicked(); void queue_clicked(); void preview_clicked(); + void preview_angle_clicked(unsigned stream_idx); void play_clicked(); + void live_player_clip_done(); + void playlist_duplicate(); + void playlist_remove(); + void playlist_move(int delta); + + enum Rounding { FIRST_AT_OR_AFTER, LAST_BEFORE }; + void preview_single_frame(int64_t pts, unsigned stream_idx, Rounding rounding); + + // Also covers when the playlist itself changes. + void playlist_selection_changed(); + + void resizeEvent(QResizeEvent *event) override; + bool eventFilter(QObject *watched, QEvent *event) override; + +private slots: + void relayout(); }; extern MainWindow *global_mainwindow;