Make member variable underscores a suffix instead of a prefix
[pulseview.git] / pv / view / analogsignal.h
index 35db2ddc83f52055a11612fe3234c0f596543de7..326e6fbc98ab4ab3990e08696a959630a3e12641 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "signal.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 namespace pv {
 
@@ -37,18 +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, const sr_probe *const probe,
-               boost::shared_ptr<pv::data::Analog> data);
+       AnalogSignal(pv::SigSession &session,
+               std::shared_ptr<sigrok::Channel> channel,
+               std::shared_ptr<pv::data::Analog> data);
 
        virtual ~AnalogSignal();
 
+       std::shared_ptr<pv::data::SignalData> data() const;
+
+       std::shared_ptr<pv::data::Analog> 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<int, int> v_extents() const;
+
        /**
         * Paints the background layer of the signal with a QPainter
         * @param p the QPainter to paint into.
@@ -67,18 +79,18 @@ public:
 
 private:
        void paint_trace(QPainter &p,
-               const boost::shared_ptr<pv::data::AnalogSnapshot> &snapshot,
+               const std::shared_ptr<pv::data::AnalogSnapshot> &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<pv::data::AnalogSnapshot> &snapshot,
+               const std::shared_ptr<pv::data::AnalogSnapshot> &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<pv::data::Analog> _data;
-       float _scale;
+       std::shared_ptr<pv::data::Analog> data_;
+       float scale_;
 };
 
 } // namespace view