CopperSpice API  1.8.2
QAccessibleEvent Class Reference

Base class for accessibility notifications. More...

Inheritance diagram for QAccessibleEvent:

Public Methods

 QAccessibleEvent (QAccessibleInterface *interfaceId, QAccessible::Event eventType)
 QAccessibleEvent (QObject *object, QAccessible::Event eventType)
virtual ~QAccessibleEvent ()
virtual QAccessibleInterfaceaccessibleInterface () const
int child () const
QObjectobject () const
void setChild (int child)
QAccessible::Event type () const

Detailed Description

The QAccessibleEvent class is the base class for accessibility notifications. This class was designed to be used with QAccessible::updateAccessibility(). There is an event type associated with every QAccessibleEvent object. Several subclasses exist which can be used to provide more details.

As an example. to notify all QAccessible clients about a focus change, when re-implementing QWidget::setFocus, consider the following code. All accessible events must be sent after the user interface has been updated.

void MyWidget::setFocus(Qt::FocusReason reason) {
// handle custom focus setting
QAccessibleEvent event(this, QAccessible::Focus);

Constructor & Destructor Documentation

QAccessibleEvent::QAccessibleEvent ( QObject object,
QAccessible::Event  eventType 

Constructs a new QAccessibleEvent to notify clients the given object has changed. The eventType describes what changed.

QAccessibleEvent::QAccessibleEvent ( QAccessibleInterface interfaceId,
QAccessible::Event  eventType 

Constructs a QAccessibleEvent to notify clients the object corresponding to the given interfaceID has changed. The eventType describes what changed.

Use this method if you already have a QAccessibleInterface and no QObject. Otherwise call the constructor which accepts a QObject.

QAccessibleEvent::~QAccessibleEvent ( )

Destroys the QAccessibleEvent.

Method Documentation

QAccessibleInterface * QAccessibleEvent::accessibleInterface ( ) const

Returns the QAccessibleInterface associated with the event.

int QAccessibleEvent::child ( ) const

Returns the child index.

See also
QObject * QAccessibleEvent::object ( ) const

Returns the event object.

void QAccessibleEvent::setChild ( int  child)

Sets the child index to child.

See also
QAccessible::Event QAccessibleEvent::type ( ) const

Returns the event type.