X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fanalog.hpp;h=560732f8bef8bebf238e948b37249ccd8d4f5141;hp=633c6fba296eb24a47166772fcc11b960b218649;hb=HEAD;hpb=8e15445ccd6994348eb74b24b5324d26c9be0cce diff --git a/pv/data/analog.hpp b/pv/data/analog.hpp index 633c6fba..560732f8 100644 --- a/pv/data/analog.hpp +++ b/pv/data/analog.hpp @@ -26,6 +26,7 @@ #include #include +#include "pv/data/segment.hpp" using std::deque; using std::shared_ptr; @@ -49,11 +50,17 @@ public: vector< shared_ptr > segments() const; + uint32_t get_segment_count() const; + void clear(); + void set_samplerate(double value); + + double get_samplerate() const; + uint64_t max_sample_count() const; - void notify_samples_added(QObject* segment, uint64_t start_sample, + void notify_samples_added(shared_ptr segment, uint64_t start_sample, uint64_t end_sample); void notify_min_max_changed(float min, float max); @@ -61,12 +68,16 @@ public: Q_SIGNALS: void samples_cleared(); - void samples_added(QObject* segment, uint64_t start_sample, + void samples_added(SharedPtrToSegment segment, uint64_t start_sample, uint64_t end_sample); void min_max_changed(float min, float max); +private Q_SLOTS: + void on_segment_completed(); + private: + double samplerate_; deque< shared_ptr > segments_; };