-
Notifications
You must be signed in to change notification settings - Fork 1
/
discountguild.h
40 lines (28 loc) · 906 Bytes
/
discountguild.h
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
#ifndef DISCOUNTGUILD_H
#define DISCOUNTGUILD_H
#include <QObject>
#include <QDiscord>
class DiscountGuild : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ getName WRITE setName)
Q_PROPERTY(QString icon READ getIcon WRITE setIcon)
Q_PROPERTY(QString id READ getID WRITE setID)
public:
explicit DiscountGuild(QDiscordGuild *guild, QObject *parent = nullptr);
QString getName() const;
void setName(const QString &Name);
QString getIcon() const;
void setIcon(const QString &Icon);
QString getID() const;
void setID(const QString &ID);
private:
QDiscordGuild * m_hGuild;
QString m_Name;
QString m_Icon;
QString m_ID;
//Helper functions
QString getGuildIcon( QDiscordGuild *guild ) {
return "http://cdn.discordapp.com/icons/" + guild->id().toString() + "/" + guild->icon() + ".png";}
};
#endif // DISCOUNTGUILD_H