new experimental actor

This commit is contained in:
Adolfo Gómez García 2019-11-20 01:57:41 +01:00
parent ede5d4b790
commit c7dc116980
8 changed files with 821 additions and 0 deletions

View File

@ -0,0 +1,93 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import sys
import os
import logging
from PyQt5.QtWidgets import QApplication, QDialog
from ui.setup_dialog_ui import Ui_UdsActorSetupDialog
logger = logging.getLogger('actor')
class UDSConfigDialog(QDialog):
def __init__(self, data=None, parent=None):
QDialog.__init__(self, parent)
self.ui = Ui_UdsActorSetupDialog()
self.ui.setupUi(self)
if data is not None:
pass
def _getCfg(self):
return {
'host': self.ui.host.text(),
'username': self.ui.username.text(),
'password': self.ui.password.text(),
'validateCertificate': self.ui.useSSl.currentIndex() == 1,
'logLevel': (self.ui.logLevelComboBox.currentIndex() + 1) * 10000
}
def textChanged(self):
enableButtons = self.ui.host.text() != '' and self.ui.username.text() != '' and self.ui.password.text() != ''
self.ui.testButton.setEnabled(enableButtons)
self.ui.saveButton.setEnabled(enableButtons)
def cancelAndDiscard(self):
logger.debug('Cancelling changes')
self.close()
def testParameters(self):
pass
def acceptAndSave(self):
pass
if __name__ == "__main__":
# If to be run as "sudo" on linux, we will need this to avoid problems
if 'linux' in sys.platform:
os.environ['QT_X11_NO_MITSHM'] = '1'
app = QApplication(sys.argv)
# if store.checkPermissions() is False:
# QtGui.QMessageBox.critical(None, 'Notice', 'This Program must be executed as administrator', QtGui.QMessageBox.Ok)
# sys.exit(1)
myapp = UDSConfigDialog()
myapp.show()
sys.exit(app.exec_())

View File

@ -0,0 +1,370 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>Adolfo Gómez</author>
<class>UdsActorSetupDialog</class>
<widget class="QDialog" name="UdsActorSetupDialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>293</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Verdana</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="windowTitle">
<string>UDS Actor Setup</string>
</property>
<property name="windowIcon">
<iconset resource="uds.qrc">
<normaloff>:/img/img/uds-icon.png</normaloff>:/img/img/uds-icon.png</iconset>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<property name="modal">
<bool>true</bool>
</property>
<widget class="QPushButton" name="testButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>220</y>
<width>361</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
<string>Click to test the selecter parameters</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on this button to test the server host and master key parameters.&lt;/p&gt;&lt;p&gt;A window will be displayed with results after the test is executed.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;This button will only be active if all parameters are filled.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Test parameters</string>
</property>
</widget>
<widget class="QPushButton" name="saveButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>250</y>
<width>101</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Accepts changes and saves them</string>
</property>
<property name="whatsThis">
<string>Clicking on this button will accept all changes and save them, closing the configuration window</string>
</property>
<property name="text">
<string>Accept &amp;&amp; Save</string>
</property>
</widget>
<widget class="QPushButton" name="cancelButton">
<property name="geometry">
<rect>
<x>260</x>
<y>250</y>
<width>121</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Cancel all changes and discard them</string>
</property>
<property name="whatsThis">
<string>Discards all changes and closes the configuration window</string>
</property>
<property name="text">
<string>Cancel &amp;&amp; Discard</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>361</width>
<height>191</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="verticalSpacing">
<number>16</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_host">
<property name="text">
<string>UDS Server</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="host">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Uds Broker Server Addres. Use IP or FQDN</string>
</property>
<property name="whatsThis">
<string>Enter here the UDS Broker Addres using either its IP address or its FQDN address</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_username">
<property name="text">
<string>Username</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="username">
<property name="toolTip">
<string>UDS user with administration rights (Will not be stored on template)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Administrator user on UDS Server.&lt;/p&gt;&lt;p&gt;Note: This credential will not be stored on client. Will be used to obtain an unique key for this image.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="password">
<property name="toolTip">
<string>Password for user (Will not be stored on template)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Administrator password for the user on UDS Server.&lt;/p&gt;&lt;p&gt;Note: This credential will not be stored on client. Will be used to obtain an unique key for this image.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_password">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_security">
<property name="text">
<string>Security</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="validateCertificate">
<property name="toolTip">
<string>Select communication security with broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the security for communications with UDS Broker.&lt;/p&gt;&lt;p&gt;The recommended method of communication is &lt;span style=&quot; font-weight:600;&quot;&gt;Use SSL&lt;/span&gt;, but selection needs to be acording to your broker configuration.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Ignore certificate</string>
</property>
</item>
<item>
<property name="text">
<string>Verify certificate</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="logLevelComboBox">
<property name="currentIndex">
<number>1</number>
</property>
<property name="frame">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">DEBUG</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">INFO</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ERROR</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">FATAL</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_loglevel">
<property name="text">
<string>Log Level</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources>
<include location="uds.qrc"/>
</resources>
<connections>
<connection>
<sender>cancelButton</sender>
<signal>pressed()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>cancelAndDiscard()</slot>
<hints>
<hint type="sourcelabel">
<x>315</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>231</x>
<y>161</y>
</hint>
</hints>
</connection>
<connection>
<sender>testButton</sender>
<signal>pressed()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>testParameters()</slot>
<hints>
<hint type="sourcelabel">
<x>239</x>
<y>132</y>
</hint>
<hint type="destinationlabel">
<x>285</x>
<y>185</y>
</hint>
</hints>
</connection>
<connection>
<sender>saveButton</sender>
<signal>pressed()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>acceptAndSave()</slot>
<hints>
<hint type="sourcelabel">
<x>71</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>124</x>
<y>181</y>
</hint>
</hints>
</connection>
<connection>
<sender>host</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>237</x>
<y>32</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>146</y>
</hint>
</hints>
</connection>
<connection>
<sender>username</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>237</x>
<y>71</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>146</y>
</hint>
</hints>
</connection>
<connection>
<sender>password</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>237</x>
<y>110</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>146</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>textChanged()</slot>
<slot>cancelAndDiscard()</slot>
<slot>testParameters()</slot>
<slot>acceptAndSave()</slot>
</slots>
</ui>

