-
Notifications
You must be signed in to change notification settings - Fork 3
/
taskitem.h
54 lines (39 loc) · 1.15 KB
/
taskitem.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
#ifndef TASKITEM_H
#define TASKITEM_H
#include <QObject>
#include <QDateTime>
namespace model {
class TaskItem : public QObject
{
Q_OBJECT
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
Q_PROPERTY(bool done READ done WRITE setDone NOTIFY doneChanged)
Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged)
Q_PROPERTY(int order READ order WRITE setOrder NOTIFY orderChanged)
public:
explicit TaskItem(QObject *parent = 0);
TaskItem(QString title, bool done, QString color, int order, QObject *parent = 0);
TaskItem(const TaskItem& copy);
QString title() const;
void setTitle(QString title);
bool done() const;
void setDone(bool done);
QString color() const;
void setColor(QString color);
int order() const;
void setOrder(int order);
signals:
void titleChanged();
void doneChanged();
void colorChanged(QString color);
void orderChanged(int order);
private:
QString m_title;
bool m_done;
QDateTime m_creationTime;
QDateTime m_completeTime;
QString m_color;
int m_order;
};
} // namespace model
#endif // TASKITEM_H