meson.build: Use 0.0.24 as the agl compositor version
[apps/homescreen.git] / homescreen / qml / background_with_panels.qml
1 import QtQuick 2.13
2 import QtQuick.Window 2.13
3 import QtQuick.Layouts 1.15
4
5 Window {
6     id: background
7     width: Screen.width
8     height: Screen.height
9     flags: Qt.FramelessWindowHint
10     visible: true
11
12     Grid {
13          rows: 3
14          spacing: 0
15
16          Rectangle {
17          width: Screen.width
18          height: 216
19          color: "#33363a"
20
21          Timer {
22              id:notificationTimer
23              interval: 3000
24              running: false
25              repeat: true
26              onTriggered: notificationItem.visible = false
27          }
28
29          Item {
30              id: notificationItem
31              x: 0
32              y: 0
33              z: 1
34              width: 1280
35              height: 100
36              opacity: 0.8
37              visible: false
38
39              Rectangle {
40                  width: parent.width
41                  height: parent.height
42                  anchors.fill: parent
43                  color: "gray"
44                  Image {
45                      id: notificationIcon
46                      width: 70
47                      height: 70
48                      anchors.left: parent.left
49                      anchors.leftMargin: 20
50                      anchors.verticalCenter: parent.verticalCenter
51                      source: ""
52                  }
53
54                  Text {
55                      id: notificationtext
56                      font.pixelSize: 25
57                      anchors.left: notificationIcon.right
58                      anchors.leftMargin: 5
59                      anchors.verticalCenter: parent.verticalCenter
60                      color: "white"
61                      text: qsTr("")
62                  }
63              }
64          }
65
66          Connections {
67              target: homescreenHandler
68              onShowNotification: {
69                  notificationIcon.source = icon_path
70                  notificationtext.text = text
71                  notificationItem.visible = true
72                  notificationTimer.restart()
73              }
74          }
75
76          Image {
77              anchors.fill: parent
78              source: './images/TopSection_NoText_NoIcons-01.svg'
79              //fillMode: Image.PreserveAspectCrop
80              fillMode: Image.Stretch
81
82          RowLayout {
83              anchors.fill: parent
84              spacing: 0
85              ShortcutArea {
86                  id: shortcutArea
87                  Layout.fillWidth: true
88                  Layout.fillHeight: true
89                  Layout.preferredWidth: 775
90              }
91              StatusArea {
92                  id: statusArea
93                  Layout.fillWidth: true
94                  Layout.fillHeight: true
95                  Layout.preferredWidth: 291
96              }
97              }
98          }
99
100         }
101
102         Rectangle {
103              width: Screen.width
104              height: Screen.height - (2 * 216)
105          Image {
106              anchors.fill: parent
107              source: './images/AGL_HMI_Blue_Background_NoCar-01.png'
108          }
109
110         }
111
112         Rectangle {
113          width: Screen.width
114          height: 216
115          color: "#33363a"
116
117          MediaArea {
118          }
119
120          Timer {
121              id:informationTimer
122              interval: 3000
123              running: false
124              repeat: true
125              onTriggered: {
126                  bottomInformation.visible = false
127              }
128          }
129
130          Item {
131              id: bottomInformation
132              width: parent.width
133              height: 216
134              anchors.bottom: parent.bottom
135              visible: false
136              Text {
137                  id: bottomText
138                  anchors.centerIn: parent
139                  font.pixelSize: 25
140                  font.letterSpacing: 5
141                  horizontalAlignment: Text.AlignHCenter
142                  color: "white"
143                  text: ""
144                  z:1
145              }
146          }
147
148          Connections {
149              target: homescreenHandler
150              onShowInformation: {
151                  bottomText.text = info
152                  bottomInformation.visible = true
153                  informationTimer.restart()
154              }
155          }
156
157         }
158     }
159 }