diff --git a/assets/icons/battery-1.png b/assets/icons/battery-1.png
new file mode 100644
index 0000000..23bbb61
Binary files /dev/null and b/assets/icons/battery-1.png differ
diff --git a/assets/icons/battery-2.png b/assets/icons/battery-2.png
new file mode 100644
index 0000000..4bc7eed
Binary files /dev/null and b/assets/icons/battery-2.png differ
diff --git a/assets/icons/battery-3.png b/assets/icons/battery-3.png
new file mode 100644
index 0000000..8d4bfbc
Binary files /dev/null and b/assets/icons/battery-3.png differ
diff --git a/assets/icons/battery-4.png b/assets/icons/battery-4.png
new file mode 100644
index 0000000..36baf94
Binary files /dev/null and b/assets/icons/battery-4.png differ
diff --git a/assets/icons/battery-5.png b/assets/icons/battery-5.png
new file mode 100644
index 0000000..e484dc8
Binary files /dev/null and b/assets/icons/battery-5.png differ
diff --git a/assets/icons/seame-logo.png b/assets/icons/seame-logo.png
new file mode 100644
index 0000000..892240a
Binary files /dev/null and b/assets/icons/seame-logo.png differ
diff --git a/ui/FootbarInfo.qml b/ui/FootbarInfo.qml
index 5274c05..66ea725 100644
--- a/ui/FootbarInfo.qml
+++ b/ui/FootbarInfo.qml
@@ -5,24 +5,50 @@ Row {
height: 50
spacing: 30
padding: 10
-
Column {
Row {
- spacing: 5
- Text {
- font.family: "Open Sans"
- text: canBusHandler.battery
- font.pixelSize: app.letterSize
- color: "white"
- }
- Text {
- font.family: "Open Sans"
- text: "%"
- font.pixelSize: app.letterSize
- color: "gray"
+
+ anchors.verticalCenterOffset: -10
+ Image {
+ id: batteryLevel
+ // source: {
+ // if (canBusHandler.battery >= 80) {
+ // "qrc:/assets/icons/battery-5.png"
+ // } else if (canBusHandler.battery >= 60) {
+ // "qrc:/assets/icons/battery-4.png"
+ // } else if (canBusHandler.battery >= 40) {
+ // "qrc:/assets/icons/battery-3.png"
+ // } else if (canBusHandler.battery >= 20) {
+ // "qrc:/assets/icons/battery-2.png"
+ // } else {
+ // "qrc:/assets/icons/battery-1.png"
+ // }
+ // }
+ width: 80
+ visible: true
+ fillMode: Image.PreserveAspectFit
+ source: "qrc:/assets/icons/battery-5.png"
+ // Adjust this value to move the image up or down
}
}
+ // Row {
+ // spacing: 5
+
+ // Text {
+ // font.family: "Open Sans"
+ // //text: canBusHandler.battery
+ // text: "100"
+ // font.pixelSize: app.letterSize
+ // color: "white"
+ // }
+ // Text {
+ // font.family: "Open Sans"
+ // text: "%"
+ // font.pixelSize: app.letterSize
+ // color: "gray"
+ // }
+ // }
}
Column {
@@ -55,7 +81,7 @@ Row {
}
Text {
font.family: "Open Sans"
- text: "G"
+ text: "C"
font.pixelSize: app.letterSize
color: "gray"
}
diff --git a/ui/Main.qml b/ui/Main.qml
index 0da7110..37c78f3 100644
--- a/ui/Main.qml
+++ b/ui/Main.qml
@@ -70,5 +70,67 @@ ApplicationWindow {
anchors.left: parent.left
anchors.leftMargin: 70
}
+
+ TimeInfo {
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 60
+ anchors.right: parent.right
+ anchors.rightMargin: 70
+ }
}
+
+ // Logo Screen
+ Rectangle {
+ id: splashScreen
+ visible: app.showSplash
+ anchors.fill: parent
+ color: "black"
+
+ // O retângulo sempre fica visível, mas apenas o logo tem a opacidade animada
+ Image {
+ id: logo
+ source: "qrc:/assets/icons/seame-logo.png" // Substitua pelo logo do carro
+ anchors.centerIn: parent
+ width: parent.width * 0.5
+ height: parent.width * 0.5
+ fillMode: Image.PreserveAspectFit
+ opacity: 1.0 // Começa visível
+
+ SequentialAnimation {
+ running: true
+ loops: 1
+
+ // Transição para mostrar o logo
+ PropertyAnimation {
+ target: logo
+ property: "opacity"
+ from: 0.0
+ to: 1.0
+ duration: 3000 // 3 segundos
+ }
+
+ PauseAnimation { duration: 1000 } // Aguarda 1 segundo com o logo visível
+
+ // Transição para esconder o logo
+ PropertyAnimation {
+ target: logo
+ property: "opacity"
+ from: 1.0
+ to: 0.0
+ duration: 2000 // 2 segundos
+ }
+
+ PauseAnimation { duration: 1000 } // Aguarda 2 segundos com a tela preta
+
+ ScriptAction {
+ script: {
+ app.showSplash = false; // Oculta a splash screen
+ app.carClusterVisible = true; // Mostra o cluster
+ }
+ }
+ }
+ }
+ }
+
+
}
\ No newline at end of file
diff --git a/ui/TimeInfo.qml b/ui/TimeInfo.qml
new file mode 100644
index 0000000..af12b9b
--- /dev/null
+++ b/ui/TimeInfo.qml
@@ -0,0 +1,60 @@
+import QtQuick 2.15
+
+Row {
+ spacing: 5
+
+ // Hora
+ Text {
+ font.family: "Open Sans"
+ id: timeDisplay
+ text: "11:11"
+ font.pixelSize: app.letterSize
+ color: "white"
+ opacity: 0.0
+ }
+
+ // AM/PM
+ Text {
+ font.family: "Open Sans"
+ id: amPmDisplay
+ text: "AM"
+ font.pixelSize: app.letterSize
+ color: "gray"
+ opacity: 0.0
+ }
+
+ Timer {
+ id: clockTimer
+ interval: 1000 // Atualiza a cada 1 segundo
+ running: true
+ repeat: true
+ onTriggered: {
+ timeDisplay.text = timeHelper.getCurrentTime();
+ timeDisplay.opacity = 1.0
+
+ amPmDisplay.text = timeHelper.getCurrentAmPm();
+ amPmDisplay.opacity = 1.0
+ }
+ }
+
+ // Funções encapsuladas em um QtObject
+ QtObject {
+ id: timeHelper
+
+ function getCurrentTime() {
+ const currentDate = new Date();
+ let hours = currentDate.getHours();
+ let minutes = currentDate.getMinutes();
+
+ hours = hours % 12 || 12;
+ minutes = minutes < 10 ? "0" + minutes : minutes
+
+ return hours + ":" + minutes;
+ }
+
+ function getCurrentAmPm() {
+ const currentDate = new Date();
+ return currentDate.getHours() >= 12 ? "PM" : "AM";
+ }
+ }
+}
\ No newline at end of file
diff --git a/ui/resources.qrc b/ui/resources.qrc
index 7c80d25..27ab5eb 100644
--- a/ui/resources.qrc
+++ b/ui/resources.qrc
@@ -6,6 +6,8 @@
LightInfo.qml
FootbarInfo.qml
GearShiftInfo.qml
+ TimeInfo.qml
+
@@ -17,5 +19,11 @@
../assets/icons/parking_lights_on.png
../assets/icons/turn_left_on.png
../assets/icons/turn_right_on.png
+ ../assets/icons/seame-logo.png
+ ../assets/icons/battery-1.png
+ ../assets/icons/battery-2.png
+ ../assets/icons/battery-3.png
+ ../assets/icons/battery-4.png
+ ../assets/icons/battery-5.png
\ No newline at end of file