QAccessibleSelectionInterface Class

QAccessibleSelectionInterfaceクラスは、選択処理のサポートを実装しています。詳細...

ヘッダ #include <QAccessibleSelectionInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
以来: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

詳細な説明

現在の選択範囲を取得するメソッドと、選択範囲を変更するメソッドを提供します。

直接の子の選択のみがサポートされています。

メンバ関数ドキュメント

[virtual noexcept] QAccessibleSelectionInterface::~QAccessibleSelectionInterface()

QAccessibleSelectionInterface を破壊する。

[pure virtual] bool QAccessibleSelectionInterface::clear()

アクセス可能なすべての子アイテムの選択を解除します。

アクセス可能なすべての子項目が実際に選択項目から削除されたかどうか、 つまりこのメソッドが呼ばれた後に選択項目が空になっているかどうかを返します。

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

childItem が現在の選択項目の一部であるかどうかを返します。

デフォルトの実装では、QAccessibleSelectionInterface::selectedItems によって取得された項目のリストにchildItem が含まれているかどうかをチェックします。

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

childItem を選択範囲に追加します。childItem が実際に選択範囲に追加されたかどうかを返します。

単一選択しか許さない実装の場合、これは現在の選択を置き換えるかもしれません。

[pure virtual] bool QAccessibleSelectionInterface::selectAll()

アクセス可能なすべての子アイテムを選択します。

アクセス可能なすべての子項目が実際に選択項目に追加されたかどうかを返します。

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

選択範囲内のインデックスselectionIndex で選択されているアクセス可能な項目を返します。

このインデックスは n 番目に選択されたアクセス可能な項目 (つまり、現在の選択項目のインデックス) を指すことに注意しましょう。 一般に、同じ項目を取得するためにQAccessibleInterface::child() に渡されるインデックスとは異なります。

デフォルトの実装では、QAccessibleSelectionInterface::selectedItems() によって取得された選択項目のリストから項目を取得するためにselectionIndex を使用します。

特に、多くの選択項目を扱う実装では、パフォーマンス上の理由から、より効率的な方法でこのメソッドを再実装することが望ましいでしょう。

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

選択されたアクセス可能な項目の総数を返します。

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

選択されたアクセス可能な項目のリストを返します。

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

childItem を選択項目から削除します。

アクセス可能なアイテムが実際に選択範囲から削除されたかどうかを返します。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.