X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fanalogsignal.hpp;h=81fdf393abb16aab3e633582a5c83060d83df0c7;hp=9c9c6db8aeffd04321799567935ecf3ba17417ec;hb=cbd2a2de848f957507096785d3be1cc97d30df9a;hpb=368a37c2d818f9a7122f07e4a13df5416e05a02e diff --git a/pv/view/analogsignal.hpp b/pv/view/analogsignal.hpp index 9c9c6db8..81fdf393 100644 --- a/pv/view/analogsignal.hpp +++ b/pv/view/analogsignal.hpp @@ -32,6 +32,7 @@ namespace pv { namespace data { class Analog; class AnalogSegment; +class SignalBase; } namespace view { @@ -48,18 +49,16 @@ private: static const int MaximumVDivs; static const int MaxScaleIndex, MinScaleIndex; + static const int InfoTextMarginRight, InfoTextMarginBottom; public: AnalogSignal(pv::Session &session, - std::shared_ptr channel, - std::shared_ptr data); + std::shared_ptr base); virtual ~AnalogSignal() = default; std::shared_ptr data() const; - std::shared_ptr analog_data() const; - /** * Computes the vertical extents of the contents of this row item. * @return A pair containing the minimum and maximum y-values. @@ -96,6 +95,13 @@ public: */ void paint_mid(QPainter &p, const ViewItemPaintParams &pp); + /** + * Paints the foreground layer of the item with a QPainter + * @param p the QPainter to paint into. + * @param pp the painting parameters object to paint with. + */ + void paint_fore(QPainter &p, const ViewItemPaintParams &pp); + private: void paint_grid(QPainter &p, int y, int left, int right); @@ -125,8 +131,6 @@ private Q_SLOTS: void on_resolution_changed(int index); private: - std::shared_ptr data_; - QComboBox *resolution_cb_; float scale_;