shift-shell/containments/homescreens/folio/plugin/folioplugin.cpp

18 lines
689 B
C++

// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "folioplugin.h"
#include "applicationlistmodel.h"
#include "desktopmodel.h"
void HalcyonPlugin::registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.private.plasma.mobile.homescreen.halcyon"));
ApplicationListModel *applicationListModel = new ApplicationListModel{this};
qmlRegisterSingletonType<ApplicationListModel>(uri, 1, 0, "ApplicationListModel", [applicationListModel](QQmlEngine *, QJSEngine *) -> QObject * {
return applicationListModel;
});
qmlRegisterType<DesktopModel>(uri, 1, 0, "DesktopModel");
}