]> sigrok.org Git - pulseview.git/blobdiff - pv/view/analogsignal.cpp
Minor whitespace fixes.
[pulseview.git] / pv / view / analogsignal.cpp
index 5b6d8a50ca3ac4e24d96d5892a73b7a155ecffdc..0ac6311116610356b12f0663fa0fc933539f801e 100644 (file)
@@ -28,7 +28,7 @@
 #include "pv/data/analogsegment.hpp"
 #include "pv/view/view.hpp"
 
-#include <libsigrok/libsigrok.hpp>
+#include <libsigrokcxx/libsigrokcxx.hpp>
 
 using std::max;
 using std::make_pair;
@@ -87,13 +87,13 @@ std::pair<int, int> AnalogSignal::v_extents() const
        return make_pair(-NominalHeight / 2, NominalHeight / 2);
 }
 
-void AnalogSignal::paint_back(QPainter &p, const RowItemPaintParams &pp)
+void AnalogSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
 {
        if (channel_->enabled())
                paint_axis(p, pp, get_visual_y());
 }
 
-void AnalogSignal::paint_mid(QPainter &p, const RowItemPaintParams &pp)
+void AnalogSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
 {
        assert(data_);
        assert(owner_);
@@ -181,7 +181,7 @@ void AnalogSignal::paint_envelope(QPainter &p,
        QRectF *const rects = new QRectF[e.length];
        QRectF *rect = rects;
 
-       for(uint64_t sample = 0; sample < e.length-1; sample++) {
+       for (uint64_t sample = 0; sample < e.length-1; sample++) {
                const float x = ((e.scale * sample + e.start) /
                        samples_per_pixel - pixels_offset) + left;
                const AnalogSegment::EnvelopeSample *const s =
@@ -193,9 +193,9 @@ void AnalogSignal::paint_envelope(QPainter &p,
                const float t = y - min(s->min, (s+1)->max) * scale_;
 
                float h = b - t;
-               if(h >= 0.0f && h <= 1.0f)
+               if (h >= 0.0f && h <= 1.0f)
                        h = 1.0f;
-               if(h <= 0.0f && h >= -1.0f)
+               if (h <= 0.0f && h >= -1.0f)
                        h = -1.0f;
 
                *rect++ = QRectF(x, t, 1.0f, h);