-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsigma_in.py
63 lines (55 loc) · 2.54 KB
/
sigma_in.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
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(237, 118)
self.gridLayout_2 = QtWidgets.QGridLayout(Dialog)
self.gridLayout_2.setObjectName("gridLayout_2")
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
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, 1, 0, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(Dialog)
font = QtGui.QFont()
font.setFamily("Century Gothic")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.doubleSpinBox = QtWidgets.QDoubleSpinBox(Dialog)
font = QtGui.QFont()
font.setFamily("Century Gothic")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.doubleSpinBox.setFont(font)
self.doubleSpinBox.setDecimals(3)
self.doubleSpinBox.setMinimum(0.0)
self.doubleSpinBox.setMaximum(100.0)
self.doubleSpinBox.setObjectName("doubleSpinBox")
self.horizontalLayout.addWidget(self.doubleSpinBox)
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout, 0, 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", "Sigma Value"))
self.label.setText(_translate("Dialog", "Sigma"))
############ Added
def onOk(self):
sigma = str(self.doubleSpinBox.text())
# print('-------------')
return float(sigma)
############