X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fanalogsignal.h;h=326e6fbc98ab4ab3990e08696a959630a3e12641;hb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;hp=7c506a7a652378f24b5b30c0526d28e3d394aa7b;hpb=8d3e0764def48fdf19dc9100c87bbb42da5a9d6d;p=pulseview.git diff --git a/pv/view/analogsignal.h b/pv/view/analogsignal.h index 7c506a7..326e6fb 100644 --- a/pv/view/analogsignal.h +++ b/pv/view/analogsignal.h @@ -23,7 +23,7 @@ #include "signal.h" -#include +#include namespace pv { @@ -37,23 +37,30 @@ namespace view { class AnalogSignal : public Signal { private: + static const int NominalHeight; static const QColor SignalColours[4]; static const float EnvelopeThreshold; public: AnalogSignal(pv::SigSession &session, - boost::shared_ptr dev_inst, sr_probe *const probe, - boost::shared_ptr data); + std::shared_ptr channel, + std::shared_ptr data); virtual ~AnalogSignal(); - boost::shared_ptr data() const; + std::shared_ptr data() const; - boost::shared_ptr analog_data() const; + std::shared_ptr analog_data() const; void set_scale(float scale); + /** + * Computes the vertical extents of the contents of this row item. + * @return A pair containing the minimum and maximum y-values. + */ + std::pair v_extents() const; + /** * Paints the background layer of the signal with a QPainter * @param p the QPainter to paint into. @@ -72,18 +79,18 @@ public: private: void paint_trace(QPainter &p, - const boost::shared_ptr &snapshot, + const std::shared_ptr &snapshot, int y, int left, const int64_t start, const int64_t end, const double pixels_offset, const double samples_per_pixel); void paint_envelope(QPainter &p, - const boost::shared_ptr &snapshot, + const std::shared_ptr &snapshot, int y, int left, const int64_t start, const int64_t end, const double pixels_offset, const double samples_per_pixel); private: - boost::shared_ptr _data; - float _scale; + std::shared_ptr data_; + float scale_; }; } // namespace view