KQuickImageEditor

kquickimageeditor_plugin.cpp
1 // SPDX-FileCopyrightText: 2020 Carl Schwan <[email protected]>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #include <QQmlEngine>
6 #include <QResource>
7 
8 #include "kquickimageeditor_plugin.h"
9 
10 #include "imagedocument.h"
11 #include "imageitem.h"
12 #include "resizehandle.h"
13 #include "resizerectangle.h"
14 
15 void KQuickImageEditorPlugin::registerTypes(const char *uri)
16 {
17 #if defined(Q_OS_ANDROID)
18  QResource::registerResource(QStringLiteral("assets:/android_rcc_bundle.rcc"));
19 #endif
20 
21  qmlRegisterType<ResizeHandle>(uri, 1, 0, "ResizeHandle");
22  qmlRegisterType<ResizeRectangle>(uri, 1, 0, "ResizeRectangle");
23  qmlRegisterType<ImageItem>(uri, 1, 0, "ImageItem");
24  qmlRegisterType<ImageDocument>(uri, 1, 0, "ImageDocument");
25  qmlRegisterType(resolveFileUrl(QStringLiteral("BasicResizeHandle.qml")), uri, 1, 0, "BasicResizeHandle");
26  qmlRegisterType(resolveFileUrl(QStringLiteral("SelectionTool.qml")), uri, 1, 0, "SelectionTool");
27  qmlRegisterType(resolveFileUrl(QStringLiteral("SelectionHandle.qml")), uri, 1, 0, "SelectionHandle");
28  qmlRegisterType(resolveFileUrl(QStringLiteral("SelectionBackground.qml")), uri, 1, 0, "SelectionBackground");
29  qmlRegisterType(resolveFileUrl(QStringLiteral("CropBackground.qml")), uri, 1, 0, "CropBackground");
30  qmlRegisterType(resolveFileUrl(QStringLiteral("RectangleCutout.qml")), uri, 1, 0, "RectangleCutout");
31 }
bool registerResource(const QString &rccFileName, const QString &mapRoot)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 18 2021 23:08:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.