6 property int minimum: 0
7 property int maximum: 100
9 property int value2: 50
11 function setMax(intiger) { maximum=intiger }
12 function setMin(intiger) { minimum=intiger }
13 function setValue(intiger) {
16 highlight.anchors.leftMargin=0;
17 highlight.anchors.position=0;
20 function setValue2(intiger) { value2= intiger }
27 source: "qrc:/progressBar/background.png"
28 width: parent.width; height: parent.height
29 border { left: 4; top: 4; right: 4; bottom: 4 }
37 property int widthDest: (progressBar.width * (value - minimum)) / (maximum - minimum) - 6
38 property int position: (progressBar.width * (value2 - minimum)) / (maximum - minimum)
40 width: (value>-1) ? (highlight.widthDest) : (90)
41 anchors.leftMargin: (value>-1) ? (0) : (highlight.position)
49 Behavior on position {
51 loops: (value>-1)?0:Animation.Infinite
52 SmoothedAnimation { velocity:450 ; to: progressBar.width - 96}
53 SmoothedAnimation { velocity: 450 ; to: 6 }
58 anchors.top: parent.top
59 anchors.left: parent.left
61 anchors.bottom: parent.bottom
65 GradientStop {color:"#0510a0"; position: 0.0 }
66 GradientStop {color:"#6b98f7"; position: 1.0 }
72 anchors.right: highlight.right
73 anchors.rightMargin: (value>-1) ? 6 : 35;
74 anchors.verticalCenter: parent.verticalCenter
77 text: (value>-1) ? (Math.floor((value - minimum) / (maximum - minimum) * 100) + '%') : ("");