]> git.sesse.net Git - nageru/blobdiff - futatabi/clip_list.h
Make the UI programmatically dependent on NUM_CAMERAS.
[nageru] / futatabi / clip_list.h
index 8dead831106e74783704ad5fab8ea6b9eb9eb675..d2c7f83cd66795b3a2172a4b4c79e01f7826cd1d 100644 (file)
@@ -53,11 +53,8 @@ public:
                IN,
                OUT,
                DURATION,
-               CAMERA_1,
-               CAMERA_2,
-               CAMERA_3,
-               CAMERA_4,
-               NUM_COLUMNS
+               CAMERA_1,  // Then CAMERA_2, CAMERA_3, etc. as needed.
+               NUM_NON_CAMERA_COLUMNS = CAMERA_1
        };
 
        int rowCount(const QModelIndex &parent) const override;
@@ -81,6 +78,11 @@ public:
 
        void emit_data_changed(size_t row) override;
 
+       static bool is_camera_column(int column)
+       {
+               return (column >= int(Column::CAMERA_1) && column < int(Column::CAMERA_1) + NUM_CAMERAS);
+       }
+
 signals:
        void any_content_changed();