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
}
}