]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/filelistmodel.cpp
Moving towards a better file picker... :-)
[virtualjaguar] / src / gui / filelistmodel.cpp
index 2730a4509ad82e07c8eb0b0ce69ab586e12f0199..a975b82cc2e66f860ef7bdf37082086648869bd0 100644 (file)
@@ -26,13 +26,15 @@ FileListModel::FileListModel(QObject * parent/*= 0*/): QAbstractListModel(parent
 
 int FileListModel::rowCount(const QModelIndex & parent/*= QModelIndex()*/) const
 {
-       return pixList.size();
+//     return pixList.size();
+       return dbIndex.size();
 }
 
 QVariant FileListModel::data(const QModelIndex & index, int role) const
 {
 //     return QVariant();
-       return pixList.at(index.row());
+//     return pixList.at(index.row());
+       return (uint)dbIndex.at(index.row());
 }
 
 QVariant FileListModel::headerData(int section, Qt::Orientation orientation, int role/*= Qt::DisplayRole*/) const
@@ -62,6 +64,12 @@ void FileListModel::AddData(QIcon pix)
        reset();
 }
 
+void FileListModel::AddData(unsigned long index)
+{
+       dbIndex.push_back(index);
+       reset();
+}
+
 
 #if 0