]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decodesignal.hpp
Rework all subthread-based workers to make notifications more robust
[pulseview.git] / pv / data / decodesignal.hpp
index 51745b7baab8a8d3bf1237e80d9fa96bb10a458e..bfbf5ee0644868856c9fb9cd9c86ec410e2cf42e 100644 (file)
@@ -82,7 +82,7 @@ struct DecodeSegment
        // Copy constructor is a no-op
        DecodeSegment(DecodeSegment&& ds) { (void)ds; };
 
-       map<const Row*, RowData> annotation_rows;
+       map<const Row*, RowData> annotation_rows;  // Note: Row is the same for all segments while RowData is not
        pv::util::Timestamp start_time;
        double samplerate;
        int64_t samples_decoded_incl, samples_decoded_excl;
@@ -124,7 +124,7 @@ public:
 
        void set_initial_pin_state(const uint16_t channel_id, const int init_state);
 
-       double samplerate() const;
+       virtual double get_samplerate() const;
        const pv::util::Timestamp start_time() const;
 
        /**
@@ -191,8 +191,9 @@ public:
 private:
        void set_error_message(QString msg);
 
+       bool all_input_segments_complete(uint32_t segment_id) const;
        uint32_t get_input_segment_count() const;
-       uint32_t get_input_samplerate(uint32_t segment_id) const;
+       double get_input_samplerate(uint32_t segment_id) const;
 
        Decoder* get_decoder_by_instance(const srd_decoder *const srd_dec);
 
@@ -226,12 +227,15 @@ Q_SIGNALS:
        void decode_reset();
        void decode_finished();
        void channels_updated();
+       void annotation_visibility_changed();
 
 private Q_SLOTS:
        void on_capture_state_changed(int state);
        void on_data_cleared();
        void on_data_received();
 
+       void on_annotation_visibility_changed();
+
 private:
        pv::Session &session_;