Add missing indentation
Discovered with gcc 6. Change-Id: Ib5ba49df6a1f4d9574842ffe5f3e9856da0e60d0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
8c2b7405b4
commit
1b21170faa
@ -110,12 +110,12 @@ void Arrow::paint(QPainter *painter, const QStyleOptionGraphicsItem *,
|
||||
QPointF intersectPoint;
|
||||
QLineF polyLine;
|
||||
for (int i = 1; i < endPolygon.count(); ++i) {
|
||||
p2 = endPolygon.at(i) + myEndItem->pos();
|
||||
polyLine = QLineF(p1, p2);
|
||||
QLineF::IntersectType intersectType =
|
||||
polyLine.intersect(centerLine, &intersectPoint);
|
||||
if (intersectType == QLineF::BoundedIntersection)
|
||||
break;
|
||||
p2 = endPolygon.at(i) + myEndItem->pos();
|
||||
polyLine = QLineF(p1, p2);
|
||||
QLineF::IntersectType intersectType =
|
||||
polyLine.intersect(centerLine, &intersectPoint);
|
||||
if (intersectType == QLineF::BoundedIntersection)
|
||||
break;
|
||||
p1 = p2;
|
||||
}
|
||||
|
||||
@ -126,18 +126,18 @@ void Arrow::paint(QPainter *painter, const QStyleOptionGraphicsItem *,
|
||||
if (line().dy() >= 0)
|
||||
angle = (Pi * 2) - angle;
|
||||
|
||||
QPointF arrowP1 = line().p1() + QPointF(sin(angle + Pi / 3) * arrowSize,
|
||||
cos(angle + Pi / 3) * arrowSize);
|
||||
QPointF arrowP2 = line().p1() + QPointF(sin(angle + Pi - Pi / 3) * arrowSize,
|
||||
cos(angle + Pi - Pi / 3) * arrowSize);
|
||||
QPointF arrowP1 = line().p1() + QPointF(sin(angle + Pi / 3) * arrowSize,
|
||||
cos(angle + Pi / 3) * arrowSize);
|
||||
QPointF arrowP2 = line().p1() + QPointF(sin(angle + Pi - Pi / 3) * arrowSize,
|
||||
cos(angle + Pi - Pi / 3) * arrowSize);
|
||||
|
||||
arrowHead.clear();
|
||||
arrowHead << line().p1() << arrowP1 << arrowP2;
|
||||
arrowHead.clear();
|
||||
arrowHead << line().p1() << arrowP1 << arrowP2;
|
||||
//! [6] //! [7]
|
||||
painter->drawLine(line());
|
||||
painter->drawPolygon(arrowHead);
|
||||
if (isSelected()) {
|
||||
painter->setPen(QPen(myColor, 1, Qt::DashLine));
|
||||
painter->drawLine(line());
|
||||
painter->drawPolygon(arrowHead);
|
||||
if (isSelected()) {
|
||||
painter->setPen(QPen(myColor, 1, Qt::DashLine));
|
||||
QLineF myLine = line();
|
||||
myLine.translate(0, 4.0);
|
||||
painter->drawLine(myLine);
|
||||
|
Loading…
Reference in New Issue
Block a user