Qt 4.8
Public Types | Static Public Functions | Static Private Attributes | List of all members
QAccessible Class Reference

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

#include <qaccessible.h>

Inheritance diagram for QAccessible:
QAccessibleFactoryInterface QAccessibleInterface QAccessibleWidgetPrivate QAInterface QWindowsAccessible QAccessiblePlugin QAccessibleInterfaceEx QAccessibleItemRow QAccessibleObject QAccessibleTable2CellInterface QAccessibleTable2CornerButton QAccessibleTable2HeaderCell QAccessibleTitleBar

Public Types

enum  Action {
  DefaultAction = 0, Press = -1, FirstStandardAction = Press, SetFocus = -2,
  Increase = -3, Decrease = -4, Accept = -5, Cancel = -6,
  Select = -7, ClearSelection = -8, RemoveSelection = -9, ExtendSelection = -10,
  AddToSelection = -11, LastStandardAction = AddToSelection
}
 This enum describes the possible types of action that can occur. More...
 
enum  Event {
  SoundPlayed = 0x0001, Alert = 0x0002, ForegroundChanged = 0x0003, MenuStart = 0x0004,
  MenuEnd = 0x0005, PopupMenuStart = 0x0006, PopupMenuEnd = 0x0007, ContextHelpStart = 0x000C,
  ContextHelpEnd = 0x000D, DragDropStart = 0x000E, DragDropEnd = 0x000F, DialogStart = 0x0010,
  DialogEnd = 0x0011, ScrollingStart = 0x0012, ScrollingEnd = 0x0013, MenuCommand = 0x0018,
  ActionChanged = 0x0101, ActiveDescendantChanged = 0x0102, AttributeChanged = 0x0103, DocumentContentChanged = 0x0104,
  DocumentLoadComplete = 0x0105, DocumentLoadStopped = 0x0106, DocumentReload = 0x0107, HyperlinkEndIndexChanged = 0x0108,
  HyperlinkNumberOfAnchorsChanged = 0x0109, HyperlinkSelectedLinkChanged = 0x010A, HypertextLinkActivated = 0x010B, HypertextLinkSelected = 0x010C,
  HyperlinkStartIndexChanged = 0x010D, HypertextChanged = 0x010E, HypertextNLinksChanged = 0x010F, ObjectAttributeChanged = 0x0110,
  PageChanged = 0x0111, SectionChanged = 0x0112, TableCaptionChanged = 0x0113, TableColumnDescriptionChanged = 0x0114,
  TableColumnHeaderChanged = 0x0115, TableModelChanged = 0x0116, TableRowDescriptionChanged = 0x0117, TableRowHeaderChanged = 0x0118,
  TableSummaryChanged = 0x0119, TextAttributeChanged = 0x011A, TextCaretMoved = 0x011B, TextColumnChanged = 0x011D,
  TextInserted = 0x011E, TextRemoved = 0x011F, TextUpdated = 0x0120, TextSelectionChanged = 0x0121,
  VisibleDataChanged = 0x0122, ObjectCreated = 0x8000, ObjectDestroyed = 0x8001, ObjectShow = 0x8002,
  ObjectHide = 0x8003, ObjectReorder = 0x8004, Focus = 0x8005, Selection = 0x8006,
  SelectionAdd = 0x8007, SelectionRemove = 0x8008, SelectionWithin = 0x8009, StateChanged = 0x800A,
  LocationChanged = 0x800B, NameChanged = 0x800C, DescriptionChanged = 0x800D, ValueChanged = 0x800E,
  ParentChanged = 0x800F, HelpChanged = 0x80A0, DefaultActionChanged = 0x80B0, AcceleratorChanged = 0x80C0
}
 This enum type defines accessible event types. More...
 
typedef QAccessibleInterface *(* InterfaceFactory) (const QString &key, QObject *)
 This is a typedef for a pointer to a function with the following signature: More...
 
enum  Method {
  ListSupportedMethods = 0, SetCursorPosition = 1, GetCursorPosition = 2, ForegroundColor = 3,
  BackgroundColor = 4
}
 This enum describes the possible types of methods that can be invoked on an accessible object. More...
 
enum  RelationFlag {
  Unrelated = 0x00000000, Self = 0x00000001, Ancestor = 0x00000002, Child = 0x00000004,
  Descendent = 0x00000008, Sibling = 0x00000010, HierarchyMask = 0x000000ff, Up = 0x00000100,
  Down = 0x00000200, Left = 0x00000400, Right = 0x00000800, Covers = 0x00001000,
  Covered = 0x00002000, GeometryMask = 0x0000ff00, FocusChild = 0x00010000, Label = 0x00020000,
  Labelled = 0x00040000, Controller = 0x00080000, Controlled = 0x00100000, LogicalMask = 0x00ff0000
}
 This enum type defines bit flags that can be combined to indicate the relationship between two accessible objects. More...
 
enum  Role {
  NoRole = 0x00000000, TitleBar = 0x00000001, MenuBar = 0x00000002, ScrollBar = 0x00000003,
  Grip = 0x00000004, Sound = 0x00000005, Cursor = 0x00000006, Caret = 0x00000007,
  AlertMessage = 0x00000008, Window = 0x00000009, Client = 0x0000000A, PopupMenu = 0x0000000B,
  MenuItem = 0x0000000C, ToolTip = 0x0000000D, Application = 0x0000000E, Document = 0x0000000F,
  Pane = 0x00000010, Chart = 0x00000011, Dialog = 0x00000012, Border = 0x00000013,
  Grouping = 0x00000014, Separator = 0x00000015, ToolBar = 0x00000016, StatusBar = 0x00000017,
  Table = 0x00000018, ColumnHeader = 0x00000019, RowHeader = 0x0000001A, Column = 0x0000001B,
  Row = 0x0000001C, Cell = 0x0000001D, Link = 0x0000001E, HelpBalloon = 0x0000001F,
  Assistant = 0x00000020, List = 0x00000021, ListItem = 0x00000022, Tree = 0x00000023,
  TreeItem = 0x00000024, PageTab = 0x00000025, PropertyPage = 0x00000026, Indicator = 0x00000027,
  Graphic = 0x00000028, StaticText = 0x00000029, EditableText = 0x0000002A, PushButton = 0x0000002B,
  CheckBox = 0x0000002C, RadioButton = 0x0000002D, ComboBox = 0x0000002E, ProgressBar = 0x00000030,
  Dial = 0x00000031, HotkeyField = 0x00000032, Slider = 0x00000033, SpinBox = 0x00000034,
  Canvas = 0x00000035, Animation = 0x00000036, Equation = 0x00000037, ButtonDropDown = 0x00000038,
  ButtonMenu = 0x00000039, ButtonDropGrid = 0x0000003A, Whitespace = 0x0000003B, PageTabList = 0x0000003C,
  Clock = 0x0000003D, Splitter = 0x0000003E, LayeredPane = 0x0000003F, Terminal = 0x00000040,
  Desktop = 0x00000041, UserRole = 0x0000ffff
}
 This enum defines the role of an accessible object. More...
 
