Added more columns to block tables

This commit is contained in:
Pulak Malhotra 2021-07-29 17:21:01 +05:30
parent 1d69dd0bfe
commit a10aeacab1
2 changed files with 17 additions and 1 deletions

View File

@ -53,6 +53,10 @@ QVariant WindowsHeapModel::data(const QModelIndex &index, int role) const
return RAddressString(item.userAddress);
case SizeColumn:
return item.size;
case UnusedColumn:
return item.unusedBytes;
case GranularityColumn:
return item.granularity;
case TypeColumn:
return item.type;
default:
@ -75,6 +79,10 @@ QVariant WindowsHeapModel::headerData(int section, Qt::Orientation orientation,
return tr("User Address");
case SizeColumn:
return tr("Size");
case GranularityColumn:
return tr("Granularity");
case UnusedColumn:
return tr("Unused");
case TypeColumn:
return tr("Type");
default:

View File

@ -15,7 +15,15 @@ class WindowsHeapModel : public QAbstractTableModel
Q_OBJECT
public:
explicit WindowsHeapModel(QObject *parent = nullptr);
enum Column { HeaderAddColumn = 0, UserAddColumn, SizeColumn, TypeColumn, ColumnCount };
enum Column {
HeaderAddColumn = 0,
UserAddColumn,
SizeColumn,
GranularityColumn,
UnusedColumn,
TypeColumn,
ColumnCount
};
void reload();
int rowCount(const QModelIndex &parent) const override;
int columnCount(const QModelIndex &parent) const override;