226#ifndef QT_NO_DEBUG_STREAM
227#include <QtCore/qdebug.h>
228#include <private/qdebug_p.h>
230#include <QtCore/qmap.h>
231#include <QtCore/qpoint.h>
232#include <QtCore/qsize.h>
233#include <QtCore/qstring.h>
236#include <QtWidgets/qgesture.h>
237#include <private/qevent_p.h>
437 return d->buttonDownPos.value(
button);
458 return d->buttonDownScenePos.value(
button);
479 return d->buttonDownScreenPos.value(
button);
523 return d->lastScenePos;
532 d->lastScenePos =
pos;
546 return d->lastScreenPos;
555 d->lastScreenPos =
pos;
844 return d->orientation;
866 return d->scrollPhase;
875 d->scrollPhase = scrollPhase;
891 return d->pixelDelta;
920 d->inverted = inverted;
1012 return d->screenPos;
1034 return d->modifiers;
1160 return d->screenPos;
1210 return d->lastScenePos;
1219 d->lastScenePos =
pos;
1234 return d->lastScreenPos;
1243 d->lastScreenPos =
pos;
1254 return d->modifiers;
1327 return d->screenPos;
1441 return d->screenPos;
1491 return d->modifiers;
1518 return d->possibleActions;
1531 d->possibleActions = actions;
1545 return d->proposedAction;
1560 d->proposedAction = action;
1577 d->dropAction =
d->proposedAction;
1591 return d->dropAction;
1607 d->dropAction = action;
1784#ifndef QT_NO_DEBUG_STREAM
1785template <
class Event>
1790 debug <<
", scenePos=";
1792 debug <<
", screenPos=";
1801 debug <<
"QGraphicsSceneEvent(0)";
1813 const Qt::MouseButtons buttons = me->
buttons();
1814 debug <<
"QGraphicsSceneMouseEvent(";
1820 if (buttons &&
button != buttons) {
1821 debug <<
", buttons=";
1833 debug <<
"QGraphicsSceneContextMenuEvent(reason=" << ce->
reason();
1842 debug <<
"QGraphicsSceneHoverEvent(";
1853 debug <<
"QGraphicsSceneDragDropEvent(proposedAction=";
1855 debug <<
", possibleActions=";
1865 debug <<
"QGraphicsSceneWheelEvent(";
Type
This enum type defines the valid event types in Qt.
@ GraphicsSceneContextMenu
@ GraphicsSceneMouseRelease
@ GraphicsSceneMousePress
@ GraphicsSceneHoverLeave
@ GraphicsSceneMouseDoubleClick
@ GraphicsSceneHoverEnter
Qt::KeyboardModifiers modifiers
QGraphicsSceneDragDropEventPrivate()
Qt::DropAction dropAction
const QMimeData * mimeData
Qt::DropActions possibleActions
Qt::DropAction proposedAction
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
void setButtons(Qt::MouseButtons buttons)
void setMimeData(const QMimeData *data)
void setPossibleActions(Qt::DropActions actions)
void setProposedAction(Qt::DropAction action)
void setModifiers(Qt::KeyboardModifiers modifiers)
~QGraphicsSceneDragDropEvent()
Destroys the object.
Qt::DropAction dropAction() const
Returns the action that was performed in this drag and drop.
void setDropAction(Qt::DropAction action)
This function lets the receiver of the drop set the drop action that was performed to action,...
Qt::DropActions possibleActions() const
Returns the possible drop actions that the drag and drop can result in.
void setSource(QWidget *source)
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers that were pressed when the drag and drop event was created.
void setScreenPos(const QPoint &pos)
void setPos(const QPointF &pos)
Qt::MouseButtons buttons() const
Returns a Qt::MouseButtons value indicating which buttons were pressed on the mouse when this mouse e...
const QMimeData * mimeData() const
This function returns the MIME data of the event.
void acceptProposedAction()
Sets the proposed action as accepted, i.e, the drop action is set to the proposed action.
QWidget * source() const
This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent.
void setScenePos(const QPointF &pos)
QPoint screenPos() const
Returns the position of the mouse relative to the screen.
QPointF scenePos() const
Returns the position of the mouse in scene coordinates.
QGraphicsSceneDragDropEvent(Type type=None)
Qt::DropAction proposedAction() const
Returns the drop action that is proposed, i.e., preferred.
QPointF pos() const
Returns the mouse position of the event relative to the view that sent the event.
QGraphicsSceneEvent * q_ptr
QGraphicsSceneEventPrivate()
virtual ~QGraphicsSceneEventPrivate()
The QGraphicsSceneEvent class provides a base class for all graphics view related events.
QScopedPointer< QGraphicsSceneEventPrivate > d_ptr
~QGraphicsSceneEvent()
Destroys the event.
void setWidget(QWidget *widget)
QGraphicsSceneEvent(Type type)
void setTimestamp(quint64 ts)
QWidget * widget() const
Returns the widget where the event originated, or \nullptr if the event originates from another appli...
quint64 timestamp() const
The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
QPoint screenPos() const
Returns the position of the mouse cursor in screen coordinates at the moment the help event was sent.
QGraphicsSceneHelpEvent(Type type=None)
QPointF scenePos() const
Returns the position of the mouse cursor in scene coordinates at the moment the help event was sent.
void setScenePos(const QPointF &pos)
~QGraphicsSceneHelpEvent()
Destroys the event.
void setScreenPos(const QPoint &pos)
Qt::KeyboardModifiers modifiers
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
void setScreenPos(const QPoint &pos)
void setPos(const QPointF &pos)
QPoint lastScreenPos() const
QPointF pos() const
Returns the position of the mouse cursor in item coordinates at the moment the hover event was sent.
void setLastPos(const QPointF &pos)
QPoint screenPos() const
Returns the position of the mouse cursor in screen coordinates at the moment the hover event was sent...
void setScenePos(const QPointF &pos)
QPointF scenePos() const
Returns the position of the mouse cursor in scene coordinates at the moment the hover event was sent.
void setModifiers(Qt::KeyboardModifiers modifiers)
QPointF lastScenePos() const
QGraphicsSceneHoverEvent(Type type=None)
~QGraphicsSceneHoverEvent()
Destroys the event.
void setLastScenePos(const QPointF &pos)
void setLastScreenPos(const QPoint &pos)
Qt::KeyboardModifiers modifiers() const
QMap< Qt::MouseButton, QPointF > buttonDownScenePos
QGraphicsSceneMouseEventPrivate()
QMap< Qt::MouseButton, QPointF > buttonDownPos
Qt::KeyboardModifiers modifiers
Qt::MouseEventFlags flags
QMap< Qt::MouseButton, QPoint > buttonDownScreenPos
Qt::MouseEventSource source
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
Qt::MouseButton button() const
Returns the mouse button (if any) that caused the event.
void setFlags(Qt::MouseEventFlags)
QPointF pos() const
Returns the mouse cursor position in item coordinates.
void setButtonDownPos(Qt::MouseButton button, const QPointF &pos)
QPointF lastScenePos() const
Returns the last recorded mouse cursor position in scene coordinates.
QPointF buttonDownScenePos(Qt::MouseButton button) const
Returns the mouse cursor position in scene coordinates where the specified button was clicked.
Qt::MouseEventFlags flags() const
QGraphicsSceneMouseEvent(Type type=None)
void setLastScenePos(const QPointF &pos)
Qt::MouseEventSource source() const
~QGraphicsSceneMouseEvent()
Destroys the event.
QPoint buttonDownScreenPos(Qt::MouseButton button) const
Returns the mouse cursor position in screen coordinates where the specified button was clicked.
void setLastPos(const QPointF &pos)
QPoint lastScreenPos() const
Returns the last recorded mouse cursor position in screen coordinates.
void setButton(Qt::MouseButton button)
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers in use at the time the event was sent.
void setScenePos(const QPointF &pos)
QPoint screenPos() const
Returns the mouse cursor position in screen coordinates.
void setPos(const QPointF &pos)
Qt::MouseButtons buttons() const
Returns the combination of mouse buttons that were pressed at the time the event was sent.
void setButtonDownScenePos(Qt::MouseButton button, const QPointF &pos)
void setButtons(Qt::MouseButtons buttons)
QPointF lastPos() const
Returns the last recorded mouse cursor position in item coordinates.
QPointF scenePos() const
Returns the mouse cursor position in scene coordinates.
void setModifiers(Qt::KeyboardModifiers modifiers)
void setButtonDownScreenPos(Qt::MouseButton button, const QPoint &pos)
void setLastScreenPos(const QPoint &pos)
QPointF buttonDownPos(Qt::MouseButton button) const
Returns the mouse cursor position in item coordinates where the specified button was clicked.
void setSource(Qt::MouseEventSource source)
void setScreenPos(const QPoint &pos)
QGraphicsSceneMoveEventPrivate()
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
QPointF oldPos() const
Returns the old position (i.e., the position immediately before the widget was moved).
void setOldPos(const QPointF &pos)
QPointF newPos() const
Returns the new position (i.e., the current position).
void setNewPos(const QPointF &pos)
QGraphicsSceneMoveEvent()
Constructs a QGraphicsSceneMoveEvent.
~QGraphicsSceneMoveEvent()
Destroys the QGraphicsSceneMoveEvent.
QGraphicsSceneResizeEventPrivate()
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
QSizeF oldSize() const
Returns the old size (i.e., the size immediately before the widget was resized).
void setOldSize(const QSizeF &size)
QSizeF newSize() const
Returns the new size (i.e., the current size).
~QGraphicsSceneResizeEvent()
Destroys the QGraphicsSceneResizeEvent.
QGraphicsSceneResizeEvent()
Constructs a QGraphicsSceneResizeEvent.
void setNewSize(const QSizeF &size)
Qt::Orientation orientation
Qt::ScrollPhase scrollPhase
QGraphicsSceneWheelEventPrivate()=default
Qt::KeyboardModifiers modifiers
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
void setScreenPos(const QPoint &pos)
void setPixelDelta(QPoint delta)
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers that were active when the wheel event occurred.
void setInverted(bool inverted)
Qt::Orientation orientation() const
Returns the wheel orientation.
QGraphicsSceneWheelEvent(Type type=None)
void setButtons(Qt::MouseButtons buttons)
bool isInverted() const
Returns whether the delta values delivered with the event are inverted.
void setPos(const QPointF &pos)
Qt::MouseButtons buttons() const
Returns the mouse buttons that were pressed when the wheel event occurred.
void setScenePos(const QPointF &pos)
void setOrientation(Qt::Orientation orientation)
Qt::ScrollPhase phase() const
int delta() const
Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree.
QPoint pixelDelta() const
QPointF pos() const
Returns the position of the cursor in item coordinates when the wheel event occurred.
void setModifiers(Qt::KeyboardModifiers modifiers)
void setPhase(Qt::ScrollPhase scrollPhase)
QPoint screenPos() const
Returns the position of the cursor in screen coordinates when the wheel event occurred.
~QGraphicsSceneWheelEvent()
Destroys the QGraphicsSceneWheelEvent.
QPointF scenePos() const
Returns the position of the cursor in scene coordinates when the wheel event occurred.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
EGLImageKHR int int EGLuint64KHR * modifiers
Combined button and popup list for selecting options.
static void formatNonNullQEnum(QDebug &debug, const char *prefix, QEnum value)
static void formatQEnum(QDebug &debug, QEnum value)
static void formatQFlags(QDebug &debug, const QFlags< Enum > &value)
static void formatQPoint(QDebug &debug, const Point &point)
static void formatNonNullQFlags(QDebug &debug, const char *prefix, const QFlags< Enum > &value)
static void formatPositions(QDebug &debug, const Event *event)
QDebug operator<<(QDebug debug, const QGraphicsSceneEvent *event)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLsizei GLchar * source
unsigned long long quint64