1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 23:15: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

@ -27,7 +27,9 @@
#include <LibGUI/GAbstractView.h>
#include <LibGUI/GModelSelection.h>
void GModelSelection::set(const GModelIndex& index)
namespace GUI {
void ModelSelection::set(const ModelIndex& index)
{
ASSERT(index.is_valid());
if (m_indexes.size() == 1 && m_indexes.contains(index))
@ -37,7 +39,7 @@ void GModelSelection::set(const GModelIndex& index)
m_view.notify_selection_changed({});
}
void GModelSelection::add(const GModelIndex& index)
void ModelSelection::add(const ModelIndex& index)
{
ASSERT(index.is_valid());
if (m_indexes.contains(index))
@ -46,7 +48,7 @@ void GModelSelection::add(const GModelIndex& index)
m_view.notify_selection_changed({});
}
void GModelSelection::toggle(const GModelIndex& index)
void ModelSelection::toggle(const ModelIndex& index)
{
ASSERT(index.is_valid());
if (m_indexes.contains(index))
@ -56,7 +58,7 @@ void GModelSelection::toggle(const GModelIndex& index)
m_view.notify_selection_changed({});
}
bool GModelSelection::remove(const GModelIndex& index)
bool ModelSelection::remove(const ModelIndex& index)
{
ASSERT(index.is_valid());
if (!m_indexes.contains(index))
@ -66,10 +68,12 @@ bool GModelSelection::remove(const GModelIndex& index)
return true;
}
void GModelSelection::clear()
void ModelSelection::clear()
{
if (m_indexes.is_empty())
return;
m_indexes.clear();
m_view.notify_selection_changed({});
}
}