File indexing completed on 2025-01-26 03:28:30
0001 /* 0002 SPDX-FileCopyrightText: 2023 Montel Laurent <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #pragma once 0008 #include "libaccessibilityinspector_private_export.h" 0009 #include <QTreeView> 0010 0011 #include <qaccessibilityclient/accessibleobject.h> 0012 class AccessibleObjectTreeModel; 0013 class AccessibleObjectTreeProxyModel; 0014 namespace QAccessibleClient 0015 { 0016 class Registry; 0017 } 0018 class LIBACCESSIBILITYINSPECTOR_TEST_EXPORT AccessibleTreeView : public QTreeView 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit AccessibleTreeView(QAccessibleClient::Registry *registry, QWidget *parent = nullptr); 0023 ~AccessibleTreeView() override; 0024 0025 [[nodiscard]] AccessibleObjectTreeModel *accessibleObjectTreeModel() const; 0026 0027 void setCurrentObject(const QAccessibleClient::AccessibleObject &object); 0028 void setSearchTextChanged(const QString &str); 0029 0030 Q_SIGNALS: 0031 void accessibleTreeviewSelectionChanged(const QModelIndex ¤t); 0032 0033 private: 0034 void treeCustomContextMenuRequested(const QPoint &pos); 0035 AccessibleObjectTreeModel *const mAccessibleObjectTreeModel; 0036 AccessibleObjectTreeProxyModel *const mSortFilterProxyModel; 0037 };