--- 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<QTime, int> >::const_iterator current,
+ QList< QPair<QTime, int> >::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);
+}