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

Method onLeftClick

graph_view.cpp:658–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658void MyGraphicsVexItem::onLeftClick(QPointF position){
659 if(state & PREPARING)
660 return;
661 if(state & (ON_LEFT_CLICK | ON_RIGHT_CLICK))
662 return;
663 itemShow();
664 if(this->contains(position)){
665 emit selected(this);
666 state |= ON_LEFT_CLICK;
667 onClickEffect();
668 }
669 else{
670 if(state & (ON_MENU | ON_SELECTED)){
671 if(state & ON_MENU){
672 emit menuStateChanged(this, false);
673 state &= ~ON_MENU;
674 }
675 if(state & ON_SELECTED){
676 this->setBrush(regBrush);
677 state &= ~ON_SELECTED;
678 }
679 }
680 else
681 state &= UNDEFINED;
682 }
683 visit(false);
684}
685
686void MyGraphicsVexItem::onRightClick(QPointF position){
687 if(state & PREPARING)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected