QHelpEvent Class Reference

#include <qevent.h>

Inheritance diagram for QHelpEvent:

Inheritance graph
[legend]
Collaboration diagram for QHelpEvent:

Collaboration graph
[legend]
List of all members.

Detailed Description

The QHelpEvent class provides an event that is used to request helpful information about a particular point in a widget.

This event can be intercepted in applications to provide tooltips or "What's This?" help for custom widgets. The type() can be either QEvent::ToolTip or QEvent::WhatsThis.

See also:
QToolTip, QWhatsThis, QStatusTipEvent, QWhatsThisClickedEvent

Definition at line 544 of file qevent.h.

Public Member Functions

 QHelpEvent (Type type, const QPoint &pos, const QPoint &globalPos)
 ~QHelpEvent ()
int x () const
int y () const
int globalX () const
int globalY () const
const QPointpos () const
const QPointglobalPos () const

Private Attributes

QPoint p
QPoint gp


Constructor & Destructor Documentation

QHelpEvent::QHelpEvent ( Type  type,
const QPoint pos,
const QPoint globalPos 
)

Constructs a help event with the given type corresponding to the widget-relative position specified by pos and the global position specified by globalPos.

type must be either QEvent::ToolTip or QEvent::WhatsThis.

See also:
pos(), globalPos()

Definition at line 2541 of file qevent.cpp.

02542     : QEvent(type), p(pos), gp(globalPos)
02543 {}

QHelpEvent::~QHelpEvent (  ) 

Definition at line 2597 of file qevent.cpp.

02598 {
02599 }


Member Function Documentation

int QHelpEvent::x (  )  const [inline]

Same as pos().x().

See also:
y(), pos(), globalPos()

Definition at line 550 of file qevent.h.

References p.

00550 { return p.x(); }

int QHelpEvent::y (  )  const [inline]

Same as pos().y().

See also:
x(), pos(), globalPos()

Definition at line 551 of file qevent.h.

References p.

00551 { return p.y(); }

int QHelpEvent::globalX (  )  const [inline]

Same as globalPos().x().

See also:
x(), globalY(), globalPos()

Definition at line 552 of file qevent.h.

00552 { return gp.x(); }

int QHelpEvent::globalY (  )  const [inline]

Same as globalPos().y().

See also:
y(), globalX(), globalPos()

Definition at line 553 of file qevent.h.

00553 { return gp.y(); }

const QPoint & QHelpEvent::pos (  )  const [inline]

Returns the mouse cursor position when the event was generated, relative to the widget to which the event is dispatched.

See also:
globalPos(), x(), y()

Definition at line 555 of file qevent.h.

References p.

Referenced by Q3IconView::eventFilter(), Q3ListView::eventFilter(), QAbstractItemView::viewportEvent(), and QHeaderView::viewportEvent().

00555 { return p; }

const QPoint & QHelpEvent::globalPos (  )  const [inline]

Returns the mouse cursor position when the event was generated in global coordinates.

See also:
pos(), globalX(), globalY()

Definition at line 556 of file qevent.h.

Referenced by Q3IconView::eventFilter(), Q3ListView::eventFilter(), QAbstractItemView::viewportEvent(), and QHeaderView::viewportEvent().

00556 { return gp; }


Member Data Documentation

QPoint QHelpEvent::p [private]

Definition at line 559 of file qevent.h.

QPoint QHelpEvent::gp [private]

Definition at line 560 of file qevent.h.


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 17:58:54 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1