Rework decode sample count getters
[pulseview.git] / pv / data / signalbase.hpp
index 381716480371f6c5494a618e53aca196c7160787..97dbd8477d58dea4537e117a25946338f48f64c3 100644 (file)
@@ -148,11 +148,9 @@ public:
        void set_conversion_type(ConversionType t);
 
 #ifdef ENABLE_DECODE
-       bool is_decode_signal() const;
+       virtual bool is_decode_signal() const;
 
-       shared_ptr<pv::data::DecoderStack> decoder_stack() const;
-
-       void set_decoder_stack(shared_ptr<pv::data::DecoderStack> decoder_stack);
+       virtual shared_ptr<pv::data::DecoderStack> decoder_stack() const;
 #endif
 
        void save_settings(QSettings &settings) const;
@@ -176,6 +174,11 @@ Q_SIGNALS:
 
        void conversion_type_changed(const ConversionType t);
 
+       void samples_cleared();
+
+       void samples_added(QObject* segment, uint64_t start_sample,
+               uint64_t end_sample);
+
 private Q_SLOTS:
        void on_samples_cleared();
 
@@ -184,17 +187,13 @@ private Q_SLOTS:
 
        void on_capture_state_changed(int state);
 
-private:
+protected:
        shared_ptr<sigrok::Channel> channel_;
        ChannelType channel_type_;
        shared_ptr<pv::data::SignalData> data_;
        shared_ptr<pv::data::SignalData> converted_data_;
        int conversion_type_;
 
-#ifdef ENABLE_DECODE
-       shared_ptr<pv::data::DecoderStack> decoder_stack_;
-#endif
-
        std::thread conversion_thread_;
 
        QString internal_name_, name_;