import QtQuick 1.0
+import QtMobility.feedback 1.1
Rectangle {
id: linePad
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
fill: parent
margins: -(inputLine.height - height)/2
}
- onClicked: inputLine.text = ''
+ onClicked: {
+ buttonFeedback.start()
+ inputLine.text = ''
+ }
}
}
}
MouseArea {
anchors.fill: parent
onClicked: {
+ buttonFeedback.start()
inputLine.text += modelData
}
}
onTextChanged: {
gstation.text = ''
-
- if (lineSelector.selectedIndex === -1) {
- text = text.toUpperCase()
- return
- }
}
MouseArea {
LineSheet {
id: lineSheet
- onAccepted: gline.text = currentLine
+ onAccepted: {
+ gline.text = currentLine
+
+ /* We usually want to select a station after selecting a line */
+ stationPickerButton.clicked()
+ }
}
Button {
width: 60
iconSource: 'image://theme/icon-m-common-search'
- onClicked: lineSheet.open()
+ onClicked: {
+ lineSheet.currentLine = ''
+ lineSheet.open()
+ }
}
TextField {