From c65710aac670e9546c261b13294571f310ca9439 Mon Sep 17 00:00:00 2001 From: suchinton2001 Date: Wed, 20 Sep 2023 23:18:36 +0530 Subject: [PATCH] Update UI files V1: - Widen Scroll bars in IC and HVAC Page - Update UI to use carbon icon resources - Add new Dashboard page - Add bottom navigation bar to main window UI - Remove deprecated navigation page files Bug-AGL: SPEC-4905 Signed-off-by: suchinton2001 Change-Id: Ia307d326c4bc9af9969e1d6b2a2cb4948a7ee286 --- Main_Window.ui | 587 +++++++++++++++++++++---------------------- Widgets/Dashboard.py | 89 +++++++ Widgets/NavPage.py | 179 ------------- main.py | 69 +++-- ui/Dashboard.ui | 216 ++++++++++++++++ ui/HVAC.ui | 104 ++++---- ui/IC.ui | 71 ++++-- ui/Nav.ui | 304 ---------------------- ui/Settings_Window.ui | 669 ++++++++++++++++++++++++++++--------------------- ui/SteeringControls.ui | 143 ++++++----- 10 files changed, 1185 insertions(+), 1246 deletions(-) create mode 100644 Widgets/Dashboard.py delete mode 100644 Widgets/NavPage.py create mode 100644 ui/Dashboard.ui delete mode 100644 ui/Nav.ui diff --git a/Main_Window.ui b/Main_Window.ui index 73ff5c8..6b8ba83 100644 --- a/Main_Window.ui +++ b/Main_Window.ui @@ -487,8 +487,8 @@ #BottomMenuSubContainer QPushButton{ background-color: #6C6C85 ; /* pastel purple */ - text-align: left; - padding: 5px 10px; + text-align: center; + padding: 5px 5px; border-radius: 10px; } @@ -496,6 +496,10 @@ background-color: #4BD7D6 ; /* light blue */ } +#BottomMenuSubContainer QPushButton:checked { + background-color: #965D62 ; /* red */ +} + #headerContainer{ border-radius: 10px; background-color: #041F2B ; /* dark blue */ @@ -512,30 +516,6 @@ background-color: #4BD7D6 ; /* light blue */ } -#navigationFrame QPushButton:checked { - background-color: #965D62 ; /* red */ -} - -#settingsFrame QPushButton:checked { - background-color: #965D62 ; /* red */ -} - -#notificationContent{ - border-radius: 10px; - background-color: #041F2B ; /* dark blue */ -} - -#notificationContent QPushButton{ - background-color: #6C6C85 ; /* pastel purple */ - text-align: left; - padding: 5px 10px; - border-radius: 10px; -} - -#notificationContent QPushButton:pressed { - background-color: #4BD7D6 ; /* light blue */ -} - QStackedWidget{ background-color: #131313 ; /* black */ } @@ -563,6 +543,271 @@ QStackedWidget{ false + + + + + 0 + 0 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 70 + + + + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + DejaVu Sans + 75 + true + true + + + + + + + + :/Carbon_Icons/carbon_icons/workspace.svg:/Carbon_Icons/carbon_icons/workspace.svg + + + + 35 + 35 + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + true + + + + 0 + 0 + + + + + DejaVu Sans + 75 + true + true + true + + + + + + + + :/Carbon_Icons/carbon_icons/meter.svg:/Carbon_Icons/carbon_icons/meter.svg + + + + 35 + 35 + + + + + + + + + DejaVu Sans + 75 + true + true + true + + + + + + + + :/Carbon_Icons/carbon_icons/windy--strong.svg:/Carbon_Icons/carbon_icons/windy--strong.svg + + + + 35 + 35 + + + + + + + + + DejaVu Sans + 75 + true + true + true + + + + + + + + :/Images/Images/steering-wheel.svg:/Images/Images/steering-wheel.svg + + + + 35 + 35 + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 40 + 20 + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + DejaVu Sans + 75 + true + true + + + + Configure + + + + :/Carbon_Icons/carbon_icons/settings.svg:/Carbon_Icons/carbon_icons/settings.svg + + + + 35 + 35 + + + + + + + + + + + + + @@ -673,7 +918,7 @@ QStackedWidget{ - Open Sans + DejaVu Sans 75 true true @@ -725,7 +970,7 @@ QStackedWidget{ - :/icons/feather/minus.svg:/icons/feather/minus.svg + :/Carbon_Icons/carbon_icons/subtract.svg:/Carbon_Icons/carbon_icons/subtract.svg false @@ -739,7 +984,7 @@ QStackedWidget{ - :/icons/feather/square.svg:/icons/feather/square.svg + :/Carbon_Icons/carbon_icons/scale.svg:/Carbon_Icons/carbon_icons/scale.svg @@ -750,7 +995,7 @@ QStackedWidget{ - :/icons/feather/x.svg:/icons/feather/x.svg + :/Carbon_Icons/carbon_icons/close.svg:/Carbon_Icons/carbon_icons/close.svg @@ -805,12 +1050,12 @@ QStackedWidget{ - 2 + 1 + - @@ -859,7 +1104,7 @@ QStackedWidget{ - :/icons/feather/alert-octagon.svg + :/icons/feather/alert-octagon.svg @@ -923,276 +1168,6 @@ QStackedWidget{ - - - - - 0 - 0 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 80 - 0 - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - Open Sans - 75 - true - true - - - - Menu - - - - :/icons/feather/menu.svg:/icons/feather/menu.svg - - - - 25 - 25 - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - true - - - - Open Sans - 75 - true - true - true - - - - Instrument Cluster - - - - :/Images/Images/IC.svg:/Images/Images/IC.svg - - - - 25 - 25 - - - - - - - - - Open Sans - 75 - true - true - - - - HVAC - - - - :/icons/feather/wind.svg:/icons/feather/wind.svg - - - - 25 - 25 - - - - - - - - - Open Sans - 75 - true - true - - - - Steering Inputs - - - - :/Images/Images/steering-wheel.svg:/Images/Images/steering-wheel.svg - - - - 25 - 25 - - - - - - - - - Open Sans - 75 - true - true - - - - New - - - - :/icons/feather/plus.svg:/icons/feather/plus.svg - - - - 25 - 25 - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - Open Sans - 75 - true - true - - - - Configure - - - - :/icons/feather/settings.svg:/icons/feather/settings.svg - - - - 25 - 25 - - - - - - - - - - - - - @@ -1221,6 +1196,12 @@ QStackedWidget{
Widgets/SteeringCtrlPage
1 + + Dashboard + QWidget +
Widgets/Dashboard
+ 1 +
diff --git a/Widgets/Dashboard.py b/Widgets/Dashboard.py new file mode 100644 index 0000000..591f296 --- /dev/null +++ b/Widgets/Dashboard.py @@ -0,0 +1,89 @@ +""" + Copyright 2023 Suchinton Chakravarty + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + +import os +import sys +from PyQt5 import uic +from PyQt5 import QtWidgets +from PyQt5.QtCore import pyqtSignal + +current_dir = os.path.dirname(os.path.abspath(__file__)) + +# ======================================== + +sys.path.append(os.path.dirname(current_dir)) + +from extras.FeedKuksa import FeedKuksa + +Form, Base = uic.loadUiType(os.path.join(current_dir, "../ui/Dashboard.ui")) + +# ======================================== + +class Dashboard(Base, Form): + """ + A class representing the dashboard widget. + + Attributes: + - tileClickedSignal: A PyQtSignal emitted when a tile is clicked. + + Methods: + - __init__(self, parent=None): Initializes the Dashboard widget. + - tile_clicked(self, tile): Handles the tile click event. + """ + + tileClickedSignal = pyqtSignal() + + def __init__(self, parent=None): + """ + Initializes the Dashboard widget. + + Parameters: + - parent: The parent widget. Defaults to None. + """ + super(self.__class__, self).__init__(parent) + self.setupUi(self) + + self.feed_kuksa = FeedKuksa() + + Dashboard_tiles = (self.DB_IC_Tile, + self.DB_HVAC_Tile, + self.DB_Steering_Tile, + self.DB_Settings_Tile) + + DashboardTiles = QtWidgets.QButtonGroup(self) + + for i, tile in enumerate(Dashboard_tiles): + DashboardTiles.addButton(tile) + + DashboardTiles.buttonClicked.connect(self.tile_clicked) + + def tile_clicked(self, tile): + """ + Handles the tile click event. + + Parameters: + - tile: The tile that was clicked. + """ + if tile == self.DB_IC_Tile: + self.parent().setCurrentIndex(1) + elif tile == self.DB_HVAC_Tile: + self.parent().setCurrentIndex(2) + elif tile == self.DB_Steering_Tile: + self.parent().setCurrentIndex(3) + elif tile == self.DB_Settings_Tile: + self.parent().setCurrentIndex(4) + + self.tileClickedSignal.emit() \ No newline at end of file diff --git a/Widgets/NavPage.py b/Widgets/NavPage.py deleted file mode 100644 index 61d63aa..0000000 --- a/Widgets/NavPage.py +++ /dev/null @@ -1,179 +0,0 @@ -""" - Copyright 2023 Suchinton Chakravarty - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -""" - -import extras.Kuksa_Instance as kuksa_instance -import os -import sys -import requests -import folium -from PyQt5 import uic, QtCore - -from PyQt5.QtCore import QUrl, QObject -from PyQt5.QtCore import QThread, pyqtSignal, pyqtSlot -from PyQt5.QtWebEngineWidgets import QWebEngineView -from PyQt5.QtWidgets import QApplication, QListWidget, QLineEdit, QCompleter, QListView -from PyQt5.QtGui import QPainterPath, QRegion, QStandardItemModel, QStandardItem -from PyQt5.QtCore import QRectF -from PyQt5.QtCore import QTimer -from PyQt5.QtCore import Qt - -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/Nav.ui")) - -# ======================================== - - -class Nav_Paths(): - def __init__(self): - self.currLat = "Vehicle.CurrentLocation.Latitude" - self.currLng = "Vehicle.CurrentLocation.Longitude" - self.desLat = "Vehicle.Cabin.Infotainment.Navigation.DestinationSet.Latitude" - self.desLng = "Vehicle.Cabin.Infotainment.Navigation.DestinationSet.Longitude" - - -class NavWidget(Base, Form): - suggestionsUpdated = pyqtSignal(list) - - def __init__(self, parent=None): - super(self.__class__, self).__init__(parent) - self.setupUi(self) - - self.From_address = self.findChild(QLineEdit, "From_address") - self.To_address = self.findChild(QLineEdit, "To_address") - self.map_view = self.findChild(QWebEngineView, "map_view") - - path = QPainterPath() - path.addRoundedRect(QRectF(self.map_view.rect()), 10, 10) - mask = QRegion(path.toFillPolygon().toPolygon()) - self.map_view.setMask(mask) - - self.searching_thread = QThread() - - self.suggested_addresses = QStandardItemModel() - completer = CustomCompleter(self.suggested_addresses) - self.From_address.setCompleter(completer) - - self.From_address.textChanged.connect(self.delayed_search) - # self.To_address.textChanged.connect(lambda: self.start_search(self.To_address.text())) - - self.suggestionsUpdated.connect(self.update_suggestions) - - self.timer = QTimer() - self.timer.setInterval(500) # Adjust delay as needed - self.timer.setSingleShot(True) - self.timer.timeout.connect(self.start_search) - - def delayed_search(self): - self.timer.start() - - def start_search(self): - query = self.From_address.text().strip() - if query: - self.searching_thread.run = lambda: self.search_address(query) - self.searching_thread.start() - - def search_address(self, query): - options = self.fetch_address_suggestions(query) - self.suggestionsUpdated.emit(options) - - def fetch_address_suggestions(self, query): - url = f"https://nominatim.openstreetmap.org/search?format=json&limit=5&q={requests.utils.quote(query)}" - response = requests.get(url) - if response.status_code == 200: - return response.json() - else: - return [] - - def show_suggestions(self, options): - current_query = self.From_address.text().strip() - if current_query: - self.suggested_addresses.clear() - for suggestion in options: - address = suggestion.get("display_name", "") - self.suggested_addresses.appendRow(QStandardItem(address)) - - @pyqtSlot(list) - def update_suggestions(self, options): - self.show_suggestions(options) - - def select_suggestion(self, item): - address = item.text() - # self.address_input.setText(address) - coordinates = self.show_location(address) - - def show_location(self, query): - url = f"https://nominatim.openstreetmap.org/search?format=json&limit=1&q={requests.utils.quote(query)}" - response = requests.get(url) - if response.status_code == 200: - data = response.json() - if data: - lat = data[0]["lat"] - lon = data[0]["lon"] - location = [float(lat), float(lon)] - - self.update_map(location) - return location - - def update_map(self, location): - map_html = self.create_map_html(location) - file_path = os.path.abspath("map.html") - with open(file_path, "w") as f: - f.write(map_html) - self.map_view.load(QUrl.fromLocalFile(file_path)) - - def create_map_html(self, location): - map = folium.Map(location=location, zoom_start=15) - marker = folium.Marker(location=location) - marker.add_to(map) - return map._repr_html_() - - -class CustomCompleter(QCompleter): - def __init__(self, parent=None): - super().__init__(parent) - self.setPopup(QListView()) - self.popup().setStyleSheet(""" - QListView { - background-color: #131313 ; /* black */ - color: #fff; - border: 1px solid #4BD7D6 ; /* light blue */ - border-radius: 2px; - padding: 10px; - margin: 2px; - } - """) - - self.popup().setWindowFlags(Qt.Popup | Qt.FramelessWindowHint) - self.popup().setUniformItemSizes(True) - self.popup().setWordWrap(True) - self.popup().setSpacing(1) - self.popup().setFrameShape(QListView.NoFrame) - self.popup().setFrameShadow(QListView.Plain) - self.popup().setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) - - -if __name__ == '__main__': - import sys - app = QApplication(sys.argv) - w = NavWidget() - w.show() - sys.exit(app.exec_()) diff --git a/main.py b/main.py index 57821c3..d832789 100644 --- a/main.py +++ b/main.py @@ -20,34 +20,37 @@ import os from PyQt5 import uic, QtCore, QtWidgets from PyQt5.QtWidgets import QApplication, QPushButton, QWidget from functools import partial -from PyQt5.QtGui import QFontDatabase +from PyQt5 import QtGui +from PyQt5.QtCore import Qt current_dir = os.path.dirname(os.path.abspath(__file__)) Form, Base = uic.loadUiType(os.path.join(current_dir, "Main_Window.ui")) from extras.UI_Handeler import * +from Widgets.Dashboard import Dashboard class MainWindow(Base, Form): + """ + The main window of the AGL Demo Control Panel application. + Inherits from the Base and Form classes. + """ # signal to stop the thread stop_thread_signal = QtCore.pyqtSignal() start_thread_signal = QtCore.pyqtSignal() def __init__(self, parent=None): + """ + Initializes the MainWindow object. + Sets up the UI, window flags, and geometry. + Connects signals and slots for window controls and widget navigation. + Initializes the Dashboard object and connects its signals. + """ super(self.__class__, self).__init__(parent) self.setupUi(self) self.setWindowFlags(QtCore.Qt.FramelessWindowHint) self.setAttribute(QtCore.Qt.WA_TranslucentBackground) - fonts = [font for font in os.listdir(os.path.join(current_dir, "assets/fonts")) if font.endswith(".ttf")] - fonts = [os.path.join(current_dir, "assets/fonts/", font) for font in fonts] - - for font in fonts: - QFontDatabase.addApplicationFont(font) - # # load the stylesheet - # theme = open(os.path.join(current_dir, "ui/styles/Tron/MainWindow.qss"), 'r') - # self.setStyleSheet(theme.read()) - self.setStyle(QtWidgets.QStyleFactory.create('Fusion')) self.headerContainer = self.findChild(QWidget, 'headerContainer') @@ -57,8 +60,10 @@ class MainWindow(Base, Form): self.headerContainer.mouseReleaseEvent = lambda event: UI_Handeler.mouseReleaseEvent(self, event) self.leftMenuSubContainer = self.findChild(QWidget, 'leftMenuSubContainer') - self.menuButton = self.findChild(QPushButton, 'menuButton') - self.menuButton.clicked.connect(lambda: UI_Handeler.toggleNavigationBar(self, 250, True)) + self.dashboardButton = self.findChild(QPushButton, 'dashboardButton') + UI_Handeler.Hide_Navbar(self,bool_arg=True) + + self.stackedWidget.currentChanged.connect(lambda: UI_Handeler.subscribe_VSS_Signals(self) if UI_Handeler.set_instance(self) else None) self.notificationContent = self.findChild(QWidget, 'notificationContent') @@ -67,23 +72,22 @@ class MainWindow(Base, Form): minimizeButton = self.findChild(QPushButton, 'minimizeBtn') maximizeButton = self.findChild(QPushButton, 'maximizeBtn') - #closeButton.clicked.connect(self.close) # make the close button also end all threads closeButton.clicked.connect(lambda: [self.close(), self.stop_thread_signal.emit()]) minimizeButton.clicked.connect(self.showMinimized) maximizeButton.clicked.connect(lambda: UI_Handeler.toggleMaximized(self)) # Widget Navigation - buttons = (self.icButton, - self.hvacButton, - self.steeringCtrlButton, - self.newButton, - self.settingsBtn) + Navigation_buttons = ( self.dashboardButton, + self.icButton, + self.hvacButton, + self.steeringCtrlButton, + self.settingsBtn) NavigationButtons = QtWidgets.QButtonGroup(self) NavigationButtons.setExclusive(True) - for i, button in enumerate(buttons): + for i, button in enumerate(Navigation_buttons): button.setCheckable(True) NavigationButtons.addButton(button) button.clicked.connect(partial(UI_Handeler.animateSwitch, self, i)) @@ -93,12 +97,31 @@ class MainWindow(Base, Form): self.stop_thread_signal.connect(self.stackedWidget.widget(0).feed_kuksa.stop) self.stackedWidget.setCurrentIndex(0) - self.icButton.setChecked(True) + self.dashboardButton.setChecked(True) + UI_Handeler.Hide_Navbar(self,bool_arg=False) + + self.Dashboard = Dashboard() + self.Dashboard.tileClickedSignal.connect(self.handleTileClicked) self.current_page = self.stackedWidget.currentIndex() + def handleTileClicked(self): + """ + Handles the tile clicked signal from the Dashboard object. + Shows the navbar. + """ + UI_Handeler.Hide_Navbar(self,bool_arg=False) + def handleChangedPage(self, index): - # stop the previous thread and start the new one + """ + Handles the change of pages in the stacked widget. + Stops the previous thread and starts the new one. + If the index is 0, the navbar is not hidden. Otherwise, it is hidden. + """ + if index == 0: + UI_Handeler.Hide_Navbar(self,bool_arg=False) + else: + UI_Handeler.Hide_Navbar(self,bool_arg=True) try: self.stop_thread_signal.connect(self.stackedWidget.widget(self.current_page).feed_kuksa.stop) self.stop_thread_signal.emit() @@ -115,6 +138,8 @@ class MainWindow(Base, Form): if __name__ == '__main__': app = QApplication(sys.argv) + app.setApplicationName("AGL Demo Control Panel") + app.setWindowIcon(QtGui.QIcon(':/Images/Images/Automotive_Grade_Linux_logo.svg')) window = MainWindow() window.show() - sys.exit(app.exec_()) + sys.exit(app.exec_()) \ No newline at end of file diff --git a/ui/Dashboard.ui b/ui/Dashboard.ui new file mode 100644 index 0000000..51f913a --- /dev/null +++ b/ui/Dashboard.ui @@ -0,0 +1,216 @@ + + + Dashboard + + + + 0 + 0 + 711 + 459 + + + + Form + + + *{ + border: none; + background-color: transparent; + background: none; + padding: 0; + margin: 0; + color: #fff; +} + +#scrollAreaWidgetContents{ + background-color: #131313 ; /* black */ +} + +#centralwidget{ + background-color: #131313 ; /* black */ +} + +QPushButton{ + background-color: #6C6C85 ; /* pastel purple */ + border-radius: 10px; + margin: 5px; +} + +QPushButton:pressed { + background-color: #4BD7D6 ; /* light blue */ +} + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::LeftToRight + + + true + + + + + 0 + 0 + 703 + 451 + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Instrument Cluster + + + + :/Carbon_Icons/carbon_icons/meter.svg:/Carbon_Icons/carbon_icons/meter.svg + + + + 50 + 50 + + + + false + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + HVAC + + + + :/Carbon_Icons/carbon_icons/windy--strong.svg:/Carbon_Icons/carbon_icons/windy--strong.svg + + + + 50 + 50 + + + + false + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Steering Controls + + + + :/Images/Images/steering-wheel.svg:/Images/Images/steering-wheel.svg + + + + 50 + 50 + + + + false + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Configure + + + + :/Carbon_Icons/carbon_icons/settings.svg:/Carbon_Icons/carbon_icons/settings.svg + + + + 50 + 50 + + + + false + + + + + + + + + + + + + + + + + diff --git a/ui/HVAC.ui b/ui/HVAC.ui index a894b65..abee74f 100644 --- a/ui/HVAC.ui +++ b/ui/HVAC.ui @@ -204,53 +204,24 @@ QListWidget::item:hover { QFrame::Raised - + - - - QFrame::StyledPanel + + + + 0 + 0 + - - QFrame::Raised + + + 75 + true + true + - - - - - - 0 - 0 - - - - - 75 - true - true - - - - HVAC - - - - - - - - - Script - - - - :/icons/feather/play-circle.svg:/icons/feather/play-circle.svg - - - - 30 - 30 - + HVAC @@ -267,8 +238,8 @@ QListWidget::item:hover { 0 0 - 689 - 415 + 697 + 409 @@ -455,7 +426,7 @@ QListWidget::item:hover { - :/Images/Images/fan.svg + :/Images/Images/HMI_HVAC_Fan_Icon.svg @@ -491,6 +462,12 @@ QListWidget::item:hover { + + + 40 + 0 + + Qt::Vertical @@ -503,12 +480,12 @@ QListWidget::item:hover { - :/Images/Images/tempDown.svg:/Images/Images/tempDown.svg + :/Carbon_Icons/carbon_icons/temperature--hot.svg:/Carbon_Icons/carbon_icons/temperature--hot.svg - 30 - 30 + 40 + 40 @@ -520,12 +497,12 @@ QListWidget::item:hover { - :/Images/Images/tempUp.svg:/Images/Images/tempUp.svg + :/Carbon_Icons/carbon_icons/temperature--frigid.svg:/Carbon_Icons/carbon_icons/temperature--frigid.svg - 30 - 30 + 40 + 40 @@ -601,6 +578,12 @@ QListWidget::item:hover { 0 + + + 40 + 0 + + Qt::Vertical @@ -637,11 +620,14 @@ QListWidget::item:hover { - :/Images/Images/fan.svg + :/Images/Images/HMI_HVAC_Fan_Icon.svg false + + Qt::AlignCenter + @@ -651,12 +637,12 @@ QListWidget::item:hover { - :/Images/Images/tempDown.svg:/Images/Images/tempDown.svg + :/Carbon_Icons/carbon_icons/temperature--hot.svg:/Carbon_Icons/carbon_icons/temperature--hot.svg - 30 - 30 + 40 + 40 @@ -808,12 +794,12 @@ QListWidget::item:hover { - :/Images/Images/tempUp.svg:/Images/Images/tempUp.svg + :/Carbon_Icons/carbon_icons/temperature--frigid.svg:/Carbon_Icons/carbon_icons/temperature--frigid.svg - 30 - 30 + 40 + 40 diff --git a/ui/IC.ui b/ui/IC.ui index 5ca9659..725a2b3 100644 --- a/ui/IC.ui +++ b/ui/IC.ui @@ -174,8 +174,8 @@ QLCDNumber { 0 0 - 658 - 638 + 664 + 652 @@ -389,8 +389,14 @@ QLCDNumber { - + + + + 60 + 0 + + true @@ -413,8 +419,14 @@ QLCDNumber { - + + + + 60 + 0 + + Qt::Vertical @@ -442,7 +454,7 @@ QLCDNumber { - + @@ -462,7 +474,7 @@ QLCDNumber { - :/icons/feather/droplet.svg + :/Carbon_Icons/carbon_icons/rain-drop.svg false @@ -513,6 +525,12 @@ QLCDNumber { + + + 0 + 60 + + 50 @@ -567,6 +585,12 @@ QLCDNumber { + + + 0 + 60 + + Qt::Horizontal @@ -588,13 +612,13 @@ QLCDNumber { - + - :/icons/feather/thermometer.svg + :/Carbon_Icons/carbon_icons/temperature--water.svg @@ -911,7 +935,7 @@ QLCDNumber { - + 0 @@ -959,22 +983,23 @@ QLCDNumber { - - - Script - - - - :/icons/feather/play-circle.svg:/icons/feather/play-circle.svg + + + + 75 + true + true + - - - 30 - 30 - + + Demo Mode - - true + + + + + + diff --git a/ui/Nav.ui b/ui/Nav.ui deleted file mode 100644 index 6c9c551..0000000 --- a/ui/Nav.ui +++ /dev/null @@ -1,304 +0,0 @@ - - - Navigation - - - - 0 - 0 - 703 - 712 - - - - Form - - - false - - - *{ - border: none; - background-color: transparent; - background: none; - padding: 0; - margin: 0; - color: #fff; -} - - -#centralwidget{ - background-color: #131313 ; /* black */ -} - -QPushButton{ - background-color: transparent; - padding: 5px 10px; - border: 1px solid #4BD7D6 ; /* light blue */ - border-radius: 10px; -} - -QPushButton:pressed { - background-color: #6C6C85 ; /* pastel purple */ -} - -#centralwidget QLineEdit { - background-color: transparent; - padding: 5px 10px; - border: 1px solid #4BD7D6 ; /* light blue */ - border-radius: 10px; -} - -#frame_3{ - background-color: #131313 ; /* black */ - border-radius: 10px; -} - - - - - - - - - 600 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 6 - - - 6 - - - 6 - - - 6 - - - 6 - - - - - - 0 - 0 - - - - - 600 - 300 - - - - - about:blank - - - - - - - - - - - - 0 - 0 - - - - - 600 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - false - - - Confirm - - - - - - - false - - - Confirm - - - - - - - From: - - - - - - - false - - - - - - - - - - - :/icons/feather/map-pin.svg:/icons/feather/map-pin.svg - - - - - - - To: - - - - - - - false - - - - - - - - - - Start Navigation - - - - :/icons/feather/navigation.svg:/icons/feather/navigation.svg - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 40 - 20 - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - QWebEngineView - QWidget -
QtWebEngineWidgets/QWebEngineView
-
-
- - - - -
diff --git a/ui/Settings_Window.ui b/ui/Settings_Window.ui index 2ff53d8..ff73614 100644 --- a/ui/Settings_Window.ui +++ b/ui/Settings_Window.ui @@ -6,8 +6,8 @@ 0 0 - 603 - 346 + 1105 + 631 @@ -44,103 +44,185 @@ QPushButton:pressed { padding: 5px 10px; border: 1px solid #4BD7D6 ; /* light blue */ border-radius: 10px; +} + +QCheckBox { + background-color: transparent; + color: white; +} + +QCheckBox::indicator:unchecked { + border: 2px solid white; + background-color: transparent; +} + +QCheckBox::indicator:checked { + background-color: #00ffff; /* Neon blue */ + border: 2px solid #00cccc; /* Darker neon blue */ +} + +QCheckBox:disabled { + color: #aaaaaa; /* Grayed out text color */ +} + +QCheckBox:indicator:disabled { + background-color: #cccccc; /* Grayed out background */ }
- - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + QFrame::StyledPanel QFrame::Raised - - - + + + - + Start client - :/icons/feather/eye.svg:/icons/feather/eye.svg + :/Carbon_Icons/carbon_icons/play.svg:/Carbon_Icons/carbon_icons/play.svg - - - - - - JWT token Path * + + + 30 + 30 + - - + + - + Reconnect - :/icons/feather/eye.svg:/icons/feather/eye.svg + :/Carbon_Icons/carbon_icons/renew.svg:/Carbon_Icons/carbon_icons/renew.svg - - - - - - Page Settings + + + 30 + 30 + - - - - + + + + true - - :/icons/feather/alert-triangle.svg + + + 50 + false + - - - - - - /Path/To/Token - - - - - - Status + Refresh Status + + + + 30 + 30 + - - + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + - IP Address * + + + + false - - + + - Qt::Horizontal + Qt::Vertical - QSizePolicy::Fixed + QSizePolicy::Maximum 20 - 20 + 40 - + @@ -153,50 +235,171 @@ QPushButton:pressed { - - - - Qt::Horizontal + + + + QFrame::StyledPanel + + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Instrument Cluster + + + + + + + HVAC + + + + + + + Steering Controls + + + + - - - - Default: localhost + + + + IP Address * - - + + + + + + + + + + + + 0 + 0 + + + + + 25 + 25 + + + + + + + :/Carbon_Icons/carbon_icons/meter.svg + + + true + + + + + - :/icons/feather/shield.svg - :/icons/feather/shield-off.svg:/icons/feather/shield.svg + :/Carbon_Icons/carbon_icons/view.svg:/Carbon_Icons/carbon_icons/view.svg - - false + + + 30 + 30 + + + + + + + + JWT token Path * - + + + + + 0 + 0 + + + + + 25 + 25 + + + + + + + :/Images/Images/steering-wheel.svg + + + true + + + + + + + CA + + + + Insecure Mode - - + + + + + + + :/Carbon_Icons/carbon_icons/security-services.svg + + + + + Qt::Vertical - - QSizePolicy::Maximum - 20 @@ -205,18 +408,21 @@ QPushButton:pressed { - - + + - + ... - - - :/icons/feather/eye.svg:/icons/feather/eye.svg + + + + + + Page Settings - + QFrame::StyledPanel @@ -240,229 +446,126 @@ QPushButton:pressed { 0 - - - - - 0 - 0 - - - - - 25 - 25 - - - - - - - :/Images/Images/IC.svg - - - true - - - - - - - - 0 - 0 - - - - - 25 - 25 - - - - - - - :/icons/feather/wind.svg - - - true - - - - - - - - 0 - 0 - - - - - 25 - 25 - - - - - - - :/Images/Images/steering-wheel.svg - - - true - - - - - - - QFrame::StyledPanel + + + + Qt::Horizontal - - QFrame::Raised + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + 0 + 0 + + + + + 25 + 25 + + + + + + + :/Carbon_Icons/carbon_icons/windy--strong.svg + + + true - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Instrument Cluster - - - - - - - HVAC - - - - - - - Steering Controls - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - + + - Start client + CAN - - - :/icons/feather/play.svg:/icons/feather/play.svg + + + + + + Default: localhost - - + + - Reconnect + - :/icons/feather/refresh-cw.svg:/icons/feather/refresh-cw.svg + :/Carbon_Icons/carbon_icons/view.svg:/Carbon_Icons/carbon_icons/view.svg + + + + 30 + 30 + - - + + - Refresh Status + + + + + + + + /Path/To/Token + + + + + + + Status + + + + + + + + + + + + + + :/Carbon_Icons/carbon_icons/view.svg:/Carbon_Icons/carbon_icons/view.svg + + + + 30 + 30 + - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - + Qt::Vertical @@ -475,25 +578,11 @@ QPushButton:pressed { - - - - Qt::Horizontal - - - - 40 - 20 - - - - - diff --git a/ui/SteeringControls.ui b/ui/SteeringControls.ui index af8ce7b..c46a00d 100644 --- a/ui/SteeringControls.ui +++ b/ui/SteeringControls.ui @@ -7,7 +7,7 @@ 0 0 1388 - 711 + 793 @@ -67,7 +67,7 @@ QPushButton:checked { - + @@ -98,7 +98,7 @@ QPushButton:checked { 0 - + 0 @@ -123,7 +123,20 @@ QPushButton:checked { - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + @@ -148,7 +161,7 @@ QPushButton:checked { - + 0 @@ -171,7 +184,7 @@ QPushButton:checked { - + 75 @@ -210,7 +223,7 @@ QPushButton:checked { - + 75 @@ -223,7 +236,7 @@ QPushButton:checked { - :/icons/feather/minus.svg:/icons/feather/minus.svg + :/Carbon_Icons/carbon_icons/subtract--alt.svg:/Carbon_Icons/carbon_icons/subtract--alt.svg @@ -234,7 +247,7 @@ QPushButton:checked { - + 75 @@ -247,7 +260,7 @@ QPushButton:checked { - :/icons/feather/plus.svg:/icons/feather/plus.svg + :/Carbon_Icons/carbon_icons/add--alt.svg:/Carbon_Icons/carbon_icons/add--alt.svg @@ -258,13 +271,13 @@ QPushButton:checked { - + - :/Images/Images/cruise.png:/Images/Images/cruise.png + :/Images/Images/AGL_Icons_CruiseControl_white.svg:/Images/Images/AGL_Icons_CruiseControl_white.svg @@ -275,7 +288,7 @@ QPushButton:checked { - + 75 @@ -288,7 +301,7 @@ QPushButton:checked { - :/icons/feather/x-square.svg:/icons/feather/x-square.svg + :/Carbon_Icons/carbon_icons/misuse--outline.svg:/Carbon_Icons/carbon_icons/misuse--outline.svg @@ -320,7 +333,7 @@ QPushButton:checked { - + Qt::Horizontal @@ -333,33 +346,7 @@ QPushButton:checked { - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + QFrame::StyledPanel @@ -369,13 +356,13 @@ QPushButton:checked { - + - :/icons/feather/phone-call.svg:/icons/feather/phone-call.svg + :/Carbon_Icons/carbon_icons/phone--filled.svg:/Carbon_Icons/carbon_icons/phone--filled.svg @@ -386,13 +373,13 @@ QPushButton:checked { - + - :/icons/feather/phone-missed.svg:/icons/feather/phone-missed.svg + :/Carbon_Icons/carbon_icons/phone--off--filled.svg:/Carbon_Icons/carbon_icons/phone--off--filled.svg @@ -403,13 +390,13 @@ QPushButton:checked { - + - :/Images/Images/voice.svg:/Images/Images/voice.svg + :/Carbon_Icons/carbon_icons/voice.svg:/Carbon_Icons/carbon_icons/voice.svg @@ -420,13 +407,13 @@ QPushButton:checked { - + - :/Images/Images/lane.png:/Images/Images/lane.png + :/Images/Images/AGL_Icons_LaneDeparture_white.svg:/Images/Images/AGL_Icons_LaneDeparture_white.svg @@ -439,7 +426,20 @@ QPushButton:checked { - + + + + Qt::Vertical + + + + 20 + 40 + + + + + QFrame::StyledPanel @@ -464,13 +464,13 @@ QPushButton:checked { - + - :/icons/feather/volume-2.svg:/icons/feather/volume-2.svg + :/Carbon_Icons/carbon_icons/volume--up--filled--alt.svg:/Carbon_Icons/carbon_icons/volume--up--filled--alt.svg @@ -481,13 +481,13 @@ QPushButton:checked { - + - :/icons/feather/skip-back.svg:/icons/feather/skip-back.svg + :/Carbon_Icons/carbon_icons/skip--back--filled.svg:/Carbon_Icons/carbon_icons/skip--back--filled.svg @@ -498,7 +498,7 @@ QPushButton:checked { - + 0 @@ -524,13 +524,13 @@ QPushButton:checked { - + - :/icons/feather/skip-forward.svg:/icons/feather/skip-forward.svg + :/Carbon_Icons/carbon_icons/skip--forward--filled.svg:/Carbon_Icons/carbon_icons/skip--forward--filled.svg @@ -541,13 +541,13 @@ QPushButton:checked { - + - :/icons/feather/volume-1.svg:/icons/feather/volume-1.svg + :/Carbon_Icons/carbon_icons/volume--down--filled--alt.svg:/Carbon_Icons/carbon_icons/volume--down--filled--alt.svg @@ -586,13 +586,13 @@ QPushButton:checked { - + - :/icons/feather/info.svg:/icons/feather/info.svg + :/Carbon_Icons/carbon_icons/information.svg:/Carbon_Icons/carbon_icons/information.svg @@ -603,13 +603,13 @@ QPushButton:checked { - + - :/icons/feather/volume-x.svg:/icons/feather/volume-x.svg + :/Carbon_Icons/carbon_icons/volume--mute--filled.svg:/Carbon_Icons/carbon_icons/volume--mute--filled.svg @@ -625,8 +625,8 @@ QPushButton:checked { - - + + Qt::Vertical @@ -638,6 +638,17 @@ QPushButton:checked { + + + + + 0 + 70 + + + + + -- 2.16.6