mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
This commit is contained in:
parent
f6d7204689
commit
a1e381a0f8
66 changed files with 201 additions and 167 deletions
|
@ -73,11 +73,11 @@ String DevicesModel::column_name(int column) const
|
|||
}
|
||||
}
|
||||
|
||||
GUI::Variant DevicesModel::data(const GUI::ModelIndex& index, Role role) const
|
||||
GUI::Variant DevicesModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
|
||||
{
|
||||
ASSERT(is_valid(index));
|
||||
|
||||
if (role == Role::TextAlignment) {
|
||||
if (role == GUI::ModelRole::TextAlignment) {
|
||||
switch (index.column()) {
|
||||
case Column::Device:
|
||||
return Gfx::TextAlignment::CenterLeft;
|
||||
|
@ -93,7 +93,7 @@ GUI::Variant DevicesModel::data(const GUI::ModelIndex& index, Role role) const
|
|||
return {};
|
||||
}
|
||||
|
||||
if (role == Role::Display) {
|
||||
if (role == GUI::ModelRole::Display) {
|
||||
const DeviceInfo& device = m_devices[index.row()];
|
||||
switch (index.column()) {
|
||||
case Column::Device:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue