File indexing completed on 2024-12-08 04:34:21

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 #include "libruqolawidgets_private_export.h"
0008 #include "permissions/permission.h"
0009 #include <QWidget>
0010 class QLineEdit;
0011 class PermissionsModel;
0012 class ExplorePermissionsWidgetFilterProxyModel;
0013 class QTreeView;
0014 class QLabel;
0015 class LIBRUQOLAWIDGETS_TESTS_EXPORT ExplorePermissionsWidget : public QWidget
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit ExplorePermissionsWidget(QWidget *parent = nullptr);
0020     ~ExplorePermissionsWidget() override;
0021 
0022     void setPermissions(const QVector<Permission> &permissions);
0023 
0024     void setOWnRoles(const QStringList &roleStr);
0025 
0026 private:
0027     LIBRUQOLAWIDGETS_NO_EXPORT void slotFilterTextChanged(const QString &str);
0028     QTreeView *const mTreeView;
0029     QLineEdit *const mSearchLineWidget;
0030     PermissionsModel *const mAdminPermissionsModel;
0031     ExplorePermissionsWidgetFilterProxyModel *const mPermissionFilterProxyModel;
0032     QLabel *const mOwnRoles;
0033 };