QAccessibleEvent Class Reference

#include <qaccessible.h>

Inheritance diagram for QAccessibleEvent:

Inheritance graph
[legend]
Collaboration diagram for QAccessibleEvent:

Collaboration graph
[legend]
List of all members.

Detailed Description

The QAccessibleEvent class is used to query addition accessibility information about complex widgets.

The event can be of type QEvent::AccessibilityDescription or QEvent::AccessibilityHelp.

Some QAccessibleInterface implementations send QAccessibleEvents to the widget they wrap to obtain the description or help text of a widget or of its children. The widget can answer by calling setValue() with the requested information.

The default QWidget::event() implementation simply sets the text to be the widget's {QWidget::toolTip}{tooltip} (for AccessibilityDescription event) or its {QWidget::whatsThis}{"What's This?" text} (for AccessibilityHelp event).

Definition at line 325 of file qaccessible.h.

Public Member Functions

 QAccessibleEvent (Type type, int child)
int child () const
QString value () const
void setValue (const QString &aText)

Private Attributes

int c
QString val


Constructor & Destructor Documentation

QAccessibleEvent::QAccessibleEvent ( Type  type,
int  child 
) [inline]

Constructs an accessibility event of the given type, which must be QEvent::AccessibilityDescription or QEvent::AccessibilityHelp.

child is the (1-based) index of the child to which the request applies. If child is 0, the request is for the widget itself.

See also:
child()

Definition at line 338 of file qaccessible.h.

00339     : QEvent(atype), c(achild) {}


Member Function Documentation

int QAccessibleEvent::child (  )  const [inline]

Returns the (1-based) index of the child to which the request applies. If the child is 0, the request is for the widget itself.

Definition at line 329 of file qaccessible.h.

References c.

Referenced by QWidget::event().

00329 { return c; }

QString QAccessibleEvent::value (  )  const [inline]

Returns the text set using setValue().

See also:
setValue()

Definition at line 330 of file qaccessible.h.

References val.

Referenced by Q3AccessibleHeader::text(), and QAccessibleHeader::text().

00330 { return val; }

void QAccessibleEvent::setValue ( const QString text  )  [inline]

Set the description or help text for the given child() to text, thereby answering the request.

See also:
value()

Definition at line 331 of file qaccessible.h.

References val.

Referenced by QWidget::event().

00331 { val = aText; }


Member Data Documentation

int QAccessibleEvent::c [private]

Definition at line 334 of file qaccessible.h.

QString QAccessibleEvent::val [private]

Definition at line 335 of file qaccessible.h.


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