|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QAccessible
public class QAccessible
The QAccessible class provides enums and static functions relating to accessibility.
Accessible applications can be used by people who are not able to use applications by conventional means.
The functions in this class are used for communication between accessible applications (also called AT Servers) and accessibility tools (AT Clients), such as screen readers and braille displays. Clients and servers communicate in the following way:
The communication between servers and clients is initialized by the setRootObject function. Function pointers can be installed to replace or extend the default behavior of the static functions in QAccessible.
Qt supports Microsoft Active Accessibility (MSAA), Mac OS X Accessibility, and the Unix/X11 AT-SPI standard. Other backends can be supported using QAccessibleBridge.
In addition to QAccessible's static functions, Qt offers one generic interface, QAccessibleInterface, that can be used to wrap all widgets and objects (e.g., QPushButton). This single interface provides all the metadata necessary for the assistive technologies. Qt provides implementations of this interface for its built-in widgets as plugins.
When you develop custom widgets, you can create custom subclasses of QAccessibleInterface and distribute them as plugins (using QAccessiblePlugin) or compile them into the application. Likewise, Qt's predefined accessibility support can be built as plugin (the default) or directly into the Qt library. The main advantage of using plugins is that the accessibility classes are only loaded into memory if they are actually used; they don't slow down the common case where no assistive technology is being used.
Qt also includes two convenience classes, QAccessibleObject and QAccessibleWidget, that inherit from QAccessibleInterface and provide the lowest common denominator of metadata (e.g., widget geometry, window title, basic help text). You can use them as base classes when wrapping your custom QObject or QWidget subclasses.
Nested Class Summary | |
---|---|
static class |
QAccessible.Action
This enum describes the possible types of action that can occur. |
static class |
QAccessible.Event
This enum type defines accessible event types. |
static class |
QAccessible.Method
This enum describes the possible types of methods that can be invoked on an accessible object. |
static class |
QAccessible.Relation
This QFlag class provides flags for the int enum. |
static class |
QAccessible.RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two accessible objects. |
static class |
QAccessible.Role
This enum defines the role of an accessible object. |
static class |
QAccessible.State
This QFlag class provides flags for the int enum. |
static class |
QAccessible.StateFlag
This enum type defines bit flags that can be combined to indicate the state of an accessible object. |
static class |
QAccessible.Text
This enum specifies string information that an accessible object returns. |
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> |
Method Summary | |
---|---|
static QAccessible |
fromNativePointer(QNativePointer nativePointer)
This function returns the QAccessible instance pointed to by nativePointer |
static boolean |
isActive()
Returns true if an accessibility implementation has been requested during the runtime of the application; otherwise returns false. |
static QAccessibleInterface |
queryAccessibleInterface(QObject arg__1)
If a QAccessibleInterface implementation exists for the given arg__1, this function returns a pointer to the implementation; otherwise it returns 0. |
static void |
setRootObject(QObject arg__1)
Sets the root accessible object of this application to arg__1. |
static void |
updateAccessibility(QObject arg__1,
int who,
QAccessible.Event reason)
Notifies accessibility clients about a change in arg__1's accessibility information. |
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 |
Method Detail |
---|
public static boolean isActive()
Returns true if an accessibility implementation has been requested during the runtime of the application; otherwise returns false.
Use this function to prevent potentially expensive notifications via updateAccessibility.
public static QAccessibleInterface queryAccessibleInterface(QObject arg__1)
If a QAccessibleInterface implementation exists for the given arg__1, this function returns a pointer to the implementation; otherwise it returns 0.
The function calls all installed factory functions (from most recently installed to least recently installed) until one is found that provides an interface for the class of arg__1. If no factory can provide an accessibility implementation for the class the function loads installed accessibility plugins, and tests if any of the plugins can provide the implementation.
If no implementation for the object's class is available, the function tries to find an implementation for the object's parent class, using the above strategy.
Warning: The caller is responsible for deleting the returned interface after use.
public static void setRootObject(QObject arg__1)
Sets the root accessible object of this application to arg__1. All other accessible objects in the application can be reached by the client using object navigation.
You should never need to call this function. Qt sets the QApplication object as the root object immediately before the event loop is entered in QApplication::exec().
Use QAccessible::installRootObjectHandler() to redirect the function call to a customized handler function.
public static void updateAccessibility(QObject arg__1, int who, QAccessible.Event reason)
Notifies accessibility clients about a change in arg__1's accessibility information.
reason specifies the cause of the change, for example, ValueChange when the position of a slider has been changed. who is the (1-based) index of the child element that has changed. When who is 0, the object itself has changed.
Call this function whenever the state of your accessible object or one of its sub-elements has been changed either programmatically (e.g. by calling QLabel::setText()) or by user interaction.
If there are no accessibility tools listening to this event, the performance penalty for calling this function is small, but if determining the parameters of the call is expensive you can test isActive to avoid unnecessary computations.
public static QAccessible fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |