| 684 | } |
| 685 | |
| 686 | void 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 | |
| 717 | void MyGraphicsVexItem::onMouseRelease(){ |
| 718 | if(state & PREPARING) |
nothing calls this directly
no outgoing calls
no test coverage detected