aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/qml
diff options
context:
space:
mode:
Diffstat (limited to 'homescreen/qml')
-rw-r--r--homescreen/qml/MediaArea.qml3
-rw-r--r--homescreen/qml/MediaAreaBlank.qml3
-rw-r--r--homescreen/qml/ShortcutArea.qml9
-rw-r--r--homescreen/qml/ShortcutIcon.qml11
-rw-r--r--homescreen/qml/StatusArea.qml4
-rw-r--r--homescreen/qml/TopArea.qml10
-rw-r--r--homescreen/qml/background.qml15
-rw-r--r--homescreen/qml/bottompanel.qml50
-rw-r--r--homescreen/qml/qml.qrc5
-rw-r--r--homescreen/qml/toppanel.qml69
10 files changed, 157 insertions, 22 deletions
diff --git a/homescreen/qml/MediaArea.qml b/homescreen/qml/MediaArea.qml
index 3b6d18a..88eaf1e 100644
--- a/homescreen/qml/MediaArea.qml
+++ b/homescreen/qml/MediaArea.qml
@@ -20,8 +20,7 @@ import QtQuick.Controls 2.0
StackView {
id: root
- width: parent.width
- height: parent.height
+ anchors.fill: parent
initialItem: blank
diff --git a/homescreen/qml/MediaAreaBlank.qml b/homescreen/qml/MediaAreaBlank.qml
index 60d0c92..c971f6e 100644
--- a/homescreen/qml/MediaAreaBlank.qml
+++ b/homescreen/qml/MediaAreaBlank.qml
@@ -22,8 +22,7 @@ import AGL.Demo.Controls 1.0
import MasterVolume 1.0
Image {
- width: parent.width
- height: parent.height
+ anchors.fill: parent
source: './images/Utility_Logo_Background-01.svg'
property bool displayVolume: false;
diff --git a/homescreen/qml/ShortcutArea.qml b/homescreen/qml/ShortcutArea.qml
index a8ce127..489b1e0 100644
--- a/homescreen/qml/ShortcutArea.qml
+++ b/homescreen/qml/ShortcutArea.qml
@@ -18,12 +18,10 @@
import QtQuick 2.2
import QtQuick.Layouts 1.1
+import QtQuick.Window 2.2
Item {
id: root
- width: 785
- height: 218
-
ListModel {
id: applicationModel
@@ -53,7 +51,7 @@ Item {
RowLayout {
anchors.fill: parent
- spacing: 2
+ spacing: 0
Repeater {
model: applicationModel
delegate: ShortcutIcon {
@@ -62,9 +60,10 @@ Item {
name: model.name
active: model.name === launcher.current
onClicked: {
+ console.log("Activating: " + model.appid)
homescreenHandler.tapShortcut(model.appid)
}
}
- }
+ }
}
}
diff --git a/homescreen/qml/ShortcutIcon.qml b/homescreen/qml/ShortcutIcon.qml
index 1100a7c..d039d36 100644
--- a/homescreen/qml/ShortcutIcon.qml
+++ b/homescreen/qml/ShortcutIcon.qml
@@ -21,8 +21,6 @@ import QtGraphicalEffects 1.0
MouseArea {
id: root
- width: 195
- height: 216.8
property string name: 'Home'
property bool active: false
Item {
@@ -32,12 +30,14 @@ MouseArea {
Image {
id: inactiveIcon
anchors.fill: parent
- source: './images/Shortcut/%1.svg'.arg(root.name.toLowerCase())
+ source: './images/Shortcut/%1.svg'.arg(root.name.toLowerCase())
+ fillMode: Image.PreserveAspectFit
}
Image {
id: activeIcon
anchors.fill: parent
source: './images/Shortcut/%1_active.svg'.arg(root.name.toLowerCase())
+ fillMode: Image.PreserveAspectFit
opacity: 0.0
}
layer.enabled: true
@@ -49,12 +49,13 @@ MouseArea {
}
Label {
id: name
- y: 160
width: root.width - 10
font.pixelSize: 15
font.letterSpacing: 5
// wrapMode: Text.WordWrap
- anchors.horizontalCenter: parent.horizontalCenter
+ anchors.centerIn: icon
+ anchors.verticalCenterOffset: icon.height * 0.2
+ //anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
color: "white"
text: qsTr(model.name.toUpperCase())
diff --git a/homescreen/qml/StatusArea.qml b/homescreen/qml/StatusArea.qml
index 14ccb8f..507b6db 100644
--- a/homescreen/qml/StatusArea.qml
+++ b/homescreen/qml/StatusArea.qml
@@ -22,8 +22,8 @@ import HomeScreen 1.0
Item {
id: root
- width: 295
- height: 218
+ //width: 295
+ //height: 218
property date now: new Date
Timer {
diff --git a/homescreen/qml/TopArea.qml b/homescreen/qml/TopArea.qml
index 2a75cf8..19bed91 100644
--- a/homescreen/qml/TopArea.qml
+++ b/homescreen/qml/TopArea.qml
@@ -20,10 +20,10 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
Image {
- width: 1920
- height: 218
+ anchors.fill: parent
source: './images/TopSection_NoText_NoIcons-01.svg'
- fillMode: Image.PreserveAspectCrop
+ //fillMode: Image.PreserveAspectCrop
+ fillMode: Image.Stretch
RowLayout {
anchors.fill: parent
@@ -32,13 +32,13 @@ Image {
id: shortcutArea
Layout.fillWidth: true
Layout.fillHeight: true
- Layout.preferredWidth: 785
+ Layout.preferredWidth: 775
}
StatusArea {
id: statusArea
Layout.fillWidth: true
Layout.fillHeight: true
- Layout.preferredWidth: 295
+ Layout.preferredWidth: 291
}
}
diff --git a/homescreen/qml/background.qml b/homescreen/qml/background.qml
new file mode 100644
index 0000000..c2bb309
--- /dev/null
+++ b/homescreen/qml/background.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.13
+import QtQuick.Window 2.13
+
+Window {
+ id: background
+ width: Screen.width
+ height: Screen.height
+ flags: Qt.FramelessWindowHint
+ visible: true
+
+ Image {
+ anchors.fill: parent
+ source: './images/AGL_HMI_Blue_Background_NoCar-01.png'
+ }
+}
diff --git a/homescreen/qml/bottompanel.qml b/homescreen/qml/bottompanel.qml
new file mode 100644
index 0000000..1e0b105
--- /dev/null
+++ b/homescreen/qml/bottompanel.qml
@@ -0,0 +1,50 @@
+import QtQuick 2.13
+import QtQuick.Window 2.13
+
+Window {
+ id: bottompanel
+ width: Screen.width
+ height: Screen.height * (215.0 / 1920.0)
+ flags: Qt.FramelessWindowHint
+ visible: true
+ //color: "#aaaa0000"
+ MediaArea {
+ }
+
+ Timer {
+ id:informationTimer
+ interval: 3000
+ running: false
+ repeat: true
+ onTriggered: {
+ bottomInformation.visible = false
+ }
+ }
+
+ Item {
+ id: bottomInformation
+ width: parent.width
+ height: 215
+ anchors.bottom: parent.bottom
+ visible: false
+ Text {
+ id: bottomText
+ anchors.centerIn: parent
+ font.pixelSize: 25
+ font.letterSpacing: 5
+ horizontalAlignment: Text.AlignHCenter
+ color: "white"
+ text: ""
+ z:1
+ }
+ }
+
+ Connections {
+ target: homescreenHandler
+ onShowInformation: {
+ bottomText.text = info
+ bottomInformation.visible = true
+ informationTimer.restart()
+ }
+ }
+}
diff --git a/homescreen/qml/qml.qrc b/homescreen/qml/qml.qrc
index d901481..8381337 100644
--- a/homescreen/qml/qml.qrc
+++ b/homescreen/qml/qml.qrc
@@ -7,9 +7,12 @@
<file>MediaAreaRadio.qml</file>
<file>ShortcutArea.qml</file>
<file>ShortcutIcon.qml</file>
+ <file>SpeechChrome.qml</file>
<file>StatusArea.qml</file>
<file>TopArea.qml</file>
<file>IconItem.qml</file>
- <file>SpeechChrome.qml</file>
+ <file>background.qml</file>
+ <file>toppanel.qml</file>
+ <file>bottompanel.qml</file>
</qresource>
</RCC>
diff --git a/homescreen/qml/toppanel.qml b/homescreen/qml/toppanel.qml
new file mode 100644
index 0000000..4098c73
--- /dev/null
+++ b/homescreen/qml/toppanel.qml
@@ -0,0 +1,69 @@
+import QtQuick 2.13
+import QtQuick.Window 2.13
+
+Window {
+ id: toppanel
+ width: Screen.width
+ height: Screen.height * (240.0 / 1920.0)
+ flags: Qt.FramelessWindowHint
+ visible: true
+ //color: "#aaaa0000"
+
+ TopArea {
+ }
+
+ Timer {
+ id:notificationTimer
+ interval: 3000
+ running: false
+ repeat: true
+ onTriggered: notificationItem.visible = false
+ }
+
+ Item {
+ id: notificationItem
+ x: 0
+ y: 0
+ z: 1
+ width: 1280
+ height: 100
+ opacity: 0.8
+ visible: false
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ anchors.fill: parent
+ color: "gray"
+ Image {
+ id: notificationIcon
+ width: 70
+ height: 70
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ anchors.verticalCenter: parent.verticalCenter
+ source: ""
+ }
+
+ Text {
+ id: notificationtext
+ font.pixelSize: 25
+ anchors.left: notificationIcon.right
+ anchors.leftMargin: 5
+ anchors.verticalCenter: parent.verticalCenter
+ color: "white"
+ text: qsTr("")
+ }
+ }
+ }
+
+ Connections {
+ target: homescreenHandler
+ onShowNotification: {
+ notificationIcon.source = icon_path
+ notificationtext.text = text
+ notificationItem.visible = true
+ notificationTimer.restart()
+ }
+ }
+}