1/*
2 SPDX-FileCopyrightText: 2023 Alexander Lohnau <alexander.lohnau@gmx.de>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KQUICKCONFIGMODULELOADER_H
7#define KQUICKCONFIGMODULELOADER_H
8
9#include "kcmutilsquick_export.h"
10
11#include <KPluginFactory>
12#include <memory>
13
14class QQmlEngine;
15class KQuickConfigModule;
16
17namespace KQuickConfigModuleLoader
18{
19/**
20 * Loads a QML KCM from the given plugin metadata.
21 * @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.
22 */
23KCMUTILSQUICK_EXPORT KPluginFactory::Result<KQuickConfigModule>
24loadModule(const KPluginMetaData &metaData, QObject *parent = nullptr, const QVariantList &args = {}, const std::shared_ptr<QQmlEngine> &engine = {});
25}
26#endif
27

source code of kcmutils/src/qml/kquickconfigmoduleloader.h