diff options
-rw-r--r-- | Main_Window.ui | 587 | ||||
-rw-r--r-- | Widgets/Dashboard.py | 89 | ||||
-rw-r--r-- | Widgets/NavPage.py | 179 | ||||
-rw-r--r-- | main.py | 69 | ||||
-rw-r--r-- | ui/Dashboard.ui | 216 | ||||
-rw-r--r-- | ui/HVAC.ui | 104 | ||||
-rw-r--r-- | ui/IC.ui | 71 | ||||
-rw-r--r-- | ui/Nav.ui | 304 | ||||
-rw-r--r-- | ui/Settings_Window.ui | 669 | ||||
-rw-r--r-- | ui/SteeringControls.ui | 143 |
10 files changed, 1185 insertions, 1246 deletions
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 */ }</string> @@ -563,6 +543,271 @@ QStackedWidget{ <bool>false</bool> </property> <layout class="QGridLayout" name="gridLayout"> + <item row="2" column="2"> + <widget class="QWidget" name="BottomMenuContainer" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="BottomMenuSubContainer" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Ignored"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>70</height> + </size> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item alignment="Qt::AlignLeft"> + <widget class="QFrame" name="frame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </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="QPushButton" name="dashboardButton"> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/workspace.svg</normaloff>:/Carbon_Icons/carbon_icons/workspace.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Maximum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item alignment="Qt::AlignHCenter|Qt::AlignVCenter"> + <widget class="QFrame" name="navigationFrame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <widget class="QPushButton" name="icButton"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/meter.svg</normaloff>:/Carbon_Icons/carbon_icons/meter.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="hvacButton"> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="steeringCtrlButton"> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Images/Images/steering-wheel.svg</normaloff>:/Images/Images/steering-wheel.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Maximum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item alignment="Qt::AlignRight"> + <widget class="QFrame" name="settingsFrame"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QPushButton" name="settingsBtn"> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Configure</string> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/settings.svg</normaloff>:/Carbon_Icons/carbon_icons/settings.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> <item row="0" column="2" rowspan="2"> <widget class="QWidget" name="mainContainer" native="true"> <property name="sizePolicy"> @@ -673,7 +918,7 @@ QStackedWidget{ <widget class="QLabel" name="aglLabel"> <property name="font"> <font> - <family>Open Sans</family> + <family>DejaVu Sans</family> <weight>75</weight> <italic>true</italic> <bold>true</bold> @@ -725,7 +970,7 @@ QStackedWidget{ </property> <property name="icon"> <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/minus.svg</normaloff>:/icons/feather/minus.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/subtract.svg</normaloff>:/Carbon_Icons/carbon_icons/subtract.svg</iconset> </property> <property name="flat"> <bool>false</bool> @@ -739,7 +984,7 @@ QStackedWidget{ </property> <property name="icon"> <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/square.svg</normaloff>:/icons/feather/square.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/scale.svg</normaloff>:/Carbon_Icons/carbon_icons/scale.svg</iconset> </property> </widget> </item> @@ -750,7 +995,7 @@ QStackedWidget{ </property> <property name="icon"> <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/x.svg</normaloff>:/icons/feather/x.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/close.svg</normaloff>:/Carbon_Icons/carbon_icons/close.svg</iconset> </property> </widget> </item> @@ -805,12 +1050,12 @@ QStackedWidget{ <item> <widget class="QStackedWidget" name="stackedWidget"> <property name="currentIndex"> - <number>2</number> + <number>1</number> </property> + <widget class="Dashboard" name="Dashboard"/> <widget class="ICWidget" name="ICPage"/> <widget class="HVACWidget" name="HVACPage"/> <widget class="SteeringCtrlWidget" name="SteeringCtrlPage"/> - <widget class="QWidget" name="newPage"/> <widget class="settings" name="settingsPage"/> </widget> </item> @@ -859,7 +1104,7 @@ QStackedWidget{ <string/> </property> <property name="pixmap"> - <pixmap resource="assets/res.qrc">:/icons/feather/alert-octagon.svg</pixmap> + <pixmap>:/icons/feather/alert-octagon.svg</pixmap> </property> </widget> </item> @@ -923,276 +1168,6 @@ QStackedWidget{ </layout> </widget> </item> - <item row="2" column="2"> - <widget class="QWidget" name="BottomMenuContainer" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QWidget" name="BottomMenuSubContainer" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Ignored" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <item> - <widget class="QFrame" name="frame"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QPushButton" name="menuButton"> - <property name="font"> - <font> - <family>Open Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Menu</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/menu.svg</normaloff>:/icons/feather/menu.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QFrame" name="navigationFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <item> - <widget class="QPushButton" name="icButton"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="font"> - <font> - <family>Open Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - <kerning>true</kerning> - </font> - </property> - <property name="text"> - <string>Instrument Cluster</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Images/Images/IC.svg</normaloff>:/Images/Images/IC.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="hvacButton"> - <property name="font"> - <font> - <family>Open Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>HVAC</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/wind.svg</normaloff>:/icons/feather/wind.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="steeringCtrlButton"> - <property name="font"> - <font> - <family>Open Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Steering Inputs</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Images/Images/steering-wheel.svg</normaloff>:/Images/Images/steering-wheel.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="newButton"> - <property name="font"> - <font> - <family>Open Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>New</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/plus.svg</normaloff>:/icons/feather/plus.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QFrame" name="settingsFrame"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <item> - <widget class="QPushButton" name="settingsBtn"> - <property name="font"> - <font> - <family>Open Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Configure</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/icons/feather/settings.svg</normaloff>:/icons/feather/settings.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> </layout> </widget> </widget> @@ -1221,6 +1196,12 @@ QStackedWidget{ <header>Widgets/SteeringCtrlPage</header> <container>1</container> </customwidget> + <customwidget> + <class>Dashboard</class> + <extends>QWidget</extends> + <header>Widgets/Dashboard</header> + <container>1</container> + </customwidget> </customwidgets> <resources> <include location="assets/res.qrc"/> 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_()) @@ -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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Dashboard</class> + <widget class="QWidget" name="Dashboard"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>711</width> + <height>459</height> + </rect> + </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 */ +} + +QPushButton{ + background-color: #6C6C85 ; /* pastel purple */ + border-radius: 10px; + margin: 5px; +} + +QPushButton:pressed { + background-color: #4BD7D6 ; /* light blue */ +}</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QFrame" name="centralwidget"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QScrollArea" name="scrollArea"> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>703</width> + <height>451</height> + </rect> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QPushButton" name="DB_IC_Tile"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string>Instrument Cluster</string> + </property> + <property name="icon"> + <iconset resource="../assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/meter.svg</normaloff>:/Carbon_Icons/carbon_icons/meter.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>50</width> + <height>50</height> + </size> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="DB_HVAC_Tile"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string>HVAC</string> + </property> + <property name="icon"> + <iconset resource="../assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>50</width> + <height>50</height> + </size> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QPushButton" name="DB_Steering_Tile"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string>Steering Controls</string> + </property> + <property name="icon"> + <iconset resource="../assets/res.qrc"> + <normaloff>:/Images/Images/steering-wheel.svg</normaloff>:/Images/Images/steering-wheel.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>50</width> + <height>50</height> + </size> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="DB_Settings_Tile"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string>Configure</string> + </property> + <property name="icon"> + <iconset resource="../assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/settings.svg</normaloff>:/Carbon_Icons/carbon_icons/settings.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>50</width> + <height>50</height> + </size> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <resources> + <include location="../assets/res.qrc"/> + </resources> + <connections/> +</ui> @@ -204,53 +204,24 @@ QListWidget::item:hover { <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> + <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QFrame" name="frame_5"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> + <widget class="QLabel" name="label_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> + <property name="font"> + <font> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> </property> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <widget class="QLabel" name="label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>HVAC</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QPushButton" name="scriptBtn"> <property name="text"> - <string>Script</string> - </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/play-circle.svg</normaloff>:/icons/feather/play-circle.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> + <string>HVAC</string> </property> </widget> </item> @@ -267,8 +238,8 @@ QListWidget::item:hover { <rect> <x>0</x> <y>0</y> - <width>689</width> - <height>415</height> + <width>697</width> + <height>409</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> @@ -455,7 +426,7 @@ QListWidget::item:hover { <string/> </property> <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/Images/Images/fan.svg</pixmap> + <pixmap resource="../assets/res.qrc">:/Images/Images/HMI_HVAC_Fan_Icon.svg</pixmap> </property> </widget> </item> @@ -491,6 +462,12 @@ QListWidget::item:hover { </item> <item row="2" column="3" rowspan="4" alignment="Qt::AlignHCenter"> <widget class="QSlider" name="rightFanSpeed_slider"> + <property name="minimumSize"> + <size> + <width>40</width> + <height>0</height> + </size> + </property> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -503,12 +480,12 @@ QListWidget::item:hover { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/tempDown.svg</normaloff>:/Images/Images/tempDown.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</iconset> </property> <property name="iconSize"> <size> - <width>30</width> - <height>30</height> + <width>40</width> + <height>40</height> </size> </property> </widget> @@ -520,12 +497,12 @@ QListWidget::item:hover { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/tempUp.svg</normaloff>:/Images/Images/tempUp.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</iconset> </property> <property name="iconSize"> <size> - <width>30</width> - <height>30</height> + <width>40</width> + <height>40</height> </size> </property> </widget> @@ -601,6 +578,12 @@ QListWidget::item:hover { <verstretch>0</verstretch> </sizepolicy> </property> + <property name="minimumSize"> + <size> + <width>40</width> + <height>0</height> + </size> + </property> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -637,11 +620,14 @@ QListWidget::item:hover { <string/> </property> <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/Images/Images/fan.svg</pixmap> + <pixmap resource="../assets/res.qrc">:/Images/Images/HMI_HVAC_Fan_Icon.svg</pixmap> </property> <property name="scaledContents"> <bool>false</bool> </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> </widget> </item> <item row="6" column="3"> @@ -651,12 +637,12 @@ QListWidget::item:hover { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/tempDown.svg</normaloff>:/Images/Images/tempDown.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--hot.svg</iconset> </property> <property name="iconSize"> <size> - <width>30</width> - <height>30</height> + <width>40</width> + <height>40</height> </size> </property> </widget> @@ -808,12 +794,12 @@ QListWidget::item:hover { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/tempUp.svg</normaloff>:/Images/Images/tempUp.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</normaloff>:/Carbon_Icons/carbon_icons/temperature--frigid.svg</iconset> </property> <property name="iconSize"> <size> - <width>30</width> - <height>30</height> + <width>40</width> + <height>40</height> </size> </property> </widget> @@ -174,8 +174,8 @@ QLCDNumber { <rect> <x>0</x> <y>0</y> - <width>658</width> - <height>638</height> + <width>664</width> + <height>652</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_4"> @@ -389,8 +389,14 @@ QLCDNumber { </property> </widget> </item> - <item row="1" column="8"> + <item row="1" column="8" alignment="Qt::AlignHCenter"> <widget class="QSlider" name="fuelLevel_slider"> + <property name="minimumSize"> + <size> + <width>60</width> + <height>0</height> + </size> + </property> <property name="font"> <font> <kerning>true</kerning> @@ -413,8 +419,14 @@ QLCDNumber { </property> </widget> </item> - <item row="1" column="1"> + <item row="1" column="1" alignment="Qt::AlignHCenter"> <widget class="QSlider" name="coolantTemp_slider"> + <property name="minimumSize"> + <size> + <width>60</width> + <height>0</height> + </size> + </property> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -442,7 +454,7 @@ QLCDNumber { </property> </widget> </item> - <item row="3" column="8"> + <item row="3" column="8" alignment="Qt::AlignHCenter|Qt::AlignVCenter"> <widget class="QLabel" name="label_3"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> @@ -462,7 +474,7 @@ QLCDNumber { <string/> </property> <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/icons/feather/droplet.svg</pixmap> + <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/rain-drop.svg</pixmap> </property> <property name="scaledContents"> <bool>false</bool> @@ -513,6 +525,12 @@ QLCDNumber { </item> <item row="3" column="3"> <widget class="QSlider" name="Speed_slider"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>60</height> + </size> + </property> <property name="font"> <font> <weight>50</weight> @@ -567,6 +585,12 @@ QLCDNumber { </item> <item row="3" column="6"> <widget class="QSlider" name="RPM_slider"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>60</height> + </size> + </property> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> @@ -588,13 +612,13 @@ QLCDNumber { </property> </spacer> </item> - <item row="3" column="1"> + <item row="3" column="1" alignment="Qt::AlignHCenter|Qt::AlignVCenter"> <widget class="QLabel" name="label_2"> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/icons/feather/thermometer.svg</pixmap> + <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/temperature--water.svg</pixmap> </property> </widget> </item> @@ -911,7 +935,7 @@ QLCDNumber { </widget> </item> <item row="0" column="1"> - <widget class="QFrame" name="frame"> + <widget class="QFrame" name="header_frame"> <property name="minimumSize"> <size> <width>0</width> @@ -959,22 +983,23 @@ QLCDNumber { </widget> </item> <item> - <widget class="QPushButton" name="scriptBtn"> - <property name="text"> - <string>Script</string> - </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/play-circle.svg</normaloff>:/icons/feather/play-circle.svg</iconset> + <widget class="QLabel" name="label_6"> + <property name="font"> + <font> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> + <property name="text"> + <string>Demo Mode</string> </property> - <property name="checkable"> - <bool>true</bool> + </widget> + </item> + <item> + <widget class="QCheckBox" name="demoToggle"> + <property name="text"> + <string/> </property> </widget> </item> 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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Navigation</class> - <widget class="QWidget" name="Navigation"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>703</width> - <height>712</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="styleSheet"> - <string notr="true">*{ - 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; -} - -</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <widget class="QFrame" name="centralwidget"> - <property name="minimumSize"> - <size> - <width>600</width> - <height>0</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="2" column="0" colspan="3" alignment="Qt::AlignHCenter|Qt::AlignVCenter"> - <widget class="QFrame" name="frame_3"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>6</number> - </property> - <item> - <widget class="QWebEngineView" name="map_view"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>600</width> - <height>300</height> - </size> - </property> - <property name="url"> - <url> - <string>about:blank</string> - </url> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="1" column="1" alignment="Qt::AlignTop"> - <widget class="QFrame" name="frame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>600</width> - <height>0</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="0" column="4"> - <widget class="QPushButton" name="F_coordinates"> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="text"> - <string>Confirm</string> - </property> - </widget> - </item> - <item row="1" column="4"> - <widget class="QPushButton" name="T_coordinates"> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="text"> - <string>Confirm</string> - </property> - </widget> - </item> - <item row="0" column="0" colspan="2"> - <widget class="QLabel" name="From"> - <property name="text"> - <string>From:</string> - </property> - </widget> - </item> - <item row="1" column="2" colspan="2"> - <widget class="QLineEdit" name="To_address"> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QPushButton" name="CurrentLocation"> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/map-pin.svg</normaloff>:/icons/feather/map-pin.svg</iconset> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="To"> - <property name="text"> - <string>To: </string> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLineEdit" name="From_address"> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="3" column="1"> - <widget class="QPushButton" name="Start_Nav"> - <property name="text"> - <string>Start Navigation</string> - </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/navigation.svg</normaloff>:/icons/feather/navigation.svg</iconset> - </property> - </widget> - </item> - <item row="0" column="1"> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item row="4" column="1"> - <spacer name="verticalSpacer_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="0"> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::MinimumExpanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="2"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::MinimumExpanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>QWebEngineView</class> - <extends>QWidget</extends> - <header location="global">QtWebEngineWidgets/QWebEngineView</header> - </customwidget> - </customwidgets> - <resources> - <include location="../assets/res.qrc"/> - </resources> - <connections/> -</ui> 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 @@ <rect> <x>0</x> <y>0</y> - <width>603</width> - <height>346</height> + <width>1105</width> + <height>631</height> </rect> </property> <property name="windowTitle"> @@ -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 */ }</string> </property> <widget class="QWidget" name="centralwidget"> <layout class="QGridLayout" name="gridLayout"> - <item row="3" column="1" colspan="3"> - <widget class="QFrame" name="frame_3"> + <item row="1" column="3" rowspan="4"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="1" colspan="2"> + <widget class="QFrame" name="frame_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QGridLayout" name="gridLayout_2"> - <item row="10" column="4" colspan="2" alignment="Qt::AlignLeft"> - <widget class="QPushButton" name="pushButton_3"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QPushButton" name="startClientBtn"> <property name="text"> - <string/> + <string>Start client</string> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/eye.svg</normaloff>:/icons/feather/eye.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/play.svg</normaloff>:/Carbon_Icons/carbon_icons/play.svg</iconset> </property> - </widget> - </item> - <item row="3" column="0" colspan="3"> - <widget class="QLabel" name="tokenPath"> - <property name="text"> - <string>JWT token Path *</string> + <property name="iconSize"> + <size> + <width>30</width> + <height>30</height> + </size> </property> </widget> </item> - <item row="9" column="4" colspan="2" alignment="Qt::AlignLeft"> - <widget class="QPushButton" name="pushButton_2"> + <item> + <widget class="QPushButton" name="reconnectBtn"> <property name="text"> - <string/> + <string>Reconnect</string> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/eye.svg</normaloff>:/icons/feather/eye.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/renew.svg</normaloff>:/Carbon_Icons/carbon_icons/renew.svg</iconset> </property> - </widget> - </item> - <item row="6" column="0" colspan="6" alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Page Settings</string> + <property name="iconSize"> + <size> + <width>30</width> + <height>30</height> + </size> </property> </widget> </item> - <item row="1" column="4"> - <widget class="QLabel" name="connectionLogo"> - <property name="text"> - <string/> + <item> + <widget class="QPushButton" name="refreshBtn"> + <property name="enabled"> + <bool>true</bool> </property> - <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/icons/feather/alert-triangle.svg</pixmap> + <property name="font"> + <font> + <weight>50</weight> + <bold>false</bold> + </font> </property> - </widget> - </item> - <item row="3" column="4" colspan="2"> - <widget class="QLineEdit" name="tokenPathInput"> - <property name="placeholderText"> - <string>/Path/To/Token</string> - </property> - </widget> - </item> - <item row="1" column="0" colspan="3"> - <widget class="QLabel" name="status"> <property name="text"> - <string>Status</string> + <string>Refresh Status</string> + </property> + <property name="iconSize"> + <size> + <width>30</width> + <height>30</height> + </size> </property> </widget> </item> - <item row="2" column="0" colspan="3"> - <widget class="QLabel" name="IPAddr"> + </layout> + </widget> + </item> + <item row="4" column="1" colspan="2"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0" rowspan="4"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="3" column="1" colspan="2"> + <widget class="QFrame" name="frame_3"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="4" column="6" colspan="2"> + <widget class="QCheckBox" name="place_holder_toggle_1"> <property name="text"> - <string>IP Address *</string> + <string/> + </property> + <property name="checked"> + <bool>false</bool> </property> </widget> </item> - <item row="1" column="3" rowspan="4"> - <spacer name="horizontalSpacer_3"> + <item row="0" column="1" colspan="8"> + <spacer name="verticalSpacer_2"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Vertical</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Maximum</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>20</height> + <height>40</height> </size> </property> </spacer> </item> - <item row="1" column="5"> + <item row="1" column="7" colspan="4"> <widget class="QLabel" name="connectionStatus"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> @@ -153,50 +235,171 @@ QPushButton:pressed { </property> </widget> </item> - <item row="5" column="2" colspan="4"> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <item row="8" column="2" rowspan="3"> + <widget class="QFrame" name="PageLabels"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Instrument Cluster</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>HVAC</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Steering Controls</string> + </property> + </widget> + </item> + </layout> </widget> </item> - <item row="2" column="4" colspan="2"> - <widget class="QLineEdit" name="IPAddrInput"> - <property name="placeholderText"> - <string>Default: localhost</string> + <item row="2" column="0" colspan="4"> + <widget class="QLabel" name="IPAddr"> + <property name="text"> + <string>IP Address *</string> </property> </widget> </item> - <item row="4" column="4" colspan="2"> - <widget class="QCheckBox" name="SSLToggle"> + <item row="10" column="9"> + <widget class="QCheckBox" name="place_holder_toggle_2"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="8" column="0"> + <widget class="QLabel" name="label_6"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Ignored"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/meter.svg</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="10" column="6" colspan="2" alignment="Qt::AlignLeft"> + <widget class="QPushButton" name="pushButton_3"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/shield.svg</normaloff> - <normalon>:/icons/feather/shield-off.svg</normalon>:/icons/feather/shield.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/view.svg</normaloff>:/Carbon_Icons/carbon_icons/view.svg</iconset> </property> - <property name="checked"> - <bool>false</bool> + <property name="iconSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + </widget> + </item> + <item row="3" column="0" colspan="4"> + <widget class="QLabel" name="tokenPath"> + <property name="text"> + <string>JWT token Path *</string> </property> </widget> </item> - <item row="4" column="0" colspan="3"> + <item row="10" column="0"> + <widget class="QLabel" name="label_8"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../assets/res.qrc">:/Images/Images/steering-wheel.svg</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="5" column="0" colspan="3"> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>CA</string> + </property> + </widget> + </item> + <item row="4" column="0" colspan="4"> <widget class="QLabel" name="label"> <property name="text"> <string>Insecure Mode</string> </property> </widget> </item> - <item row="0" column="2" colspan="4"> - <spacer name="verticalSpacer_2"> + <item row="4" column="5"> + <widget class="QLabel" name="label_9"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/security-services.svg</pixmap> + </property> + </widget> + </item> + <item row="6" column="1" colspan="7"> + <spacer name="verticalSpacer_4"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeType"> - <enum>QSizePolicy::Maximum</enum> - </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> @@ -205,18 +408,21 @@ QPushButton:pressed { </property> </spacer> </item> - <item row="7" column="4" colspan="2" alignment="Qt::AlignLeft"> - <widget class="QPushButton" name="pushButton"> + <item row="5" column="9" colspan="2"> + <widget class="QToolButton" name="toolButton"> <property name="text"> - <string/> + <string>...</string> </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/eye.svg</normaloff>:/icons/feather/eye.svg</iconset> + </widget> + </item> + <item row="7" column="0" colspan="11"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Page Settings</string> </property> </widget> </item> - <item row="7" column="0" rowspan="4"> + <item row="8" column="1" rowspan="3"> <widget class="QFrame" name="PageIcons"> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> @@ -240,229 +446,126 @@ QPushButton:pressed { <property name="bottomMargin"> <number>0</number> </property> - <item> - <widget class="QLabel" name="label_6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Ignored"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/Images/Images/IC.svg</pixmap> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_7"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/icons/feather/wind.svg</pixmap> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_8"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>25</width> - <height>25</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="../assets/res.qrc">:/Images/Images/steering-wheel.svg</pixmap> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> - </item> </layout> </widget> </item> - <item row="7" column="1" rowspan="4"> - <widget class="QFrame" name="PageLabels"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> + <item row="1" column="4" rowspan="4"> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> + <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="9" column="0"> + <widget class="QLabel" name="label_7"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../assets/res.qrc">:/Carbon_Icons/carbon_icons/windy--strong.svg</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Instrument Cluster</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>HVAC</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>Steering Controls</string> - </property> - </widget> - </item> - </layout> </widget> </item> - </layout> - </widget> - </item> - <item row="1" column="4" rowspan="5"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="1" colspan="3"> - <widget class="QFrame" name="frame_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <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="startClientBtn"> + <item row="10" column="8"> + <widget class="QLabel" name="label_10"> <property name="text"> - <string>Start client</string> + <string>CAN</string> </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/play.svg</normaloff>:/icons/feather/play.svg</iconset> + </widget> + </item> + <item row="2" column="5" colspan="6"> + <widget class="QLineEdit" name="IPAddrInput"> + <property name="placeholderText"> + <string>Default: localhost</string> </property> </widget> </item> - <item> - <widget class="QPushButton" name="reconnectBtn"> + <item row="9" column="6" colspan="2" alignment="Qt::AlignLeft"> + <widget class="QPushButton" name="pushButton_2"> <property name="text"> - <string>Reconnect</string> + <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/refresh-cw.svg</normaloff>:/icons/feather/refresh-cw.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/view.svg</normaloff>:/Carbon_Icons/carbon_icons/view.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>30</width> + <height>30</height> + </size> </property> </widget> </item> - <item> - <widget class="QPushButton" name="refreshBtn"> + <item row="1" column="5" colspan="2"> + <widget class="QLabel" name="connectionLogo"> <property name="text"> - <string>Refresh Status</string> + <string/> + </property> + </widget> + </item> + <item row="3" column="5" colspan="6"> + <widget class="QLineEdit" name="tokenPathInput"> + <property name="placeholderText"> + <string>/Path/To/Token</string> + </property> + </widget> + </item> + <item row="1" column="0" colspan="4"> + <widget class="QLabel" name="status"> + <property name="text"> + <string>Status</string> + </property> + </widget> + </item> + <item row="5" column="5" colspan="4"> + <widget class="QLineEdit" name="lineEdit"/> + </item> + <item row="8" column="6" colspan="2" alignment="Qt::AlignLeft"> + <widget class="QPushButton" name="pushButton"> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/view.svg</normaloff>:/Carbon_Icons/carbon_icons/view.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>30</width> + <height>30</height> + </size> </property> </widget> </item> </layout> </widget> </item> - <item row="5" column="1" colspan="3"> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item row="4" column="2" colspan="2"> - <widget class="QFrame" name="frame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"/> - </widget> - </item> - <item row="0" column="0" colspan="5"> + <item row="0" column="0" colspan="4"> <spacer name="verticalSpacer_3"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -475,25 +578,11 @@ QPushButton:pressed { </property> </spacer> </item> - <item row="1" column="0" rowspan="5"> - <spacer name="horizontalSpacer_2"> - <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> </widget> <resources> <include location="../assets/res.qrc"/> - <include location="../../../.designer/assets/res.qrc"/> </resources> <connections/> </ui> 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 @@ <x>0</x> <y>0</y> <width>1388</width> - <height>711</height> + <height>793</height> </rect> </property> <property name="windowTitle"> @@ -67,7 +67,7 @@ QPushButton:checked { </property> <widget class="QWidget" name="centralwidget"> <layout class="QGridLayout" name="gridLayout"> - <item row="1" column="2" rowspan="3"> + <item row="2" column="2" rowspan="3"> <widget class="QFrame" name="frame"> <property name="minimumSize"> <size> @@ -98,7 +98,7 @@ QPushButton:checked { <number>0</number> </property> <item row="1" column="0"> - <widget class="QPushButton" name="HornBtn"> + <widget class="QPushButton" name="Horn"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <horstretch>0</horstretch> @@ -123,7 +123,20 @@ QPushButton:checked { </layout> </widget> </item> - <item row="1" column="4" rowspan="4" alignment="Qt::AlignVCenter"> + <item row="2" column="5" rowspan="4"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="4" rowspan="4" alignment="Qt::AlignVCenter"> <widget class="QFrame" name="RightControls"> <property name="minimumSize"> <size> @@ -148,7 +161,7 @@ QPushButton:checked { </property> <layout class="QGridLayout" name="gridLayout_6"> <item row="0" column="0"> - <widget class="QPushButton" name="CruiseLimitBtn"> + <widget class="QPushButton" name="CruiseLimit"> <property name="minimumSize"> <size> <width>0</width> @@ -171,7 +184,7 @@ QPushButton:checked { </widget> </item> <item row="0" column="1"> - <widget class="QPushButton" name="CruiseDistanceBtn"> + <widget class="QPushButton" name="CruiseDistance"> <property name="font"> <font> <weight>75</weight> @@ -210,7 +223,7 @@ QPushButton:checked { </property> <layout class="QGridLayout" name="gridLayout_5"> <item row="2" column="1" colspan="2"> - <widget class="QPushButton" name="CruiseSetBtn"> + <widget class="QPushButton" name="CruiseSet"> <property name="font"> <font> <weight>75</weight> @@ -223,7 +236,7 @@ QPushButton:checked { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/minus.svg</normaloff>:/icons/feather/minus.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/subtract--alt.svg</normaloff>:/Carbon_Icons/carbon_icons/subtract--alt.svg</iconset> </property> <property name="iconSize"> <size> @@ -234,7 +247,7 @@ QPushButton:checked { </widget> </item> <item row="0" column="1" colspan="2"> - <widget class="QPushButton" name="CruiseResumeBtn"> + <widget class="QPushButton" name="CruiseResume"> <property name="font"> <font> <weight>75</weight> @@ -247,7 +260,7 @@ QPushButton:checked { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/plus.svg</normaloff>:/icons/feather/plus.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/add--alt.svg</normaloff>:/Carbon_Icons/carbon_icons/add--alt.svg</iconset> </property> <property name="iconSize"> <size> @@ -258,13 +271,13 @@ QPushButton:checked { </widget> </item> <item row="1" column="1"> - <widget class="QPushButton" name="CruiseEnableBtn"> + <widget class="QPushButton" name="CruiseEnable"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/cruise.png</normaloff>:/Images/Images/cruise.png</iconset> + <normaloff>:/Images/Images/AGL_Icons_CruiseControl_white.svg</normaloff>:/Images/Images/AGL_Icons_CruiseControl_white.svg</iconset> </property> <property name="iconSize"> <size> @@ -275,7 +288,7 @@ QPushButton:checked { </widget> </item> <item row="1" column="2"> - <widget class="QPushButton" name="CruiseCancelBtn"> + <widget class="QPushButton" name="CruiseCancel"> <property name="font"> <font> <weight>75</weight> @@ -288,7 +301,7 @@ QPushButton:checked { </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/x-square.svg</normaloff>:/icons/feather/x-square.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/misuse--outline.svg</normaloff>:/Carbon_Icons/carbon_icons/misuse--outline.svg</iconset> </property> <property name="iconSize"> <size> @@ -320,7 +333,7 @@ QPushButton:checked { </layout> </widget> </item> - <item row="1" column="0" rowspan="4"> + <item row="2" column="0" rowspan="4"> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -333,33 +346,7 @@ QPushButton:checked { </property> </spacer> </item> - <item row="5" column="0" colspan="6"> - <spacer name="verticalSpacer_4"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="5" rowspan="4"> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="4" column="2"> + <item row="5" column="2"> <widget class="QFrame" name="ExtraControls"> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> @@ -369,13 +356,13 @@ QPushButton:checked { </property> <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> - <widget class="QPushButton" name="PhoneCallBtn"> + <widget class="QPushButton" name="PhoneCall"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/phone-call.svg</normaloff>:/icons/feather/phone-call.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/phone--filled.svg</normaloff>:/Carbon_Icons/carbon_icons/phone--filled.svg</iconset> </property> <property name="iconSize"> <size> @@ -386,13 +373,13 @@ QPushButton:checked { </widget> </item> <item> - <widget class="QPushButton" name="PhoneHangupBtn"> + <widget class="QPushButton" name="PhoneHangup"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/phone-missed.svg</normaloff>:/icons/feather/phone-missed.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/phone--off--filled.svg</normaloff>:/Carbon_Icons/carbon_icons/phone--off--filled.svg</iconset> </property> <property name="iconSize"> <size> @@ -403,13 +390,13 @@ QPushButton:checked { </widget> </item> <item> - <widget class="QPushButton" name="VoiceBtn"> + <widget class="QPushButton" name="Voice"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/voice.svg</normaloff>:/Images/Images/voice.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/voice.svg</normaloff>:/Carbon_Icons/carbon_icons/voice.svg</iconset> </property> <property name="iconSize"> <size> @@ -420,13 +407,13 @@ QPushButton:checked { </widget> </item> <item> - <widget class="QPushButton" name="LaneDepartureBtn"> + <widget class="QPushButton" name="LaneDeparture"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/lane.png</normaloff>:/Images/Images/lane.png</iconset> + <normaloff>:/Images/Images/AGL_Icons_LaneDeparture_white.svg</normaloff>:/Images/Images/AGL_Icons_LaneDeparture_white.svg</iconset> </property> <property name="iconSize"> <size> @@ -439,7 +426,20 @@ QPushButton:checked { </layout> </widget> </item> - <item row="1" column="1" rowspan="4" alignment="Qt::AlignVCenter"> + <item row="1" column="1" colspan="4"> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="1" rowspan="4" alignment="Qt::AlignVCenter"> <widget class="QFrame" name="LeftControls"> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> @@ -464,13 +464,13 @@ QPushButton:checked { </property> <layout class="QGridLayout" name="gridLayout_3"> <item row="0" column="0" colspan="3"> - <widget class="QPushButton" name="VolUpBtn"> + <widget class="QPushButton" name="VolumeUp"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/volume-2.svg</normaloff>:/icons/feather/volume-2.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/volume--up--filled--alt.svg</normaloff>:/Carbon_Icons/carbon_icons/volume--up--filled--alt.svg</iconset> </property> <property name="iconSize"> <size> @@ -481,13 +481,13 @@ QPushButton:checked { </widget> </item> <item row="1" column="0"> - <widget class="QPushButton" name="PrevTrackBtn"> + <widget class="QPushButton" name="PreviousTrack"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/skip-back.svg</normaloff>:/icons/feather/skip-back.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/skip--back--filled.svg</normaloff>:/Carbon_Icons/carbon_icons/skip--back--filled.svg</iconset> </property> <property name="iconSize"> <size> @@ -498,7 +498,7 @@ QPushButton:checked { </widget> </item> <item row="1" column="1"> - <widget class="QPushButton" name="ModeBtn"> + <widget class="QPushButton" name="Mode"> <property name="minimumSize"> <size> <width>0</width> @@ -524,13 +524,13 @@ QPushButton:checked { </widget> </item> <item row="1" column="2"> - <widget class="QPushButton" name="NextTrackBtn"> + <widget class="QPushButton" name="NextTrack"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/skip-forward.svg</normaloff>:/icons/feather/skip-forward.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/skip--forward--filled.svg</normaloff>:/Carbon_Icons/carbon_icons/skip--forward--filled.svg</iconset> </property> <property name="iconSize"> <size> @@ -541,13 +541,13 @@ QPushButton:checked { </widget> </item> <item row="2" column="0" colspan="3"> - <widget class="QPushButton" name="VolDownBtn"> + <widget class="QPushButton" name="VolumeDown"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/volume-1.svg</normaloff>:/icons/feather/volume-1.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/volume--down--filled--alt.svg</normaloff>:/Carbon_Icons/carbon_icons/volume--down--filled--alt.svg</iconset> </property> <property name="iconSize"> <size> @@ -586,13 +586,13 @@ QPushButton:checked { </property> <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QPushButton" name="InfoBtn"> + <widget class="QPushButton" name="Info"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/info.svg</normaloff>:/icons/feather/info.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/information.svg</normaloff>:/Carbon_Icons/carbon_icons/information.svg</iconset> </property> <property name="iconSize"> <size> @@ -603,13 +603,13 @@ QPushButton:checked { </widget> </item> <item> - <widget class="QPushButton" name="VolMuteBtn"> + <widget class="QPushButton" name="VolumeMute"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../assets/res.qrc"> - <normaloff>:/icons/feather/volume-x.svg</normaloff>:/icons/feather/volume-x.svg</iconset> + <normaloff>:/Carbon_Icons/carbon_icons/volume--mute--filled.svg</normaloff>:/Carbon_Icons/carbon_icons/volume--mute--filled.svg</iconset> </property> <property name="iconSize"> <size> @@ -625,8 +625,8 @@ QPushButton:checked { </layout> </widget> </item> - <item row="0" column="1" colspan="4"> - <spacer name="verticalSpacer_3"> + <item row="6" column="0" colspan="6"> + <spacer name="verticalSpacer_4"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -638,6 +638,17 @@ QPushButton:checked { </property> </spacer> </item> + <item row="0" column="0" colspan="6"> + <widget class="QWidget" name="Header" native="true"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>70</height> + </size> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_4"/> + </widget> + </item> </layout> </widget> </widget> |