-
Notifications
You must be signed in to change notification settings - Fork 0
/
filelistmodel.h
38 lines (29 loc) · 978 Bytes
/
filelistmodel.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
31
32
33
34
35
36
37
38
#ifndef FILELISTMODEL_H
#define FILELISTMODEL_H
#include <QAbstractTableModel>
#include "filelist.h"
class FileListModel : public QAbstractTableModel
{
Q_OBJECT
public:
FileListModel(QObject* parent,
const FileList* list);
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) const;
void beginInsertFiles(int number);
void endInsertFiles();
void beginRemoveFiles();
void endRemoveFiles();
void fileListChanged();
//signals:
// void dataChanged(const QModelIndex&, const QModelIndex&);
QString folder() const;
void setFolder(const QString &folder);
private:
QObject* m_parent;
const FileList* m_list;
QString m_folder;
};
#endif // FILELISTMODEL_H