]> git.sesse.net Git - nageru/blobdiff - futatabi/mainwindow.h
Make the MIDI play button blinking when something is ready to play, and solid when...
[nageru] / futatabi / mainwindow.h
index c7d0ac756f78ae4c800a4dc0598396b07f8a438c..d88babaa689bd9ec73dfc62f3d570185950ead4a 100644 (file)
@@ -43,6 +43,7 @@ public:
        void preview() override;
        void queue() override;
        void play() override;
+       void toggle_lock() override;
        void jog(int delta) override;
        void switch_camera(unsigned camera_idx) override;
        void set_master_speed(float speed) override;
@@ -99,6 +100,10 @@ private:
        // NOTE: The undo stack always has the current state on top.
        std::deque<StateProto> undo_stack, redo_stack;
 
+       // If we need to blink the lock light, we do so for only a second.
+       // This timer signals that we should end it.
+       QTimer *lock_blink_timeout;
+
        // Before a change that should be deferred (see above), currently_deferring_model_changes
        // must be set to true, and current_change_id must be given contents describing what's
        // changed to avoid accidental grouping.
@@ -130,6 +135,7 @@ private:
        void play_clicked();
        void stop_clicked();
        void speed_slider_changed(int percent);
+       void speed_lock_clicked();
        void live_player_done();
        void live_player_clip_progress(const std::map<uint64_t, double> &progress, double time_remaining);
        void set_output_status(const std::string &status);
@@ -145,6 +151,8 @@ private:
        void state_changed(const StateProto &state);  // Called post-filtering.
        void save_settings();
 
+       void lock_blink_timer_expired();
+
        enum Rounding { FIRST_AT_OR_AFTER,
                        LAST_BEFORE };
        void preview_single_frame(int64_t pts, unsigned stream_idx, Rounding rounding);