View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="img">
<file>../img/uds-icon.png</file>
</qresource>
</RCC>

15
actor/src/designer/update.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
function process {
# pyuic4 about-dialog.ui -o about_dialog_ui.py -x
# pyuic4 message-dialog.ui -o message_dialog_ui.py
pyuic5 setup-dialog.ui -o ../ui/setup_dialog_ui.py --import-from=ui
}
pyrcc5 uds.qrc -o ../ui/uds_rc.py
# process current directory ui's
process

BIN
actor/src/img/uds-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

0
actor/src/ui/__init__.py Normal file
View File

View File

@ -0,0 +1,143 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'setup-dialog.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_UdsActorSetupDialog(object):
def setupUi(self, UdsActorSetupDialog):
UdsActorSetupDialog.setObjectName("UdsActorSetupDialog")
UdsActorSetupDialog.setWindowModality(QtCore.Qt.WindowModal)
UdsActorSetupDialog.resize(400, 293)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(UdsActorSetupDialog.sizePolicy().hasHeightForWidth())
UdsActorSetupDialog.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Verdana")
font.setPointSize(9)
UdsActorSetupDialog.setFont(font)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/img/img/uds-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
UdsActorSetupDialog.setWindowIcon(icon)
UdsActorSetupDialog.setAutoFillBackground(False)
UdsActorSetupDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
UdsActorSetupDialog.setSizeGripEnabled(False)
UdsActorSetupDialog.setModal(True)
self.testButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.testButton.setEnabled(False)
self.testButton.setGeometry(QtCore.QRect(20, 220, 361, 23))
self.testButton.setObjectName("testButton")
self.saveButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.saveButton.setEnabled(False)
self.saveButton.setGeometry(QtCore.QRect(20, 250, 101, 23))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.saveButton.sizePolicy().hasHeightForWidth())
self.saveButton.setSizePolicy(sizePolicy)
self.saveButton.setObjectName("saveButton")
self.cancelButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.cancelButton.setGeometry(QtCore.QRect(260, 250, 121, 23))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cancelButton.sizePolicy().hasHeightForWidth())
self.cancelButton.setSizePolicy(sizePolicy)
self.cancelButton.setObjectName("cancelButton")
self.layoutWidget = QtWidgets.QWidget(UdsActorSetupDialog)
self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 361, 191))
self.layoutWidget.setObjectName("layoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.layoutWidget)
self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setVerticalSpacing(16)
self.formLayout.setObjectName("formLayout")
self.label_host = QtWidgets.QLabel(self.layoutWidget)
self.label_host.setObjectName("label_host")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_host)
self.host = QtWidgets.QLineEdit(self.layoutWidget)
self.host.setAcceptDrops(False)
self.host.setObjectName("host")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.host)
self.label_username = QtWidgets.QLabel(self.layoutWidget)
self.label_username.setObjectName("label_username")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_username)
self.username = QtWidgets.QLineEdit(self.layoutWidget)
self.username.setObjectName("username")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.username)
self.password = QtWidgets.QLineEdit(self.layoutWidget)
self.password.setEchoMode(QtWidgets.QLineEdit.Password)
self.password.setObjectName("password")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.password)
self.label_password = QtWidgets.QLabel(self.layoutWidget)
self.label_password.setObjectName("label_password")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_password)
self.label_security = QtWidgets.QLabel(self.layoutWidget)
self.label_security.setObjectName("label_security")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_security)
self.validateCertificate = QtWidgets.QComboBox(self.layoutWidget)
self.validateCertificate.setObjectName("validateCertificate")
self.validateCertificate.addItem("")
self.validateCertificate.addItem("")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.validateCertificate)
self.logLevelComboBox = QtWidgets.QComboBox(self.layoutWidget)
self.logLevelComboBox.setFrame(True)
self.logLevelComboBox.setObjectName("logLevelComboBox")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(0, "DEBUG")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(1, "INFO")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(2, "ERROR")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(3, "FATAL")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.logLevelComboBox)
self.label_loglevel = QtWidgets.QLabel(self.layoutWidget)
self.label_loglevel.setObjectName("label_loglevel")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_loglevel)
self.retranslateUi(UdsActorSetupDialog)
self.logLevelComboBox.setCurrentIndex(1)
self.cancelButton.pressed.connect(UdsActorSetupDialog.cancelAndDiscard)
self.testButton.pressed.connect(UdsActorSetupDialog.testParameters)
self.saveButton.pressed.connect(UdsActorSetupDialog.acceptAndSave)
self.host.textChanged['QString'].connect(UdsActorSetupDialog.textChanged)
self.username.textChanged['QString'].connect(UdsActorSetupDialog.textChanged)
self.password.textChanged['QString'].connect(UdsActorSetupDialog.textChanged)
QtCore.QMetaObject.connectSlotsByName(UdsActorSetupDialog)
def retranslateUi(self, UdsActorSetupDialog):
_translate = QtCore.QCoreApplication.translate
UdsActorSetupDialog.setWindowTitle(_translate("UdsActorSetupDialog", "UDS Actor Setup"))
self.testButton.setToolTip(_translate("UdsActorSetupDialog", "Click to test the selecter parameters"))
self.testButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Click on this button to test the server host and master key parameters.</p><p>A window will be displayed with results after the test is executed.</p><p><br/></p><p>This button will only be active if all parameters are filled.</p></body></html>"))
self.testButton.setText(_translate("UdsActorSetupDialog", "Test parameters"))
self.saveButton.setToolTip(_translate("UdsActorSetupDialog", "Accepts changes and saves them"))
self.saveButton.setWhatsThis(_translate("UdsActorSetupDialog", "Clicking on this button will accept all changes and save them, closing the configuration window"))
self.saveButton.setText(_translate("UdsActorSetupDialog", "Accept && Save"))
self.cancelButton.setToolTip(_translate("UdsActorSetupDialog", "Cancel all changes and discard them"))
self.cancelButton.setWhatsThis(_translate("UdsActorSetupDialog", "Discards all changes and closes the configuration window"))
self.cancelButton.setText(_translate("UdsActorSetupDialog", "Cancel && Discard"))
self.label_host.setText(_translate("UdsActorSetupDialog", "UDS Server"))
self.host.setToolTip(_translate("UdsActorSetupDialog", "Uds Broker Server Addres. Use IP or FQDN"))
self.host.setWhatsThis(_translate("UdsActorSetupDialog", "Enter here the UDS Broker Addres using either its IP address or its FQDN address"))
self.label_username.setText(_translate("UdsActorSetupDialog", "Username"))
self.username.setToolTip(_translate("UdsActorSetupDialog", "UDS user with administration rights (Will not be stored on template)"))
self.username.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Administrator user on UDS Server.</p><p>Note: This credential will not be stored on client. Will be used to obtain an unique key for this image.</p></body></html>"))
self.password.setToolTip(_translate("UdsActorSetupDialog", "Password for user (Will not be stored on template)"))
self.password.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Administrator password for the user on UDS Server.</p><p>Note: This credential will not be stored on client. Will be used to obtain an unique key for this image.</p></body></html>"))
self.label_password.setText(_translate("UdsActorSetupDialog", "Password"))
self.label_security.setText(_translate("UdsActorSetupDialog", "Security"))
self.validateCertificate.setToolTip(_translate("UdsActorSetupDialog", "Select communication security with broker"))
self.validateCertificate.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Select the security for communications with UDS Broker.</p><p>The recommended method of communication is <span style=\" font-weight:600;\">Use SSL</span>, but selection needs to be acording to your broker configuration.</p></body></html>"))
self.validateCertificate.setItemText(0, _translate("UdsActorSetupDialog", "Ignore certificate"))
self.validateCertificate.setItemText(1, _translate("UdsActorSetupDialog", "Verify certificate"))
self.label_loglevel.setText(_translate("UdsActorSetupDialog", "Log Level"))
from ui import uds_rc

