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

Method addLine

graph_view.cpp:212–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void MyGraphicsView::addLine(MyGraphicsVexItem *start, MyGraphicsVexItem *end){
213 MyGraphicsLineItem *newLine = new MyGraphicsLineItem(start, end, type == DG);
214 scene()->addItem(newLine);
215 newLine->estConnection(this);
216 newLine->refrshLine();
217 newLine->setZValue(--zValue);
218 start->addStartLine(newLine);
219 end->addEndLine(newLine);
220 arcNum++;
221 lines.push_back(newLine);
222 emit arcAdded(newLine);
223 emit logAdded(new viewLog("[Arc] | Added \""+newLine->stVex()->Text()+"\" -> \""+newLine->edVex()->Text()+"\""));
224}
225
226MyGraphicsVexItem* MyGraphicsView::selectedVex(){
227 return selItem ? (selItem->type() == QGraphicsItem::UserType + 1 ? (MyGraphicsVexItem*)selItem : nullptr) : nullptr;

Callers

nothing calls this directly

Calls 7

estConnectionMethod · 0.80
refrshLineMethod · 0.80
addStartLineMethod · 0.80
addEndLineMethod · 0.80
TextMethod · 0.80
stVexMethod · 0.80
edVexMethod · 0.80

Tested by

no test coverage detected