File indexing completed on 2024-05-12 07:47:31
0001 /* 0002 SPDX-FileCopyrightText: 2022 Alexander Lohnau <alexander.lohnau@gmx.de> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #include <QQmlExtensionPlugin> 0007 0008 #include "../core/kpluginproxymodel.h" 0009 #include "kcmlauncher_p.h" 0010 #include "kquickconfigmodule.h" 0011 #include "settinghighlighterprivate.h" 0012 #include "settingstateproxy.h" 0013 0014 class KCMUtilsQmlPlugin : public QQmlExtensionPlugin 0015 { 0016 Q_OBJECT 0017 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 0018 public: 0019 void registerTypes(const char *uri) override 0020 { 0021 qmlRegisterType<KPluginProxyModel>("org.kde.kcmutils.private", 1, 0, "ProxyModel"); 0022 qmlRegisterModule(uri, 1, 0); 0023 qmlRegisterUncreatableType<KQuickConfigModule>(uri, 1, 0, "ConfigModule", QLatin1String("Do not create objects of type ConfigModule")); 0024 qmlRegisterType<SettingStateProxy>(uri, 1, 0, "SettingStateProxy"); 0025 qmlRegisterType<SettingHighlighterPrivate>("org.kde.kcmutils.private", 1, 0, "SettingHighlighterPrivate"); 0026 qmlRegisterSingletonType<KCMLauncher>(uri, 1, 0, "KCMLauncher", [](QQmlEngine *, QJSEngine *) { 0027 return new KCMLauncher(); 0028 }); 0029 } 0030 }; 0031 0032 #include "qmlplugin.moc"