-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.py
113 lines (105 loc) · 5.5 KB
/
ui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'md5&sha��ѯ.ui'
#
# Created: Thu Apr 26 18:40:13 2018
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(635, 350)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.frame = QtGui.QFrame(self.centralwidget)
self.frame.setGeometry(QtCore.QRect(0, 0, 635, 350))
self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame.setFrameShadow(QtGui.QFrame.Raised)
self.frame.setObjectName("frame")
self.comboBox = QtGui.QComboBox(self.frame)
self.comboBox.setGeometry(QtCore.QRect(225, 90, 85, 25))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(11)
self.comboBox.setFont(font)
self.comboBox.setCursor(QtCore.Qt.ArrowCursor)
self.comboBox.setObjectName("comboBox")
for i in range(3):
self.comboBox.addItem("")
self.label = QtGui.QLabel(self.frame)
self.label.setGeometry(QtCore.QRect(40, 40, 161, 16))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(11)
self.label.setFont(font)
self.label.setObjectName("label")
self.pushButton = QtGui.QPushButton(self.frame)
self.pushButton.setGeometry(QtCore.QRect(506, 90, 75, 25))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(11)
self.pushButton.setFont(font)
self.pushButton.setObjectName("pushButton")
self.toolButton = QtGui.QToolButton(self.frame)
self.toolButton.setGeometry(QtCore.QRect(540, 34, 40, 27))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(10)
self.toolButton.setFont(font)
self.toolButton.setArrowType(QtCore.Qt.NoArrow)
self.toolButton.setObjectName("toolButton")
self.label_2 = QtGui.QLabel(self.frame)
self.label_2.setGeometry(QtCore.QRect(40, 95, 181, 16))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(11)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.label_3 = QtGui.QLabel(self.frame)
self.label_3.setGeometry(QtCore.QRect(40, 240, 200, 16))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(11)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
font.setPointSize(13)
self.label_4 = QtGui.QLabel(self.frame)
self.label_4.setGeometry(QtCore.QRect(300, 150, 181, 16))
self.label_4.setFont(font)
pe = QtGui.QPalette() # 调色板
pe.setColor(QtGui.QPalette.WindowText, QtGui.QColor(255, 0, 0, 255)) # 设置字体颜色
self.label_4.setPalette(pe) # 使用调色板
self.label_4.setObjectName("label_4")
self.plainTextEdit = QtGui.QPlainTextEdit(self.frame)
self.plainTextEdit.setGeometry(QtCore.QRect(40, 270, 541, 51))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(11)
self.plainTextEdit.setFont(font)
self.plainTextEdit.setObjectName("plainTextEdit")
self.lineEdit = QtGui.QLineEdit(self.frame)
self.lineEdit.setGeometry(QtCore.QRect(190, 35, 351, 25))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei UI")
font.setPointSize(10)
self.lineEdit.setFont(font)
self.lineEdit.setObjectName("lineEdit")
style_sheet = "color:rgb(0, 117, 146, 255);" # 设置样式表
self.lineEdit.setStyleSheet(style_sheet) # 使用样式表
self.lineEdit.setReadOnly(True) # 设置文件路径显示框为只读
self.plainTextEdit.setStyleSheet(style_sheet) # 使用样式表
self.plainTextEdit.setReadOnly(True) # 设置文本显示框为只读
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "HASH查询器", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "MD5", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "SHA1", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(2, QtGui.QApplication.translate("MainWindow", "SHA256", None,QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("MainWindow", "请选择要查询的文件", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "查询", None, QtGui.QApplication.UnicodeUTF8))
self.toolButton.setText(QtGui.QApplication.translate("MainWindow", "文件", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "请选择要查询的hash算法", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "该文件的hash值为", None, QtGui.QApplication.UnicodeUTF8))