QtBase
v6.3.1
|
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Additional Inherited Members | |
Static Public Member Functions inherited from QEvent | |
static int | registerEventType (int hint=-1) noexcept |
Protected Member Functions inherited from QGraphicsSceneEvent | |
QGraphicsSceneEvent (QGraphicsSceneEventPrivate &dd, Type type=None) | |
Protected Member Functions inherited from QEvent | |
QEvent (Type type, InputEventTag) | |
QEvent (Type type, PointerEventTag) | |
QEvent (Type type, SinglePointEventTag) | |
Protected Attributes inherited from QGraphicsSceneEvent | |
QScopedPointer< QGraphicsSceneEventPrivate > | d_ptr |
Protected Attributes inherited from QEvent | |
quint16 | t |
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
\inmodule QtWidgets
A QContextMenuEvent received by a QGraphicsView is translated into a QGraphicsSceneContextMenuEvent. The QContextMenuEvent::globalPos() is translated into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).
Definition at line 178 of file qgraphicssceneevent.h.
This enum describes the reason why the context event was sent.
\value Mouse The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked.
\value Keyboard The keyboard caused this event to be sent. On Windows and \macos, this means the menu button was pressed.
\value Other The event was sent by some other means (i.e. not by the mouse or keyboard).
Enumerator | |
---|---|
Mouse | |
Keyboard | |
Other |
Definition at line 181 of file qgraphicssceneevent.h.
Definition at line 977 of file qgraphicssceneevent.cpp.
QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent | ( | ) |
Destroys the event.
Definition at line 985 of file qgraphicssceneevent.cpp.
Qt::KeyboardModifiers QGraphicsSceneContextMenuEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers in use when the context menu was requested.
Definition at line 1067 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneContextMenuEvent::pos | ( | ) | const |
Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.
Definition at line 995 of file qgraphicssceneevent.cpp.
QGraphicsSceneContextMenuEvent::Reason QGraphicsSceneContextMenuEvent::reason | ( | ) | const |
Returns the reason for the context menu event.
Definition at line 1090 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneContextMenuEvent::scenePos | ( | ) | const |
Returns the position of the mouse cursor in scene coordinates at the moment the context menu was requested.
Definition at line 1020 of file qgraphicssceneevent.cpp.
QPoint QGraphicsSceneContextMenuEvent::screenPos | ( | ) | const |
Returns the position of the mouse cursor in screen coordinates at the moment the context menu was requested.
Definition at line 1045 of file qgraphicssceneevent.cpp.
void QGraphicsSceneContextMenuEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Definition at line 1079 of file qgraphicssceneevent.cpp.
Definition at line 1102 of file qgraphicssceneevent.cpp.
Definition at line 1033 of file qgraphicssceneevent.cpp.
Definition at line 1058 of file qgraphicssceneevent.cpp.