]> Shamusworld >> Repos - virtualjaguar/blob - src/gui/filelistmodel.h
Start of model/view class implementation, since QListViewWidget ultimately
[virtualjaguar] / src / gui / filelistmodel.h
1 //
2 // filelistmodel.h: Class definition
3 //
4 // by James L. Hammons
5 // (C) 2010 Underground Software
6 //
7
8 #ifndef __FILELISTMODEL_H__
9 #define __FILELISTMODEL_H__
10
11 #include <QtGui>
12 #include <vector>
13
14 class FileListModel: public QAbstractListModel
15 {
16         public:
17                 FileListModel(QObject * parent = 0);
18
19                 int rowCount(const QModelIndex & parent = QModelIndex()) const;
20                 QVariant data(const QModelIndex & index, int role) const;
21                 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
22
23                 void AddData(QIcon pix);
24
25         private:
26                 std::vector<QIcon> pixList;
27 };
28
29 #endif  // __FILELISTMODEL_H__