-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhypothesismodel.h
25 lines (19 loc) · 991 Bytes
/
hypothesismodel.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
#ifndef HYPOTHESISMODEL_H
#define HYPOTHESISMODEL_H
#include <QAbstractItemModel>
#include <QSortFilterProxyModel>
#include "hypothesis.h"
class hypothesismodel : public QAbstractItemModel
{
QList<CHypothesis*> * m_hypotheses;
public:
hypothesismodel(QList<CHypothesis*> * hypotheses);
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;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
};
#endif // HYPOTHESISMODEL_H