-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfind_replace.py
More file actions
81 lines (78 loc) · 4.23 KB
/
find_replace.py
File metadata and controls
81 lines (78 loc) · 4.23 KB
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
from PyQt5 import QtCore, QtWidgets
class Ui_Find(object):
def setupUi(self, Find):
Find.setObjectName("Find")
Find.setEnabled(True)
Find.resize(420, 150)
Find.setMinimumSize(QtCore.QSize(420, 150))
self.horizontalLayout = QtWidgets.QHBoxLayout(Find)
self.horizontalLayout.setObjectName("horizontalLayout")
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setContentsMargins(-1, -1, 6, -1)
self.gridLayout.setHorizontalSpacing(6)
self.gridLayout.setObjectName("gridLayout")
self.label = QtWidgets.QLabel(Find)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.lineEditFind = QtWidgets.QLineEdit(Find)
self.lineEditFind.setObjectName("lineEditFind")
self.gridLayout.addWidget(self.lineEditFind, 0, 1, 1, 1)
self.checkWholeWord = QtWidgets.QCheckBox(Find)
self.checkWholeWord.setObjectName("checkWholeWord")
self.gridLayout.addWidget(self.checkWholeWord, 3, 0, 1, 1)
self.label_2 = QtWidgets.QLabel(Find)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
self.lineEditReplace = QtWidgets.QLineEdit(Find)
self.lineEditReplace.setObjectName("lineEditReplace")
self.gridLayout.addWidget(self.lineEditReplace, 1, 1, 1, 1)
self.checkCase = QtWidgets.QCheckBox(Find)
self.checkCase.setObjectName("checkCase")
self.gridLayout.addWidget(self.checkCase, 2, 0, 1, 1)
self.checkWrapAround = QtWidgets.QCheckBox(Find)
self.checkWrapAround.setObjectName("checkWrapAround")
self.gridLayout.addWidget(self.checkWrapAround, 2, 1, 1, 1)
self.horizontalLayout.addLayout(self.gridLayout)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName("verticalLayout")
self.btnFind = QtWidgets.QPushButton(Find)
self.btnFind.setObjectName("btnFind")
self.verticalLayout.addWidget(self.btnFind)
self.btnReplace = QtWidgets.QPushButton(Find)
self.btnReplace.setObjectName("btnReplace")
self.verticalLayout.addWidget(self.btnReplace)
self.btnReplaceAll = QtWidgets.QPushButton(Find)
self.btnReplaceAll.setObjectName("btnReplaceAll")
self.verticalLayout.addWidget(self.btnReplaceAll)
spacerItem = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.btnCancel = QtWidgets.QPushButton(Find)
self.btnCancel.setObjectName("btnCancel")
self.verticalLayout.addWidget(self.btnCancel)
self.horizontalLayout.addLayout(self.verticalLayout)
self.label.setBuddy(self.lineEditFind)
self.label_2.setBuddy(self.lineEditReplace)
self.retranslateUi(Find)
self.btnCancel.clicked.connect(Find.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Find)
Find.setTabOrder(self.lineEditFind, self.lineEditReplace)
Find.setTabOrder(self.lineEditReplace, self.btnFind)
Find.setTabOrder(self.btnFind, self.btnReplace)
Find.setTabOrder(self.btnReplace, self.btnReplaceAll)
Find.setTabOrder(self.btnReplaceAll, self.checkCase)
Find.setTabOrder(self.checkCase, self.checkWholeWord)
Find.setTabOrder(self.checkWholeWord, self.checkWrapAround)
Find.setTabOrder(self.checkWrapAround, self.btnCancel)
def retranslateUi(self, Find):
_translate = QtCore.QCoreApplication.translate
Find.setWindowTitle(_translate("Find", "Find and Replace"))
self.label.setText(_translate("Find", "Find:"))
self.checkWholeWord.setText(_translate("Find", "Match Whole Word"))
self.label_2.setText(_translate("Find", "Replace:"))
self.checkCase.setText(_translate("Find", "Match Case"))
self.checkWrapAround.setText(_translate("Find", "Wrap Around"))
self.btnFind.setText(_translate("Find", "&Find"))
self.btnReplace.setText(_translate("Find", "&Replace"))
self.btnReplaceAll.setText(_translate("Find", "Replace All"))
self.btnCancel.setText(_translate("Find", "&Cancel"))