|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.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:
updateAccessibility()
function.QAccessibleInterface
class is the core interface, and encapsulates this information in a pure virtual API. Implementations of the interface are provided by Qt through the queryAccessibleInterface()
API.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.
QAccessibleInterface
.
Nested Class Summary | |
---|---|
static class |
QAccessible.Action
|
static class |
QAccessible.Event
This enum type defines accessible event types. |
static class |
QAccessible.Method
Information about one method. |
static class |
QAccessible.Relation
This is a flags class for com.trolltech.qt.gui.QAccessible.RelationFlag |
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
|
static class |
QAccessible.State
This is a flags class for com.trolltech.qt.gui.QAccessible.StateFlag |
static class |
QAccessible.StateFlag
This enum describes flags that are used when drawing primitive elements. |
static class |
QAccessible.Text
This class has no available documentation. |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QAccessible()
|
Method Summary | |
---|---|
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 object, 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 object. |
static void |
updateAccessibility(QObject arg__1,
int who,
QAccessible.Event reason)
Notifies accessibility clients about a change in object's accessibility information. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QAccessible()
Method Detail |
---|
public static boolean isActive()
Use this function to prevent potentially expensive notifications via updateAccessibility()
.
public static QAccessibleInterface queryAccessibleInterface(QObject arg__1)
QAccessibleInterface
implementation exists for the given object, 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 object. 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)
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.
queryAccessibleInterface()
.
public static void updateAccessibility(QObject arg__1, int who, QAccessible.Event reason)
reason specifies the cause of the change, for example, ValueChange when the position of a slider has been changed. child is the (1-based) index of the child element that has changed. When child 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |