285 #ifndef QT_NO_GRAPHICSVIEW 288 #include <QtCore/qdebug.h> 290 #include <QtCore/qmap.h> 291 #include <QtCore/qpoint.h> 292 #include <QtCore/qsize.h> 293 #include <QtCore/qstring.h> 296 #include <QtGui/qgesture.h> 297 #include <private/qevent_p.h> 487 return d->buttonDownPos.value(button);
496 d->buttonDownPos.insert(button, pos);
508 return d->buttonDownScenePos.value(button);
517 d->buttonDownScenePos.insert(button, pos);
529 return d->buttonDownScreenPos.value(button);
538 d->buttonDownScreenPos.insert(button, pos);
573 return d->lastScenePos;
582 d->lastScenePos =
pos;
596 return d->lastScreenPos;
605 d->lastScreenPos =
pos;
842 return d->orientation;
1120 return d->screenPos;
1179 return d->lastScenePos;
1188 d->lastScenePos =
pos;
1206 return d->lastScreenPos;
1215 d->lastScreenPos =
pos;
1229 return d->modifiers;
1311 return d->screenPos;
1335 : source(0), mimeData(0)
1437 return d->screenPos;
1493 return d->modifiers;
1523 return d->possibleActions;
1539 d->possibleActions = actions;
1553 return d->proposedAction;
1571 d->proposedAction = action;
1588 d->dropAction =
d->proposedAction;
1602 return d->dropAction;
1617 d->dropAction = action;
1802 #endif // QT_NO_GRAPHICSVIEW Qt::DropAction dropAction() const
Returns the action that was performed in this drag and drop.
const QMimeData * mimeData() const
This function returns the MIME data of the event.
void setModifiers(Qt::KeyboardModifiers modifiers)
void setSource(QWidget *source)
This function set the source widget, i.
Qt::KeyboardModifiers modifiers
void setScenePos(const QPointF &pos)
Sets the scene position of the mouse to pos.
virtual ~QGraphicsSceneEventPrivate()
QPointF scenePos() const
Returns the position of the mouse cursor in scene coordinates at the moment the help event was sent...
QPoint screenPos() const
Returns the mouse cursor position in screen coordinates.
void setNewSize(const QSizeF &size)
Qt::Orientation orientation
#define QT_END_NAMESPACE
This macro expands to.
QScopedPointer< QGraphicsSceneEventPrivate > d_ptr
QGraphicsSceneHelpEvent(Type type=None)
Constructs a graphics scene help event of the specified type.
void setModifiers(Qt::KeyboardModifiers modifiers)
void setScenePos(const QPointF &pos)
Sets the position associated with the context menu to the given point in scene coordinates.
void setLastPos(const QPointF &pos)
QGraphicsSceneDragDropEvent(Type type=None)
Constructs a new QGraphicsSceneDragDropEvent of the specified type.
Qt::DropAction dropAction
QSizeF oldSize() const
Returns the old size (i.e., the size immediately before the widget was resized).
~QGraphicsSceneWheelEvent()
Destroys the QGraphicsSceneWheelEvent.
void setButtonDownScenePos(Qt::MouseButton button, const QPointF &pos)
QGraphicsSceneEvent * q_ptr
void setScreenPos(const QPoint &pos)
void setMimeData(const QMimeData *data)
This function sets the MIME data for the event.
~QGraphicsSceneResizeEvent()
Destroys the QGraphicsSceneResizeEvent.
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)
Qt::DropActions possibleActions
The QPointF class defines a point in the plane using floating point precision.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
static Qt::MouseButtons buttons
QGraphicsSceneEvent(Type type)
Constructs a generic graphics scene event of the specified type.
Qt::MouseButton button() const
Returns the mouse button (if any) that caused the event.
~QGraphicsSceneHelpEvent()
Destroys the event.
Qt::MouseButtons buttons() const
Returns a Qt::MouseButtons value indicating which buttons were pressed on the mouse when this mouse e...
void setButtonDownPos(Qt::MouseButton button, const QPointF &pos)
QWidget * widget() const
Returns the widget where the event originated, or 0 if the event originates from another application...
~QGraphicsSceneMouseEvent()
Destroys the event.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers that were pressed when the drag and drop event was created...
void setButtons(Qt::MouseButtons buttons)
void setOldSize(const QSizeF &size)
void setScenePos(const QPointF &pos)
QPointF newPos() const
Returns the new position (i.e., the current position).
void setWidget(QWidget *widget)
Sets the widget related to this event.
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework...
Qt::KeyboardModifiers modifiers
The QSizeF class defines the size of a two-dimensional object using floating point precision...
void setButtons(Qt::MouseButtons buttons)
QPointF pos() const
Returns the position of the cursor in item coordinates when the wheel event occurred.
QPointF buttonDownScenePos(Qt::MouseButton button) const
Returns the mouse cursor position in scene coordinates where the specified button was clicked...
QPointF lastScenePos() const
Returns the last recorded, the scene coordinates of the previous mouse or hover event received by the...
QGraphicsSceneResizeEventPrivate()
QWidget * source() const
This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent.
QPointF lastScenePos() const
Returns the last recorded mouse cursor position in scene coordinates.
#define QT_BEGIN_NAMESPACE
This macro expands to.
~QGraphicsSceneEvent()
Destroys the event.
void setPos(const QPointF &pos)
QGraphicsSceneMouseEvent(Type type=None)
Constructs a generic graphics scene mouse event of the specified type.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers at the moment the hover event was sent.
Qt::MouseButtons buttons() const
Returns the mouse buttons that were pressed when the wheel event occurred.
void setPossibleActions(Qt::DropActions actions)
Sets the possible drop actions that the drag can result in to actions.
QMap< Qt::MouseButton, QPoint > buttonDownScreenPos
void setScreenPos(const QPoint &pos)
Sets the position associated with the context menu to the given point in screen coordinates.
void setDropAction(Qt::DropAction action)
This function lets the receiver of the drop set the drop action that was performed to action...
void setModifiers(Qt::KeyboardModifiers modifiers)
Sets the modifiers for the current hover event to modifiers.
void setPos(const QPointF &pos)
Sets the position of the mouse to pos; this should be relative to the widget that generated the event...
const QMimeData * mimeData
void setOldPos(const QPointF &pos)
QPoint screenPos() const
Returns the position of the cursor in screen coordinates when the wheel event occurred.
void setPos(const QPointF &pos)
QMap< Qt::MouseButton, QPointF > buttonDownScenePos
QPoint screenPos() const
Returns the position of the mouse relative to the screen.
static const char * data(const QByteArray &arr)
The QGraphicsSceneEvent class provides a base class for all graphics view related events...
The QMimeData class provides a container for data that records information about its MIME type...
QGraphicsSceneWheelEvent(Type type=None)
Constructs a QGraphicsSceneWheelEvent of type type, which is always QEvent::GraphicsSceneWheel.
void setLastScenePos(const QPointF &pos)
void acceptProposedAction()
Sets the proposed action as accepted, i.e, the drop action is set to the proposed action...
QPoint screenPos() const
Returns the position of the mouse cursor in screen coordinates at the moment the help event was sent...
QPointF oldPos() const
Returns the old position (i.e., the position immediately before the widget was moved).
QGraphicsSceneResizeEvent()
Constructs a QGraphicsSceneResizeEvent.
Qt::DropAction proposedAction() const
Returns the drop action that is proposed, i.e., preferred.
QPointF lastPos() const
Returns the last recorded mouse cursor position in item coordinates.
Qt::DropActions possibleActions() const
Returns the possible drop actions that the drag and drop can result in.
QGraphicsSceneWheelEventPrivate()
~QGraphicsSceneMoveEvent()
Destroys the QGraphicsSceneMoveEvent.
QGraphicsSceneEventPrivate()
The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
QGraphicsSceneMoveEvent()
Constructs a QGraphicsSceneMoveEvent.
void setLastScreenPos(const QPoint &pos)
QPointF scenePos() const
Returns the position of the cursor in scene coordinates when the wheel event occurred.
#define Q_DECLARE_PUBLIC(Class)
int delta() const
Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree.
QSizeF newSize() const
Returns the new size (i.e., the current size).
void setScreenPos(const QPoint &pos)
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
Type
This enum type defines the valid event types in Qt.
QPoint lastScreenPos() const
Returns the last recorded mouse cursor position in screen coordinates.
QPointF scenePos() const
Returns the mouse cursor position in scene coordinates.
void setLastScenePos(const QPointF &pos)
The QPoint class defines a point in the plane using integer precision.
QGraphicsSceneMoveEventPrivate()
~QGraphicsSceneDragDropEvent()
Destroys the object.
void setModifiers(Qt::KeyboardModifiers modifiers)
Sets the keyboard modifiers that were pressed when the event was created to modifiers.
void setScreenPos(const QPoint &pos)
Sets the position associated with the hover event to the given point in screen coordinates.
QPointF pos() const
Returns the position of the mouse cursor in item coordinates at the moment the hover event was sent...
QPoint buttonDownScreenPos(Qt::MouseButton button) const
Returns the mouse cursor position in screen coordinates where the specified button was clicked...
void setButtons(Qt::MouseButtons buttons)
Sets the mouse buttons that were pressed when the event was created to buttons.
QGraphicsSceneHoverEvent(Type type=None)
Constructs a graphics scene hover event of the specified type.
void setProposedAction(Qt::DropAction action)
Sets the proposed action to action.
QPointF scenePos() const
Returns the position of the mouse in scene coordinates.
void setPos(const QPointF &pos)
Sets the position associated with the hover event to the given point in item coordinates.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers that were active when the wheel event occurred.
QPointF scenePos() const
Returns the position of the mouse cursor in scene coordinates at the moment the hover event was sent...
QPointF pos() const
Returns the mouse cursor position in item coordinates.
QPointF buttonDownPos(Qt::MouseButton button) const
Returns the mouse cursor position in item coordinates where the specified button was clicked...
QGraphicsSceneDragDropEventPrivate()
QGraphicsSceneMouseEventPrivate()
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers in use at the time the event was sent.
QMap< Qt::MouseButton, QPointF > buttonDownPos
QPoint lastScreenPos() const
Returns the last recorded mouse cursor position in screen coordinates.
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
Qt::KeyboardModifiers modifiers
void setLastScreenPos(const QPoint &pos)
Qt::Orientation orientation() const
Returns the wheel orientation.
void setButtonDownScreenPos(Qt::MouseButton button, const QPoint &pos)
void setButton(Qt::MouseButton button)
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
void setOrientation(Qt::Orientation orientation)
void setScreenPos(const QPoint &pos)
Sets the mouse position relative to the screen to pos.
~QGraphicsSceneHoverEvent()
Destroys the event.
void setNewPos(const QPointF &pos)
Qt::DropAction proposedAction
Qt::KeyboardModifiers modifiers
QPointF lastPos() const
Returns the last recorded mouse cursor position in item coordinates.
void setLastPos(const QPointF &pos)
Qt::MouseButtons buttons() const
Returns the combination of mouse buttons that were pressed at the time the event was sent...
void setScenePos(const QPointF &pos)
Sets the position associated with the hover event to the given point in scene coordinates.
QPointF pos() const
Returns the mouse position of the event relative to the view that sent the event. ...
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.