diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-11 05:54:49 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-09-11 05:54:49 (GMT) |
commit | f7982be51ec5872dba11d87ea653b791251a0215 (patch) | |
tree | 556dad915f8ffba2c388dba2750e48d52962f71f /examples/declarative/listview/content/ClickAutoRepeating.qml | |
parent | efc7963a15c204db48cb3b6560366410b640e5c3 (diff) | |
parent | e4648700e7e3c84c61d6b012f7d480394b889c31 (diff) | |
download | Qt-f7982be51ec5872dba11d87ea653b791251a0215.zip Qt-f7982be51ec5872dba11d87ea653b791251a0215.tar.gz Qt-f7982be51ec5872dba11d87ea653b791251a0215.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples/declarative/listview/content/ClickAutoRepeating.qml')
-rw-r--r-- | examples/declarative/listview/content/ClickAutoRepeating.qml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml new file mode 100644 index 0000000..19dd6f6 --- /dev/null +++ b/examples/declarative/listview/content/ClickAutoRepeating.qml @@ -0,0 +1,29 @@ +import Qt 4.6 + +Item { + id: Page + property int repeatdelay: 300 + property int repeatperiod: 75 + property bool pressed: false + signal pressed + signal released + signal clicked + pressed: SequentialAnimation { + id: AutoRepeat + PropertyAction { target: Page; property: "pressed"; value: true } + ScriptAction { script: Page.onPressed } + ScriptAction { script: Page.onClicked } + PauseAnimation { duration: repeatdelay } + SequentialAnimation { + repeat: true + ScriptAction { script: Page.onClicked } + PauseAnimation { duration: repeatperiod } + } + } + MouseRegion { + id: MR + anchors.fill: parent + onPressed: AutoRepeat.start() + onReleased: { AutoRepeat.stop(); parent.pressed = false; Page.released } + } +} |