Qt 4.8
|
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Functions | |
QPointF | lastPos () const |
Returns the last recorded mouse cursor position in item coordinates. More... | |
QPointF | lastScenePos () const |
Returns the last recorded, the scene coordinates of the previous mouse or hover event received by the view, that created the event mouse cursor position in scene coordinates. More... | |
QPoint | lastScreenPos () const |
Returns the last recorded mouse cursor position in screen coordinates. More... | |
Qt::KeyboardModifiers | modifiers () const |
Returns the keyboard modifiers at the moment the hover event was sent. More... | |
QPointF | pos () const |
Returns the position of the mouse cursor in item coordinates at the moment the hover event was sent. More... | |
QGraphicsSceneHoverEvent (Type type=None) | |
Constructs a graphics scene hover event of the specified type. More... | |
QPointF | scenePos () const |
Returns the position of the mouse cursor in scene coordinates at the moment the hover event was sent. More... | |
QPoint | screenPos () const |
Returns the position of the mouse cursor in screen coordinates at the moment the hover event was sent. More... | |
void | setLastPos (const QPointF &pos) |
void | setLastScenePos (const QPointF &pos) |
void | setLastScreenPos (const QPoint &pos) |
void | setModifiers (Qt::KeyboardModifiers modifiers) |
Sets the modifiers for the current hover event to modifiers. More... | |
void | setPos (const QPointF &pos) |
Sets the position associated with the hover event to the given point in item coordinates. More... | |
void | setScenePos (const QPointF &pos) |
Sets the position associated with the hover event to the given point in scene coordinates. More... | |
void | setScreenPos (const QPoint &pos) |
Sets the position associated with the hover event to the given point in screen coordinates. More... | |
~QGraphicsSceneHoverEvent () | |
Destroys the event. More... | |
Public Functions inherited from QGraphicsSceneEvent | |
QGraphicsSceneEvent (Type type) | |
Constructs a generic graphics scene event of the specified type. More... | |
void | setWidget (QWidget *widget) |
Sets the widget related to this event. More... | |
QWidget * | widget () const |
Returns the widget where the event originated, or 0 if the event originates from another application. More... | |
~QGraphicsSceneEvent () | |
Destroys the event. More... | |
Public Functions inherited from QEvent | |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
bool | isAccepted () const |
QEvent (Type type) | |
Contructs an event object of type type. More... | |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
Type | type () const |
Returns the event type. More... | |
virtual | ~QEvent () |
Destroys the event. More... | |
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
When a QGraphicsView receives a QHoverEvent event, it translates it into QGraphicsSceneHoverEvent. The event is then forwarded to the QGraphicsScene associated with the view.
Definition at line 195 of file qgraphicssceneevent.h.
Constructs a graphics scene hover event of the specified type.
Definition at line 1043 of file qgraphicssceneevent.cpp.
QGraphicsSceneHoverEvent::~QGraphicsSceneHoverEvent | ( | ) |
QPointF QGraphicsSceneHoverEvent::lastPos | ( | ) | const |
Returns the last recorded mouse cursor position in item coordinates.
Definition at line 1149 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent().
QPointF QGraphicsSceneHoverEvent::lastScenePos | ( | ) | const |
Returns the last recorded, the scene coordinates of the previous mouse or hover event received by the view, that created the event mouse cursor position in scene coordinates.
Definition at line 1176 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsScenePrivate::sendHoverEvent().
QPoint QGraphicsSceneHoverEvent::lastScreenPos | ( | ) | const |
Returns the last recorded mouse cursor position in screen coordinates.
The last recorded position is the position of the previous mouse or hover event received by the view that created the event.
Definition at line 1203 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsScenePrivate::sendHoverEvent().
Qt::KeyboardModifiers QGraphicsSceneHoverEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers at the moment the hover event was sent.
Definition at line 1226 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), QTextControl::processEvent(), QGraphicsScenePrivate::sendHoverEvent(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), and setModifiers().
QPointF QGraphicsSceneHoverEvent::pos | ( | ) | const |
Returns the position of the mouse cursor in item coordinates at the moment the hover event was sent.
Definition at line 1061 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), QGraphicsProxyWidget::hoverMoveEvent(), QTextControl::processEvent(), QGraphicsItemPrivate::remapItemPos(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), setLastPos(), setLastScenePos(), setLastScreenPos(), setPos(), setScenePos(), setScreenPos(), and QGraphicsWidgetPrivate::windowFrameHoverMoveEvent().
QPointF QGraphicsSceneHoverEvent::scenePos | ( | ) | const |
Returns the position of the mouse cursor in scene coordinates at the moment the hover event was sent.
Definition at line 1089 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), QGraphicsScenePrivate::dispatchHoverEvent(), QGraphicsScene::event(), and QGraphicsScenePrivate::sendHoverEvent().
QPoint QGraphicsSceneHoverEvent::screenPos | ( | ) | const |
Returns the position of the mouse cursor in screen coordinates at the moment the hover event was sent.
Definition at line 1117 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), QGraphicsScenePrivate::dispatchHoverEvent(), QTextControl::processEvent(), QGraphicsScenePrivate::sendHoverEvent(), and QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent().
void QGraphicsSceneHoverEvent::setLastPos | ( | const QPointF & | pos | ) |
Definition at line 1158 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), and cloneEvent().
void QGraphicsSceneHoverEvent::setLastScenePos | ( | const QPointF & | pos | ) |
Definition at line 1185 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), and cloneEvent().
void QGraphicsSceneHoverEvent::setLastScreenPos | ( | const QPoint & | pos | ) |
Definition at line 1212 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), and cloneEvent().
void QGraphicsSceneHoverEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Sets the modifiers for the current hover event to modifiers.
Definition at line 1241 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), and cloneEvent().
void QGraphicsSceneHoverEvent::setPos | ( | const QPointF & | point | ) |
Sets the position associated with the hover event to the given point in item coordinates.
Definition at line 1077 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), cloneEvent(), and QGraphicsItemPrivate::remapItemPos().
void QGraphicsSceneHoverEvent::setScenePos | ( | const QPointF & | point | ) |
Sets the position associated with the hover event to the given point in scene coordinates.
Definition at line 1105 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), cloneEvent(), QGraphicsScenePrivate::enterModal(), and QGraphicsScenePrivate::leaveModal().
void QGraphicsSceneHoverEvent::setScreenPos | ( | const QPoint & | point | ) |
Sets the position associated with the hover event to the given point in screen coordinates.
Definition at line 1133 of file qgraphicssceneevent.cpp.
Referenced by _q_hoverFromMouseEvent(), and cloneEvent().