udp.py 添加close函数用于关闭后台线程,
解决updata_ssh 后台线程无法正常关闭的问题 调整服务器文件列表显示,服务器文件夹显示中文别名
This commit is contained in:
@@ -5,8 +5,36 @@ import sys
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 定义转换字符
|
||||
_TRAN_TABLE=[
|
||||
("checker_dtb","设备树文件"),
|
||||
("checker_gen1_app","一代批检仪/赋码仪主板程序"),
|
||||
("checker_gen1_boot","一代批检仪/赋码仪主板boot程序"),
|
||||
("checker_host_app","自研批检仪/赋码仪主板程序"),
|
||||
("checker_m4","自研批检仪/赋码仪协处理器程序"),
|
||||
("checker_slave_app","自研批检仪/赋码仪小板程序"),
|
||||
("checker_slave_app_can","自研批检仪/赋码仪小板程序CAN总线"),
|
||||
("checker_slave_app_uart","自研批检仪/赋码仪小板程序串口总线"),
|
||||
("checker_slave_boot_can","自研批检仪/赋码仪小板boot程序CAN总线"),
|
||||
("checker_slave_boot_uart","自研批检仪/赋码仪小板boot程序串口总线"),
|
||||
("coder_stm32f1_app","手动线赋码控制器主板程序"),
|
||||
("coder_stm32f1_boot","手动线赋码控制器主板boot程序"),
|
||||
("daemon","自研批检仪/赋码仪守护进程"),
|
||||
("jqcoder_slave_app","一代赋码仪小板程序"),
|
||||
("judge","判定脚本"),
|
||||
("scheme","检测方案"),
|
||||
("test_data","测试数据"),
|
||||
]
|
||||
def _tran_(text:str):
|
||||
for i in _TRAN_TABLE:
|
||||
if(i[0]==text):
|
||||
return i[1]
|
||||
return text
|
||||
def _detran_(text:str):
|
||||
for i in _TRAN_TABLE:
|
||||
if(i[1]==text):
|
||||
return i[0]
|
||||
return text
|
||||
|
||||
|
||||
|
||||
@@ -57,9 +85,9 @@ class select_list(QObject):
|
||||
def item_append(self,items:list):
|
||||
for i in items:
|
||||
# print("add item",i[0])
|
||||
self.file_list.addItem(i[0])
|
||||
self.file_list.addItem(_tran_(i[0]))
|
||||
def item_clicked(self,item:QListWidgetItem ):
|
||||
self.select_item=item.text()
|
||||
self.select_item=_detran_(item.text())
|
||||
self.w.done(QDialog.DialogCode.Accepted)
|
||||
self.w.close()
|
||||
def show(self):
|
||||
@@ -75,21 +103,21 @@ class file_list(QDialog):
|
||||
|
||||
def __init__(self,father:QDialog,title:str,str_list:list):
|
||||
QDialog.__init__(self,father)
|
||||
self.resize(1000,400)
|
||||
self.resize(1200,700)
|
||||
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
||||
self.setWindowTitle(title)
|
||||
self.code_list=QTableWidget(self)
|
||||
self.code_list.setObjectName(u"code_list")
|
||||
self.code_list.setGeometry(QRect(5, 5, 990, 390))
|
||||
self.code_list.setGeometry(QRect(5, 5, 1190, 690))
|
||||
self.code_list.setColumnCount(4)
|
||||
self.code_list.setHorizontalHeaderLabels(list(["ID","上传时间","文件名","描述"]))
|
||||
self.code_list.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||
self.code_list.horizontalHeader().setSectionResizeMode(0,QHeaderView.ResizeMode.Fixed)
|
||||
self.code_list.setColumnWidth(0,50)
|
||||
self.code_list.horizontalHeader().setSectionResizeMode(1,QHeaderView.ResizeMode.Fixed)
|
||||
self.code_list.setColumnWidth(1,200)
|
||||
self.code_list.setColumnWidth(1,160)
|
||||
self.code_list.horizontalHeader().setSectionResizeMode(2,QHeaderView.ResizeMode.Fixed)
|
||||
self.code_list.setColumnWidth(2,200)
|
||||
self.code_list.setColumnWidth(2,400)
|
||||
self.code_list.setSelectionBehavior( QAbstractItemView.SelectionBehavior.SelectRows)
|
||||
self.code_list.cellDoubleClicked.connect(self.cell_clicked)
|
||||
self.backcolor=True
|
||||
|
Reference in New Issue
Block a user