[][src]Struct qt_gui::QAccessible

#[repr(C)]pub struct QAccessible { /* fields omitted */ }

The QAccessible class provides enums and static functions related to accessibility.

C++ class: QAccessible.

C++ documentation:

The QAccessible class provides enums and static functions related to accessibility.

This class is part of Accessibility for QWidget Applications.

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.

Qt supports Microsoft Active Accessibility (MSAA), macOS Accessibility, and the Unix/X11 AT-SPI standard. Other backends can be supported using QAccessibleBridge.

In the Unix/X11 AT-SPI implementation, applications become accessible when two conditions are met:

  • org.a11y.Status.IsEnabled DBus property is true
  • org.a11y.Status.ScreenReaderEnabled DBus property is true

An alternative to setting the DBus AT-SPI properties is to set the QT_LINUX_ACCESSIBILITY_ALWAYS_ON environment variable.

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.

Methods

impl QAccessible[src]

pub unsafe fn accessible_interface(
    unique_id: c_uint
) -> Ptr<QAccessibleInterface>
[src]

Returns the QAccessibleInterface belonging to the id.

Calls C++ function: static QAccessibleInterface* QAccessible::accessibleInterface(unsigned int uniqueId).

C++ documentation:

Returns the QAccessibleInterface belonging to the id.

Returns 0 if the id is invalid.

pub unsafe fn cleanup()[src]

Calls C++ function: static void QAccessible::cleanup().

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QAccessible>>
) -> Ref<QAccessible>
[src]

The QAccessible class provides enums and static functions related to accessibility.

Calls C++ function: QAccessible& QAccessible::operator=(const QAccessible& other).

C++ documentation:

The QAccessible class provides enums and static functions related to accessibility.

This class is part of Accessibility for QWidget Applications.

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.

Qt supports Microsoft Active Accessibility (MSAA), macOS Accessibility, and the Unix/X11 AT-SPI standard. Other backends can be supported using QAccessibleBridge.

In the Unix/X11 AT-SPI implementation, applications become accessible when two conditions are met:

  • org.a11y.Status.IsEnabled DBus property is true
  • org.a11y.Status.ScreenReaderEnabled DBus property is true

An alternative to setting the DBus AT-SPI properties is to set the QT_LINUX_ACCESSIBILITY_ALWAYS_ON environment variable.

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.

pub unsafe fn delete_accessible_interface(unique_id: c_uint)[src]

Removes the interface belonging to this id from the cache and deletes it. The id becomes invalid an may be re-used by the cache.

Calls C++ function: static void QAccessible::deleteAccessibleInterface(unsigned int uniqueId).

C++ documentation:

Removes the interface belonging to this id from the cache and deletes it. The id becomes invalid an may be re-used by the cache.

pub unsafe fn install_root_object_handler(
    arg1: Option<extern "C" fn(_: *mut QObject)>
) -> Option<extern "C" fn(_: *mut QObject)>
[src]

Calls C++ function: static void (*FN_PTR)(QObject *) QAccessible::installRootObjectHandler(void (*FN_PTR)(QObject *) arg1).

pub unsafe fn install_update_handler(
    arg1: Option<extern "C" fn(_: *mut QAccessibleEvent)>
) -> Option<extern "C" fn(_: *mut QAccessibleEvent)>
[src]

Calls C++ function: static void (*FN_PTR)(QAccessibleEvent *) QAccessible::installUpdateHandler(void (*FN_PTR)(QAccessibleEvent *) arg1).

pub unsafe fn is_active() -> bool[src]

Returns true if the platform requested accessibility information.

Calls C++ function: static bool QAccessible::isActive().

C++ documentation:

Returns true if the platform requested accessibility information.

This function will return false until a tool such as a screen reader accessed the accessibility framework. It is still possible to use QAccessible::queryAccessibleInterface() even if accessibility is not active. But there will be no notifications sent to the platform.

It is recommended to use this function to prevent expensive notifications via updateAccessibility() when they are not needed.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QAccessible>>
) -> CppBox<QAccessible>
[src]

The QAccessible class provides enums and static functions related to accessibility.

Calls C++ function: [constructor] void QAccessible::QAccessible(const QAccessible& other).

C++ documentation:

The QAccessible class provides enums and static functions related to accessibility.

This class is part of Accessibility for QWidget Applications.

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.

Qt supports Microsoft Active Accessibility (MSAA), macOS Accessibility, and the Unix/X11 AT-SPI standard. Other backends can be supported using QAccessibleBridge.

In the Unix/X11 AT-SPI implementation, applications become accessible when two conditions are met:

  • org.a11y.Status.IsEnabled DBus property is true
  • org.a11y.Status.ScreenReaderEnabled DBus property is true

An alternative to setting the DBus AT-SPI properties is to set the QT_LINUX_ACCESSIBILITY_ALWAYS_ON environment variable.

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.

pub unsafe fn q_accessible_text_boundary_helper(
    cursor: impl CastInto<Ref<QTextCursor>>,
    boundary_type: TextBoundaryType
) -> CppBox<QPairOfIntInt>
[src]

Calls C++ function: static QPair<int, int> QAccessible::qAccessibleTextBoundaryHelper(const QTextCursor& cursor, QAccessible::TextBoundaryType boundaryType).

pub unsafe fn query_accessible_interface(
    arg1: impl CastInto<Ptr<QObject>>
) -> Ptr<QAccessibleInterface>
[src]

If a QAccessibleInterface implementation exists for the given object, this function returns a pointer to the implementation; otherwise it returns 0.

Calls C++ function: static QAccessibleInterface* QAccessible::queryAccessibleInterface(QObject* arg1).

C++ documentation:

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.

All interfaces are managed by an internal cache and should not be deleted.

pub unsafe fn register_accessible_interface(
    iface: impl CastInto<Ptr<QAccessibleInterface>>
) -> c_uint
[src]

Call this function to ensure that manually created interfaces are properly memory managed.

Calls C++ function: static unsigned int QAccessible::registerAccessibleInterface(QAccessibleInterface* iface).

C++ documentation:

Call this function to ensure that manually created interfaces are properly memory managed.

Must only be called exactly once per interface iface. This is implicitly called when calling queryAccessibleInterface, calling this function is only required when QAccessibleInterfaces are instantiated with the "new" operator. This is not recommended, whenever possible use the default functions and let queryAccessibleInterface() take care of this.

When it is necessary to reimplement the QAccessibleInterface::child() function and returning the child after constructing it, this function needs to be called.

pub unsafe fn set_active(active: bool)[src]

Calls C++ function: static void QAccessible::setActive(bool active).

pub unsafe fn set_root_object(object: impl CastInto<Ptr<QObject>>)[src]

Sets the root object of the accessible objects of this application to object. All other accessible objects are reachable using object navigation from the root object.

Calls C++ function: static void QAccessible::setRootObject(QObject* object).

C++ documentation:

Sets the root object of the accessible objects of this application to object. All other accessible objects are reachable using object navigation from the root object.

Normally, it isn't necessary to call this function, because 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().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn unique_id(
    iface: impl CastInto<Ptr<QAccessibleInterface>>
) -> c_uint
[src]

Returns the unique ID for the QAccessibleInterface iface.

Calls C++ function: static unsigned int QAccessible::uniqueId(QAccessibleInterface* iface).

C++ documentation:

Returns the unique ID for the QAccessibleInterface iface.

pub unsafe fn update_accessibility(event: impl CastInto<Ptr<QAccessibleEvent>>)[src]

Use QAccessible::updateAccessibility(QAccessibleEvent*) instead.

Calls C++ function: static void QAccessible::updateAccessibility(QAccessibleEvent* event).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static void QAccessible::updateAccessibility(QObject *object, int child, Event reason):

Use QAccessible::updateAccessibility(QAccessibleEvent*) instead.

Trait Implementations

impl CppDeletable for QAccessible[src]

unsafe fn delete(&self)[src]

The QAccessible class provides enums and static functions related to accessibility.

Calls C++ function: [destructor] void QAccessible::~QAccessible().

C++ documentation:

The QAccessible class provides enums and static functions related to accessibility.

This class is part of Accessibility for QWidget Applications.

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.

Qt supports Microsoft Active Accessibility (MSAA), macOS Accessibility, and the Unix/X11 AT-SPI standard. Other backends can be supported using QAccessibleBridge.

In the Unix/X11 AT-SPI implementation, applications become accessible when two conditions are met:

  • org.a11y.Status.IsEnabled DBus property is true
  • org.a11y.Status.ScreenReaderEnabled DBus property is true

An alternative to setting the DBus AT-SPI properties is to set the QT_LINUX_ACCESSIBILITY_ALWAYS_ON environment variable.

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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.