Lots of changes again

This commit is contained in:
2022-01-09 21:07:41 +01:00
parent 17fceb9eed
commit 0aba7eadaf
99 changed files with 1231 additions and 232 deletions
+29
View File
@@ -0,0 +1,29 @@
#include "spritesmodel.h"
#include <QPixmap>
SpritesModel::SpritesModel(QObject *parent)
: QAbstractListModel{parent}
{
}
int SpritesModel::rowCount(const QModelIndex &parent) const
{
return 100;
}
QVariant SpritesModel::data(const QModelIndex &index, int role) const
{
switch (role)
{
case Qt::DisplayRole:
case Qt::EditRole:
return tr("image %0").arg(index.row());
case Qt::DecorationRole:
QPixmap pixmap{64, 64};
pixmap.fill(Qt::black);
return pixmap;
}
return {};
}