File indexing completed on 2024-04-28 16:52:25

0001 // SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
0002 // SPDX-License-Identifier: GPL-2.0-or-later
0003 
0004 #include "mobileshellstateplugin.h"
0005 
0006 #include <QQmlContext>
0007 #include <QQuickItem>
0008 
0009 QUrl resolvePath(std::string str)
0010 {
0011     return QUrl("qrc:/org/kde/plasma/private/mobileshell/state/qml/" + QString::fromStdString(str));
0012 }
0013 
0014 void MobileShellStatePlugin::registerTypes(const char *uri)
0015 {
0016     Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.mobileshell.state"));
0017 
0018     // /
0019     qmlRegisterSingletonType(resolvePath("HomeScreenControls.qml"), uri, 1, 0, "HomeScreenControls");
0020     qmlRegisterSingletonType(resolvePath("Shell.qml"), uri, 1, 0, "Shell");
0021     qmlRegisterSingletonType(resolvePath("TopPanelControls.qml"), uri, 1, 0, "TopPanelControls");
0022 }