typedef void(* RootObjectHandler) (QObject *)
 A function pointer type. More...
 
enum  StateFlag {
  Normal = 0x00000000, Unavailable = 0x00000001, Selected = 0x00000002, Focused = 0x00000004,
  Pressed = 0x00000008, Checked = 0x00000010, Mixed = 0x00000020, ReadOnly = 0x00000040,
  HotTracked = 0x00000080, DefaultButton = 0x00000100, Expanded = 0x00000200, Collapsed = 0x00000400,
  Busy = 0x00000800, Marqueed = 0x00002000, Animated = 0x00004000, Invisible = 0x00008000,
  Offscreen = 0x00010000, Sizeable = 0x00020000, Movable = 0x00040000, SelfVoicing = 0x00080000,
  Focusable = 0x00100000, Selectable = 0x00200000, Linked = 0x00400000, Traversed = 0x00800000,
  MultiSelectable = 0x01000000, ExtSelectable = 0x02000000, Protected = 0x20000000, HasPopup = 0x40000000,
  Modal = 0x80000000, HasInvokeExtension = 0x10000000
}
 This enum type defines bit flags that can be combined to indicate the state of an accessible object. More...
 
enum  Text {
  Name = 0, Description, Value, Help,
  Accelerator, UserText = 0x0000ffff
}
 This enum specifies string information that an accessible object returns. More...
 
typedef void(* UpdateHandler) (QObject *, int who, Event reason)
 A function pointer type. More...
 

Static Public Functions

static void cleanup ()
 
static void initialize ()
 
static void installFactory (InterfaceFactory)
 Installs the InterfaceFactory factory. More...
 
static RootObjectHandler installRootObjectHandler (RootObjectHandler)
 Installs the given handler as the function to be used by setRootObject(), and returns the previously installed handler. More...
 
static UpdateHandler installUpdateHandler (UpdateHandler)
 Installs the given handler as the function to be used by updateAccessibility(), and returns the previously installed handler. More...
 
static bool isActive ()
 Returns true if an accessibility implementation has been requested during the runtime of the application; otherwise returns false. More...
 
static QAccessibleInterfacequeryAccessibleInterface (QObject *)
 If a QAccessibleInterface implementation exists for the given object, this function returns a pointer to the implementation; otherwise it returns 0. More...
 
static void removeFactory (InterfaceFactory)
 Removes factory from the list of installed InterfaceFactories. More...
 
static void setRootObject (QObject *)
 Sets the root accessible object of this application to object. More...
 
static void updateAccessibility (QObject *, int who, Event reason)
 Notifies accessibility clients about a change in object's accessibility information. More...
 

Static Private Attributes

static RootObjectHandler rootObjectHandler
 
static UpdateHandler updateHandler
 

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:

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.

See also
QAccessibleInterface

Definition at line 64 of file qaccessible.h.

Typedefs

◆ InterfaceFactory

QAccessible::InterfaceFactory

This is a typedef for a pointer to a function with the following signature:

typedef QAccessibleInterface* myFactoryFunction(const QString &key, QObject *);

The function receives a QString and a QObject pointer, where the QString is the key identifying the interface. The QObject is used to pass on to the QAccessibleInterface so that it can hold a reference to it.

If the key and the QObject does not have a corresponding QAccessibleInterface, a null-pointer will be returned.

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

Definition at line 319 of file qaccessible.h.

◆ RootObjectHandler

QAccessible::RootObjectHandler

A function pointer type.

Warning
This function is not part of the public interface.

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

The function is called by setRootObject().

Definition at line 321 of file qaccessible.h.

◆ UpdateHandler

QAccessible::UpdateHandler

A function pointer type.

Warning
This function is not part of the public interface.

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

The function is called by updateAccessibility().

Definition at line 320 of file qaccessible.h.

Enumerations

◆ Action

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

  • DefaultAction
  • Press
  • SetFocus
  • Increase
  • Decrease
  • Accept
  • Cancel
  • Select
  • ClearSelection
  • RemoveSelection
  • ExtendSelection
  • AddToSelection
  • FirstStandardAction
  • LastStandardAction
Enumerator
DefaultAction 
Press 
FirstStandardAction 
SetFocus 
Increase 
Decrease 
Accept 
Cancel 
Select 
ClearSelection 
RemoveSelection 
ExtendSelection 
AddToSelection 
LastStandardAction 

Definition at line 294 of file qaccessible.h.

◆ Event

