School Commit Init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <qabstractitemmodel.h>
|
||||
#include "QuestionRepo.h"
|
||||
|
||||
class PresenterModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
QuestionRepo& repo;
|
||||
|
||||
public:
|
||||
PresenterModel(QuestionRepo& repo, QObject* parent = nullptr);
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
void addQuestion(const Question& q);
|
||||
};
|
||||
Reference in New Issue
Block a user