QAccessibleSelectionInterface 类实现对选定处理的支持。 更多...
| 头: |
#include <QAccessibleSelectionInterface>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
|
| qmake: |
QT += gui
|
| Since: | Qt 6.5 |
| virtual | ~QAccessibleSelectionInterface () |
| virtual bool | clear () = 0 |
| virtual bool | isSelected (QAccessibleInterface * childItem ) const |
| virtual bool | select (QAccessibleInterface * childItem ) = 0 |
| virtual bool | selectAll () = 0 |
| virtual QAccessibleInterface * | selectedItem (int selectionIndex ) const |
| virtual int | selectedItemCount () const = 0 |
| virtual QList<QAccessibleInterface *> | selectedItems () const = 0 |
| virtual bool | unselect (QAccessibleInterface * childItem ) = 0 |
It provides methods for both, retrieving the current selection as well as modifying the selection.
仅支持直接子级的选定。
[virtual noexcept]
QAccessibleSelectionInterface::
~QAccessibleSelectionInterface
()
销毁 QAccessibleSelectionInterface .
[pure virtual]
bool
QAccessibleSelectionInterface::
clear
()
取消所有可访问子级项的选择。
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.
[虚拟]
bool
QAccessibleSelectionInterface::
isSelected
(
QAccessibleInterface
*
childItem
) const
返回是否 childItem 属于当前选定。
The default implementation checks whether childItem is contained in the list of items retrieved by QAccessibleSelectionInterface::selectedItems .
[pure virtual]
bool
QAccessibleSelectionInterface::
select
(
QAccessibleInterface
*
childItem
)
添加 childItem 到选定。返回是否 childItem 实际已被添加到选定。
For implementations that only allow single selections, this may replace the current selection.
[pure virtual]
bool
QAccessibleSelectionInterface::
selectAll
()
选择所有可访问子级项。
Returns whether all accessible child items have actually been added to the selection.
[虚拟]
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.
默认实现使用 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
返回选中可访问项的列表。
[pure virtual]
bool
QAccessibleSelectionInterface::
unselect
(
QAccessibleInterface
*
childItem
)
移除 childItem 从选定。
Returns whether the accessible item has actually been removed from the selection.