Testing our double marquee.
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
12 property alias font: scrollingText.font
16 antialiasing: item.antialiasing
17 onFontChanged: {item.height=height}
23 font: scrollingText.font
24 x:scrollingText.x+scrollingText.width
25 antialiasing: item.antialiasing
30 text:scrollingText.text
31 font: scrollingText.font
32 x:scrollingText.x+scrollingText.width+separatorText.width
33 antialiasing: item.antialiasing
38 loops: Animation.Infinite;
39 //Reset to zero and restart onStopped so that we keep looping
40 //onStopped: {scrollingText.x=0;running=true;}
42 property int lengthInPixels:(scrollingText.width+separatorText.width)-scrollingText.x;
43 property int durationInMs:(animation.lengthInPixels)*1000/pixelsPerSeconds;
46 id: animationScrollingTest
47 target: scrollingText;
49 from: scrollingText.x;
50 to: scrollingText.x-animation.lengthInPixels;
51 duration:animation.durationInMs
55 target: separatorText;
57 from: separatorText.x;
58 to: separatorText.x-animation.lengthInPixels;
59 duration: animation.durationInMs
63 target: followingText;
65 from: followingText.x;
66 to: followingText.x-animation.lengthInPixels;
67 duration: animation.durationInMs
77 //animation.running=!animation.running;
79 if (!animation.running) {
85 //console.log("resume")
90 //console.log("pause")