Changeset View
Changeset View
Standalone View
Standalone View
src/kirigamiplugin.cpp
Show All 12 Lines | |||||
13 | #include "settings.h" | 13 | #include "settings.h" | ||
14 | #include "formlayoutattached.h" | 14 | #include "formlayoutattached.h" | ||
15 | #include "mnemonicattached.h" | 15 | #include "mnemonicattached.h" | ||
16 | #include "delegaterecycler.h" | 16 | #include "delegaterecycler.h" | ||
17 | #include "pagepool.h" | 17 | #include "pagepool.h" | ||
18 | #include "scenepositionattached.h" | 18 | #include "scenepositionattached.h" | ||
19 | #include "wheelhandler.h" | 19 | #include "wheelhandler.h" | ||
20 | #include "shadowedrectangle.h" | 20 | #include "shadowedrectangle.h" | ||
21 | #include "colorutils.h" | ||||
21 | 22 | | |||
22 | #include <QQmlEngine> | 23 | #include <QQmlEngine> | ||
23 | #include <QQmlContext> | 24 | #include <QQmlContext> | ||
24 | #include <QQuickItem> | 25 | #include <QQuickItem> | ||
25 | #include <QQuickStyle> | 26 | #include <QQuickStyle> | ||
26 | #include <QGuiApplication> | 27 | #include <QGuiApplication> | ||
27 | #include <QClipboard> | 28 | #include <QClipboard> | ||
28 | 29 | | |||
▲ Show 20 Lines • Show All 206 Lines • ▼ Show 20 Line(s) | 134 | #endif | |||
235 | 236 | | |||
236 | //TODO: remove | 237 | //TODO: remove | ||
237 | qmlRegisterType(componentUrl(QStringLiteral("SwipeListItem2.qml")), uri, 2, 11, "SwipeListItem2"); | 238 | qmlRegisterType(componentUrl(QStringLiteral("SwipeListItem2.qml")), uri, 2, 11, "SwipeListItem2"); | ||
238 | 239 | | |||
239 | // 2.12 | 240 | // 2.12 | ||
240 | qmlRegisterType<ShadowedRectangle>(uri, 2, 12, "ShadowedRectangle"); | 241 | qmlRegisterType<ShadowedRectangle>(uri, 2, 12, "ShadowedRectangle"); | ||
241 | qmlRegisterUncreatableType<BorderGroup>(uri, 2, 12, "BorderGroup", QStringLiteral("Used as grouped property")); | 242 | qmlRegisterUncreatableType<BorderGroup>(uri, 2, 12, "BorderGroup", QStringLiteral("Used as grouped property")); | ||
242 | qmlRegisterUncreatableType<ShadowGroup>(uri, 2, 12, "ShadowGroup", QStringLiteral("Used as grouped property")); | 243 | qmlRegisterUncreatableType<ShadowGroup>(uri, 2, 12, "ShadowGroup", QStringLiteral("Used as grouped property")); | ||
244 | qmlRegisterSingletonType<ColorUtils>(uri, 2, 12, "ColorUtils", [](QQmlEngine*, QJSEngine*) { return new ColorUtils; }); | ||||
245 | qmlRegisterUncreatableType<PendingValue>(uri, 2, 12, "PendingValue", QStringLiteral("Cannot create objects of type PendingValue.")); | ||||
243 | 246 | | |||
244 | qmlProtectModule(uri, 2); | 247 | qmlProtectModule(uri, 2); | ||
245 | } | 248 | } | ||
246 | 249 | | |||
247 | void KirigamiPlugin::initializeEngine(QQmlEngine *engine, const char *uri) | 250 | void KirigamiPlugin::initializeEngine(QQmlEngine *engine, const char *uri) | ||
248 | { | 251 | { | ||
249 | Q_UNUSED(uri); | 252 | Q_UNUSED(uri); | ||
250 | connect(this, &KirigamiPlugin::languageChangeEvent, engine, &QQmlEngine::retranslate); | 253 | connect(this, &KirigamiPlugin::languageChangeEvent, engine, &QQmlEngine::retranslate); | ||
251 | } | 254 | } | ||
252 | 255 | | |||
253 | #include "kirigamiplugin.moc" | 256 | #include "kirigamiplugin.moc" |