This enum type defines accessible event types.

  • AcceleratorChanged The keyboard accelerator for an action has been changed.
  • ActionChanged An action has been changed.
  • ActiveDescendantChanged
  • Alert A system alert (e.g., a message from a QMessageBox)
  • AttributeChanged
  • ContextHelpEnd Context help (QWhatsThis) for an object is finished.
  • ContextHelpStart Context help (QWhatsThis) for an object is initiated.
  • DefaultActionChanged The default QAccessible::Action for the accessible object has changed.
  • DescriptionChanged The object's QAccessible::Description changed.
  • DialogEnd A dialog (QDialog) has been hidden
  • DialogStart A dialog (QDialog) has been set visible.
  • DocumentContentChanged The contents of a text document have changed.
  • DocumentLoadComplete A document has been loaded.
  • DocumentLoadStopped A document load has been stopped.
  • DocumentReload A document reload has been initiated.
  • DragDropEnd A drag and drop operation is about to finished.
  • DragDropStart A drag and drop operation is about to be initiated.
  • Focus An object has gained keyboard focus.
  • ForegroundChanged A window has been activated (i.e., a new window has gained focus on the desktop).
  • HelpChanged The QAccessible::Help text property of an object has changed.
  • HyperlinkEndIndexChanged The end position of the display text for a hypertext link has changed.
  • HyperlinkNumberOfAnchorsChanged The number of anchors in a hypertext link has changed, perhaps because the display text has been split to provide more than one link.
  • HyperlinkSelectedLinkChanged The link for the selected hypertext link has changed.
  • HyperlinkStartIndexChanged The start position of the display text for a hypertext link has changed.
  • HypertextChanged The display text for a hypertext link has changed.
  • HypertextLinkActivated A hypertext link has been activated, perhaps by being clicked or via a key press.
  • HypertextLinkSelected A hypertext link has been selected.
  • HypertextNLinksChanged
  • LocationChanged An object's location on the screen has changed.
  • MenuCommand A menu item is triggered.
  • MenuEnd A menu has been closed (Qt uses PopupMenuEnd for all menus).
  • MenuStart A menu has been opened on the menubar (Qt uses PopupMenuStart for all menus).
  • NameChanged The QAccessible::Name property of an object has changed.
  • ObjectAttributeChanged
  • ObjectCreated A new object is created.
  • ObjectDestroyed An object is deleted.
  • ObjectHide An object is hidden; for example, with QWidget::hide(). Any children the object that is hidden has do not send this event. It is not sent when an object is hidden as it is being obcured by others.
  • ObjectReorder A layout or item view has added, removed, or moved an object (Qt does not use this event).
  • ObjectShow An object is displayed; for example, with QWidget::show().
  • PageChanged
  • ParentChanged An object's parent object changed.
  • PopupMenuEnd A pop-up menu has closed.
  • PopupMenuStart A pop-up menu has opened.
  • ScrollingEnd A scrollbar scroll operation has ended (the mouse has released the slider handle).
  • ScrollingStart A scrollbar scroll operation is about to start; this may be caused by a mouse press on the slider handle, for example.
  • SectionChanged
  • SelectionAdd An item has been added to the selection in an item view.
  • SelectionRemove An item has been removed from an item view selection.
  • Selection The selection has changed in a menu or item view.
  • SelectionWithin Several changes to a selection has occurred in an item view.
  • SoundPlayed A sound has been played by an object
  • StateChanged The QAccessible::State of an object has changed.
  • TableCaptionChanged A table caption has been changed.
  • TableColumnDescriptionChanged The description of a table column, typically found in the column's header, has been changed.
  • TableColumnHeaderChanged A table column header has been changed.
  • TableModelChanged The model providing data for a table has been changed.
  • TableRowDescriptionChanged The description of a table row, typically found in the row's header, has been changed.
  • TableRowHeaderChanged A table row header has been changed.
  • TableSummaryChanged The summary of a table has been changed.
  • TextAttributeChanged
  • TextCaretMoved The caret has moved in an editable widget. The caret represents the cursor position in an editable widget with the input focus.
  • TextColumnChanged A text column has been changed.
  • TextInserted Text has been inserted into an editable widget.
  • TextRemoved Text has been removed from an editable widget.
  • TextSelectionChanged The selected text has changed in an editable widget.
  • TextUpdated The text has been update in an editable widget.
  • ValueChanged The QAccessible::Value of an object has changed.
  • VisibleDataChanged

The values for this enum are defined to be the same as those defined in the AccessibleEventID.idl File Reference{IAccessible2} and Microsoft Active Accessibility Event Constants{MSAA} specifications.

Enumerator
SoundPlayed 
Alert 
ForegroundChanged 
MenuStart 
MenuEnd 
PopupMenuStart 
PopupMenuEnd 
ContextHelpStart 
ContextHelpEnd 
DragDropStart 
DragDropEnd 
DialogStart 
DialogEnd 
ScrollingStart 
ScrollingEnd 
MenuCommand 
ActionChanged 
ActiveDescendantChanged 
AttributeChanged 
DocumentContentChanged 
DocumentLoadComplete 
DocumentLoadStopped 
DocumentReload 
HyperlinkEndIndexChanged 
HyperlinkNumberOfAnchorsChanged 
HyperlinkSelectedLinkChanged 
HypertextLinkActivated 
HypertextLinkSelected 
HyperlinkStartIndexChanged 
HypertextChanged 
HypertextNLinksChanged 
ObjectAttributeChanged 
PageChanged 
SectionChanged 
TableCaptionChanged 
TableColumnDescriptionChanged 
TableColumnHeaderChanged 
TableModelChanged 
TableRowDescriptionChanged 
TableRowHeaderChanged 
TableSummaryChanged 
TextAttributeChanged 
TextCaretMoved 
TextColumnChanged 
TextInserted 
TextRemoved 
TextUpdated 
TextSelectionChanged 
VisibleDataChanged 
ObjectCreated 
ObjectDestroyed 
ObjectShow 
ObjectHide 
ObjectReorder 
Focus 
Selection 
SelectionAdd 
SelectionRemove 
SelectionWithin 
StateChanged 
LocationChanged 
NameChanged 
DescriptionChanged 
ValueChanged 
ParentChanged 
HelpChanged 
DefaultActionChanged 
AcceleratorChanged 

Definition at line 67 of file qaccessible.h.

