File indexing completed on 2024-05-12 03:54:09

0001 /*
0002     SPDX-FileCopyrightText: 2023 Alexander Lohnau <alexander.lohnau@gmx.de>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #ifndef KQUICKCONFIGMODULELOADER_H
0007 #define KQUICKCONFIGMODULELOADER_H
0008 
0009 #include "kcmutilsquick_export.h"
0010 
0011 #include <KPluginFactory>
0012 #include <memory>
0013 
0014 class QQmlEngine;
0015 class KQuickConfigModule;
0016 
0017 namespace KQuickConfigModuleLoader
0018 {
0019 /**
0020  * Loads a QML KCM from the given plugin metadata.
0021  * @param engine The QQmlEngine to use, if not set, an internal engine will be created. If your application has an exisiting engine, this must be passed in.
0022  */
0023 KCMUTILSQUICK_EXPORT KPluginFactory::Result<KQuickConfigModule>
0024 loadModule(const KPluginMetaData &metaData, QObject *parent = nullptr, const QVariantList &args = {}, const std::shared_ptr<QQmlEngine> &engine = {});
0025 }
0026 #endif