QAccessibleClient::Registry Class
This class represents the global accessibility registry. More...
| Header: | #include <Registry> |
| CMake: | find_package(QAccessibilityClient REQUIRED)target_link_libraries(mytarget PRIVATE QAccessibilityClient::QAccessibilityClient) |
| Inherits: | QObject |
Public Types
| enum | EventListener { NoEventListeners, Window, Focus, StateChanged, ChildrenChanged, …, AllEventListeners } |
| flags | EventListeners |
Public Functions
Public Slots
| QAccessibleClient::AccessibleObject | accessibleFromUrl(const QUrl &url) const |
| QList<QAccessibleClient::AccessibleObject> | applications() const |
| bool | isEnabled() const |
| bool | isScreenReaderEnabled() const |
| void | setEnabled(bool enable) |
| void | setScreenReaderEnabled(bool enable) |
| void | subscribeEventListeners(const QAccessibleClient::Registry::EventListeners &listeners) const |
| QAccessibleClient::Registry::EventListeners | subscribedEventListeners() const |
Signals
| void | accessibleDescriptionChanged(const QAccessibleClient::AccessibleObject &object) |
| void | accessibleNameChanged(const QAccessibleClient::AccessibleObject &object) |
| void | added(const QAccessibleClient::AccessibleObject &object) |
| void | childAdded(const QAccessibleClient::AccessibleObject &parent, int childIndex) |
| void | childRemoved(const QAccessibleClient::AccessibleObject &parent, int childIndex) |
| void | defunct(const QAccessibleClient::AccessibleObject &object) |
| void | enabledChanged(bool enabled) |
| void | focusChanged(const QAccessibleClient::AccessibleObject &object) |
| void | modelChanged(const QAccessibleClient::AccessibleObject &object) |
| void | removed(const QAccessibleClient::AccessibleObject &object) |
| void | screenReaderEnabledChanged(bool enabled) |
| void | selectionChanged(const QAccessibleClient::AccessibleObject &object) |
| void | stateChanged(const QAccessibleClient::AccessibleObject &object, const QString &state, bool active) |
| void | textCaretMoved(const QAccessibleClient::AccessibleObject &object, int pos) |
| void | textChanged(const QAccessibleClient::AccessibleObject &object, const QString &text, int startOffset, int endOffset) |
| void | textInserted(const QAccessibleClient::AccessibleObject &object, const QString &text, int startOffset, int endOffset) |
| void | textRemoved(const QAccessibleClient::AccessibleObject &object, const QString &text, int startOffset, int endOffset) |
| void | textSelectionChanged(const QAccessibleClient::AccessibleObject &object) |
| void | visibleDataChanged(const QAccessibleClient::AccessibleObject &object) |
| void | windowActivated(const QAccessibleClient::AccessibleObject &object) |
| void | windowClosed(const QAccessibleClient::AccessibleObject &object) |
| void | windowCreated(const QAccessibleClient::AccessibleObject &object) |
| void | windowDeactivated(const QAccessibleClient::AccessibleObject &object) |
| void | windowDesktopCreated(const QAccessibleClient::AccessibleObject &object) |
| void | windowDesktopDestroyed(const QAccessibleClient::AccessibleObject &object) |
| void | windowDestroyed(const QAccessibleClient::AccessibleObject &object) |
| void | windowLowered(const QAccessibleClient::AccessibleObject &object) |
| void | windowMaximized(const QAccessibleClient::AccessibleObject &object) |
| void | windowMinimized(const QAccessibleClient::AccessibleObject &object) |
| void | windowMoved(const QAccessibleClient::AccessibleObject &object) |
| void | windowRaised(const QAccessibleClient::AccessibleObject &object) |
| void | windowReparented(const QAccessibleClient::AccessibleObject &object) |
| void | windowResized(const QAccessibleClient::AccessibleObject &object) |
| void | windowRestored(const QAccessibleClient::AccessibleObject &object) |
| void | windowShaded(const QAccessibleClient::AccessibleObject &object) |
| void | windowUnshaded(const QAccessibleClient::AccessibleObject &object) |
Detailed Description
It provides information about running applications. All updates of accessible objects will result in signals emitted by this class.
Member Type Documentation
enum Registry::EventListener
flags Registry::EventListeners
This enum describes the different types of events that can be observed.
| Constant | Value | Description |
|---|---|---|
QAccessibleClient::Registry::NoEventListeners | 0x0 | No event listeners registered or wanted. |
QAccessibleClient::Registry::Window | 0x1 | Window changes, such as new applications being started. |
QAccessibleClient::Registry::Focus | 0x2 | Focus listener reacts to focus changes. See signal focusChanged. |
QAccessibleClient::Registry::StateChanged | 0x20 | State of the accessible changed. See signal stateChanged. |
QAccessibleClient::Registry::ChildrenChanged | 0x40 | Children changed. See signal childrenChanged. |
QAccessibleClient::Registry::VisibleDataChanged | 0x80 | Visibility of the accessible changed. See signal visibleDataChanged. |
QAccessibleClient::Registry::SelectionChanged | 0x100 | Selection changed. See signal selectionChanged. |
QAccessibleClient::Registry::ModelChanged | 0x200 | The model changed. See signal modelChanged. |
QAccessibleClient::Registry::TextCaretMoved | 0x400 | The text caret moved its position. See signal textCaretMoved. |
QAccessibleClient::Registry::TextChanged | 0x800 | The text changed. See signal textChanged. |
QAccessibleClient::Registry::TextSelectionChanged | 0x1000 | The text selection changed. See signal textSelectionChanged. |
QAccessibleClient::Registry::PropertyChanged | 0x2000 | A property changed. See signals accessibleNameChanged and accessibleDescriptionChanged. |
QAccessibleClient::Registry::AllEventListeners | 0xffffffff | All possible event listeners. |
The EventListeners type is a typedef for QFlags<EventListener>. It stores an OR combination of EventListener values.
Member Function Documentation
[explicit] Registry::Registry(QObject *parent = nullptr)
Construct a Registry object with parent as QObject parent.
[override virtual noexcept] Registry::~Registry()
Destroys this Registry.
[signal] void Registry::accessibleDescriptionChanged(const QAccessibleClient::AccessibleObject &object)
Emitted when an accessible description changes
When subscribed to the PropertyChanged EventListener, this signal is emitted whenever the accessible-description property of property changes its value.
[slot] QAccessibleClient::AccessibleObject Registry::accessibleFromUrl(const QUrl &url) const
Creates the AccessibleObject for the url.
This can be used to deserialize an AccessibleObject after passing it around as string.
The returned QUrl returns a scheme of "accessibleobject".
[signal] void Registry::accessibleNameChanged(const QAccessibleClient::AccessibleObject &object)
Emitted when an accessible name changes.
When subscribed to the PropertyChanged EventListener, this signal is emitted whenever the accessible-name property of object changes its value.
[signal] void Registry::added(const QAccessibleClient::AccessibleObject &object)
Emitted if an AccessibleObject object is created.
This signal indicates that the AccessibleObject instance was created and is going to be added/attached.
[slot] QList<QAccessibleClient::AccessibleObject> Registry::applications() const
List of all currently running applications that expose an accessibility interface.
[signal] void Registry::childAdded(const QAccessibleClient::AccessibleObject &parent, int childIndex)
Notifies about a new AccessibleObject.
The childAdded signal is emitted when a new accessible object is created. This signal depends on the implementation of the server side and is not reliable for all applications. The parameter childIndex is the index of the child that has been added.
See also AccessibleObject::child() and childRemoved().
[signal] void Registry::childRemoved(const QAccessibleClient::AccessibleObject &parent, int childIndex)
Notifies that an AccessibleObject has been removed.
The parameter childIndex is the index of the child that has been removed.
See also AccessibleObject::child() and childAdded().
[signal] void Registry::defunct(const QAccessibleClient::AccessibleObject &object)
Emitted if an AccessibleObject object is marked defunct.
This signal indicates that the AccessibleObject became invalid and does not point any longer to any valid accessible object.
[signal] void Registry::enabledChanged(bool enabled)
Emitted if the isEnabled state changed.
If the accessibility daemon got enabled or disabled either by us or someone else then this signal is emitted.
[signal] void Registry::focusChanged(const QAccessibleClient::AccessibleObject &object)
Emitted when the focus changed.
When subscribed to the Focus EventListener then this signal is emitted every time the focus changes.
The object is the newly focused AccessibleObject.
[slot] bool Registry::isEnabled() const
Returns true if the accessibility stack is enabled.
This means that an atspi registry daemon is running and available as org.a11y.bus at the session D-Bus.
The org.a11y.bus implements the org.a11y.Status dbus interface that offers the IsEnabled property.
The isEnabled and setEnabled methods do read/write the boolean value of that org.a11y.Status.IsEnabled D-Bus property.
[slot] bool Registry::isScreenReaderEnabled() const
Returns true if the screen reader is enabled.
This means that there is potentially a screen reader, if installed, that is enabled or disabled. This allows to enable system wide a screen reader with just one switch.
[signal] void Registry::modelChanged(const QAccessibleClient::AccessibleObject &object)
Notifies that the object's table model changed.
[signal] void Registry::removed(const QAccessibleClient::AccessibleObject &object)
Emitted if an AccessibleObject object is destroyed.
This signal indicates that the AccessibleObject instance was destroyed and ended its life-time.
[signal] void Registry::screenReaderEnabledChanged(bool enabled)
Emitted if the isScreenReaderEnabled state changed.
If the screen reader enabled property got enabled or disabled either by us or by someone else then this signal is emitted.
[signal] void Registry::selectionChanged(const QAccessibleClient::AccessibleObject &object)
Notifies that the object's selection changed.
[slot] void Registry::setEnabled(bool enable)
Activates accessibility with paremeter enable and tells toolkits to provide updates such as focus changes.
See also isEnabled().
[slot] void Registry::setScreenReaderEnabled(bool enable)
Activates the screen reader with parameter enable.
See also isScreenReaderEnabled().
[signal] void Registry::stateChanged(const QAccessibleClient::AccessibleObject &object, const QString &state, bool active)
Notifies about a state change in an object.
The state of the given object has changed. If the state is now set active is true, otherwise the state was removed.
[slot] void Registry::subscribeEventListeners(const QAccessibleClient::Registry::EventListeners &listeners) const
In order to get notified of changes in accessible applications it is neccessary to subscribe to the listeners that are relevant.
This will unsubscribe all previously subscribed event listeners.
[slot] QAccessibleClient::Registry::EventListeners Registry::subscribedEventListeners() const
Returns the active event listeners.
[signal] void Registry::textCaretMoved(const QAccessibleClient::AccessibleObject &object, int pos)
Emitted when the text caret moved.
When subscribed to the TextCaretMoved EventListener then this signal is emitted every time the caret in an accessible object that implements a text-interface (like QLineEdit, QTextArea and QComboBox) moved to another position pos.
[signal] void Registry::textChanged(const QAccessibleClient::AccessibleObject &object, const QString &text, int startOffset, int endOffset)
Emitted when an object's text was changed.
The new text will be text. The change starts at startOffset and goes to endOffset.
See also textInserted and textRemoved.
[signal] void Registry::textInserted(const QAccessibleClient::AccessibleObject &object, const QString &text, int startOffset, int endOffset)
Emitted when text was inserted in an object's text.
The new text will be text. The change starts at startOffset and goes to endOffset.
See also textInserted and textRemoved.
[signal] void Registry::textRemoved(const QAccessibleClient::AccessibleObject &object, const QString &text, int startOffset, int endOffset)
Emitted when an object's text was removed.
The removed text will be text, but this string may be emtpy for some implementations. The removal starts at startOffset and goes to endOffset.
See also textInserted and textRemoved.
[signal] void Registry::textSelectionChanged(const QAccessibleClient::AccessibleObject &object)
Emitted when the text selection changed.
When subscribed to the TextSelectionChanged EventListener then this signal is emitted every time the selection in an accessible object that implements a text-interface (like QLineEdit, QTextArea and QComboBox) changed.
[signal] void Registry::visibleDataChanged(const QAccessibleClient::AccessibleObject &object)
Notifies that the object's visible data changed.
[signal] void Registry::windowActivated(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is activated
[signal] void Registry::windowClosed(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is closed
[signal] void Registry::windowCreated(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is created
[signal] void Registry::windowDeactivated(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is deactivated
[signal] void Registry::windowDesktopCreated(const QAccessibleClient::AccessibleObject &object)
Emitted when a desktop window is created
[signal] void Registry::windowDesktopDestroyed(const QAccessibleClient::AccessibleObject &object)
Emitted when a desktop window is destroyed
[signal] void Registry::windowDestroyed(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is destroyed
[signal] void Registry::windowLowered(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is lowered
[signal] void Registry::windowMaximized(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is maximized
[signal] void Registry::windowMinimized(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is minimized
[signal] void Registry::windowMoved(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is moved
[signal] void Registry::windowRaised(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is raised
[signal] void Registry::windowReparented(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is reparented
[signal] void Registry::windowResized(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is resized
[signal] void Registry::windowRestored(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is restored to normal size
[signal] void Registry::windowShaded(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is shaded
[signal] void Registry::windowUnshaded(const QAccessibleClient::AccessibleObject &object)
Emitted when a window is unshaded