/* SPDX-FileCopyrightText: 1999 Matthias Hoelzer-Kluepfel SPDX-FileCopyrightText: 2002-2003 Daniel Molkentin SPDX-FileCopyrightText: 2006 Matthias Kretz SPDX-FileCopyrightText: 2021 Alexander Lohnau SPDX-License-Identifier: LGPL-2.0-only */ #ifndef KCMODULELOADER_H #define KCMODULELOADER_H #include #include #include class QWidget; class QQmlEngine; /*! * \namespace KCModuleLoader * \inmodule KCMUtils * \brief Loads a KCModule. * * In case the provided metadata points to a KQuickConfigModule, it is wrapped in a KCModule. */ namespace KCModuleLoader { /*! * Loads a KCModule. If loading fails a KCM which displays an error message is returned. * * \a metaData KPluginMetaData for loading the plugin * * \a engine QQmlEngine that will be used for KQuickConfigModule classes. * If none is set, a internal engine will be created and reused for further modules. * In case your app already has an engine, you should pass it in explicitly * * Returns a pointer to the loaded KCModule */ KCMUTILS_EXPORT KCModule * loadModule(const KPluginMetaData &metaData, QWidget *parent = nullptr, const QVariantList &args = {}, const std::shared_ptr &engine = {}); } #endif // KCMODULELOADER_H