From cf7e48e65cd0d3b0170328c44486903d796fdf7c Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sun, 13 Mar 2022 16:27:14 -0400 Subject: [PATCH] components/mobileshell: Move to libmobileshell library --- CMakeLists.txt | 4 ++ README.md | 5 +- components/CMakeLists.txt | 1 - components/mobileshell/CMakeLists.txt | 56 ---------------- libmobileshell/CMakeLists.txt | 65 +++++++++++++++++++ libmobileshell/LibMobileShellConfig.cmake.in | 8 +++ libmobileshell/autotests/CMakeLists.txt | 1 + .../dbus/org.kde.KScreen.xml | 0 .../dbus/org.kde.KWin.ScreenShot2.xml | 0 .../dbus/org.kde.KWin.Screenshot.xml | 0 libmobileshell/declarative/CMakeLists.txt | 46 +++++++++++++ .../declarative}/mobileshellplugin.cpp | 16 +++-- .../declarative}/mobileshellplugin.h | 0 .../notifications/notificationfilemenu.cpp | 0 .../notifications/notificationfilemenu.h | 0 .../notifications/notificationthumbnailer.cpp | 0 .../notifications/notificationthumbnailer.h | 0 .../declarative}/qml/HomeScreenControls.qml | 0 .../declarative}/qml/Shell.qml | 0 .../declarative}/qml/TaskPanelControls.qml | 0 .../declarative}/qml/TopPanelControls.qml | 0 .../qml/actiondrawer/ActionDrawer.qml | 0 .../actiondrawer/ActionDrawerOpenSurface.qml | 0 .../LandscapeContentContainer.qml | 0 .../actiondrawer/PortraitContentContainer.qml | 0 .../quicksettings/BrightnessItem.qml | 0 .../qml/actiondrawer/quicksettings/Handle.qml | 0 .../quicksettings/QuickSettings.qml | 0 .../quicksettings/QuickSettingsDelegate.qml | 0 .../quicksettings/QuickSettingsDrawer.qml | 0 .../QuickSettingsFullDelegate.qml | 0 .../QuickSettingsMinimizedDelegate.qml | 0 .../quicksettings/QuickSettingsPanel.qml | 0 .../quicksettings/SettingsModel.qml | 0 .../declarative}/qml/components/BaseItem.qml | 0 .../declarative}/qml/components/Direction.qml | 0 .../qml/components/StartupFeedback.qml | 0 .../qml/components/VelocityCalculator.qml | 0 .../declarative}/qml/components/util.js | 0 .../qml/dataproviders/BatteryProvider.qml | 0 .../qml/dataproviders/BluetoothProvider.qml | 0 .../dataproviders/SignalStrengthProvider.qml | 0 .../qml/dataproviders/VolumeProvider.qml | 0 .../qml/dataproviders/WifiProvider.qml | 0 .../navigationpanel/NavigationGestureArea.qml | 0 .../qml/navigationpanel/NavigationPanel.qml | 0 .../navigationpanel/NavigationPanelAction.qml | 0 .../navigationpanel/NavigationPanelButton.qml | 0 .../qml/osd/volume/AudioApplet.qml | 0 .../qml/osd/volume/DeviceListItem.qml | 0 .../qml/osd/volume/ListItemBase.qml | 0 .../declarative}/qml/osd/volume/PopupCard.qml | 0 .../qml/osd/volume/StreamListItem.qml | 0 .../declarative}/qml/osd/volume/VolumeOSD.qml | 0 .../declarative}/qml/osd/volume/icon.js | 0 .../declarative}/qml/statusbar/ClockText.qml | 0 .../declarative}/qml/statusbar/StatusBar.qml | 0 .../declarative}/qml/statusbar/TaskWidget.qml | 0 .../statusbar/indicators/BatteryIndicator.qml | 0 .../indicators/BluetoothIndicator.qml | 0 .../indicators/SignalStrengthIndicator.qml | 0 .../statusbar/indicators/VolumeIndicator.qml | 0 .../statusbar/indicators/WifiIndicator.qml | 0 .../qml/taskswitcher/FlickContainer.qml | 0 .../declarative}/qml/taskswitcher/Task.qml | 0 .../qml/taskswitcher/TaskIcon.qml | 0 .../qml/taskswitcher/TaskList.qml | 0 .../qml/taskswitcher/TaskSwitcher.qml | 0 .../qml/taskswitcher/TaskSwitcherState.qml | 0 .../qml/taskswitcher/Thumbnail.qml | 0 .../qml/widgets/krunner/KRunnerWidget.qml | 0 .../mediacontrols/BlurredBackground.qml | 0 .../mediacontrols/MediaControlsSource.qml | 0 .../mediacontrols/MediaControlsWidget.qml | 0 .../notifications/BaseNotificationItem.qml | 0 .../notifications/NotificationBodyLabel.qml | 0 .../notifications/NotificationCard.qml | 0 .../NotificationFooterActions.qml | 0 .../notifications/NotificationGroupHeader.qml | 0 .../notifications/NotificationItem.qml | 0 .../notifications/NotificationReplyField.qml | 0 .../notifications/NotificationTimeText.qml | 0 .../notifications/NotificationsModelType.qml | 0 .../notifications/NotificationsWidget.qml | 0 .../widgets/notifications/ThumbnailStrip.qml | 0 .../qml/widgets/notifications/util.js | 0 .../qml => libmobileshell/declarative}/qmldir | 0 .../declarative}/resources.qrc | 0 .../displaysmodel.cpp | 2 + .../displaysmodel.h | 9 ++- .../kwinvirtualkeyboardinterface.cpp | 4 +- .../kwinvirtualkeyboardinterface.h | 9 ++- .../mobileshellsettings.cpp | 2 + .../mobileshellsettings.h | 9 ++- .../quicksetting.cpp | 2 + .../quicksetting.h | 9 ++- .../quicksettingsmodel.cpp | 2 + .../quicksettingsmodel.h | 12 ++-- .../shellutil.cpp | 2 + .../shellutil.h | 9 ++- 100 files changed, 197 insertions(+), 76 deletions(-) delete mode 100644 components/mobileshell/CMakeLists.txt create mode 100644 libmobileshell/CMakeLists.txt create mode 100644 libmobileshell/LibMobileShellConfig.cmake.in create mode 100644 libmobileshell/autotests/CMakeLists.txt rename {components/mobileshell => libmobileshell}/dbus/org.kde.KScreen.xml (100%) rename {components/mobileshell => libmobileshell}/dbus/org.kde.KWin.ScreenShot2.xml (100%) rename {components/mobileshell => libmobileshell}/dbus/org.kde.KWin.Screenshot.xml (100%) create mode 100644 libmobileshell/declarative/CMakeLists.txt rename {components/mobileshell => libmobileshell/declarative}/mobileshellplugin.cpp (93%) rename {components/mobileshell => libmobileshell/declarative}/mobileshellplugin.h (100%) rename {components/mobileshell => libmobileshell/declarative}/notifications/notificationfilemenu.cpp (100%) rename {components/mobileshell => libmobileshell/declarative}/notifications/notificationfilemenu.h (100%) rename {components/mobileshell => libmobileshell/declarative}/notifications/notificationthumbnailer.cpp (100%) rename {components/mobileshell => libmobileshell/declarative}/notifications/notificationthumbnailer.h (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/HomeScreenControls.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/Shell.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/TaskPanelControls.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/TopPanelControls.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/ActionDrawer.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/ActionDrawerOpenSurface.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/LandscapeContentContainer.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/PortraitContentContainer.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/BrightnessItem.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/Handle.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/QuickSettings.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/actiondrawer/quicksettings/SettingsModel.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/components/BaseItem.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/components/Direction.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/components/StartupFeedback.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/components/VelocityCalculator.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/components/util.js (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/dataproviders/BatteryProvider.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/dataproviders/BluetoothProvider.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/dataproviders/SignalStrengthProvider.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/dataproviders/VolumeProvider.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/dataproviders/WifiProvider.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/navigationpanel/NavigationGestureArea.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/navigationpanel/NavigationPanel.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/navigationpanel/NavigationPanelAction.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/navigationpanel/NavigationPanelButton.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/AudioApplet.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/DeviceListItem.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/ListItemBase.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/PopupCard.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/StreamListItem.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/VolumeOSD.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/osd/volume/icon.js (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/ClockText.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/StatusBar.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/TaskWidget.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/indicators/BatteryIndicator.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/indicators/BluetoothIndicator.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/indicators/SignalStrengthIndicator.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/indicators/VolumeIndicator.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/statusbar/indicators/WifiIndicator.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/FlickContainer.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/Task.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/TaskIcon.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/TaskList.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/TaskSwitcher.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/TaskSwitcherState.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/taskswitcher/Thumbnail.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/krunner/KRunnerWidget.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/mediacontrols/BlurredBackground.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/mediacontrols/MediaControlsSource.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/mediacontrols/MediaControlsWidget.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/BaseNotificationItem.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationBodyLabel.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationCard.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationFooterActions.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationGroupHeader.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationItem.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationReplyField.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationTimeText.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationsModelType.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/NotificationsWidget.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/ThumbnailStrip.qml (100%) rename {components/mobileshell => libmobileshell/declarative}/qml/widgets/notifications/util.js (100%) rename {components/mobileshell/qml => libmobileshell/declarative}/qmldir (100%) rename {components/mobileshell => libmobileshell/declarative}/resources.qrc (100%) rename {components/mobileshell => libmobileshell}/displaysmodel.cpp (98%) rename {components/mobileshell => libmobileshell}/displaysmodel.h (88%) rename components/mobileshell/vkbdinterface.cpp => libmobileshell/kwinvirtualkeyboardinterface.cpp (81%) rename components/mobileshell/vkbdinterface.h => libmobileshell/kwinvirtualkeyboardinterface.h (73%) rename {components/mobileshell => libmobileshell}/mobileshellsettings.cpp (97%) rename {components/mobileshell => libmobileshell}/mobileshellsettings.h (81%) rename {components/mobileshell/quicksettings => libmobileshell}/quicksetting.cpp (97%) rename {components/mobileshell/quicksettings => libmobileshell}/quicksetting.h (93%) rename {components/mobileshell/quicksettings => libmobileshell}/quicksettingsmodel.cpp (98%) rename {components/mobileshell/quicksettings => libmobileshell}/quicksettingsmodel.h (83%) rename {components/mobileshell => libmobileshell}/shellutil.cpp (99%) rename {components/mobileshell => libmobileshell}/shellutil.h (91%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e60f8b8..89abd553 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,14 @@ # SPDX-FileCopyrightText: 2014-2020 Marco Martin # SPDX-FileCopyrightText: 2017-2021 Bhushan Shah # SPDX-FileCopyrightText: 2019-2021 Nicolas Fella +# SPDX-FileCopyrightText: 2022 Devin Lin # SPDX-License-Identifier: GPL-2.0-or-later cmake_minimum_required(VERSION 3.16) project(plasma-mobile) +set(PROJECT_VERSION "5.24.80") +set(PROJECT_VERSION_MAJOR 5) set(QT_MIN_VERSION "5.15.0") set(KF5_MIN_VERSION "5.90") @@ -81,6 +84,7 @@ add_subdirectory(containments) add_subdirectory(components) add_subdirectory(quicksettings) add_subdirectory(kcms) +add_subdirectory(libmobileshell) find_program(PlasmaOpenSettings plasma-open-settings) set_package_properties(PlasmaOpenSettings PROPERTIES diff --git a/README.md b/README.md index 8a5eee24..7e3e94a1 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,10 @@ This repository contains shell components for Plasma Mobile. * Development channel: https://matrix.to/#/#plasmamobile:matrix.org ### Locations -* [applets](applets) - plasmoids -* [components/mobileshell](components/mobileshell) - shell component library +* [libmobileshell](libmobileshell) - shell component library * [containments](containments) - shell panels (homescreen, status bar, task panel) +* [homescreens](homescreens) - homescreen packages +* [kcms]() - settings modules * [look-and-feel](look-and-feel/contents) - Plasma look-and-feel packages (ex. lockscreen, logout, etc.) * [quicksettings](quicksettings) - quick settings packages for the action drawer diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 1668a18c..24b140ed 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -4,4 +4,3 @@ add_subdirectory(mmplugin) add_subdirectory(mobilehomescreencomponents) -add_subdirectory(mobileshell) diff --git a/components/mobileshell/CMakeLists.txt b/components/mobileshell/CMakeLists.txt deleted file mode 100644 index 350b256a..00000000 --- a/components/mobileshell/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Devin Lin -# SPDX-License-Identifier: GPL-2.0-or-later - -qt_add_dbus_interfaces(DBUS_SRCS dbus/org.kde.KWin.ScreenShot2.xml - dbus/org.kde.KScreen.xml - ${KWIN_VIRTUALKEYBOARD_INTERFACE}) - -set(mobileshellplugin_SRCS - mobileshellplugin.cpp - shellutil.cpp - mobileshellsettings.cpp - vkbdinterface.cpp - displaysmodel.cpp - - quicksettings/quicksetting.cpp - quicksettings/quicksettingsmodel.cpp - - notifications/notificationthumbnailer.cpp - notifications/notificationfilemenu.cpp - - ${DBUS_SRCS} -) - -if(QUICK_COMPILER) - qtquick_compiler_add_resources(RESOURCES resources.qrc) -else() - qt5_add_resources(RESOURCES resources.qrc) -endif() - -add_library(mobileshellplugin ${mobileshellplugin_SRCS} ${RESOURCES}) - -target_link_libraries(mobileshellplugin - PUBLIC - Qt::Core - PRIVATE - Qt::DBus - Qt::Qml - Qt::Gui - Qt::Quick - KF5::ConfigWidgets # for KStandardAction - KF5::KIOGui - KF5::Plasma - KF5::I18n - KF5::Notifications - KF5::PlasmaQuick - KF5::KIOGui - KF5::KIOWidgets # for PreviewJob - KF5::WaylandClient - KF5::Service - ) - -# we compiled the qml files, just install qmldir -install(FILES qml/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) - -ecm_generate_qmltypes(org.kde.plasma.private.mobileshell 1.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) -install(TARGETS mobileshellplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) diff --git a/libmobileshell/CMakeLists.txt b/libmobileshell/CMakeLists.txt new file mode 100644 index 00000000..7cf07260 --- /dev/null +++ b/libmobileshell/CMakeLists.txt @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: 2022 Devin Lin +# SPDX-License-Identifier: GPL-2.0-or-later + +add_subdirectory(declarative) + +if (BUILD_TESTING) + add_subdirectory(autotests) +endif() + +qt_add_dbus_interfaces(DBUS_SRCS dbus/org.kde.KWin.ScreenShot2.xml + dbus/org.kde.KScreen.xml + ${KWIN_VIRTUALKEYBOARD_INTERFACE}) + +set(mobileshell_LIB_SRCS + displaysmodel.cpp + mobileshellsettings.cpp + quicksetting.cpp + quicksettingsmodel.cpp + shellutil.cpp + kwinvirtualkeyboardinterface.cpp + + ${DBUS_SRCS} +) + +add_library(mobileshell ${mobileshell_LIB_SRCS}) +add_library(PM::LibMobileShell ALIAS mobileshell) + +generate_export_header(mobileshell) + +target_include_directories(mobileshell PUBLIC "$" "$") +target_link_libraries(mobileshell + PUBLIC + Qt::Core + PRIVATE + Qt::DBus + Qt::Qml + Qt::Gui + Qt::Quick + KF5::ConfigWidgets # for KStandardAction + KF5::KIOGui + KF5::Plasma + KF5::I18n + KF5::Notifications + KF5::PlasmaQuick + KF5::KIOGui + KF5::KIOWidgets # for PreviewJob + KF5::WaylandClient + KF5::Service +) + +set_target_properties(mobileshell PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION 1 + EXPORT_NAME LibMobileShell) + +install(FILES + displaysmodel.h + kwinvirtualkeyboardinterface.h + mobileshellsettings.h + quicksetting.h + quicksettingsmodel.h + shellutil.h + ${CMAKE_CURRENT_BINARY_DIR}/mobileshell_export.h + DESTINATION ${KDE_INSTALL_INCLUDEDIR}/mobileshell COMPONENT Devel +) diff --git a/libmobileshell/LibMobileShellConfig.cmake.in b/libmobileshell/LibMobileShellConfig.cmake.in new file mode 100644 index 00000000..a9794537 --- /dev/null +++ b/libmobileshell/LibMobileShellConfig.cmake.in @@ -0,0 +1,8 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +find_dependency(Qt5Core "@QT_MIN_VERSION@") +find_dependency(Qt5Gui "@QT_MIN_VERSION@") +find_dependency(Qt5Quick "@QT_MIN_VERSION@") + +include("${CMAKE_CURRENT_LIST_DIR}/LibMobileShellLibraryTargets.cmake") diff --git a/libmobileshell/autotests/CMakeLists.txt b/libmobileshell/autotests/CMakeLists.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/libmobileshell/autotests/CMakeLists.txt @@ -0,0 +1 @@ + diff --git a/components/mobileshell/dbus/org.kde.KScreen.xml b/libmobileshell/dbus/org.kde.KScreen.xml similarity index 100% rename from components/mobileshell/dbus/org.kde.KScreen.xml rename to libmobileshell/dbus/org.kde.KScreen.xml diff --git a/components/mobileshell/dbus/org.kde.KWin.ScreenShot2.xml b/libmobileshell/dbus/org.kde.KWin.ScreenShot2.xml similarity index 100% rename from components/mobileshell/dbus/org.kde.KWin.ScreenShot2.xml rename to libmobileshell/dbus/org.kde.KWin.ScreenShot2.xml diff --git a/components/mobileshell/dbus/org.kde.KWin.Screenshot.xml b/libmobileshell/dbus/org.kde.KWin.Screenshot.xml similarity index 100% rename from components/mobileshell/dbus/org.kde.KWin.Screenshot.xml rename to libmobileshell/dbus/org.kde.KWin.Screenshot.xml diff --git a/libmobileshell/declarative/CMakeLists.txt b/libmobileshell/declarative/CMakeLists.txt new file mode 100644 index 00000000..a690c4b3 --- /dev/null +++ b/libmobileshell/declarative/CMakeLists.txt @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: 2021 Devin Lin +# SPDX-License-Identifier: GPL-2.0-or-later + +include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) + +set(mobileshellplugin_SRCS + mobileshellplugin.cpp + notifications/notificationthumbnailer.cpp + notifications/notificationfilemenu.cpp +) + +if(QUICK_COMPILER) + qtquick_compiler_add_resources(RESOURCES resources.qrc) +else() + qt5_add_resources(RESOURCES resources.qrc) +endif() + +add_library(mobileshellplugin SHARED ${mobileshellplugin_SRCS} ${RESOURCES}) + +target_link_libraries(mobileshellplugin + PUBLIC + Qt::Core + mobileshell + PRIVATE + Qt::DBus + Qt::Qml + Qt::Gui + Qt::Quick + KF5::ConfigWidgets # for KStandardAction + KF5::KIOGui + KF5::Plasma + KF5::I18n + KF5::Notifications + KF5::PlasmaQuick + KF5::KIOGui + KF5::KIOWidgets # for PreviewJob + KF5::WaylandClient + KF5::Service +) + +# we compiled the qml files, just install qmldir +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) + +ecm_generate_qmltypes(org.kde.plasma.private.mobileshell 1.0 DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) +install(TARGETS mobileshellplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) diff --git a/components/mobileshell/mobileshellplugin.cpp b/libmobileshell/declarative/mobileshellplugin.cpp similarity index 93% rename from components/mobileshell/mobileshellplugin.cpp rename to libmobileshell/declarative/mobileshellplugin.cpp index f336dbf4..02a9305e 100644 --- a/components/mobileshell/mobileshellplugin.cpp +++ b/libmobileshell/declarative/mobileshellplugin.cpp @@ -9,15 +9,17 @@ #include #include -#include "displaysmodel.h" -#include "mobileshellsettings.h" #include "notifications/notificationfilemenu.h" #include "notifications/notificationthumbnailer.h" -#include "quicksettings/quicksetting.h" -#include "quicksettings/quicksettingsmodel.h" + +#include "displaysmodel.h" +#include "kwinvirtualkeyboardinterface.h" +#include "mobileshellsettings.h" +#include "quicksetting.h" +#include "quicksettingsmodel.h" #include "shellutil.h" -#include "virtualkeyboardinterface.h" -#include "vkbdinterface.h" + +using namespace MobileShell; QUrl resolvePath(std::string str) { @@ -40,7 +42,7 @@ void MobileShellPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 1, 0, "QuickSettingsModel"); qmlRegisterType(uri, 1, 0, "DisplaysModel"); - qmlRegisterSingletonType(uri, 1, 0, "KWinVirtualKeyboard", [](QQmlEngine *, QJSEngine *) -> QObject * { + qmlRegisterSingletonType(uri, 1, 0, "KWinVirtualKeyboard", [](QQmlEngine *, QJSEngine *) -> QObject * { return new KwinVirtualKeyboardInterface; }); diff --git a/components/mobileshell/mobileshellplugin.h b/libmobileshell/declarative/mobileshellplugin.h similarity index 100% rename from components/mobileshell/mobileshellplugin.h rename to libmobileshell/declarative/mobileshellplugin.h diff --git a/components/mobileshell/notifications/notificationfilemenu.cpp b/libmobileshell/declarative/notifications/notificationfilemenu.cpp similarity index 100% rename from components/mobileshell/notifications/notificationfilemenu.cpp rename to libmobileshell/declarative/notifications/notificationfilemenu.cpp diff --git a/components/mobileshell/notifications/notificationfilemenu.h b/libmobileshell/declarative/notifications/notificationfilemenu.h similarity index 100% rename from components/mobileshell/notifications/notificationfilemenu.h rename to libmobileshell/declarative/notifications/notificationfilemenu.h diff --git a/components/mobileshell/notifications/notificationthumbnailer.cpp b/libmobileshell/declarative/notifications/notificationthumbnailer.cpp similarity index 100% rename from components/mobileshell/notifications/notificationthumbnailer.cpp rename to libmobileshell/declarative/notifications/notificationthumbnailer.cpp diff --git a/components/mobileshell/notifications/notificationthumbnailer.h b/libmobileshell/declarative/notifications/notificationthumbnailer.h similarity index 100% rename from components/mobileshell/notifications/notificationthumbnailer.h rename to libmobileshell/declarative/notifications/notificationthumbnailer.h diff --git a/components/mobileshell/qml/HomeScreenControls.qml b/libmobileshell/declarative/qml/HomeScreenControls.qml similarity index 100% rename from components/mobileshell/qml/HomeScreenControls.qml rename to libmobileshell/declarative/qml/HomeScreenControls.qml diff --git a/components/mobileshell/qml/Shell.qml b/libmobileshell/declarative/qml/Shell.qml similarity index 100% rename from components/mobileshell/qml/Shell.qml rename to libmobileshell/declarative/qml/Shell.qml diff --git a/components/mobileshell/qml/TaskPanelControls.qml b/libmobileshell/declarative/qml/TaskPanelControls.qml similarity index 100% rename from components/mobileshell/qml/TaskPanelControls.qml rename to libmobileshell/declarative/qml/TaskPanelControls.qml diff --git a/components/mobileshell/qml/TopPanelControls.qml b/libmobileshell/declarative/qml/TopPanelControls.qml similarity index 100% rename from components/mobileshell/qml/TopPanelControls.qml rename to libmobileshell/declarative/qml/TopPanelControls.qml diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml b/libmobileshell/declarative/qml/actiondrawer/ActionDrawer.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/ActionDrawer.qml rename to libmobileshell/declarative/qml/actiondrawer/ActionDrawer.qml diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawerOpenSurface.qml b/libmobileshell/declarative/qml/actiondrawer/ActionDrawerOpenSurface.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/ActionDrawerOpenSurface.qml rename to libmobileshell/declarative/qml/actiondrawer/ActionDrawerOpenSurface.qml diff --git a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml b/libmobileshell/declarative/qml/actiondrawer/LandscapeContentContainer.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml rename to libmobileshell/declarative/qml/actiondrawer/LandscapeContentContainer.qml diff --git a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml b/libmobileshell/declarative/qml/actiondrawer/PortraitContentContainer.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml rename to libmobileshell/declarative/qml/actiondrawer/PortraitContentContainer.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/BrightnessItem.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/BrightnessItem.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/Handle.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/Handle.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/Handle.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/Handle.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettings.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettings.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsDrawer.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/QuickSettingsPanel.qml diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/SettingsModel.qml b/libmobileshell/declarative/qml/actiondrawer/quicksettings/SettingsModel.qml similarity index 100% rename from components/mobileshell/qml/actiondrawer/quicksettings/SettingsModel.qml rename to libmobileshell/declarative/qml/actiondrawer/quicksettings/SettingsModel.qml diff --git a/components/mobileshell/qml/components/BaseItem.qml b/libmobileshell/declarative/qml/components/BaseItem.qml similarity index 100% rename from components/mobileshell/qml/components/BaseItem.qml rename to libmobileshell/declarative/qml/components/BaseItem.qml diff --git a/components/mobileshell/qml/components/Direction.qml b/libmobileshell/declarative/qml/components/Direction.qml similarity index 100% rename from components/mobileshell/qml/components/Direction.qml rename to libmobileshell/declarative/qml/components/Direction.qml diff --git a/components/mobileshell/qml/components/StartupFeedback.qml b/libmobileshell/declarative/qml/components/StartupFeedback.qml similarity index 100% rename from components/mobileshell/qml/components/StartupFeedback.qml rename to libmobileshell/declarative/qml/components/StartupFeedback.qml diff --git a/components/mobileshell/qml/components/VelocityCalculator.qml b/libmobileshell/declarative/qml/components/VelocityCalculator.qml similarity index 100% rename from components/mobileshell/qml/components/VelocityCalculator.qml rename to libmobileshell/declarative/qml/components/VelocityCalculator.qml diff --git a/components/mobileshell/qml/components/util.js b/libmobileshell/declarative/qml/components/util.js similarity index 100% rename from components/mobileshell/qml/components/util.js rename to libmobileshell/declarative/qml/components/util.js diff --git a/components/mobileshell/qml/dataproviders/BatteryProvider.qml b/libmobileshell/declarative/qml/dataproviders/BatteryProvider.qml similarity index 100% rename from components/mobileshell/qml/dataproviders/BatteryProvider.qml rename to libmobileshell/declarative/qml/dataproviders/BatteryProvider.qml diff --git a/components/mobileshell/qml/dataproviders/BluetoothProvider.qml b/libmobileshell/declarative/qml/dataproviders/BluetoothProvider.qml similarity index 100% rename from components/mobileshell/qml/dataproviders/BluetoothProvider.qml rename to libmobileshell/declarative/qml/dataproviders/BluetoothProvider.qml diff --git a/components/mobileshell/qml/dataproviders/SignalStrengthProvider.qml b/libmobileshell/declarative/qml/dataproviders/SignalStrengthProvider.qml similarity index 100% rename from components/mobileshell/qml/dataproviders/SignalStrengthProvider.qml rename to libmobileshell/declarative/qml/dataproviders/SignalStrengthProvider.qml diff --git a/components/mobileshell/qml/dataproviders/VolumeProvider.qml b/libmobileshell/declarative/qml/dataproviders/VolumeProvider.qml similarity index 100% rename from components/mobileshell/qml/dataproviders/VolumeProvider.qml rename to libmobileshell/declarative/qml/dataproviders/VolumeProvider.qml diff --git a/components/mobileshell/qml/dataproviders/WifiProvider.qml b/libmobileshell/declarative/qml/dataproviders/WifiProvider.qml similarity index 100% rename from components/mobileshell/qml/dataproviders/WifiProvider.qml rename to libmobileshell/declarative/qml/dataproviders/WifiProvider.qml diff --git a/components/mobileshell/qml/navigationpanel/NavigationGestureArea.qml b/libmobileshell/declarative/qml/navigationpanel/NavigationGestureArea.qml similarity index 100% rename from components/mobileshell/qml/navigationpanel/NavigationGestureArea.qml rename to libmobileshell/declarative/qml/navigationpanel/NavigationGestureArea.qml diff --git a/components/mobileshell/qml/navigationpanel/NavigationPanel.qml b/libmobileshell/declarative/qml/navigationpanel/NavigationPanel.qml similarity index 100% rename from components/mobileshell/qml/navigationpanel/NavigationPanel.qml rename to libmobileshell/declarative/qml/navigationpanel/NavigationPanel.qml diff --git a/components/mobileshell/qml/navigationpanel/NavigationPanelAction.qml b/libmobileshell/declarative/qml/navigationpanel/NavigationPanelAction.qml similarity index 100% rename from components/mobileshell/qml/navigationpanel/NavigationPanelAction.qml rename to libmobileshell/declarative/qml/navigationpanel/NavigationPanelAction.qml diff --git a/components/mobileshell/qml/navigationpanel/NavigationPanelButton.qml b/libmobileshell/declarative/qml/navigationpanel/NavigationPanelButton.qml similarity index 100% rename from components/mobileshell/qml/navigationpanel/NavigationPanelButton.qml rename to libmobileshell/declarative/qml/navigationpanel/NavigationPanelButton.qml diff --git a/components/mobileshell/qml/osd/volume/AudioApplet.qml b/libmobileshell/declarative/qml/osd/volume/AudioApplet.qml similarity index 100% rename from components/mobileshell/qml/osd/volume/AudioApplet.qml rename to libmobileshell/declarative/qml/osd/volume/AudioApplet.qml diff --git a/components/mobileshell/qml/osd/volume/DeviceListItem.qml b/libmobileshell/declarative/qml/osd/volume/DeviceListItem.qml similarity index 100% rename from components/mobileshell/qml/osd/volume/DeviceListItem.qml rename to libmobileshell/declarative/qml/osd/volume/DeviceListItem.qml diff --git a/components/mobileshell/qml/osd/volume/ListItemBase.qml b/libmobileshell/declarative/qml/osd/volume/ListItemBase.qml similarity index 100% rename from components/mobileshell/qml/osd/volume/ListItemBase.qml rename to libmobileshell/declarative/qml/osd/volume/ListItemBase.qml diff --git a/components/mobileshell/qml/osd/volume/PopupCard.qml b/libmobileshell/declarative/qml/osd/volume/PopupCard.qml similarity index 100% rename from components/mobileshell/qml/osd/volume/PopupCard.qml rename to libmobileshell/declarative/qml/osd/volume/PopupCard.qml diff --git a/components/mobileshell/qml/osd/volume/StreamListItem.qml b/libmobileshell/declarative/qml/osd/volume/StreamListItem.qml similarity index 100% rename from components/mobileshell/qml/osd/volume/StreamListItem.qml rename to libmobileshell/declarative/qml/osd/volume/StreamListItem.qml diff --git a/components/mobileshell/qml/osd/volume/VolumeOSD.qml b/libmobileshell/declarative/qml/osd/volume/VolumeOSD.qml similarity index 100% rename from components/mobileshell/qml/osd/volume/VolumeOSD.qml rename to libmobileshell/declarative/qml/osd/volume/VolumeOSD.qml diff --git a/components/mobileshell/qml/osd/volume/icon.js b/libmobileshell/declarative/qml/osd/volume/icon.js similarity index 100% rename from components/mobileshell/qml/osd/volume/icon.js rename to libmobileshell/declarative/qml/osd/volume/icon.js diff --git a/components/mobileshell/qml/statusbar/ClockText.qml b/libmobileshell/declarative/qml/statusbar/ClockText.qml similarity index 100% rename from components/mobileshell/qml/statusbar/ClockText.qml rename to libmobileshell/declarative/qml/statusbar/ClockText.qml diff --git a/components/mobileshell/qml/statusbar/StatusBar.qml b/libmobileshell/declarative/qml/statusbar/StatusBar.qml similarity index 100% rename from components/mobileshell/qml/statusbar/StatusBar.qml rename to libmobileshell/declarative/qml/statusbar/StatusBar.qml diff --git a/components/mobileshell/qml/statusbar/TaskWidget.qml b/libmobileshell/declarative/qml/statusbar/TaskWidget.qml similarity index 100% rename from components/mobileshell/qml/statusbar/TaskWidget.qml rename to libmobileshell/declarative/qml/statusbar/TaskWidget.qml diff --git a/components/mobileshell/qml/statusbar/indicators/BatteryIndicator.qml b/libmobileshell/declarative/qml/statusbar/indicators/BatteryIndicator.qml similarity index 100% rename from components/mobileshell/qml/statusbar/indicators/BatteryIndicator.qml rename to libmobileshell/declarative/qml/statusbar/indicators/BatteryIndicator.qml diff --git a/components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml b/libmobileshell/declarative/qml/statusbar/indicators/BluetoothIndicator.qml similarity index 100% rename from components/mobileshell/qml/statusbar/indicators/BluetoothIndicator.qml rename to libmobileshell/declarative/qml/statusbar/indicators/BluetoothIndicator.qml diff --git a/components/mobileshell/qml/statusbar/indicators/SignalStrengthIndicator.qml b/libmobileshell/declarative/qml/statusbar/indicators/SignalStrengthIndicator.qml similarity index 100% rename from components/mobileshell/qml/statusbar/indicators/SignalStrengthIndicator.qml rename to libmobileshell/declarative/qml/statusbar/indicators/SignalStrengthIndicator.qml diff --git a/components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml b/libmobileshell/declarative/qml/statusbar/indicators/VolumeIndicator.qml similarity index 100% rename from components/mobileshell/qml/statusbar/indicators/VolumeIndicator.qml rename to libmobileshell/declarative/qml/statusbar/indicators/VolumeIndicator.qml diff --git a/components/mobileshell/qml/statusbar/indicators/WifiIndicator.qml b/libmobileshell/declarative/qml/statusbar/indicators/WifiIndicator.qml similarity index 100% rename from components/mobileshell/qml/statusbar/indicators/WifiIndicator.qml rename to libmobileshell/declarative/qml/statusbar/indicators/WifiIndicator.qml diff --git a/components/mobileshell/qml/taskswitcher/FlickContainer.qml b/libmobileshell/declarative/qml/taskswitcher/FlickContainer.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/FlickContainer.qml rename to libmobileshell/declarative/qml/taskswitcher/FlickContainer.qml diff --git a/components/mobileshell/qml/taskswitcher/Task.qml b/libmobileshell/declarative/qml/taskswitcher/Task.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/Task.qml rename to libmobileshell/declarative/qml/taskswitcher/Task.qml diff --git a/components/mobileshell/qml/taskswitcher/TaskIcon.qml b/libmobileshell/declarative/qml/taskswitcher/TaskIcon.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/TaskIcon.qml rename to libmobileshell/declarative/qml/taskswitcher/TaskIcon.qml diff --git a/components/mobileshell/qml/taskswitcher/TaskList.qml b/libmobileshell/declarative/qml/taskswitcher/TaskList.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/TaskList.qml rename to libmobileshell/declarative/qml/taskswitcher/TaskList.qml diff --git a/components/mobileshell/qml/taskswitcher/TaskSwitcher.qml b/libmobileshell/declarative/qml/taskswitcher/TaskSwitcher.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/TaskSwitcher.qml rename to libmobileshell/declarative/qml/taskswitcher/TaskSwitcher.qml diff --git a/components/mobileshell/qml/taskswitcher/TaskSwitcherState.qml b/libmobileshell/declarative/qml/taskswitcher/TaskSwitcherState.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/TaskSwitcherState.qml rename to libmobileshell/declarative/qml/taskswitcher/TaskSwitcherState.qml diff --git a/components/mobileshell/qml/taskswitcher/Thumbnail.qml b/libmobileshell/declarative/qml/taskswitcher/Thumbnail.qml similarity index 100% rename from components/mobileshell/qml/taskswitcher/Thumbnail.qml rename to libmobileshell/declarative/qml/taskswitcher/Thumbnail.qml diff --git a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml b/libmobileshell/declarative/qml/widgets/krunner/KRunnerWidget.qml similarity index 100% rename from components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml rename to libmobileshell/declarative/qml/widgets/krunner/KRunnerWidget.qml diff --git a/components/mobileshell/qml/widgets/mediacontrols/BlurredBackground.qml b/libmobileshell/declarative/qml/widgets/mediacontrols/BlurredBackground.qml similarity index 100% rename from components/mobileshell/qml/widgets/mediacontrols/BlurredBackground.qml rename to libmobileshell/declarative/qml/widgets/mediacontrols/BlurredBackground.qml diff --git a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml b/libmobileshell/declarative/qml/widgets/mediacontrols/MediaControlsSource.qml similarity index 100% rename from components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml rename to libmobileshell/declarative/qml/widgets/mediacontrols/MediaControlsSource.qml diff --git a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml b/libmobileshell/declarative/qml/widgets/mediacontrols/MediaControlsWidget.qml similarity index 100% rename from components/mobileshell/qml/widgets/mediacontrols/MediaControlsWidget.qml rename to libmobileshell/declarative/qml/widgets/mediacontrols/MediaControlsWidget.qml diff --git a/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml b/libmobileshell/declarative/qml/widgets/notifications/BaseNotificationItem.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml rename to libmobileshell/declarative/qml/widgets/notifications/BaseNotificationItem.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationBodyLabel.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationBodyLabel.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationBodyLabel.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationBodyLabel.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationCard.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationCard.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationCard.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationCard.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationFooterActions.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationFooterActions.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationFooterActions.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationFooterActions.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationGroupHeader.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationGroupHeader.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationItem.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationItem.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationItem.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationItem.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationReplyField.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationReplyField.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationReplyField.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationReplyField.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationTimeText.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationTimeText.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationsModelType.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationsModelType.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationsModelType.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationsModelType.qml diff --git a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml b/libmobileshell/declarative/qml/widgets/notifications/NotificationsWidget.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml rename to libmobileshell/declarative/qml/widgets/notifications/NotificationsWidget.qml diff --git a/components/mobileshell/qml/widgets/notifications/ThumbnailStrip.qml b/libmobileshell/declarative/qml/widgets/notifications/ThumbnailStrip.qml similarity index 100% rename from components/mobileshell/qml/widgets/notifications/ThumbnailStrip.qml rename to libmobileshell/declarative/qml/widgets/notifications/ThumbnailStrip.qml diff --git a/components/mobileshell/qml/widgets/notifications/util.js b/libmobileshell/declarative/qml/widgets/notifications/util.js similarity index 100% rename from components/mobileshell/qml/widgets/notifications/util.js rename to libmobileshell/declarative/qml/widgets/notifications/util.js diff --git a/components/mobileshell/qml/qmldir b/libmobileshell/declarative/qmldir similarity index 100% rename from components/mobileshell/qml/qmldir rename to libmobileshell/declarative/qmldir diff --git a/components/mobileshell/resources.qrc b/libmobileshell/declarative/resources.qrc similarity index 100% rename from components/mobileshell/resources.qrc rename to libmobileshell/declarative/resources.qrc diff --git a/components/mobileshell/displaysmodel.cpp b/libmobileshell/displaysmodel.cpp similarity index 98% rename from components/mobileshell/displaysmodel.cpp rename to libmobileshell/displaysmodel.cpp index 223f089a..d7ec489f 100644 --- a/components/mobileshell/displaysmodel.cpp +++ b/libmobileshell/displaysmodel.cpp @@ -9,6 +9,8 @@ #include +using namespace MobileShell; + DisplaysModel::DisplaysModel(QObject *parent) : QAbstractListModel(parent) { diff --git a/components/mobileshell/displaysmodel.h b/libmobileshell/displaysmodel.h similarity index 88% rename from components/mobileshell/displaysmodel.h rename to libmobileshell/displaysmodel.h index ea8f1bad..56de3924 100644 --- a/components/mobileshell/displaysmodel.h +++ b/libmobileshell/displaysmodel.h @@ -17,7 +17,12 @@ #include #include -class DisplaysModel : public QAbstractListModel +#include "mobileshell_export.h" + +namespace MobileShell +{ + +class MOBILESHELL_EXPORT DisplaysModel : public QAbstractListModel { public: enum Roles { @@ -42,3 +47,5 @@ private: QVector m_outputs; }; + +} // namespace MobileShell diff --git a/components/mobileshell/vkbdinterface.cpp b/libmobileshell/kwinvirtualkeyboardinterface.cpp similarity index 81% rename from components/mobileshell/vkbdinterface.cpp rename to libmobileshell/kwinvirtualkeyboardinterface.cpp index 85d5d54d..0ca18b5b 100644 --- a/components/mobileshell/vkbdinterface.cpp +++ b/libmobileshell/kwinvirtualkeyboardinterface.cpp @@ -4,7 +4,9 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "vkbdinterface.h" +#include "kwinvirtualkeyboardinterface.h" + +using namespace MobileShell; KwinVirtualKeyboardInterface::KwinVirtualKeyboardInterface() : OrgKdeKwinVirtualKeyboardInterface(QStringLiteral("org.kde.KWin"), QStringLiteral("/VirtualKeyboard"), QDBusConnection::sessionBus()) diff --git a/components/mobileshell/vkbdinterface.h b/libmobileshell/kwinvirtualkeyboardinterface.h similarity index 73% rename from components/mobileshell/vkbdinterface.h rename to libmobileshell/kwinvirtualkeyboardinterface.h index dbb22b9d..f79d00e3 100644 --- a/components/mobileshell/vkbdinterface.h +++ b/libmobileshell/kwinvirtualkeyboardinterface.h @@ -12,7 +12,12 @@ #include -class KwinVirtualKeyboardInterface : public OrgKdeKwinVirtualKeyboardInterface +#include "mobileshell_export.h" + +namespace MobileShell +{ + +class MOBILESHELL_EXPORT KwinVirtualKeyboardInterface : public OrgKdeKwinVirtualKeyboardInterface { Q_OBJECT Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) @@ -21,3 +26,5 @@ class KwinVirtualKeyboardInterface : public OrgKdeKwinVirtualKeyboardInterface public: KwinVirtualKeyboardInterface(); }; + +} // namespace MobileShell diff --git a/components/mobileshell/mobileshellsettings.cpp b/libmobileshell/mobileshellsettings.cpp similarity index 97% rename from components/mobileshell/mobileshellsettings.cpp rename to libmobileshell/mobileshellsettings.cpp index 6ebc0a6b..6cf03b32 100644 --- a/components/mobileshell/mobileshellsettings.cpp +++ b/libmobileshell/mobileshellsettings.cpp @@ -6,6 +6,8 @@ #include "mobileshellsettings.h" +using namespace MobileShell; + const QString CONFIG_FILE = QStringLiteral("plasmamobilerc"); const QString GENERAL_CONFIG_GROUP = QStringLiteral("General"); diff --git a/components/mobileshell/mobileshellsettings.h b/libmobileshell/mobileshellsettings.h similarity index 81% rename from components/mobileshell/mobileshellsettings.h rename to libmobileshell/mobileshellsettings.h index 15e6e320..480ab40e 100644 --- a/components/mobileshell/mobileshellsettings.h +++ b/libmobileshell/mobileshellsettings.h @@ -11,7 +11,12 @@ #include #include -class MobileShellSettings : public QObject +#include "mobileshell_export.h" + +namespace MobileShell +{ + +class MOBILESHELL_EXPORT MobileShellSettings : public QObject { Q_OBJECT Q_PROPERTY(bool navigationPanelEnabled READ navigationPanelEnabled NOTIFY navigationPanelEnabledChanged) @@ -30,3 +35,5 @@ private: KConfigWatcher::Ptr m_configWatcher; KSharedConfig::Ptr m_config; }; + +} // namespace MobileShell diff --git a/components/mobileshell/quicksettings/quicksetting.cpp b/libmobileshell/quicksetting.cpp similarity index 97% rename from components/mobileshell/quicksettings/quicksetting.cpp rename to libmobileshell/quicksetting.cpp index 4a8f125f..de5cd341 100644 --- a/components/mobileshell/quicksettings/quicksetting.cpp +++ b/libmobileshell/quicksetting.cpp @@ -6,6 +6,8 @@ #include "quicksetting.h" +using namespace MobileShell; + QuickSetting::QuickSetting(QObject *parent) : QObject(parent) { diff --git a/components/mobileshell/quicksettings/quicksetting.h b/libmobileshell/quicksetting.h similarity index 93% rename from components/mobileshell/quicksettings/quicksetting.h rename to libmobileshell/quicksetting.h index e6c0ae65..223304e8 100644 --- a/components/mobileshell/quicksettings/quicksetting.h +++ b/libmobileshell/quicksetting.h @@ -10,7 +10,12 @@ #include #include -class QuickSetting : public QObject +#include "mobileshell_export.h" + +namespace MobileShell +{ + +class MOBILESHELL_EXPORT QuickSetting : public QObject { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText REQUIRED NOTIFY textChanged) @@ -67,3 +72,5 @@ private: QString m_settingsCommand; QList m_children; }; + +} // namespace MobileShell diff --git a/components/mobileshell/quicksettings/quicksettingsmodel.cpp b/libmobileshell/quicksettingsmodel.cpp similarity index 98% rename from components/mobileshell/quicksettings/quicksettingsmodel.cpp rename to libmobileshell/quicksettingsmodel.cpp index 239bab7f..f0d2e3d6 100644 --- a/components/mobileshell/quicksettings/quicksettingsmodel.cpp +++ b/libmobileshell/quicksettingsmodel.cpp @@ -11,6 +11,8 @@ #include #include +using namespace MobileShell; + QuickSettingsModel::QuickSettingsModel(QObject *parent) : QAbstractListModel(parent) { diff --git a/components/mobileshell/quicksettings/quicksettingsmodel.h b/libmobileshell/quicksettingsmodel.h similarity index 83% rename from components/mobileshell/quicksettings/quicksettingsmodel.h rename to libmobileshell/quicksettingsmodel.h index c4297202..91e78e9b 100644 --- a/components/mobileshell/quicksettings/quicksettingsmodel.h +++ b/libmobileshell/quicksettingsmodel.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: LGPL-2.0-or-later */ -#ifndef QUICKSETTINGSMODEL_H -#define QUICKSETTINGSMODEL_H +#pragma once #include "qqml.h" #include "quicksetting.h" @@ -13,7 +12,12 @@ #include #include -class QuickSettingsModel : public QAbstractListModel, public QQmlParserStatus +#include "mobileshell_export.h" + +namespace MobileShell +{ + +class MOBILESHELL_EXPORT QuickSettingsModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) @@ -42,4 +46,4 @@ private: QList m_external; }; -#endif // QUICKSETTINGSMODEL_H +} // namespace MobileShell diff --git a/components/mobileshell/shellutil.cpp b/libmobileshell/shellutil.cpp similarity index 99% rename from components/mobileshell/shellutil.cpp rename to libmobileshell/shellutil.cpp index 47fe7d98..998c0240 100644 --- a/components/mobileshell/shellutil.cpp +++ b/libmobileshell/shellutil.cpp @@ -29,6 +29,8 @@ #define FORMAT24H "HH:mm:ss" +using namespace MobileShell; + constexpr int SCREENSHOT_DELAY = 200; /* -- Static Helpers --------------------------------------------------------------------------- */ diff --git a/components/mobileshell/shellutil.h b/libmobileshell/shellutil.h similarity index 91% rename from components/mobileshell/shellutil.h rename to libmobileshell/shellutil.h index 1fb9e463..5da691be 100644 --- a/components/mobileshell/shellutil.h +++ b/libmobileshell/shellutil.h @@ -15,7 +15,12 @@ #include "kscreeninterface.h" #include "screenshot2interface.h" -class ShellUtil : public QObject +#include "mobileshell_export.h" + +namespace MobileShell +{ + +class MOBILESHELL_EXPORT ShellUtil : public QObject { Q_OBJECT Q_PROPERTY(bool autoRotateEnabled READ autoRotate WRITE setAutoRotate NOTIFY autoRotateChanged); @@ -55,3 +60,5 @@ private: org::kde::KScreen *m_kscreenInterface; OrgKdeKWinScreenShot2Interface *m_screenshotInterface; }; + +} // namespace MobileShell