diff --git a/containments/homescreens/halcyon/CMakeLists.txt b/containments/homescreens/halcyon/CMakeLists.txt index 4a670c78..70d35b52 100644 --- a/containments/homescreens/halcyon/CMakeLists.txt +++ b/containments/homescreens/halcyon/CMakeLists.txt @@ -1,16 +1,35 @@ -# SPDX-FileCopyrightText: 2022-2023 Devin Lin +# SPDX-FileCopyrightText: 2023 Devin Lin # SPDX-License-Identifier: GPL-2.0-or-later -add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.mobile.homescreen.halcyon\") - -set(homescreen_SRCS - homescreen.cpp - halcyonsettings.cpp +plasma_add_applet(org.kde.plasma.mobile.homescreen.halcyon + QML_SOURCES + qml/Clock.qml + qml/FavoritesAppDelegate.qml + qml/FavoritesGrid.qml + qml/FavoritesView.qml + qml/FolderGrid.qml + qml/GridAppDelegate.qml + qml/GridAppList.qml + qml/HomeScreen.qml + qml/main.qml + qml/SearchWidget.qml + CPP_SOURCES + application.cpp + applicationfolder.cpp + applicationlistmodel.cpp + halcyonsettings.cpp + homescreen.cpp + pinnedmodel.cpp + windowlistener.cpp ) -add_library(org.kde.plasma.mobile.homescreen.halcyon MODULE ${homescreen_SRCS}) +ecm_target_qml_sources(org.kde.plasma.mobile.homescreen.halcyon SOURCES + qml/settings/SettingsScreen.qml + qml/settings/SettingsWindow.qml + PATH settings +) -target_link_libraries(org.kde.plasma.mobile.homescreen.halcyon +target_link_libraries(org.kde.plasma.mobile.homescreen.halcyon PRIVATE Qt::Gui Qt::Qml Qt::Quick @@ -19,12 +38,5 @@ target_link_libraries(org.kde.plasma.mobile.homescreen.halcyon KF6::I18n KF6::Service KF6::KIOGui - KF6::Notifications - KF6::WindowSystem -) - -install(TARGETS org.kde.plasma.mobile.homescreen.halcyon DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/applets) - -plasma_install_package(package org.kde.plasma.mobile.homescreen.halcyon) - -add_subdirectory(plugin) + KF6::JobWidgets + KF6::WindowSystem) diff --git a/containments/homescreens/halcyon/plugin/application.cpp b/containments/homescreens/halcyon/application.cpp similarity index 100% rename from containments/homescreens/halcyon/plugin/application.cpp rename to containments/homescreens/halcyon/application.cpp diff --git a/containments/homescreens/halcyon/plugin/application.h b/containments/homescreens/halcyon/application.h similarity index 94% rename from containments/homescreens/halcyon/plugin/application.h rename to containments/homescreens/halcyon/application.h index 1c87ba19..449b1d40 100644 --- a/containments/homescreens/halcyon/plugin/application.h +++ b/containments/homescreens/halcyon/application.h @@ -16,12 +16,16 @@ #include #include +#include + /** * @short Object that represents an application. */ class Application : public QObject { Q_OBJECT + QML_ELEMENT + QML_UNCREATABLE("Managed by ApplicationListModel") Q_PROPERTY(bool running READ running NOTIFY windowChanged) Q_PROPERTY(QString name READ name NOTIFY nameChanged) Q_PROPERTY(QString icon READ icon NOTIFY iconChanged) diff --git a/containments/homescreens/halcyon/plugin/applicationfolder.cpp b/containments/homescreens/halcyon/applicationfolder.cpp similarity index 100% rename from containments/homescreens/halcyon/plugin/applicationfolder.cpp rename to containments/homescreens/halcyon/applicationfolder.cpp diff --git a/containments/homescreens/halcyon/plugin/applicationfolder.h b/containments/homescreens/halcyon/applicationfolder.h similarity index 93% rename from containments/homescreens/halcyon/plugin/applicationfolder.h rename to containments/homescreens/halcyon/applicationfolder.h index d686eb00..882778d7 100644 --- a/containments/homescreens/halcyon/plugin/applicationfolder.h +++ b/containments/homescreens/halcyon/applicationfolder.h @@ -16,6 +16,8 @@ #include #include +#include + /** * @short Object that represents an application folder on the main page. */ @@ -24,6 +26,8 @@ class ApplicationFolderModel; class ApplicationFolder : public QObject { Q_OBJECT + QML_ELEMENT + QML_UNCREATABLE("Managed by ApplicationListModel") Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(QList appPreviews READ appPreviews NOTIFY applicationsChanged) Q_PROPERTY(ApplicationFolderModel *applications READ applications NOTIFY applicationsReset) @@ -67,7 +71,9 @@ class ApplicationFolderModel : public QAbstractListModel Q_OBJECT public: - enum Roles { ApplicationRole = Qt::UserRole + 1 }; + enum Roles { + ApplicationRole = Qt::UserRole + 1 + }; ApplicationFolderModel(ApplicationFolder *folder); int rowCount(const QModelIndex &parent = QModelIndex()) const override; diff --git a/containments/homescreens/halcyon/plugin/applicationlistmodel.cpp b/containments/homescreens/halcyon/applicationlistmodel.cpp similarity index 91% rename from containments/homescreens/halcyon/plugin/applicationlistmodel.cpp rename to containments/homescreens/halcyon/applicationlistmodel.cpp index ca6bf299..77dfa435 100644 --- a/containments/homescreens/halcyon/plugin/applicationlistmodel.cpp +++ b/containments/homescreens/halcyon/applicationlistmodel.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -41,6 +42,15 @@ ApplicationListModel *ApplicationListModel::self() return inst; } +ApplicationListModel *ApplicationListModel::create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) +{ + Q_UNUSED(qmlEngine); + Q_UNUSED(jsEngine); + auto *model = self(); + QQmlEngine::setObjectOwnership(model, QQmlEngine::CppOwnership); + return model; +} + QHash ApplicationListModel::roleNames() const { return {{ApplicationRole, QByteArrayLiteral("application")}}; diff --git a/containments/homescreens/halcyon/plugin/applicationlistmodel.h b/containments/homescreens/halcyon/applicationlistmodel.h similarity index 80% rename from containments/homescreens/halcyon/plugin/applicationlistmodel.h rename to containments/homescreens/halcyon/applicationlistmodel.h index 0bebcfed..2b6ed0d0 100644 --- a/containments/homescreens/halcyon/plugin/applicationlistmodel.h +++ b/containments/homescreens/halcyon/applicationlistmodel.h @@ -13,19 +13,29 @@ #include #include +#include + +class QJSEngine; +class QQmlEngine; + /** * @short The base application list, used directly by the full app list page. */ class ApplicationListModel : public QAbstractListModel { Q_OBJECT + QML_ELEMENT + QML_SINGLETON public: - enum Roles { ApplicationRole = Qt::UserRole + 1 }; + enum Roles { + ApplicationRole = Qt::UserRole + 1 + }; ApplicationListModel(QObject *parent = nullptr); ~ApplicationListModel() override; static ApplicationListModel *self(); + static ApplicationListModel *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine); int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; diff --git a/containments/homescreens/halcyon/halcyonsettings.h b/containments/homescreens/halcyon/halcyonsettings.h index 9863c564..83d66229 100644 --- a/containments/homescreens/halcyon/halcyonsettings.h +++ b/containments/homescreens/halcyon/halcyonsettings.h @@ -7,9 +7,13 @@ #include +#include + class HalcyonSettings : public QObject { Q_OBJECT + QML_ELEMENT + QML_UNCREATABLE("") Q_PROPERTY(HalcyonSettings::WallpaperBlurEffect wallpaperBlurEffect READ wallpaperBlurEffect WRITE setWallpaperBlurEffect NOTIFY wallpaperBlurEffectChanged) Q_PROPERTY(bool doubleTapToLock READ doubleTapToLock WRITE setDoubleTapToLock NOTIFY doubleTapToLockChanged) diff --git a/containments/homescreens/halcyon/homescreen.cpp b/containments/homescreens/halcyon/homescreen.cpp index 13facc77..598766f0 100644 --- a/containments/homescreens/halcyon/homescreen.cpp +++ b/containments/homescreens/halcyon/homescreen.cpp @@ -9,9 +9,12 @@ #include #include +K_PLUGIN_CLASS_WITH_JSON(HomeScreen, "metadata.json") + HomeScreen::HomeScreen(QObject *parent, const KPluginMetaData &data, const QVariantList &args) : Plasma::Containment{parent, data, args} , m_settings{new HalcyonSettings{this, config()}} + , m_pinnedModel{new PinnedModel{this}} { setHasConfigurationInterface(true); } @@ -23,6 +26,9 @@ HalcyonSettings *HomeScreen::settings() const return m_settings; } -K_PLUGIN_CLASS(HomeScreen) +PinnedModel *HomeScreen::pinnedModel() const +{ + return m_pinnedModel; +} #include "homescreen.moc" diff --git a/containments/homescreens/halcyon/homescreen.h b/containments/homescreens/halcyon/homescreen.h index 38a14667..7afc7144 100644 --- a/containments/homescreens/halcyon/homescreen.h +++ b/containments/homescreens/halcyon/homescreen.h @@ -6,21 +6,25 @@ #include #include "halcyonsettings.h" +#include "pinnedmodel.h" class HomeScreen : public Plasma::Containment { Q_OBJECT Q_PROPERTY(HalcyonSettings *settings READ settings CONSTANT) + Q_PROPERTY(PinnedModel *pinnedModel READ pinnedModel CONSTANT) public: HomeScreen(QObject *parent, const KPluginMetaData &data, const QVariantList &args); ~HomeScreen() override; HalcyonSettings *settings() const; + PinnedModel *pinnedModel() const; Q_SIGNALS: void showingDesktopChanged(bool showingDesktop); private: HalcyonSettings *m_settings{nullptr}; + PinnedModel *m_pinnedModel{nullptr}; }; diff --git a/containments/homescreens/halcyon/package/metadata.json b/containments/homescreens/halcyon/metadata.json similarity index 98% rename from containments/homescreens/halcyon/package/metadata.json rename to containments/homescreens/halcyon/metadata.json index 5944a4c0..d78615c7 100644 --- a/containments/homescreens/halcyon/package/metadata.json +++ b/containments/homescreens/halcyon/metadata.json @@ -1,5 +1,4 @@ { - "KPackageStructure": "Plasma/Applet", "KPlugin": { "Authors": [ { @@ -83,7 +82,6 @@ "Description[x-test]": "xxA mobile homescreen focused on simplicity and ease-of-use.xx", "Description[zh_CN]": "简约易用的手机主屏幕方案。", "Description[zh_TW]": "著重於簡潔與易用性的手機主畫面。", - "Id": "org.kde.plasma.mobile.homescreen.halcyon", "License": "GPLv2+", "Name": "Halcyon", "Name[ar]": "قيون", diff --git a/containments/homescreens/halcyon/plugin/pinnedmodel.cpp b/containments/homescreens/halcyon/pinnedmodel.cpp similarity index 96% rename from containments/homescreens/halcyon/plugin/pinnedmodel.cpp rename to containments/homescreens/halcyon/pinnedmodel.cpp index 6e0f29ad..f3be7bf9 100644 --- a/containments/homescreens/halcyon/plugin/pinnedmodel.cpp +++ b/containments/homescreens/halcyon/pinnedmodel.cpp @@ -8,19 +8,15 @@ #include -PinnedModel::PinnedModel(QObject *parent) +PinnedModel::PinnedModel(Plasma::Applet *parent) : QAbstractListModel{parent} + , m_applet{parent} { + load(); } PinnedModel::~PinnedModel() = default; -PinnedModel *PinnedModel::self() -{ - static PinnedModel *inst = new PinnedModel(); - return inst; -} - int PinnedModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent) @@ -249,10 +245,3 @@ Plasma::Applet *PinnedModel::applet() { return m_applet; } - -void PinnedModel::setApplet(Plasma::Applet *applet) -{ - m_applet = applet; - Q_EMIT appletChanged(); - load(); -} diff --git a/containments/homescreens/halcyon/plugin/pinnedmodel.h b/containments/homescreens/halcyon/pinnedmodel.h similarity index 84% rename from containments/homescreens/halcyon/plugin/pinnedmodel.h rename to containments/homescreens/halcyon/pinnedmodel.h index d6678f33..87d1d148 100644 --- a/containments/homescreens/halcyon/plugin/pinnedmodel.h +++ b/containments/homescreens/halcyon/pinnedmodel.h @@ -19,20 +19,26 @@ #include #include +#include + /** * @short The applications and folders model on the main page. */ class PinnedModel : public QAbstractListModel { Q_OBJECT - Q_PROPERTY(Plasma::Applet *applet READ applet WRITE setApplet NOTIFY appletChanged) + QML_ELEMENT + QML_UNCREATABLE("") public: - enum Roles { IsFolderRole = Qt::UserRole + 1, ApplicationRole, FolderRole }; + enum Roles { + IsFolderRole = Qt::UserRole + 1, + ApplicationRole, + FolderRole + }; - PinnedModel(QObject *parent = nullptr); + PinnedModel(Plasma::Applet *parent = nullptr); ~PinnedModel() override; - static PinnedModel *self(); int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; @@ -54,9 +60,6 @@ public: public Q_SLOTS: void addAppFromFolder(const QString &storageId); -Q_SIGNALS: - void appletChanged(); - private: void load(); diff --git a/containments/homescreens/halcyon/plugin/CMakeLists.txt b/containments/homescreens/halcyon/plugin/CMakeLists.txt deleted file mode 100644 index af9498a6..00000000 --- a/containments/homescreens/halcyon/plugin/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Devin Lin -# SPDX-License-Identifier: GPL-2.0-or-later - -set(halcyonplugin_SRCS - halcyonplugin.cpp - application.cpp - applicationfolder.cpp - applicationlistmodel.cpp - pinnedmodel.cpp - windowlistener.cpp -) - -install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/private/mobile/homescreen/halcyon) - -add_library(halcyonplugin SHARED ${halcyonplugin_SRCS}) - -target_link_libraries(halcyonplugin - Qt::Gui - Qt::Qml - Qt::Quick - Plasma::Plasma - KF6::I18n - KF6::Service - KF6::KIOGui - KF6::JobWidgets - Plasma::KWaylandClient - KF6::WindowSystem) - -set_property(TARGET halcyonplugin PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/org/kde/private/mobile/homescreen/halcyon) -install(TARGETS halcyonplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/private/mobile/homescreen/halcyon) diff --git a/containments/homescreens/halcyon/plugin/halcyonplugin.cpp b/containments/homescreens/halcyon/plugin/halcyonplugin.cpp deleted file mode 100644 index 85402309..00000000 --- a/containments/homescreens/halcyon/plugin/halcyonplugin.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// 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"); -} diff --git a/containments/homescreens/halcyon/plugin/halcyonplugin.h b/containments/homescreens/halcyon/plugin/halcyonplugin.h deleted file mode 100644 index eae08dc1..00000000 --- a/containments/homescreens/halcyon/plugin/halcyonplugin.h +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Devin Lin -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include - -class HalcyonPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - void registerTypes(const char *uri) override; -}; diff --git a/containments/homescreens/halcyon/plugin/qmldir b/containments/homescreens/halcyon/plugin/qmldir deleted file mode 100644 index 87e99314..00000000 --- a/containments/homescreens/halcyon/plugin/qmldir +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Devin Lin -# SPDX-License-Identifier: GPL-2.0-or-later - -module org.kde.private.mobile.homescreen.halcyon -plugin halcyonplugin diff --git a/containments/homescreens/halcyon/package/contents/ui/Clock.qml b/containments/homescreens/halcyon/qml/Clock.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/Clock.qml rename to containments/homescreens/halcyon/qml/Clock.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml b/containments/homescreens/halcyon/qml/FavoritesAppDelegate.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml rename to containments/homescreens/halcyon/qml/FavoritesAppDelegate.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml b/containments/homescreens/halcyon/qml/FavoritesGrid.qml similarity index 95% rename from containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml rename to containments/homescreens/halcyon/qml/FavoritesGrid.qml index e49acabd..28e401f4 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml +++ b/containments/homescreens/halcyon/qml/FavoritesGrid.qml @@ -8,10 +8,11 @@ import QtQml.Models import org.kde.plasma.components 3.0 as PC3 import org.kde.draganddrop as DragDrop +import org.kde.plasma.plasmoid import org.kde.kirigami as Kirigami import org.kde.plasma.private.mobileshell as MobileShell -import org.kde.private.mobile.homescreen.halcyon as Halcyon +import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon MobileShell.GridView { id: root @@ -74,7 +75,7 @@ MobileShell.GridView { Keys.onReturnPressed: currentItem.appDelegate.launch() model: DelegateModel { id: visualModel - model: Halcyon.PinnedModel + model: Plasmoid.pinnedModel delegate: Item { id: delegateRoot @@ -87,7 +88,7 @@ MobileShell.GridView { function moveDragToCurrentPos(from, to) { if (from !== to) { visualModel.items.move(from, to); - Halcyon.PinnedModel.moveEntry(from, to); + Plasmoid.pinnedModel.moveEntry(from, to); } } @@ -189,9 +190,9 @@ MobileShell.GridView { onDropped: (drop) => { if (transitionAnim.running || appDelegate.drag.active || drag.source.isFolder) return; // don't do anything when reordering if (appDelegate.isFolder) { - Halcyon.PinnedModel.addAppToFolder(drop.source.visualIndex, appDelegate.visualIndex); + Plasmoid.pinnedModel.addAppToFolder(drop.source.visualIndex, appDelegate.visualIndex); } else { - Halcyon.PinnedModel.createFolderFromApps(drop.source.visualIndex, appDelegate.visualIndex); + Plasmoid.pinnedModel.createFolderFromApps(drop.source.visualIndex, appDelegate.visualIndex); } folderAnim.to = 0; folderAnim.restart(); @@ -221,7 +222,7 @@ MobileShell.GridView { Kirigami.Action { icon.name: "emblem-favorite" text: i18n("Remove from favourites") - onTriggered: Halcyon.PinnedModel.removeEntry(model.index) + onTriggered: Plasmoid.pinnedModel.removeEntry(model.index) } ] diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesView.qml b/containments/homescreens/halcyon/qml/FavoritesView.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/FavoritesView.qml rename to containments/homescreens/halcyon/qml/FavoritesView.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml b/containments/homescreens/halcyon/qml/FolderGrid.qml similarity index 98% rename from containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml rename to containments/homescreens/halcyon/qml/FolderGrid.qml index 6309d808..4003d141 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FolderGrid.qml +++ b/containments/homescreens/halcyon/qml/FolderGrid.qml @@ -12,7 +12,7 @@ import org.kde.draganddrop as DragDrop import org.kde.kirigami as Kirigami import org.kde.plasma.private.mobileshell as MobileShell -import org.kde.private.mobile.homescreen.halcyon as Halcyon +import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon MobileShell.GridView { id: root diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml b/containments/homescreens/halcyon/qml/GridAppDelegate.qml similarity index 97% rename from containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml rename to containments/homescreens/halcyon/qml/GridAppDelegate.qml index 8721658d..ceefbe36 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml +++ b/containments/homescreens/halcyon/qml/GridAppDelegate.qml @@ -12,10 +12,11 @@ import QtQuick.Controls as Controls import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.kquickcontrolsaddons +import org.kde.plasma.plasmoid import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings -import org.kde.private.mobile.homescreen.halcyon as Halcyon +import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon import org.kde.kirigami as Kirigami @@ -63,7 +64,7 @@ MouseArea { icon.name: "emblem-favorite" text: i18n("Add to favourites") onClicked: { - Halcyon.PinnedModel.addApp(application.storageId, 0); + Plasmoid.pinnedModel.addApp(application.storageId, 0); } } onClosed: dialogLoader.active = false diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml b/containments/homescreens/halcyon/qml/GridAppList.qml similarity index 97% rename from containments/homescreens/halcyon/package/contents/ui/GridAppList.qml rename to containments/homescreens/halcyon/qml/GridAppList.qml index 14498c3a..25e6a9f9 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml +++ b/containments/homescreens/halcyon/qml/GridAppList.qml @@ -12,7 +12,7 @@ import org.kde.kirigami 2.10 as Kirigami import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell.state as MobileShellState -import org.kde.private.mobile.homescreen.halcyon 1.0 as Halcyon +import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon import org.kde.plasma.plasmoid MobileShell.GridView { diff --git a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml b/containments/homescreens/halcyon/qml/HomeScreen.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml rename to containments/homescreens/halcyon/qml/HomeScreen.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/SearchWidget.qml b/containments/homescreens/halcyon/qml/SearchWidget.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/SearchWidget.qml rename to containments/homescreens/halcyon/qml/SearchWidget.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/main.qml b/containments/homescreens/halcyon/qml/main.qml similarity index 98% rename from containments/homescreens/halcyon/package/contents/ui/main.qml rename to containments/homescreens/halcyon/qml/main.qml index e3c025a0..d300c771 100644 --- a/containments/homescreens/halcyon/package/contents/ui/main.qml +++ b/containments/homescreens/halcyon/qml/main.qml @@ -11,15 +11,15 @@ import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell.state as MobileShellState -import org.kde.private.mobile.homescreen.halcyon as Halcyon import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin +import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon + ContainmentItem { id: root Component.onCompleted: { Halcyon.ApplicationListModel.loadApplications(); - Halcyon.PinnedModel.applet = root.plasmoid; forceActiveFocus(); } diff --git a/containments/homescreens/halcyon/package/contents/ui/settings/SettingsScreen.qml b/containments/homescreens/halcyon/qml/settings/SettingsScreen.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/settings/SettingsScreen.qml rename to containments/homescreens/halcyon/qml/settings/SettingsScreen.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/settings/SettingsWindow.qml b/containments/homescreens/halcyon/qml/settings/SettingsWindow.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/settings/SettingsWindow.qml rename to containments/homescreens/halcyon/qml/settings/SettingsWindow.qml diff --git a/containments/homescreens/halcyon/plugin/windowlistener.cpp b/containments/homescreens/halcyon/windowlistener.cpp similarity index 100% rename from containments/homescreens/halcyon/plugin/windowlistener.cpp rename to containments/homescreens/halcyon/windowlistener.cpp diff --git a/containments/homescreens/halcyon/plugin/windowlistener.h b/containments/homescreens/halcyon/windowlistener.h similarity index 100% rename from containments/homescreens/halcyon/plugin/windowlistener.h rename to containments/homescreens/halcyon/windowlistener.h