CopperSpice API  1.7.2
QAccessibleEvent Class Reference

Base class for accessibility notifications. More...

Inherited by QAccessibleStateChangeEvent, QAccessibleTableModelChangeEvent, QAccessibleTextCursorEvent, and QAccessibleValueChangeEvent.

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 
)
inline

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

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

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 ( )
virtual

Destroys the QAccessibleEvent.

Method Documentation

QAccessibleInterface * QAccessibleEvent::accessibleInterface ( ) const
virtual

Returns the QAccessibleInterface associated with the event.

int QAccessibleEvent::child ( ) const
inline

Returns the child index.

See also
setChild()
QObject * QAccessibleEvent::object ( ) const
inline

Returns the event object.

void QAccessibleEvent::setChild ( int  child)
inline

Sets the child index to child.

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

Returns the event type.