38 Q_PROPERTY(QString studentName READ studentName WRITE setStudentName NOTIFY studentNameChanged)
39 Q_PROPERTY(QString className READ className WRITE setClassName NOTIFY classNameChanged)
40 Q_PROPERTY(QString testNumber READ testNumber WRITE setTestNumber NOTIFY testNumberChanged)
41 Q_PROPERTY(QString grade READ grade WRITE setGrade NOTIFY gradeChanged)
42 Q_PROPERTY(
IExerciseValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged)
45 int rowCount(const QModelIndex & = QModelIndex()) const override;
46 int columnCount(const QModelIndex & = QModelIndex()) const override;
47 QVariant data(const QModelIndex &index,
int role) const override;
48 bool setData(const QModelIndex &index, const QVariant &value,
int role) override;
50 QHash<
int, QByteArray> roleNames() const override;
51 QSize span(const QModelIndex &index) const override;
52 QString studentName(
void);
53 void setStudentName(QString name);
54 QString className(
void);
55 void setClassName(QString name);
56 QString testNumber(
void);
57 void setTestNumber(QString number);
59 void setGrade(QString grade);
64 static const QMap<QPair<
int,
int>, QPair<
int,
int>> spans;
65 QMap<QPair<
int,
int>, QVariant> tableData;
66 QString m_studentName;
73 void studentNameChanged(QString name);
74 void classNameChanged(QString name);
75 void testNumberChanged(QString number);
76 void gradeChanged(QString grade);