diff options
author | Kalle Viironen <kalle.viironen@digia.com> | 2014-05-26 13:51:28 +0300 |
---|---|---|
committer | Kalle Viironen <kalle.viironen@digia.com> | 2014-05-26 13:51:36 +0300 |
commit | c7edfa22fadbb5041b8dee1d5cd27adfcfb7f833 (patch) | |
tree | 8207705ee648774ed7e6a5922e4f0ab3ca2aa976 /basicsuite/textinput | |
parent | d757a8ee2d86c3f4b694f8fdff5defa7b0dbab75 (diff) | |
parent | 536f2ed4438a1e04aeed372d08c46811603f5018 (diff) |
Merge branch 'stable' into releaseQtEE_v3.0.0
* stable: (28 commits)
webengine demo: rearrange layout to make all links visible on iMX6
webengine demo: add predefined links to page view
Fix webengine demo to hide home screen when adressbar is accepted
webengine demo: disable the pageview when it's hidden
Hide the webengine demo on the new nexus7
Add local CSS tetrahedron example and home page to webengine demo
Disable webengine demo on beaglebone and pi
[launchersettings] Add boundaries for signal strength bar.
Also deploy webengine demo local content
Display an error message if WebGL is not supported.
Add a simple WebEngine demo to the B2Qt basicsuite
Exclude qtdatavis3d from android-beaglebone
Disable autocompletion for password field
workaround for crash on linux
Camera demo doesn't work on new nexus just yet, exclude it
Remove yocto version from about-b2qt demo
remove datavis 3D from RPi launher demos
Fix typo in came exclude
Use consistent title naming
Remove non functional demos from i.MX6 SABRE SD launcher demo set
...
Change-Id: Ib08aba9f746c6f233090d79c38243caa657bf9be
Diffstat (limited to 'basicsuite/textinput')
-rw-r--r-- | basicsuite/textinput/TextArea.qml | 7 | ||||
-rw-r--r-- | basicsuite/textinput/TextBase.qml | 4 | ||||
-rw-r--r-- | basicsuite/textinput/TextField.qml | 14 | ||||
-rw-r--r-- | basicsuite/textinput/main.qml | 49 |
4 files changed, 62 insertions, 12 deletions
diff --git a/basicsuite/textinput/TextArea.qml b/basicsuite/textinput/TextArea.qml index 6832356..89cdc9f 100644 --- a/basicsuite/textinput/TextArea.qml +++ b/basicsuite/textinput/TextArea.qml @@ -40,6 +40,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Enterprise.VirtualKeyboard 1.0 TextBase { id: textArea @@ -64,8 +65,9 @@ TextBase { TextEdit { id: textEdit - property alias enterKeyText: textArea.enterKeyText - property alias enterKeyEnabled: textArea.enterKeyEnabled + EnterKeyAction.actionId: textArea.enterKeyAction + EnterKeyAction.label: textArea.enterKeyText + EnterKeyAction.enabled: textArea.enterKeyEnabled y: 6 focus: true @@ -77,7 +79,6 @@ TextBase { selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) anchors { left: parent.left; right: parent.right; margins: 12 } - onActiveFocusChanged: if (!activeFocus) deselect() } } diff --git a/basicsuite/textinput/TextBase.qml b/basicsuite/textinput/TextBase.qml index 916b3e2..fc399a8 100644 --- a/basicsuite/textinput/TextBase.qml +++ b/basicsuite/textinput/TextBase.qml @@ -40,6 +40,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Enterprise.VirtualKeyboard 1.0 FocusScope { id: textBase @@ -48,8 +49,9 @@ FocusScope { property bool previewTextActive: !editor.activeFocus && text.length === 0 property int fontPixelSize: 32 property string previewText + property int enterKeyAction: EnterKeyAction.None property string enterKeyText - property bool enterKeyEnabled: enterKeyText.length === 0 || editor.text.length > 0 || editor.inputMethodComposing + property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || editor.text.length > 0 || editor.inputMethodComposing property alias mouseParent: mouseArea.parent implicitHeight: editor.height + 12 diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml index e95ded7..b3671d7 100644 --- a/basicsuite/textinput/TextField.qml +++ b/basicsuite/textinput/TextField.qml @@ -40,6 +40,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Enterprise.VirtualKeyboard 1.0 TextBase { id: textField @@ -51,6 +52,7 @@ TextBase { property alias inputMethodHints: textInput.inputMethodHints property alias validator: textInput.validator property alias echoMode: textInput.echoMode + property int passwordMaskDelay: 1000 editor: textInput mouseParent: flickable @@ -70,8 +72,9 @@ TextBase { TextInput { id: textInput - property alias enterKeyText: textField.enterKeyText - property alias enterKeyEnabled: textField.enterKeyEnabled + EnterKeyAction.actionId: textField.enterKeyAction + EnterKeyAction.label: textField.enterKeyText + EnterKeyAction.enabled: textField.enterKeyEnabled y: 6 focus: true @@ -83,6 +86,13 @@ TextBase { selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) width: Math.max(flickable.width, implicitWidth)-2 onActiveFocusChanged: if (!activeFocus) deselect() + + Binding { + target: textInput + property: "passwordMaskDelay" + value: textField.passwordMaskDelay + when: textInput.hasOwnProperty("passwordMaskDelay") + } } } } diff --git a/basicsuite/textinput/main.qml b/basicsuite/textinput/main.qml index 70455bf..bcb48d9 100644 --- a/basicsuite/textinput/main.qml +++ b/basicsuite/textinput/main.qml @@ -40,6 +40,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Enterprise.VirtualKeyboard 1.0 Flickable { id: flickable @@ -76,27 +77,63 @@ Flickable { TextField { width: parent.width previewText: "One line field" - enterKeyText: "Next" + enterKeyAction: EnterKeyAction.Next onEnterKeyClicked: passwordField.focus = true } TextField { id: passwordField width: parent.width - echoMode: TextInput.PasswordEchoOnEdit + echoMode: TextInput.Password previewText: "Password field" inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText - enterKeyText: "Next" - onEnterKeyClicked: numberField.focus = true + enterKeyAction: EnterKeyAction.Next + onEnterKeyClicked: upperCaseField.focus = true } TextField { - id: numberField + id: upperCaseField + + width: parent.width + previewText: "Upper case field" + inputMethodHints: Qt.ImhUppercaseOnly + enterKeyAction: EnterKeyAction.Next + onEnterKeyClicked: lowerCaseField.focus = true + } + TextField { + id: lowerCaseField + + width: parent.width + previewText: "Lower case field" + inputMethodHints: Qt.ImhLowercaseOnly + enterKeyAction: EnterKeyAction.Next + onEnterKeyClicked: phoneNumberField.focus = true + } + TextField { + id: phoneNumberField validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ } width: parent.width previewText: "Phone number field" inputMethodHints: Qt.ImhDialableCharactersOnly - enterKeyText: "Next" + enterKeyAction: EnterKeyAction.Next + onEnterKeyClicked: formattedNumberField.focus = true + } + TextField { + id: formattedNumberField + + width: parent.width + previewText: "Formatted number field" + inputMethodHints: Qt.ImhFormattedNumbersOnly + enterKeyAction: EnterKeyAction.Next + onEnterKeyClicked: digitsField.focus = true + } + TextField { + id: digitsField + + width: parent.width + previewText: "Digits only field" + inputMethodHints: Qt.ImhDigitsOnly + enterKeyAction: EnterKeyAction.Next onEnterKeyClicked: textArea.focus = true } TextArea { |