Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QAccessible Class Reference

The QAccessible class provides enums and static functions relating to accessibility. More...

#include <QAccessible>

Inherited by QAccessibleInterface and QAccessiblePlugin.

List of all members.

Public Types

Static Public Members


Detailed Description

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:

AT Servers notify the clients about events through calls to the updateAccessibility() function.

AT Clients request information about the objects in the server. The 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.

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.


Member Type Documentation

enum QAccessible::Action

This enum describes the possible types of action that can occur.

QAccessible::DefaultAction 
QAccessible::Press 
QAccessible::FirstStandardAction 
QAccessible::SetFocus 
QAccessible::Increase 
QAccessible::Decrease 
QAccessible::Accept 
QAccessible::Cancel 
QAccessible::Select 
QAccessible::ClearSelection 
QAccessible::RemoveSelection 
QAccessible::ExtendSelection 
QAccessible::AddToSelection 
QAccessible::LastStandardAction 

enum QAccessible::Event

This enum type defines accessible event types.

QAccessible::AcceleratorChanged 
QAccessible::Alert 
QAccessible::ContextHelpEnd 
QAccessible::ContextHelpStart 
QAccessible::DefaultActionChanged 
QAccessible::DescriptionChanged 
QAccessible::DialogEnd 
QAccessible::DialogStart 
QAccessible::DragDropEnd 
QAccessible::DragDropStart 
QAccessible::Focus 
QAccessible::ForegroundChanged 
QAccessible::HelpChanged 
QAccessible::LocationChanged 
QAccessible::MenuCommand 
QAccessible::MenuEnd 
QAccessible::MenuStart 
QAccessible::NameChanged 
QAccessible::ObjectCreated 
QAccessible::ObjectDestroyed 
QAccessible::ObjectHide 
QAccessible::ObjectReorder 
QAccessible::ObjectShow 
QAccessible::ParentChanged 
QAccessible::PopupMenuEnd 
QAccessible::PopupMenuStart 
QAccessible::ScrollingEnd 
QAccessible::ScrollingStart 
QAccessible::Selection 
QAccessible::SelectionAdd 
QAccessible::SelectionRemove 
QAccessible::SelectionWithin 
QAccessible::SoundPlayed 
QAccessible::StateChanged 
QAccessible::ValueChanged 

typedef QAccessible::InterfaceFactory

A function pointer type. Use a function with this prototype to install interface factories with installFactory().

The function receives a QObject pointer, and if the QObject provides a QAccessibleInterface, it sets the second parameter to point to the corresponding QAccessibleInterface, and returns true; otherwise returns false.

Installed factories are called by queryAccessibilityInterface() until one provides an interface.

enum QAccessible::Relation

This enum type defines bit flags that can be combined to indicate the relationship between two accessible objects.

QAccessible::UnrelatedThe objects are unrelated.
QAccessible::SelfThe objects are the same.
QAccessible::AncestorThe first object is a parent of the second object.
QAccessible::ChildThe first object is a direct child of the second object.
QAccessible::DescendentThe first object is an indirect child of the second object.
QAccessible::SiblingThe objects are siblings.
QAccessible::UpThe first object is above the second object.
QAccessible::DownThe first object is below the second object.
QAccessible::LeftThe first object is left of the second object.
QAccessible::RightThe first object is right of the second object.
QAccessible::CoversThe first object covers the second object.
QAccessible::CoveredThe first object is covered by the second object.
QAccessible::FocusChildThe first object is the second object's focus child.
QAccessible::LabelThe first object is the label of the second object.
QAccessible::LabelledThe first object is labelled by the second object.
QAccessible::ControllerThe first object controls the second object.
QAccessible::ControlledThe first object is controlled by the second object.

Implementations of relationTo() return a combination of these flags. Some values are mutually exclusive.

Implementations of navigate() can accept only one distinct value.

enum QAccessible::Role

This enum defines the role of an accessible object. The roles are:

