X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fanalog.hpp;h=30860ce18e4a0c4f98590629fd965c8a0326d3de;hp=777deb6d01b4e161905bb8830f184c1a0d164624;hb=3fbddf7f0e83fe72b8f0e0e69faf05579c096f84;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f diff --git a/pv/data/analog.hpp b/pv/data/analog.hpp index 777deb6d..30860ce1 100644 --- a/pv/data/analog.hpp +++ b/pv/data/analog.hpp @@ -14,8 +14,7 @@ * 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_HPP @@ -26,6 +25,12 @@ #include #include +#include + +using std::deque; +using std::shared_ptr; +using std::vector; + namespace pv { namespace data { @@ -33,23 +38,32 @@ 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; void clear(); - uint64_t get_max_sample_count() const; + uint64_t max_sample_count() const; + + void notify_samples_added(QObject* segment, uint64_t start_sample, + uint64_t end_sample); + +Q_SIGNALS: + void samples_cleared(); + + void samples_added(QObject* segment, uint64_t start_sample, + uint64_t end_sample); private: - std::deque< std::shared_ptr > segments_; + deque< shared_ptr > segments_; }; } // namespace data