2 // filelistmodel.h: Class definition
5 // (C) 2010 Underground Software
8 #ifndef __FILELISTMODEL_H__
9 #define __FILELISTMODEL_H__
16 // FileListData(unsigned long ul=0, QString str="", QImage img=QImage()): dbIndex(ul), filename(str), label(img) {}
17 // FileListData(unsigned long ul=0, QString str, QImage img): dbIndex(ul), filename(str), label(img) {}
19 unsigned long dbIndex;
24 class FileListModel: public QAbstractListModel
27 FileListModel(QObject * parent = 0);
29 int rowCount(const QModelIndex & parent = QModelIndex()) const;
30 QVariant data(const QModelIndex & index, int role) const;
31 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
33 void AddData(QIcon pix);
34 void AddData(unsigned long);
35 void AddData(unsigned long, QString, QImage);
37 // FileListData GetData(const QModelIndex & index) const;
40 std::vector<QIcon> pixList;
41 std::vector<unsigned long> dbIndex;
42 std::vector<FileListData> list;
45 #endif // __FILELISTMODEL_H__