aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/styles/KeyboardStyle.qml
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2016-11-29 16:07:17 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-01-14 10:42:39 +0000
commit0a8c8dfc6d4e2b95195b855fcdd1fbd852fdb679 (patch)
tree998317bb475a05dcc82880afa401440fc43c847f /src/virtualkeyboard/styles/KeyboardStyle.qml
parent58bdb78952d2c9a238507c0c7ea42505dd24664a (diff)
Add language popup
This change adds language popup as an alternative method for selecting the input language. The language popup is enabled when the active style supports it. This change adds the support for the default style. The popup opens from the change language key with single tap and can be dismissed by tapping anywhere else on the keyboard. The old toggle method for changing the input language is still available and supported (can be enabled easily from keyboard style). Some basic tests are included in this change. [ChangeLog] Added language selection popup for faster selection of input language. Change-Id: Ie3773f1d0cac78dee8237285e8596fe57c8bb5e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/virtualkeyboard/styles/KeyboardStyle.qml')
-rw-r--r--src/virtualkeyboard/styles/KeyboardStyle.qml63
1 files changed, 58 insertions, 5 deletions
diff --git a/src/virtualkeyboard/styles/KeyboardStyle.qml b/src/virtualkeyboard/styles/KeyboardStyle.qml
index 8c4dd153..547aa8be 100644
--- a/src/virtualkeyboard/styles/KeyboardStyle.qml
+++ b/src/virtualkeyboard/styles/KeyboardStyle.qml
@@ -236,7 +236,7 @@ QtObject {
/*! Template for the alternative keys list item.
- \note The delegate is used as \c ListView.delegate.
+ \note The delegate is used in a \l ListView.
*/
property Component alternateKeysListDelegate: null
@@ -254,8 +254,8 @@ QtObject {
/*! Template for the selection list item.
- \note The delegate is used as \c ListView.delegate.
- \note The delegate must be based on the SelectionListItem type.
+ \note The delegate is used in a \l ListView.
+ \note The delegate must be based on the \l SelectionListItem type.
The following properties are available to the item:
\list
@@ -323,8 +323,8 @@ QtObject {
Template for the popup list item.
- \note The delegate is used as \c ListView.delegate.
- \note The delegate must be based on the SelectionListItem type.
+ \note The delegate is used in a \l ListView.
+ \note The delegate must be based on the \l SelectionListItem type.
The following properties are available to the item:
\list
@@ -362,6 +362,59 @@ QtObject {
*/
property Transition popupListRemove
+ /*! \since QtQuick.VirtualKeyboard.Styles 2.1
+
+ This property determines whether a popup list will be shown when the
+ language key is clicked. If this property is \c false, clicking the
+ language key cycles through the available languages one at a time.
+
+ The default value is \c false.
+ */
+ property bool languagePopupListEnabled: false
+
+ /*! \since QtQuick.VirtualKeyboard.Styles 2.1
+
+ Template for the language list item.
+
+ \note The delegate is used in a \l ListView.
+ \note The delegate must be based on the \l SelectionListItem type.
+
+ The following properties are available to the item:
+ \list
+ \li \c display Display text for the current item.
+ \li \c wordCompletionLength Word completion length measured from the end of the display text.
+ \endlist
+ */
+ property Component languageListDelegate: null
+
+ /*! \since QtQuick.VirtualKeyboard.Styles 2.1
+
+ Template for the language list highlight.
+
+ \note The delegate is used as \c ListView.highlight.
+ */
+ property Component languageListHighlight: null
+
+ /*! \since QtQuick.VirtualKeyboard.Styles 2.1
+
+ Template for the language list background.
+ */
+ property Component languageListBackground: null
+
+ /*! \since QtQuick.VirtualKeyboard.Styles 2.1
+
+ This property holds the transition to apply to items that
+ are added to the language list view.
+ */
+ property Transition languageListAdd
+
+ /*! \since QtQuick.VirtualKeyboard.Styles 2.1
+
+ This property holds the transition to apply to items that
+ are removed from the language list view.
+ */
+ property Transition languageListRemove
+
/*!
\since QtQuick.VirtualKeyboard.Styles 2.1