mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
PartitionEditor: Add total blocks column
This commit is contained in:
parent
2f8c20816e
commit
ba9f60785b
2 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,8 @@ String PartitionModel::column_name(int column) const
|
||||||
return "Start Block";
|
return "Start Block";
|
||||||
case Column::EndBlock:
|
case Column::EndBlock:
|
||||||
return "End Block";
|
return "End Block";
|
||||||
|
case Column::TotalBlocks:
|
||||||
|
return "Total Blocks";
|
||||||
default:
|
default:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
@ -43,6 +45,8 @@ GUI::Variant PartitionModel::data(GUI::ModelIndex const& index, GUI::ModelRole r
|
||||||
return partition.start_block();
|
return partition.start_block();
|
||||||
case Column::EndBlock:
|
case Column::EndBlock:
|
||||||
return partition.end_block();
|
return partition.end_block();
|
||||||
|
case Column::TotalBlocks:
|
||||||
|
return partition.end_block() - partition.start_block() + 1;
|
||||||
default:
|
default:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ public:
|
||||||
Partition,
|
Partition,
|
||||||
StartBlock,
|
StartBlock,
|
||||||
EndBlock,
|
EndBlock,
|
||||||
|
TotalBlocks,
|
||||||
__Count,
|
__Count,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue