-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodmodel.h
More file actions
45 lines (33 loc) · 937 Bytes
/
modmodel.h
File metadata and controls
45 lines (33 loc) · 937 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
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef MODMODEL_H
#define MODMODEL_H
#include <QAbstractTableModel>
#include "modmanager.h"
enum ModInfo
{
Name,
Description,
Version,
McVersion,
Url,
AuthorList,
Credits,
Path
};
class ModModel : public QAbstractTableModel
{
private:
ModManager *_mod_manager;
int rowCount(const QModelIndex & = QModelIndex()) const;
int columnCount(const QModelIndex & = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
bool insertRow(int row, const QModelIndex &parent = QModelIndex());
bool removeRow(int row, const QModelIndex &parent = QModelIndex());
public:
ModModel(const QString &path);
~ModModel();
void setPath(const QString &path);
bool append(const QString &path);
bool remove(const QModelIndex &index);
QPixmap logo(const QModelIndex &index);
};
#endif