aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--dist/changes-5.8.027
-rw-r--r--src/config.pri1
-rw-r--r--src/virtualkeyboard/3rdparty/hunspell/hunspell.pro8
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/MIT_LICENSE.txt18
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/lipi-toolkit.pro3
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/projects/alphanumeric/alphanumeric.pro7
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/projects/demonumerals/demonumerals.pro7
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/projects/lipiengine.pro7
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/projects/projects.pro8
-rw-r--r--src/virtualkeyboard/3rdparty/lipi-toolkit/qt_attribution.json14
-rw-r--r--src/virtualkeyboard/3rdparty/openwnn/openwnn.pro5
-rw-r--r--src/virtualkeyboard/3rdparty/openwnn/qt_attribution.json12
-rw-r--r--src/virtualkeyboard/3rdparty/pinyin/pinyin.pro3
-rw-r--r--src/virtualkeyboard/3rdparty/pinyin/qt_attribution.json13
-rw-r--r--src/virtualkeyboard/3rdparty/t9write/t9write.pro1
-rw-r--r--src/virtualkeyboard/3rdparty/tcime/COPYING132
-rw-r--r--src/virtualkeyboard/3rdparty/tcime/qt_attribution.json16
-rw-r--r--src/virtualkeyboard/3rdparty/tcime/tcime.pro2
-rw-r--r--src/virtualkeyboard/content/HandwritingInputPanel.qml28
-rw-r--r--src/virtualkeyboard/content/InputPanel.qml6
-rw-r--r--src/virtualkeyboard/content/components/AlternativeKeys.qml5
-rw-r--r--src/virtualkeyboard/content/components/BaseKey.qml9
-rw-r--r--src/virtualkeyboard/content/components/CharacterPreviewBubble.qml3
-rw-r--r--src/virtualkeyboard/content/components/Keyboard.qml3
-rw-r--r--src/virtualkeyboard/content/components/ShiftKey.qml4
-rw-r--r--src/virtualkeyboard/content/components/TraceInputArea.qml11
-rw-r--r--src/virtualkeyboard/content/components/TraceInputKey.qml4
-rw-r--r--src/virtualkeyboard/content/components/WordCandidatePopupList.qml6
-rw-r--r--src/virtualkeyboard/content/layouts/ro_RO/handwriting.qml109
-rw-r--r--src/virtualkeyboard/content/layouts/ro_RO/main.qml229
-rw-r--r--src/virtualkeyboard/content/layouts/ro_RO/symbols.qml376
-rw-r--r--src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf2
-rw-r--r--src/virtualkeyboard/doc/src/build.qdoc2
-rw-r--r--src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc12
-rw-r--r--src/virtualkeyboard/doc/src/technical-guide.qdoc8
-rw-r--r--src/virtualkeyboard/inputcontext.cpp54
-rw-r--r--src/virtualkeyboard/inputcontext.h6
-rw-r--r--src/virtualkeyboard/shifthandler.cpp18
-rw-r--r--src/virtualkeyboard/shifthandler.h1
-rw-r--r--src/virtualkeyboard/styles/KeyPanel.qml2
-rw-r--r--src/virtualkeyboard/styles/KeyboardStyle.qml10
-rw-r--r--src/virtualkeyboard/styles/styles_plugin.h2
-rw-r--r--src/virtualkeyboard/tcinputmethod.cpp2
-rw-r--r--src/virtualkeyboard/trace.cpp16
-rw-r--r--src/virtualkeyboard/virtualkeyboard.pro27
-rw-r--r--src/virtualkeyboard/virtualkeyboardsettings.cpp5
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/styles/data/QtQuick/VirtualKeyboard/Styles/test/style.qml36
-rw-r--r--tests/auto/styles/data/tst_styles.qml61
-rw-r--r--tests/auto/styles/styles.pro23
-rw-r--r--tests/auto/styles/tst_styles.cpp36
52 files changed, 1209 insertions, 194 deletions
diff --git a/.qmake.conf b/.qmake.conf
index a2a0d418..fec66b73 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.7.1
+MODULE_VERSION = 5.8.1
diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0
new file mode 100644
index 00000000..68997532
--- /dev/null
+++ b/dist/changes-5.8.0
@@ -0,0 +1,27 @@
+Qt 5.8 introduces many new features and improvements as well as bugfixes
+over the 5.7.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.8 series is binary compatible with the 5.7.x series.
+Applications compiled for 5.7 will continue to run with 5.8.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* New Features *
+****************************************************************************
+
+ - Added support for styles in any QML import path under the directory
+ QtQuick/VirtualKeyboard/Styles/<style>.
+ - Added API to support VKB selection handles.
+ - Added Romanian keyboard layout.
+ - Add new property InputContext.uppercase, which is set to
+ true when either InputContext.shift or InputContext.capsLock is true
diff --git a/src/config.pri b/src/config.pri
index 5a80d1c6..918838bf 100644
--- a/src/config.pri
+++ b/src/config.pri
@@ -37,6 +37,7 @@ lang-all: CONFIG += \
lang-nb_NO \
lang-pl_PL \
lang-pt_PT \
+ lang-ro_RO \
lang-ru_RU \
lang-sv_SE \
lang-zh_CN \
diff --git a/src/virtualkeyboard/3rdparty/hunspell/hunspell.pro b/src/virtualkeyboard/3rdparty/hunspell/hunspell.pro
index a5056e82..bd5eccb3 100644
--- a/src/virtualkeyboard/3rdparty/hunspell/hunspell.pro
+++ b/src/virtualkeyboard/3rdparty/hunspell/hunspell.pro
@@ -1,6 +1,5 @@
TARGET = qthunspell
-DEFINES += HUNSPELL_STATIC
CONFIG += static
CONFIG += precompile_header warn_off
CONFIG(debug, debug|release) {
@@ -10,15 +9,13 @@ CONFIG(debug, debug|release) {
config_file = "/* Version number of package */" "$${LITERAL_HASH}define VERSION \"$$VERSION\""
write_file($$PWD/config.h, config_file)
-INCLUDEPATH += \
- ./ \
- src/hunspell
+MODULE_DEFINES += HUNSPELL_STATIC
+MODULE_INCLUDEPATH = $$PWD/src
SOURCES += \
src/hunspell/affentry.cxx \
src/hunspell/affixmgr.cxx \
src/hunspell/csutil.cxx \
- src/hunspell/dictmgr.cxx \
src/hunspell/filemgr.cxx \
src/hunspell/hashmgr.cxx \
src/hunspell/hunspell.cxx \
@@ -34,7 +31,6 @@ HEADERS += \
src/hunspell/atypes.hxx \
src/hunspell/baseaffix.hxx \
src/hunspell/csutil.hxx \
- src/hunspell/dictmgr.hxx \
src/hunspell/filemgr.hxx \
src/hunspell/hashmgr.hxx \
src/hunspell/htypes.hxx \
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/MIT_LICENSE.txt b/src/virtualkeyboard/3rdparty/lipi-toolkit/MIT_LICENSE.txt
new file mode 100644
index 00000000..5d391355
--- /dev/null
+++ b/src/virtualkeyboard/3rdparty/lipi-toolkit/MIT_LICENSE.txt
@@ -0,0 +1,18 @@
+Copyright (c) 2006 Hewlett-Packard Development Company, L.P.
+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.
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/lipi-toolkit.pro b/src/virtualkeyboard/3rdparty/lipi-toolkit/lipi-toolkit.pro
index bd678b99..9593051a 100644
--- a/src/virtualkeyboard/3rdparty/lipi-toolkit/lipi-toolkit.pro
+++ b/src/virtualkeyboard/3rdparty/lipi-toolkit/lipi-toolkit.pro
@@ -1,5 +1,4 @@
TEMPLATE = subdirs
SUBDIRS += \
- src \
- projects
+ src
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/alphanumeric/alphanumeric.pro b/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/alphanumeric/alphanumeric.pro
deleted file mode 100644
index d65137db..00000000
--- a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/alphanumeric/alphanumeric.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = aux
-
-cfg.files = config
-cfg.path = $$[QT_INSTALL_DATA]/qtvirtualkeyboard/lipi_toolkit/projects/alphanumeric
-INSTALLS += cfg
-
-!prefix_build: COPIES += cfg
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/demonumerals/demonumerals.pro b/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/demonumerals/demonumerals.pro
deleted file mode 100644
index a16edd28..00000000
--- a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/demonumerals/demonumerals.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = aux
-
-cfg.files = config
-cfg.path = $$[QT_INSTALL_DATA]/qtvirtualkeyboard/lipi_toolkit/projects/demonumerals
-INSTALLS += cfg
-
-!prefix_build: COPIES += cfg
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/lipiengine.pro b/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/lipiengine.pro
deleted file mode 100644
index f9ad55a7..00000000
--- a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/lipiengine.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = aux
-
-cfg.files += lipiengine.cfg
-cfg.path = $$[QT_INSTALL_DATA]/qtvirtualkeyboard/lipi_toolkit/projects
-INSTALLS += cfg
-
-!prefix_build: COPIES += cfg
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/projects.pro b/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/projects.pro
deleted file mode 100644
index 7109dc45..00000000
--- a/src/virtualkeyboard/3rdparty/lipi-toolkit/projects/projects.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += \
- alphanumeric \
- demonumerals \
- lipiengine
-
-lipiengine.file = lipiengine.pro
diff --git a/src/virtualkeyboard/3rdparty/lipi-toolkit/qt_attribution.json b/src/virtualkeyboard/3rdparty/lipi-toolkit/qt_attribution.json
new file mode 100644
index 00000000..c26f7870
--- /dev/null
+++ b/src/virtualkeyboard/3rdparty/lipi-toolkit/qt_attribution.json
@@ -0,0 +1,14 @@
+{
+ "Id": "lipitk",
+ "Name": "Lipi Toolkit",
+ "QDocModule": "qtvirtualkeyboard",
+ "Description": "Lipi Toolkit (LipiTk) is an open source toolkit for online Handwriting Recognition.",
+ "QtUsage": "Optionally used in Qt Virtual Keyboard.",
+
+ "Homepage": "http://lipitk.sourceforge.net/lipi-toolkit.htm",
+ "License": "MIT License",
+ "LicenseId": "MIT",
+ "LicenseFile": "MIT_LICENSE.txt",
+ "Copyright": "Copyright (c) 2006 Hewlett-Packard Development Company, L.P.
+Copyright (c) 2007 Hewlett-Packard Development Company, L.P."
+}
diff --git a/src/virtualkeyboard/3rdparty/openwnn/openwnn.pro b/src/virtualkeyboard/3rdparty/openwnn/openwnn.pro
index 6ca93d36..a61e4860 100644
--- a/src/virtualkeyboard/3rdparty/openwnn/openwnn.pro
+++ b/src/virtualkeyboard/3rdparty/openwnn/openwnn.pro
@@ -4,9 +4,8 @@ VERSION = 1.3.6
CONFIG += static
CONFIG += warn_off
-INCLUDEPATH += \
- wnnDictionary/include \
- wnnEngine/include
+MODULE_INCLUDEPATH = $$PWD/wnnEngine/include
+INCLUDEPATH += wnnDictionary/include
SOURCES += \
wnnDictionary/engine/ndapi.c \
diff --git a/src/virtualkeyboard/3rdparty/openwnn/qt_attribution.json b/src/virtualkeyboard/3rdparty/openwnn/qt_attribution.json
new file mode 100644
index 00000000..9ac944df
--- /dev/null
+++ b/src/virtualkeyboard/3rdparty/openwnn/qt_attribution.json
@@ -0,0 +1,12 @@
+{
+ "Id": "openwnn",
+ "Name": "OpenWnn",
+ "QDocModule": "qtvirtualkeyboard",
+ "Description": "OpenWnn is a Japanese keyboard/IME from the Android Open Source Project.",
+ "QtUsage": "Optionally used in Qt Virtual Keyboard.",
+
+ "License": "Apache License 2.0",
+ "LicenseId": "Apache-2.0",
+ "LicenseFile": "NOTICE",
+ "Copyright": "Copyright (C) 2008-2012 OMRON SOFTWARE Co., Ltd."
+}
diff --git a/src/virtualkeyboard/3rdparty/pinyin/pinyin.pro b/src/virtualkeyboard/3rdparty/pinyin/pinyin.pro
index 8aab0eef..ffa17bfd 100644
--- a/src/virtualkeyboard/3rdparty/pinyin/pinyin.pro
+++ b/src/virtualkeyboard/3rdparty/pinyin/pinyin.pro
@@ -4,8 +4,7 @@ VERSION = 1.0.0
CONFIG += static
CONFIG += warn_off
-INCLUDEPATH += \
- include
+MODULE_INCLUDEPATH = $$PWD/include
SOURCES += \
share/dictbuilder.cpp \
diff --git a/src/virtualkeyboard/3rdparty/pinyin/qt_attribution.json b/src/virtualkeyboard/3rdparty/pinyin/qt_attribution.json
new file mode 100644
index 00000000..c739749f
--- /dev/null
+++ b/src/virtualkeyboard/3rdparty/pinyin/qt_attribution.json
@@ -0,0 +1,13 @@
+{
+ "Id": "pinyin",
+ "Name": "PinyinIME",
+ "QDocModule": "qtvirtualkeyboard",
+ "Description": "PinyinIME is an input method engine for Pinyin (the official romanization system for Standard Chinese
+in mainland China, Malaysia, Singapore, and Taiwan) from the Android Open Source Project.",
+ "QtUsage": "Optionally used in Qt Virtual Keyboard.",
+
+ "License": "Apache License 2.0",
+ "LicenseId": "Apache-2.0",
+ "LicenseFile": "NOTICE",
+ "Copyright": "Copyright (C) 2009 The Android Open Source Project"
+}
diff --git a/src/virtualkeyboard/3rdparty/t9write/t9write.pro b/src/virtualkeyboard/3rdparty/t9write/t9write.pro
index 8d6b4b91..05f723a7 100644
--- a/src/virtualkeyboard/3rdparty/t9write/t9write.pro
+++ b/src/virtualkeyboard/3rdparty/t9write/t9write.pro
@@ -19,3 +19,4 @@ load(qt_helper_lib)
# Needed for resources
CONFIG += qt
+QT = core
diff --git a/src/virtualkeyboard/3rdparty/tcime/COPYING b/src/virtualkeyboard/3rdparty/tcime/COPYING
index 606b8475..72844840 100644
--- a/src/virtualkeyboard/3rdparty/tcime/COPYING
+++ b/src/virtualkeyboard/3rdparty/tcime/COPYING
@@ -19,72 +19,72 @@ limitations under the License.
File dict_phrases.dat is built from libTabe; the licenses of libTabe is:
================================================================================
-/*
- * Copyrighy (c) 1999 TaBE Project.
- * Copyright (c) 1999 Pai-Hsiang Hsiao.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * . Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * . Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * . Neither the name of the TaBE Project nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1999 Computer Systems and Communication Lab,
- * Institute of Information Science, Academia Sinica.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * . Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * . Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * . Neither the name of the Computer Systems and Communication Lab
- * nor the names of its contributors may be used to endorse or
- * promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+
+ Copyrighy (c) 1999 TaBE Project.
+ Copyright (c) 1999 Pai-Hsiang Hsiao.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ . Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ . Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ . Neither the name of the TaBE Project nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ Copyright (c) 1999 Computer Systems and Communication Lab,
+ Institute of Information Science, Academia Sinica.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ . Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ . Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ . Neither the name of the Computer Systems and Communication Lab
+ nor the names of its contributors may be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois
c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
diff --git a/src/virtualkeyboard/3rdparty/tcime/qt_attribution.json b/src/virtualkeyboard/3rdparty/tcime/qt_attribution.json
new file mode 100644
index 00000000..717f87ac
--- /dev/null
+++ b/src/virtualkeyboard/3rdparty/tcime/qt_attribution.json
@@ -0,0 +1,16 @@
+{
+ "Id": "tcime",
+ "Name": "Traditional Chinese IME (tcime)",
+ "QDocModule": "qtvirtualkeyboard",
+ "Description": "Traditional Chinese IME (tcime) is an input method engine for traditional Chinese.",
+ "QtUsage": "Optionally used in Qt Virtual Keyboard.",
+
+ "License": "Apache License 2.0 and BSD 3-clause \"New\" or \"Revised\" License",
+ "LicenseId": "Apache-2.0 AND BSD-3-Clause",
+ "LicenseFile": "COPYING",
+ "Copyright": "Copyright 2010 Google Inc.
+Copyrighy (c) 1999 TaBE Project.
+Copyright (c) 1999 Pai-Hsiang Hsiao.
+Copyright (c) 1999 Computer Systems and Communication Lab, Institute of Information Science, Academia Sinica.
+Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois"
+}
diff --git a/src/virtualkeyboard/3rdparty/tcime/tcime.pro b/src/virtualkeyboard/3rdparty/tcime/tcime.pro
index 86755635..d593beef 100644
--- a/src/virtualkeyboard/3rdparty/tcime/tcime.pro
+++ b/src/virtualkeyboard/3rdparty/tcime/tcime.pro
@@ -22,6 +22,8 @@ OTHER_FILES += \
data/dict_cangjie.dat \
data/dict_phrases.dat
+MODULE_INCLUDEPATH = $$PWD
+
load(qt_helper_lib)
CONFIG += qt
diff --git a/src/virtualkeyboard/content/HandwritingInputPanel.qml b/src/virtualkeyboard/content/HandwritingInputPanel.qml
index 6492ab26..8582f721 100644
--- a/src/virtualkeyboard/content/HandwritingInputPanel.qml
+++ b/src/virtualkeyboard/content/HandwritingInputPanel.qml
@@ -42,23 +42,23 @@ import QtQuick.VirtualKeyboard 2.1
The HandwritingInputPanel is an add-on component for the InputPanel, which
enables full-screen handwriting input for the application.
- HandwritingInputPanel is designed to be anchored to full screen alongside
+ HandwritingInputPanel is designed to be anchored full screen alongside
the InputPanel. The operating principle is that when the handwriting panel
is "available", the InputPanel is invisible. This functionality is built-in,
- and requires no more than a reference to InputPanel instance.
+ and requires no more than a reference to the InputPanel instance.
- The panel is set into operation by setting the \l {HandwritingInputPanel::available} {HandwritingInputPanel.available}
- property to true. When the panel is in operation, the keyboard remains hidden
- when the input focus is set. When the available is true, handwriting input is
- activated by setting the \l {HandwritingInputPanel::active} {HandwritingInputPanel.active} property to true.
+ The panel is set into operation by setting the \l {HandwritingInputPanel::}{available}
+ property to \c true. When the panel is in operation, the keyboard remains hidden
+ when the input focus is set. When \c available is \c true, handwriting input is
+ activated by setting the \l {HandwritingInputPanel::}{active} property to \c true.
The user interface, which provides controls for handwriting mode and the
- visibility of the keyboard, is application specific. One suggested implementation
- is to use a floating button on the handwriting panel where single click toggles
- the handwriting mode (changes the \l {HandwritingInputPanel::active} {active} property), and double-click toggles
- the visibility of the keyboard (changes the \l {HandwritingInputPanel::available} {available} property).
+ visibility of the keyboard, is application-specific. One suggested implementation
+ is to use a floating button on the handwriting panel, where single click toggles
+ the handwriting mode (changes the \l {HandwritingInputPanel::}{active} property), and double-click toggles
+ the visibility of the keyboard (changes the \l {HandwritingInputPanel::}{available} property).
- HandwritingInputPanel also provides word candidate popup which allows the user
+ HandwritingInputPanel also provides a word candidate popup which allows the user
to select an alternative word candidate from the list of suggestions generated
by the handwriting input method.
*/
@@ -74,15 +74,15 @@ Item {
/*! This property controls the availability status of the handwriting input method.
- Setting the property to true prepares the handwriting input method and inhibits
+ Setting the property to \c true prepares the handwriting input method and inhibits
the display of keyboard.
*/
property bool available
/*! This property controls the active status of the handwriting input method.
- Setting the property to true activates the handwriting input method. When the
- handwriting input method is active, all the touch input is captured by the
+ Setting the property to \c true activates the handwriting input method. When the
+ handwriting input method is active, all touch input is captured by the
handwriting input panel and redirected to input engine for processing.
*/
property bool active
diff --git a/src/virtualkeyboard/content/InputPanel.qml b/src/virtualkeyboard/content/InputPanel.qml
index 2e500a1b..3e354471 100644
--- a/src/virtualkeyboard/content/InputPanel.qml
+++ b/src/virtualkeyboard/content/InputPanel.qml
@@ -38,9 +38,9 @@ import QtQuick.VirtualKeyboard 2.1
\ingroup qtvirtualkeyboard-qml
The keyboard size is automatically calculated from the available
- width, i.e. the keyboard maintains the aspect ratio specified by the current
- style. Therefore the application should only set the \c width and \c y
- coordinates of the InputPanel, and not the height.
+ width; that is, the keyboard maintains the aspect ratio specified by the current
+ style. Therefore the application should only set the \l {Item::}{width} and \l {Item::}{y}
+ coordinates of the InputPanel, and not the \l {Item::}{height}.
*/
Item {
diff --git a/src/virtualkeyboard/content/components/AlternativeKeys.qml b/src/virtualkeyboard/content/components/AlternativeKeys.qml
index 8801099c..a1fcfe14 100644
--- a/src/virtualkeyboard/content/components/AlternativeKeys.qml
+++ b/src/virtualkeyboard/content/components/AlternativeKeys.qml
@@ -36,7 +36,6 @@ Item {
property alias listView: listView
property int keyCode
property point origin
- property bool uppercased: keyboard.uppercased
signal clicked
z: 1
@@ -86,7 +85,7 @@ Item {
if (active && listView.currentIndex >= 0 && listView.currentIndex < listView.model.count) {
var activeKey = listView.model.get(listView.currentIndex)
InputContext.inputEngine.virtualKeyClick(keyCode, activeKey.text,
- uppercased ? Qt.ShiftModifier : 0)
+ InputContext.uppercase ? Qt.ShiftModifier : 0)
}
}
@@ -95,7 +94,7 @@ Item {
var alternativeKeys = key.effectiveAlternativeKeys
if (alternativeKeys.length > 0) {
for (var i = 0; i < alternativeKeys.length; i++) {
- listModel.append({ "text": uppercased ? alternativeKeys[i].toUpperCase() : alternativeKeys[i] })
+ listModel.append({ "text": InputContext.uppercase ? alternativeKeys[i].toUpperCase() : alternativeKeys[i] })
}
listView.width = keyboard.style.alternateKeysListItemWidth * listModel.count
listView.forceLayout()
diff --git a/src/virtualkeyboard/content/components/BaseKey.qml b/src/virtualkeyboard/content/components/BaseKey.qml
index c45efb32..5c686adf 100644
--- a/src/virtualkeyboard/content/components/BaseKey.qml
+++ b/src/virtualkeyboard/content/components/BaseKey.qml
@@ -29,6 +29,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.0
+import QtQuick.VirtualKeyboard 2.1
/*!
\qmltype BaseKey
@@ -191,12 +192,6 @@ Item {
*/
property bool showPreview: enabled && !functionKey && !keyboard.navigationModeActive
- /*! Sets the enabled attribute.
-
- The default is true.
- */
- property bool enabled: true
-
/*! This property holds the pressed status of the key.
The pressed status can only be true if the key is both enabled and active.
@@ -209,7 +204,7 @@ Item {
By default, this property reflects the uppercase status of the keyboard.
*/
- property bool uppercased: keyboard.uppercased && !noModifier
+ property bool uppercased: InputContext.uppercase && !noModifier
/*! Sets the key panel delegate for the key.
diff --git a/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml b/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml
index 3a7490aa..1f9a05a2 100644
--- a/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml
+++ b/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml
@@ -28,6 +28,7 @@
****************************************************************************/
import QtQuick 2.0
+import QtQuick.VirtualKeyboard 2.1
Item {
property bool active
@@ -44,7 +45,7 @@ Item {
onActiveKeyChanged: {
if (activeKey && characterPreview.item !== null) {
- characterPreview.item.text = keyboard.uppercased ? activeKey.text.toUpperCase() : activeKey.text
+ characterPreview.item.text = InputContext.uppercase ? activeKey.text.toUpperCase() : activeKey.text
width = activeKey.width
height = activeKey.height
var position = keyboard.mapFromItem(activeKey, 0, 0)
diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml
index 6956898f..bd4ea193 100644
--- a/src/virtualkeyboard/content/components/Keyboard.qml
+++ b/src/virtualkeyboard/content/components/Keyboard.qml
@@ -59,7 +59,6 @@ Item {
return "main"
}
property bool active: Qt.inputMethod.visible
- property bool uppercased: InputContext.shift
property bool handwritingMode
property bool fullScreenHandwritingMode
property bool symbolMode
@@ -635,7 +634,7 @@ Item {
function click(key) {
if (key && key.enabled) {
if (!key.noKeyEvent)
- InputContext.inputEngine.virtualKeyClick(key.key, keyboard.uppercased ? key.text.toUpperCase() : key.text, keyboard.uppercased ? Qt.ShiftModifier : 0)
+ InputContext.inputEngine.virtualKeyClick(key.key, InputContext.uppercase ? key.text.toUpperCase() : key.text, InputContext.uppercase ? Qt.ShiftModifier : 0)
key.clicked()
}
}
diff --git a/src/virtualkeyboard/content/components/ShiftKey.qml b/src/virtualkeyboard/content/components/ShiftKey.qml
index b8424a5b..d7705d9f 100644
--- a/src/virtualkeyboard/content/components/ShiftKey.qml
+++ b/src/virtualkeyboard/content/components/ShiftKey.qml
@@ -48,9 +48,5 @@ BaseKey {
highlighted: InputContext.capsLock
functionKey: true
keyPanelDelegate: keyboard.style ? keyboard.style.shiftKeyPanel : undefined
- /*! \internal */
- property bool capsLock: InputContext.capsLock
- /*! \internal */
- property bool shift: InputContext.shift
onClicked: InputContext.shiftHandler.toggleShift()
}
diff --git a/src/virtualkeyboard/content/components/TraceInputArea.qml b/src/virtualkeyboard/content/components/TraceInputArea.qml
index 4d2b6e00..cdc4ecdd 100644
--- a/src/virtualkeyboard/content/components/TraceInputArea.qml
+++ b/src/virtualkeyboard/content/components/TraceInputArea.qml
@@ -42,8 +42,9 @@ import QtQuick.VirtualKeyboard 2.1
This type handles the trace interaction between the touch screen and the input engine.
- The traces are rendered using the delegate from the current style
- \l {KeyboardStyle::traceCanvasDelegate} {KeyboardStyle.traceCanvasDelegate}.
+ The traces are rendered using the delegate from the
+ \l {KeyboardStyle::}{traceCanvasDelegate} property of the current
+ \l KeyboardStyle.
*/
MultiPointTouchArea {
@@ -59,7 +60,7 @@ MultiPointTouchArea {
The rulers are defined as a number of pixels from the top edge of the boundingBox.
- Here is an example how to define rulers:
+ Here is an example that demonstrates how to define rulers:
\code
horizontalRulers: [boundingBox.height / 3, boundingBox.height / 3 * 2]
@@ -89,8 +90,8 @@ MultiPointTouchArea {
/*! Canvas type of this trace input area.
This property can be used to distinguish between different types of canvases.
- For example, in full screen handwriting mode this property is set to "fullscreen", and
- in keyboard handwriting mode this property is set to "keyboard".
+ For example, in full screen handwriting mode this property is set to \c "fullscreen", and
+ in keyboard handwriting mode this property is set to \c "keyboard".
*/
property string canvasType
diff --git a/src/virtualkeyboard/content/components/TraceInputKey.qml b/src/virtualkeyboard/content/components/TraceInputKey.qml
index 28740758..444208e9 100644
--- a/src/virtualkeyboard/content/components/TraceInputKey.qml
+++ b/src/virtualkeyboard/content/components/TraceInputKey.qml
@@ -65,7 +65,7 @@ Item {
The rulers are defined as a number of pixels from the top edge of the bounding box.
- Here is an example how to define rulers:
+ Here is an example that demonstrates how to define rulers:
\code
horizontalRulers: [boundingBox.height / 3, boundingBox.height / 3 * 2]
@@ -90,7 +90,7 @@ Item {
/*! Canvas type of this trace input area.
This property can be used to distinguish between different types of canvases.
- The default value is "keyboard".
+ The default value is \c "keyboard".
*/
property alias canvasType: traceInputArea.canvasType
diff --git a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml
index 5057dfa8..7740cbf9 100644
--- a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml
+++ b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml
@@ -54,16 +54,16 @@ ListView {
Binding {
target: wordCandidatePopupList
property: "x"
- value: Qt.inputMethod.cursorRectangle.x -
+ value: Math.round(Qt.inputMethod.cursorRectangle.x -
(wordCandidatePopupList.currentItem ?
(wordCandidatePopupList.currentItem.hasOwnProperty("cursorAnchor") ?
- wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0)
+ wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0))
when: wordCandidatePopupList.visible
}
Binding {
target: wordCandidatePopupList
property: "y"
- value: wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height
+ value: Math.round(wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height)
when: wordCandidatePopupList.visible
}
orientation: ListView.Vertical
diff --git a/src/virtualkeyboard/content/layouts/ro_RO/handwriting.qml b/src/virtualkeyboard/content/layouts/ro_RO/handwriting.qml
new file mode 100644
index 00000000..ab2600f5
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/ro_RO/handwriting.qml
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.VirtualKeyboard 2.1
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.VirtualKeyboard 2.1; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ ChangeLanguageKey {
+ weight: 154
+ customLayoutsOnly: true
+ }
+ HandwritingModeKey {
+ weight: 154
+ }
+ SpaceKey {
+ weight: 864
+ }
+ Key {
+ key: Qt.Key_Minus
+ text: "-"
+ alternativeKeys: "<>()#%&*/\\\"'=+-_"
+ }
+ Key {
+ key: Qt.Key_Period
+ text: "."
+ alternativeKeys: ":;,.?!"
+ }
+ Key {
+ key: 0x102
+ text: "ă"
+ alternativeKeys: "ăîâșț"
+ }
+ HideKeyboardKey {
+ id: hideKeyboardKey
+ weight: 204
+ }
+ }
+}
diff --git a/src/virtualkeyboard/content/layouts/ro_RO/main.qml b/src/virtualkeyboard/content/layouts/ro_RO/main.qml
new file mode 100644
index 00000000..3524e572
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/ro_RO/main.qml
@@ -0,0 +1,229 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.VirtualKeyboard 2.1
+
+KeyboardLayout {
+ inputMode: InputEngine.Latin
+ keyWeight: 160
+ KeyboardRow {
+ Key {
+ key: Qt.Key_Q
+ text: "q"
+ }
+ Key {
+ key: Qt.Key_W
+ text: "w"
+ }
+ Key {
+ key: Qt.Key_E
+ text: "e"
+ alternativeKeys: "êeëèé"
+ }
+ Key {
+ key: Qt.Key_R
+ text: "r"
+ alternativeKeys: "ŕrř"
+ }
+ Key {
+ key: Qt.Key_T
+ text: "t"
+ alternativeKeys: "țţtŧť"
+ }
+ Key {
+ key: Qt.Key_Y
+ text: "y"
+ alternativeKeys: "ÿyýŷ"
+ }
+ Key {
+ key: Qt.Key_U
+ text: "u"
+ alternativeKeys: "űūũûüuùú"
+ }
+ Key {
+ key: Qt.Key_I
+ text: "i"
+ alternativeKeys: "îïīĩiìí"
+ }
+ Key {
+ key: Qt.Key_O
+ text: "o"
+ alternativeKeys: "œøõôöòóo"
+ }
+ Key {
+ key: Qt.Key_P
+ text: "p"
+ }
+ Key {
+ key: 0x102
+ text: "ă"
+ }
+ Key {
+ key: Qt.Key_Icircumflex
+ text: "î"
+ }
+ Key {
+ key: Qt.Key_Acircumflex
+ text: "â"
+ }
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ FillerKey {
+ weight: 56
+ }
+ Key {
+ key: Qt.Key_A
+ text: "a"
+ alternativeKeys: "aäåãăâàá"
+ }
+ Key {
+ key: Qt.Key_S
+ text: "s"
+ alternativeKeys: "șšsşś"
+ }
+ Key {
+ key: Qt.Key_D
+ text: "d"
+ alternativeKeys: "dđď"
+ }
+ Key {
+ key: Qt.Key_F
+ text: "f"
+ }
+ Key {
+ key: Qt.Key_G
+ text: "g"
+ alternativeKeys: "ġgģĝğ"
+ }
+ Key {
+ key: Qt.Key_H
+ text: "h"
+ }
+ Key {
+ key: Qt.Key_J
+ text: "j"
+ }
+ Key {
+ key: Qt.Key_K
+ text: "k"
+ }
+ Key {
+ key: Qt.Key_L
+ text: "l"
+ alternativeKeys: "ĺŀłļľl"
+ }
+ Key {
+ key: 0x218
+ text: "ș"
+ }
+ Key {
+ key: 0x21a
+ text: "ț"
+ }
+ EnterKey {
+ weight: 283
+ }
+ }
+ KeyboardRow {
+ keyWeight: 156
+ ShiftKey {}
+ Key {
+ key: Qt.Key_Z
+ text: "z"
+ alternativeKeys: "zžż"
+ }
+ Key {
+ key: Qt.Key_X
+ text: "x"
+ }
+ Key {
+ key: Qt.Key_C
+ text: "c"
+ alternativeKeys: "çcċčć"
+ }
+ Key {
+ key: Qt.Key_V
+ text: "v"
+ }
+ Key {
+ key: Qt.Key_B
+ text: "b"
+ }
+ Key {
+ key: Qt.Key_N
+ text: "n"
+ alternativeKeys: "ņńnň"
+ }
+ Key {
+ key: Qt.Key_M
+ text: "m"
+ }
+ Key {
+ key: Qt.Key_Comma
+ text: ","
+ }
+ Key {
+ key: Qt.Key_Period
+ text: "."
+ }
+ ShiftKey {
+ weight: 204
+ }
+ }
+ KeyboardRow {
+ keyWeight: 154
+ SymbolModeKey {
+ weight: 217
+ }
+ ChangeLanguageKey {
+ weight: 154
+ }
+ HandwritingModeKey {
+ weight: 154
+ }
+ SpaceKey {
+ weight: 864
+ }
+ Key {
+ key: Qt.Key_Minus
+ text: "-"
+ alternativeKeys: [ "\"", "'" ]
+ }
+ Key {
+ key: 0xE000
+ text: ":-)"
+ alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ]
+ }
+ HideKeyboardKey {
+ weight: 204
+ }
+ }
+}
diff --git a/src/virtualkeyboard/content/layouts/ro_RO/symbols.qml b/src/virtualkeyboard/content/layouts/ro_RO/symbols.qml
new file mode 100644
index 00000000..0196a478
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/ro_RO/symbols.qml
@@ -0,0 +1,376 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.VirtualKeyboard 2.1
+
+KeyboardLayoutLoader {
+ property bool secondPage
+ onVisibleChanged: if (!visible) secondPage = false
+ sourceComponent: secondPage ? page2 : page1
+ Component {
+ id: page1
+ KeyboardLayout {
+ keyWeight: 160
+ KeyboardRow {
+ Key {
+ key: Qt.Key_1
+ text: "1"
+ }
+ Key {
+ key: Qt.Key_2
+ text: "2"
+ }
+ Key {
+ key: Qt.Key_3
+ text: "3"
+ }
+ Key {
+ key: Qt.Key_4
+ text: "4"
+ }
+ Key {
+ key: Qt.Key_5
+ text: "5"
+ }
+ Key {
+ key: Qt.Key_6
+ text: "6"
+ }
+ Key {
+ key: Qt.Key_7
+ text: "7"
+ }
+ Key {
+ key: Qt.Key_8
+ text: "8"
+ }
+ Key {
+ key: Qt.Key_9
+ text: "9"
+ }
+ Key {
+ key: Qt.Key_0
+ text: "0"
+ }
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ FillerKey {
+ weight: 56
+ }
+ Key {
+ key: Qt.Key_At
+ text: "@"
+ }
+ Key {
+ key: Qt.Key_NumberSign
+ text: "#"
+ }
+ Key {
+ key: Qt.Key_Percent
+ text: "%"
+ }
+ Key {
+ key: Qt.Key_Ampersand
+ text: "&"
+ }
+ Key {
+ key: Qt.Key_Asterisk
+ text: "*"
+ }
+ Key {
+ key: Qt.Key_Minus
+ text: "-"
+ }
+ Key {
+ key: Qt.Key_Plus
+ text: "+"
+ }
+ Key {
+ key: Qt.Key_ParenLeft
+ text: "("
+ }
+ Key {
+ key: Qt.Key_ParenRight
+ text: ")"
+ }
+ EnterKey {
+ weight: 283
+ }
+ }
+ KeyboardRow {
+ keyWeight: 156
+ Key {
+ displayText: "1/2"
+ functionKey: true
+ onClicked: secondPage = !secondPage
+ }
+ Key {
+ key: Qt.Key_Exclam
+ text: "!"
+ }
+ Key {
+ key: Qt.Key_QuoteDbl
+ text: '"'
+ }
+ Key {
+ key: Qt.Key_Apostrophe
+ text: "'"
+ }
+ Key {
+ key: Qt.Key_Less
+ text: "<"
+ }
+ Key {
+ key: Qt.Key_Greater
+ text: ">"
+ }
+ Key {
+ key: Qt.Key_Colon
+ text: ":"
+ }
+ Key {
+ key: Qt.Key_Semicolon
+ text: ";"
+ }
+ Key {
+ key: Qt.Key_Slash
+ text: "/"
+ }
+ Key {
+ key: Qt.Key_Question
+ text: "?"
+ }
+ Key {
+ weight: 204
+ displayText: "1/2"
+ functionKey: true
+ onClicked: secondPage = !secondPage
+ }
+ }
+ KeyboardRow {
+ keyWeight: 154
+ SymbolModeKey {
+ weight: 217
+ displayText: "ABC"
+ }
+ ChangeLanguageKey {
+ weight: 154
+ }
+ SpaceKey {
+ weight: 864
+ }
+ Key {
+ key: Qt.Key_Period
+ text: "."
+ alternativeKeys: ".,"
+ }
+ Key {
+ key: 0xE000
+ text: ":-)"
+ alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ]
+ }
+ HideKeyboardKey {
+ weight: 204
+ }
+ }
+ }
+ }
+ Component {
+ id: page2
+ KeyboardLayout {
+ keyWeight: 160
+ KeyboardRow {
+ Key {
+ key: Qt.Key_AsciiTilde
+ text: "~"
+ }
+ Key {
+ key: Qt.Key_Agrave
+ text: "`"
+ }
+ Key {
+ key: Qt.Key_Bar
+ text: "|"
+ }
+ Key {
+ key: 0x7B
+ text: "·"
+ }
+ Key {
+ key: 0x221A
+ text: "√"
+ }
+ Key {
+ key: Qt.Key_division
+ text: "÷"
+ }
+ Key {
+ key: Qt.Key_multiply
+ text: "×"
+ }
+ Key {
+ key: Qt.Key_onehalf
+ text: "½"
+ alternativeKeys: "¼⅓½¾⅞"
+ }
+ Key {
+ key: Qt.Key_BraceLeft
+ text: "{"
+ }
+ Key {
+ key: Qt.Key_BraceRight
+ text: "}"
+ }
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ FillerKey {
+ weight: 56
+ }
+ Key {
+ key: Qt.Key_Dollar
+ text: "$"
+ }
+ Key {
+ key: 0x20AC
+ text: "€"
+ }
+ Key {
+ key: 0xC2
+ text: "£"
+ }
+ Key {
+ key: 0xA2
+ text: "¢"
+ }
+ Key {
+ key: 0xA5
+ text: "¥"
+ }
+ Key {
+ key: Qt.Key_Equal
+ text: "="
+ }
+ Key {
+ key: Qt.Key_section
+ text: "§"
+ }
+ Key {
+ key: Qt.Key_BracketLeft
+ text: "["
+ }
+ Key {
+ key: Qt.Key_BracketRight
+ text: "]"
+ }
+ EnterKey {
+ weight: 283
+ }
+ }
+ KeyboardRow {
+ keyWeight: 156
+ Key {
+ displayText: "2/2"
+ functionKey: true
+ onClicked: secondPage = !secondPage
+ }
+ Key {
+ key: Qt.Key_Underscore
+ text: "_"
+ }
+ Key {
+ key: 0x2122
+ text: '™'
+ }
+ Key {
+ key: 0x00AE
+ text: '®'
+ }
+ Key {
+ key: Qt.Key_guillemotleft
+ text: '«'
+ }
+ Key {
+ key: Qt.Key_guillemotright
+ text: '»'
+ }
+ Key {
+ key: 0x201C
+ text: '“'
+ }
+ Key {
+ key: 0x201D
+ text: '”'
+ }
+ Key {
+ key: Qt.Key_Backslash
+ text: "\\"
+ }
+ Key {
+ key: Qt.Key_AsciiCircum
+ text: "^"
+ }
+ Key {
+ weight: 204
+ displayText: "2/2"
+ functionKey: true
+ onClicked: secondPage = !secondPage
+ }
+ }
+ KeyboardRow {
+ keyWeight: 154
+ SymbolModeKey {
+ weight: 217
+ displayText: "ABC"
+ }
+ ChangeLanguageKey {
+ weight: 154
+ }
+ SpaceKey {
+ weight: 864
+ }
+ Key {
+ key: 0x2026
+ text: "\u2026"
+ }
+ Key {
+ key: 0xE000
+ text: ":-)"
+ alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ]
+ }
+ HideKeyboardKey {
+ weight: 204
+ }
+ }
+ }
+ }
+}
diff --git a/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf b/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf
index 54b66a00..2698378e 100644
--- a/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf
+++ b/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf
@@ -15,7 +15,7 @@ exampledirs += ../../../examples/virtualkeyboard \
examplesinstallpath = virtualkeyboard
imagedirs += images
-depends += qtdoc qtcore qtgui qtquick
+depends += qtdoc qtcore qtgui qtqml qtquick
qhp.projects = QtVirtualKeyboard
diff --git a/src/virtualkeyboard/doc/src/build.qdoc b/src/virtualkeyboard/doc/src/build.qdoc
index 21b0eb2b..1e75ef32 100644
--- a/src/virtualkeyboard/doc/src/build.qdoc
+++ b/src/virtualkeyboard/doc/src/build.qdoc
@@ -181,7 +181,7 @@ the preferred input method to the configuration, e.g., \c CONFIG+="lang-zh_TW zh
\row
\li \e static
\li Enables static builds of the virtual keyboard
- \li This option enables \l {Static build}{static builds}.
+ \li This option enables \l {Static builds}{static builds}.
\row
\li \e retro-style
\li \e n/a
diff --git a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc
index 92ff3541..94339df7 100644
--- a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc
+++ b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc
@@ -79,6 +79,7 @@
\li Persian/Farsi
\li Polish
\li Portugese
+ \li Romanian
\li Russian
\li Simplified Chinese
\li Traditional Chinese
@@ -109,6 +110,17 @@
\list
\li \l{Qt Virtual Keyboard Examples}
\endlist
+
+ \section1 Licenses and Attributions
+
+ Qt Virtual Keyboard is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under the \l{GNU General Public License, version 3}.
+ See \l{Qt Licensing} for further details.
+
+ Furthermore Qt Virtual Keyboard potentially contains third party
+ modules under following permissive licenses:
+
+ \generatelist{groupsbymodule attributions-qtvirtualkeyboard}
*/
/*!
diff --git a/src/virtualkeyboard/doc/src/technical-guide.qdoc b/src/virtualkeyboard/doc/src/technical-guide.qdoc
index 4832bdc1..7e279bcd 100644
--- a/src/virtualkeyboard/doc/src/technical-guide.qdoc
+++ b/src/virtualkeyboard/doc/src/technical-guide.qdoc
@@ -56,7 +56,6 @@ The input framework provides the following main interfaces:
\li InputEngine: exposes an API to integrate user input events (key
presses, etc.) and acts as a host for input methods.
\li InputMethod: a base type for QML based input methods.
- \li \l {QtVirtualKeyboard::AbstractInputMethod} {AbstractInputMethod}: a base type for C++ based input methods.
\endlist
\section1 The Input Context
@@ -140,8 +139,7 @@ key can be interrupted by using the InputEngine::virtualKeyCancel method.
Activating an input method is straightforward. The required steps are:
\list
- \li Instantiate a concrete implementation of InputMethod or
- \l {QtVirtualKeyboard::AbstractInputMethod} {AbstractInputMethod}
+ \li Instantiate a concrete implementation of InputMethod
\li Assign the instance to InputEngine::inputMethod
\li Set the proper input mode with InputEngine::inputMode
\endlist
@@ -579,7 +577,9 @@ style name, the virtual keyboard falls back in the default built-in style.
\section2 Adding Custom Styles
The process of creating a new style begins by creating a new subdirectory
-for the style in the virtual keyboard \e Styles directory. The directory
+for the style in a QML import path under the URL-based directory structure
+QtQuick/VirtualKeyboard/Styles/. See \l {QML Import Path}
+for information about QML import paths. The directory
name can not contain spaces or special characters other than underscore.
Also, the directory name can not be the same as one of the built-in style,
which currently includes "default" and "retro".
diff --git a/src/virtualkeyboard/inputcontext.cpp b/src/virtualkeyboard/inputcontext.cpp
index df8613ff..cc8b9ef8 100644
--- a/src/virtualkeyboard/inputcontext.cpp
+++ b/src/virtualkeyboard/inputcontext.cpp
@@ -93,6 +93,7 @@ public:
preeditTextAttributes(),
surroundingText(),
selectedText(),
+ anchorRectangle(),
cursorRectangle(),
selectionControlVisible(false),
anchorRectIntersectsClipRect(false),
@@ -121,6 +122,7 @@ public:
QList<QInputMethodEvent::Attribute> preeditTextAttributes;
QString surroundingText;
QString selectedText;
+ QRectF anchorRectangle;
QRectF cursorRectangle;
bool selectionControlVisible;
bool anchorRectIntersectsClipRect;
@@ -195,6 +197,8 @@ void InputContext::setShift(bool enable)
if (d->shift != enable) {
d->shift = enable;
emit shiftChanged();
+ if (!d->capsLock)
+ emit uppercaseChanged();
}
}
@@ -210,9 +214,17 @@ void InputContext::setCapsLock(bool enable)
if (d->capsLock != enable) {
d->capsLock = enable;
emit capsLockChanged();
+ if (!d->shift)
+ emit uppercaseChanged();
}
}
+bool InputContext::uppercase() const
+{
+ Q_D(const InputContext);
+ return d->shift || d->capsLock;
+}
+
int InputContext::cursorPosition() const
{
Q_D(const InputContext);
@@ -270,6 +282,12 @@ QString InputContext::selectedText() const
return d->selectedText;
}
+QRectF InputContext::anchorRectangle() const
+{
+ Q_D(const InputContext);
+ return d->anchorRectangle;
+}
+
QRectF InputContext::cursorRectangle() const
{
Q_D(const InputContext);
@@ -644,6 +662,7 @@ void InputContext::update(Qt::InputMethodQueries queries)
Qt::InputMethodHints inputMethodHints = Qt::InputMethodHints(d->inputContext->inputMethodQuery(Qt::ImHints).toInt());
const int cursorPosition = d->inputContext->inputMethodQuery(Qt::ImCursorPosition).toInt();
const int anchorPosition = d->inputContext->inputMethodQuery(Qt::ImAnchorPosition).toInt();
+ QRectF anchorRectangle = qApp->inputMethod()->anchorRectangle();
QRectF cursorRectangle = qApp->inputMethod()->cursorRectangle();
QString surroundingText = d->inputContext->inputMethodQuery(Qt::ImSurroundingText).toString();
QString selectedText = d->inputContext->inputMethodQuery(Qt::ImCurrentSelection).toString();
@@ -653,6 +672,7 @@ void InputContext::update(Qt::InputMethodQueries queries)
bool newSurroundingText = surroundingText != d->surroundingText;
bool newSelectedText = selectedText != d->selectedText;
bool newCursorPosition = cursorPosition != d->cursorPosition;
+ bool newAnchorRectangle = anchorRectangle != d->anchorRectangle;
bool newCursorRectangle = cursorRectangle != d->cursorRectangle;
bool selectionControlVisible = d->inputContext->isInputPanelVisible() && (cursorPosition != anchorPosition);
bool newSelectionControlVisible = selectionControlVisible != d->selectionControlVisible;
@@ -672,6 +692,7 @@ void InputContext::update(Qt::InputMethodQueries queries)
d->surroundingText = surroundingText;
d->selectedText = selectedText;
d->cursorPosition = cursorPosition;
+ d->anchorRectangle = anchorRectangle;
d->cursorRectangle = cursorRectangle;
d->selectionControlVisible = selectionControlVisible;
d->anchorRectIntersectsClipRect = anchorRectIntersectsClipRect;
@@ -699,6 +720,9 @@ void InputContext::update(Qt::InputMethodQueries queries)
if (newCursorPosition) {
emit cursorPositionChanged();
}
+ if (newAnchorRectangle) {
+ emit anchorRectangleChanged();
+ }
if (newCursorRectangle) {
emit cursorRectangleChanged();
}
@@ -830,6 +854,20 @@ bool InputContext::filterEvent(const QEvent *event)
*/
/*!
+ \qmlproperty bool InputContext::uppercase
+ \since QtQuick.VirtualKeyboard 2.2
+
+ This property is \c true when either \l shift or \l capsLock is \c true.
+*/
+
+/*!
+ \property QtVirtualKeyboard::InputContext::uppercase
+ \brief the uppercase status.
+
+ This property is \c true when either \l shift or \l capsLock is \c true.
+*/
+
+/*!
\qmlproperty int InputContext::cursorPosition
This property is changed when the cursor position changes.
@@ -895,7 +933,21 @@ bool InputContext::filterEvent(const QEvent *event)
*/
/*!
- \qmlproperty int InputContext::cursorRectangle
+ \qmlproperty rect InputContext::anchorRectangle
+ \since QtQuick.VirtualKeyboard 2.1
+
+ This property is changed when the anchor rectangle changes.
+*/
+
+/*!
+ \property QtVirtualKeyboard::InputContext::anchorRectangle
+ \brief the anchor rectangle.
+
+ This property is changed when the anchor rectangle changes.
+*/
+
+/*!
+ \qmlproperty rect InputContext::cursorRectangle
This property is changed when the cursor rectangle changes.
*/
diff --git a/src/virtualkeyboard/inputcontext.h b/src/virtualkeyboard/inputcontext.h
index fa7e07c6..925745bd 100644
--- a/src/virtualkeyboard/inputcontext.h
+++ b/src/virtualkeyboard/inputcontext.h
@@ -51,11 +51,13 @@ class InputContext : public QObject
Q_PROPERTY(bool focus READ focus NOTIFY focusChanged)
Q_PROPERTY(bool shift READ shift WRITE setShift NOTIFY shiftChanged)
Q_PROPERTY(bool capsLock READ capsLock WRITE setCapsLock NOTIFY capsLockChanged)
+ Q_PROPERTY(bool uppercase READ uppercase NOTIFY uppercaseChanged)
Q_PROPERTY(int cursorPosition READ cursorPosition NOTIFY cursorPositionChanged)
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints NOTIFY inputMethodHintsChanged)
Q_PROPERTY(QString preeditText READ preeditText WRITE setPreeditText NOTIFY preeditTextChanged)
Q_PROPERTY(QString surroundingText READ surroundingText NOTIFY surroundingTextChanged)
Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged)
+ Q_PROPERTY(QRectF anchorRectangle READ anchorRectangle NOTIFY anchorRectangleChanged)
Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged)
Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle WRITE setKeyboardRectangle NOTIFY keyboardRectangleChanged)
Q_PROPERTY(QRectF previewRectangle READ previewRectangle WRITE setPreviewRectangle NOTIFY previewRectangleChanged)
@@ -78,12 +80,14 @@ public:
void setShift(bool enable);
bool capsLock() const;
void setCapsLock(bool enable);
+ bool uppercase() const;
int cursorPosition() const;
Qt::InputMethodHints inputMethodHints() const;
QString preeditText() const;
void setPreeditText(const QString &text, QList<QInputMethodEvent::Attribute> attributes = QList<QInputMethodEvent::Attribute>(), int replaceFrom = 0, int replaceLength = 0);
QString surroundingText() const;
QString selectedText() const;
+ QRectF anchorRectangle() const;
QRectF cursorRectangle() const;
QRectF keyboardRectangle() const;
void setKeyboardRectangle(QRectF rectangle);
@@ -124,9 +128,11 @@ signals:
void surroundingTextChanged();
void selectedTextChanged();
void cursorPositionChanged();
+ void anchorRectangleChanged();
void cursorRectangleChanged();
void shiftChanged();
void capsLockChanged();
+ void uppercaseChanged();
void keyboardRectangleChanged();
void previewRectangleChanged();
void previewVisibleChanged();
diff --git a/src/virtualkeyboard/shifthandler.cpp b/src/virtualkeyboard/shifthandler.cpp
index d6252fa9..997123d8 100644
--- a/src/virtualkeyboard/shifthandler.cpp
+++ b/src/virtualkeyboard/shifthandler.cpp
@@ -32,6 +32,7 @@
#include "inputengine.h"
#include <QtCore/private/qobject_p.h>
#include <QSet>
+#include <QGuiApplication>
namespace QtVirtualKeyboard {
@@ -45,6 +46,7 @@ public:
autoCapitalizationEnabled(false),
toggleShiftEnabled(false),
shiftChanged(false),
+ resetWhenVisible(false),
manualShiftLanguageFilter(QSet<QLocale::Language>() << QLocale::Arabic << QLocale::Persian << QLocale::Hindi << QLocale::Korean),
manualCapsInputModeFilter(QSet<InputEngine::InputMode>() << InputEngine::Cangjie << InputEngine::Zhuyin),
noAutoUppercaseInputModeFilter(QSet<InputEngine::InputMode>() << InputEngine::FullwidthLatin << InputEngine::Pinyin << InputEngine::Cangjie << InputEngine::Zhuyin),
@@ -57,6 +59,7 @@ public:
bool autoCapitalizationEnabled;
bool toggleShiftEnabled;
bool shiftChanged;
+ bool resetWhenVisible;
QLocale locale;
const QSet<QLocale::Language> manualShiftLanguageFilter;
const QSet<InputEngine::InputMode> manualCapsInputModeFilter;
@@ -95,6 +98,7 @@ ShiftHandler::ShiftHandler(InputContext *parent) :
connect(d->inputContext, SIGNAL(shiftChanged()), SLOT(shiftChanged()));
connect(d->inputContext, SIGNAL(capsLockChanged()), SLOT(shiftChanged()));
connect(d->inputContext, SIGNAL(localeChanged()), SLOT(localeChanged()));
+ connect(qGuiApp->inputMethod(), SIGNAL(visibleChanged()), SLOT(inputMethodVisibleChanged()));
d->locale = QLocale(d->inputContext->locale());
}
}
@@ -239,6 +243,11 @@ void ShiftHandler::autoCapitalize()
void ShiftHandler::restart()
{
+ Q_D(ShiftHandler);
+ if (!qGuiApp->inputMethod()->isVisible()) {
+ d->resetWhenVisible = true;
+ return;
+ }
reset();
}
@@ -255,6 +264,15 @@ void ShiftHandler::localeChanged()
restart();
}
+void ShiftHandler::inputMethodVisibleChanged()
+{
+ Q_D(ShiftHandler);
+ if (d->resetWhenVisible && qGuiApp->inputMethod()->isVisible()) {
+ d->resetWhenVisible = false;
+ reset();
+ }
+}
+
void ShiftHandler::setAutoCapitalizationEnabled(bool enabled)
{
Q_D(ShiftHandler);
diff --git a/src/virtualkeyboard/shifthandler.h b/src/virtualkeyboard/shifthandler.h
index 4e63a946..c28a9581 100644
--- a/src/virtualkeyboard/shifthandler.h
+++ b/src/virtualkeyboard/shifthandler.h
@@ -69,6 +69,7 @@ private slots:
void restart();
void localeChanged();
void shiftChanged();
+ void inputMethodVisibleChanged();
private:
void setAutoCapitalizationEnabled(bool enabled);
diff --git a/src/virtualkeyboard/styles/KeyPanel.qml b/src/virtualkeyboard/styles/KeyPanel.qml
index 68bb0850..4e12b9a8 100644
--- a/src/virtualkeyboard/styles/KeyPanel.qml
+++ b/src/virtualkeyboard/styles/KeyPanel.qml
@@ -52,8 +52,6 @@ Item {
\li \c control.enabled Set to true when the key is enabled.
\li \c control.pressed Set to true when the key is currently pressed.
\li \c control.uppercased Set to true when the key is uppercased.
- \li \c control.capsLock Set to true when caps lock is enabled.
- \note Deprecated since 1.2. Use \l {InputContext::capsLock} {InputContext.capsLock} instead.
\endlist
*/
property Item control
diff --git a/src/virtualkeyboard/styles/KeyboardStyle.qml b/src/virtualkeyboard/styles/KeyboardStyle.qml
index 5e92aeb7..3fa55ca2 100644
--- a/src/virtualkeyboard/styles/KeyboardStyle.qml
+++ b/src/virtualkeyboard/styles/KeyboardStyle.qml
@@ -39,12 +39,12 @@ import QtQuick 2.0
the InputPanel to decorate the virtual keyboard.
The design size specifies the aspect ratio of the virtual keyboard.
- Styles are scalable according to KeyboardStyle.scaleHint, which is
+ Styles are scalable according to \l scaleHint, which is
calculated from the keyboard's actual height and design height.
*/
QtObject {
- /*! The current size of the keyboard. */
+ /*! The current height of the keyboard. */
property real keyboardHeight
/*! The design width of the keyboard. */
@@ -53,8 +53,8 @@ QtObject {
/*! The design height of the keyboard. */
property real keyboardDesignHeight
- /*! The keyboard style scale hint. This value is determined by the
- physical size and the design size of the keyboard. All pixel
+ /*! The keyboard style scale hint. This value is determined by dividing
+ \l keyboardHeight by \l keyboardDesignHeight. All pixel
dimensions must be proportional to this value.
*/
readonly property real scaleHint: keyboardHeight / keyboardDesignHeight
@@ -166,7 +166,7 @@ QtObject {
/*! Template for the generic mode key.
This template provides a visualization of the key in which the state
- can be on / off. This template is used in situations where the key label
+ can be on or off. This template is used in situations where the key label
will remain the same regardless of status.
The current state is available in the \c control.mode property.
diff --git a/src/virtualkeyboard/styles/styles_plugin.h b/src/virtualkeyboard/styles/styles_plugin.h
index c6d89975..f401fdb9 100644
--- a/src/virtualkeyboard/styles/styles_plugin.h
+++ b/src/virtualkeyboard/styles/styles_plugin.h
@@ -35,7 +35,7 @@
class QtVirtualKeyboardStylesPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
void registerTypes(const char *uri);
diff --git a/src/virtualkeyboard/tcinputmethod.cpp b/src/virtualkeyboard/tcinputmethod.cpp
index 8a7a415a..6628ef7c 100644
--- a/src/virtualkeyboard/tcinputmethod.cpp
+++ b/src/virtualkeyboard/tcinputmethod.cpp
@@ -238,7 +238,7 @@ public:
// Compose back the text after the finals replacement.
input.clear();
for (int i = 0; i < decomposed.length(); ++i) {
- if (decomposed[i] != 0)
+ if (!decomposed[i].isNull())
input.append(decomposed[i]);
}
} else {
diff --git a/src/virtualkeyboard/trace.cpp b/src/virtualkeyboard/trace.cpp
index d87d0a5b..683858af 100644
--- a/src/virtualkeyboard/trace.cpp
+++ b/src/virtualkeyboard/trace.cpp
@@ -103,13 +103,11 @@ public:
\endcode
Trace objects are owned by their creator, which is the input method in
- normal case. This means the objects are constructed in
- \l {AbstractInputMethod::traceBegin()} (C++) or \l {InputMethod::traceBegin()}
- {InputMethod.traceBegin()} (QML) method.
+ normal case. This means the objects are constructed in the
+ \l {InputMethod.traceBegin()} (QML) method.
By definition, the trace object can be destroyed at earliest in the
- \l {AbstractInputMethod::traceEnd()} (C++) or \l {InputMethod::traceEnd()}
- {InputMethod.traceEnd()} (QML) method.
+ \l {InputMethod.traceEnd()} (QML) method.
*/
/*!
@@ -167,13 +165,11 @@ public:
\endcode
Trace objects are owned by their creator, which is the input method in
- normal case. This means the objects are constructed in
- \l {QtVirtualKeyboard::AbstractInputMethod::traceBegin()} (C++) or \l {InputMethod::traceBegin()}
- {InputMethod.traceBegin()} (QML) method.
+ normal case. This means the objects are constructed in the
+ \l {InputMethod.traceBegin()} (QML) method.
By definition, the trace object can be destroyed at earliest in the
- \l {QtVirtualKeyboard::AbstractInputMethod::traceEnd()} (C++) or \l {InputMethod::traceEnd()}
- {InputMethod.traceEnd()} (QML) method.
+ \l {InputMethod.traceEnd()} (QML) method.
*/
/*! \internal */
diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro
index 44cd01b4..23d9b414 100644
--- a/src/virtualkeyboard/virtualkeyboard.pro
+++ b/src/virtualkeyboard/virtualkeyboard.pro
@@ -159,6 +159,12 @@ contains(CONFIG, lang-pt.*) {
t9write: LAYOUT_FILES += \
content/layouts/pt_PT/handwriting.qml
}
+contains(CONFIG, lang-ro.*) {
+ LAYOUT_FILES += \
+ content/layouts/ro_RO/main.qml \
+ content/layouts/ro_RO/symbols.qml \
+ content/layouts/ro_RO/handwriting.qml
+}
contains(CONFIG, lang-ru.*) {
LAYOUT_FILES += \
content/layouts/ru_RU/main.qml \
@@ -215,9 +221,8 @@ qtquickcompiler: DEFINES += COMPILING_QML
exists(3rdparty/hunspell/src/hunspell/hunspell.h) {
SOURCES += hunspellinputmethod.cpp hunspellinputmethod_p.cpp hunspellworker.cpp
HEADERS += hunspellinputmethod.h hunspellinputmethod_p.h hunspellworker.h
- DEFINES += HAVE_HUNSPELL HUNSPELL_STATIC
- INCLUDEPATH += 3rdparty/hunspell/src
- LIBS += -L$$OUT_PWD/../../lib -lqthunspell$$qtPlatformTargetSuffix()
+ DEFINES += HAVE_HUNSPELL
+ QMAKE_USE += hunspell
exists(3rdparty/hunspell/data) {
hunspell_data.files = 3rdparty/hunspell/data/*.dic 3rdparty/hunspell/data/*.aff
hunspell_data.path = $$DATAPATH/hunspell
@@ -245,8 +250,7 @@ pinyin {
pinyininputmethod.h \
pinyindecoderservice.h
DEFINES += HAVE_PINYIN
- INCLUDEPATH += 3rdparty/pinyin/include
- LIBS += -L$$OUT_PWD/../../lib -lqtpinyin$$qtPlatformTargetSuffix()
+ QMAKE_USE += pinyin
pinyin_data.files = $$PWD/3rdparty/pinyin/data/dict_pinyin.dat
pinyin_data.path = $$DATAPATH/pinyin
INSTALLS += pinyin_data
@@ -261,8 +265,7 @@ tcime {
DEFINES += HAVE_TCIME
cangjie: DEFINES += HAVE_TCIME_CANGJIE
zhuyin: DEFINES += HAVE_TCIME_ZHUYIN
- INCLUDEPATH += 3rdparty/tcime
- LIBS += -L$$OUT_PWD/../../lib -lqttcime$$qtPlatformTargetSuffix()
+ QMAKE_USE += tcime
tcime_data.files = \
$$PWD/3rdparty/tcime/data/qt/dict_phrases.dat
cangjie: tcime_data.files += \
@@ -288,9 +291,7 @@ openwnn {
SOURCES += openwnninputmethod.cpp
HEADERS += openwnninputmethod.h
DEFINES += HAVE_OPENWNN
- INCLUDEPATH += 3rdparty/openwnn/wnnEngine/include
- # OpenWNN engine
- LIBS += -L$$OUT_PWD/../../lib -lqtopenwnn$$qtPlatformTargetSuffix()
+ QMAKE_USE += openwnn
}
lipi-toolkit:t9write: \
@@ -318,6 +319,10 @@ lipi-toolkit {
win32: LIBS += Advapi32.lib
else: LIBS += -ldl
record-trace-input: DEFINES += QT_VIRTUALKEYBOARD_LIPI_RECORD_TRACE_INPUT
+ ltk_projects.files = $$PWD/3rdparty/lipi-toolkit/projects
+ ltk_projects.path = $$[QT_INSTALL_DATA]/qtvirtualkeyboard/lipi_toolkit
+ INSTALLS += ltk_projects
+ !prefix_build: COPIES += ltk_projects
}
t9write {
@@ -332,8 +337,8 @@ t9write {
t9writeinputmethod.h \
t9writeworker.h
DEFINES += HAVE_T9WRITE
+ QMAKE_USE += t9write_db
INCLUDEPATH += $$T9WRITE_INCLUDE_DIRS
- LIBS += -L$$OUT_PWD/../../lib -lqtt9write_db$$qtPlatformTargetSuffix()
LIBS += $$T9WRITE_ALPHABETIC_LIBS
}
diff --git a/src/virtualkeyboard/virtualkeyboardsettings.cpp b/src/virtualkeyboard/virtualkeyboardsettings.cpp
index bbb16092..12bc226e 100644
--- a/src/virtualkeyboard/virtualkeyboardsettings.cpp
+++ b/src/virtualkeyboard/virtualkeyboardsettings.cpp
@@ -71,10 +71,7 @@ public:
for (int i = importPathList.size() - 1; i >= 0; --i) {
const QString stylesPath = importPathList.at(i)
+ QStringLiteral("/QtQuick/VirtualKeyboard/Styles/");
- if (QFileInfo(stylesPath).isDir()) {
- styleImportPathList += stylesPath;
- break;
- }
+ styleImportPathList += stylesPath;
}
for (const QString &styleImportPath : qAsConst(styleImportPathList)) {
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 47f3c50a..508e6f97 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -2,4 +2,5 @@ TEMPLATE = subdirs
SUBDIRS += \
inputpanel \
+ styles \
diff --git a/tests/auto/styles/data/QtQuick/VirtualKeyboard/Styles/test/style.qml b/tests/auto/styles/data/QtQuick/VirtualKeyboard/Styles/test/style.qml
new file mode 100644
index 00000000..efb8e3bd
--- /dev/null
+++ b/tests/auto/styles/data/QtQuick/VirtualKeyboard/Styles/test/style.qml
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Jeremy Katz
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.VirtualKeyboard 2.1
+import QtQuick.VirtualKeyboard.Styles 2.1
+
+KeyboardStyle {
+
+}
diff --git a/tests/auto/styles/data/tst_styles.qml b/tests/auto/styles/data/tst_styles.qml
new file mode 100644
index 00000000..0b4d3b37
--- /dev/null
+++ b/tests/auto/styles/data/tst_styles.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Jeremy Katz
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtTest 1.0
+import QtQuick 2.0
+import QtQuick.VirtualKeyboard.Settings 2.0
+
+Item {
+
+ TestCase {
+ id: testcase
+ name: "tst_styles"
+
+ function test_style_data() {
+ return [
+ { tag: "default", result: "default"},
+ { tag: "retro", result: "retro"}, // in-source alternate style
+ { tag: "test", result: "test"} // out-of-source alternate style
+ ];
+ }
+
+ function test_style(data) {
+ VirtualKeyboardSettings.styleName = data.tag;
+ compare(VirtualKeyboardSettings.styleName, data.result,
+ "Failed setting VirtualKeyboardSettings.styleName to " + data.result);
+ }
+
+ function test_unknownStyle() {
+ var previous = VirtualKeyboardSettings.styleName;
+ VirtualKeyboardSettings.styleName = "bogus";
+ compare(VirtualKeyboardSettings.styleName, previous,
+ "Unknown style names should be ignored");
+ }
+ }
+}
diff --git a/tests/auto/styles/styles.pro b/tests/auto/styles/styles.pro
new file mode 100644
index 00000000..eda24717
--- /dev/null
+++ b/tests/auto/styles/styles.pro
@@ -0,0 +1,23 @@
+TEMPLATE = app
+TARGET = tst_styles
+
+QT += testlib
+CONFIG += qmltestcase console
+
+static {
+ QT += svg
+ QTPLUGIN += qtvirtualkeyboardplugin
+}
+
+SOURCES += $$PWD/tst_styles.cpp
+
+TESTDATA = $$PWD/data/*
+DEFINES += TESTDATA_DIR=\\\"$$_PRO_FILE_PWD_/data\\\"
+
+OTHER_FILES += \
+ $$PWD/data/tst_styles.qml \
+
+DISTFILES += \
+ data/tst_styles.qml \
+ data/QtQuick/VirtualKeyboard/Styles/test/style.qml \
+
diff --git a/tests/auto/styles/tst_styles.cpp b/tests/auto/styles/tst_styles.cpp
new file mode 100644
index 00000000..3d2a329f
--- /dev/null
+++ b/tests/auto/styles/tst_styles.cpp
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Jeremy Katz
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQuickTest/quicktest.h>
+#include <QByteArray>
+
+static bool s_configImport = qputenv("QML2_IMPORT_PATH", TESTDATA_DIR);
+static bool s_configIM = qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
+
+QUICK_TEST_MAIN(styles)