Integrate Home app into HomeScreen
[staging/HomeScreen.git] / HomeScreen / qml / main.qml
1 /*
2  * Copyright (C) 2016 The Qt Company Ltd.
3  * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 import QtQuick 2.2
19 import QtQuick.Window 2.1
20 import QtQuick.Layouts 1.1
21 import HomeScreen 1.0
22
23 Window {
24     visible: true
25     flags: Qt.FramelessWindowHint
26     width: container.width * container.scale
27     height: container.height * container.scale
28     title: 'HomeScreen'
29
30     ApplicationLauncher {
31         id: launcher
32     }
33
34     LayoutHandler {
35         id: layoutHandler
36     }
37
38     Image {
39         id: container
40         anchors.centerIn: parent
41         width: 1080
42         height: 1920
43         scale: 1.0
44         source: './images/AGL_HMI_Background_NoCar-01.png'
45
46         ColumnLayout {
47             anchors.fill: parent
48             spacing: 0
49             TopArea {
50                 id: topArea
51                 Layout.fillWidth: true
52                 Layout.preferredHeight: 218
53             }
54
55             Item {
56                 id: applicationArea
57                 Layout.fillWidth: true
58                 Layout.fillHeight: true
59                 Layout.preferredHeight: 1920 - 218 - 215
60
61                 visible: true
62             }
63
64             Home {
65                 id: appLauncherAreaLauncher
66                 Layout.fillWidth: true
67                 Layout.fillHeight: true
68                 Layout.preferredHeight: 1920 - 218 - 215
69                 visible: false
70             }
71
72             MediaArea {
73                 id: mediaArea
74                 Layout.fillWidth: true
75                 Layout.fillHeight: true
76                 Layout.preferredHeight: 215
77             }
78         }
79     }
80 }