diff options
Diffstat (limited to 'src/gui/accessible/qaccessible.cpp')
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 6b48f573b2..46dec7f28d 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -654,7 +654,7 @@ void QAccessible::removeActivationObserver(ActivationObserver *observer) /*! If a QAccessibleInterface implementation exists for the given \a object, this function returns a pointer to the implementation; otherwise it - returns 0. + returns \nullptr. The function calls all installed factory functions (from most recently installed to least recently installed) until one is found @@ -770,7 +770,7 @@ QAccessible::Id QAccessible::uniqueId(QAccessibleInterface *iface) /*! Returns the QAccessibleInterface belonging to the \a id. - Returns 0 if the id is invalid. + Returns \nullptr if the id is invalid. */ QAccessibleInterface *QAccessible::accessibleInterface(Id id) { @@ -1119,7 +1119,7 @@ QAccessibleInterface *QAccessibleInterface::focusChild() const \fn QAccessibleInterface *QAccessibleInterface::childAt(int x, int y) const Returns the QAccessibleInterface of a child that contains the screen coordinates (\a x, \a y). - If there are no children at this position this function returns 0. + If there are no children at this position this function returns \nullptr. The returned accessible must be a child, but not necessarily a direct child. This function is only relyable for visible objects (invisible @@ -1139,7 +1139,7 @@ QAccessibleInterface *QAccessibleInterface::focusChild() const Returns the QAccessibleInterface of the parent in the accessible object hierarchy. - Returns 0 if no parent exists (e.g. for the top level application object). + Returns \nullptr if no parent exists (e.g. for the top level application object). \sa child() */ @@ -1150,7 +1150,7 @@ QAccessibleInterface *QAccessibleInterface::focusChild() const Returns the accessible child with index \a index. 0-based index. The number of children of an object can be checked with childCount. - Returns 0 when asking for an invalid child (e.g. when the child became invalid in the meantime). + Returns \nullptr when asking for an invalid child (e.g. when the child became invalid in the meantime). \sa childCount(), parent() */ @@ -1309,14 +1309,7 @@ QColor QAccessibleInterface::backgroundColor() const For example to notify about a focus change when re-implementing QWidget::setFocus, the event could be used as follows: - \code - void MyWidget::setFocus(Qt::FocusReason reason) - { - // handle custom focus setting... - QAccessibleEvent event(f, QAccessible::Focus); - QAccessible::updateAccessibility(&event); - } - \endcode + \snippet code/src_gui_accessible_qaccessible.cpp 2 To enable in process screen readers, all events must be sent after the change has happened. */ @@ -1363,7 +1356,7 @@ QAccessibleEvent::~QAccessibleEvent() \internal Returns the uniqueId of the QAccessibleInterface represented by this event. - In case the object() function returns 0 this is the only way to access the + In case the object() function returns \nullptr, this is the only way to access the interface. */ QAccessible::Id QAccessibleEvent::uniqueId() const @@ -1793,7 +1786,7 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const (This means that at least one interface among the ancestors should return a valid QWindow pointer). - The default implementation returns 0. + The default implementation returns \nullptr. */ QWindow *QAccessibleInterface::window() const { @@ -1826,14 +1819,7 @@ void QAccessibleInterface::virtual_hook(int /*id*/, void * /*data*/) Qt's QLineEdit for example has its accessibility support implemented in QAccessibleLineEdit. - \code -void *QAccessibleLineEdit::interface_cast(QAccessible::InterfaceType t) -{ - if (t == QAccessible::TextInterface) - return static_cast<QAccessibleTextInterface*>(this); - return QAccessibleWidget::interface_cast(t); -} - \endcode + \snippet code/src_gui_accessible_qaccessible.cpp 3 \sa QAccessible::InterfaceType, QAccessibleTextInterface, QAccessibleValueInterface, QAccessibleActionInterface, |