-
Notifications
You must be signed in to change notification settings - Fork 12
/
Media.h
62 lines (40 loc) · 1.2 KB
/
Media.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef MEDIA_H
#define MEDIA_H
#include <QString>
#include <QUrl>
#include <QMetaType>
#include <QObject>
class Media : public QObject
{
Q_OBJECT
public:
explicit Media(QObject *parent = 0);
void setId(const QString& id);
const QString& id() const;
void setTitle(const QString& title);
const QString& title() const;
void setDescription(const QString& description);
const QString& description() const;
void setImage(const QUrl& image);
const QUrl& image() const;
void setUrl(const QUrl& url);
const QUrl& url() const;
signals:
void idChanged();
void titleChanged();
void descriptionChanged();
void imageChanged();
void urlChanged();
private:
Q_PROPERTY(QString id READ id WRITE setId NOTIFY idChanged)
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged)
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
QString m_id;
QString m_title;
QString m_description;
QUrl m_image;
QUrl m_url;
};
#endif // MEDIA_H