File indexing completed on 2024-05-12 16:25:56

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "roleinfo.h"
0010 #include <QJsonObject>
0011 #include <QObject>
0012 #include <QVector>
0013 
0014 #include "libruqola_private_export.h"
0015 class LIBRUQOLACORE_TESTS_EXPORT RolesManager : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit RolesManager(QObject *parent = nullptr);
0020     ~RolesManager() override;
0021     void parseRoles(const QJsonObject &obj);
0022     void updateRoles(const QJsonArray &contents);
0023     [[nodiscard]] const QVector<RoleInfo> &roleInfo() const;
0024 
0025 Q_SIGNALS:
0026     void rolesChanged();
0027 
0028 private:
0029     QVector<RoleInfo> mRoleInfo;
0030 };