Add "Size" column

- Sizes are displayed in B, KiB, MiB, and GiB with 2 significant
  digits after the decimal
- Column is hidden by default
- TestEntryModel updated for testing proxy model
This commit is contained in:
Ojas Anand 2020-04-17 09:51:36 -04:00 committed by Janek Bevendorff
parent d9214db404
commit 1b18c5d51d
6 changed files with 48 additions and 14 deletions

View file

@ -72,7 +72,7 @@ EntryView::EntryView(QWidget* parent)
resetViewToDefaults();
// Actions to toggle column visibility, each carrying the corresponding
// colummn index as data
// column index as data
m_columnActions = new QActionGroup(this);
m_columnActions->setExclusive(false);
for (int visualIndex = 1; visualIndex < header()->count(); ++visualIndex) {
@ -451,6 +451,7 @@ void EntryView::resetViewToDefaults()
header()->hideSection(EntryModel::Created);
header()->hideSection(EntryModel::Accessed);
header()->hideSection(EntryModel::Attachments);
header()->hideSection(EntryModel::Size);
// Reset column order to logical indices
for (int i = 0; i < header()->count(); ++i) {