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>
19
20#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
21#error "This plugin implementation is to be used with Qt5 only!\n"
22 "Qt6 should generate it itself with GENERATE_PLUGIN_SOURCE!"
23#endif
24
26 qmlRegisterModule("org.krita.components", 1, 0);
27}
28
30 : QQmlExtensionPlugin(parent)
31{
32}
33
34void KritaQmlComponentsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
35{
36 Q_UNUSED(engine);
37 Q_UNUSED(uri);
38}
39
41{
42 qmlRegisterType<SvgTextLabel>(uri, 1, 0, "SvgTextLabel");
43 qmlRegisterType<KisNumParser>(uri, 1, 0, "KisNumParser");
44 qmlRegisterType<KisCubicCurveQml>(uri, 1, 0, "KisCubicCurve");
45 qmlRegisterType<KisTheme>(uri, 1, 0, "Theme");
46 qmlRegisterUncreatableType<KisThemeColorGroup>(uri, 1, 0, "ThemeColorGroup", "Use Theme instead");
47 qmlRegisterType<KisFontFunctions>(uri, 1, 0, "FontFunctions");
48 qmlRegisterType<KoShapeQtQuickLabel>(uri, 1, 0, "KoShapeQtQuickLabel");
49 qmlRegisterType<TagFilterProxyModelQmlWrapper>(uri, 1, 0, "TagFilterProxyModelQmlWrapper");
50
51}
52
53#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)