6a515fcb6d9dd571767856c313b9f34ce3c3578c
[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     Image {
35         id: container
36         anchors.centerIn: parent
37         width: 1080
38         height: 1920
39         scale: 1.0
40         source: './images/AGL_HMI_Background_NoCar-01.png'
41
42         ColumnLayout {
43             anchors.fill: parent
44             spacing: 0
45             TopArea {
46                 id: topArea
47                 Layout.fillWidth: true
48                 Layout.preferredHeight: 218
49             }
50
51             Item {
52                 id: applicationArea
53                 Layout.fillWidth: true
54                 Layout.fillHeight: true
55                 Layout.preferredHeight: 1920 - 218 - 215
56
57                 visible: true
58             }
59
60             Home {
61                 id: appLauncherAreaLauncher
62                 Layout.fillWidth: true
63                 Layout.fillHeight: true
64                 Layout.preferredHeight: 1920 - 218 - 215
65                 visible: false
66             }
67
68             MediaArea {
69                 id: mediaArea
70                 Layout.fillWidth: true
71                 Layout.fillHeight: true
72                 Layout.preferredHeight: 215
73             }
74         }
75     }
76 }