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

Method onRightClick

graph_view.cpp:686–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686void MyGraphicsVexItem::onRightClick(QPointF position){
687 if(state & PREPARING)
688 return;
689 if(state & (ON_LEFT_CLICK | ON_RIGHT_CLICK))
690 return;
691 itemShow();
692 if(this->contains(position)){
693 emit selected(this);
694 state |= ON_RIGHT_CLICK;
695 onClickEffect();
696 }
697 else{
698 if(state & (ON_MENU | ON_SELECTED)){
699 if(state & ON_MENU){
700 emit menuStateChanged(this, false);
701 state &= ~ON_MENU;
702 }
703 if(state & ON_SELECTED){
704 this->setBrush(regBrush);
705 state &= ~ON_SELECTED;
706 }
707 }
708 else
709 state &= UNDEFINED;
710 //if(state & ON_SELECTED)
711 // this->setBrush(regBrush);
712 //state &= UNDEFINED;
713 }
714 visit(false);
715}
716
717void MyGraphicsVexItem::onMouseRelease(){
718 if(state & PREPARING)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected