File indexing completed on 2024-04-28 04:40:43

0001 /*
0002  *  SPDX-FileCopyrightText: 2020 Carson Black <uhhadd@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #include <QQmlEngine>
0008 
0009 #include "dock_private.h"
0010 #include "toolbar_private.h"
0011 
0012 #include "kije_plugin.h"
0013 
0014 #define PUBLIC_URI "org.kde.kije"
0015 #define PRIVATE_URI "org.kde.kije.private"
0016 
0017 #define URI(x) fromBase(QStringLiteral(x))
0018 
0019 void KijePlugin::registerTypes(const char * uri) {
0020     qmlRegisterType(URI("controls/toolbar/ToolBar.qml"), PUBLIC_URI, 1, 0, "ToolBar");
0021     qmlRegisterType(URI("controls/action/Action.qml"), PUBLIC_URI, 1, 0, "Action");
0022     qmlRegisterType(URI("controls/applicationwindow/ApplicationWindow.qml"), PUBLIC_URI, 1, 0, "ApplicationWindow");
0023     qmlRegisterType(URI("controls/welcome/WelcomeScreen.qml"), PUBLIC_URI, 1, 0, "WelcomeScreen");
0024     qmlRegisterType(URI("controls/welcome/WelcomeSection.qml"), PUBLIC_URI, 1, 0, "WelcomeSection");
0025     qmlRegisterType(URI("controls/welcome/WelcomeItem.qml"), PUBLIC_URI, 1, 0, "WelcomeItem");
0026     qmlRegisterType(URI("controls/dock/DockItem.qml"), PUBLIC_URI, 1, 0, "DockItem");
0027     qmlRegisterType(URI("controls/dock/DockBox.qml"), PUBLIC_URI, 1, 0, "DockBox");
0028     qmlRegisterSingletonType<ToolbarPrivate>(PRIVATE_URI, 1, 0, "ToolbarPrivate", [](QQmlEngine*, QJSEngine*) { return new ToolbarPrivate; });
0029     qmlRegisterSingletonType<DockPrivate>(PRIVATE_URI, 1, 0, "DockPrivate", [](QQmlEngine*, QJSEngine*) { return new DockPrivate; });
0030 }