67  {
68  SoundPlayed = 0x0001,
69  Alert = 0x0002,
70  ForegroundChanged = 0x0003,
71  MenuStart = 0x0004,
72  MenuEnd = 0x0005,
73  PopupMenuStart = 0x0006,
74  PopupMenuEnd = 0x0007,
75  ContextHelpStart = 0x000C,
76  ContextHelpEnd = 0x000D,
77  DragDropStart = 0x000E,
78  DragDropEnd = 0x000F,
79  DialogStart = 0x0010,
80  DialogEnd = 0x0011,
81  ScrollingStart = 0x0012,
82  ScrollingEnd = 0x0013,
83 
84  MenuCommand = 0x0018,
85 
86  // Values from IAccessible2
87  ActionChanged = 0x0101,
88  ActiveDescendantChanged = 0x0102,
89  AttributeChanged = 0x0103,
90  DocumentContentChanged = 0x0104,
91  DocumentLoadComplete = 0x0105,
92  DocumentLoadStopped = 0x0106,
93  DocumentReload = 0x0107,
94  HyperlinkEndIndexChanged = 0x0108,
97  HypertextLinkActivated = 0x010B,
98  HypertextLinkSelected = 0x010C,
100  HypertextChanged = 0x010E,
101  HypertextNLinksChanged = 0x010F,
102  ObjectAttributeChanged = 0x0110,
103  PageChanged = 0x0111,
104  SectionChanged = 0x0112,
105  TableCaptionChanged = 0x0113,
107  TableColumnHeaderChanged = 0x0115,
108  TableModelChanged = 0x0116,
110  TableRowHeaderChanged = 0x0118,
111  TableSummaryChanged = 0x0119,
112  TextAttributeChanged = 0x011A,
113  TextCaretMoved = 0x011B,
114  // TextChanged = 0x011C, is deprecated in IA2, use TextUpdated
115  TextColumnChanged = 0x011D,
116  TextInserted = 0x011E,
117  TextRemoved = 0x011F,
118  TextUpdated = 0x0120,
119  TextSelectionChanged = 0x0121,
120  VisibleDataChanged = 0x0122,
121 
122  ObjectCreated = 0x8000,
123  ObjectDestroyed = 0x8001,
124  ObjectShow = 0x8002,
125  ObjectHide = 0x8003,
126  ObjectReorder = 0x8004,
127  Focus = 0x8005,
128  Selection = 0x8006,
129  SelectionAdd = 0x8007,
130  SelectionRemove = 0x8008,
131  SelectionWithin = 0x8009,
132  StateChanged = 0x800A,
133  LocationChanged = 0x800B,
134  NameChanged = 0x800C,
135  DescriptionChanged = 0x800D,
136  ValueChanged = 0x800E,
137  ParentChanged = 0x800F,
138  HelpChanged = 0x80A0,
139  DefaultActionChanged = 0x80B0,
140  AcceleratorChanged = 0x80C0
141  };

◆ Method

This enum describes the possible types of methods that can be invoked on an accessible object.

  • ListSupportedMethods
  • SetCursorPosition
  • GetCursorPosition
  • ForegroundColor
  • BackgroundColor
See also
QAccessibleInterface::invokeMethod()
Enumerator
ListSupportedMethods 
SetCursorPosition 
GetCursorPosition 
ForegroundColor 
BackgroundColor 

Definition at line 311 of file qaccessible.h.

◆ RelationFlag

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

  • Unrelated The objects are unrelated.
  • Self The objects are the same.
  • Ancestor The first object is a parent of the second object.
  • Child The first object is a direct child of the second object.
  • Descendent The first object is an indirect child of the second object.
  • Sibling The objects are siblings.
  • Up The first object is above the second object.
  • Down The first object is below the second object.
  • Left The first object is left of the second object.
  • Right The first object is right of the second object.
  • Covers The first object covers the second object.
  • Covered The first object is covered by the second object.
  • FocusChild The first object is the second object's focus child.
  • Label The first object is the label of the second object.
  • Labelled The first object is labelled by the second object.
  • Controller The first object controls the second object.
  • Controlled The first object is controlled by the second object.
  • HierarchyMask
  • GeometryMask
  • LogicalMask

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

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

Enumerator
Unrelated 
Self 
Ancestor 
Child 
Descendent 
Sibling 
HierarchyMask 
Up 
Down 
Left 
Right 
Covers 
Covered 
GeometryMask 
FocusChild 
Label 
Labelled 
Controller 
Controlled 
LogicalMask 

Definition at line 268 of file qaccessible.h.

268  {
269  Unrelated = 0x00000000,
270  Self = 0x00000001,
271  Ancestor = 0x00000002,
272  Child = 0x00000004,
273  Descendent = 0x00000008,
274  Sibling = 0x00000010,
275  HierarchyMask = 0x000000ff,
276 
277  Up = 0x00000100,
278  Down = 0x00000200,
279  Left = 0x00000400,
280  Right = 0x00000800,
281  Covers = 0x00001000,
282  Covered = 0x00002000,
283  GeometryMask = 0x0000ff00,
284 
285  FocusChild = 0x00010000,
286  Label = 0x00020000,
287  Labelled = 0x00040000,
288  Controller = 0x00080000,
289  Controlled = 0x00100000,
290  LogicalMask = 0x00ff0000
291  };

◆ Role

This enum defines the role of an accessible object.

The roles are:

  • AlertMessage An object that is used to alert the user.
  • Animation An object that displays an animation.
  • Application The application's main window.
  • Assistant An object that provids interactive help.
  • Border An object that represents a border.
  • ButtonDropDown A button that drops down a list of items.
  • ButtonDropGrid A button that drops down a grid.
  • ButtonMenu A button that drops down a menu.
  • Canvas An object that displays graphics that the user can interact with.
  • Caret An object that represents the system caret (text cursor).
  • Cell A cell in a table.
  • Chart An object that displays a graphical representation of data.
  • CheckBox An object that represents an option that can be checked or unchecked. Some options provide a "mixed" state, e.g. neither checked nor unchecked.
  • Client The client area in a window.
  • Clock A clock displaying time.
  • Column A column of cells, usually within a table.
  • ColumnHeader A header for a column of data.
  • ComboBox A list of choices that the user can select from.
  • Cursor An object that represents the mouse cursor.
  • Desktop The object represents the desktop or workspace.
  • Dial An object that represents a dial or knob.
  • Dialog A dialog box.
  • Document A document window, usually in an MDI environment.
  • EditableText Editable text
  • Equation An object that represents a mathematical equation.
  • Graphic A graphic or picture, e.g. an icon.
  • Grip A grip that the user can drag to change the size of widgets.
  • Grouping An object that represents a logical grouping of other objects.
  • HelpBalloon An object that displays help in a separate, short lived window.
  • HotkeyField A hotkey field that allows the user to enter a key sequence.
  • Indicator An indicator that represents a current value or item.
  • LayeredPane An object that can contain layered children, e.g. in a stack.
  • Link A link to something else.
  • List A list of items, from which the user can select one or more items.
  • ListItem An item in a list of items.
  • MenuBar A menu bar from which menus are opened by the user.
  • MenuItem An item in a menu or menu bar.
  • NoRole The object has no role. This usually indicates an invalid object.
  • PageTab A page tab that the user can select to switch to a different page in a dialog.
  • PageTabList A list of page tabs.
  • Pane A generic container.
  • PopupMenu A menu which lists options that the user can select to perform an action.
  • ProgressBar The object displays the progress of an operation in progress.
  • PropertyPage A property page where the user can change options and settings.
  • PushButton A button.
  • RadioButton An object that represents an option that is mutually exclusive with other options.
  • Row A row of cells, usually within a table.
  • RowHeader A header for a row of data.
  • ScrollBar A scroll bar, which allows the user to scroll the visible area.
  • Separator A separator that divides space into logical areas.
  • Slider A slider that allows the user to select a value within a given range.
  • Sound An object that represents a sound.
  • SpinBox A spin box widget that allows the user to enter a value within a given range.
  • Splitter A splitter distributing available space between its child widgets.
  • StaticText Static text, such as labels for other widgets.
  • StatusBar A status bar.
  • Table A table representing data in a grid of rows and columns.
  • Terminal A terminal or command line interface.
  • TitleBar The title bar caption of a window.
  • ToolBar A tool bar, which groups widgets that the user accesses frequently.
  • ToolTip A tool tip which provides information about other objects.
  • Tree A list of items in a tree structure.
  • TreeItem An item in a tree structure.
  • UserRole The first value to be used for user defined roles.
  • Whitespace Blank space between other objects.
  • Window A top level window.
