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

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 "libruqolacore_export.h"
0010 #include <QDebug>
0011 #include <QJsonObject>
0012 
0013 class LIBRUQOLACORE_EXPORT TeamCompleter
0014 {
0015 public:
0016     TeamCompleter();
0017     [[nodiscard]] bool operator==(const TeamCompleter &other) const;
0018 
0019     [[nodiscard]] QString name() const;
0020     void setName(const QString &name);
0021 
0022     [[nodiscard]] QString fname() const;
0023     void setFname(const QString &fname);
0024 
0025     void parse(const QJsonObject &obj);
0026 
0027     [[nodiscard]] QString teamId() const;
0028     void setTeamId(const QString &identifier);
0029 
0030 private:
0031     QString mName;
0032     QString mFname;
0033     QString mTeamId;
0034 };
0035 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const TeamCompleter &t);
0036 Q_DECLARE_METATYPE(TeamCompleter)
0037 Q_DECLARE_TYPEINFO(TeamCompleter, Q_MOVABLE_TYPE);