Commit 36e46c3a authored by Oliver Bock's avatar Oliver Bock
Browse files

Use relative value to auto-adjust

parent 7e726980
......@@ -87,9 +87,9 @@ void PulseScopeWidget::plot(const QVector<double>& dataLHO, const QVector<double
void PulseScopeWidget::drawCurve(QGraphicsPathItem* path, const QVector<double>& vector, QString color)
{
QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - vector.at(0) - 1.0));
QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - vector.at(0) - m_scopeSizeV/2.0));
for(int i = 1; i < m_scopeSizeH; ++i) {
pulsePath.lineTo(i, m_scopeSizeV - vector.at(i) - 1.0);
pulsePath.lineTo(i, m_scopeSizeV - vector.at(i) - m_scopeSizeV/2.0);
}
if(path == NULL) {
path = m_scene.addPath(pulsePath, QPen(QColor(color)));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment