mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 11:55:07 +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:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -27,31 +27,33 @@
|
|||
#include <LibGUI/GAbstractView.h>
|
||||
#include <LibGUI/GModel.h>
|
||||
|
||||
GModel::GModel()
|
||||
namespace GUI {
|
||||
|
||||
Model::Model()
|
||||
{
|
||||
}
|
||||
|
||||
GModel::~GModel()
|
||||
Model::~Model()
|
||||
{
|
||||
}
|
||||
|
||||
void GModel::register_view(Badge<GAbstractView>, GAbstractView& view)
|
||||
void Model::register_view(Badge<AbstractView>, AbstractView& view)
|
||||
{
|
||||
m_views.set(&view);
|
||||
}
|
||||
|
||||
void GModel::unregister_view(Badge<GAbstractView>, GAbstractView& view)
|
||||
void Model::unregister_view(Badge<AbstractView>, AbstractView& view)
|
||||
{
|
||||
m_views.remove(&view);
|
||||
}
|
||||
|
||||
void GModel::for_each_view(Function<void(GAbstractView&)> callback)
|
||||
void Model::for_each_view(Function<void(AbstractView&)> callback)
|
||||
{
|
||||
for (auto* view : m_views)
|
||||
callback(*view);
|
||||
}
|
||||
|
||||
void GModel::did_update()
|
||||
void Model::did_update()
|
||||
{
|
||||
if (on_update)
|
||||
on_update();
|
||||
|
@ -60,12 +62,12 @@ void GModel::did_update()
|
|||
});
|
||||
}
|
||||
|
||||
GModelIndex GModel::create_index(int row, int column, const void* data) const
|
||||
ModelIndex Model::create_index(int row, int column, const void* data) const
|
||||
{
|
||||
return GModelIndex(*this, row, column, const_cast<void*>(data));
|
||||
return ModelIndex(*this, row, column, const_cast<void*>(data));
|
||||
}
|
||||
|
||||
GModelIndex GModel::sibling(int row, int column, const GModelIndex& parent) const
|
||||
ModelIndex Model::sibling(int row, int column, const ModelIndex& parent) const
|
||||
{
|
||||
if (!parent.is_valid())
|
||||
return index(row, column, {});
|
||||
|
@ -74,3 +76,5 @@ GModelIndex GModel::sibling(int row, int column, const GModelIndex& parent) cons
|
|||
return {};
|
||||
return index(row, column, parent);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue