| 197 | } |
| 198 | |
| 199 | void 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 | |
| 212 | void MyGraphicsView::addLine(MyGraphicsVexItem *start, MyGraphicsVexItem *end){ |
| 213 | MyGraphicsLineItem *newLine = new MyGraphicsLineItem(start, end, type == DG); |
nothing calls this directly
no outgoing calls
no test coverage detected