QAccessible::AlertMessageAn object that is used to alert the user.
QAccessible::AnimationAn object that displays an animation.
QAccessible::ApplicationThe application's main window.
QAccessible::AssistantAn object that provids interactive help.
QAccessible::BorderAn object that represents a border.
QAccessible::ButtonDropDownA button that drops down a list of items.
QAccessible::ButtonDropGridA button that drops down a grid.
QAccessible::ButtonMenuA button that drops down a menu.
QAccessible::CanvasAn object that displays graphics that the user can interact with.
QAccessible::CaretAn object that represents the system caret (text cursor).
QAccessible::CellA cell in a table.
QAccessible::ChartAn object that displays a graphical representation of data.
QAccessible::CheckBoxAn object that represents an option that can be checked or unchecked. Some options provide a "mixed" state, e.g. neither checked nor unchecked.
QAccessible::ClientThe client area in a window.
QAccessible::ClockA clock displaying time.
QAccessible::ColumnA column of cells, usually within a table.
QAccessible::ColumnHeaderA header for a column of data.
QAccessible::ComboBoxA list of choices that the user can select from.
QAccessible::CursorAn object that represents the mouse cursor.
QAccessible::DialAn object that represents a dial or knob.
QAccessible::DialogA dialog box.
QAccessible::DocumentA document window, usually in an MDI environment.
QAccessible::EditableTextEditable text
QAccessible::EquationAn object that represents a mathematical equation.
QAccessible::GraphicA graphic or picture, e.g. an icon.
QAccessible::GripA grip that the user can drag to change the size of widgets.
QAccessible::GroupingAn object that represents a logical grouping of other objects.
QAccessible::HelpBalloonAn object that displays help in a separate, short lived window.
QAccessible::HotkeyFieldA hotkey field that allows the user to enter a key sequence.
QAccessible::IndicatorAn indicator that represents a current value or item.
QAccessible::LayeredPaneAn object that can contain layered children, e.g. in a stack.
QAccessible::LinkA link to something else.
QAccessible::ListA list of items, from which the user to select one or more items.
QAccessible::ListItemAn item in a list of items.
QAccessible::MenuBarA menu bar from which menus are opened by the user.
QAccessible::MenuItemAn item in a menu or menu bar.
QAccessible::NoRoleThe object has no role. This usually indicates an invalid object.
QAccessible::PageTabA page tab that the user can select to switch to a different page in a dialog.
QAccessible::PageTabListA list of page tabs.
QAccessible::PaneA generic container.
QAccessible::PopupMenuA menu which lists options that the user can select to perform an action.
QAccessible::ProgressBarThe object displays the progress of an operation in progress.
QAccessible::PropertyPageA property page where the user can change options and settings.
QAccessible::PushButtonA button.
QAccessible::RadioButtonAn object that represents an option that is mutually exclusive with other options.
QAccessible::RowA row of cells, usually within a table.
QAccessible::RowHeaderA header for a row of data.
QAccessible::ScrollBarA scroll bar, which allows the user to scroll the visible area.
QAccessible::SeparatorA separator that divides space into logical areas.
QAccessible::SliderA slider that allows the user to select a value within a given range.
QAccessible::SoundAn object that represents a sound.
QAccessible::SpinBoxA spin box widget that allows the user to enter a value within a given range.
QAccessible::SplitterA splitter distributing available space between its child widgets.
QAccessible::StaticTextStatic text, such as labels for other widgets.
QAccessible::StatusBarA status bar.
QAccessible::TableA table representing data in a grid of rows and columns.
QAccessible::TitleBarThe title bar caption of a window.
QAccessible::ToolBarA tool bar, which groups widgets that the user accesses frequently.
QAccessible::ToolTipA tool tip which provides information about other objects.
QAccessible::TreeA list of items in a tree structure.
QAccessible::TreeItemAn item in a tree structure.
QAccessible::UserRoleThe first value to be used for user defined roles.
QAccessible::WhitespaceBlank space between other objects.
QAccessible::WindowA top level window.

typedef QAccessible::RootObjectHandler

A function pointer type. Use a function with this prototype to install your own root object handler.

The function is called by setRootObject().

