-
Notifications
You must be signed in to change notification settings - Fork 0
/
gradewindow.h
71 lines (61 loc) · 2.3 KB
/
gradewindow.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
// ---------------------------------------------------------------------
//
// qtgrader - the interactive high speed grading assistant
// Copyright (C) 2012-2013 Wayne Piekarski
// wayne@tinmith.net http://tinmith.net/wayne
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ---------------------------------------------------------------------
#ifndef GRADEWINDOW_H
#define GRADEWINDOW_H
#include <QTableWidget>
#include <QMainWindow>
namespace Ui {
class GradeWindow;
}
class GradeWindow : public QMainWindow
{
Q_OBJECT
public:
explicit GradeWindow(QWidget *parent = 0);
~GradeWindow();
Ui::GradeWindow* getUI() { return ui; }
void update(size_t curStudent, size_t curQuestion);
void closeEvent(QCloseEvent *event);
QTableWidgetItem* getItem(int row, int col);
QString getTotalGrade(size_t student);
QString getGradeFeedback(size_t student, size_t question);
QString getMaximum(size_t question);
QString getQuestionPage(size_t question);
QString getStudentId(size_t student);
QString getStudentName(size_t student);
QString getTotalMaximum();
void setTotalGrade(size_t student, int total);
void setGradeFeedback(size_t student, size_t question, int grade, const QString& feedback);
void setTotalMaximum(int in);
void setMaximum(size_t question, int in);
void setQuestionPage(size_t question, int in);
void setStudentId(size_t student, const QString& in);
void setStudentName(size_t student, const QString& in);
public slots:
void handleGradeWindow (bool init = false);
void handleCellChanged (int row, int col, int prevRow, int prevCol);
void handleResizeContents();
void handleResizeSmall();
void handleResizeLarge();
private:
Ui::GradeWindow *ui;
};
#endif // GRADEWINDOW_H