~thomas-moenicke/phablet-extras/maliit-plugins-0.99-server

« back to all changes in this revision

Viewing changes to maliit-keyboard/qml/Keyboard.qml

when typing, word suggestions now show up on top of keyboard:
- making WordRibbon a ListModel that can be accessed from QML
- adding ListView and delegate to QML to show WordRibbon candidates
- connecting delegates to event handler
- enable presage and preedit in build system.

Approved by PS Jenkins bot, Bill Filler, Thomas Moenicke.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        drag.axis: Drag.YAxis;
64
64
        drag.minimumY: 0
65
65
        drag.maximumY: height
 
66
        drag.filterChildren: true
66
67
 
67
68
        x:0
68
69
        y:0
69
70
        width: parent.width
70
71
        height: parent.height
71
72
 
 
73
 
 
74
    WordRibbon {
 
75
        id: wordRibbon
 
76
 
 
77
        anchors.bottom: keypadMouseArea.top
 
78
        width: parent.width;
 
79
 
 
80
        height: maliit_wordribbon.enabled ? layout.wordribbon_height : 0
 
81
    }
 
82
 
72
83
    MouseArea {
73
84
        id: keypadMouseArea
74
 
 
 
85
        preventStealing: true
75
86
        anchors {
76
 
            top: parent.top
 
87
            top: wordRibbon.bottom
77
88
            fill: parent
78
 
            topMargin: layout.invisible_toucharea_height;
 
89
            topMargin: layout.invisible_toucharea_height + (maliit_wordribbon.enabled ? layout.wordribbon_height : 0);
79
90
        }
80
91
 
81
92
        Item {
98
109
                id: borderTop
99
110
                source: "styles/ubuntu/images/border_top.png"
100
111
                width: parent.width
101
 
                anchors.top: background.top
 
112
                anchors.top: parent.top.bottom
102
113
            }
103
114
 
104
115
            Image {
108
119
                anchors.bottom: background.bottom
109
120
            }
110
121
 
 
122
            Item {
 
123
                id: keyPad
 
124
 
 
125
                anchors.top: borderTop.bottom
 
126
                anchors.bottom: borderBottom.top
 
127
                width: parent.width
 
128
 
111
129
            Repeater {
112
130
                id: keyRepeater
113
131
                model: layout
197
215
                } // Item
198
216
            } // Repeater
199
217
 
 
218
            } // keyPad
 
219
 
200
220
            Popper {
201
221
                id: popper
202
222
                target: pressedKey