X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fanalogsignal.h;h=666aec9893aa767e17e739ac7a8b168de1eac104;hb=cec48d1618edd0f28f21d5351f53692876222e16;hp=86471537abce44236291664b98a1e74084cc187d;hpb=2658961bdef3601e07d494a8ed3d01a8101b68cd;p=pulseview.git diff --git a/pv/view/analogsignal.h b/pv/view/analogsignal.h index 8647153..666aec9 100644 --- a/pv/view/analogsignal.h +++ b/pv/view/analogsignal.h @@ -29,16 +29,26 @@ namespace pv { namespace data { class Analog; +class AnalogSnapshot; } namespace view { class AnalogSignal : public Signal { +private: + static const QColor SignalColours[4]; + + static const float EnvelopeThreshold; + public: - AnalogSignal(QString name, + AnalogSignal(const sr_probe *const probe, boost::shared_ptr data); + virtual ~AnalogSignal(); + + void set_scale(float scale); + /** * Paints the signal with a QPainter * @param p the QPainter to paint into. @@ -52,8 +62,20 @@ public: void paint(QPainter &p, int y, int left, int right, double scale, double offset); +private: + void paint_trace(QPainter &p, + const boost::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, + 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; }; } // namespace view