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
17/*!
18 \namespace KQuickConfigModuleLoader
19 \inmodule KCMUtilsQuick
20 */
21namespace KQuickConfigModuleLoader
22{
23/*!
24 * \inmodule KCMUtilsQuick
25 * \brief Loads a QML KCM from the given plugin \a metaData as a child of \a parent with the given \a args.
26 *
27 * \a engine The QQmlEngine to use. If not set, an internal engine will be created. If your application has an existing engine, this must be passed in.
28 */
29KCMUTILSQUICK_EXPORT KPluginFactory::Result<KQuickConfigModule>
30loadModule(const KPluginMetaData &metaData, QObject *parent = nullptr, const QVariantList &args = {}, const std::shared_ptr<QQmlEngine> &engine = {});
31}
32#endif
33

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