| 656 | } |
| 657 | |
| 658 | void 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 | |
| 686 | void MyGraphicsVexItem::onRightClick(QPointF position){ |
| 687 | if(state & PREPARING) |
nothing calls this directly
no outgoing calls
no test coverage detected