-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodlistmodel.h
30 lines (22 loc) · 945 Bytes
/
modlistmodel.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
26
27
28
29
30
#ifndef MODLISTMODEL_H
#define MODLISTMODEL_H
#include "singlemod.h"
#include <QStyledItemDelegate>
#include <QAbstractTableModel>
enum Columns { CHECKBOX = 0, MOD_NAME, HAS_BUNDLES, HAS_CACHE, HAS_SCRIPTS, STATUS, NOTES_LAST };
class ModlistModel : public QAbstractTableModel
{
Q_OBJECT
public:
ModlistModel(QList<Mod*>& mods, QObject* parent = 0);
int rowCount(const QModelIndex& parent = QModelIndex()) const;
int columnCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex& index) const;
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
Qt::DropActions supportedDropActions() const;
private:
QList<Mod*>& modList;
};
#endif // MODLISTMODEL_H