Add sample qml application
[staging/HomeScreen.git] / sample-qml / apps / HVAC / HVAC.qml
1 /* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved.
2  *
3  * This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 import QtQuick 2.0
8 import system 1.0
9 import utils 1.0
10 import "models"
11
12 App {
13     appId: "hvac"
14
15     HazardButton {
16         id: hazardButton
17         y: 100
18         anchors.horizontalCenter: parent.horizontalCenter
19     }
20
21     TempSlider {
22         id: lTempSlider
23         x: 30
24         anchors.top: hazardButton.bottom
25         anchors.topMargin: 115
26         side: "left"
27     }
28
29     Row {
30         anchors.horizontalCenter: parent.horizontalCenter
31         anchors.top: hazardButton.bottom
32         anchors.topMargin: 90
33         spacing: 200
34
35
36         MiddleColumn { side: "left" }
37         MiddleColumn { side: "right" }
38     }
39
40     TempSlider {
41         id: rTempSlider
42         anchors.top: hazardButton.bottom
43         anchors.topMargin: 115
44         anchors.right: parent.right
45         anchors.rightMargin: 30
46         side: "right"
47     }
48
49     Image {
50         y: 1057
51         source: "images/separator.png"
52     }
53
54     FanControl {
55         x: 259
56         y: 1092
57     }
58
59     Item {
60         anchors.horizontalCenter: parent.horizontalCenter
61         width: childrenRect.width
62         height: childrenRect.height
63         anchors.bottom: parent.bottom
64         anchors.bottomMargin: 40
65
66         Row {
67             spacing: 20
68
69             Column {
70                 spacing: 10
71
72                 ClimateButton { image: "fan_dir_down"; target: "fanDown" }
73                 ClimateButton { image: "fan_dir_right"; target: "fanRight" }
74                 ClimateButton { image: "fan_dir_up"; target: "fanUp" }
75             }
76
77             ClimateButton {
78                 y: 156
79                 image: "fan_control_ac"; target: "fanAC"
80             }
81             ClimateButton { y: 156; image: "fan_control_auto"; target: "fanAuto" }
82             ClimateButton { y: 156; image: "fan_control_circ"; target: "fanRecirc" }
83
84             Column {
85                 spacing: 10
86
87                 ClimateButton { image: "defrost_max"; target: "defrostMax" }
88                 ClimateButton { image: "defrost_rear"; target: "defrostRear" }
89                 ClimateButton { image: "defrost_front"; target: "defrostFront" }
90             }
91         }
92     }
93 }