X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mainwindow.h;h=24eea609e03bbdf24049018b03cb9193b15cfa38;hb=1aab0848ee4807a0369656edd9eb42ce5adb56ae;hp=c037c77833b0a67fdd021d20d8da8b326bd6c9c9;hpb=9c8b3d2c80d20a391ada89a2a54910ec35c036d2;p=nageru diff --git a/mainwindow.h b/mainwindow.h index c037c77..24eea60 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -5,6 +5,8 @@ #include #include +#include "clip_list.h" + namespace Ui { class MainWindow; } // namespace Ui @@ -24,10 +26,43 @@ 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 live_player_clip_progress(double played_this_clip, double total_length); + 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;