-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubSchedule.h
60 lines (39 loc) · 990 Bytes
/
SubSchedule.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
#ifndef SUBSCHEDULE_H
#define SUBSCHEDULE_H
#include <QObject>
#include <QVector>
#include <QDateTime>
typedef struct _stageSrt{
QDateTime date;
QString details;
QString result;
_stageSrt(QDateTime d_date, QString s_details = "", QString s_result = "")
{
date = d_date;
details = s_details;
result = s_result;
}
_stageSrt() {}
} Stage;
class SubSchedule : public QObject
{
Q_OBJECT
public:
explicit SubSchedule(QString name, QObject *parent = nullptr);
~SubSchedule();
SubSchedule() {}
bool addStage(Stage* stage);
bool removeStage(int index);
bool editStage(int index, Stage* stage);
Stage* selectStage(int index);
void clearStage();
void editName(QString name) { m_name = name; }
QString name() { return m_name; }
int stageSize() { return m_stages.size(); }
signals:
public slots:
private:
QString m_name;
QVector<Stage*> m_stages;
};
#endif // SUBSCHEDULE_H