Enumerator
NoRole 
TitleBar 
MenuBar 
ScrollBar 
Grip 
Sound 
Cursor 
Caret 
AlertMessage 
Window 
Client 
PopupMenu 
MenuItem 
ToolTip 
Application 
Document 
Pane 
Chart 
Dialog 
Border 
Grouping 
Separator 
ToolBar 
StatusBar 
Table 
ColumnHeader 
RowHeader 
Column 
Row 
Cell 
Link 
HelpBalloon 
Assistant 
List 
ListItem 
Tree 
TreeItem 
PageTab 
PropertyPage 
Indicator 
Graphic 
StaticText 
EditableText 
PushButton 
CheckBox 
RadioButton 
ComboBox 
ProgressBar 
Dial 
HotkeyField 
Slider 
SpinBox 
Canvas 
Animation 
Equation 
ButtonDropDown 
ButtonMenu 
ButtonDropGrid 
Whitespace 
PageTabList 
Clock 
Splitter 
LayeredPane 
Terminal 
Desktop 
UserRole 

Definition at line 188 of file qaccessible.h.

188  {
189  NoRole = 0x00000000,
190  TitleBar = 0x00000001,
191  MenuBar = 0x00000002,
192  ScrollBar = 0x00000003,
193  Grip = 0x00000004,
194  Sound = 0x00000005,
195  Cursor = 0x00000006,
196  Caret = 0x00000007,
197  AlertMessage = 0x00000008,
198  Window = 0x00000009,
199  Client = 0x0000000A,
200  PopupMenu = 0x0000000B,
201  MenuItem = 0x0000000C,
202  ToolTip = 0x0000000D,
203  Application = 0x0000000E,
204  Document = 0x0000000F,
205  Pane = 0x00000010,
206  Chart = 0x00000011,
207  Dialog = 0x00000012,
208  Border = 0x00000013,
209  Grouping = 0x00000014,
210  Separator = 0x00000015,
211  ToolBar = 0x00000016,
212  StatusBar = 0x00000017,
213  Table = 0x00000018,
214  ColumnHeader = 0x00000019,
215  RowHeader = 0x0000001A,
216  Column = 0x0000001B,
217  Row = 0x0000001C,
218  Cell = 0x0000001D,
219  Link = 0x0000001E,
220  HelpBalloon = 0x0000001F,
221  Assistant = 0x00000020,
222  List = 0x00000021,
223  ListItem = 0x00000022,
224  Tree = 0x00000023,
225  TreeItem = 0x00000024,
226  PageTab = 0x00000025,
227  PropertyPage = 0x00000026,
228  Indicator = 0x00000027,
229  Graphic = 0x00000028,
230  StaticText = 0x00000029,
231  EditableText = 0x0000002A, // Editable, selectable, etc.
232  PushButton = 0x0000002B,
233  CheckBox = 0x0000002C,
234  RadioButton = 0x0000002D,
235  ComboBox = 0x0000002E,
236  // DropList = 0x0000002F,
237  ProgressBar = 0x00000030,
238  Dial = 0x00000031,
239  HotkeyField = 0x00000032,
240  Slider = 0x00000033,
241  SpinBox = 0x00000034,
242  Canvas = 0x00000035,
243  Animation = 0x00000036,
244  Equation = 0x00000037,
245  ButtonDropDown = 0x00000038,
246  ButtonMenu = 0x00000039,
247  ButtonDropGrid = 0x0000003A,
248  Whitespace = 0x0000003B,
249  PageTabList = 0x0000003C,
250  Clock = 0x0000003D,
251  Splitter = 0x0000003E,
252  // Additional Qt roles where enum value does not map directly to MSAA:
253  LayeredPane = 0x0000003F,
254  Terminal = 0x00000040,
255  Desktop = 0x00000041,
256  UserRole = 0x0000ffff
257  };
The Column item arranges its children vertically.
The Row item arranges its children horizontally.
The Animation element is the base of all QML animations.

◆ StateFlag

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

The values are:

  • Animated The object's appearance changes frequently.
  • Busy The object cannot accept input at the moment.
  • Checked The object's check box is checked.
  • Collapsed The object is collapsed, e.g. a closed listview item, or an iconified window.
  • DefaultButton The object represents the default button in a dialog.
  • Expanded The object is expandable, and currently the children are visible.
  • ExtSelectable The object supports extended selection.
  • Focusable The object can receive focus. Only objects in the active window can receive focus.
  • Focused The object has keyboard focus.
  • HasPopup The object opens a popup.
  • HotTracked The object's appearance is sensitive to the mouse cursor position.
  • Invisible The object is not visible to the user.
  • Linked The object is linked to another object, e.g. a hyperlink.
  • Marqueed The object displays scrolling contents, e.g. a log view.
  • Mixed The state of the object is not determined, e.g. a tri-state check box that is neither checked nor unchecked.
  • Modal The object blocks input from other objects.
  • Movable The object can be moved.
  • MultiSelectable The object supports multiple selected items.
  • Normal The normal state.
  • Offscreen The object is clipped by the visible area. Objects that are off screen are also invisible.
  • Pressed The object is pressed.
  • Protected The object is password protected, e.g. a line edit for entering a Password.
  • ReadOnly The object can usually be edited, but is explicitly set to read-only.
  • Selectable The object is selectable.
  • Selected The object is selected.
  • SelfVoicing The object describes itself through speech or sound.
  • Sizeable The object can be resized, e.g. top-level windows.
  • Traversed The object is linked and has been visited.
  • Unavailable The object is unavailable to the user, e.g. a disabled widget.
  • Moveable
  • HasInvokeExtension

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

