-
Notifications
You must be signed in to change notification settings - Fork 0
/
student_tab.h
102 lines (90 loc) · 2.94 KB
/
student_tab.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
* (c) Picobyte 2017, GPL2
*/
#ifndef STUDENT_TAB_H
#define STUDENT_TAB_H
#include <QApplication>
#include <QCheckBox>
#include <QComboBox>
#include <QGraphicsView>
#include <QGridLayout>
#include <QLabel>
#include <QListView>
#include <QProgressBar>
#include <QPushButton>
#include <QSpacerItem>
#include <QSpinBox>
#include <QStackedWidget>
#include <QTabWidget>
#include <QWidget>
#include "generic.h"
static const char* period[] = {"7:50-9:20", "9:40-11:10", "11:30-13:00", "14:30-16:00"};
static const char* weekday[] = {"Monday", "Tuesday", "Wednesday", "Thirsday", "Friday", "Saturday", "Sunday"};
static const char* subject[] = {"Mathematics:", "Language Arts:", "Natural Science:", "Life Science:", "Computer Studies:", "Social Science:", "Humanities:", "Fine Arts:", "Physical Education:", "Sexual Education:"};
static const char* studentInfo[] = {"Birthday:", "Age:", "Family:", "Location:", "Club:", "Personality:"};
static const char* studentInfoEG[] = {"1/1/2012", "18", "Owen", "Home", "Cheerleaders", "Cheerful"};
// should be read from json..
static const char* subjectName[] = {"Anatomy Class", "Art", "Biology", "Bondage Class", "Chemistry",
"Computer Science", "Economics", "English", "Geography", "History",
"Math", "Music", "Philosophy", "Physics", "Practical Sex Education",
"Religion", "School Sport", "Swimming", "Theoretical Sex Education"};
static const int no_workdays = ARRAY_LEN(weekday)-2;
class SchlMngStudentClasses: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QLabel *periodLbl[ARRAY_LEN(period)], *dayLbl[no_workdays], *lunch_break;
QComboBox *classSchedule[ARRAY_LEN(period)*no_workdays];
QLabel curriculumLbl;
public:
SchlMngStudentClasses();
};
class SchlMngClassSummary: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QLabel classSummaryLbl, aSFELbl;
QLabel *subjLbl[ARRAY_LEN(subject)];
QProgressBar subjBar[ARRAY_LEN(subject)];
QSpacerItem vertStretch;
public:
SchlMngClassSummary();
};
class SchlMngStudents: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QCheckBox favoritesOnly, favorite;
QLabel studentName, sbjScoreLbl;
QComboBox transferCmb;
QPushButton transferBtn;
QListView studentsList;
QLabel *statLbl[ARRAY_LEN(studentInfo)];
QLabel *statVal[ARRAY_LEN(studentInfo)];
QLabel *subjLbl[ARRAY_LEN(subjectName)];
QProgressBar subjBar[ARRAY_LEN(subjectName)];
QGraphicsView graphicsView;
public:
SchlMngStudents();
};
class StudentsTab: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QLabel classesLbl;
QPushButton distrBtn;
QSpinBox spinBox;
QListView listView;
QWidget tabW;
QTabWidget tab;
SchlMngStudentClasses timetableW;
SchlMngClassSummary classSummaryW;
SchlMngStudents studentsW;
public:
StudentsTab(QRect geom);
};
#endif // STUDENT_TAB_H