Continuing bar updated with dim values

This commit is contained in:
Stefan Persson 2011-02-02 09:38:38 +00:00
parent 6c5f8af5ed
commit f9c9e17c39
3 changed files with 16 additions and 11 deletions

View file

@ -61,6 +61,10 @@ Rectangle{
dialog.absoluteHour = parentPointAbsoluteHour;
}
onDimvalueChanged: {
updateBars();
}
MouseArea {
id: pointRectMouseArea
acceptedButtons: Qt.LeftButton | Qt.RightButton

View file

@ -296,15 +296,6 @@ import "schedulerscripts.js" as Scripts
state: "continuing"
}
Item{
//TODO eller ska detta VARA början-rektanglen?
id: previousDay
states: State{
name: "isFirst"; when: daydate > getPreviousDayDate()
PropertyChanges{ target: dayListView; endsWith: "NÅGOT" }
}
}
ListView.onAdd: SequentialAnimation {
PropertyAction { target: mainRow; property: "height"; value: 0 }
NumberAnimation { target: mainRow; property: "height"; to: 50; duration: 250; easing.type: Easing.InOutQuad }

View file

@ -218,7 +218,8 @@ function updateEndsWith(){
*/
if(deviceRow.hasPoints()){
print("HAS POINTS ..........");
print("Dayindex " + dayIndex + " HAS POINTS ..........");
print("Current day index: " + currentDayIndex);
startIndex = dayIndex;
break;
}
@ -239,6 +240,7 @@ function updateEndsWith(){
if(i == days.length-1){
//last one, bind the first one too then
deviceRow = days[startIndex].children[0].children[parseInt(deviceIndex[device])];
print("In last one");
assignContinuingBarProperties(deviceRow, previousEndPoint, dayIndex, false);
}
}
@ -253,8 +255,16 @@ function assignContinuingBarProperties(deviceRow, previousEndPoint, dayIndex, fi
deviceRow.continuingBar.prevDayWidth = 0;
}
else{
print("Color: " + previousEndPoint.actionTypeColor);
print("Opacity: " + previousEndPoint.actionTypeOpacity);
deviceRow.continuingBar.prevDayColor = previousEndPoint.actionTypeColor;
deviceRow.continuingBar.prevDayOpacity = previousEndPoint.actionTypeOpacity;
if(previousEndPoint.state == "dim"){
deviceRow.continuingBar.prevDayOpacity = previousEndPoint.dimvalue/100;
}
else{
deviceRow.continuingBar.prevDayOpacity = previousEndPoint.actionTypeOpacity;
}
}
if(deviceRow.hasPoints()){