このページでは

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

パブリック関数

QAccessibleSelectionInterface()
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

詳細な説明

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

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

メンバ関数のドキュメント

[constexpr noexcept default] QAccessibleSelectionInterface::QAccessibleSelectionInterface()

QAccessibleSelectionInterface のインスタンスをデフォルトコンストラクタで生成します。

[virtual noexcept] QAccessibleSelectionInterface::~QAccessibleSelectionInterface()

QAccessibleSelectionInterface を削除します。

[pure virtual] bool QAccessibleSelectionInterface::clear()

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

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

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

childItem が現在の選択範囲に含まれているかどうかを返します。

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

[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() に渡されるインデックスとは異なります。

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

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

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

選択されたアクセシビリティ対応項目の総数を返します。

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

選択されたアクセシビリティ対象項目のリストを返します。

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

選択範囲から「childItem 」を削除します。

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

© 2026 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.