// SPDX-License-Identifier: GPL-3.0-or-later // Copyright 2019 Juan Palacios #pragma once #include "iqmlcomponentregistry.h" #include #include #include #include #include class QMLItem; class QQmlApplicationEngine; class QQuickItem; class QMLComponentRegistry final : public IQMLComponentRegistry { public: std::vector> const & qmlTypeRegisterers() const override; std::unordered_map> const & qmlItemProviders() const override; std::unordered_map> const & quickItemProviders() const override; static bool addQMLTypeRegisterer(std::function &®isterer); static bool addQMLItemProvider( std::string_view componentID, std::function &&provider); static bool addQuickItemProvider(std::string_view itemID, std::function &&provider); private: static std::vector> &qmlTypeRegisterers_(); static std::unordered_map> & qmlItemProviders_(); static std::unordered_map> & quickItemProviders_(); };