]> sigrok.org Git - pulseview.git/commitdiff
Added Signal::data accessor function
authorJoel Holdsworth <redacted>
Mon, 2 Dec 2013 20:08:31 +0000 (20:08 +0000)
committerJoel Holdsworth <redacted>
Mon, 2 Dec 2013 20:08:31 +0000 (20:08 +0000)
pv/view/analogsignal.cpp
pv/view/analogsignal.h
pv/view/logicsignal.cpp
pv/view/logicsignal.h
pv/view/signal.h

index 4304fd1e5a9bfd7ec61fcf3e3a9c24594086fed0..bcd0f20020a2d326b7b1be314fe97838909acbcc 100644 (file)
@@ -55,6 +55,11 @@ AnalogSignal::~AnalogSignal()
 {
 }
 
+boost::shared_ptr<pv::data::SignalData> AnalogSignal::data() const
+{
+       return _data;
+}
+
 void AnalogSignal::set_scale(float scale)
 {
        _scale = scale;
index 64d138d84a19f0a13948c1fded2c4d125a98e4cf..279ed108938c7538ec9a293fa96712cc538cb18e 100644 (file)
@@ -47,6 +47,8 @@ public:
 
        virtual ~AnalogSignal();
 
+       boost::shared_ptr<pv::data::SignalData> data() const;
+
        void set_scale(float scale);
 
        /**
index fb84d70a8e78dc6838678038bcfedd9e88ecb0c1..54faa601dc16f97ac4b80fba50e5d8af0f3bf992 100644 (file)
@@ -76,6 +76,11 @@ LogicSignal::~LogicSignal()
 {
 }
 
+boost::shared_ptr<pv::data::SignalData> LogicSignal::data() const
+{
+       return _data;
+}
+
 boost::shared_ptr<pv::data::Logic> LogicSignal::logic_data() const
 {
        return _data;
index 86c411a00106fe1e78e76c21356965c52c313784..992745eb8e6ff6927ae10bf8db0ddbe952244b82 100644 (file)
@@ -54,6 +54,8 @@ public:
 
        virtual ~LogicSignal();
 
+       boost::shared_ptr<pv::data::SignalData> data() const;
+
        boost::shared_ptr<pv::data::Logic> logic_data() const;
 
        /**
index e5e919548be0679147730823eaf113785c3871fe..bdbd27a35f1b9554cde55dd75b1a441f0b1619b8 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef PULSEVIEW_PV_VIEW_SIGNAL_H
 #define PULSEVIEW_PV_VIEW_SIGNAL_H
 
+#include <boost/shared_ptr.hpp>
+
 #include <QComboBox>
 #include <QWidgetAction>
 
@@ -51,6 +53,8 @@ public:
         */
        void set_name(QString name);
 
+       virtual boost::shared_ptr<pv::data::SignalData> data() const = 0;
+
        /**
         * Returns true if the trace is visible and enabled.
         */