-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyqtGUI_nagrev.py
179 lines (174 loc) · 9.11 KB
/
pyqtGUI_nagrev.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
# -*- coding: utf-8 -*-
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(910, 550)
MainWindow.setMinimumSize(QtCore.QSize(910, 550))
MainWindow.setMaximumSize(QtCore.QSize(910, 550))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(10)
MainWindow.setFont(font)
MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.Russian, QtCore.QLocale.Russia))
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setMinimumSize(QtCore.QSize(460, 330))
self.centralwidget.setSizeIncrement(QtCore.QSize(0, 0))
self.centralwidget.setObjectName("centralwidget")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(0, 0, 10000, 10000))
self.tabWidget.setMinimumSize(QtCore.QSize(460, 360))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(12)
self.tabWidget.setFont(font)
self.tabWidget.setToolTip("")
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setLocale(QtCore.QLocale(QtCore.QLocale.Russian, QtCore.QLocale.Russia))
self.tab.setObjectName("tab")
self.pushButton = QtWidgets.QPushButton(self.tab)
self.pushButton.setGeometry(QtCore.QRect(320, 430, 221, 81))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(16)
self.pushButton.setFont(font)
self.pushButton.setObjectName("pushButton")
self.label_8 = QtWidgets.QLabel(self.tab)
self.label_8.setGeometry(QtCore.QRect(360, 270, 141, 21))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(16)
self.label_8.setFont(font)
self.label_8.setObjectName("label_8")
self.label_4 = QtWidgets.QLabel(self.tab)
self.label_4.setGeometry(QtCore.QRect(360, 60, 211, 21))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(16)
self.label_4.setFont(font)
self.label_4.setObjectName("label_4")
self.label_6 = QtWidgets.QLabel(self.tab)
self.label_6.setGeometry(QtCore.QRect(360, 130, 201, 21))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(16)
self.label_6.setFont(font)
self.label_6.setObjectName("label_6")
self.label_10 = QtWidgets.QLabel(self.tab)
self.label_10.setGeometry(QtCore.QRect(0, 0, 901, 51))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(26)
self.label_10.setFont(font)
self.label_10.setTextFormat(QtCore.Qt.PlainText)
self.label_10.setAlignment(QtCore.Qt.AlignCenter)
self.label_10.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse)
self.label_10.setObjectName("label_10")
self.label_5 = QtWidgets.QLabel(self.tab)
self.label_5.setGeometry(QtCore.QRect(360, 200, 221, 21))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(16)
self.label_5.setFont(font)
self.label_5.setObjectName("label_5")
self.lineEdit = QtWidgets.QLineEdit(self.tab)
self.lineEdit.setGeometry(QtCore.QRect(370, 90, 111, 31))
self.lineEdit.setClearButtonEnabled(False)
self.lineEdit.setObjectName("lineEdit")
self.lineEdit_2 = QtWidgets.QLineEdit(self.tab)
self.lineEdit_2.setGeometry(QtCore.QRect(370, 160, 111, 31))
self.lineEdit_2.setClearButtonEnabled(False)
self.lineEdit_2.setObjectName("lineEdit_2")
self.lineEdit_4 = QtWidgets.QLineEdit(self.tab)
self.lineEdit_4.setGeometry(QtCore.QRect(370, 230, 111, 31))
self.lineEdit_4.setPlaceholderText("")
self.lineEdit_4.setClearButtonEnabled(False)
self.lineEdit_4.setObjectName("lineEdit_4")
self.lineEdit_5 = QtWidgets.QLineEdit(self.tab)
self.lineEdit_5.setGeometry(QtCore.QRect(370, 300, 111, 31))
self.lineEdit_5.setPlaceholderText("")
self.lineEdit_5.setClearButtonEnabled(False)
self.lineEdit_5.setObjectName("lineEdit_5")
self.lineEdit_6 = QtWidgets.QLineEdit(self.tab)
self.lineEdit_6.setGeometry(QtCore.QRect(370, 370, 111, 31))
self.lineEdit_6.setPlaceholderText("")
self.lineEdit_6.setClearButtonEnabled(False)
self.lineEdit_6.setObjectName("lineEdit_6")
self.label_9 = QtWidgets.QLabel(self.tab)
self.label_9.setGeometry(QtCore.QRect(360, 340, 261, 21))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(16)
self.label_9.setFont(font)
self.label_9.setObjectName("label_9")
self.label_12 = QtWidgets.QLabel(self.tab)
self.label_12.setGeometry(QtCore.QRect(490, 370, 261, 31))
font = QtGui.QFont()
font.setFamily("Calibri")
font.setPixelSize(10)
self.label_12.setFont(font)
self.label_12.setScaledContents(False)
self.label_12.setObjectName("label_12")
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.verticalLayoutWidget = QtWidgets.QWidget(self.tab_2)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(20, 20, 591, 481))
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.widget = MplWidget(self.verticalLayoutWidget)
self.widget.setObjectName("widget")
self.verticalLayout.addWidget(self.widget)
self.label_11 = QtWidgets.QLabel(self.tab_2)
self.label_11.setGeometry(QtCore.QRect(10, 10, 631, 71))
self.label_11.setLocale(QtCore.QLocale(QtCore.QLocale.Russian, QtCore.QLocale.Russia))
self.label_11.setText("")
self.label_11.setWordWrap(True)
self.label_11.setObjectName("label_11")
self.tableWidget = QtWidgets.QTableWidget(self.tab_2)
self.tableWidget.setGeometry(QtCore.QRect(610, 20, 281, 481))
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setColumnCount(1)
self.tableWidget.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(0, item)
self.pushButton_2 = QtWidgets.QPushButton(self.tab_2)
self.pushButton_2.setGeometry(QtCore.QRect(510, 20, 91, 31))
self.pushButton_2.setObjectName("pushButton_2")
self.tabWidget.addTab(self.tab_2, "")
MainWindow.setCentralWidget(self.centralwidget)
self.lineEdit.setValidator(QtGui.QIntValidator(1, 999))
self.lineEdit_2.setValidator(QtGui.QIntValidator(1, 1300))
self.lineEdit_4.setValidator(QtGui.QIntValidator(1, 99))
self.lineEdit_5.setValidator(QtGui.QIntValidator(1, 9999))
self.lineEdit_6.setValidator(QtGui.QIntValidator(1, 9999))
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Нагрев сляба"))
self.pushButton.setText(_translate("MainWindow", "Расчет"))
self.label_8.setText(_translate("MainWindow", "Время, сек"))
self.label_4.setText(_translate("MainWindow", "Толщина пластины, мм"))
self.label_6.setText(_translate("MainWindow", "Нач. темп-ра, °С"))
self.label_10.setText(_translate("MainWindow", "Калькулятор нагрева стальной пластины"))
self.label_5.setText(_translate("MainWindow", "Количество слоев"))
self.lineEdit.setText(_translate("MainWindow", "50"))
self.lineEdit.setPlaceholderText(_translate("MainWindow", "232"))
self.lineEdit_2.setText(_translate("MainWindow", "25"))
self.lineEdit_2.setPlaceholderText(_translate("MainWindow", "25"))
self.lineEdit_4.setText(_translate("MainWindow", "10"))
self.lineEdit_5.setText(_translate("MainWindow", "10"))
self.lineEdit_6.setText(_translate("MainWindow", "150"))
self.label_9.setText(_translate("MainWindow", "Коэф. теплоотдачи"))
self.label_12.setText(_translate("MainWindow", "Не менять, если не уверен в значении"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Исходные данные"))
item = self.tableWidget.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Координата"))
self.pushButton_2.setText(_translate("MainWindow", "Export Data"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Результаты расчета"))
from mplwidget import MplWidget