File indexing completed on 2024-05-12 04:46:54
0001 #include "mauistyleplugin.h" 0002 #include <QQmlContext> 0003 #include <QQmlEngine> 0004 0005 MauiStylePlugin::MauiStylePlugin(QObject *parent) : QQmlExtensionPlugin(parent) 0006 { 0007 0008 } 0009 0010 MauiStylePlugin::~MauiStylePlugin() 0011 { 0012 0013 } 0014 0015 QString MauiStylePlugin::name() const 0016 { 0017 return QStringLiteral("org.mauikit.style"); 0018 } 0019 0020 void MauiStylePlugin::registerTypes(const char *uri) 0021 { 0022 Q_ASSERT(QLatin1String(uri) == name()); 0023 0024 // BEGIN org.kde.breeze 0025 // qmlRegisterModule(uri, 1, 0); 0026 // qmlRegisterType<PaintedSymbolItem>(uri, 1, 0, "PaintedSymbol"); 0027 // qmlRegisterType<IconLabelLayout>(uri, 1, 0, "IconLabelLayout"); 0028 // qmlRegisterType<BreezeDial>(uri, 1, 0, "BreezeDial"); 0029 // // KColorUtilsSingleton only has invocable functions. 0030 // // Would this be better off being a SingletonInstance? 0031 // qmlRegisterSingletonType<KColorUtilsSingleton>(uri, 1, 0, "KColorUtils", [](QQmlEngine *, QJSEngine *) -> QObject * { 0032 // return new KColorUtilsSingleton; 0033 // }); 0034 // END 0035 0036 // Prevent additional types from being added. 0037 qmlProtectModule(uri, 1); 0038 }