The ExportTableModel class provides a table model for typing test results.
More...
#include "export/internal/ExportTableModel.h"
|
|
void | studentNameChanged (QString name) |
| |
|
void | classNameChanged (QString name) |
| |
|
void | testNumberChanged (QString number) |
| |
|
void | gradeChanged (QString grade) |
| |
|
void | validatorChanged (IExerciseValidator *validator) |
| |
|
| | ExportTableModel (QObject *parent=nullptr) |
| |
|
int | rowCount (const QModelIndex &=QModelIndex()) const override |
| |
|
int | columnCount (const QModelIndex &=QModelIndex()) const override |
| |
|
QVariant | data (const QModelIndex &index, int role) const override |
| |
|
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| |
| void | loadData (void) |
| |
|
QHash< int, QByteArray > | roleNames () const override |
| |
|
QSize | span (const QModelIndex &index) const override |
| |
|
QString | studentName (void) |
| |
|
void | setStudentName (QString name) |
| |
|
QString | className (void) |
| |
|
void | setClassName (QString name) |
| |
|
QString | testNumber (void) |
| |
|
void | setTestNumber (QString number) |
| |
|
QString | grade (void) |
| |
|
void | setGrade (QString grade) |
| |
|
IExerciseValidator * | validator (void) |
| |
|
void | setValidator (IExerciseValidator *validator) |
| |
|
|
QMap< QPair< int, int >, QVariant > | tableData |
| |
|
QString | m_studentName |
| |
|
QString | m_className |
| |
|
QString | m_testNumber |
| |
|
QString | m_grade |
| |
|
IExerciseValidator * | m_validator = nullptr |
| |
|
| static const QMap< QPair< int, int >, QPair< int, int > > | spans |
| |
The ExportTableModel class provides a table model for typing test results.
Note: QTableView doesn't support rich text, so you need to replace the cells with widgets that support it.
◆ ExportTableModel()
| ExportTableModel::ExportTableModel |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ loadData()
| void ExportTableModel::loadData |
( |
void |
| ) |
|
◆ spans
| const QMap< QPair< int, int >, QPair< int, int > > ExportTableModel::spans |
|
staticprivate |
Initial value:= {
{ { 0, 0 }, { 1, 4 } },
{ { 2, 2 }, { 2, 1 } },
{ { 2, 3 }, { 2, 1 } },
{ { 4, 2 }, { 2, 1 } },
{ { 4, 3 }, { 2, 1 } },
{ { 6, 2 }, { 3, 1 } },
{ { 6, 3 }, { 3, 1 } }
}
◆ className
| QString ExportTableModel::className |
|
readwrite |
◆ grade
| QString ExportTableModel::grade |
|
readwrite |
◆ studentName
| QString ExportTableModel::studentName |
|
readwrite |
◆ testNumber
| QString ExportTableModel::testNumber |
|
readwrite |
◆ validator
The documentation for this class was generated from the following files: