Skip to content

Commit

Permalink
Merge branch 'master' of github.com:VirtualCable/uds-client
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Mar 3, 2024
2 parents c4fe066 + 795d90c commit b5b644b
Show file tree
Hide file tree
Showing 7 changed files with 2,663 additions and 7 deletions.
16 changes: 16 additions & 0 deletions src/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "UDSClient",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/UDSClient.py",
"console": "integratedTerminal",
"args": ["udss://demo.udsenterprise.com/jncq5fvwzmztu0kjtqvaa7vlvcnxdteddlcfhkhr/UDnsXW3UyakVgrmOKdD33WhxEUOEpGVU"],
}
]
}
2 changes: 1 addition & 1 deletion src/UDSClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import threading
import typing

from uds.ui import QtCore, QtWidgets, QtGui, QSettings, Ui_MainWindow
from uds.ui import QtCore, QtWidgets, QtGui, QSettings, Ui_MainWindow # pyright: ignore
from uds.rest import RestApi, RetryException, InvalidVersion

# Just to ensure there are available on runtime
Expand Down
12 changes: 6 additions & 6 deletions src/uds/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@
from PySide6 import QtCore, QtWidgets, QtGui
from PySide6.QtCore import QSettings

from .qt6.UDSLauncherMac import Ui_MacLauncher
from .qt6.UDSWindow import Ui_MainWindow
from .qt6 import UDSResources_rc
from .pyside6.UDSLauncherMac import Ui_MacLauncher
from .pyside6.UDSWindow import Ui_MainWindow
from .pyside6 import UDSResources_rc
_version = 'PySide6'
# second, try to use PyQt6, available on arm64, x86_64, i386, ...
except ImportError:
try:
from PyQt6 import QtCore, QtWidgets, QtGui # type: ignore
from PyQt6.QtCore import QSettings # type: ignore

from .qt6.UDSLauncherMac import Ui_MacLauncher
from .qt6.UDSWindow import Ui_MainWindow
from .qt6 import UDSResources_rc
from .qt6.UDSLauncherMac import Ui_MacLauncher # type: ignore
from .qt6.UDSWindow import Ui_MainWindow # type: ignore
from .qt6 import UDSResources_rc # type: ignore
_version = 'PyQt6'

except ImportError: # If not found, try to use PyQt5 (not available on arm64)
Expand Down
62 changes: 62 additions & 0 deletions src/uds/ui/pyside6/UDSLauncherMac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Form implementation generated from reading ui file 'UDSLauncherMac.ui'
#
# Created by: PySide6 UI code generator 6.5.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.


from PySide6 import QtCore, QtGui, QtWidgets


class Ui_MacLauncher(object):
def setupUi(self, MacLauncher):
MacLauncher.setObjectName("MacLauncher")
MacLauncher.setWindowModality(QtCore.Qt.WindowModality.NonModal)
MacLauncher.resize(235, 120)
MacLauncher.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/images/logo-uds-small"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
MacLauncher.setWindowIcon(icon)
MacLauncher.setWindowOpacity(1.0)
self.centralwidget = QtWidgets.QWidget(parent=MacLauncher)
self.centralwidget.setAutoFillBackground(True)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout_2.setContentsMargins(4, 4, 4, 4)
self.verticalLayout_2.setSpacing(4)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.frame = QtWidgets.QFrame(parent=self.centralwidget)
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
self.frame.setObjectName("frame")
self.verticalLayout = QtWidgets.QVBoxLayout(self.frame)
self.verticalLayout.setObjectName("verticalLayout")
self.topLabel = QtWidgets.QLabel(parent=self.frame)
self.topLabel.setTextFormat(QtCore.Qt.TextFormat.RichText)
self.topLabel.setObjectName("topLabel")
self.verticalLayout.addWidget(self.topLabel)
self.image = QtWidgets.QLabel(parent=self.frame)
self.image.setMinimumSize(QtCore.QSize(0, 32))
self.image.setAutoFillBackground(True)
self.image.setText("")
self.image.setPixmap(QtGui.QPixmap(":/images/logo-uds-small"))
self.image.setScaledContents(False)
self.image.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.image.setObjectName("image")
self.verticalLayout.addWidget(self.image)
self.label_2 = QtWidgets.QLabel(parent=self.frame)
self.label_2.setTextFormat(QtCore.Qt.TextFormat.RichText)
self.label_2.setObjectName("label_2")
self.verticalLayout.addWidget(self.label_2)
self.verticalLayout_2.addWidget(self.frame)
MacLauncher.setCentralWidget(self.centralwidget)

self.retranslateUi(MacLauncher)
QtCore.QMetaObject.connectSlotsByName(MacLauncher)

def retranslateUi(self, MacLauncher):
_translate = QtCore.QCoreApplication.translate
MacLauncher.setWindowTitle(_translate("MacLauncher", "UDS Launcher"))
self.topLabel.setText(_translate("MacLauncher", "<html><head/><body><p align=\"center\"><span style=\" font-size:12pt; font-weight:600;\">UDS Launcher</span></p></body></html>"))
self.label_2.setText(_translate("MacLauncher", "<html><head/><body><p align=\"center\"><span style=\" font-size:6pt;\">Closing this window will end all UDS tunnels</span></p></body></html>"))
Loading

0 comments on commit b5b644b

Please sign in to comment.