diff -r fa3d7ce5d0a7 -r 8396f7857013 plot.cc --- a/plot.cc Fri Jan 27 17:16:26 2012 +0100 +++ b/plot.cc Fri Jan 27 17:21:51 2012 +0100 @@ -28,3 +28,21 @@ addLine(QLineF(zero, QPointF(0, -1 * (max - min)))); if (!step) return; } + +void Plot::draw(QList< QPair >::const_iterator current, + QList< QPair >::const_iterator end) +{ + QTime t0 = current->first; + int offset = current->second; + + QPolygonF poly; + QPainterPath path; + + while (current != end) { + QPoint p(t0.secsTo(current->first), -1 * (current->second - offset)); + path.lineTo(p); + ++current; + } + + addPath(path); +}