X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdata%2Fanalog.hpp;h=c0b9a0134d72d9b5028f75b5d19040a71d81c991;hb=c9f573751bab3f53066aa87486f38216fde67ac8;hp=2fe588e4476572ae41a7e980de8b55a3022b0e1b;hpb=f3d66e52ed6b454ea7a0662d5e6367e230116a2b;p=pulseview.git
diff --git a/pv/data/analog.hpp b/pv/data/analog.hpp
index 2fe588e..c0b9a01 100644
--- a/pv/data/analog.hpp
+++ b/pv/data/analog.hpp
@@ -14,18 +14,23 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
-#ifndef PULSEVIEW_PV_DATA_ANALOG_H
-#define PULSEVIEW_PV_DATA_ANALOG_H
+#ifndef PULSEVIEW_PV_DATA_ANALOG_HPP
+#define PULSEVIEW_PV_DATA_ANALOG_HPP
#include "signaldata.hpp"
#include
#include
+#include
+
+using std::deque;
+using std::shared_ptr;
+using std::vector;
+
namespace pv {
namespace data {
@@ -33,26 +38,43 @@ class AnalogSegment;
class Analog : public SignalData
{
+ Q_OBJECT
+
public:
Analog();
- void push_segment(
- std::shared_ptr &segment);
+ void push_segment(shared_ptr &segment);
- const std::deque< std::shared_ptr >&
- analog_segments() const;
+ const deque< shared_ptr >& analog_segments() const;
- std::vector< std::shared_ptr > segments() const;
+ vector< shared_ptr > segments() const;
+
+ uint32_t get_segment_count() const;
void clear();
- uint64_t get_max_sample_count() const;
+ double get_samplerate() const;
+
+ uint64_t max_sample_count() const;
+
+ void notify_samples_added(QObject* 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,
+ uint64_t end_sample);
+
+ void min_max_changed(float min, float max);
private:
- std::deque< std::shared_ptr > segments_;
+ deque< shared_ptr > segments_;
};
} // namespace data
} // namespace pv
-#endif // PULSEVIEW_PV_DATA_ANALOG_H
+#endif // PULSEVIEW_PV_DATA_ANALOG_HPP