X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Ffilelistmodel.h;h=83666f40a3e4d7d445a1a446453986bbb43ae513;hb=56f80e7876367f9da3cff765b46e842270d45a0d;hp=b2006a84b107f0aecec757162968af8a1139e810;hpb=caf1236884015695c52910a75b8420be7c63d574;p=virtualjaguar diff --git a/src/gui/filelistmodel.h b/src/gui/filelistmodel.h index b2006a8..83666f4 100644 --- a/src/gui/filelistmodel.h +++ b/src/gui/filelistmodel.h @@ -1,15 +1,16 @@ // // filelistmodel.h: Class definition // -// by James L. Hammons +// by James Hammons // (C) 2010 Underground Software // #ifndef __FILELISTMODEL_H__ #define __FILELISTMODEL_H__ -#include +#include #include +#include struct FileListData { @@ -17,10 +18,23 @@ struct FileListData // 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 { public: @@ -30,15 +44,15 @@ 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(unsigned long); - void AddData(unsigned long, QString, QImage); +// 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 dbIndex; std::vector list; };