]> sigrok.org Git - pulseview.git/blobdiff - pv/data/analog.hpp
Session: Fix issue #67 by improving error handling
[pulseview.git] / pv / data / analog.hpp
index 30860ce18e4a0c4f98590629fd965c8a0326d3de..560732f8bef8bebf238e948b37249ccd8d4f5141 100644 (file)
@@ -26,6 +26,7 @@
 #include <memory>
 
 #include <QObject>
+#include "pv/data/segment.hpp"
 
 using std::deque;
 using std::shared_ptr;
@@ -49,20 +50,34 @@ public:
 
        vector< shared_ptr<Segment> > 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> segment, uint64_t start_sample,
                uint64_t end_sample);
 
+       void notify_min_max_changed(float min, float max);
+
 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<AnalogSegment> > segments_;
 };