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

Method setSel

graph_view.cpp:305–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305void MyGraphicsView::setSel(QGraphicsItem *sel){
306 int state = SEL | (sel->type() - QGraphicsItem::UserType);
307 if(itemState == NON){
308 itemState = state;
309 selItem = sel;
310 }
311 else if(itemState & SEL){
312 if(itemState > state){
313 itemState = state;
314 selItem = sel;
315 }
316 }
317 else if(itemState & ADD){
318 if(selItem == nullptr || selItem->type() > sel->type())
319 selItem = sel;
320 }
321}
322
323void MyGraphicsView::startLine(MyGraphicsVexItem *startVex){
324 itemState = ADD | LINE;

Callers

nothing calls this directly

Calls 1

typeMethod · 0.45

Tested by

no test coverage detected