#include <qgraphicssceneevent.h>
Inheritance diagram for QGraphicsSceneContextMenuEvent:


Definition at line 132 of file qgraphicssceneevent.h.
Public Types | |
| enum | Reason |
Public Member Functions | |
| QGraphicsSceneContextMenuEvent (Type type=None) | |
| ~QGraphicsSceneContextMenuEvent () | |
| QPointF | pos () const |
| void | setPos (const QPointF &pos) |
| QPointF | scenePos () const |
| void | setScenePos (const QPointF &pos) |
| QPoint | screenPos () const |
| void | setScreenPos (const QPoint &pos) |
| Qt::KeyboardModifiers | modifiers () const |
| void | setModifiers (Qt::KeyboardModifiers modifiers) |
| Reason | reason () const |
| void | setReason (Reason reason) |
This enum describes the reason why the context event was sent.
Mouse The mouse caused the event to be sent. Normally this means the right mouse button was clicked, but this is platform dependent.
Keyboard The keyboard caused this event to be sent. On Windows, this means the menu button was pressed.
Other The event was sent by some other means (i.e. not by the mouse or keyboard).
Definition at line 135 of file qgraphicssceneevent.h.
| QGraphicsSceneContextMenuEvent::QGraphicsSceneContextMenuEvent | ( | Type | type = None |
) |
Constructs a graphics scene context menu event of the specified type.
Definition at line 631 of file qgraphicssceneevent.cpp.
00632 : QGraphicsSceneEvent(*new QGraphicsSceneContextMenuEventPrivate, type) 00633 { 00634 }
| QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent | ( | ) |
| QPointF QGraphicsSceneContextMenuEvent::pos | ( | ) | const |
Returns the position of the mouse cursor in item coordinates at the moment the the context menu was requested.
Definition at line 649 of file qgraphicssceneevent.cpp.
References QEvent::d.
Referenced by QTextControl::processEvent(), QGraphicsItemPrivate::remapItemPos(), setPos(), setScenePos(), and setScreenPos().
00650 { 00651 Q_D(const QGraphicsSceneContextMenuEvent); 00652 return d->pos; 00653 }
| void QGraphicsSceneContextMenuEvent::setPos | ( | const QPointF & | pos | ) |
Definition at line 662 of file qgraphicssceneevent.cpp.
References QEvent::d, and pos().
Referenced by QGraphicsItemPrivate::remapItemPos().
00663 { 00664 Q_D(QGraphicsSceneContextMenuEvent); 00665 d->pos = pos; 00666 }
Here is the call graph for this function:

| QPointF QGraphicsSceneContextMenuEvent::scenePos | ( | ) | const |
Returns the position of the mouse cursor in scene coordinates at the moment the the context menu was requested.
Definition at line 674 of file qgraphicssceneevent.cpp.
References QEvent::d.
00675 { 00676 Q_D(const QGraphicsSceneContextMenuEvent); 00677 return d->scenePos; 00678 }
| void QGraphicsSceneContextMenuEvent::setScenePos | ( | const QPointF & | pos | ) |
Definition at line 687 of file qgraphicssceneevent.cpp.
References QEvent::d, and pos().
Referenced by QGraphicsView::contextMenuEvent().
00688 { 00689 Q_D(QGraphicsSceneContextMenuEvent); 00690 d->scenePos = pos; 00691 }
Here is the call graph for this function:

| QPoint QGraphicsSceneContextMenuEvent::screenPos | ( | ) | const |
Returns the position of the mouse cursor in screen coordinates at the moment the the context menu was requested.
Definition at line 699 of file qgraphicssceneevent.cpp.
References QEvent::d.
Referenced by QTextControl::processEvent().
00700 { 00701 Q_D(const QGraphicsSceneContextMenuEvent); 00702 return d->screenPos; 00703 }
| void QGraphicsSceneContextMenuEvent::setScreenPos | ( | const QPoint & | pos | ) |
Definition at line 712 of file qgraphicssceneevent.cpp.
References QEvent::d, and pos().
Referenced by QGraphicsView::contextMenuEvent().
00713 { 00714 Q_D(QGraphicsSceneContextMenuEvent); 00715 d->screenPos = pos; 00716 }
Here is the call graph for this function:

| Qt::KeyboardModifiers QGraphicsSceneContextMenuEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers in use when the context menu was requested.
Definition at line 721 of file qgraphicssceneevent.cpp.
References QEvent::d.
00722 { 00723 Q_D(const QGraphicsSceneContextMenuEvent); 00724 return d->modifiers; 00725 }
| void QGraphicsSceneContextMenuEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Definition at line 733 of file qgraphicssceneevent.cpp.
References QEvent::d.
Referenced by QGraphicsView::contextMenuEvent().
00734 { 00735 Q_D(QGraphicsSceneContextMenuEvent); 00736 d->modifiers = modifiers; 00737 }
| QGraphicsSceneContextMenuEvent::Reason QGraphicsSceneContextMenuEvent::reason | ( | ) | const |
Returns the reason for the context menu event.
Definition at line 744 of file qgraphicssceneevent.cpp.
References QEvent::d.
00745 { 00746 Q_D(const QGraphicsSceneContextMenuEvent); 00747 return d->reason; 00748 }
| void QGraphicsSceneContextMenuEvent::setReason | ( | Reason | reason | ) |
Sets the reason for the context menu event to reason.
Definition at line 755 of file qgraphicssceneevent.cpp.
References QEvent::d.
Referenced by QGraphicsView::contextMenuEvent().
00756 { 00757 Q_D(QGraphicsSceneContextMenuEvent); 00758 d->reason = reason; 00759 }
1.5.1