This repository was archived by the owner on Feb 16, 2021. It is now read-only.
forked from pinkierton/harkach
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThreadObject.h
More file actions
76 lines (59 loc) · 2.12 KB
/
ThreadObject.h
File metadata and controls
76 lines (59 loc) · 2.12 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef THREADOBJECT_H
#define THREADOBJECT_H
#include <QDateTime>
#include <QObject>
#include <QQmlListProperty>
#include "Attachment.h"
#include <QDebug>
class ThreadObject : public QObject
{
Q_OBJECT
Q_PROPERTY( int num READ num WRITE setNum NOTIFY numChanged )
Q_PROPERTY( int postsCount READ postsCount WRITE setPostsCount NOTIFY postsCountChanged )
Q_PROPERTY( QString comment READ comment WRITE setComment NOTIFY commentChanged )
Q_PROPERTY( QString subject READ subject WRITE setSubject NOTIFY subjectChanged )
Q_PROPERTY( QDateTime timeStamp READ timeStamp WRITE setTimeStamp NOTIFY timeStampChanged )
Q_PROPERTY( QDateTime lasthit READ lasthit WRITE setLasthit NOTIFY lasthitChanged )
Q_PROPERTY( AttachmentList files READ files WRITE setFiles NOTIFY filesChanged )
public:
explicit ThreadObject(QObject *parent = 0) : QObject(parent)
{
}
explicit ThreadObject(const QJsonObject &threadObj, QObject *parent = 0);
~ThreadObject();
int num() const;
void setNum(int value);
int postsCount() const;
void setPostsCount(int value);
QString comment() const;
void setComment(const QString &value);
QString subject() const;
void setSubject(const QString &value);
QDateTime timeStamp() const;
void setTimeStamp(QDateTime value);
QDateTime lasthit() const;
void setLasthit(QDateTime value);
AttachmentList files() const;
void setFiles(const AttachmentList &value);
QQmlListProperty<Attachment> filesListProperty() {
return QQmlListProperty<Attachment>(parent(), mFiles);
}
private:
int mNum;
int mPostsCount;
QString mComment;
QString mSubject;
QDateTime mTimeStamp;
QDateTime mLasthit;
AttachmentList mFiles;
signals:
void numChanged();
void postsCountChanged();
void commentChanged();
void subjectChanged();
void timeStampChanged();
void lasthitChanged();
void filesChanged();
public slots:
};
#endif // THREADOBJECT_H