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
{
+#if 0
// Not sure that this is necessary for our purposes...
// Especially since this model would never make use of this info...
if (role != Qt::DisplayRole)
return QString("Column %1").arg(section);
else
return QString("Row %1").arg(section);
+#else
+ // This seems more like what we want...
+ if (role == Qt::SizeHintRole)
+ return QSize(1, 1);
+
+ return QVariant();
+#endif
}
void FileListModel::AddData(QIcon pix)
reset();
}
+void FileListModel::AddData(unsigned long index)
+{
+ dbIndex.push_back(index);
+ reset();
+}
+
#if 0