summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-04-11 15:33:24 +0200
committerGunnar Sletta <gunnar.sletta@digia.com>2013-04-11 15:33:24 +0200
commit4fa8c1974870a9d33f29dbb6de73b5d704a60008 (patch)
tree9223ef74895f7660f3edbce758e5e0bb5c48af5a /src/imports
parentc140638eb970d19f0a5655acbf8bebd79b1e60bf (diff)
Made the virtual keyboard stuff compile
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/virtualkeyboard/platforminputcontext/plugin.cpp2
-rw-r--r--src/imports/virtualkeyboard/qmldir2
-rw-r--r--src/imports/virtualkeyboard/qmlmodule.pro3
-rw-r--r--src/imports/virtualkeyboard/virtualkeyboard.qml123
4 files changed, 4 insertions, 126 deletions
diff --git a/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp b/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp
index f63205f..3b67024 100644
--- a/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp
+++ b/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp
@@ -73,6 +73,8 @@ QPlatformInputContext *PlatformInputContextPlugin::create(const QString& system,
{
Q_UNUSED(paramList);
+ qDebug("created...");
+
qmlRegisterSingletonType<DeclarativeInputContext>("Boot2Qt.InputContext", 1, 0, "InputContext", createInputContextModule);
if (system.compare(system, QStringLiteral("b2qtinputcontext"), Qt::CaseInsensitive) == 0)
diff --git a/src/imports/virtualkeyboard/qmldir b/src/imports/virtualkeyboard/qmldir
new file mode 100644
index 0000000..10e8915
--- /dev/null
+++ b/src/imports/virtualkeyboard/qmldir
@@ -0,0 +1,2 @@
+module Qt.labs.virtualkeyboard
+Keyboard 1.0 Keyboard.qml
diff --git a/src/imports/virtualkeyboard/qmlmodule.pro b/src/imports/virtualkeyboard/qmlmodule.pro
index 7f5c2b6..008a9be 100644
--- a/src/imports/virtualkeyboard/qmlmodule.pro
+++ b/src/imports/virtualkeyboard/qmlmodule.pro
@@ -8,7 +8,6 @@ QML_FILES = \
images/enter.png \
images/keypad.png \
images/hidekeyboard.png \
- TextField.qml \
components/AutoScroller.qml \
components/InputEngine.qml \
components/HideKeyboardKey.qml \
@@ -26,12 +25,10 @@ QML_FILES = \
components/PressedKey.qml \
components/BackspaceKey.qml \
Keyboard.qml \
- TextBase.qml \
layouts/symbols.qml \
layouts/numbers.qml \
layouts/ar_AR.qml \
layouts/en_GB.qml \
layouts/fi_FI.qml \
- ScrollBar.qml \
load(qml_module)
diff --git a/src/imports/virtualkeyboard/virtualkeyboard.qml b/src/imports/virtualkeyboard/virtualkeyboard.qml
deleted file mode 100644
index efeb482..0000000
--- a/src/imports/virtualkeyboard/virtualkeyboard.qml
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "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 Nokia Corporation and its Subsidiary(-ies) 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 COPYRIGHT
-** OWNER 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."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-
-Image {
- source: "content/images/background.png"
-
- Keyboard {}
- Flickable {
- id: flickable
-
- property real scrollMarginVertical: 20
-
- width: parent.width
- contentWidth: content.width
- contentHeight: content.height
- interactive: contentHeight > height
- height: Qt.inputMethod.keyboardRectangle.y
- flickableDirection: Flickable.VerticalFlick
- children: ScrollBar {}
-
- MouseArea {
- id: content
-
- width: flickable.width
- height: textEditors.height + 24
-
- onClicked: {
- if (Qt.inputMethod.inputItem)
- Qt.inputMethod.inputItem.focus = false
- }
-
- Column {
- id: textEditors
- spacing: 15
- x: 12; y: 12
- width: parent.width - 26
-
- Text {
- color: "#EEEEEE"
- text: "Tap fields to enter text"
- anchors.horizontalCenter: parent.horizontalCenter
- font.pixelSize: 22
- }
- TextField {
- width: parent.width
- previewText: "One line field"
- enterKeyText: "Next"
- enterKeyEnabled: text.length > 0
- onEnterKeyClicked: passwordField.focus = true
- }
- TextField {
- id: passwordField
-
- width: parent.width
- echoMode: TextInput.PasswordEchoOnEdit
- previewText: "Password field"
- inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
- enterKeyText: "Next"
- enterKeyEnabled: text.length > 0
- onEnterKeyClicked: numberField.focus = true
- }
- TextField {
- id: numberField
-
- validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ }
- width: parent.width
- previewText: "Phone number field"
- inputMethodHints: Qt.ImhDialableCharactersOnly
- enterKeyText: "Next"
- enterKeyEnabled: text.length > 0
- onEnterKeyClicked: textArea.focus = true
- }
- TextArea {
- id: textArea
-
- width: parent.width
- previewText: "Multiple lines field"
- height: Math.max(206, implicitHeight)
- }
- }
- }
- }
-}