PartitionEditor: Add total blocks column

This commit is contained in:
Samuel Bowman 2022-06-28 19:15:35 -04:00 committed by Linus Groh
parent 2f8c20816e
commit ba9f60785b
Notes: sideshowbarker 2024-07-17 18:46:57 +09:00
2 changed files with 5 additions and 0 deletions

View file

@ -20,6 +20,8 @@ String PartitionModel::column_name(int column) const
return "Start Block";
case Column::EndBlock:
return "End Block";
case Column::TotalBlocks:
return "Total Blocks";
default:
VERIFY_NOT_REACHED();
}
@ -43,6 +45,8 @@ GUI::Variant PartitionModel::data(GUI::ModelIndex const& index, GUI::ModelRole r
return partition.start_block();
case Column::EndBlock:
return partition.end_block();
case Column::TotalBlocks:
return partition.end_block() - partition.start_block() + 1;
default:
VERIFY_NOT_REACHED();
}

View file

@ -17,6 +17,7 @@ public:
Partition,
StartBlock,
EndBlock,
TotalBlocks,
__Count,
};