forked from BayMRX/DatabaseWatermark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UI_InsertDetect.py
207 lines (200 loc) · 12.3 KB
/
UI_InsertDetect.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'UI_InsertDetect.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# 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(730, 444)
MainWindow.setMinimumSize(QtCore.QSize(730, 444))
MainWindow.setMaximumSize(QtCore.QSize(730, 444))
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
self.progressBar.setGeometry(QtCore.QRect(30, 390, 681, 23))
self.progressBar.setProperty("value", 0)
self.progressBar.setObjectName("progressBar")
self.widget = QtWidgets.QWidget(self.centralwidget)
self.widget.setGeometry(QtCore.QRect(20, 10, 691, 371))
self.widget.setObjectName("widget")
self.groupBox = QtWidgets.QGroupBox(self.widget)
self.groupBox.setGeometry(QtCore.QRect(10, 10, 671, 71))
self.groupBox.setFlat(False)
self.groupBox.setCheckable(False)
self.groupBox.setChecked(False)
self.groupBox.setObjectName("groupBox")
self.tb_comboBox = QtWidgets.QComboBox(self.groupBox)
self.tb_comboBox.setGeometry(QtCore.QRect(350, 30, 111, 22))
self.tb_comboBox.setObjectName("tb_comboBox")
self.tb_comboBox.addItem("")
self.login_pushButton = QtWidgets.QPushButton(self.groupBox)
self.login_pushButton.setGeometry(QtCore.QRect(10, 30, 71, 23))
self.login_pushButton.setObjectName("login_pushButton")
self.db_comboBox = QtWidgets.QComboBox(self.groupBox)
self.db_comboBox.setGeometry(QtCore.QRect(160, 30, 105, 20))
self.db_comboBox.setInsertPolicy(QtWidgets.QComboBox.InsertAtBottom)
self.db_comboBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContentsOnFirstShow)
self.db_comboBox.setObjectName("db_comboBox")
self.db_comboBox.addItem("")
self.label = QtWidgets.QLabel(self.groupBox)
self.label.setGeometry(QtCore.QRect(110, 32, 51, 16))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.groupBox)
self.label_2.setGeometry(QtCore.QRect(300, 33, 51, 16))
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(self.groupBox)
self.label_3.setGeometry(QtCore.QRect(490, 33, 31, 16))
self.label_3.setObjectName("label_3")
self.key_lineEdit = QtWidgets.QLineEdit(self.groupBox)
self.key_lineEdit.setGeometry(QtCore.QRect(530, 31, 81, 21))
self.key_lineEdit.setReadOnly(True)
self.key_lineEdit.setObjectName("key_lineEdit")
self.key_pushButton = QtWidgets.QPushButton(self.groupBox)
self.key_pushButton.setGeometry(QtCore.QRect(620, 30, 41, 23))
self.key_pushButton.setObjectName("key_pushButton")
self.groupBox_2 = QtWidgets.QGroupBox(self.widget)
self.groupBox_2.setGeometry(QtCore.QRect(10, 90, 361, 271))
self.groupBox_2.setObjectName("groupBox_2")
self.label_6 = QtWidgets.QLabel(self.groupBox_2)
self.label_6.setGeometry(QtCore.QRect(20, 26, 101, 16))
self.label_6.setObjectName("label_6")
self.scale_lineEdit = QtWidgets.QLineEdit(self.groupBox_2)
self.scale_lineEdit.setGeometry(QtCore.QRect(121, 24, 51, 20))
self.scale_lineEdit.setObjectName("scale_lineEdit")
self.label_8 = QtWidgets.QLabel(self.groupBox_2)
self.label_8.setGeometry(QtCore.QRect(200, 26, 81, 16))
self.label_8.setObjectName("label_8")
self.lsb_lineEdit = QtWidgets.QSpinBox(self.groupBox_2)
self.lsb_lineEdit.setGeometry(QtCore.QRect(282, 23, 61, 22))
self.lsb_lineEdit.setMaximum(64)
self.lsb_lineEdit.setProperty("value", 1)
self.lsb_lineEdit.setObjectName("lsb_lineEdit")
self.right_listWidget = QtWidgets.QListWidget(self.groupBox_2)
self.right_listWidget.setGeometry(QtCore.QRect(220, 80, 121, 181))
self.right_listWidget.setDragEnabled(True)
self.right_listWidget.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop)
self.right_listWidget.setDefaultDropAction(QtCore.Qt.MoveAction)
self.right_listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.right_listWidget.setSelectionRectVisible(True)
self.right_listWidget.setObjectName("right_listWidget")
self.left_listWidget = QtWidgets.QListWidget(self.groupBox_2)
self.left_listWidget.setGeometry(QtCore.QRect(20, 80, 121, 181))
self.left_listWidget.setDragEnabled(True)
self.left_listWidget.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop)
self.left_listWidget.setDefaultDropAction(QtCore.Qt.MoveAction)
self.left_listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.left_listWidget.setSelectionRectVisible(True)
self.left_listWidget.setObjectName("left_listWidget")
self.addAttr_pushButton = QtWidgets.QPushButton(self.groupBox_2)
self.addAttr_pushButton.setGeometry(QtCore.QRect(156, 110, 51, 41))
self.addAttr_pushButton.setObjectName("addAttr_pushButton")
self.delAddr_pushButton = QtWidgets.QPushButton(self.groupBox_2)
self.delAddr_pushButton.setGeometry(QtCore.QRect(157, 190, 51, 41))
self.delAddr_pushButton.setObjectName("delAddr_pushButton")
self.label_10 = QtWidgets.QLabel(self.groupBox_2)
self.label_10.setGeometry(QtCore.QRect(20, 60, 91, 16))
self.label_10.setObjectName("label_10")
self.label_9 = QtWidgets.QLabel(self.groupBox_2)
self.label_9.setGeometry(QtCore.QRect(220, 60, 111, 16))
self.label_9.setObjectName("label_9")
self.groupBox_3 = QtWidgets.QGroupBox(self.widget)
self.groupBox_3.setGeometry(QtCore.QRect(530, 90, 151, 71))
self.groupBox_3.setObjectName("groupBox_3")
self.add_pushButton = QtWidgets.QPushButton(self.groupBox_3)
self.add_pushButton.setGeometry(QtCore.QRect(40, 30, 75, 23))
self.add_pushButton.setObjectName("add_pushButton")
self.groupBox_4 = QtWidgets.QGroupBox(self.widget)
self.groupBox_4.setGeometry(QtCore.QRect(380, 190, 301, 71))
self.groupBox_4.setObjectName("groupBox_4")
self.label_4 = QtWidgets.QLabel(self.groupBox_4)
self.label_4.setGeometry(QtCore.QRect(40, 30, 31, 16))
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(self.groupBox_4)
self.label_5.setGeometry(QtCore.QRect(150, 30, 16, 16))
self.label_5.setTextFormat(QtCore.Qt.AutoText)
self.label_5.setObjectName("label_5")
self.detect_pushButton = QtWidgets.QPushButton(self.groupBox_4)
self.detect_pushButton.setGeometry(QtCore.QRect(190, 30, 75, 23))
self.detect_pushButton.setObjectName("detect_pushButton")
self.threshold_lineEdit = QtWidgets.QDoubleSpinBox(self.groupBox_4)
self.threshold_lineEdit.setGeometry(QtCore.QRect(80, 30, 61, 22))
self.threshold_lineEdit.setDecimals(2)
self.threshold_lineEdit.setMaximum(100.0)
self.threshold_lineEdit.setSingleStep(0.1)
self.threshold_lineEdit.setProperty("value", 50.0)
self.threshold_lineEdit.setObjectName("threshold_lineEdit")
self.groupBox_5 = QtWidgets.QGroupBox(self.widget)
self.groupBox_5.setGeometry(QtCore.QRect(380, 290, 301, 71))
self.groupBox_5.setObjectName("groupBox_5")
self.backup_pushButton = QtWidgets.QPushButton(self.groupBox_5)
self.backup_pushButton.setGeometry(QtCore.QRect(50, 30, 75, 23))
self.backup_pushButton.setObjectName("backup_pushButton")
self.recover_pushButton = QtWidgets.QPushButton(self.groupBox_5)
self.recover_pushButton.setGeometry(QtCore.QRect(190, 30, 75, 23))
self.recover_pushButton.setObjectName("recover_pushButton")
self.groupBox_6 = QtWidgets.QGroupBox(self.widget)
self.groupBox_6.setGeometry(QtCore.QRect(380, 90, 141, 71))
self.groupBox_6.setObjectName("groupBox_6")
self.log_checkBox = QtWidgets.QCheckBox(self.groupBox_6)
self.log_checkBox.setGeometry(QtCore.QRect(34, 30, 71, 21))
self.log_checkBox.setChecked(True)
self.log_checkBox.setObjectName("log_checkBox")
self.widget.raise_()
self.progressBar.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.login_pushButton, self.db_comboBox)
MainWindow.setTabOrder(self.db_comboBox, self.tb_comboBox)
MainWindow.setTabOrder(self.tb_comboBox, self.key_lineEdit)
MainWindow.setTabOrder(self.key_lineEdit, self.key_pushButton)
MainWindow.setTabOrder(self.key_pushButton, self.scale_lineEdit)
MainWindow.setTabOrder(self.scale_lineEdit, self.lsb_lineEdit)
MainWindow.setTabOrder(self.lsb_lineEdit, self.left_listWidget)
MainWindow.setTabOrder(self.left_listWidget, self.right_listWidget)
MainWindow.setTabOrder(self.right_listWidget, self.addAttr_pushButton)
MainWindow.setTabOrder(self.addAttr_pushButton, self.delAddr_pushButton)
MainWindow.setTabOrder(self.delAddr_pushButton, self.add_pushButton)
MainWindow.setTabOrder(self.add_pushButton, self.threshold_lineEdit)
MainWindow.setTabOrder(self.threshold_lineEdit, self.detect_pushButton)
MainWindow.setTabOrder(self.detect_pushButton, self.backup_pushButton)
MainWindow.setTabOrder(self.backup_pushButton, self.recover_pushButton)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "水印添加与检测"))
self.groupBox.setTitle(_translate("MainWindow", "选择与连接"))
self.tb_comboBox.setItemText(0, _translate("MainWindow", "请先选择数据库"))
self.login_pushButton.setToolTip(_translate("MainWindow", "点击登陆MySQL"))
self.login_pushButton.setText(_translate("MainWindow", "登录MySQL"))
self.db_comboBox.setItemText(0, _translate("MainWindow", "请先连接MySQL"))
self.label.setText(_translate("MainWindow", "数据库:"))
self.label_2.setText(_translate("MainWindow", "数据表:"))
self.label_3.setText(_translate("MainWindow", "密钥:"))
self.key_pushButton.setText(_translate("MainWindow", "…"))
self.groupBox_2.setTitle(_translate("MainWindow", "参数设置"))
self.label_6.setText(_translate("MainWindow", "水印比例系数:1/"))
self.label_8.setText(_translate("MainWindow", "不重要比特数:"))
self.addAttr_pushButton.setText(_translate("MainWindow", "添加\n"
"<<<"))
self.delAddr_pushButton.setText(_translate("MainWindow", "移除\n"
">>>"))
self.label_10.setText(_translate("MainWindow", "添加水印的属性"))
self.label_9.setText(_translate("MainWindow", "不添加水印的属性"))
self.groupBox_3.setTitle(_translate("MainWindow", "水印添加"))
self.add_pushButton.setText(_translate("MainWindow", "添加"))
self.groupBox_4.setTitle(_translate("MainWindow", "水印检测"))
self.label_4.setText(_translate("MainWindow", "阈值:"))
self.label_5.setText(_translate("MainWindow",
"<html><head/><body><p><span style=\" font-size:12pt;\">%</span></p></body></html>"))
self.detect_pushButton.setText(_translate("MainWindow", "检测"))
self.groupBox_5.setTitle(_translate("MainWindow", "备份与恢复"))
self.backup_pushButton.setText(_translate("MainWindow", "备份"))
self.recover_pushButton.setText(_translate("MainWindow", "恢复"))
self.groupBox_6.setTitle(_translate("MainWindow", "日志"))
self.log_checkBox.setText(_translate("MainWindow", "日志记录"))