Enumerator
Normal 
Unavailable 
Selected 
Focused 
Pressed 
Checked 
Mixed 
ReadOnly 
HotTracked 
DefaultButton 
Expanded 
Collapsed 
Busy 
Marqueed 
Animated 
Invisible 
Offscreen 
Sizeable 
Movable 
SelfVoicing 
Focusable 
Selectable 
Linked 
Traversed 
MultiSelectable 
ExtSelectable 
Protected 
HasPopup 
Modal 
HasInvokeExtension 

Definition at line 143 of file qaccessible.h.

143  {
144  Normal = 0x00000000,
145  Unavailable = 0x00000001,
146  Selected = 0x00000002,
147  Focused = 0x00000004,
148  Pressed = 0x00000008,
149  Checked = 0x00000010,
150  Mixed = 0x00000020,
151  ReadOnly = 0x00000040,
152  HotTracked = 0x00000080,
153  DefaultButton = 0x00000100,
154  // #### Qt5 Expandable
155  Expanded = 0x00000200,
156  Collapsed = 0x00000400,
157  Busy = 0x00000800,
158  // Floating = 0x00001000,
159  Marqueed = 0x00002000,
160  Animated = 0x00004000,
161  Invisible = 0x00008000,
162  Offscreen = 0x00010000,
163  Sizeable = 0x00020000,
164  Movable = 0x00040000,
165 #ifdef QT3_SUPPORT
166  Moveable = Movable,
167 #endif
168  SelfVoicing = 0x00080000,
169  Focusable = 0x00100000,
170  Selectable = 0x00200000,
171  Linked = 0x00400000,
172  Traversed = 0x00800000,
173  MultiSelectable = 0x01000000,
174  ExtSelectable = 0x02000000,
175  //AlertLow = 0x04000000,
176  //AlertMedium = 0x08000000,
177  //AlertHigh = 0x10000000, /* reused for HasInvokeExtension */
178  Protected = 0x20000000,
179  HasPopup = 0x40000000,
180  Modal = 0x80000000,
181 
182  // #### Qt5 ManagesDescendants
183  // #### Qt5 remove HasInvokeExtension
184  HasInvokeExtension = 0x10000000 // internal
185  };

◆ Text

This enum specifies string information that an accessible object returns.

  • Name The name of the object. This can be used both as an identifier or a short description by accessible clients.
  • Description A short text describing the object.
  • Value The value of the object.
  • Help A longer text giving information about how to use the object.
  • Accelerator The keyboard shortcut that executes the object's default action.
  • UserText The first value to be used for user defined text.
Enumerator
Name 
Description 
Value 
Help 
Accelerator 
UserText 

Definition at line 259 of file qaccessible.h.

Functions

◆ cleanup()

void QAccessible::cleanup ( )
static
Warning
This function is not part of the public interface.

Definition at line 2359 of file qaccessible_mac.mm.

Referenced by qt_cleanup().

2360 {
2361  accessibleHierarchyManager()->reset();
2362 #ifndef QT_MAC_USE_COCOA
2366 #endif
2367 }
static EventHandlerUPP objectCreateEventHandlerUPP
static EventHandlerUPP accessibilityEventHandlerUPP
static EventHandlerUPP applicationEventHandlerUPP
static void removeEventhandler(EventHandlerUPP eventHandler)

◆ initialize()

void QAccessible::initialize ( )
static
Warning
This function is not part of the public interface.

Definition at line 2339 of file qaccessible_mac.mm.

Referenced by qt_init().

2340 {
2341 #ifndef QT_MAC_USE_COCOA
2344 #endif
2345 }
static void installApplicationEventhandler()
static void registerQtAccessibilityHIObjectSubclass()

◆ installFactory()

void QAccessible::installFactory ( InterfaceFactory  factory)
static

Installs the InterfaceFactory factory.

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

Definition at line 553 of file qaccessible.cpp.

554 {
555  if (!factory)
556  return;
557 
558  if (!cleanupAdded) {
560  cleanupAdded = true;
561  }
562  if (qAccessibleFactories()->contains(factory))
563  return;
564  qAccessibleFactories()->append(factory);
565 }
void qAddPostRoutine(QtCleanUpFunction p)
static void qAccessibleCleanup()
static bool cleanupAdded

◆ installRootObjectHandler()

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

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

Definition at line 596 of file qaccessible.cpp.

Referenced by QTestAccessibility::QTestAccessibility(), and QTestAccessibility::~QTestAccessibility().

597 {
600  return old;
601 }
void(* RootObjectHandler)(QObject *)
A function pointer type.
Definition: qaccessible.h:321
QImageIOHandler * handler
static RootObjectHandler rootObjectHandler
Definition: qaccessible.h:338

◆ installUpdateHandler()

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

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

Warning
This function is not part of the public interface.

Definition at line 585 of file qaccessible.cpp.

Referenced by QTestAccessibility::QTestAccessibility(), and QTestAccessibility::~QTestAccessibility().

586 {
589  return old;
590 }
void(* UpdateHandler)(QObject *, int who, Event reason)
A function pointer type.
Definition: qaccessible.h:320
QImageIOHandler * handler
static UpdateHandler updateHandler
Definition: qaccessible.h:337

◆ isActive()

bool QAccessible::isActive ( )
static

◆ queryAccessibleInterface()

QAccessibleInterface * QAccessible::queryAccessibleInterface ( QObject object)
static

If a 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.

Definition at line 622 of file qaccessible.cpp.

