import QtQuick 1.0
+import QtMobility.feedback 1.1
Rectangle {
id: linePad
property alias currentLine: inputLine.text
+ signal accept
+
/* List of available lines - will be filled w/ real data by LineSheet */
property variant availableLines: ['59A', '63A', '58']
if (matches !== undefined) {
if (matches.length == 1) {
inputLine.text = matches[0];
+ accept();
}
}
}
height: 800
width: 480
+ HapticsEffect {
+ id: buttonFeedback
+
+ /**
+ * Ideally we would use ThemeEffect here,
+ * but on Harmattan it has no effect (sic)
+ **/
+
+ attackIntensity: 0.5
+ attackTime: 100
+ intensity: 1.0
+ duration: 50
+ fadeTime: 0
+ fadeIntensity: 0.0
+ }
+
Text {
id: inputLine
horizontalAlignment: Text.AlignHCenter
MouseArea {
anchors {
fill: parent
- margins: -(inputLine.height - height)/2
+ margins: -30
+ }
+ onClicked: {
+ buttonFeedback.start()
+ inputLine.text = ''
}
- onClicked: inputLine.text = ''
}
}
}
x: width*(index%3)
y: inputLine.height + height*parseInt(index/3)
+ Image {
+ source: 'ubahnicon.png'
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.bottom
+ }
+ visible: (inputElement.ch === 'U')
+ }
+
Text {
+ id: text
+ visible: (inputElement.ch !== 'U')
anchors.centerIn: parent
text: modelData
font {
bold: true
}
color: {
- if (inputState.isMetro) {
+ if (inputState.isMetro || ch == 'U') {
return 'white';
} else if (inputElement.isCandidate) {
return 'black';
MouseArea {
anchors.fill: parent
onClicked: {
- inputLine.text += modelData
+ if( inputElement.isCandidate) {
+ buttonFeedback.start()
+ inputLine.text += modelData
+ }
}
}
}