aboutsummaryrefslogtreecommitdiffstats
path: root/Widgets/Dashboard.py
diff options
context:
space:
mode:
authorSuchinton Chakravarty <suchinton.2001@gmail.com>2024-10-15 23:57:36 +0530
committerSuchinton Chakravarty <suchinton.2001@gmail.com>2024-10-22 16:09:43 +0530
commit6fdddee7d45206dc64eacd08700f79566ad9b4a6 (patch)
tree7d688595f69cdb7d7484f37542059d7406da28c5 /Widgets/Dashboard.py
parent2e2dd79e41b27a1d50be3c118955cdbd76e65539 (diff)
Fix Visual Bugs and Add options for Keypad input
- Fixed spin wheel input alignment for HVAC controls - Minor tweaks to Gauge input, Added new tick marks and improved gradient - Adding option(s) in config to handle Keypad input settings - Reconnect QML signals to enable two way input for Speed, RPM and other QML elements - Refactor and Add CLI option to start and stop playback. - Make Tire Pressure Dock into floating window and align to screen center. - Update resources to include keypad icons. - Add new tile for Keypad inputs Bug-AGL: SPEC-5161 Change-Id: I1ecefdfd114ecad081c138e74c1598907d91fd23 Signed-off-by: Suchinton Chakravarty <suchinton.2001@gmail.com>
Diffstat (limited to 'Widgets/Dashboard.py')
-rw-r--r--Widgets/Dashboard.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Widgets/Dashboard.py b/Widgets/Dashboard.py
index 9df290f..b8dfc92 100644
--- a/Widgets/Dashboard.py
+++ b/Widgets/Dashboard.py
@@ -57,6 +57,7 @@ class Dashboard(Base, Form):
Dashboard_tiles = (self.DB_IC_Tile,
self.DB_HVAC_Tile,
self.DB_Steering_Tile,
+ self.DB_Keypad_Tile,
self.DB_Settings_Tile)
DashboardTiles = QtWidgets.QButtonGroup(self)
@@ -73,6 +74,12 @@ class Dashboard(Base, Form):
self.DB_Steering_Tile.setEnabled(False)
self.DB_Steering_Tile.setStyleSheet("background-color : darkGray; color: gray")
enabled = False
+ if tile == self.DB_Keypad_Tile and not config.keypad_enabled():
+ self.DB_Keypad_Tile.setEnabled(False)
+ # hide the keypad tile
+ self.DB_Keypad_Tile.hide()
+ self.DB_Keypad_Tile.setStyleSheet("background-color : darkGray; color: gray")
+ enabled = False
self.set_icon(tile, 90)
DashboardTiles.addButton(tile)
@@ -120,8 +127,10 @@ class Dashboard(Base, Form):
self.parent().setCurrentIndex(2)
elif tile == self.DB_Steering_Tile:
self.parent().setCurrentIndex(3)
- elif tile == self.DB_Settings_Tile:
+ elif tile == self.DB_Keypad_Tile:
self.parent().setCurrentIndex(4)
+ elif tile == self.DB_Settings_Tile:
+ self.parent().setCurrentIndex(5)
self.tileClickedSignal.emit()