~thomas-moenicke/phablet-extras/maliit-plugins-url-layout

« back to all changes in this revision

Viewing changes to nemo-keyboard/qml/assets/PortraitVKB.qml

  • Committer: Michael Hasselmann
  • Author(s): Jakub Pavelek
  • Date: 2011-12-07 15:41:47 UTC
  • Revision ID: git-v1:6f3e49eab01e931e2e3db359aac8235f8f7bf220
New: Nemo keyboard

RevBy: Jon Nordby, Michael Hasselmann
Added directory nemo-keyboard with implementation and modified
maliit-plugins.pro to build and install it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of Maliit plugins
 
3
 *
 
4
 * Copyright (C) Jakub Pavelek <jpavelek@live.com>
 
5
 *
 
6
 * Redistribution and use in source and binary forms, with or without modification,
 
7
 * are permitted provided that the following conditions are met:
 
8
 *
 
9
 * Redistributions of source code must retain the above copyright notice, this list
 
10
 * of conditions and the following disclaimer.
 
11
 * Redistributions in binary form must reproduce the above copyright notice, this list
 
12
 * of conditions and the following disclaimer in the documentation and/or other materials
 
13
 * provided with the distribution.
 
14
 * Neither the name of Nokia Corporation nor the names of its contributors may be
 
15
 * used to endorse or promote products derived from this software without specific
 
16
 * prior written permission.
 
17
 *
 
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
 
19
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 
20
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
 
21
 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
22
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 
23
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 
25
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
26
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
27
 *
 
28
 */
 
29
 
 
30
import Qt 4.7
 
31
import "KeyboardUiConstants.js" as UI
 
32
 
 
33
Rectangle {
 
34
    id: vkb
 
35
    color: UI.BG_COLOR
 
36
    z: 100
 
37
    width: UI.PORTRAIT_WIDTH
 
38
    height: UI.PORTRAIT_HEIGHT
 
39
 
 
40
    Flickable {
 
41
        id: flickable
 
42
        anchors.fill: parent
 
43
        flickableDirection: Flickable.VerticalFlick
 
44
        onFlickStarted: {
 
45
            if (Math.abs(contentY) > UI.FLICK_CLOSE_DISTANCE) {
 
46
                //Long enough to care
 
47
                if (contentY < 0) {
 
48
                    MInputMethodQuick.userHide();
 
49
                } else {
 
50
                    console.log("SWITCH")
 
51
                }
 
52
            }
 
53
        }
 
54
        //TODO - loader here?
 
55
        //RussianPortrait {}
 
56
        EnglishPortrait {}
 
57
    }
 
58
}