1 Star 1 Fork 1

Tang/excel2json

forked from seraph2047/excel2json 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Logger.py 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
seraph2047 提交于 2022-07-14 14:12 +08:00 . 完成整套java代码导出功能
from PySide2 import QtGui
from PySide2.QtWidgets import *
from PySide2.QtGui import QColor, QFont
class Logger:
logs: QTextEdit
"""日志显示控件 .append()增加日志"""
def __new__(cls, *args, **kwargs):
if not hasattr(cls, "_instance"):
cls._instance = super().__new__(cls, *args, **kwargs)
print("第一次创建EData")
return cls._instance
def bindOuttext(self, logs: QTextEdit):
self.logs = logs
def logNotice(self, text: str):
color = QColor(100, 100, 100)
self.logs.setFontWeight(QFont.Normal)
self.logs.setTextColor(color)
self.logs.append(text)
def logWarning(self, text: str):
color = QColor(255, 125, 0)
self.logs.setFontWeight(QFont.Normal)
self.logs.setTextColor(color)
self.logs.append(text)
def logError(self, text: str):
color = QColor(255, 0, 0)
self.logs.setTextColor(color)
self.logs.append(text)
def logSuccess(self, text: str):
color = QColor(0, 166, 24)
self.logs.setFontWeight(QFont.Normal)
self.logs.setTextColor(color)
self.logs.append(text)
def logAllDone(self, text: str):
color = QColor(0, 125, 24)
self.logs.setFontWeight(QFont.Bold)
self.logs.setTextColor(color)
self.logs.append(text)
def clear(self):
self.logs.clear()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/t_vi/excel2json.git
git@gitee.com:t_vi/excel2json.git
t_vi
excel2json
excel2json
master

搜索帮助