Krita Source Code Documentation
Loading...
Searching...
No Matches
KritaQmlComponentsPlugin.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Halla Rempt <halla@valdyas.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
8
9#include <QObject>
11
12#include <SvgTextLabel.h>
13#include <KisNumParser.h>
15#include <KisTheme.h>
16#include <KisFontFunctions.h>
17#include <KoShapeQtQuickLabel.h>
20
21#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
22#error "This plugin implementation is to be used with Qt5 only!\n"
23 "Qt6 should generate it itself with GENERATE_PLUGIN_SOURCE!"
24#endif
25
27 qmlRegisterModule("org.krita.components", 1, 0);
28}
29
31 : QQmlExtensionPlugin(parent)
32{
33}
34
35void KritaQmlComponentsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
36{
37 Q_UNUSED(engine);
38 Q_UNUSED(uri);
39}
40
42{
43 qmlRegisterType<SvgTextLabel>(uri, 1, 0, "SvgTextLabel");
44 qmlRegisterType<KisNumParser>(uri, 1, 0, "KisNumParser");
45 qmlRegisterType<KisCubicCurveQml>(uri, 1, 0, "KisCubicCurve");
46 qmlRegisterType<KisTheme>(uri, 1, 0, "Theme");
47 qmlRegisterUncreatableType<KisThemeColorGroup>(uri, 1, 0, "ThemeColorGroup", "Use Theme instead");
48 qmlRegisterType<KisFontFunctions>(uri, 1, 0, "FontFunctions");
49 qmlRegisterType<KoShapeQtQuickLabel>(uri, 1, 0, "KoShapeQtQuickLabel");
50 qmlRegisterType<TagFilterProxyModelQmlWrapper>(uri, 1, 0, "TagFilterProxyModelQmlWrapper");
51 qmlRegisterType<KisQmlPopupWidgetManager>(uri, 1, 0, "PopupWidget");
52
53}
54
55#include "moc_KritaQmlComponentsPlugin.cpp"
Qt6 should generate it itself with GENERATE_PLUGIN_SOURCE KIS_DECLARE_STATIC_INITIALIZER
void registerTypes(const char *uri) override
void initializeEngine(QQmlEngine *engine, const char *uri) override
KritaQmlComponentsPlugin(QObject *parent=nullptr)