com.trolltech.qt.gui
Class QHoverEvent

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QEvent
              extended by 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 Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent
QEvent.Type
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
QHoverEvent(QEvent.Type type, QPoint pos, QPoint oldPos)
          Constructs a hover event object.
 
Method Summary
static QHoverEvent fromNativePointer(QNativePointer nativePointer)
          This function returns the QHoverEvent instance pointed to by nativePointer
 QPoint oldPos()
          Returns the previous position of the mouse cursor, relative to the widget that received the event.
protected  QPoint op()
          This method is used internally by Qt Jambi.
protected  QPoint p()
          This method is used internally by Qt Jambi.
 QPoint pos()
          Returns the position of the mouse cursor, relative to the widget that received the event.
protected  void setOp(QPoint op)
          This method is used internally by Qt Jambi.
protected  void setP(QPoint p)
          This method is used internally by Qt Jambi.
 
Methods inherited from class com.trolltech.qt.core.QEvent
accept, ignore, isAccepted, setAccepted, setT, spontaneous, t, type
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

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.

Method Detail

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

setOp

protected final void setOp(QPoint op)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
op

op

protected final QPoint op()

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
setOp

setP

protected final void setP(QPoint p)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
p

p

protected final QPoint p()

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
setP

fromNativePointer

public static QHoverEvent fromNativePointer(QNativePointer nativePointer)
This function returns the QHoverEvent instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.