diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp index 4bcf3a5fed..b6397862b1 100644 --- a/Userland/Applications/ThemeEditor/main.cpp +++ b/Userland/Applications/ThemeEditor/main.cpp @@ -58,24 +58,6 @@ private: } }; -class ColorRoleModel final : public GUI::ItemListModel { -public: - explicit ColorRoleModel(Vector const& data) - : ItemListModel(data) - { - } - - virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role) const override - { - if (role == GUI::ModelRole::Display) - return Gfx::to_string(m_data[(size_t)index.row()]); - if (role == GUI::ModelRole::Custom) - return m_data[(size_t)index.row()]; - - return ItemListModel::data(index, role); - } -}; - struct AlignmentValue { String title; Gfx::TextAlignment setting_value; @@ -110,78 +92,6 @@ private: Vector m_alignments; }; -class AlignmentRoleModel final : public GUI::ItemListModel { -public: - explicit AlignmentRoleModel(Vector const& data) - : ItemListModel(data) - { - } - - virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role) const override - { - if (role == GUI::ModelRole::Display) - return Gfx::to_string(m_data[(size_t)index.row()]); - if (role == GUI::ModelRole::Custom) - return m_data[(size_t)index.row()]; - - return ItemListModel::data(index, role); - } -}; - -class FlagRoleModel final : public GUI::ItemListModel { -public: - explicit FlagRoleModel(Vector const& data) - : ItemListModel(data) - { - } - - virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role) const override - { - if (role == GUI::ModelRole::Display) - return Gfx::to_string(m_data[(size_t)index.row()]); - if (role == GUI::ModelRole::Custom) - return m_data[(size_t)index.row()]; - - return ItemListModel::data(index, role); - } -}; - -class MetricRoleModel final : public GUI::ItemListModel { -public: - explicit MetricRoleModel(Vector const& data) - : ItemListModel(data) - { - } - - virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role) const override - { - if (role == GUI::ModelRole::Display) - return Gfx::to_string(m_data[(size_t)index.row()]); - if (role == GUI::ModelRole::Custom) - return m_data[(size_t)index.row()]; - - return ItemListModel::data(index, role); - } -}; - -class PathRoleModel final : public GUI::ItemListModel { -public: - explicit PathRoleModel(Vector const& data) - : ItemListModel(data) - { - } - - virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role) const override - { - if (role == GUI::ModelRole::Display) - return Gfx::to_string(m_data[(size_t)index.row()]); - if (role == GUI::ModelRole::Custom) - return m_data[(size_t)index.row()]; - - return ItemListModel::data(index, role); - } -}; - ErrorOr serenity_main(Main::Arguments arguments) { TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath unix"));