X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Ffilelistmodel.h;h=10f2e2a72a25489c0919a2c67fb592e0229579ec;hb=6f25f63a18153bc2adc49c5f9a3862c2760716df;hp=4828d383a10a3a83f400afb4e944ddf9b0d14b1a;hpb=8549cdb01f45764f69a6483285dc0771ea66c007;p=virtualjaguar diff --git a/src/gui/filelistmodel.h b/src/gui/filelistmodel.h index 4828d38..10f2e2a 100644 --- a/src/gui/filelistmodel.h +++ b/src/gui/filelistmodel.h @@ -1,7 +1,7 @@ // // filelistmodel.h: Class definition // -// by James L. Hammons +// by James Hammons // (C) 2010 Underground Software // @@ -10,6 +10,30 @@ #include #include +#include + +struct FileListData +{ +// FileListData(unsigned long ul=0, QString str="", QImage img=QImage()): dbIndex(ul), filename(str), label(img) {} +// FileListData(unsigned long ul=0, QString str, QImage img): dbIndex(ul), filename(str), label(img) {} + + unsigned long dbIndex; + unsigned long fileSize; + QString filename; + QImage label; + bool hasUniversalHeader; + uint32_t fileType; + uint32_t crc; +}; + +//hm. +#define FLM_INDEX (Qt::UserRole + 1) +#define FLM_FILESIZE (Qt::UserRole + 2) +#define FLM_FILENAME (Qt::UserRole + 3) +#define FLM_LABEL (Qt::UserRole + 4) +#define FLM_UNIVERSALHDR (Qt::UserRole + 5) +#define FLM_FILETYPE (Qt::UserRole + 6) +#define FLM_CRC (Qt::UserRole + 7) class FileListModel: public QAbstractListModel { @@ -20,10 +44,16 @@ class FileListModel: public QAbstractListModel QVariant data(const QModelIndex & index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - void AddData(QIcon pix); +// void AddData(QIcon pix); +// void AddData(unsigned long); + void AddData(unsigned long, QString, QImage, unsigned long); + void AddData(unsigned long, QString, QImage, unsigned long, bool, uint32_t, uint32_t); + void ClearData(void); + +// FileListData GetData(const QModelIndex & index) const; private: - std::vector pixList; + std::vector list; }; #endif // __FILELISTMODEL_H__