short vertical lines
This commit is contained in:
parent
73d4e43f97
commit
ada1425d83
1 changed files with 12 additions and 8 deletions
|
@ -264,18 +264,22 @@ void DisplayWidget::drawBackground() {
|
|||
QPointF trg (m_ts->offset, m_ts->value + ofs);
|
||||
QPen pc (QColor(0,128,255), 1);
|
||||
p.setPen(pc);
|
||||
const QLineF hline (xb, trg.y(), xe, trg.y());
|
||||
const QLineF vline (trg.x(), -ye, trg.x(), ye);
|
||||
p.drawLine (m_forward.map(hline));
|
||||
p.drawLine (m_forward.map(vline));
|
||||
const qreal pos = 30.0;
|
||||
const QLineF hline = m_forward.map(QLine(xb, trg.y(), xe, trg.y()));
|
||||
const QLineF vline = m_forward.map(QLine(trg.x(), -ye, trg.x(), ye));
|
||||
QPointF vb = vline.p1() + QPointF(0,-pos), ve = vline.p2() + QPointF(0,+pos);
|
||||
p.drawLine (hline);
|
||||
p.drawLine (QLineF(vb,ve));
|
||||
// markers
|
||||
QPen pm (QColor(255,255,0,196), 1);
|
||||
p.setPen(pm);
|
||||
if (marker_type == MARKER_TIME) {
|
||||
const QLineF ma (m_time.a, -ye, m_time.a, ye);
|
||||
const QLineF mb (m_time.b, -ye, m_time.b, ye);
|
||||
p.drawLine (m_forward.map(ma));
|
||||
p.drawLine (m_forward.map(mb));
|
||||
const QLineF ma = m_forward.map(QLine (m_time.a, -ye, m_time.a, ye));
|
||||
const QLineF mb = m_forward.map(QLine (m_time.b, -ye, m_time.b, ye));
|
||||
vb = ma.p1() + QPointF(0,-pos), ve = ma.p2() + QPointF(0,+pos);
|
||||
p.drawLine (QLineF(vb, ve));
|
||||
vb = mb.p1() + QPointF(0,-pos), ve = mb.p2() + QPointF(0,+pos);
|
||||
p.drawLine (QLineF(vb, ve));
|
||||
} else {
|
||||
const QLineF ma (xb, m_volt.a, xe, m_volt.a);
|
||||
const QLineF mb (xb, m_volt.b, xe, m_volt.b);
|
||||
|
|
Loading…
Reference in a new issue