Referenced by QAbstractItemViewPrivate::_q_columnsInserted(), QAbstractItemViewPrivate::_q_columnsRemoved(), QAbstractItemViewPrivate::_q_layoutChanged(), QAbstractItemViewPrivate::_q_rowsInserted(), QAbstractItemViewPrivate::_q_rowsRemoved(), QAccessibleItemView::accessibleAt(), AccessibleElement::AccessibleElement(), applicationEventHandler(), QAccessibleItemView::columnHeader(), QAccessibleWidget::navigate(), QAccessibleTable2::navigate(), QAccessibleAbstractScrollArea::navigate(), QAccessibleMenuItem::navigate(), QAccessibleApplication::navigate(), QAccessibleDisplay::navigate(), QAccessibleWidgetStack::navigate(), QAccessibleStackedWidget::navigate(), QAccessibleTable2Cell::navigate(), QAccessibleToolBox::navigate(), QAccessibleMdiArea::navigate(), QAccessibleMdiSubWindow::navigate(), QAccessibleWorkspace::navigate(), QAccessibleComboBox::navigate(), QAccessibleTable2CornerButton::navigate(), QAccessibleCalendarWidget::navigate(), QAccessibleDockWidget::navigate(), QAccessibleMainWindow::navigate(), QtWndProc(), QAccessibleHierarchyManager::registerInterface(), QAccessibleWidget::relationTo(), QAbstractItemView::reset(), QAccessibleWidget::role(), QAccessibleItemView::rowHeader(), QAccessibleAbstractScrollArea::setText(), QAccessibleAbstractScrollArea::state(), QAccessibleMenuItem::state(), QAccessibleTable2Cell::table(), QAccessibleAbstractScrollArea::text(), and updateAccessibility().

623 {
624  accessibility_active = true;
625  QAccessibleInterface *iface = 0;
626  if (!object)
627  return 0;
628 
629  const QMetaObject *mo = object->metaObject();
630  while (mo) {
631  const QLatin1String cn(mo->className());
632  for (int i = qAccessibleFactories()->count(); i > 0; --i) {
633  InterfaceFactory factory = qAccessibleFactories()->at(i - 1);
634  iface = factory(cn, object);
635  if (iface)
636  return iface;
637  }
638 #ifndef QT_NO_LIBRARY
639  QAccessibleFactoryInterface *factory = qobject_cast<QAccessibleFactoryInterface*>(loader()->instance(cn));
640  if (factory) {
641  iface = factory->create(cn, object);
642  if (iface)
643  return iface;
644  }
645 #endif
646  mo = mo->superClass();
647  }
648 
649  QWidget *widget = qobject_cast<QWidget*>(object);
650  if (widget)
651  return new QAccessibleWidget(widget);
652  else if (object == qApp)
653  return new QAccessibleApplication();
654 
655  return 0;
656 }
T qobject_cast(QObject *object)
Definition: qobject.h:375
The QMetaObject class contains meta-information about Qt objects.
Definition: qobjectdefs.h:304
The QAccessibleApplication class implements the QAccessibleInterface for QApplication.
QPointer< QWidget > widget
static bool accessibility_active
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
virtual QAccessibleInterface * create(const QString &key, QObject *object)=0
#define qApp
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
QAccessibleInterface *(* InterfaceFactory)(const QString &key, QObject *)
This is a typedef for a pointer to a function with the following signature:
Definition: qaccessible.h:319
const QMetaObject * superClass() const
Returns the meta-object of the superclass, or 0 if there is no such object.
Definition: qobjectdefs.h:494
The QAccessibleWidget class implements the QAccessibleInterface for QWidgets.
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
Definition: qaccessible.h:370
const char * className() const
Returns the class name.
Definition: qobjectdefs.h:491

◆ removeFactory()

void QAccessible::removeFactory ( InterfaceFactory  factory)
static

Removes factory from the list of installed InterfaceFactories.

Definition at line 570 of file qaccessible.cpp.

571 {
572  qAccessibleFactories()->removeAll(factory);
573 }

◆ setRootObject()

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 QAccessible::installRootObjectHandler() to redirect the function call to a customized handler function.

See also
queryAccessibleInterface()

Definition at line 2348 of file qaccessible_mac.mm.

Referenced by QApplication::exec().

2349 {
2350  // Call installed root object handler if we have one
2351  if (rootObjectHandler) {
2352  rootObjectHandler(object);
2353  return;
2354  }
2355 
2356  rootObject = object;
2357 }
static QObject * rootObject
static RootObjectHandler rootObjectHandler
Definition: qaccessible.h:338

◆ updateAccessibility()

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

Definition at line 2369 of file qaccessible_mac.mm.

Referenced by QMenuBarPrivate::_q_actionHovered(), QAbstractItemViewPrivate::_q_columnsInserted(), QAbstractItemViewPrivate::_q_columnsRemoved(), QPlainTextEditPrivate::_q_cursorPositionChanged(), QComboBoxPrivate::_q_dataChanged(), QComboBoxPrivate::_q_emitCurrentIndexChanged(), QAbstractItemViewPrivate::_q_layoutChanged(), QAbstractItemViewPrivate::_q_rowsInserted(), QAbstractItemViewPrivate::_q_rowsRemoved(), QLineEditPrivate::_q_selectionChanged(), QMenuPrivate::activateAction(), QDragManager::cancel(), QWidget::changeEvent(), QComboBox::clear(), QComboBox::clearEditText(), QWidget::clearFocus(), QTableView::currentChanged(), QListView::currentChanged(), QTreeView::currentChanged(), QDragManager::drag(), QOleDropTarget::Drop(), QLineControl::emitCursorPositionChanged(), QWidgetPrivate::hide_helper(), QWidgetPrivate::hideChildren(), QMenu::hideEvent(), QStatusBar::hideOrShow(), QTreeViewPrivate::insertViewItems(), QLineControl::internalSetText(), QAbstractSpinBox::keyPressEvent(), QMenu::popup(), QWhatsThisPrivate::QWhatsThisPrivate(), QAbstractButtonPrivate::refresh(), QTreeViewPrivate::removeViewItems(), QAbstractItemView::reset(), QTextControlPrivate::selectionChanged(), QTableView::selectionChanged(), QListView::selectionChanged(), QTreeView::selectionChanged(), QWidget::setAccessibleDescription(), QWidget::setAccessibleName(), QGroupBox::setChecked(), QTabBar::setCurrentIndex(), QPushButton::setDefault(), QComboBox::setEditText(), QWidget::setFocus(), QGraphicsScenePrivate::setFocusItemHelper(), QAbstractButton::setText(), QLabel::setText(), QGroupBox::setTitle(), QProgressBar::setValue(), QAbstractSlider::setValue(), QDialog::setVisible(), QWidgetPrivate::show_helper(), QMessageBox::showEvent(), QGraphicsItem::updateMicroFocus(), QWidget::updateMicroFocus(), QAbstractSpinBoxPrivate::updateState(), QWhatsThisPrivate::~QWhatsThisPrivate(), and QWidget::~QWidget().

