Skip to content
Snippets Groups Projects
Commit 0a3d35b7 authored by Kaj Grönholm's avatar Kaj Grönholm
Browse files

HomeAutomation: Animate UI components appearance

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