#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;
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_);
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 =
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);