com.trolltech.qt.gui
Class QHoverEvent
java.lang.Object
com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QEvent
com.trolltech.qt.gui.QHoverEvent
- All Implemented Interfaces:
- QtJambiInterface
public class QHoverEvent
- extends QEvent
The QHoverEvent
class contains parameters that describe a mouse event. Mouse events occur when a mouse cursor is moved into, out of, or within a widget, and if the widget has the Qt::WA_Hover
attribute.
The function pos()
gives the current cursor position, while oldPos()
gives the old mouse position.
Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent |
QEvent.Type |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
currentSender |
Method Summary |
QPoint |
oldPos()
Returns the previous position of the mouse cursor, relative to the widget that received the event. |
QPoint |
pos()
Returns the position of the mouse cursor, relative to the widget that received the event. |
java.lang.String |
toString()
Returns a string representation of the this QHoverEvent. |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QHoverEvent
public QHoverEvent(QEvent.Type type,
QPoint pos,
QPoint oldPos)
- Constructs a hover event object.
The type parameter must be QEvent::HoverEnter
, QEvent::HoverLeave
, or QEvent::HoverMove
.
The pos is the current mouse cursor's position relative to the receiving widget, while oldPos is the previous mouse cursor's position relative to the receiving widget.
oldPos
public final QPoint oldPos()
- Returns the previous position of the mouse cursor, relative to the widget that received the event. If there is no previous position,
oldPos()
will return the same position as pos()
. On QEvent::HoverEnter
events, this position will always be QPoint
(-1, -1).
- See also:
pos()
.
pos
public final QPoint pos()
- Returns the position of the mouse cursor, relative to the widget that received the event.
On QEvent::HoverLeave
events, this position will always be QPoint
(-1, -1).
- See also:
oldPos()
.
toString
public java.lang.String toString()
- Returns a string representation of the this QHoverEvent.
- Overrides:
toString
in class QEvent