function setMax(intiger) { maximum=intiger }
function setMin(intiger) { minimum=intiger }
- function setValue(intiger) { value= intiger }
+ function setValue(intiger) {
+ value= intiger;
+ if(intiger>-1){
+ highlight.anchors.leftMargin=0;
+ highlight.anchors.position=0;
+ }
+ }
function setValue2(intiger) { value2= intiger }
width: 250;
}
}
- Behavior on anchors.leftMargin {
+ Behavior on position {
SequentialAnimation{
- loops: Animation.Infinite
- SmoothedAnimation { velocity: 450; to: progressBar.width - 96}
- SmoothedAnimation { velocity: 450; to: 6 }
+ loops: (value>-1)?0:Animation.Infinite
+ SmoothedAnimation { velocity:450 ; to: progressBar.width - 96}
+ SmoothedAnimation { velocity: 450 ; to: 6 }
}
}
anchors.verticalCenter: parent.verticalCenter
color: "white"
font.bold: true
- text: (value>-1) ? (Math.floor((value - minimum) / (maximum - minimum) * 100) + '%') : ("???");
+ text: (value>-1) ? (Math.floor((value - minimum) / (maximum - minimum) * 100) + '%') : ("");
}
}