-
Notifications
You must be signed in to change notification settings - Fork 0
/
school_management.h
191 lines (168 loc) · 4.35 KB
/
school_management.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
* (c) Picobyte 2017, GPL2
*/
#ifndef SCHOOL_MANAGEMENT_H
#define SCHOOL_MANAGEMENT_H
#include <QApplication>
#include <QCheckBox>
#include <QComboBox>
#include <QGraphicsView>
#include <QGridLayout>
#include <QLabel>
#include <QListView>
#include <QListWidget>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QLocale>
#include <QProgressBar>
#include <QPushButton>
#include <QSpacerItem>
#include <QSpinBox>
#include <QStackedWidget>
#include <QStringList>
#include <QTabWidget>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QHeaderView>
#include <QWidget>
#include "generic.h"
#include "student_tab.h"
static const char* teacher[] = {"April Raymund", "Beth Manili", "Carl Walker", "Carmen Smith", "Claire Fuzushi",
"Jessica Underwood", "Nina Parker", "Ronda Bells", "Samantha Keller"};
static const char* balance[] = {"Monthly Loan:", "Staff Salary:"};
static const char* balanceExample[] = {"-$16,188", "$2,811"};
static const char* clubInfo[] = {"Members:", "time:", "Club President:", "Location:", "Weekly Balance:"};
static const char* clubInfoExample[] = {"12", "16:00-18:00", "Anette", "Sports Area", "-$50"};
static const char* balanceItem[] = {
"State Funding",
"Principal Salary",
"Staff Salary",
"Investigator",
"Building Maintenance",
"Cabaret Rental",
"Bathroom Spycam Pics",
"Changing Room Spycam Pics",
"Cheerleading Club Spycam Pics",
"Swim Club Spycam Pics",
"Secret Panty Exchange sales",
"Your Sister's rent"};
static int balanceItemExample[] = {
18945, 2585, -34563, -3000, -1684, -600, 252, 504, 504, 352, 384, 400};
template <class T> class leftandRightT: public QWidget
{ // template classes cannot have Q_OBJECT, signals or slots. see:
// http://doc.qt.io/qt-4.8/moc.html
protected:
QGridLayout grid;
QLabel leftLbl, rightLbl;
QPushButton midBtn;
T leftT, rightT;
leftandRightT(const char*, const char*, const char*);
};
QT_CHARTS_USE_NAMESPACE
class StatsTab: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QListWidget statList;
QChart chart;
QChartView *chartView;
QLineSeries series[30];
QListWidgetItem item[30];
public:
StatsTab();
public slots:
void statClicked(QListWidgetItem* item);
};
class AccountingTab: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QTableWidget table;
QLabel balanceLbl, balanceVal;
QSpacerItem vertStretch;
public:
AccountingTab();
};
class ClubsTab: public leftandRightT<QListView>
{
Q_OBJECT
private:
QLabel *clubInfoLbl[ARRAY_LEN(clubInfo)];
QLabel *clubInfoVal[ARRAY_LEN(clubInfo)];
QGraphicsView clubDisplay;
public:
ClubsTab();
};
class ExpansionsTab: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QListView expansionList;
QLabel upgradeCostLbl, upgradeCostVal;
QLabel maintenanceCostLbl, maintenanceCostVal;
QPushButton upgradeBtn;
QLabel expansionViewLbl;
QLabel lowInfoLbl;
public:
ExpansionsTab();
};
class PollicyTab: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QListView topicList, ruleList;
QLabel explanationLbl;
QLabel topicLbl, RuleLbl, lowInfoLbl;
public:
PollicyTab();
};
class AssignmentsTab: public QWidget
{
Q_OBJECT
private:
QGridLayout grid;
QTableWidget table;
QLabel explanationLbl;
/*TODO: icons*/
QCheckBox *tchAssignCB[ARRAY_LEN(subjectName)*ARRAY_LEN(teacher)];
QLabel nameLbl, subjNameLbl, subjExpLbl, genQualfLbl;
QProgressBar subjExpPB, genQualfPB;
public:
AssignmentsTab();
};
class JobsTab: public leftandRightT<QListView>
{
Q_OBJECT
private:
QLabel biographyLbl, avgSubjExpHdrLbl;
QLabel biographyVal;
QLabel *balanceLbl[ARRAY_LEN(balance)];
QLabel *balanceVal[ARRAY_LEN(balance)];
QLabel *subLbl[ARRAY_LEN(subjectName)];
QProgressBar *avgSubjExpVal[ARRAY_LEN(subjectName)];
QGraphicsView teacherDisplay;
public:
JobsTab();
};
class SchoolManagement: public QWidget
{
Q_OBJECT
private:
QTabWidget mainTab;
StudentsTab studentsTab;
JobsTab jobsTab;
AssignmentsTab assnTab;
PollicyTab pollicyTab;
ExpansionsTab expansionsTab;
ClubsTab clubsTab;
AccountingTab accountingTab;
StatsTab statsTab;
QPushButton exitBtn;
public:
SchoolManagement(QWidget*, QRect geom);
};
#endif // SCHOOL_MANAGEMENT_H