IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAccessibleSelectionInterface Class

The QAccessibleSelectionInterface class implements support for selection handling.

This class was introduced in Qt 6.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAccessibleSelectionInterface Class

  • Header: QAccessibleSelectionInterface

  • Since: Qt 6.5

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Inherited By:

  • Group: QAccessibleSelectionInterface is part of accessibility

This class is under development and is subject to change.

Detailed Description

It provides methods for both, retrieving the current selection as well as modifying the selection.

Only selections of direct children are supported.

Member Function Documentation

 

[virtual] QAccessibleSelectionInterface::~QAccessibleSelectionInterface()

[pure virtual] bool QAccessibleSelectionInterface::clear()

Unselects all accessible child items.

Returns whether all accessible child items have actually been removed from the selection, i.e. whether the selection is empty after this method has been called.

[virtual] bool QAccessibleSelectionInterface::isSelected(QAccessibleInterface *childItem) const

Returns whether childItem is part of the current selection.

The default implementation checks whether childItem is contained in the list of items retrieved by QAccessibleSelectionInterface::selectedItems.

[pure virtual] bool QAccessibleSelectionInterface::select(QAccessibleInterface *childItem)

Adds childItem to the selection. Returns whether childItem has actually been added to the selection.

For implementations that only allow single selections, this may replace the current selection.

[pure virtual] bool QAccessibleSelectionInterface::selectAll()

Selects all accessible child items.

Returns whether all accessible child items have actually been added to the selection.

[virtual] QAccessibleInterface *QAccessibleSelectionInterface::selectedItem(int selectionIndex) const

Returns the selected accessible item at index selectionIndex in the selection.

Note that the index refers to the n-th selected accessible item (i.e. the index in the current selection), which generally differs from the index that would be passed to QAccessibleInterface::child() in order to retrieve the same item.

The default implementation uses selectionIndex to retrieve the item from the list of selected items retrieved by QAccessibleSelectionInterface::selectedItems().

In particular for implementations dealing with many selected items, reimplementing this method in a more efficient way may be desirable for performance reasons.

[pure virtual] int QAccessibleSelectionInterface::selectedItemCount() const

Returns the total number of selected accessible items.

[pure virtual] QList<QAccessibleInterface *> QAccessibleSelectionInterface::selectedItems() const

Returns the list of selected accessible items.

[pure virtual] bool QAccessibleSelectionInterface::unselect(QAccessibleInterface *childItem)

Removes childItem from the selection.

Returns whether the accessible item has actually been removed from the selection.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+