-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwin.py
162 lines (156 loc) · 10.3 KB
/
mainwin.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwin.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_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(933, 683)
MainWindow.setMaximumSize(QtCore.QSize(933, 683))
font = QtGui.QFont()
font.setPointSize(12)
MainWindow.setFont(font)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.groupBoxTextFormat = QtWidgets.QGroupBox(self.centralwidget)
self.groupBoxTextFormat.setGeometry(QtCore.QRect(680, 210, 241, 151))
self.groupBoxTextFormat.setObjectName("groupBoxTextFormat")
self.radioButtonAllFormat = QtWidgets.QRadioButton(self.groupBoxTextFormat)
self.radioButtonAllFormat.setGeometry(QtCore.QRect(10, 40, 89, 16))
self.radioButtonAllFormat.setObjectName("radioButtonAllFormat")
self.radioButtonCustomFormat = QtWidgets.QRadioButton(self.groupBoxTextFormat)
self.radioButtonCustomFormat.setGeometry(QtCore.QRect(10, 80, 111, 16))
self.radioButtonCustomFormat.setObjectName("radioButtonCustomFormat")
self.groupBoxChooseFormat = QtWidgets.QGroupBox(self.groupBoxTextFormat)
self.groupBoxChooseFormat.setGeometry(QtCore.QRect(130, 20, 101, 121))
self.groupBoxChooseFormat.setObjectName("groupBoxChooseFormat")
self.checkBoxTxtFormat = QtWidgets.QCheckBox(self.groupBoxChooseFormat)
self.checkBoxTxtFormat.setGeometry(QtCore.QRect(20, 80, 51, 31))
self.checkBoxTxtFormat.setObjectName("checkBoxTxtFormat")
self.checkBoxCFormat = QtWidgets.QCheckBox(self.groupBoxChooseFormat)
self.checkBoxCFormat.setGeometry(QtCore.QRect(20, 20, 51, 31))
self.checkBoxCFormat.setObjectName("checkBoxCFormat")
self.checkBoxHFormat = QtWidgets.QCheckBox(self.groupBoxChooseFormat)
self.checkBoxHFormat.setGeometry(QtCore.QRect(20, 50, 51, 31))
self.checkBoxHFormat.setObjectName("checkBoxHFormat")
self.checkBoxRecursivelyScan = QtWidgets.QCheckBox(self.centralwidget)
self.checkBoxRecursivelyScan.setGeometry(QtCore.QRect(690, 90, 91, 31))
self.checkBoxRecursivelyScan.setObjectName("checkBoxRecursivelyScan")
self.groupBoxTextInformation = QtWidgets.QGroupBox(self.centralwidget)
self.groupBoxTextInformation.setGeometry(QtCore.QRect(10, 80, 651, 351))
self.groupBoxTextInformation.setObjectName("groupBoxTextInformation")
self.textEditFindText = QtWidgets.QTextEdit(self.groupBoxTextInformation)
self.textEditFindText.setGeometry(QtCore.QRect(10, 50, 631, 131))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.textEditFindText.sizePolicy().hasHeightForWidth())
self.textEditFindText.setSizePolicy(sizePolicy)
self.textEditFindText.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
self.textEditFindText.setOverwriteMode(False)
self.textEditFindText.setObjectName("textEditFindText")
self.labelFindText = QtWidgets.QLabel(self.groupBoxTextInformation)
self.labelFindText.setGeometry(QtCore.QRect(10, 20, 91, 31))
self.labelFindText.setObjectName("labelFindText")
self.labelModifyText = QtWidgets.QLabel(self.groupBoxTextInformation)
self.labelModifyText.setGeometry(QtCore.QRect(10, 180, 91, 31))
self.labelModifyText.setObjectName("labelModifyText")
self.textEditModifyText = QtWidgets.QTextEdit(self.groupBoxTextInformation)
self.textEditModifyText.setGeometry(QtCore.QRect(10, 210, 631, 131))
self.textEditModifyText.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
self.textEditModifyText.setObjectName("textEditModifyText")
self.groupBoxFilePath = QtWidgets.QGroupBox(self.centralwidget)
self.groupBoxFilePath.setGeometry(QtCore.QRect(10, 10, 651, 61))
font = QtGui.QFont()
font.setPointSize(12)
self.groupBoxFilePath.setFont(font)
self.groupBoxFilePath.setObjectName("groupBoxFilePath")
self.labelDestPath = QtWidgets.QLabel(self.groupBoxFilePath)
self.labelDestPath.setGeometry(QtCore.QRect(10, 20, 81, 31))
font = QtGui.QFont()
font.setPointSize(12)
self.labelDestPath.setFont(font)
self.labelDestPath.setObjectName("labelDestPath")
self.lineEditDestPath = QtWidgets.QLineEdit(self.groupBoxFilePath)
self.lineEditDestPath.setGeometry(QtCore.QRect(90, 20, 451, 31))
self.lineEditDestPath.setObjectName("lineEditDestPath")
self.pushButtonChoosePath = QtWidgets.QPushButton(self.groupBoxFilePath)
self.pushButtonChoosePath.setGeometry(QtCore.QRect(554, 20, 81, 31))
self.pushButtonChoosePath.setObjectName("pushButtonChoosePath")
self.groupBoxObjectType = QtWidgets.QGroupBox(self.centralwidget)
self.groupBoxObjectType.setGeometry(QtCore.QRect(679, 130, 241, 61))
self.groupBoxObjectType.setObjectName("groupBoxObjectType")
self.radioButtonFileName = QtWidgets.QRadioButton(self.groupBoxObjectType)
self.radioButtonFileName.setGeometry(QtCore.QRect(10, 30, 89, 16))
self.radioButtonFileName.setObjectName("radioButtonFileName")
self.radioButtonTextContent = QtWidgets.QRadioButton(self.groupBoxObjectType)
self.radioButtonTextContent.setGeometry(QtCore.QRect(130, 30, 89, 16))
self.radioButtonTextContent.setObjectName("radioButtonTextContent")
self.groupBoxDisplayText = QtWidgets.QGroupBox(self.centralwidget)
self.groupBoxDisplayText.setGeometry(QtCore.QRect(10, 440, 651, 231))
self.groupBoxDisplayText.setObjectName("groupBoxDisplayText")
self.textBrowser = QtWidgets.QTextBrowser(self.groupBoxDisplayText)
self.textBrowser.setGeometry(QtCore.QRect(10, 20, 631, 201))
self.textBrowser.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
self.textBrowser.setObjectName("textBrowser")
self.checkBoxMatchCase = QtWidgets.QCheckBox(self.centralwidget)
self.checkBoxMatchCase.setGeometry(QtCore.QRect(810, 90, 111, 31))
self.checkBoxMatchCase.setObjectName("checkBoxMatchCase")
self.groupBoxTextOperation = QtWidgets.QGroupBox(self.centralwidget)
self.groupBoxTextOperation.setGeometry(QtCore.QRect(680, 380, 241, 141))
self.groupBoxTextOperation.setObjectName("groupBoxTextOperation")
self.pushButtonAdd = QtWidgets.QPushButton(self.groupBoxTextOperation)
self.pushButtonAdd.setGeometry(QtCore.QRect(20, 20, 91, 31))
self.pushButtonAdd.setObjectName("pushButtonAdd")
self.pushButtonDelete = QtWidgets.QPushButton(self.groupBoxTextOperation)
self.pushButtonDelete.setGeometry(QtCore.QRect(130, 20, 91, 31))
self.pushButtonDelete.setObjectName("pushButtonDelete")
self.pushButtonFind = QtWidgets.QPushButton(self.groupBoxTextOperation)
self.pushButtonFind.setGeometry(QtCore.QRect(20, 60, 91, 31))
self.pushButtonFind.setObjectName("pushButtonFind")
self.pushButtonReplace = QtWidgets.QPushButton(self.groupBoxTextOperation)
self.pushButtonReplace.setGeometry(QtCore.QRect(130, 60, 91, 31))
self.pushButtonReplace.setObjectName("pushButtonReplace")
self.pushButtonDeleteWhitespace = QtWidgets.QPushButton(self.groupBoxTextOperation)
self.pushButtonDeleteWhitespace.setGeometry(QtCore.QRect(20, 100, 201, 31))
self.pushButtonDeleteWhitespace.setObjectName("pushButtonDeleteWhitespace")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(820, 30, 81, 31))
self.label.setObjectName("label")
MainWindow.setCentralWidget(self.centralwidget)
self.labelDestPath.setBuddy(self.lineEditDestPath)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.groupBoxTextFormat.setTitle(_translate("MainWindow", "文本格式"))
self.radioButtonAllFormat.setText(_translate("MainWindow", "全部格式"))
self.radioButtonCustomFormat.setText(_translate("MainWindow", "自定义格式"))
self.groupBoxChooseFormat.setTitle(_translate("MainWindow", "格式选择"))
self.checkBoxTxtFormat.setText(_translate("MainWindow", ".txt"))
self.checkBoxCFormat.setText(_translate("MainWindow", ".c"))
self.checkBoxHFormat.setText(_translate("MainWindow", ".h"))
self.checkBoxRecursivelyScan.setText(_translate("MainWindow", "递归扫描"))
self.groupBoxTextInformation.setTitle(_translate("MainWindow", "文本信息"))
self.labelFindText.setText(_translate("MainWindow", "查找文本:"))
self.labelModifyText.setText(_translate("MainWindow", "修改文本:"))
self.groupBoxFilePath.setTitle(_translate("MainWindow", "选择文件路径"))
self.labelDestPath.setText(_translate("MainWindow", "目标路径:"))
self.pushButtonChoosePath.setText(_translate("MainWindow", "浏览..."))
self.groupBoxObjectType.setTitle(_translate("MainWindow", "对象类型"))
self.radioButtonFileName.setText(_translate("MainWindow", "文件名"))
self.radioButtonTextContent.setText(_translate("MainWindow", "文本内容"))
self.groupBoxDisplayText.setTitle(_translate("MainWindow", "执行输出"))
self.checkBoxMatchCase.setText(_translate("MainWindow", "匹配大小写"))
self.groupBoxTextOperation.setTitle(_translate("MainWindow", "文本操作"))
self.pushButtonAdd.setText(_translate("MainWindow", "添加"))
self.pushButtonDelete.setText(_translate("MainWindow", "删除"))
self.pushButtonFind.setText(_translate("MainWindow", "查找"))
self.pushButtonReplace.setText(_translate("MainWindow", "替换"))
self.pushButtonDeleteWhitespace.setText(_translate("MainWindow", "删除文本中行尾空格"))
self.label.setText(_translate("MainWindow", "版本:V0.1"))
import mainrcc