195
actor/src/ui/uds_rc.py Normal file
View File

@ -0,0 +1,195 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.11.3)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x08\x7c\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x30\x00\x00\x00\x30\x08\x06\x00\x00\x00\x57\x02\xf9\x87\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xe2\x0a\
\x04\x07\x27\x0a\x6d\xd5\xd2\x21\x00\x00\x08\x1b\x49\x44\x41\x54\
\x68\xde\xed\x9a\x6d\x8c\x54\xd5\x19\xc7\x7f\xe7\xbe\xee\x2e\xfb\
\xbe\x3a\x60\x2d\x52\xd6\x62\xac\x52\x23\x68\xc7\x97\xb4\x46\x8c\
\xca\x04\x6c\x2d\xad\x56\x4d\x5d\x5a\x9b\x5a\x8d\xfd\x60\xd2\x12\
\x9b\x94\x56\xb4\x76\xc4\xa6\x68\xda\x68\xb5\x04\x62\x90\xd1\xb8\
\xc1\x12\xab\x06\x98\x6a\x33\x60\x41\x83\x53\x17\x50\x16\x10\xa5\
\xb2\x14\xd4\x65\x16\x96\x65\x67\x77\xe6\xce\x7d\x3b\xfd\xb0\xb3\
\xeb\xec\xee\xec\xb0\xb3\x77\xfa\xa1\x49\xff\xc9\x64\x66\xce\xb9\
\xf7\x9e\xe7\xbf\xcf\xcb\x79\xce\x7f\x16\xfe\xc7\x21\x2a\xfd\xc0\
\x78\x32\xa4\x01\x9a\xa2\xa0\x9d\xdf\xaa\x29\x5f\x68\xd2\x94\x23\
\xdd\x8e\x78\x27\xe9\xf0\xc1\x87\x0e\xdd\x3d\x3e\x5d\x47\x1c\x5f\
\x0c\xad\xec\x00\xd9\x44\xbb\x25\xff\xeb\x04\xe2\xc9\x90\x02\xa8\
\x80\x96\x7f\x3f\x07\x58\x04\x2c\x00\xae\x04\xa6\x0f\x5f\xeb\x79\
\xe0\x38\x92\x5d\x7b\x6c\xf6\x76\x3a\x9c\xea\xf3\xc9\x1b\x3c\xf2\
\x5e\x04\x27\x80\x38\x10\x03\x76\x00\x1e\x60\x9f\x89\x9c\x98\x84\
\xe1\x17\x00\xeb\x81\x56\xa0\x2e\x4f\x40\x2b\x76\xad\x94\xb0\x7a\
\x6d\x9a\xf4\x80\x44\x4a\x80\xe1\xb5\x25\x82\xcf\xed\x90\x88\x31\
\x4b\x17\x35\xc3\x06\xfa\x81\x87\x13\xed\xd6\x53\x65\x11\x88\x27\
\x43\x73\x81\x35\xc0\x45\x40\xfd\x64\x3c\x34\x38\x28\xf9\xd3\xea\
\x34\x00\x86\xb4\x38\x6a\xdc\x43\xbf\x3a\x1f\x57\x34\xe2\x63\x22\
\x45\x01\x67\xcf\xc6\x6c\xa8\x47\xaf\x56\x51\xdc\x5e\x0c\xb7\x9b\
\xba\x81\xd7\x69\xe8\x7f\x05\x09\x78\xaa\x39\xd6\xb4\xd3\xc0\xef\
\x12\xed\xd6\xca\x33\x12\x88\x27\x43\x6b\x80\x1f\x97\x1b\x8b\x07\
\x3e\x70\x78\x6d\xd3\x20\xbd\xfa\xcd\x74\x99\x0f\x20\x51\x11\xb8\
\x05\x5e\x18\x0e\x21\x81\x7e\xf6\x2c\x14\x73\x1a\x79\x37\x21\x51\
\x90\x8a\x81\x14\x1a\xd5\xd6\x01\x6a\x32\x6f\x51\x3b\x98\xa0\xb9\
\xef\x45\xdc\xd1\x64\xfe\x96\x68\xb7\x22\x13\x12\x88\x27\x43\xcf\
\x02\x77\x4d\x25\x99\x8e\xa7\x3c\x9e\x59\x57\xc5\xfe\x86\x2d\x28\
\x64\x8b\xbb\x5b\xd3\x30\x67\xcc\x99\x54\x6a\x4a\x61\x20\xa4\xc7\
\x79\x9f\xdc\x49\x5d\xfa\x15\xa4\xd0\x87\x27\xb7\x27\xda\xad\x6b\
\x86\xbf\xa8\xc3\x1f\x36\x6e\x3b\xcb\x30\x74\xf1\x62\xe1\x58\x39\
\x68\x6e\x52\x39\xd1\xdf\xc4\xbe\x53\xdf\x42\x88\xf1\x79\x27\x84\
\x82\x79\xee\x85\xe3\x3c\x32\x31\x05\x0f\xf0\xe9\x6b\xb8\x15\x44\
\x15\xb5\x99\x04\xa0\x00\xcc\x9a\x3d\x57\x7b\xfe\x70\xa7\x7b\x8a\
\xe1\x11\x80\xf5\x2f\x9f\x52\xb3\x96\xaf\x4c\xb5\x9c\xd9\xb6\xe4\
\x96\x85\x29\x66\x36\x1d\x2d\x3a\x6f\x9c\x7b\x01\x48\xbf\xfc\x32\
\x29\x1d\x52\x67\xfd\x9c\xbe\x86\xa5\x85\xc3\xef\x0f\x7f\x18\x31\
\xb8\xbe\x56\x91\x1b\xe3\xa7\xa5\xe7\x4d\xb9\x24\xe3\x49\x85\x55\
\xb7\xdd\x4b\x8d\x6e\x15\xd6\x26\xb4\xda\x66\x44\x80\x2d\x47\xc8\
\x1c\x3d\x2d\xcb\x50\xbd\x91\xe7\xd6\x5c\x77\x7b\x55\xf3\x28\x02\
\x40\x4e\x08\x78\x7d\xc7\x00\x9a\x16\x64\x7f\x93\xac\xfe\xc1\x9d\
\x05\x61\x24\xd0\x1a\xa7\x07\xde\x6f\x2d\xf3\x2b\xf8\x8a\x39\x2a\
\x6a\x47\x11\x88\x45\x1d\x09\x2c\x3c\x79\xca\x65\x57\x67\x06\x3d\
\x00\x09\x5d\xcd\xb1\x72\xc9\x32\x6c\xd7\x44\x28\x0a\x28\x0a\xc1\
\xe1\x63\x9b\x5f\x2e\x1c\x30\xc7\x7a\x80\x58\xd4\xd9\x2a\x04\xbb\
\x3a\x3a\xb3\x7c\x7c\xd4\x0e\xb4\xdc\xec\xd0\x41\xee\xbf\x7e\x15\
\x96\x63\x80\x2f\xa9\x04\x14\x3f\x33\x7e\x6c\xec\x40\x2c\xea\x5c\
\x66\xe8\x22\xb7\x75\x67\x1a\xcf\x0b\x10\x48\x52\x70\xc3\xc5\xaf\
\x71\xfb\xfc\x17\xf0\x5c\xb7\x12\xe6\x53\x65\x1d\x2e\x1c\xc8\x16\
\x25\x90\xc7\x52\x55\x11\xbc\xfc\x7a\x1f\x6a\x00\xef\xdb\xae\x49\
\xdb\xd7\x57\x73\x51\x55\x3c\xb0\xf9\x86\x7b\x6c\x6c\x01\xee\x9f\
\x90\x40\x2c\xea\x6c\x00\x7e\x9f\xb3\x25\x7f\xd9\xd2\x17\x68\x61\
\xdb\x35\xf9\xe5\xc2\xfb\x69\xa9\x3e\x1e\xa8\x30\xe8\xf6\x11\x0a\
\x8a\xbc\x5f\x92\x40\x9e\xc4\x03\xc0\xa7\x19\x4b\xf2\xee\xde\x6c\
\xa0\x3c\x94\xc0\x13\xd7\x5d\x4d\xad\xde\x3f\x75\x0f\xd8\x87\x0a\
\xab\x50\x6f\xa2\xdd\xb2\x4b\x12\xc8\xe3\x72\x80\x03\x87\x2c\x3e\
\x3d\xee\xa0\x88\x20\x24\x04\x4f\x2f\xbc\x94\x46\xf3\x64\xbe\x1b\
\x2d\xe7\x5e\x0d\xd3\x3e\x54\xd8\xf9\xfc\x71\xc2\x24\x1e\xe3\x85\
\xcf\x80\x9b\x14\x05\x36\x6f\x4b\xd3\x3f\xe0\x05\x2b\x84\x52\xe5\
\xa9\x1b\x2f\xa3\xb5\x7e\x3f\xae\xaf\x3b\x93\xdf\x06\x34\x4c\xfb\
\xa3\xc2\x91\xc9\x11\xc8\x93\xd8\x54\x6d\xea\x47\x4c\x43\xb0\xf9\
\xcd\x34\xaa\x4a\xa0\x58\x76\x7d\x8d\xe8\xb5\xd7\xf3\xdc\xa2\xd6\
\x27\xbb\x0f\xd6\x4d\xcb\x9f\x33\x6e\x03\x36\x03\x5d\x45\xef\x12\
\x2a\xc6\xe7\x04\x9c\xfc\xab\xf4\x81\x66\xdf\x91\xc5\x0a\x30\x0f\
\x78\xd1\x30\xb4\x39\xab\xd6\xfe\x9d\x8c\x65\x13\x6a\xd1\x58\x78\
\x4d\x1d\xbe\x4f\x25\xf0\x78\x24\x9c\x5a\x36\x76\x70\xc6\x8a\xfe\
\x5b\x80\x47\x81\x39\x00\xbe\x52\xcb\xdc\x03\xf5\x80\x0b\x30\x00\
\x34\x24\xda\x2d\x7f\x42\x02\xfb\x8e\x2c\x5e\x01\xfc\xaa\xf0\xe4\
\x65\xdb\x69\x1e\x5b\xf3\x36\xba\x26\x68\x9d\x69\x70\xf5\x65\xd3\
\x2a\x75\x8c\xfe\x75\x24\x9c\xfa\x6d\xb1\x89\x19\x2b\xfa\xeb\x80\
\xcf\x84\x94\xd3\xbe\xba\xbf\x01\x57\xab\x02\xd8\x9d\x68\xb7\xe6\
\x4f\x18\x42\x3f\x7c\xd0\x4c\xbe\xd5\xf1\xf1\x43\x9a\xaa\x68\x02\
\x1f\x01\x6c\xda\x7b\x1f\x8f\xbe\x91\x40\x34\xaf\x44\x08\x87\x8f\
\x8f\xda\x9c\xec\xf3\x2a\x45\xe0\x91\x78\x32\x74\x47\xb1\x89\xee\
\x87\xeb\xd3\x9a\x7b\xac\xb9\x36\xb3\xd5\x2d\x28\xa1\xb1\x92\x27\
\xb2\xb6\xe5\xfa\x33\x9e\xe7\xdf\x5b\x53\x05\xad\x97\x6e\xa0\xe3\
\xd8\x77\xf0\x25\x28\x02\xa4\x80\xaa\x93\xb7\xa2\xe6\x5e\x45\x4a\
\xc9\x1d\xdf\x6c\x44\x55\x2b\x26\x6c\xcc\x8f\x84\x53\xbb\x8b\x4d\
\x5c\x75\xd7\x37\xb6\x54\x67\xdf\x89\x80\x42\xa2\xdd\x12\x25\x5b\
\x09\x60\xad\xaa\x2a\xe4\x6c\x8f\xdd\x5d\xf3\x86\x2e\x1a\x56\x14\
\x24\xe4\x9a\xd6\x01\x43\x2a\xc3\xc6\xf8\xe9\x4a\x2a\x32\xbb\xe2\
\xc9\xd0\xf4\x78\x32\x34\xee\x2f\x52\x9d\x4d\xda\x79\x53\x8f\x4d\
\xa6\x17\xea\x18\x99\x74\xde\x2a\x52\xd2\xa6\x91\x0d\x75\x81\x74\
\x70\x5c\xc9\x3b\x7b\x32\x01\x2b\xd3\x28\xec\x8d\x84\x53\xb2\x68\
\x1d\x85\x34\xb0\x7d\x52\xaa\x44\xdb\x72\xfd\x3d\xf0\x2f\xf1\xaa\
\x96\x90\x6b\x7a\xa9\xa8\x96\xa1\xa7\x9f\x40\x4f\xff\x02\x5f\x0a\
\xae\x9a\x57\xc3\x9c\x59\x26\x95\xe9\x39\xd9\x10\x09\xa7\x6e\x9b\
\x7c\x8b\x57\x1c\x3b\x41\x41\x78\x5d\x13\xf6\x06\x4e\xed\xcf\x90\
\xea\x6c\x14\x21\xf9\x47\x72\x90\x8c\xe5\x57\xca\x0b\xdf\x8b\x27\
\x43\x37\x04\x25\xf0\x18\x80\xe2\x1e\x2a\x29\x7d\x65\xa7\x7f\x08\
\xa2\x1e\xd3\x10\x6c\xde\xd6\x1f\xe8\x10\x34\x06\x7f\x0e\x44\x20\
\x16\x75\x0e\x03\x5b\xf1\xfb\xd0\x06\xd7\x95\xec\xd2\xac\x96\x37\
\x11\xd2\x21\x6b\x49\x36\x6f\xeb\xaf\xcc\xe1\x0b\x5a\xe3\xc9\xd0\
\x45\x41\x3c\x00\xf0\x07\x84\x8e\x71\xfa\xbe\xbc\x4c\x39\x41\x7f\
\xa3\xcf\xc5\xae\x7b\x08\x21\x1c\x8e\x9f\x70\xf9\xa8\xcb\xae\x94\
\x17\xa2\x81\x08\xc4\xa2\xce\xab\x40\x0f\x38\xa8\xb9\x1d\xa5\x7b\
\xfe\x86\x15\xf8\xfa\xd7\x10\x02\xde\xee\x18\xc0\xb6\x2b\x92\xce\
\x97\x07\xf5\x00\xc0\xb5\x20\x30\x4f\x5c\x8b\x90\x13\xf7\xf2\xc2\
\x87\x5c\xcb\x1b\x20\x1d\x14\x45\xf0\xd2\x96\xbe\x52\x2a\xf4\x64\
\x51\x5f\x6c\x4f\x28\x8b\x40\x2c\xea\xec\x07\xb6\xa2\xe8\x18\x7d\
\x3f\x2d\x99\xd0\x52\x34\x90\x0d\x75\x0e\x37\x5c\x74\x74\x66\x83\
\xe6\xc3\xbf\x8a\xef\x09\xe5\x79\x00\xe0\x46\xc0\x57\xb3\xcf\xa3\
\x65\x5e\x28\xdd\x2c\x6b\x17\xe3\xd6\x3e\x0a\x48\x3a\x0f\x66\xe9\
\x4e\x05\x3a\xcc\x3f\x3d\x39\xc5\x68\x12\x68\x5b\xae\x5f\x02\xbc\
\x07\x0e\x56\xcb\x4e\x7c\x23\x3c\xe1\xad\x52\x40\xcd\xf1\xf3\x11\
\xde\xbf\x51\x55\x85\x3b\xbf\xdd\x84\xeb\x96\x9d\x13\x27\x23\xe1\
\xd4\x59\x95\xc8\x81\xe1\x50\x7a\x1f\xf8\x0d\x18\x54\xf5\x46\x10\
\xde\x67\x25\x64\x40\xb0\xce\xfe\x10\x30\x70\x5d\x49\xe2\xed\xf4\
\x54\x42\x29\xf0\x46\x56\x8c\xc4\x0a\x90\x1b\x90\x19\xaa\x7b\x2e\
\x44\xc8\x74\x89\x7c\x50\xc9\x35\xc5\x10\x38\x74\x7d\xe2\xd0\x7b\
\xba\xac\xd6\x7b\x29\xb0\x67\xf2\xa2\x63\x99\x68\x5b\xae\xef\x04\
\xae\x40\xba\x64\xcf\xe9\x47\x8a\xda\x09\xaf\x35\x7b\xbf\x8b\x9a\
\x7b\x0d\x5d\x17\xdc\x71\x53\x23\xde\x99\xbb\x8d\x45\x91\x70\x6a\
\x4b\x79\x72\x57\x99\x88\x45\x9d\x2b\x81\x83\x08\x8d\xea\xee\x46\
\x84\xdf\x3d\xe1\xb5\x4e\xc3\xe3\x20\x1d\x6c\x5b\x72\xf8\xcc\x52\
\xe5\xc5\xe5\x1a\x3f\x25\x02\x79\x12\x17\x0e\x1d\xc2\x15\xaa\x8f\
\xb7\xa2\x59\x7f\x2d\xea\x4b\x4f\xff\x12\xd2\x18\xda\xe0\xb6\xbf\
\x3b\x58\xca\xdd\x33\x23\xe1\xd4\xfe\xa9\x09\x8e\x53\x44\x2c\xea\
\x2c\x06\x1e\x01\x17\xa3\x77\x09\x46\xdf\xdd\xe3\x9e\x26\x7c\x70\
\xcd\xdb\x47\xbe\x0f\x64\xc6\xc5\xd0\x1e\xa0\x36\x12\x4e\x1d\x9b\
\xba\x62\x1a\x00\xb1\xa8\xf3\x20\xf0\x13\x84\xee\x68\x99\x67\xa9\
\xf9\xa4\x0e\xd5\xda\x34\xe2\x0d\xa9\x80\xe2\x6c\xfd\x5c\xcc\x1c\
\xad\x2b\xad\x8b\x84\x53\xf3\x22\xe1\xd4\x60\x10\x1b\x2a\xd2\xff\
\xb6\x2d\xd7\x67\x00\xff\x04\xbe\x38\x24\xd9\xd4\x90\x6b\x8c\xa1\
\x59\xaf\xa2\x5a\xcf\x01\x43\x3f\xd0\x2d\x5e\x50\x4f\x63\xbd\x6a\
\x03\x77\x47\xc2\xa9\xf5\x95\x58\xbb\xa2\xff\x6a\xd0\xb6\x5c\x5f\
\x0a\xac\x1d\xb1\x78\xcc\x42\xdf\xbf\xb9\xd9\xf1\xa4\xdf\xb8\xe8\
\x8a\x9e\x4c\xa5\xd6\x54\x2a\x49\x20\x16\x75\xd6\x33\xf4\x6b\xfe\
\x8f\x46\x19\x2f\x60\xf1\x82\xfa\x65\xaa\x46\x75\x25\x8d\xaf\xb8\
\x07\xc6\x78\x43\x07\xce\x93\x12\xf3\xfc\x59\x46\xcf\xc3\xf7\x0c\
\xf6\xf0\x7f\x8c\xc7\x7f\x00\xf4\xc5\x17\xbc\x3a\x13\xef\x97\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = b"\
\x00\x03\
\x00\x00\x70\x37\
\x00\x69\
\x00\x6d\x00\x67\
\x00\x0c\
\x09\x57\x90\xa7\
\x00\x75\
\x00\x64\x00\x73\x00\x2d\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x6e\x86\x31\xef\xa3\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
if qt_version < [5, 8, 0]:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2
def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()