Commit 0a3d35b7 authored by Kaj Grönholm's avatar Kaj Grönholm

HomeAutomation: Animate UI components appearance

Task-number: QT3DS-1050
parent 9e52ceab
......@@ -74,11 +74,11 @@ Item {
Timer {
id: showMenuTimer
interval: 1000
interval: 750
running: false
repeat: false
onTriggered: mainMenu.visible = true
onTriggered: mainMenu.show = true
}
signal studio3DPresentationReady()
......@@ -120,41 +120,41 @@ Item {
if (currentSlideName === "Livingroom") {
currentTempAttribute = livingRoomHeat.elementPath + ".HeatAreas_Heat_LivingRoom.Heat_LivingRoomSG"
currentLightAttribute = "Scene.3D.RoomLights.LivingroomLightMap.House"
sliderToolbar.visible = true
sliderToolbar.show = true
} else if (currentSlideName === "Masterbedroom") {
currentTempAttribute = masterBedroomHeat.elementPath + ".HeatAreas_Heat_MasterBedroom.Heat_MasterBedroomSG"
currentLightAttribute = "Scene.3D.RoomLights.MasterbedroomLightmap.House"
sliderToolbar.visible = true
sliderToolbar.show = true
} else if (currentSlideName === "Bedroom") {
currentTempAttribute = bedroomHeat.elementPath + ".HeatAreas_Heat_BedRoom.Heat_BedRoomSG"
currentLightAttribute = "Scene.3D.RoomLights.BedroomLightmap.House"
sliderToolbar.visible = true
sliderToolbar.show = true
} else if (currentSlideName === "Bathroom") {
currentTempAttribute = bathRoomHeat.elementPath + ".HeatAreas_Heat_BathRoom.Heat_BathRoomSG"
currentLightAttribute = "Scene.3D.RoomLights.BathroomLightmap.House"
sliderToolbar.visible = true
sliderToolbar.show = true
} else if (currentSlideName === "Entrance") {
currentTempAttribute = entranceHeat.elementPath + ".Heat_Entrance_HeatAreas.Heat_EntranceSG"
currentLightAttribute = "Scene.3D.RoomLights.EntranceLightmap.House"
sliderToolbar.visible = true
sliderToolbar.show = true
} else if (currentSlideName === "FloorPlan") {
startTimer = true;
sliderToolbar.visible = false
sliderToolbar.show = false
} else {
sliderToolbar.visible = false
sliderToolbar.show = false
}
presentation.switchToRoom(currentSlideName);
if (currentSlideName === "FloorPlan") {
if (previousSlideName === "InitialView")
mainMenu.visible = true
mainMenu.show = true
else
showMenuTimer.start()
} else {
if (showMenuTimer.running)
showMenuTimer.stop()
mainMenu.visible = false
mainMenu.show = false
}
if (startTimer)
......@@ -245,9 +245,17 @@ Item {
MainMenu {
id: mainMenu
property bool show: false
property int currentIndex: -1
visible: false
visible: opacity > 0
opacity: show
Behavior on opacity {
NumberAnimation {
duration: 250
easing.type: Easing.InOutQuad
}
}
anchors.fill: parent
onCurrentMenuItemChanged: {
......@@ -270,12 +278,20 @@ Item {
//
Item {
id: sliderToolbar
property bool show: false
anchors.bottom: parent.bottom
height: tempSlider.height
anchors.horizontalCenter: parent.horizontalCenter
width: lightControlLoader.width + sizesMap.controlMargin + tempSlider.width
visible: false
visible: opacity > 0
opacity: show
Behavior on opacity {
NumberAnimation {
duration: 250
easing.type: Easing.InOutQuad
}
}
Loader {
id: lightControlLoader
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment