-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProductionTableModel.h
More file actions
32 lines (21 loc) · 881 Bytes
/
ProductionTableModel.h
File metadata and controls
32 lines (21 loc) · 881 Bytes
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
26
27
28
29
30
31
32
#ifndef PRODUCTIONTABLEMODEL_H
#define PRODUCTIONTABLEMODEL_H
#include <QAbstractTableModel>
#include <QList>
#include "Production.h"
class ProductionTableModel : public QAbstractTableModel {
Q_OBJECT
public:
explicit ProductionTableModel(QList<Production*>* production, QObject *parent = 0);
int rowCount(const QModelIndex& parent) const;
bool insertRows(int row, int count, const QModelIndex& parent);
bool removeRows(int row, int count, const QModelIndex& parent);
int columnCount(const QModelIndex& parent) const;
QVariant data(const QModelIndex& index, int role) const;
bool setData(const QModelIndex& index, const QVariant& value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex& index) const;
private:
QList<Production*>* _productions;
};
#endif // PRODUCTIONTABLEMODEL_H