summary refs log tree commit diff
path: root/include/Community.h
blob: 0d70dee1945a0a7c54449aa94ea54bc3f9bea313 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once

#include <QJsonObject>
#include <QObject>
#include <QString>
#include <QUrl>

class Community : public QObject
{
        Q_OBJECT

public:
        void parseProfile(const QJsonObject &profile);
        void parseRooms(const QJsonObject &rooms);

        inline QUrl getAvatar() const;
        inline QString getName() const;
        inline QString getShortDescription() const;
        inline QString getLongDescription() const;
        inline const QList<QString> getRoomList() const;

signals:
        void roomsChanged(QList<QString> &rooms);

private:
        QUrl avatar_;
        QString name_;
        QString short_description_;
        QString long_description_;

        QList<QString> rooms_;
};

inline QUrl
Community::getAvatar() const
{
        return avatar_;
}

inline QString
Community::getName() const
{
        return name_;
}

inline QString
Community::getShortDescription() const
{
        return short_description_;
}

inline QString
Community::getLongDescription() const
{
        return long_description_;
}

inline const QList<QString>
Community::getRoomList() const
{
        return rooms_;
}