enum QAccessible::State

This enum type defines bit flags that can be combined to indicate the state of an accessible object. The values are:

QAccessible::AnimatedThe object's appearance changes frequently.
QAccessible::BusyThe object cannot accept input at the moment.
QAccessible::CheckedThe object's check box is checked.
QAccessible::CollapsedThe object is collapsed, e.g. a closed listview item, or an iconified window.
QAccessible::DefaultButtonThe object represents the default button in a dialog.
QAccessible::ExpandedThe object is expandable, and currently the children are visible.
QAccessible::ExtSelectableThe object supports extended selection.
QAccessible::FocusableThe object can receive focus. Only objects in the active window can receive focus.
QAccessible::FocusedThe object has keyboard focus.
QAccessible::HasPopupThe object opens a popup.
QAccessible::HotTrackedThe object's appearance is sensitive to the mouse cursor position.
QAccessible::InvisibleThe object is not visible to the user.
QAccessible::LinkedThe object is linked to another object, e.g. a hyperlink.
QAccessible::MarqueedThe object displays scrolling contents, e.g. a log view.
QAccessible::MixedThe state of the object is not determined, e.g. a tri-state check box that is neither checked nor unchecked.
QAccessible::ModalThe object blocks input from other objects.
QAccessible::MovableThe object can be moved.
QAccessible::MultiSelectableThe object supports multiple selected items.
QAccessible::NormalThe normal state.
QAccessible::OffscreenThe object is clipped by the visible area. Objects that are off screen are also invisible.
QAccessible::PressedThe object is pressed.
QAccessible::ProtectedThe object is password protected, e.g. a line edit for entering a Password.
QAccessible::ReadOnlyThe object can usually be edited, but is explicitly set to read-only.
QAccessible::SelectableThe object is selectable.
QAccessible::SelectedThe object is selected.
QAccessible::SelfVoicingThe object describes itself through speech or sound.
QAccessible::SizeableThe object can be resized, e.g. top-level windows.
QAccessible::TraversedThe object is linked and has been visited.
QAccessible::UnavailableThe object is unavailable to the user, e.g. a disabled widget.

Implementations of QAccessibleInterface::state() return a combination of these flags.

enum QAccessible::Text

This enum specifies string information that an accessible object returns.

QAccessible::NameThe name of the object.
QAccessible::DescriptionA short text describing the object.
QAccessible::ValueThe value of the object.
QAccessible::HelpA longer text giving information about how to use the object.
QAccessible::AcceleratorThe keyboard shortcut that executes the object's default action.
QAccessible::UserTextThe first value to be used for user defined text.

typedef QAccessible::UpdateHandler

A function pointer type. Use a function with this prototype to install your own update function.

The function is called by updateAccessibility().


Member Function Documentation

void QAccessible::installFactory ( InterfaceFactory factory )   [static]

Installs the InterfaceFactory factory. The last factory added is the first one used by queryAccessibleInterface().

RootObjectHandler QAccessible::installRootObjectHandler ( RootObjectHandler handler )   [static]

Installs handler as the function to be used by setRootObject(), and returns the previously installed handler.

UpdateHandler QAccessible::installUpdateHandler ( UpdateHandler handler )   [static]

Installs handler as the function to be used by updateAccessibility(), and returns the previously installed handler.

bool QAccessible::isActive ()   [static]

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

QAccessibleInterface * QAccessible::queryAccessibleInterface ( QObject * object )   [static]

If a QAccessibleInterface implementation exists for 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 must call release() on the returned interface.

void QAccessible::removeFactory ( InterfaceFactory factory )   [static]

Removes factory from the list of installed InterfaceFactories.

void QAccessible::setRootObject ( QObject * object )   [static]

Sets the root accessible object of this application to object. 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 installRootObjectHandler() to redirect the function call to a customized handler function.

See also RootObjectHandler and queryAccessibleInterface().

void QAccessible::updateAccessibility ( QObject * object, int child, Event reason )   [static]

Notifies accessibility clients about a change in object's accessibility information.

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 it's 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.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp1