// SPDX-FileCopyrightText: 2023 Devin Lin // SPDX-License-Identifier: GPL-2.0-or-later #include "halcyonplugin.h" #include "application.h" #include "applicationfolder.h" #include "applicationlistmodel.h" #include "pinnedmodel.h" #include "windowlistener.h" void HalcyonPlugin::registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.private.mobile.homescreen.halcyon")); WindowListener::instance(); // ensure it is created qmlRegisterSingletonType(uri, 1, 0, "ApplicationListModel", [](QQmlEngine *, QJSEngine *) -> QObject * { return ApplicationListModel::self(); }); qmlRegisterSingletonType(uri, 1, 0, "PinnedModel", [](QQmlEngine *, QJSEngine *) -> QObject * { return PinnedModel::self(); }); qmlRegisterType(uri, 1, 0, "Application"); qmlRegisterType(uri, 1, 0, "ApplicationFolder"); }