app: add size column to chunk model

This commit is contained in:
itsmattkc 2022-07-18 02:11:24 -07:00
parent 6cf3d80047
commit dbb6fc763b
2 changed files with 5 additions and 0 deletions

View file

@ -33,6 +33,8 @@ QVariant ChunkModel::data(const QModelIndex &index, int role) const
return QString::fromLatin1(reinterpret_cast<const char *>(&c->GetType()), sizeof(uint32_t)); return QString::fromLatin1(reinterpret_cast<const char *>(&c->GetType()), sizeof(uint32_t));
case kColOffset: case kColOffset:
return QStringLiteral("0x%1").arg(QString::number(c->GetOffset(), 16).toUpper()); return QStringLiteral("0x%1").arg(QString::number(c->GetOffset(), 16).toUpper());
case kColSize:
return QStringLiteral("0x%1").arg(QString::number(c->GetSize(), 16).toUpper());
case kColDesc: case kColDesc:
return QString::fromUtf8(RIFF::GetTypeDescription(static_cast<RIFF::Type>(c->GetType()))); return QString::fromUtf8(RIFF::GetTypeDescription(static_cast<RIFF::Type>(c->GetType())));
case kColObjectID: case kColObjectID:
@ -57,6 +59,8 @@ QVariant ChunkModel::headerData(int section, Qt::Orientation orientation, int ro
return tr("Type"); return tr("Type");
case kColOffset: case kColOffset:
return tr("Offset"); return tr("Offset");
case kColSize:
return tr("Size");
case kColDesc: case kColDesc:
return tr("Description"); return tr("Description");
case kColObjectID: case kColObjectID:

View file

@ -13,6 +13,7 @@ public:
{ {
kColType, kColType,
kColOffset, kColOffset,
kColSize,
kColDesc, kColDesc,
kColObjectID, kColObjectID,