aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuchinton Chakravarty <suchinton.2001@gmail.com>2024-10-10 18:16:07 +0530
committerSuchinton Chakravarty <suchinton.2001@gmail.com>2024-10-14 15:03:20 +0530
commit2e2dd79e41b27a1d50be3c118955cdbd76e65539 (patch)
tree1650d28a3dd3de761303a8c4013e4415bdcabf03
parent554ec4cd07d68f4bcb569277881e368c450d993a (diff)
Add Tire Pressure, Keypad elements and misc. UI Changes
- Increased slider grab handle size - Add floating menu for Tire Pressure UI - Show errow in Playback toggle when CAN interface is not available - Update Half gauges to show Unit and logo correctly - Update App resources - Add new tumbler input for HVAC temp - Add new get function to KuksaClient to get Tire Pressure unit and Current value to increment Fixes: - Check for vcar dbc file at '/etc/kuksa-dbc-feeder/' - Increase font size in Settings page - Allow for tumbler/ spin wheel values to wrap around Bug-AGL: SPEC-5161 Change-Id: I2386bf7dc762b09b83cef1be104a35d6afc0a704 Signed-off-by: Suchinton Chakravarty <suchinton.2001@gmail.com>
-rw-r--r--.gitignore2
-rw-r--r--QMLWidgets/Full_Gauge/SpeedGauge.qml25
-rw-r--r--QMLWidgets/Half_Gauge/CoolantGauge.qml24
-rw-r--r--QMLWidgets/Half_Gauge/FuelGauge.qml26
-rw-r--r--QMLWidgets/Temp_Tumbler/TempTumbler.qml159
-rw-r--r--QMLWidgets/Tire_Pressure/TirePressure.qml247
-rw-r--r--QMLWidgets/Tire_Pressure/assets/DefaultTire.svg9
-rw-r--r--QMLWidgets/Tire_Pressure/assets/SelectedTire.svg14
-rw-r--r--QMLWidgets/Tire_Pressure/assets/car-top.pngbin0 -> 259879 bytes
-rw-r--r--Widgets/HVACPage.py115
-rw-r--r--Widgets/ICPage.py106
-rw-r--r--Widgets/Keypad.py3
-rw-r--r--Widgets/TirePressure.py129
-rw-r--r--assets/Images/tire-pressure.svg3
-rw-r--r--assets/res.qrc1
-rw-r--r--extras/KuksaClient.py33
-rw-r--r--extras/config.ini7
-rw-r--r--extras/config.py15
-rw-r--r--ui/HVAC.ui536
-rw-r--r--ui/IC.ui462
-rw-r--r--ui/Settings_Window.ui36
-rw-r--r--ui/TirePressure.ui330
22 files changed, 1456 insertions, 826 deletions
diff --git a/.gitignore b/.gitignore
index 4249446..865ea5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,5 @@ map.html
test/
control-panel/
res_rc.py
-Scripts/can_messages.txt
Scripts/agl-vcar.dbc
+assets/can_messages.txt \ No newline at end of file
diff --git a/QMLWidgets/Full_Gauge/SpeedGauge.qml b/QMLWidgets/Full_Gauge/SpeedGauge.qml
index 263e7f1..02531b7 100644
--- a/QMLWidgets/Full_Gauge/SpeedGauge.qml
+++ b/QMLWidgets/Full_Gauge/SpeedGauge.qml
@@ -94,9 +94,26 @@ Item {
function drawProgress(ctx, center, progress) {
ctx.lineWidth = 20;
+
+ // Create a linear gradient
+ var gradient = ctx.createLinearGradient(
+ center.x + gaugeRadius * Math.cos(startAngle),
+ center.y + gaugeRadius * Math.sin(startAngle),
+ center.x + gaugeRadius * Math.cos(startAngle + fullAngle),
+ center.y + gaugeRadius * Math.sin(startAngle + fullAngle)
+ );
+
+ // Set gradient stops
+ gradient.addColorStop(0.3, "#00FF00"); // Green color
+ gradient.addColorStop(0.3, primaryColor); // Primary color
+ gradient.addColorStop(0.3, "#FFD700"); // Yellow color
+ gradient.addColorStop(1, "#FF0000"); // Red color
+
ctx.beginPath();
ctx.arc(center.x, center.y, gaugeRadius, startAngle, startAngle + (progress / 270) * fullAngle);
- ctx.strokeStyle = primaryColor;
+
+ // Apply the gradient to the stroke style
+ ctx.strokeStyle = gradient;
ctx.stroke();
}
@@ -118,17 +135,17 @@ Item {
}
function drawProgressTick(ctx, center, progress) {
-
+
ctx.lineWidth = tickLength * 3
ctx.strokeStyle = '#FFFFFF'
ctx.beginPath()
-
+
const progressAngle = startAngle + (progress / 270) * fullAngle
const x1 = center.x + gaugeRadius * Math.cos(progressAngle)
const y1 = center.y + gaugeRadius * Math.sin(progressAngle)
const x2 = center.x + (gaugeRadius - tickLength * 1.5) * Math.cos(progressAngle)
const y2 = center.y + (gaugeRadius - tickLength * 1.5) * Math.sin(progressAngle)
-
+
ctx.moveTo(x1, y1)
ctx.lineTo(x2, y2)
ctx.stroke()
diff --git a/QMLWidgets/Half_Gauge/CoolantGauge.qml b/QMLWidgets/Half_Gauge/CoolantGauge.qml
index 6e1d583..634647d 100644
--- a/QMLWidgets/Half_Gauge/CoolantGauge.qml
+++ b/QMLWidgets/Half_Gauge/CoolantGauge.qml
@@ -5,10 +5,11 @@ Item {
width: 200
height: 200
- property real value: 80
+ property real value: 0
property real minValue: 0
property real maxValue: 120
property string unit: "°C"
+ property string iconSource: "qrc:/Carbon_Icons/carbon_icons/temperature--water.svg"
property color primaryColor: "#16CCBA"
property color secondaryColor: "#00000000"
@@ -34,12 +35,12 @@ Item {
var center = Qt.point(width / 2, height / 2)
var side = Math.min(width, height)
var radius = (side - side * 0.25) / 2
- var startAngle = Math.PI * 2 / 3
- var fullAngle = Math.PI * 2 / 3
+ var startAngle = Math.PI * 5 / 4
+ var fullAngle = Math.PI * 1 / 2
var progressAngle = startAngle + (degree / 270) * fullAngle
ctx.reset()
- ctx.lineCap = 'square'
+ ctx.lineCap = 'round'
// background arc
ctx.lineWidth = 25
@@ -86,21 +87,20 @@ Item {
id: gaugePercentage
anchors.verticalCenter: gaugeText.verticalCenter
anchors.left: gaugeText.right
- text: "%"
+ text: unit
font.pixelSize: 0.15 * Math.min(root.width, root.height)
font.bold: true
color: "#FFFFFF"
}
- Text {
- id: gaugeUnit
+ Image {
+ source: iconSource
anchors.top: gaugeText.bottom
anchors.horizontalCenter: gaugeText.horizontalCenter
-
- text: unit
- font.pixelSize: 18
- font.bold: true
- color: "#FFFFFF"
+ width: 0.15 * Math.min(root.width, root.height)
+ fillMode: Image.PreserveAspectFit
+ // antialiasing: true
+ antialiasing: true
}
Behavior on value {
diff --git a/QMLWidgets/Half_Gauge/FuelGauge.qml b/QMLWidgets/Half_Gauge/FuelGauge.qml
index 21ac4cd..f0ea7d0 100644
--- a/QMLWidgets/Half_Gauge/FuelGauge.qml
+++ b/QMLWidgets/Half_Gauge/FuelGauge.qml
@@ -5,10 +5,11 @@ Item {
width: 200
height: 200
- property real value: 80
+ property real value: 0
property real minValue: 0
property real maxValue: 100
- property string unit: "NA"
+ property string unit: "%"
+ property string iconSource: "qrc:/Images/Images/fuel-icon.png"
property color primaryColor: "#16CCBA"
property color secondaryColor: "#00000000"
@@ -36,12 +37,12 @@ Item {
var center = Qt.point(width / 2, height / 2)
var side = Math.min(width, height)
var radius = (side - side * 0.25) / 2
- var startAngle = Math.PI * 2 / 3
- var fullAngle = Math.PI * 2 / 3
+ var startAngle = Math.PI * 5 / 4
+ var fullAngle = Math.PI * 1 / 2
var progressAngle = startAngle + (degree / 270) * fullAngle
ctx.reset()
- ctx.lineCap = 'square'
+ ctx.lineCap = 'round'
// background arc
ctx.lineWidth = 25
@@ -90,21 +91,20 @@ Item {
anchors.verticalCenter: gaugeText.verticalCenter
anchors.left: gaugeText.right
- text: "%"
+ text: unit
font.pixelSize: 0.15 * Math.min(root.width, root.height)
font.bold: true
color: "#FFFFFF"
}
- Text {
- id: gaugeUnit
+ Image {
+ source: iconSource
anchors.top: gaugeText.bottom
anchors.horizontalCenter: gaugeText.horizontalCenter
-
- text: unit
- font.pixelSize: 18
- font.bold: true
- color: "#FFFFFF"
+ width: 0.15 * Math.min(root.width, root.height)
+ fillMode: Image.PreserveAspectFit
+ // antialiasing: true
+ antialiasing: true
}
Behavior on value {
diff --git a/QMLWidgets/Temp_Tumbler/TempTumbler.qml b/QMLWidgets/Temp_Tumbler/TempTumbler.qml
new file mode 100644
index 0000000..612d9a3
--- /dev/null
+++ b/QMLWidgets/Temp_Tumbler/TempTumbler.qml
@@ -0,0 +1,159 @@
+import QtQuick 2.9
+import QtQuick.Window 2.2
+import QtQuick.Controls 2.2
+
+Rectangle {
+ width: frame.implicitWidth
+ height: frame.implicitHeight
+
+ // save colors in variables
+ property color backgroundColor: "#131313"
+ property color background_alt: "#2A2827"
+ property color buttonColor: "#6C6C85"
+ property color highlight: "#4BD7D6"
+
+ // store icons from qrc in variables
+ property string iconUp: "qrc:/Carbon_Icons/carbon_icons/temperature--frigid.svg"
+ property string iconDown: "qrc:/Carbon_Icons/carbon_icons/temperature--hot.svg"
+
+ color: backgroundColor
+
+ signal valueChanged(int newValue)
+
+ FontMetrics {
+ id: fontMetrics
+ }
+
+ Component {
+ id: delegateComponent
+
+ Label {
+ text: model.number
+ opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2)
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: fontMetrics.font.pixelSize * parent.width / fontMetrics.font.pixelSize / 3
+ color: highlight
+ font.bold: true
+ }
+ }
+
+ Frame {
+ id: frame
+ padding: 0
+ anchors.centerIn: parent
+ anchors.fill: parent
+
+ Rectangle {
+ anchors.fill: parent
+ color: backgroundColor
+ radius: 10
+ }
+
+ Column {
+ spacing: 10
+ anchors.fill: parent
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.margins: 10
+
+ Button {
+ width: parent.width
+ height: parent.height / 6
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ color: buttonColor
+ radius: 10
+
+ Image {
+ source: iconUp
+ anchors.centerIn: parent
+ sourceSize.width: parent.width / 2
+ sourceSize.height: parent.height / 2
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ }
+ }
+ onClicked: {
+ // if we are at the top of the list, set the index to the last element
+ if (valueTumbler.currentIndex == 0) {
+ valueTumbler.currentIndex = valueTumbler.model.count - 1;
+ }
+ else {
+ valueTumbler.currentIndex -= 1;
+ }
+ }
+ }
+
+ Tumbler {
+ id: valueTumbler
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: parent.width
+ height: parent.height / 2
+ model: ListModel {
+ ListElement { number: 16 }
+ ListElement { number: 17 }
+ ListElement { number: 18 }
+ ListElement { number: 19 }
+ ListElement { number: 20 }
+ ListElement { number: 21 }
+ ListElement { number: 22 }
+ ListElement { number: 23 }
+ ListElement { number: 24 }
+ ListElement { number: 25 }
+ ListElement { number: 26 }
+ ListElement { number: 27 }
+ ListElement { number: 28 }
+ ListElement { number: 29 }
+ ListElement { number: 30 }
+ ListElement { number: 31 }
+ ListElement { number: 32 }
+ }
+
+ onCurrentIndexChanged: {
+ valueChanged(model.get(currentIndex).number);
+ }
+
+ delegate: delegateComponent
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ color: background_alt
+ radius: 10
+ }
+ }
+
+ Button {
+ width: parent.width
+ height: parent.height / 6
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ color: buttonColor
+ radius: 10
+
+ Image {
+ source: iconDown
+ anchors.centerIn: parent
+ sourceSize.width: parent.width / 2
+ sourceSize.height: parent.height / 2
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ }
+ }
+ onClicked: {
+ if (valueTumbler.currentIndex == 16) {
+ valueTumbler.currentIndex = 0;
+ }
+ else {
+ valueTumbler.currentIndex += 1;
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/QMLWidgets/Tire_Pressure/TirePressure.qml b/QMLWidgets/Tire_Pressure/TirePressure.qml
new file mode 100644
index 0000000..0102fba
--- /dev/null
+++ b/QMLWidgets/Tire_Pressure/TirePressure.qml
@@ -0,0 +1,247 @@
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+import QtQuick.Layouts 1.3
+
+Item {
+ id: root
+ width: 400
+ height: 400
+
+ property string carImage: "./assets/car-top.png"
+ property string defaultTire: "./assets/DefaultTire.svg"
+ property string selectedTire: "./assets/SelectedTire.svg"
+
+ property color highlight: "#4BD7D6"
+ property color defaultColor: "#6C6C85"
+ property color darkbg: "#131313"
+
+ property int selectedTireIndex: -1
+
+ // Move these functions here so they're accessible to all buttons
+ function resetAllButtons() {
+ selectedTireIndex = -1;
+ button0.background.color = defaultColor;
+ button1.background.color = defaultColor;
+ button2.background.color = defaultColor;
+ button3.background.color = defaultColor;
+
+ tireImage0.source = defaultTire;
+ tireImage1.source = defaultTire;
+ tireImage2.source = defaultTire;
+ tireImage3.source = defaultTire;
+ }
+
+ function selectButton(index) {
+ selectedTireIndex = index;
+
+ switch(index) {
+ case 0:
+ button0.background.color = highlight;
+ tireImage0.source = selectedTire;
+ break;
+ case 1:
+ button1.background.color = highlight;
+ tireImage1.source = selectedTire;
+ break;
+ case 2:
+ button2.background.color = highlight;
+ tireImage2.source = selectedTire;
+ break;
+ case 3:
+ button3.background.color = highlight;
+ tireImage3.source = selectedTire;
+ break;
+ }
+
+ // Reset other buttons
+ for (var i = 0; i < 4; i++) {
+ if (i !== index) {
+ var button = eval("button" + i);
+ button.background.color = defaultColor;
+ eval("tireImage" + i).source = defaultTire;
+ }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: darkbg
+ z: 0
+
+ Image {
+ id: car
+ source: carImage
+ fillMode: Image.PreserveAspectFit
+ anchors.fill: parent
+ anchors.centerIn: parent
+ z: 1
+ }
+
+ GridLayout {
+ id: buttonGrid
+ anchors.centerIn: parent
+ columns: 2
+ rows: 2
+
+ Button {
+ id: button0
+ Layout.preferredWidth: car.width / 2
+ Layout.preferredHeight: car.height / 2
+
+ background: Rectangle {
+ color: defaultColor
+ opacity: 0.5
+ radius: 15
+ z: 1
+ }
+
+ Rectangle {
+ width: parent.width / 2
+ height: parent.height / 2
+ color: "transparent"
+ anchors.fill: parent
+ z: 2
+
+ Image {
+ id: tireImage0
+ source: defaultTire
+ sourceSize.height: parent.height / 2
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: parent.height * 0.32
+ }
+ }
+
+ onClicked: handleButtonClick(0)
+
+ function handleButtonClick(index) {
+ if (selectedTireIndex === index) {
+ resetAllButtons();
+ } else {
+ selectButton(index);
+ }
+ }
+ }
+
+ Button {
+ id: button1
+ Layout.preferredWidth: car.width / 2
+ Layout.preferredHeight: car.height / 2
+
+ background: Rectangle {
+ color: defaultColor
+ opacity: 0.5
+ radius: 15
+ z: 1
+ }
+
+ Rectangle {
+ width: parent.width / 2
+ height: parent.height / 2
+ color: "transparent"
+ anchors.fill: parent
+ z: 2
+
+ Image {
+ id: tireImage1
+ source: defaultTire
+ sourceSize.height: parent.height / 2
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: parent.height * 0.28
+ }
+ }
+
+ onClicked: handleButtonClick(1)
+
+ function handleButtonClick(index) {
+ if (selectedTireIndex === index) {
+ resetAllButtons();
+ } else {
+ selectButton(index);
+ }
+ }
+ }
+
+ Button {
+ id: button2
+ Layout.preferredWidth: car.width / 2
+ Layout.preferredHeight: car.height / 2
+
+ background: Rectangle {
+ color: defaultColor
+ opacity: 0.5
+ radius: 15
+ z: 1
+ }
+
+ Rectangle {
+ width: parent.width / 2
+ height: parent.height / 2
+ color: "transparent"
+ anchors.fill: parent
+ z: 2
+
+ Image {
+ id: tireImage2
+ source: defaultTire
+ sourceSize.height: parent.height / 2
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: parent.height * 0.32
+ }
+ }
+
+ onClicked: handleButtonClick(2)
+
+ function handleButtonClick(index) {
+ if (selectedTireIndex === index) {
+ resetAllButtons();
+ } else {
+ selectButton(index);
+ }
+ }
+ }
+
+ Button {
+ id: button3
+ Layout.preferredWidth: car.width / 2
+ Layout.preferredHeight: car.height / 2
+
+ background: Rectangle {
+ color: defaultColor
+ opacity: 0.5
+ radius: 15
+ z: 1
+ }
+
+ Rectangle {
+ width: parent.width / 2
+ height: parent.height / 2
+ color: "transparent"
+ anchors.fill: parent
+ z: 2
+
+ Image {
+ id: tireImage3
+ source: defaultTire
+ sourceSize.height: parent.height / 2
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: parent.height * 0.28
+ }
+ }
+
+ onClicked: handleButtonClick(3)
+
+ function handleButtonClick(index) {
+ if (selectedTireIndex === index) {
+ resetAllButtons();
+ } else {
+ selectButton(index);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/QMLWidgets/Tire_Pressure/assets/DefaultTire.svg b/QMLWidgets/Tire_Pressure/assets/DefaultTire.svg
new file mode 100644
index 0000000..89ac4b6
--- /dev/null
+++ b/QMLWidgets/Tire_Pressure/assets/DefaultTire.svg
@@ -0,0 +1,9 @@
+<svg width="22" height="85" viewBox="0 0 22 85" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect width="22" height="85" rx="8" fill="url(#paint0_linear_157_8234)"/>
+ <defs>
+ <linearGradient id="paint0_linear_157_8234" x1="0" y1="0" x2="0" y2="85" gradientUnits="userSpaceOnUse">
+ <stop stop-color="#232323"/>
+ <stop offset="1" stop-color="#4D4D4D"/>
+ </linearGradient>
+ </defs>
+</svg> \ No newline at end of file
diff --git a/QMLWidgets/Tire_Pressure/assets/SelectedTire.svg b/QMLWidgets/Tire_Pressure/assets/SelectedTire.svg
new file mode 100644
index 0000000..0a653e2
--- /dev/null
+++ b/QMLWidgets/Tire_Pressure/assets/SelectedTire.svg
@@ -0,0 +1,14 @@
+<svg width="26" height="89" viewBox="0 0 26 89" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <rect x="1" y="1" width="24" height="87" rx="9" fill="url(#paint0_linear_125_20962)" stroke="url(#paint1_linear_125_20962)" stroke-width="2"/>
+ <defs>
+ <linearGradient id="paint0_linear_125_20962" x1="13" y1="2" x2="13" y2="87" gradientUnits="userSpaceOnUse">
+ <stop stop-color="#232323"/>
+ <stop offset="1" stop-color="#4D4D4D"/>
+ </linearGradient>
+ <linearGradient id="paint1_linear_125_20962" x1="13" y1="2" x2="13" y2="87" gradientUnits="userSpaceOnUse">
+ <stop stop-color="#BAFBFF"/>
+ <stop offset="0.515" stop-color="#C9FCFF"/>
+ <stop offset="1" stop-color="#BAFBFF"/>
+ </linearGradient>
+ </defs>
+</svg> \ No newline at end of file
diff --git a/QMLWidgets/Tire_Pressure/assets/car-top.png b/QMLWidgets/Tire_Pressure/assets/car-top.png
new file mode 100644
index 0000000..9283e0b
--- /dev/null
+++ b/QMLWidgets/Tire_Pressure/assets/car-top.png
Binary files differ
diff --git a/Widgets/HVACPage.py b/Widgets/HVACPage.py
index d101e15..8371dfe 100644
--- a/Widgets/HVACPage.py
+++ b/Widgets/HVACPage.py
@@ -6,7 +6,11 @@
import os
import sys
from PyQt6 import uic
-from PyQt6.QtWidgets import QApplication, QListWidget, QSlider, QPushButton
+from PyQt6.QtWidgets import QApplication, QFrame, QSlider, QPushButton, QWidget
+from PyQt6 import QtWidgets
+from PyQt6.QtQuickWidgets import QQuickWidget
+from PyQt6.QtQuick import QQuickItem
+from PyQt6.QtCore import QUrl
current_dir = os.path.dirname(os.path.abspath(__file__))
@@ -14,7 +18,6 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.dirname(current_dir))
-
Form, Base = uic.loadUiType(os.path.join(current_dir, "../ui/HVAC.ui"))
# ========================================
@@ -29,14 +32,22 @@ class HVAC_Paths():
self.rightTemp = "Vehicle.Cabin.HVAC.Station.Row1.Passenger.Temperature"
self.rightFanSpeed = "Vehicle.Cabin.HVAC.Station.Row1.Passenger.FanSpeed"
- # temperatureList contains values from 32 to 16
- self.temperatureList = [str(i) + "°C" for i in range(32, 15, -1)]
+def TumblerWidget():
+ """QWidget for controlling HVAC Temperature."""
+
+ TumblerQML = os.path.join(current_dir, "../QMLWidgets/Temp_Tumbler/TempTumbler.qml")
+
+ TumblerWidget = QQuickWidget()
+ TumblerWidget.setSource(QUrl.fromLocalFile(TumblerQML))
+ TumblerWidget.setResizeMode(QQuickWidget.ResizeMode.SizeRootObjectToView)
+ TumblerWidget.setSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum)
+ return TumblerWidget
class HVACWidget(Base, Form):
"""
A widget for controlling HVAC settings.
-
+
Inherits from Base and Form.
"""
@@ -52,40 +63,29 @@ class HVACWidget(Base, Form):
self.setupUi(self)
self.HVAC = HVAC_Paths()
-
self.kuksa_client = KuksaClient()
- self.leftTempList = self.findChild(QListWidget, "leftTempList")
- self.leftTempList.addItems(self.HVAC.temperatureList)
- self.leftTempList.setCurrentRow(0)
- self.leftTempList.itemClicked.connect(self.leftTempListClicked)
- self.leftTempList.itemSelectionChanged.connect(
- self.leftTempListClicked)
- self.leftTempList.wheelEvent = lambda event: None
-
- self.rightTempList = self.findChild(QListWidget, "rightTempList")
- self.rightTempList.addItems(self.HVAC.temperatureList)
- self.rightTempList.setCurrentRow(0)
- self.rightTempList.itemClicked.connect(self.rightTempListClicked)
- self.rightTempList.itemSelectionChanged.connect(
- self.rightTempListClicked)
- self.rightTempList.wheelEvent = lambda event: None
-
- self.leftTempUp = self.findChild(QPushButton, "leftTempUp")
- self.leftTempUp.clicked.connect(
- lambda: self.leftTempList.setCurrentRow(self.leftTempList.currentRow() - 1))
-
- self.leftTempDown = self.findChild(QPushButton, "leftTempDown")
- self.leftTempDown.clicked.connect(
- lambda: self.leftTempList.setCurrentRow(self.leftTempList.currentRow() + 1))
-
- self.rightTempUp = self.findChild(QPushButton, "rightTempUp")
- self.rightTempUp.clicked.connect(
- lambda: self.rightTempList.setCurrentRow(self.rightTempList.currentRow() - 1))
-
- self.rightTempDown = self.findChild(QPushButton, "rightTempDown")
- self.rightTempDown.clicked.connect(
- lambda: self.rightTempList.setCurrentRow(self.rightTempList.currentRow() + 1))
+ leftFrame = self.findChild(QFrame, "leftFrame")
+
+ # Create left temperature tumbler
+ self.LeftTempTumbler = TumblerWidget()
+
+ # Connect the left tumbler signal to the handler
+ self.LeftTempTumbler.rootObject().valueChanged.connect(self.onLeftTempChanged)
+
+ # Replace placeholder LeftTemp_Placeholder with the LeftTempTumbler widget
+ leftFrame.layout().replaceWidget(self.findChild(QWidget, "LeftTemp_Placeholder"), self.LeftTempTumbler)
+
+ rightFrame = self.findChild(QFrame, "rightFrame")
+
+ # Create right temperature tumbler
+ self.RightTempTumbler = TumblerWidget()
+
+ # Connect the right tumbler signal to the handler
+ self.RightTempTumbler.rootObject().valueChanged.connect(self.onRightTempChanged)
+
+ # Replace placeholder RightTemp_Placeholder with the RightTempTumbler widget
+ rightFrame.layout().replaceWidget(self.findChild(QWidget, "RightTemp_Placeholder"), self.RightTempTumbler)
self.leftFanSpeed_slider = self.findChild(
QSlider, "leftFanSpeed_slider")
@@ -97,28 +97,27 @@ class HVACWidget(Base, Form):
self.rightFanSpeed_slider.valueChanged.connect(
self.rightFanSpeed_sliderChanged)
- def leftTempListClicked(self):
- """
- Handles the event when an item in the left temperature list is clicked.
- Sets the corresponding VSS signal to the selected temperature value.
- """
-
- self.setTemperature(self.leftTempList, self.HVAC.leftTemp)
+ def changeTemperature(self, tumbler_widget, change):
+ """Change tumbler value by incrementing or decrementing."""
+
+ # use the inc_Value method from the QML object if change is 1 then increment, else decrement
+ # Access the root object of the QML component
+ self.LeftTempTumbler.rootObject().property("inc_Value", change)
- def rightTempListClicked(self):
- """
- Handles the event when an item in the right temperature list is clicked.
- Sets the corresponding VSS signal to the selected temperature value.
- """
+ def onLeftTempChanged(self, newValue):
+ """Slot to handle changes in left temperature tumbler."""
+
+ print(f"Left Temperature Tumbler stopped at value: {newValue}°C")
+ self.setTemperature(newValue, self.HVAC.leftTemp)
- self.setTemperature(self.rightTempList, self.HVAC.rightTemp)
+ def onRightTempChanged(self, newValue):
+ """Slot to handle changes in right temperature tumbler."""
+
+ print(f"Right Temperature Tumbler stopped at value: {newValue}°C")
+ self.setTemperature(newValue, self.HVAC.rightTemp)
- def setTemperature(self, list_widget, path):
- item = list_widget.currentItem()
- if item is not None:
- list_widget.scrollToItem(item)
- self.kuksa_client.set(path, item.text()[:-2], "targetValue")
- print(item.text())
+ def setTemperature(self, temp, path):
+ self.kuksa_client.set(path, str(temp), "targetValue")
def leftFanSpeed_sliderChanged(self):
"""
@@ -140,10 +139,8 @@ class HVACWidget(Base, Form):
self.kuksa_client.set(self.HVAC.rightFanSpeed, str(value), "targetValue")
print(value)
-
if __name__ == '__main__':
- import sys
app = QApplication(sys.argv)
w = HVACWidget()
w.show()
- sys.exit(app.exec())
+ sys.exit(app.exec()) \ No newline at end of file
diff --git a/Widgets/ICPage.py b/Widgets/ICPage.py
index b40177c..0f44703 100644
--- a/Widgets/ICPage.py
+++ b/Widgets/ICPage.py
@@ -10,7 +10,7 @@ from PyQt6 import uic, QtCore, QtWidgets
from PyQt6.QtWidgets import QApplication
from PyQt6.QtGui import QIcon, QPixmap, QPainter
from PyQt6.QtCore import QObject, pyqtSignal, QThread
-from PyQt6.QtWidgets import QWidget, QFrame
+from PyQt6.QtWidgets import QWidget, QFrame, QDockWidget
from PyQt6.QtQuickWidgets import QQuickWidget
import threading
@@ -40,10 +40,14 @@ def Gauge(gaugeType):
- A QQuickWidget object representing the gauge widget.
"""
- RPM_GaugeQML = os.path.join(current_dir, "../QMLWidgets/Full_Gauge/RPMGauge.qml")
- Speed_GaugeQML = os.path.join(current_dir, "../QMLWidgets/Full_Gauge/SpeedGauge.qml")
- Fuel_GaugeQML = os.path.join(current_dir, "../QMLWidgets/Half_Gauge/FuelGauge.qml")
- Coolant_GaugeQML = os.path.join(current_dir, "../QMLWidgets/Half_Gauge/CoolantGauge.qml")
+ RPM_GaugeQML = os.path.join(
+ current_dir, "../QMLWidgets/Full_Gauge/RPMGauge.qml")
+ Speed_GaugeQML = os.path.join(
+ current_dir, "../QMLWidgets/Full_Gauge/SpeedGauge.qml")
+ Fuel_GaugeQML = os.path.join(
+ current_dir, "../QMLWidgets/Half_Gauge/FuelGauge.qml")
+ Coolant_GaugeQML = os.path.join(
+ current_dir, "../QMLWidgets/Half_Gauge/CoolantGauge.qml")
gauge = QQuickWidget()
if gaugeType == "RPM":
@@ -57,11 +61,14 @@ def Gauge(gaugeType):
elif gaugeType == "Coolant":
gauge.setSource(QtCore.QUrl(Coolant_GaugeQML))
-
+
gauge.setResizeMode(QQuickWidget.ResizeMode.SizeRootObjectToView)
-
+ gauge.setSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding,
+ QtWidgets.QSizePolicy.Policy.Expanding)
+
return gauge
+
class IC_Paths():
def __init__(self):
self.speed = "Vehicle.Speed"
@@ -73,6 +80,7 @@ class IC_Paths():
self.coolantTemp = "Vehicle.Powertrain.CombustionEngine.ECT"
self.selectedGear = "Vehicle.Powertrain.Transmission.SelectedGear"
+
class ICWidget(Base, Form):
"""
This class represents the ICWidget which is a widget for the AGL Demo Control Panel.
@@ -100,7 +108,8 @@ class ICWidget(Base, Form):
self.Frame_1 = self.findChild(QWidget, "frame_1")
self.Fuel_Gauge_Frame = self.findChild(QFrame, "fuel_gauge_frame")
- self.Coolant_Gauge_Frame = self.findChild(QFrame, "coolant_gauge_frame")
+ self.Coolant_Gauge_Frame = self.findChild(
+ QFrame, "coolant_gauge_frame")
self.Script_toggle = AnimatedToggle()
@@ -125,7 +134,8 @@ class ICWidget(Base, Form):
self.driveGroupBtns.buttonClicked.connect(self.driveBtnClicked)
- Speed_Gauge_Placeholder = self.findChild(QWidget, "Speed_Gauge_Placeholder")
+ Speed_Gauge_Placeholder = self.findChild(
+ QWidget, "Speed_Gauge_Placeholder")
self.Speed_Gauge = Gauge("Speed")
self.Frame_1.layout().replaceWidget(Speed_Gauge_Placeholder, self.Speed_Gauge)
@@ -133,7 +143,8 @@ class ICWidget(Base, Form):
self.Speed_slider.setMinimum(0)
self.Speed_slider.setMaximum(240)
- RPM_Gauge_Placeholder = self.findChild(QWidget, "RPM_Gauge_Placeholder")
+ RPM_Gauge_Placeholder = self.findChild(
+ QWidget, "RPM_Gauge_Placeholder")
self.RPM_Gauge = Gauge("RPM")
self.Frame_1.layout().replaceWidget(RPM_Gauge_Placeholder, self.RPM_Gauge)
@@ -141,26 +152,23 @@ class ICWidget(Base, Form):
self.RPM_slider.setMinimum(0)
self.RPM_slider.setMaximum(8000)
- fuel_Gauge_Placeholder = self.findChild(QWidget, "fuel_Gauge_Placeholder")
+ fuel_Gauge_Placeholder = self.findChild(
+ QWidget, "fuel_Gauge_Placeholder")
self.Fuel_Gauge = Gauge("Fuel")
- self.Fuel_Gauge_Frame.layout().replaceWidget(fuel_Gauge_Placeholder, self.Fuel_Gauge)
+ self.Fuel_Gauge_Frame.layout().replaceWidget(
+ fuel_Gauge_Placeholder, self.Fuel_Gauge)
- coolant_Gauge_Placeholder = self.findChild(QWidget, "coolant_Gauge_Placeholder")
+ coolant_Gauge_Placeholder = self.findChild(
+ QWidget, "coolant_Gauge_Placeholder")
self.Coolant_Gauge = Gauge("Coolant")
- self.Coolant_Gauge_Frame.layout().replaceWidget(coolant_Gauge_Placeholder, self.Coolant_Gauge)
-
- self.mousePressEvent = lambda event: print("Mouse Pressed")
- self.mouseReleaseEvent = lambda event: print("Mouse Released")
-
- self.Coolant_Gauge.mousePressEvent = self.mousePressEvent
- self.Coolant_Gauge.mouseReleaseEvent = self.mouseReleaseEvent
+ self.Coolant_Gauge_Frame.layout().replaceWidget(
+ coolant_Gauge_Placeholder, self.Coolant_Gauge)
self.coolantTemp_slider.valueChanged.connect(
self.update_coolantTemp_monitor)
self.fuelLevel_slider.valueChanged.connect(
self.update_fuelLevel_monitor)
- self.Script_toggle.clicked.connect(self.handle_Script_toggle)
self.leftIndicatorBtn.setCheckable(True)
self.rightIndicatorBtn.setCheckable(True)
self.hazardBtn.setCheckable(True)
@@ -169,14 +177,36 @@ class ICWidget(Base, Form):
self.rightIndicatorBtn.toggled.connect(self.rightIndicatorBtnClicked)
self.hazardBtn.toggled.connect(self.hazardBtnClicked)
- self.Playback = CAN_playback()
- self.Playback_connections()
+ self.Script_toggle.clicked.connect(self.handle_Script_toggle)
+
+ try:
+ self.Playback = CAN_playback()
+ self.Playback_connections()
+ except Exception as e:
+ logging.error(f"Error creating playback object {e}")
+
+ self.TirePressureDock = self.findChild(QDockWidget, "TirePressureDock")
+ self.TirePressureBtn = self.findChild(
+ QtWidgets.QPushButton, "TirePressureBtn")
+ self.TirePressureBtn.clicked.connect(self.toggle_TirePressureDock)
+
+ def toggle_TirePressureDock(self):
+ if self.TirePressureBtn.isChecked():
+ self.Hide_TirePressure(True)
+ else:
+ self.Hide_TirePressure(False)
+
+ def Hide_TirePressure(self, bool_arg):
+ widthExtended = 0 if bool_arg else 400
+ self.TirePressureDock.setFixedWidth(widthExtended)
+
def Playback_connections(self):
self.Playback.speedUpdate.connect(self.set_Vehicle_Speed)
self.Playback.gearUpdate.connect(self.playback_set_Vehicle_Gear)
self.Playback.engineSpeedUpdate.connect(self.set_Vehicle_RPM)
- self.Playback.indicatorUpdate.connect(self.playback_set_Vehicle_Indicators)
+ self.Playback.indicatorUpdate.connect(
+ self.playback_set_Vehicle_Indicators)
def playback_set_Vehicle_Gear(self, gear):
if gear == "P":
@@ -239,7 +269,8 @@ class ICWidget(Base, Form):
Updates the coolant temperature monitor with the current coolant temperature value.
"""
coolantTemp = int(self.coolantTemp_slider.value())
- self.Coolant_Gauge.rootObject().setProperty('value', coolantTemp/100)
+ gaugeValue = coolantTemp / 100
+ self.Coolant_Gauge.rootObject().setProperty('value', gaugeValue)
try:
self.kuksa_client.set(
self.IC.coolantTemp, str(coolantTemp), 'value')
@@ -265,7 +296,8 @@ class ICWidget(Base, Form):
"""
hazardIcon = QPixmap(":/Images/Images/hazard.png")
painter = QPainter(hazardIcon)
- painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceIn)
+ painter.setCompositionMode(
+ QPainter.CompositionMode.CompositionMode_SourceIn)
if self.hazardBtn.isChecked():
color = QtCore.Qt.GlobalColor.yellow
@@ -294,7 +326,8 @@ class ICWidget(Base, Form):
"""
leftIndicatorIcon = QPixmap(":/Images/Images/left.png")
painter = QPainter(leftIndicatorIcon)
- painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceIn)
+ painter.setCompositionMode(
+ QPainter.CompositionMode.CompositionMode_SourceIn)
if self.leftIndicatorBtn.isChecked():
color = QtCore.Qt.GlobalColor.green
@@ -318,7 +351,8 @@ class ICWidget(Base, Form):
"""
rightIndicatorIcon = QPixmap(":/Images/Images/right.png")
painter = QPainter(rightIndicatorIcon)
- painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceIn)
+ painter.setCompositionMode(
+ QPainter.CompositionMode.CompositionMode_SourceIn)
if self.rightIndicatorBtn.isChecked():
color = QtCore.Qt.GlobalColor.green
@@ -356,15 +390,28 @@ class ICWidget(Base, Form):
def handle_Script_toggle(self):
if config.file_playback_enabled():
+ if not config.can_interface_enabled():
+ self.Script_toggle.showError()
+ self.Script_toggle.setChecked(False)
+ return
+ try:
+ self.Playback = CAN_playback()
+ self.Playback_connections()
+ except Exception as e:
+ self.Script_toggle.showError()
+ logging.error(f"Error creating playback object {e}")
+ return
+
if self.Script_toggle.isChecked():
# start the playback thread
self.thread = QThread()
self.Playback.moveToThread(self.thread)
self.thread.started.connect(self.Playback.playback_messages)
self.thread.start()
- # hide sliders
+ # hide sliders from the layout, their space will be taken by the playback widgets
self.Speed_slider.hide()
self.RPM_slider.hide()
+
# set default values for coolent and fuel
self.coolantTemp_slider.setValue(90)
self.fuelLevel_slider.setValue(50)
@@ -448,6 +495,7 @@ class ICWidget(Base, Form):
else:
print("Unknown button checked!")
+
class AccelerationFns():
def calculate_speed(time, acceleration) -> int:
# acceleration = 60 / 5 # acceleration from 0 to 60 in 5 seconds
diff --git a/Widgets/Keypad.py b/Widgets/Keypad.py
index ad0c17e..264bb5d 100644
--- a/Widgets/Keypad.py
+++ b/Widgets/Keypad.py
@@ -1,7 +1,8 @@
import os
import sys
from PyQt6 import uic
-from PyQt6.QtWidgets import QApplication, QWidget, QPushButton
+from PyQt6.QtWidgets import QPushButton
+from PyQt6.QtWidgets import QApplication, QWidget
import requests
from urllib.parse import urljoin
diff --git a/Widgets/TirePressure.py b/Widgets/TirePressure.py
new file mode 100644
index 0000000..0f3efce
--- /dev/null
+++ b/Widgets/TirePressure.py
@@ -0,0 +1,129 @@
+# Copyright (C) 2024 Suchinton Chakravarty
+# Copyright (C) 2024 Konsulko Group
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import os
+import sys
+from PyQt6 import uic
+from PyQt6.QtWidgets import QApplication, QPushButton, QWidget, QLabel
+from PyQt6.QtQuickWidgets import QQuickWidget
+from PyQt6.QtWidgets import QSizePolicy
+from PyQt6.QtCore import QUrl
+import logging
+
+current_dir = os.path.dirname(os.path.abspath(__file__))
+
+# ========================================
+
+sys.path.append(os.path.dirname(current_dir))
+
+
+Form, Base = uic.loadUiType(os.path.join(current_dir, "../ui/TirePressure.ui"))
+
+# ========================================
+
+from extras.KuksaClient import KuksaClient
+import res_rc
+
+class TirePressure_Paths():
+ def __init__(self):
+ self.Tires = {
+ 0 : "Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure",
+ 1 : "Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure",
+ 2 : "Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure",
+ 3 : "Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure"
+ }
+
+def TireSelectionWidget():
+ """
+ A widget for selecting the tire to control.
+
+ Returns:
+ - A QListWidget.
+ """
+
+ QMLPath = os.path.join(current_dir, "../QMLWidgets/Tire_Pressure/TirePressure.qml")
+ widget = QQuickWidget()
+ widget.setSource(QUrl.fromLocalFile(QMLPath))
+ widget.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
+ widget.setResizeMode(QQuickWidget.ResizeMode.SizeRootObjectToView)
+ return widget
+
+class TirePressure(Base, Form):
+ """
+ A widget for controlling TirePressure settings.
+
+ Inherits from Base and Form.
+ """
+
+ def __init__(self, parent=None):
+ """
+ Initializes the TirePressureWidget.
+
+ Args:
+ - parent: The parent widget. Defaults to None.
+ """
+
+ super(self.__class__, self).__init__(parent)
+ self.setupUi(self)
+
+ self.TirePressurePath = TirePressure_Paths()
+ self.kuksa_client = KuksaClient()
+ self.TireSelector = TireSelectionWidget()
+
+ placeholder = self.findChild(QWidget, "TS_Placeholher")
+ frame = self.findChild(QWidget, "frame")
+ frame.layout().replaceWidget(placeholder, self.TireSelector)
+ self.TPIncreaseBtn = self.findChild(QPushButton, "TPIncreaseBtn")
+ self.TPDecreaseBtn = self.findChild(QPushButton, "TPDecreaseBtn")
+ self.TPUnit = self.findChild(QLabel, "TPUnit")
+
+ self.TPIncreaseBtn.clicked.connect(self.increase_pressure)
+ self.TPDecreaseBtn.clicked.connect(self.decrease_pressure)
+
+ def get_Current(self, tire):
+ """
+ Initializes the TirePressure widget.
+ """
+
+ try:
+ self.TPUnit = self.kuksa_client.get("Vehicle.Cabin.Infotainment.HMI.TirePressureUnit")
+ return self.kuksa_client.get(self.TirePressurePath.Tires[tire])
+ except Exception as e:
+ logging.error(f"Error getting tire pressure values: {e}")
+
+
+ def increase_pressure(self):
+ """
+ Increases the pressure of the selected tire.
+ """
+
+ selected_tire = self.TireSelector.rootObject().property("selectedTireIndex")
+
+ current_pressure = self.get_Current(selected_tire)
+ if current_pressure is None:
+ return
+ else:
+ self.kuksa_client.setValues({self.TirePressurePath.Tires[selected_tire]: current_pressure + 1})
+
+
+ def decrease_pressure(self):
+ """
+ Decreases the pressure of the selected tire.
+ """
+
+ selected_tire = self.TireSelector.rootObject().property("selectedTireIndex")
+
+ current_pressure = self.get_Current(selected_tire)
+ if current_pressure is None:
+ return
+ else:
+ self.kuksa_client.setValues({self.TirePressurePath.Tires[selected_tire]: current_pressure - 1})
+
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ w = TirePressure()
+ w.show()
+ sys.exit(app.exec())
diff --git a/assets/Images/tire-pressure.svg b/assets/Images/tire-pressure.svg
new file mode 100644
index 0000000..0a4e236
--- /dev/null
+++ b/assets/Images/tire-pressure.svg
@@ -0,0 +1,3 @@
+<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M44.6579 36.8623H35.7286V34.3795H38.9139C39.4883 34.3795 39.906 33.914 39.906 33.3968V27.4484C41.5248 26.0001 42.517 23.9312 42.517 21.707C42.517 17.4656 39.0183 14 34.7364 14C30.4545 14 26.9559 17.4656 26.9559 21.707C26.9559 23.9312 27.8958 26.0001 29.5668 27.4484V33.3968C29.5668 33.9658 30.0368 34.3795 30.559 34.3795H33.6921V36.8623V37.8451C33.6921 38.4141 34.162 38.8279 34.6842 38.8279H44.6579C45.389 38.8279 46.0156 39.3968 46.0156 40.1727C46.0156 40.9486 45.4412 41.5176 44.6579 41.5176H26.2771C25.7026 41.5176 25.2849 41.9831 25.2849 42.5003C25.2849 43.0176 25.7549 43.4831 26.2771 43.4831H44.6579C46.4855 43.4831 47.9999 41.9831 47.9999 40.1727C47.9999 38.3624 46.5378 36.8623 44.6579 36.8623ZM28.9402 21.707C28.9402 18.5518 31.5511 15.9655 34.7364 15.9655C37.9217 15.9655 40.4804 18.5518 40.4804 21.707C40.4804 23.6208 39.5405 25.3794 37.974 26.4139C37.034 27.0346 35.8852 27.3967 34.7364 27.3967C33.5876 27.3967 32.4388 27.0346 31.4989 26.4139C29.8801 25.3794 28.9402 23.6208 28.9402 21.707ZM31.5511 32.414V28.7416H31.6033L31.9166 28.8967H31.9688C32.0211 28.9226 32.0733 28.9355 32.1255 28.9485C32.1777 28.9614 32.2299 28.9743 32.2822 29.0002C32.3344 29.0002 32.3344 29.0002 32.3866 29.0519C32.4388 29.0778 32.491 29.0907 32.5433 29.1036C32.5955 29.1166 32.6477 29.1295 32.6999 29.1554H32.7521C32.8108 29.1844 32.8694 29.1971 32.9373 29.2119C32.9903 29.2234 33.049 29.2361 33.1177 29.2588H33.2221C33.2833 29.2588 33.3444 29.2765 33.3951 29.2913C33.431 29.3016 33.4616 29.3105 33.4832 29.3105H33.5876C33.6398 29.3105 33.7051 29.3235 33.7704 29.3364C33.8357 29.3493 33.9009 29.3622 33.9531 29.3622H34.0054H34.3187H34.4231H34.7886H35.1542H35.2586H35.5719H35.6241C35.6764 29.3622 35.7416 29.3493 35.8069 29.3364C35.8722 29.3235 35.9374 29.3105 35.9897 29.3105H36.0941C36.1553 29.3105 36.2165 29.2928 36.2671 29.2781C36.303 29.2677 36.3336 29.2588 36.3552 29.2588H36.4596C36.5641 29.2588 36.7207 29.2071 36.8252 29.1554H36.8774C36.9296 29.1295 36.9818 29.1166 37.034 29.1036C37.0862 29.0907 37.1385 29.0778 37.1907 29.0519C37.2429 29.0519 37.2429 29.0519 37.2951 29.0002C37.3473 28.9743 37.3996 28.9614 37.4518 28.9485C37.504 28.9355 37.5562 28.9226 37.6084 28.8967H37.6606L37.974 28.7416H38.0262V32.414H34.7364H31.5511ZM34.7367 24.1378C35.6244 24.1378 36.3032 23.4137 36.3032 22.5861V22.3274L38.4964 19.8447C38.8619 19.4309 38.8097 18.8102 38.3919 18.4481C37.9742 18.086 37.3476 18.1377 36.9821 18.5515L34.7889 21.0343H34.7367C33.849 21.0343 33.1701 21.7585 33.1701 22.5861C33.1179 23.4137 33.849 24.1378 34.7367 24.1378ZM21.7865 20.8273C22.3609 21.2411 22.8308 21.7066 23.1964 22.2756C23.1964 22.3014 23.2094 22.3144 23.2225 22.3273C23.2355 22.3402 23.2486 22.3532 23.2486 22.379C23.8752 23.3101 24.2407 24.448 24.2407 25.6894V40.9482C24.2407 44.3103 21.4731 47 18.1312 47C14.8414 47 12.1261 44.4138 12.0216 41.1551V40.9999V40.9482V37.0688V33.086V29.1032V25.6894V25.2756C11.9694 25.0687 12.0216 24.8618 12.0738 24.7066L12.2305 24.0859C12.4394 23.4652 12.7005 22.8963 13.0138 22.379C13.3793 21.8618 13.8493 21.3445 14.3715 20.9307C15.4158 20.1549 16.7213 19.6376 18.1312 19.6376C19.4889 19.6376 20.7943 20.0514 21.7865 20.8273ZM18.1312 30.3964C17.9223 30.3964 17.7134 30.2929 17.5046 30.1377L14.0581 27.2411V28.6377L18.1312 32.0515L22.2564 28.3791V27.086L18.81 30.1377C18.6011 30.2929 18.3923 30.3964 18.1312 30.3964ZM18.1312 44L22.2564 40.3275V39.0344L18.81 42.0862C18.6011 42.2413 18.3923 42.3448 18.1312 42.3448C17.9223 42.3448 17.7134 42.2413 17.5046 42.0862L14.0581 39.1896V40.5861L18.1312 44ZM18.1312 40.0172L22.2564 36.3447V35.0516L18.81 38.1033C18.6011 38.2585 18.3923 38.362 18.1312 38.362C17.9223 38.362 17.7134 38.2585 17.5046 38.1033L14.0581 35.2068V36.6033L18.1312 40.0172ZM18.1312 36.0344L22.2564 32.3619V31.0688L18.81 34.1205C18.6011 34.2757 18.3923 34.3792 18.1312 34.3792C17.9223 34.3792 17.7134 34.2757 17.5046 34.1205L14.0581 31.224V32.6205L18.1312 36.0344ZM15.0503 24.1377L14.5803 23.7239C14.5686 23.7471 14.5542 23.773 14.5384 23.8015C14.4838 23.8997 14.4119 24.029 14.3715 24.1894C14.267 24.3963 14.2148 24.6032 14.1626 24.8101L18.1312 28.1205L22.0998 24.6032C22.0476 24.4997 21.9953 24.3446 21.9431 24.1894C21.9061 24.1161 21.8757 24.0493 21.8471 23.9867C21.7951 23.8725 21.7495 23.7723 21.682 23.6721L21.1076 24.1894L18.81 26.2067C18.6011 26.3618 18.3923 26.4653 18.1312 26.4653C17.9223 26.4653 17.7134 26.3618 17.5046 26.2067L15.0503 24.1377Z" fill="white"/>
+</svg>
diff --git a/assets/res.qrc b/assets/res.qrc
index 58ac6ec..d3f0c91 100644
--- a/assets/res.qrc
+++ b/assets/res.qrc
@@ -40,6 +40,7 @@
<file>carbon_icons/windy--strong-disabled.svg</file>
</qresource>
<qresource prefix="Images">
+ <file>Images/tire-pressure.svg</file>
<file>Images/HMI_HVAC_Fan_Icon.svg</file>
<file>Images/AGL_Icons_LaneDeparture_white.svg</file>
<file>Images/AGL_Icons_CruiseControl_white.svg</file>
diff --git a/extras/KuksaClient.py b/extras/KuksaClient.py
index 772fd50..dbffd93 100644
--- a/extras/KuksaClient.py
+++ b/extras/KuksaClient.py
@@ -119,7 +119,7 @@ class KuksaClient(QThread):
"""
if self.client is None:
- #logging.error("Kuksa client is None, try reconnecting")
+ logging.error("Kuksa client is None, try reconnecting")
return
if not self.client.checkConnection():
@@ -133,3 +133,34 @@ class KuksaClient(QThread):
except Exception as e:
logging.error(f"Error sending values to kuksa {e}")
threading.Thread(target=self.set_instance).start()
+
+ def get(self, path=None):
+ """
+ Gets VSS value.
+
+ Parameters:
+ -----------
+ path : str
+ The VSS signal path.
+
+ Returns:
+ --------
+ Any
+ The value of the VSS signal.
+ """
+
+ if self.client is None:
+ logging.error("Kuksa client is None, try reconnecting")
+ return
+
+ if not self.client.checkConnection():
+ logging.error("Client is not connected, try reconnecting")
+ threading.Thread(target=self.set_instance).start()
+ return
+
+ try:
+ return self.client.getValue(path)
+ except Exception as e:
+ logging.error(f"Error getting value from kuksa {e}")
+ threading.Thread(target=self.set_instance).start()
+ return None
diff --git a/extras/config.ini b/extras/config.ini
index 9d443da..409de83 100644
--- a/extras/config.ini
+++ b/extras/config.ini
@@ -1,10 +1,11 @@
[default]
-fullscreen-mode = false
+fullscreen-mode = true
hvac-enabled = true
steering-wheel-enabled = true
file-playback-enabled = true
-file-playback-path =
-can-interface =
+file-playback-path =
+dbc-file-path =
+can-interface =
[vss-server]
ip = localhost
diff --git a/extras/config.py b/extras/config.py
index 7540e61..8df3497 100644
--- a/extras/config.py
+++ b/extras/config.py
@@ -67,6 +67,12 @@ PLAYBACK_FILE_PATHS = check_paths(
os.path.abspath(os.path.join(os.path.dirname(__file__), "../assets/can_messages.txt"))
)
+DBC_FILE_PATHS = check_paths(
+ config.get('default', 'dbc-file-path', fallback=None),
+ "/etc/kuksa-dbc-feeder/agl-vcar.dbc",
+ os.path.abspath(os.path.join(os.path.dirname(__file__), "../Scripts/agl-vcar.dbc"))
+)
+
CA_PATH = next((path for path, exists in CA_PATHS.items() if exists), None)
WS_TOKEN = next((path for path, exists in WS_TOKEN_PATHS.items() if exists), None)
GRPC_TOKEN = next((path for path, exists in GRPC_TOKEN_PATHS.items() if exists), None)
@@ -177,7 +183,14 @@ def get_playback_file():
config.write(configfile)
return os.path.join(os.path.dirname(__file__), "can_messages.txt")
-
+
+# Function to get the dbc file path from config.ini
+def get_dbc_file():
+ if DBC_FILE_PATHS:
+ return DBC_FILE_PATHS
+ else:
+ raise ValueError("DBC file path not found")
+
# Function to get the can interface name from config.ini
def get_can_interface():
print(config.get('default', 'can-interface', fallback=None))
diff --git a/ui/HVAC.ui b/ui/HVAC.ui
index eff65e0..906b122 100644
--- a/ui/HVAC.ui
+++ b/ui/HVAC.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>815</width>
- <height>575</height>
+ <width>950</width>
+ <height>587</height>
</rect>
</property>
<property name="windowTitle">
@@ -63,39 +63,37 @@
border-radius: 8px;
}
-QSlider::sub-page:vertical {
- background-color: #131313 ; /* black */
- height: 20px;
- width: 28px;
- margin: 2px;
- border: 1px solid #6C6C85 ; /* pastel purple */
- border-radius: 8px;
-}
-
QSlider::groove:vertical {
- border-radius: 8px;
- width: 28px;
- margin: 2px;
+ background-color: #4BD7D6 ; /* light blue */
border: 1px solid #6C6C85 ; /* pastel purple */
- background-color: #4BD7D6 ; /* light blue */
+ width: 40px;
+ border-radius: 20px;
}
-QSlider::groove:vertical:hover {
- background-color: rgb(55, 62, 76);
+
+QSlider::sub-page:vertical {
+ border: 1px solid #6C6C85; /* pastel purple */
+ background-color: #131313; /* black */
+ width: 36px;
+ margin-top: 0px; /* Adjusted for better alignment */
+ margin-bottom: -20px; /* Space below the sub-page */
+ border-radius: 18px;
}
+
QSlider::handle:vertical {
- background-color: #d5d5d5;
- height: 15px;
- width: 20px;
- border-radius: 5px;
-}
-QSlider::handle:vertical:hover {
- background-color: #6C6C85 ; /* pastel purple */
-}
-QSlider::handle:vertical:pressed {
- background-color: #4BD7D6 ; /* light blue */
+ height: 28px;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
+ stop:0 #eee, stop:1 #ccc);
+ border: 1px solid #777;
+ width: 28px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: 5px;
+ margin-right: 5px;
+ border-radius: 15px;
}
+
QScrollBar:horizontal {
min-width: 240px;
height: 13px;
@@ -205,23 +203,7 @@ QListWidget::item:hover {
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="1" column="3" colspan="2">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="1" colspan="5" alignment="Qt::AlignBottom">
+ <item row="0" column="0" colspan="2" alignment="Qt::AlignBottom">
<widget class="QFrame" name="frame_2">
<property name="minimumSize">
<size>
@@ -260,23 +242,7 @@ QListWidget::item:hover {
</layout>
</widget>
</item>
- <item row="1" column="6">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="1" colspan="2">
+ <item row="1" column="0">
<widget class="QFrame" name="leftControls">
<property name="minimumSize">
<size>
@@ -291,11 +257,11 @@ QListWidget::item:hover {
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="0" colspan="5" alignment="Qt::AlignHCenter">
+ <item row="1" column="0" colspan="4" alignment="Qt::AlignHCenter">
<widget class="QLabel" name="label">
<property name="font">
<font>
- <pointsize>16</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
@@ -306,7 +272,7 @@ QListWidget::item:hover {
</property>
</widget>
</item>
- <item row="0" column="0" colspan="5">
+ <item row="0" column="0" colspan="4">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -322,53 +288,46 @@ QListWidget::item:hover {
</property>
</spacer>
</item>
- <item row="2" column="0" colspan="5">
- <spacer name="verticalSpacer_3">
+ <item row="5" column="0" colspan="4">
+ <spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
+ <enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0" rowspan="2">
- <spacer name="horizontalSpacer_6">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
+ <height>40</height>
</size>
</property>
</spacer>
</item>
- <item row="3" column="2" rowspan="2">
- <spacer name="horizontalSpacer_4">
+ <item row="2" column="0" colspan="4">
+ <spacer name="verticalSpacer_3">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>40</width>
+ <width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
- <item row="3" column="3" rowspan="2">
- <widget class="QFrame" name="frame_3">
+ <item row="3" column="2" rowspan="2">
+ <widget class="QFrame" name="leftFrame">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@@ -376,175 +335,20 @@ QListWidget::item:hover {
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
- <item alignment="Qt::AlignHCenter|Qt::AlignBottom">
- <widget class="QPushButton" name="leftTempUp">
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../assets/res.qrc">
- <normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>40</width>
- <height>40</height>
- </size>
- </property>
- </widget>
- </item>
- <item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
- <widget class="QListWidget" name="leftTempList">
+ <item>
+ <widget class="QWidget" name="LeftTemp_Placeholder" native="true">
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>152</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>60</width>
- <height>152</height>
- </size>
- </property>
- <property name="font">
- <font>
- <pointsize>14</pointsize>
- <weight>75</weight>
- <italic>true</italic>
- <bold>true</bold>
- </font>
- </property>
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="sizeAdjustPolicy">
- <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
- </property>
- <property name="editTriggers">
- <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
- </property>
- <property name="showDropIndicator" stdset="0">
- <bool>false</bool>
- </property>
- <property name="dragDropMode">
- <enum>QAbstractItemView::DragOnly</enum>
- </property>
- <property name="selectionMode">
- <enum>QAbstractItemView::SingleSelection</enum>
- </property>
- <property name="textElideMode">
- <enum>Qt::ElideMiddle</enum>
- </property>
- <property name="verticalScrollMode">
- <enum>QAbstractItemView::ScrollPerPixel</enum>
- </property>
- <property name="movement">
- <enum>QListView::Snap</enum>
- </property>
- <property name="isWrapping" stdset="0">
- <bool>false</bool>
- </property>
- <property name="resizeMode">
- <enum>QListView::Adjust</enum>
- </property>
- <property name="layoutMode">
- <enum>QListView::SinglePass</enum>
- </property>
- <property name="spacing">
- <number>1</number>
- </property>
- <property name="viewMode">
- <enum>QListView::ListMode</enum>
- </property>
- <property name="uniformItemSizes">
- <bool>true</bool>
- </property>
- <property name="selectionRectVisible">
- <bool>true</bool>
- </property>
- <property name="itemAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item alignment="Qt::AlignHCenter|Qt::AlignTop">
- <widget class="QPushButton" name="leftTempDown">
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../assets/res.qrc">
- <normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>40</width>
- <height>40</height>
- </size>
- </property>
</widget>
</item>
</layout>
</widget>
</item>
- <item row="5" column="0" colspan="5">
- <spacer name="verticalSpacer_5">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Preferred</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="4" rowspan="2">
- <spacer name="horizontalSpacer_7">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="1">
+ <item row="3" column="1" alignment="Qt::AlignLeft">
<widget class="QFrame" name="frame_4">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
@@ -578,7 +382,7 @@ QListWidget::item:hover {
</property>
<property name="minimumSize">
<size>
- <width>40</width>
+ <width>60</width>
<height>0</height>
</size>
</property>
@@ -621,23 +425,7 @@ QListWidget::item:hover {
</layout>
</widget>
</item>
- <item row="1" column="0">
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="5">
+ <item row="1" column="1">
<widget class="QFrame" name="rightControls">
<property name="minimumSize">
<size>
@@ -652,7 +440,7 @@ QListWidget::item:hover {
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3">
- <item row="6" column="0" colspan="6">
+ <item row="4" column="0" colspan="4">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -668,23 +456,7 @@ QListWidget::item:hover {
</property>
</spacer>
</item>
- <item row="3" column="5" rowspan="3">
- <spacer name="horizontalSpacer_8">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="4" column="4">
+ <item row="3" column="2">
<widget class="QFrame" name="frame_6">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
@@ -712,7 +484,7 @@ QListWidget::item:hover {
<widget class="QSlider" name="rightFanSpeed_slider">
<property name="minimumSize">
<size>
- <width>40</width>
+ <width>60</width>
<height>0</height>
</size>
</property>
@@ -734,39 +506,22 @@ QListWidget::item:hover {
</layout>
</widget>
</item>
- <item row="3" column="2" rowspan="3" colspan="2">
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0" rowspan="3">
- <spacer name="horizontalSpacer_9">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
+ <item row="1" column="0" colspan="4" alignment="Qt::AlignHCenter">
+ <widget class="QLabel" name="label_6">
+ <property name="font">
+ <font>
+ <pointsize>18</pointsize>
+ <weight>75</weight>
+ <italic>true</italic>
+ <bold>true</bold>
+ </font>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ <property name="text">
+ <string>Right Controls</string>
</property>
- </spacer>
+ </widget>
</item>
- <item row="2" column="0" colspan="6">
+ <item row="2" column="0" colspan="4">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -782,22 +537,7 @@ QListWidget::item:hover {
</property>
</spacer>
</item>
- <item row="1" column="0" colspan="6" alignment="Qt::AlignHCenter">
- <widget class="QLabel" name="label_6">
- <property name="font">
- <font>
- <pointsize>16</pointsize>
- <weight>75</weight>
- <italic>true</italic>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Right Controls</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0" colspan="6">
+ <item row="0" column="0" colspan="4">
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -813,8 +553,14 @@ QListWidget::item:hover {
</property>
</spacer>
</item>
- <item row="4" column="1">
- <widget class="QFrame" name="frame_5">
+ <item row="3" column="1">
+ <widget class="QFrame" name="rightFrame">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@@ -822,132 +568,8 @@ QListWidget::item:hover {
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
- <item alignment="Qt::AlignHCenter|Qt::AlignBottom">
- <widget class="QPushButton" name="rightTempUp">
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../assets/res.qrc">
- <normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>40</width>
- <height>40</height>
- </size>
- </property>
- </widget>
- </item>
- <item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
- <widget class="QListWidget" name="rightTempList">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>152</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>60</width>
- <height>152</height>
- </size>
- </property>
- <property name="font">
- <font>
- <pointsize>14</pointsize>
- <weight>75</weight>
- <italic>true</italic>
- <bold>true</bold>
- </font>
- </property>
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="sizeAdjustPolicy">
- <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
- </property>
- <property name="editTriggers">
- <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
- </property>
- <property name="showDropIndicator" stdset="0">
- <bool>false</bool>
- </property>
- <property name="dragDropMode">
- <enum>QAbstractItemView::DragOnly</enum>
- </property>
- <property name="selectionMode">
- <enum>QAbstractItemView::ContiguousSelection</enum>
- </property>
- <property name="textElideMode">
- <enum>Qt::ElideMiddle</enum>
- </property>
- <property name="verticalScrollMode">
- <enum>QAbstractItemView::ScrollPerPixel</enum>
- </property>
- <property name="movement">
- <enum>QListView::Snap</enum>
- </property>
- <property name="resizeMode">
- <enum>QListView::Adjust</enum>
- </property>
- <property name="layoutMode">
- <enum>QListView::SinglePass</enum>
- </property>
- <property name="spacing">
- <number>1</number>
- </property>
- <property name="viewMode">
- <enum>QListView::ListMode</enum>
- </property>
- <property name="selectionRectVisible">
- <bool>true</bool>
- </property>
- <property name="itemAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item alignment="Qt::AlignHCenter|Qt::AlignTop">
- <widget class="QPushButton" name="rightTempDown">
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="../assets/res.qrc">
- <normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>40</width>
- <height>40</height>
- </size>
- </property>
- </widget>
+ <item>
+ <widget class="QWidget" name="RightTemp_Placeholder" native="true"/>
</item>
</layout>
</widget>
diff --git a/ui/IC.ui b/ui/IC.ui
index 256eb81..961fc04 100644
--- a/ui/IC.ui
+++ b/ui/IC.ui
@@ -13,6 +13,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
<property name="styleSheet">
<string notr="true">*{
border: none;
@@ -44,59 +47,59 @@ QPushButton:pressed {
QSlider::groove:horizontal {
background-color: #131313 ; /* black */
border: 1px solid #6C6C85 ; /* pastel purple */
- height: 28px;
- border-radius: 8px;
+ height: 40px;
+ border-radius: 20px;
}
QSlider::sub-page:horizontal {
background-color: #4BD7D6 ; /* light blue */
- height: 28px;
- border-radius: 5px;
+ border: 1px solid #6C6C85 ; /* pastel purple */
+ height: 36px;
+ margin-right: -20px;
+ border-radius: 18px;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
stop:0 #eee, stop:1 #ccc);
border: 1px solid #777;
- width: 20px;
- margin-top: -2px;
- margin-bottom: -2px;
- border-radius: 8px;
-}
-
-QSlider::sub-page:vertical {
- background-color: #131313 ; /* black */
- height: 20px;
width: 28px;
- margin: 4px;
- border: 1px solid #6C6C85 ; /* pastel purple */
- border-radius: 8px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: 5px;
+ margin-right: 5px;
+ border-radius: 15px;
}
QSlider::groove:vertical {
- border-radius: 8px;
- width: 28px;
- margin: 4px;
+ background-color: #4BD7D6 ; /* light blue */
border: 1px solid #6C6C85 ; /* pastel purple */
- background-color: #4BD7D6 ; /* light blue */
+ width: 40px;
+ border-radius: 20px;
}
-QSlider::groove:vertical:hover {
- background-color: rgb(55, 62, 76);
+
+QSlider::sub-page:vertical {
+ border: 1px solid #6C6C85; /* pastel purple */
+ background-color: #131313; /* black */
+ width: 36px;
+ margin-top: 0px; /* Adjusted for better alignment */
+ margin-bottom: -20px; /* Space below the sub-page */
+ border-radius: 18px;
}
+
QSlider::handle:vertical {
- background-color: #d5d5d5;
- height: 15px;
- width: 20px;
- border-radius: 5px;
-}
-QSlider::handle:vertical:hover {
- background-color: #6C6C85 ; /* pastel purple */
-}
-QSlider::handle:vertical:pressed {
- background-color: #4BD7D6 ; /* light blue */
+ height: 28px;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
+ stop:0 #eee, stop:1 #ccc);
+ border: 1px solid #777;
+ width: 28px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-left: 5px;
+ margin-right: 5px;
+ border-radius: 15px;
}
-
QScrollBar:horizontal {
min-width: 240px;
height: 13px;
@@ -165,7 +168,27 @@ QLCDNumber {
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3">
- <item row="0" column="0" rowspan="2">
+ <item row="0" column="0">
+ <widget class="QDockWidget" name="TirePressureDock">
+ <property name="floating">
+ <bool>false</bool>
+ </property>
+ <property name="features">
+ <set>QDockWidget::NoDockWidgetFeatures</set>
+ </property>
+ <widget class="QWidget" name="dockWidgetContents">
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="TirePressure" name="TirePressure" native="true"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="1" rowspan="2">
<widget class="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -183,10 +206,10 @@ QLCDNumber {
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
- <item row="2" column="0">
+ <item row="2" column="0" colspan="2">
<widget class="QFrame" name="frame_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -247,27 +270,6 @@ QLCDNumber {
</property>
</widget>
</item>
- <item row="4" column="3" alignment="Qt::AlignHCenter|Qt::AlignTop">
- <widget class="QLabel" name="label_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <family>Open Sans</family>
- <weight>75</weight>
- <italic>true</italic>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Speed (Kmph)</string>
- </property>
- </widget>
- </item>
<item row="2" column="3">
<widget class="QWidget" name="Speed_Gauge_Placeholder" native="true">
<property name="sizePolicy">
@@ -281,27 +283,6 @@ QLCDNumber {
</property>
</widget>
</item>
- <item row="4" column="4" alignment="Qt::AlignHCenter|Qt::AlignTop">
- <widget class="QLabel" name="label_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <family>Open Sans</family>
- <weight>75</weight>
- <italic>true</italic>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Engine RPM</string>
- </property>
- </widget>
- </item>
<item row="0" column="2" colspan="4">
<spacer name="verticalSpacer_5">
<property name="orientation">
@@ -374,7 +355,7 @@ QLCDNumber {
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="4">
+ <item row="1" column="3">
<widget class="QPushButton" name="rightIndicatorBtn">
<property name="text">
<string/>
@@ -391,39 +372,24 @@ QLCDNumber {
</property>
</widget>
</item>
- <item row="1" column="1">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="3">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <item row="0" column="2" colspan="2">
+ <widget class="QPushButton" name="hazardBtn">
+ <property name="text">
+ <string/>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
+ <property name="icon">
+ <iconset resource="../assets/res.qrc">
+ <normaloff>:/Images/Images/hazard.png</normaloff>:/Images/Images/hazard.png</iconset>
</property>
- <property name="sizeHint" stdset="0">
+ <property name="iconSize">
<size>
- <width>20</width>
- <height>20</height>
+ <width>60</width>
+ <height>60</height>
</size>
</property>
- </spacer>
+ </widget>
</item>
- <item row="1" column="0">
+ <item row="1" column="2">
<widget class="QPushButton" name="leftIndicatorBtn">
<property name="acceptDrops">
<bool>false</bool>
@@ -452,27 +418,36 @@ QLCDNumber {
</property>
</widget>
</item>
- <item row="1" column="2">
- <widget class="QPushButton" name="hazardBtn">
- <property name="text">
- <string/>
+ <item row="0" column="1" rowspan="2">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="icon">
- <iconset resource="../assets/res.qrc">
- <normaloff>:/Images/Images/hazard.png</normaloff>:/Images/Images/hazard.png</iconset>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
</property>
- <property name="iconSize">
+ </spacer>
+ </item>
+ <item row="0" column="4" rowspan="2">
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>60</width>
- <height>60</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
</widget>
</item>
- <item row="1" column="0" rowspan="4" colspan="2">
+ <item row="1" column="0" rowspan="4" colspan="2" alignment="Qt::AlignHCenter">
<widget class="QFrame" name="coolant_gauge_frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -499,7 +474,7 @@ QLCDNumber {
<property name="bottomMargin">
<number>4</number>
</property>
- <item row="1" column="1">
+ <item row="1" column="1" alignment="Qt::AlignHCenter">
<widget class="QSlider" name="coolantTemp_slider">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -513,24 +488,23 @@ QLCDNumber {
<height>0</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="invertedAppearance">
+ <bool>false</bool>
</property>
- <property name="text">
- <string/>
+ <property name="invertedControls">
+ <bool>false</bool>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::NoTicks</enum>
</property>
- <property name="pixmap">
- <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/temperature--water.svg</pixmap>
+ <property name="tickInterval">
+ <number>0</number>
</property>
</widget>
</item>
@@ -553,7 +527,7 @@ QLCDNumber {
</layout>
</widget>
</item>
- <item row="1" column="6" rowspan="4" alignment="Qt::AlignRight">
+ <item row="1" column="6" rowspan="4" alignment="Qt::AlignHCenter">
<widget class="QFrame" name="fuel_gauge_frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -571,7 +545,7 @@ QLCDNumber {
<property name="bottomMargin">
<number>4</number>
</property>
- <item row="1" column="0" alignment="Qt::AlignRight">
+ <item row="1" column="0" alignment="Qt::AlignHCenter">
<widget class="QSlider" name="fuelLevel_slider">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -590,6 +564,9 @@ QLCDNumber {
<kerning>true</kerning>
</font>
</property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
<property name="sliderPosition">
<number>0</number>
</property>
@@ -607,33 +584,6 @@ QLCDNumber {
</property>
</widget>
</item>
- <item row="1" column="1" alignment="Qt::AlignRight">
- <widget class="QLabel" name="label_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>12</pointsize>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/rain-drop.svg</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- </widget>
- </item>
<item row="0" column="0" colspan="2">
<widget class="QWidget" name="fuel_Gauge_Placeholder" native="true">
<property name="sizePolicy">
@@ -656,72 +606,7 @@ QLCDNumber {
</layout>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QFrame" name="header_frame">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>50</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QFrame" name="frame_6">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <spacer name="horizontalSpacer_6">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item alignment="Qt::AlignRight">
- <widget class="QLabel" name="label_6">
- <property name="font">
- <font>
- <pointsize>18</pointsize>
- <weight>75</weight>
- <italic>true</italic>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Demo Mode</string>
- </property>
- </widget>
- </item>
- <item alignment="Qt::AlignRight">
- <widget class="QCheckBox" name="demoToggle">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="4" column="0" alignment="Qt::AlignBottom">
+ <item row="4" column="0" colspan="2">
<widget class="QFrame" name="gearSelector">
<property name="minimumSize">
<size>
@@ -741,6 +626,9 @@ QLCDNumber {
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>167</width>
@@ -911,6 +799,9 @@ QLCDNumber {
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>168</width>
@@ -922,6 +813,115 @@ QLCDNumber {
</layout>
</widget>
</item>
+ <item row="0" column="0" colspan="2">
+ <widget class="QFrame" name="header_frame">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QFrame" name="frame_6">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QPushButton" name="TirePressureBtn">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <family>Open Sans</family>
+ <pointsize>20</pointsize>
+ <weight>75</weight>
+ <italic>false</italic>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../assets/res.qrc">
+ <normaloff>:/Images/Images/tire-pressure.svg</normaloff>:/Images/Images/tire-pressure.svg</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>50</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item alignment="Qt::AlignRight">
+ <widget class="QLabel" name="label_6">
+ <property name="font">
+ <font>
+ <pointsize>18</pointsize>
+ <weight>75</weight>
+ <italic>true</italic>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Demo Mode</string>
+ </property>
+ </widget>
+ </item>
+ <item alignment="Qt::AlignRight">
+ <widget class="QCheckBox" name="demoToggle">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -930,6 +930,14 @@ QLCDNumber {
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>TirePressure</class>
+ <extends>QWidget</extends>
+ <header>Widgets/TirePressure</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
<resources>
<include location="../assets/res.qrc"/>
</resources>
diff --git a/ui/Settings_Window.ui b/ui/Settings_Window.ui
index d59cae6..0043bb1 100644
--- a/ui/Settings_Window.ui
+++ b/ui/Settings_Window.ui
@@ -175,7 +175,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_12">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
@@ -190,7 +190,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="toolTip">
@@ -205,7 +205,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_20">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="text">
@@ -217,7 +217,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_11">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="toolTip">
@@ -245,7 +245,7 @@ QCheckBox:indicator:disabled {
<widget class="QLineEdit" name="CA_File">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
</widget>
@@ -254,7 +254,7 @@ QCheckBox:indicator:disabled {
<widget class="QLineEdit" name="Auth_Token">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
</widget>
@@ -263,7 +263,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_16">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="text">
@@ -275,7 +275,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_13">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
@@ -290,7 +290,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_21">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="text">
@@ -302,7 +302,7 @@ QCheckBox:indicator:disabled {
<widget class="QLineEdit" name="IPAddrInput">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="placeholderText">
@@ -334,7 +334,7 @@ QCheckBox:indicator:disabled {
<widget class="QLineEdit" name="PortInput">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
</widget>
@@ -343,7 +343,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_17">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="text">
@@ -355,7 +355,7 @@ QCheckBox:indicator:disabled {
<widget class="QLineEdit" name="TLS_Server_Name">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
</widget>
@@ -364,7 +364,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="IPAddr">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
</font>
</property>
<property name="text">
@@ -426,7 +426,7 @@ QCheckBox:indicator:disabled {
</property>
<property name="font">
<font>
- <pointsize>16</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
@@ -451,7 +451,7 @@ QCheckBox:indicator:disabled {
<widget class="QPushButton" name="reconnectBtn">
<property name="font">
<font>
- <pointsize>16</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
@@ -506,7 +506,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="status">
<property name="font">
<font>
- <pointsize>14</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
@@ -558,7 +558,7 @@ QCheckBox:indicator:disabled {
<widget class="QLabel" name="label_19">
<property name="font">
<font>
- <pointsize>16</pointsize>
+ <pointsize>18</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
diff --git a/ui/TirePressure.ui b/ui/TirePressure.ui
new file mode 100644
index 0000000..7387ff3
--- /dev/null
+++ b/ui/TirePressure.ui
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HVAC</class>
+ <widget class="QWidget" name="HVAC">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>407</width>
+ <height>590</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">*{
+ border: none;
+ background-color: transparent;
+ background: none;
+ padding: 0;
+ margin: 0;
+ color: #fff;
+}
+
+#scrollAreaWidgetContents{
+ background-color: #131313 ; /* black */
+}
+
+#centralwidget{
+ background-color: #131313 ; /* black */
+}
+
+#centralwidget QPushButton{
+ background-color: #6C6C85 ; /* pastel purple */
+ padding: 5px 10px;
+ border-radius: 10px;
+}
+
+#centralwidget QPushButton:pressed {
+ background-color: #4BD7D6 ; /* light blue */
+}
+
+#centralwidget QSlider::groove:horizontal {
+ border: 1px solid #6C6C85 ; /* pastel purple */
+ height: 15px;
+ border-radius: 8px;
+}
+
+#centralwidget QSlider::sub-page:horizontal {
+ background-color: #4BD7D6 ; /* light blue */
+ height: 15px;
+ border-radius: 5px;
+}
+
+#centralwidget QSlider::handle:horizontal {
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
+ stop:0 #eee, stop:1 #ccc);
+ border: 1px solid #777;
+ width: 20px;
+ margin-top: -2px;
+ margin-bottom: -2px;
+ border-radius: 8px;
+}
+
+QSlider::sub-page:vertical {
+ background-color: #131313 ; /* black */
+ height: 20px;
+ width: 28px;
+ margin: 2px;
+ border: 1px solid #6C6C85 ; /* pastel purple */
+ border-radius: 8px;
+}
+
+QSlider::groove:vertical {
+ border-radius: 8px;
+ width: 28px;
+ margin: 2px;
+ border: 1px solid #6C6C85 ; /* pastel purple */
+ background-color: #4BD7D6 ; /* light blue */
+}
+QSlider::groove:vertical:hover {
+ background-color: rgb(55, 62, 76);
+}
+QSlider::handle:vertical {
+ background-color: #d5d5d5;
+ height: 15px;
+ width: 20px;
+ border-radius: 5px;
+}
+QSlider::handle:vertical:hover {
+ background-color: #6C6C85 ; /* pastel purple */
+}
+QSlider::handle:vertical:pressed {
+ background-color: #4BD7D6 ; /* light blue */
+}
+
+
+QScrollBar:horizontal {
+ min-width: 240px;
+ height: 13px;
+ }
+
+ QScrollBar:vertical {
+ min-height: 240px;
+ width: 13px;
+ }
+
+ QScrollBar::groove {
+ background: 2A2827; /* dark grey */
+ border-radius: 5px;
+ }
+
+ QScrollBar::handle {
+ background: #4BD7D6 ; /* light blue */
+ border-radius: 5px;
+ }
+
+ QScrollBar::handle:horizontal {
+ width: 25px;
+ }
+
+ QScrollBar::handle:vertical {
+ height: 25px; scrollAreaWidgetContents
+ }
+
+#leftControls{
+ background: #041F2B ; /* dark blue */
+ border-radius: 10px;
+}
+
+#rightControls{
+ background: #041F2B ; /* dark blue */
+ border-radius: 10px;
+}
+
+
+/*============================================*/
+
+QListWidget {
+ min-height: 150px;
+ max-height: 150px;
+ background-color: #131313 ; /* black */
+ border: 1px solid #6C6C85 ; /* pastel purple */
+ border-radius: 8px;
+}
+
+QListWidget::item {
+ height: 50px;
+ width: 50px;
+ border-radius: 8px;
+ text-align: center;
+}
+
+QListWidget::item:selected {
+ background-color: #4BD7D6 ; /* light blue */
+ border-radius: 8px;
+}
+
+QListWidget::item:selected:!active {
+ border-width: 0px;
+}
+
+QListWidget::item:selected:active {
+ background-color: #4BD7D6 ; /* light blue */
+}
+
+QListWidget::item:selected:!focus {
+ color: black;
+ border-width: 0px;
+}
+
+QListWidget::item:focus {
+ background-color: #6C6C85 ; /* pastel purple */
+}
+
+QListWidget::item:hover {
+ background-color: #6C6C85 ; /* pastel purple */
+}
+
+</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QFrame" name="centralwidget">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QFrame" name="frame_2">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="1" column="0">
+ <widget class="QFrame" name="frame">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="0" alignment="Qt::AlignBottom">
+ <widget class="QFrame" name="frame_3">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="TPDecreaseBtn">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../assets/res.qrc">
+ <normaloff>:/Carbon_Icons/carbon_icons/subtract--alt.svg</normaloff>:/Carbon_Icons/carbon_icons/subtract--alt.svg</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>50</width>
+ <height>50</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLCDNumber" name="LCD">
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>2</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="TPUnit">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt;&quot;&gt;lbp&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="TPIncreaseBtn">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../assets/res.qrc">
+ <normaloff>:/Carbon_Icons/carbon_icons/add--alt.svg</normaloff>:/Carbon_Icons/carbon_icons/add--alt.svg</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>50</width>
+ <height>50</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QWidget" name="TS_Placeholher" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="0" alignment="Qt::AlignHCenter">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt; font-weight:600; font-style:italic;&quot;&gt;Tire Pressure&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="../assets/res.qrc"/>
+ </resources>
+ <connections/>
+</ui>