-
Notifications
You must be signed in to change notification settings - Fork 0
/
teacherlesson.h
46 lines (40 loc) · 1.14 KB
/
teacherlesson.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
#ifndef TEACHERLESSON_H
#define TEACHERLESSON_H
#include <QString>
#include <QDebug>
#include <QPointer>
class TeacherLesson
{
public:
TeacherLesson();
TeacherLesson(QString name, QString html_id);
TeacherLesson(QString name, QString html_id, QString teacher, QString teacher_html_id);
QString html_id;
QString name;
QString teacher;
QString teacher_html_id;
void start();
[[nodiscard]] bool is_started() const;
[[nodiscard]] bool is_ended() const;
void end();
struct video_info {
QString id;
QString name;
};
video_info pop_video_info();
QList<video_info> video_infos;
private:
bool started = false;
bool ended = false;
};
QDebug inline operator<<(QDebug d, const TeacherLesson v) {
QDebug nsp = d.nospace();
nsp << "Lesson(name=" << v.name
<< ", teacher=" << v.teacher
<< ", html_id=" << v.html_id
<< ", teacher_html_id=" << v.teacher_html_id
<< ", video_count=" << v.video_infos.size()
<< ")";
return nsp;
}
#endif // TEACHERLESSON_H