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 0009 #include "libaccessibilityinspector_private_export.h" 0010 #include <QWidget> 0011 class QLineEdit; 0012 class AccessibleTreeView; 0013 class AccessibleObjectTreeModel; 0014 class QSettings; 0015 namespace QAccessibleClient 0016 { 0017 class Registry; 0018 class AccessibleObject; 0019 } 0020 class LIBACCESSIBILITYINSPECTOR_TEST_EXPORT AccessibleTreeWidget : public QWidget 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit AccessibleTreeWidget(QAccessibleClient::Registry *registry, QWidget *parent = nullptr); 0025 ~AccessibleTreeWidget() override; 0026 0027 [[nodiscard]] AccessibleObjectTreeModel *accessibleObjectTreeModel() const; 0028 0029 void setCurrentObject(const QAccessibleClient::AccessibleObject &object); 0030 0031 void saveSettings(QSettings &settings); 0032 void loadSettings(QSettings &settings); 0033 0034 Q_SIGNALS: 0035 void accessibleTreeviewSelectionChanged(const QModelIndex ¤t); 0036 0037 private: 0038 QLineEdit *const mSearchLineEdit; 0039 AccessibleTreeView *const mAccessibleTreeView; 0040 };