- class QAccessibleSelectionInterface¶
The
QAccessibleSelectionInterface
class implements support for selection handling. More…Added in version 6.7.
Synopsis¶
Virtual methods¶
def
clear()
def
isSelected()
def
select()
def
selectAll()
def
selectedItem()
def
selectedItems()
def
unselect()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
It provides methods for both, retrieving the current selection as well as modifying the selection.
Only selections of direct children are supported.
- abstract clear()¶
- Return type:
bool
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.
- isSelected(childItem)¶
- Parameters:
childItem –
QAccessibleInterface
- Return type:
bool
Returns whether
childItem
is part of the current selection.The default implementation checks whether
childItem
is contained in the list of items retrieved byselectedItems
.- abstract select(childItem)¶
- Parameters:
childItem –
QAccessibleInterface
- Return type:
bool
Adds
childItem
to the selection. Returns whetherchildItem
has actually been added to the selection.For implementations that only allow single selections, this may replace the current selection.
- abstract selectAll()¶
- Return type:
bool
Selects all accessible child items.
Returns whether all accessible child items have actually been added to the selection.
- selectedItem(selectionIndex)¶
- Parameters:
selectionIndex – int
- Return type:
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
child()
in order to retrieve the same item.The default implementation uses
selectionIndex
to retrieve the item from the list of selected items retrieved byselectedItems()
.In particular for implementations dealing with many selected items, reimplementing this method in a more efficient way may be desirable for performance reasons.
- abstract selectedItemCount()¶
- Return type:
int
Returns the total number of selected accessible items.
- abstract selectedItems()¶
- Return type:
.list of QAccessibleInterface
Returns the list of selected accessible items.
- abstract unselect(childItem)¶
- Parameters:
childItem –
QAccessibleInterface
- Return type:
bool
Removes
childItem
from the selection.Returns whether the accessible item has actually been removed from the selection.