Marquee loop can now be paused and resumed.
Cleaning up our MiniDisplay coneection to render loop API.
2 import QtQuick.Controls 1.2
6 height: scrollingText.height
9 property int pixelsPerSeconds:25
10 property alias text: scrollingText.text
11 property alias separator: separatorText.text
15 antialiasing: item.antialiasing
21 x:scrollingText.x+scrollingText.width
22 antialiasing: item.antialiasing
27 text:scrollingText.text
28 x:scrollingText.x+scrollingText.width+separatorText.width
29 antialiasing: item.antialiasing
34 loops: Animation.Infinite;
35 //Reset to zero and restart onStopped so that we keep looping
36 //onStopped: {scrollingText.x=0;running=true;}
38 property int lengthInPixels:(scrollingText.width+separatorText.width)-scrollingText.x;
39 property int durationInMs:(animation.lengthInPixels)*1000/pixelsPerSeconds;
42 id: animationScrollingTest
43 target: scrollingText;
45 from: scrollingText.x;
46 to: scrollingText.x-animation.lengthInPixels;
47 duration:animation.durationInMs
51 target: separatorText;
53 from: separatorText.x;
54 to: separatorText.x-animation.lengthInPixels;
55 duration: animation.durationInMs
59 target: followingText;
61 from: followingText.x;
62 to: followingText.x-animation.lengthInPixels;
63 duration: animation.durationInMs
73 //animation.running=!animation.running;
75 if (!animation.running) {
81 //console.log("resume")
86 //console.log("pause")