2370 {
2371  // Call installed update handler if we have one.
2372  if (updateHandler) {
2373  updateHandler(object, child, reason);
2374  return;
2375  }
2376 
2377 #ifndef QT_MAC_USE_COCOA
2378  // Return if the mac accessibility is not enabled.
2379  if(!AXAPIEnabled())
2380  return;
2381 
2382  // Work around crash, disable accessiblity for focus frames.
2383  if (qstrcmp(object->metaObject()->className(), "QFocusFrame") == 0)
2384  return;
2385 
2386 // qDebug() << "updateAccessibility" << object << child << hex << reason;
2387 
2388  if (reason == ObjectShow) {
2390  accessibleHierarchyManager()->registerInterface(interface);
2391  }
2392 
2393  const QAElement element = accessibleHierarchyManager()->lookup(object, child);
2394  if (element.isValid() == false)
2395  return;
2396 
2397 
2398  CFStringRef notification = 0;
2399  if(object && object->isWidgetType() && reason == ObjectCreated) {
2400  notification = CFStringRef(QAXWindowCreatedNotification);
2401  } else if(reason == ValueChanged) {
2402  notification = CFStringRef(QAXValueChangedNotification);
2403  } else if(reason == MenuStart) {
2404  notification = CFStringRef(QAXMenuOpenedNotification);
2405  } else if(reason == MenuEnd) {
2406  notification = CFStringRef(QAXMenuClosedNotification);
2407  } else if(reason == LocationChanged) {
2408  notification = CFStringRef(QAXWindowMovedNotification);
2409  } else if(reason == ObjectShow || reason == ObjectHide ) {
2410  // When a widget is deleted we get a ObjectHide before the destroyed(QObject *)
2411  // signal is emitted (which makes sense). However, at this point we are in the
2412  // middle of the QWidget destructor which means that we have to be careful when
2413  // using the widget pointer. Since we can't control what the accessibilty interfaces
2414  // does when navigate() is called below we ignore the hide update in this case.
2415  // (the widget will be deleted soon anyway.)
2417  if (QWidget *widget = qobject_cast<QWidget*>(object)) {
2418  if (qt_widget_private(widget)->data.in_destructor)
2419  return;
2420 
2421  // Check widget parent as well, special case for preventing crash
2422  // when the viewport() of an abstract scroll area is hidden when
2423  // the QWidget destructor hides all its children.
2425  if (parentWidget && qt_widget_private(parentWidget)->data.in_destructor)
2426  return;
2427  }
2428 
2429  // There is no equivalent Mac notification for ObjectShow/Hide, so we call HIObjectSetAccessibilityIgnored
2430  // and isItInteresting which will mark the HIObject accociated with the element as ignored if the
2431  // QAccessible::Invisible state bit is set.
2432  QAInterface interface = accessibleHierarchyManager()->lookup(element);
2433  if (interface.isValid()) {
2434  HIObjectSetAccessibilityIgnored(element.object(), !isItInteresting(interface));
2435  }
2436 
2437  // If the interface manages its own children, also check if we should ignore those.
2438  if (isItemView(interface) == false && managesChildren(interface)) {
2439  for (int i = 1; i <= interface.childCount(); ++i) {
2440  QAInterface childInterface = interface.navigate(QAccessible::Child, i);
2441  if (childInterface.isValid() && childInterface.isHIView() == false) {
2442  const QAElement element = accessibleHierarchyManager()->lookup(childInterface);
2443  if (element.isValid()) {
2444  HIObjectSetAccessibilityIgnored(element.object(), !isItInteresting(childInterface));
2445  }
2446  }
2447  }
2448  }
2449 
2450  } else if(reason == Focus) {
2451  if(object && object->isWidgetType()) {
2452  QWidget *w = static_cast<QWidget*>(object);
2453  if(w->isWindow())
2455  else
2457  }
2458  }
2459 
2460  if (!notification)
2461  return;
2462 
2463  AXNotificationHIObjectNotify(notification, element.object(), element.id());
2464 #endif
2465 }
int registerInterface(const QDeclarativePrivate::RegisterInterface &interface)
const struct __CFString * CFStringRef
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
#define QAXValueChangedNotification
QPointer< QWidget > widget
HIObjectRef object() const
bool isWindow() const
Returns true if the widget is an independent window, otherwise returns false.
Definition: qwidget.h:945
QAInterface navigate(RelationFlag relation, int entry) const
#define QAXWindowCreatedNotification
bool isValid() const
#define QAXFocusedUIElementChangedNotification
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static bool isItemView(const QAInterface &interface)
#define QAXWindowMovedNotification
#define QAXFocusedWindowChangedNotification
bool isValid() const
bool isHIView() const
static const char * data(const QByteArray &arr)
static QWidget * parentWidget(const QWidget *w)
static QAccessibleInterface * queryAccessibleInterface(QObject *)
If a QAccessibleInterface implementation exists for the given object, this function returns a pointer...
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
Definition: qobject.h:146
const char * className() const
Returns the class name.
Definition: qobjectdefs.h:491
if(void) toggleToolbarShown
#define QAXMenuOpenedNotification
return(isPopup||isToolTip)
QList< QAElement > lookup(const QList< QAInterface > &interfaces)
int qstrcmp(const QByteArray &str1, const char *str2)
Definition: qbytearray.cpp:336
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920
#define QAXMenuClosedNotification
static UpdateHandler updateHandler
Definition: qaccessible.h:337
bool isItInteresting(const QAInterface &interface)
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
The QAccessible class provides enums and static functions relating to accessibility.
Definition: qaccessible.h:64
static bool managesChildren(const QAInterface &interface)

Properties

◆ rootObjectHandler

RootObjectHandler QAccessible::rootObjectHandler
staticprivate

Definition at line 338 of file qaccessible.h.

Referenced by installRootObjectHandler().

◆ updateHandler

UpdateHandler QAccessible::updateHandler
staticprivate

Definition at line 337 of file qaccessible.h.

Referenced by installUpdateHandler().


The documentation for this class was generated from the following files: