MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / sketchLine

Method sketchLine

graph_view.cpp:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void MyGraphicsView::sketchLine(QPointF start, QPointF end){
200 QGraphicsLineItem *newLine = new QGraphicsLineItem(start.x(), start.y(), end.x(), end.y());
201 QPen pen;
202 pen.setWidth(3);
203 pen.setStyle(Qt::DashLine);
204 pen.setBrush(QColor(58, 143, 192, 100));
205 pen.setCapStyle(Qt::RoundCap);
206 newLine->setPen(pen);
207 scene()->addItem(newLine);
208 newLine->stackBefore(selItem);
209 sketchItem = newLine;
210}
211
212void MyGraphicsView::addLine(MyGraphicsVexItem *start, MyGraphicsVexItem *end){
213 MyGraphicsLineItem *newLine = new MyGraphicsLineItem(start, end, type == DG);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected