#[repr(C)]
pub struct QAccessibleActionInterface { /* private fields */ }
Expand description

The QAccessibleActionInterface class implements support for invocable actions in the interface.

C++ class: QAccessibleActionInterface.

C++ documentation:

The QAccessibleActionInterface class implements support for invocable actions in the interface.

Accessible objects should implement the action interface if they support user interaction. Usually this interface is implemented by classes that also implement QAccessibleInterface.

The supported actions should use the predefined actions offered in this class unless they do not fit a predefined action. In that case a custom action can be added.

When subclassing QAccessibleActionInterface you need to provide a list of actionNames which is the primary means to discover the available actions. Action names are never localized. In order to present actions to the user there are two functions that need to return localized versions of the name and give a description of the action. For the predefined action names use QAccessibleActionInterface::localizedActionName() and QAccessibleActionInterface::localizedActionDescription() to return their localized counterparts.

In general you should use one of the predefined action names, unless describing an action that does not fit these:

Action nameDescription
toggleAction()toggles the item (checkbox, radio button, switch, ...)
decreaseAction()decrease the value of the accessible (e.g. spinbox)
increaseAction()increase the value of the accessible (e.g. spinbox)
pressAction()press or click or activate the accessible (should correspont to clicking the object with the mouse)
setFocusAction()set the focus to this accessible
showMenuAction()show a context menu, corresponds to right-clicks

In order to invoke the action, doAction() is called with an action name.

Most widgets will simply implement pressAction(). This is what happens when the widget is activated by being clicked, space pressed or similar.

IAccessible2 Specification

Implementations§

source§

impl QAccessibleActionInterface

source

pub unsafe fn action_names(&self) -> CppBox<QStringList>

Returns the list of actions supported by this accessible object. The actions returned should be in preferred order, i.e. the action that the user most likely wants to trigger should be returned first, while the least likely action should be returned last.

Calls C++ function: pure virtual QStringList QAccessibleActionInterface::actionNames() const.

C++ documentation:

Returns the list of actions supported by this accessible object. The actions returned should be in preferred order, i.e. the action that the user most likely wants to trigger should be returned first, while the least likely action should be returned last.

The list does only contain actions that can be invoked. It won't return disabled actions, or actions associated with disabled UI controls.

The list can be empty.

Note that this list is not localized. For a localized representation re-implement localizedActionName() and localizedActionDescription()

See also doAction(), localizedActionName(), and localizedActionDescription().

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QAccessibleActionInterface>> ) -> Ref<QAccessibleActionInterface>

The QAccessibleActionInterface class implements support for invocable actions in the interface.

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

C++ documentation:

The QAccessibleActionInterface class implements support for invocable actions in the interface.

Accessible objects should implement the action interface if they support user interaction. Usually this interface is implemented by classes that also implement QAccessibleInterface.

The supported actions should use the predefined actions offered in this class unless they do not fit a predefined action. In that case a custom action can be added.

When subclassing QAccessibleActionInterface you need to provide a list of actionNames which is the primary means to discover the available actions. Action names are never localized. In order to present actions to the user there are two functions that need to return localized versions of the name and give a description of the action. For the predefined action names use QAccessibleActionInterface::localizedActionName() and QAccessibleActionInterface::localizedActionDescription() to return their localized counterparts.

In general you should use one of the predefined action names, unless describing an action that does not fit these:

Action nameDescription
toggleAction()toggles the item (checkbox, radio button, switch, ...)
decreaseAction()decrease the value of the accessible (e.g. spinbox)
increaseAction()increase the value of the accessible (e.g. spinbox)
pressAction()press or click or activate the accessible (should correspont to clicking the object with the mouse)
setFocusAction()set the focus to this accessible
showMenuAction()show a context menu, corresponds to right-clicks

In order to invoke the action, doAction() is called with an action name.

Most widgets will simply implement pressAction(). This is what happens when the widget is activated by being clicked, space pressed or similar.

IAccessible2 Specification

source

pub unsafe fn decrease_action() -> Ref<QString>

Returns the name of the decrease default action.

Calls C++ function: static const QString& QAccessibleActionInterface::decreaseAction().

C++ documentation:

Returns the name of the decrease default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn do_action(&self, action_name: impl CastInto<Ref<QString>>)

Invokes the action specified by actionName. Note that actionName is the non-localized name as returned by actionNames() This function is usually implemented by calling the same functions that other user interaction, such as clicking the object, would trigger.

Calls C++ function: pure virtual void QAccessibleActionInterface::doAction(const QString& actionName).

C++ documentation:

Invokes the action specified by actionName. Note that actionName is the non-localized name as returned by actionNames() This function is usually implemented by calling the same functions that other user interaction, such as clicking the object, would trigger.

See also actionNames().

source

pub unsafe fn increase_action() -> Ref<QString>

Returns the name of the increase default action.

Calls C++ function: static const QString& QAccessibleActionInterface::increaseAction().

C++ documentation:

Returns the name of the increase default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn key_bindings_for_action( &self, action_name: impl CastInto<Ref<QString>> ) -> CppBox<QStringList>

Returns a list of the keyboard shortcuts available for invoking the action named actionName.

Calls C++ function: pure virtual QStringList QAccessibleActionInterface::keyBindingsForAction(const QString& actionName) const.

C++ documentation:

Returns a list of the keyboard shortcuts available for invoking the action named actionName.

This is important to let users learn alternative ways of using the application by emphasizing the keyboard.

See also actionNames().

source

pub unsafe fn localized_action_description( &self, name: impl CastInto<Ref<QString>> ) -> CppBox<QString>

Returns a localized action description of the action actionName.

Calls C++ function: virtual QString QAccessibleActionInterface::localizedActionDescription(const QString& name) const.

C++ documentation:

Returns a localized action description of the action actionName.

When using one of the default names, you can call this function in QAccessibleActionInterface to get the localized string.

See also actionNames() and localizedActionName().

source

pub unsafe fn localized_action_name( &self, name: impl CastInto<Ref<QString>> ) -> CppBox<QString>

Returns a localized action name of actionName.

Calls C++ function: virtual QString QAccessibleActionInterface::localizedActionName(const QString& name) const.

C++ documentation:

Returns a localized action name of actionName.

For custom actions this function has to be re-implemented. When using one of the default names, you can call this function in QAccessibleActionInterface to get the localized string.

See also actionNames() and localizedActionDescription().

source

pub unsafe fn next_page_action() -> CppBox<QString>

Returns the name of the next page default action.

Calls C++ function: static QString QAccessibleActionInterface::nextPageAction().

C++ documentation:

Returns the name of the next page default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn press_action() -> Ref<QString>

Returns the name of the press default action.

Calls C++ function: static const QString& QAccessibleActionInterface::pressAction().

C++ documentation:

Returns the name of the press default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn previous_page_action() -> CppBox<QString>

Returns the name of the previous page default action.

Calls C++ function: static QString QAccessibleActionInterface::previousPageAction().

C++ documentation:

Returns the name of the previous page default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn scroll_down_action() -> CppBox<QString>

Returns the name of the scroll down default action.

Calls C++ function: static QString QAccessibleActionInterface::scrollDownAction().

C++ documentation:

Returns the name of the scroll down default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn scroll_left_action() -> CppBox<QString>

Returns the name of the scroll left default action.

Calls C++ function: static QString QAccessibleActionInterface::scrollLeftAction().

C++ documentation:

Returns the name of the scroll left default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn scroll_right_action() -> CppBox<QString>

Returns the name of the scroll right default action.

Calls C++ function: static QString QAccessibleActionInterface::scrollRightAction().

C++ documentation:

Returns the name of the scroll right default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn scroll_up_action() -> CppBox<QString>

Returns the name of the scroll up default action.

Calls C++ function: static QString QAccessibleActionInterface::scrollUpAction().

C++ documentation:

Returns the name of the scroll up default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn set_focus_action() -> Ref<QString>

Returns the name of the set focus default action.

Calls C++ function: static const QString& QAccessibleActionInterface::setFocusAction().

C++ documentation:

Returns the name of the set focus default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn show_menu_action() -> Ref<QString>

Returns the name of the show menu default action.

Calls C++ function: static const QString& QAccessibleActionInterface::showMenuAction().

C++ documentation:

Returns the name of the show menu default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn toggle_action() -> Ref<QString>

Returns the name of the toggle default action.

Calls C++ function: static const QString& QAccessibleActionInterface::toggleAction().

C++ documentation:

Returns the name of the toggle default action.

See also actionNames() and localizedActionName().

source

pub unsafe fn tr( source_text: *const c_char, disambiguation: *const c_char, n: c_int ) -> CppBox<QString>

Calls C++ function: static QString QAccessibleActionInterface::tr(const char* sourceText, const char* disambiguation, int n).

source

pub unsafe fn tr_utf8( source_text: *const c_char, disambiguation: *const c_char, n: c_int ) -> CppBox<QString>

Calls C++ function: static QString QAccessibleActionInterface::trUtf8(const char* sourceText, const char* disambiguation, int n).

Trait Implementations§

source§

impl CppDeletable for QAccessibleActionInterface

source§

unsafe fn delete(&self)

Destroys the QAccessibleActionInterface.

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

C++ documentation:

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.