KCMUtils

kcmoduleloader.h
1/*
2 SPDX-FileCopyrightText: 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3 SPDX-FileCopyrightText: 2002-2003 Daniel Molkentin <molkentin@kde.org>
4 SPDX-FileCopyrightText: 2006 Matthias Kretz <kretz@kde.org>
5 SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de>
6
7 SPDX-License-Identifier: LGPL-2.0-only
8*/
9
10#ifndef KCMODULELOADER_H
11#define KCMODULELOADER_H
12
13#include <KPluginMetaData>
14#include <kcmodule.h>
15
16#include <memory>
17
18class QWidget;
19class QQmlEngine;
20
21/**
22 * @short Loads a KCModule
23 * In case the provided metadata points to a KQuickConfigModule, it is wrapped in a KCModule
24 */
26{
27/**
28 * Loads a @ref KCModule. If loading fails a KCM which displays an error message is returned.
29 *
30 * @param metaData KPluginMetaData for loading the plugin
31 * @param engine QQmlEngine that will be used for KQuickConfigModule classes.
32 * If none is set, a internal engine will be created and reused for further modules.
33 * In case your app already has an engine, you should pass it in explicitly
34 *
35 * @return a pointer to the loaded @ref KCModule
36 */
37KCMUTILS_EXPORT KCModule *
38loadModule(const KPluginMetaData &metaData, QWidget *parent = nullptr, const QVariantList &args = {}, const std::shared_ptr<QQmlEngine> &engine = {});
39}
40
41#endif // KCMODULELOADER_H
The base class for QWidgets configuration modules.
Definition kcmodule.h:59
Loads a KCModule In case the provided metadata points to a KQuickConfigModule, it is wrapped in a KCM...
KCMUTILS_EXPORT KCModule * loadModule(const KPluginMetaData &metaData, QWidget *parent=nullptr, const QVariantList &args={}, const std::shared_ptr< QQmlEngine > &engine={})
Loads a KCModule.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.