added first part of evaluation realised in Cpp
This commit is contained in:
33
resultmodel.h
Normal file
33
resultmodel.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef RESULTMODEL_H
|
||||
#define RESULTMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
|
||||
class ResultModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ResultModel(vector<vector<int>> inputData,
|
||||
vector<string> header, QObject *parent = nullptr);
|
||||
|
||||
// Header:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
// Basic functionality:
|
||||
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;
|
||||
|
||||
private:
|
||||
std::vector<std::vector<int>> inputData;
|
||||
std::vector<std::string> headers;
|
||||
};
|
||||
|
||||
#endif // RESULTMODEL_H
|
||||
Reference in New Issue
Block a user