1 Star 0 Fork 0

leonyan2020/pyCoating

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
OneHeight.py 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
leonyan2020 提交于 2022-07-10 20:26 . V0.20
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/9/27 21:40
# @Author : leon yan
# @Site :
# @File : OneHeight.py
# @Software: PyCharm
from PyQt5.QtCore import pyqtSlot, pyqtSignal
from PyQt5.QtWidgets import QWidget, QApplication, QMessageBox
import Globalist as gl
from resource.OneHeight_ui import Ui_Form
class QOneHeight(QWidget, Ui_Form):
def __init__(self, parent=None, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self.setupUi(self)
self.widget.setTableSheet("oneHeight", False)
self.widget.frame.setVisible(False)
self.setTable()
'''启动更新方法'''
self.threadObj = gl.get_value("obj_UpdateThread")
self.threadObj.bPulse.connect(self.do_UpdateStatus)
def __del__(self):
print("OneHeight is deleted")
def closeEvent(self, event):
pass
def setTable(self):
deviceIpDict = gl.global_var["deviceIpDict"]
# print(deviceIpDict)
curHeightDict = gl.global_var["Plc_read_area"]["data_rdArea4"]["dArea"]
# print(curHeightDict)
aa = []
for key, value in curHeightDict.items():
bb = []
for i in range(len(value[2])):
bb.append(value[2][i])
bb2 = len(bb)
for j in range(4 - bb2):
bb.append("")
bb.insert(0, deviceIpDict[int(key)][2])
aa.append(bb)
self.widget.fileToTable(aa)
@pyqtSlot()
def on_btnClose_clicked(self):
self.close()
@pyqtSlot()
def on_btnApply_clicked(self):
pass
@pyqtSlot()
def do_UpdateStatus(self):
self.setTable()
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
objWindow = QOneHeight()
objWindow.show()
sys.exit(app.exec_())
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/leonyan2020/pyCoating.git
git@gitee.com:leonyan2020/pyCoating.git
leonyan2020
pyCoating
pyCoating
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385