]> git.sesse.net Git - nageru/blobdiff - futatabi/mainwindow.h
Some clang-formatting of Futatabi.
[nageru] / futatabi / mainwindow.h
index 8492eb34d09fed7172504e0aaf5c17058830f5d3..afc16ff4c68c41f8cca8ff9a04ba38256f0fe369 100644 (file)
@@ -5,14 +5,15 @@
 #include "db.h"
 #include "state.pb.h"
 
+#include <QLabel>
+#include <QMainWindow>
+#include <QNetworkAccessManager>
 #include <deque>
 #include <memory>
 #include <mutex>
-#include <QLabel>
-#include <QMainWindow>
 #include <stdbool.h>
-#include <sys/types.h>
 #include <string>
+#include <sys/types.h>
 #include <utility>
 
 namespace Ui {
@@ -42,6 +43,7 @@ private:
 
        QLabel *disk_free_label;
        std::unique_ptr<Player> preview_player, live_player;
+       std::map<size_t, size_t> live_player_index_to_row;
        DB db;
        unsigned num_cameras;
 
@@ -51,7 +53,8 @@ private:
        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;
+       enum ScrubType { SCRUBBING_CLIP_LIST,
+                        SCRUBBING_PLAYLIST } scrub_type;
        int scrub_row;
        int scrub_column;
 
@@ -88,6 +91,10 @@ private:
        };
        std::vector<FrameAndDisplay> displays;
 
+       // Used to get tally information, if a tally URL is set.
+       QNetworkAccessManager http;
+       QNetworkReply *http_reply = nullptr;
+
        void change_num_cameras();
        void cue_in_clicked();
        void cue_out_clicked();
@@ -109,7 +116,8 @@ private:
        void state_changed(const StateProto &state);  // Called post-filtering.
        void save_settings();
 
-       enum Rounding { FIRST_AT_OR_AFTER, LAST_BEFORE };
+       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.
@@ -129,12 +137,16 @@ private:
        void undo_triggered();
        void redo_triggered();
        void quality_toggled(int quality, bool checked);
+       void padding_toggled(double seconds, bool checked);
 
        void highlight_camera_input(int stream_idx);
 
-       template <class Model>
+       template<class Model>
        void replace_model(QTableView *view, Model **model, Model *new_model);
 
+       void start_tally();
+       void tally_received();
+
 private slots:
        void relayout();
 };