Make member variable underscores a suffix instead of a prefix
[pulseview.git] / pv / view / analogsignal.h
index 3b92455cb706a587815b2ada7d3728f5bb202977..326e6fbc98ab4ab3990e08696a959630a3e12641 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef PULSEVIEW_PV_ANALOGSIGNAL_H
-#define PULSEVIEW_PV_ANALOGSIGNAL_H
+#ifndef PULSEVIEW_PV_VIEW_ANALOGSIGNAL_H
+#define PULSEVIEW_PV_VIEW_ANALOGSIGNAL_H
 
 #include "signal.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 namespace pv {
 
@@ -37,20 +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();
 
-       const std::list<QAction*> get_context_bar_actions();
+       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.
@@ -69,21 +79,21 @@ 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
 } // namespace pv
 
-#endif // PULSEVIEW_PV_ANALOGSIGNAL_H
+#endif // PULSEVIEW_PV_VIEW_ANALOGSIGNAL_H