Rework signaling mechanism for trace repainting
[pulseview.git] / pv / view / trace.hpp
index 882c2d7089d7ea90f59c752a24e8b75a7d919705..b6b15198451e74bbfd014e5591f8d451da531dfc 100644 (file)
@@ -38,6 +38,10 @@ class QFormLayout;
 
 namespace pv {
 
+namespace data {
+class SignalBase;
+}
+
 namespace widgets {
 class Popup;
 }
@@ -60,6 +64,11 @@ protected:
        Trace(shared_ptr<data::SignalBase> channel);
 
 public:
+       /**
+        * Returns the underlying SignalBase instance.
+        */
+       shared_ptr<data::SignalBase> base() const;
+
        /**
         * Sets the name of the signal.
         */
@@ -95,7 +104,7 @@ protected:
         * @param p The QPainter to paint into.
         * @param pp The painting parameters object to paint with.
         */
-       virtual void paint_back(QPainter &p, const ViewItemPaintParams &pp);
+       virtual void paint_back(QPainter &p, ViewItemPaintParams &pp);
 
        /**
         * Paints a zero axis across the viewport.
@@ -103,7 +112,7 @@ protected:
         * @param pp the painting parameters object to paint with.
         * @param y the y-offset of the axis.
         */
-       void paint_axis(QPainter &p, const ViewItemPaintParams &pp, int y);
+       void paint_axis(QPainter &p, ViewItemPaintParams &pp, int y);
 
        void add_colour_option(QWidget *parent, QFormLayout *form);
 
@@ -125,7 +134,6 @@ private Q_SLOTS:
 
 protected:
        shared_ptr<data::SignalBase> base_;
-       bool coloured_bg_state_;
 
 private:
        pv::widgets::Popup *popup_;