Show sizes
table, index, toast and total size per Table size of each index
This commit is contained in:
parent
d6aeef492d
commit
11459e1e12
17 changed files with 138 additions and 28 deletions
|
|
@ -63,6 +63,9 @@ QVariant IndexModel::headerData(int section, Qt::Orientation orientation, int ro
|
|||
case ConditionCol:
|
||||
c = tr("Condition");
|
||||
break;
|
||||
case SizeCol:
|
||||
c = tr("Size");
|
||||
break;
|
||||
// case DefinitionCol:
|
||||
// c = tr("Definition");
|
||||
// break;
|
||||
|
|
@ -99,6 +102,10 @@ QVariant IndexModel::getData(const QModelIndex &index) const
|
|||
|
||||
case ConditionCol:
|
||||
break;
|
||||
|
||||
case SizeCol:
|
||||
v = dat.sizeBytes;
|
||||
break;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
|
@ -110,5 +117,13 @@ QVariant IndexModel::data(const QModelIndex &index, int role) const
|
|||
v = getData(index);
|
||||
else if (role == CustomDataTypeRole)
|
||||
v = getType(index.column());
|
||||
return v;
|
||||
else if (role == CustomDataMeaningRole) {
|
||||
switch (index.column()) {
|
||||
case SizeCol:
|
||||
return static_cast<int>(DataMeaningBytes);
|
||||
default:
|
||||
return static_cast<int>(DataMeaningNormal);
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue