File indexing completed on 2024-05-12 16:27:14
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "roles/roleinfo.h" 0010 #include <QVector> 0011 #include <QWidget> 0012 0013 #include "libruqolawidgets_private_export.h" 0014 class QLabel; 0015 class User; 0016 class QFormLayout; 0017 class RocketChatAccount; 0018 class LIBRUQOLAWIDGETS_TESTS_EXPORT DirectChannelInfoWidget : public QWidget 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit DirectChannelInfoWidget(RocketChatAccount *account, QWidget *parent = nullptr); 0023 ~DirectChannelInfoWidget() override; 0024 0025 void setUserName(const QString &userName); 0026 0027 void setRoles(const QVector<RoleInfo> &newRoles); 0028 0029 private: 0030 LIBRUQOLAWIDGETS_NO_EXPORT void slotUserInfoDone(const QJsonObject &obj); 0031 LIBRUQOLAWIDGETS_NO_EXPORT void fetchUserInfo(const QString &userName); 0032 LIBRUQOLAWIDGETS_NO_EXPORT void setUser(const User &user); 0033 QVector<RoleInfo> mListRoleInfos; 0034 QLabel *const mAvatar; 0035 QFormLayout *const mMainLayout; 0036 RocketChatAccount *const mRocketChatAccount; 0037 };