MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / paint

Method paint

tools/monitor/Edge.cpp:60–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void
61Monitor::Edge::paint(QPainter *painter,const QStyleOptionGraphicsItem *,QWidget *)
62{
63 if (pubSub_) {
64 QPen pen;
65 pen.setWidth(3);
66 painter->setPen(pen);
67 }
68
69 int x1 = parent_->scenePos().x() + parent_->boundingRect().width() - 2;
70 int y1 = parent_->scenePos().y() + parent_->boundingRect().height() - 2;
71 int x2 = child_->scenePos().x() + 2;
72 int y2 = child_->scenePos().y() + 2;
73
74 QLine line;
75 line.setLine(x1, y1, x2, y2);
76
77 painter->drawLine(line);
78
79 update();
80}

Callers

nothing calls this directly

Calls 4

updateFunction · 0.85
setPenMethod · 0.80
widthMethod · 0.80
boundingRectMethod · 0.80

Tested by

no test coverage detected