-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThreshold.py
77 lines (71 loc) · 3.33 KB
/
Threshold.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
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(347, 153)
self.gridLayout = QtWidgets.QGridLayout(Dialog)
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(Dialog)
font = QtGui.QFont()
font.setFamily("Century Gothic")
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.doubleSpinBox = QtWidgets.QDoubleSpinBox(Dialog)
font = QtGui.QFont()
font.setFamily("Century Gothic")
font.setPointSize(10)
self.doubleSpinBox.setFont(font)
self.doubleSpinBox.setAlignment(QtCore.Qt.AlignCenter)
self.doubleSpinBox.setDecimals(3)
self.doubleSpinBox.setMaximum(1.0)
self.doubleSpinBox.setObjectName("doubleSpinBox")
self.horizontalLayout.addWidget(self.doubleSpinBox)
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_2 = QtWidgets.QLabel(Dialog)
font = QtGui.QFont()
font.setFamily("Century Gothic")
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.horizontalLayout_2.addWidget(self.label_2)
self.doubleSpinBox_2 = QtWidgets.QDoubleSpinBox(Dialog)
font = QtGui.QFont()
font.setFamily("Century Gothic")
font.setPointSize(10)
self.doubleSpinBox_2.setFont(font)
self.doubleSpinBox_2.setAlignment(QtCore.Qt.AlignCenter)
self.doubleSpinBox_2.setDecimals(3)
self.doubleSpinBox_2.setMaximum(1.0)
self.doubleSpinBox_2.setObjectName("doubleSpinBox_2")
self.horizontalLayout_2.addWidget(self.doubleSpinBox_2)
self.gridLayout.addLayout(self.horizontalLayout_2, 1, 0, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label.setText(_translate("Dialog", "Minimum Threshold"))
self.label_2.setText(_translate("Dialog", "Maximum Threshold"))
def onOk(self):
th1 = str(self.doubleSpinBox.text())
th2 = str(self.doubleSpinBox_2.text())
# print('-------------')
return float(th1), float(th2)
############