diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,14 @@ TYPE REQUIRED PURPOSE "Required for Wayland integration of plasmashell") +list(FIND Qt5Gui_PLUGINS Qt5::QVirtualKeyboardPlugin VIRTUAL_KEYBOARD_INDEX) +set(HAVE_QT_VIRTUAL_KEYBOARD false) +if(NOT VIRTUAL_KEYBOARD_INDEX EQUAL -1) + set(HAVE_QT_VIRTUAL_KEYBOARD true) +endif() + +add_feature_info("Qt VirtualKeyboard" HAVE_QT_VIRTUAL_KEYBOARD "Runtime dependency for virtual keyboard support in the lock screen") + include(ConfigureChecks.cmake) include_directories("${CMAKE_CURRENT_BINARY_DIR}") diff --git a/lookandfeel/contents/lockscreen/LockScreen.qml b/lookandfeel/contents/lockscreen/LockScreen.qml --- a/lookandfeel/contents/lockscreen/LockScreen.qml +++ b/lookandfeel/contents/lockscreen/LockScreen.qml @@ -30,6 +30,7 @@ property string notification property UserSelect userSelect: null property int interfaceVersion: org_kde_plasma_screenlocker_greeter_interfaceVersion ? org_kde_plasma_screenlocker_greeter_interfaceVersion : 0 + property bool qtVirtualKeyboardAvailable: false signal clearPassword() source: backgroundPath || "../components/artwork/background.png" diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -78,6 +78,16 @@ } Loader { + active: root.viewVisible && root.qtVirtualKeyboardAvailable + source: "VirtualKeyboard.qml" + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + } + + Loader { active: root.viewVisible source: "LockOsd.qml" anchors { diff --git a/lookandfeel/contents/lockscreen/VirtualKeyboard.qml b/lookandfeel/contents/lockscreen/VirtualKeyboard.qml new file mode 100644 --- /dev/null +++ b/lookandfeel/contents/lockscreen/VirtualKeyboard.qml @@ -0,0 +1,28 @@ +/******************************************************************** + This file is part of the KDE project. + +Copyright (C) 2016 Martin Gräßlin + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*********************************************************************/ +import QtQuick 2.5 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +InputPanel { + id: inputPanel + visible: active + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom +}