File indexing completed on 2024-12-22 04:45:37

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QWidget>
0010 
0011 #include "libruqolawidgets_private_export.h"
0012 #include <QWidget>
0013 class RocketChatAccount;
0014 class QLineEdit;
0015 class OauthTreeView;
0016 class AdminOauthModel;
0017 class AdministratorOauthFilterProxyModel;
0018 class LIBRUQOLAWIDGETS_TESTS_EXPORT AdministratorOauthWidget : public QWidget
0019 {
0020     Q_OBJECT
0021 public:
0022     explicit AdministratorOauthWidget(RocketChatAccount *account, QWidget *parent = nullptr);
0023     ~AdministratorOauthWidget() override;
0024 
0025     void initialize();
0026 
0027 private:
0028     LIBRUQOLAWIDGETS_NO_EXPORT void slotListOauthDone(const QJsonObject &obj);
0029     LIBRUQOLAWIDGETS_NO_EXPORT void slotTextChanged(const QString &str);
0030     LIBRUQOLAWIDGETS_NO_EXPORT void slotRemoveOauth(const QString &identifier);
0031     LIBRUQOLAWIDGETS_NO_EXPORT void slotOauthAppAdded(const QJsonObject &obj);
0032     LIBRUQOLAWIDGETS_NO_EXPORT void slotOauthAppUpdated(const QJsonObject &obj);
0033     RocketChatAccount *const mRocketChatAccount;
0034     QLineEdit *const mSearchLineWidget;
0035     OauthTreeView *const mOauthTreeWidget;
0036     AdminOauthModel *const mAdminOauthModel;
0037     AdministratorOauthFilterProxyModel *mAdminInviteFilterProxyModel = nullptr;
0038 };