Continuing bar updated with dim values
This commit is contained in:
parent
6c5f8af5ed
commit
f9c9e17c39
3 changed files with 16 additions and 11 deletions
|
@ -61,6 +61,10 @@ Rectangle{
|
|||
dialog.absoluteHour = parentPointAbsoluteHour;
|
||||
}
|
||||
|
||||
onDimvalueChanged: {
|
||||
updateBars();
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: pointRectMouseArea
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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()){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue