diff --git a/CMakeLists.txt b/CMakeLists.txt index bd3c4fa2..475b24b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,6 @@ add_subdirectory(bin) #add_subdirectory(services) add_subdirectory(applets) add_subdirectory(containments) -add_subdirectory(components) add_subdirectory(dialer) add_subdirectory(sounds) #add_subdirectory(touchscreentest) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt deleted file mode 100644 index e706c564..00000000 --- a/components/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -project(mobileshellprivate) - -set(mobileshellprivate_SRCS - mobileshellprivateplugin.cpp - fullscreenpanel.cpp - ) - -add_library(plasmamobileshellprivateplugin SHARED ${mobileshellprivate_SRCS}) -target_link_libraries(plasmamobileshellprivateplugin Qt5::Core Qt5::Qml Qt5::Quick KF5::WindowSystem KF5::WaylandClient) - -install(TARGETS plasmamobileshellprivateplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) - -install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/mobileshell) - - diff --git a/components/Messages.sh b/components/Messages.sh deleted file mode 100644 index 5d9afc52..00000000 --- a/components/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -$XGETTEXT *.cpp -o $podir/plasmamobileshellprivateplugin.pot diff --git a/components/fullscreenpanel.cpp b/components/fullscreenpanel.cpp deleted file mode 100644 index 29429597..00000000 --- a/components/fullscreenpanel.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/*************************************************************************** - * Copyright 2015 Marco Martin * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -#include "fullscreenpanel.h" - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include - -FullScreenPanel::FullScreenPanel(QQuickWindow *parent) - : QQuickWindow(parent) -{ - setFlags(Qt::FramelessWindowHint); - setWindowState(Qt::WindowFullScreen); - // connect(this, &FullScreenPanel::activeFocusItemChanged, this, [this]() {qWarning()<<"hide()";}); - connect(this, &QWindow::activeChanged, this, &FullScreenPanel::activeChanged); - initWayland(); -} - -FullScreenPanel::~FullScreenPanel() -= default; - -void FullScreenPanel::initWayland() -{ - if (!QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { - return; - } - using namespace KWayland::Client; - ConnectionThread *connection = ConnectionThread::fromApplication(this); - if (!connection) { - return; - } - auto *registry = new Registry(this); - registry->create(connection); - - m_surface = Surface::fromWindow(this); - if (!m_surface) { - return; - } - connect(registry, &Registry::plasmaShellAnnounced, this, - [this, registry] (quint32 name, quint32 version) { - - m_plasmaShellInterface = registry->createPlasmaShell(name, version, this); - - m_plasmaShellSurface = m_plasmaShellInterface->createSurface(m_surface, this); - m_plasmaShellSurface->setSkipTaskbar(true); - } - ); - /* - connect(registry, &Registry::shellAnnounced, this, - [this, registry] (quint32 name, quint32 version) { - - m_shellInterface = registry->createShell(name, version, this); - if (!m_shellInterface) { - return; - } - //bshah: following code results in error... - //wl_surface@67: error 0: ShellSurface already created - //Wayland display got fatal error 71: Protocol error - //Additionally, errno was set to 71: Protocol error - m_shellSurface = m_shellInterface->createSurface(m_surface, this); - } - );*/ - registry->setup(); - connection->roundtrip(); -} - -void FullScreenPanel::showEvent(QShowEvent *event) -{ - using namespace KWayland::Client; - QQuickWindow::showEvent(event); -} diff --git a/components/fullscreenpanel.h b/components/fullscreenpanel.h deleted file mode 100644 index 1ad0aa4a..00000000 --- a/components/fullscreenpanel.h +++ /dev/null @@ -1,61 +0,0 @@ -/*************************************************************************** - * Copyright 2015 Marco Martin * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ -#ifndef FULLSCREENPANEL_H -#define FULLSCREENPANEL_H - -#include - -namespace KWayland -{ -namespace Client -{ -class PlasmaWindow; -class PlasmaShell; -class PlasmaShellSurface; -class Shell; -class ShellSurface; -class Surface; -} -} - -class FullScreenPanel : public QQuickWindow -{ - Q_OBJECT - Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) - -public: - FullScreenPanel(QQuickWindow *parent = nullptr); - ~FullScreenPanel() override; - -Q_SIGNALS: - void activeChanged(); - -protected: - void showEvent(QShowEvent *event) override; - -private: - void initWayland(); - KWayland::Client::PlasmaShellSurface *m_plasmaShellSurface = nullptr; - KWayland::Client::ShellSurface *m_shellSurface = nullptr; - KWayland::Client::Surface *m_surface = nullptr; - KWayland::Client::PlasmaShell *m_plasmaShellInterface = nullptr; - KWayland::Client::Shell *m_shellInterface = nullptr; -}; - -#endif diff --git a/components/mobileshellprivateplugin.cpp b/components/mobileshellprivateplugin.cpp deleted file mode 100644 index cf9a8a5c..00000000 --- a/components/mobileshellprivateplugin.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright 2015 Marco Martin - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -#include "mobileshellprivateplugin.h" -#include "fullscreenpanel.h" - -#include - - -void PlasmaMobileShellPrivatePlugin::registerTypes(const char *uri) -{ - Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.mobileshell")); - - qmlRegisterType(uri, 2, 0, "FullScreenPanel"); -} diff --git a/components/mobileshellprivateplugin.h b/components/mobileshellprivateplugin.h deleted file mode 100644 index 952dd578..00000000 --- a/components/mobileshellprivateplugin.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2015 Marco Martin - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -#ifndef MOBILESHELLPRIVATE_H -#define MOBILESHELLPRIVATE_H - -#include - -class PlasmaMobileShellPrivatePlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - void registerTypes(const char *uri) override; -}; - -#endif diff --git a/components/qmldir b/components/qmldir deleted file mode 100644 index 78ea15ad..00000000 --- a/components/qmldir +++ /dev/null @@ -1,3 +0,0 @@ -module org.kde.plasma.private.mobileshell -plugin plasmamobileshellprivateplugin - diff --git a/containments/panel/package/contents/ui/SlidingPanel.qml b/containments/panel/package/contents/ui/SlidingPanel.qml index d2d7bc8c..e4f56bf7 100644 --- a/containments/panel/package/contents/ui/SlidingPanel.qml +++ b/containments/panel/package/contents/ui/SlidingPanel.qml @@ -21,9 +21,9 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.private.mobileshell 2.0 +import org.kde.plasma.private.nanoshell 2.0 as NanoShell -FullScreenPanel { +NanoShell.FullScreenPanel { id: window property int offset: 0 diff --git a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml index 8e47e32b..2866603d 100644 --- a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml +++ b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml @@ -23,9 +23,9 @@ import QtQuick.Window 2.2 import org.kde.taskmanager 0.1 as TaskManager import org.kde.plasma.core 2.1 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.private.mobileshell 2.0 +import org.kde.plasma.private.nanoshell 2.0 as NanoShell -FullScreenPanel { +NanoShell.FullScreenPanel { id: window visible: false