1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 18:45:08 +00:00

LibGUI: Put all classes in the GUI namespace and remove the leading G

This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
Andreas Kling 2020-02-02 15:07:41 +01:00
parent 2d39da5405
commit c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions

View file

@ -41,7 +41,7 @@ ProfileModel::~ProfileModel()
{
}
GModelIndex ProfileModel::index(int row, int column, const GModelIndex& parent) const
GUI::ModelIndex ProfileModel::index(int row, int column, const GUI::ModelIndex& parent) const
{
if (!parent.is_valid()) {
if (m_profile.roots().is_empty())
@ -52,7 +52,7 @@ GModelIndex ProfileModel::index(int row, int column, const GModelIndex& parent)
return create_index(row, column, remote_parent.children().at(row).ptr());
}
GModelIndex ProfileModel::parent_index(const GModelIndex& index) const
GUI::ModelIndex ProfileModel::parent_index(const GUI::ModelIndex& index) const
{
if (!index.is_valid())
return {};
@ -80,7 +80,7 @@ GModelIndex ProfileModel::parent_index(const GModelIndex& index) const
return {};
}
int ProfileModel::row_count(const GModelIndex& index) const
int ProfileModel::row_count(const GUI::ModelIndex& index) const
{
if (!index.is_valid())
return m_profile.roots().size();
@ -88,7 +88,7 @@ int ProfileModel::row_count(const GModelIndex& index) const
return node.children().size();
}
int ProfileModel::column_count(const GModelIndex&) const
int ProfileModel::column_count(const GUI::ModelIndex&) const
{
return Column::__Count;
}
@ -106,14 +106,14 @@ String ProfileModel::column_name(int column) const
}
}
GModel::ColumnMetadata ProfileModel::column_metadata(int column) const
GUI::Model::ColumnMetadata ProfileModel::column_metadata(int column) const
{
if (column == Column::SampleCount)
return ColumnMetadata { 0, TextAlignment::CenterRight };
return {};
}
GVariant ProfileModel::data(const GModelIndex& index, Role role) const
GUI::Variant ProfileModel::data(const GUI::ModelIndex& index, Role role) const
{
auto* node = static_cast<ProfileNode*>(index.internal_data());
if (role == Role::Icon) {