CalibracaoP.py 18.3 KB
Newer Older
1
2
3
4
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'Resources/CalibracaoP.ui'
#
5
# Created: Tue Nov 14 12:27:19 2017
6
7
8
9
10
11
12
13
#      by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
14
        self.MainWindow=MainWindow
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
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1366, 695)
        MainWindow.setMinimumSize(QtCore.QSize(817, 0))
        MainWindow.setStyleSheet("background-color:rgb(86, 86, 86);\n"
"color: rgb(255,255,255);")
        self.centralWidget = QtWidgets.QWidget(MainWindow)
        self.centralWidget.setAutoFillBackground(False)
        self.centralWidget.setObjectName("centralWidget")
        self.CentralGraph = QtWidgets.QGraphicsView(self.centralWidget)
        self.CentralGraph.setGeometry(QtCore.QRect(420, 10, 931, 621))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.CentralGraph.sizePolicy().hasHeightForWidth())
        self.CentralGraph.setSizePolicy(sizePolicy)
        self.CentralGraph.setObjectName("CentralGraph")
        self.escalaBox = QtWidgets.QGroupBox(self.centralWidget)
        self.escalaBox.setGeometry(QtCore.QRect(20, 10, 391, 231))
        self.escalaBox.setToolTip("")
        self.escalaBox.setStatusTip("")
        self.escalaBox.setWhatsThis("")
        self.escalaBox.setAutoFillBackground(False)
        self.escalaBox.setStyleSheet("background-color: rgb(86, 86, 86);\n"
"border:1px solid rgb(194, 8, 6);\n"
"color: rgb(255, 255, 255);")
        self.escalaBox.setFlat(False)
        self.escalaBox.setCheckable(False)
        self.escalaBox.setObjectName("escalaBox")
        self.forcaBox = QtWidgets.QGroupBox(self.escalaBox)
        self.forcaBox.setGeometry(QtCore.QRect(10, 30, 181, 101))
45
        self.forcaBox.setStyleSheet("background-color:rgb(53, 53, 53)")
46
47
48
        self.forcaBox.setObjectName("forcaBox")
        self.f_max = QtWidgets.QLineEdit(self.forcaBox)
        self.f_max.setGeometry(QtCore.QRect(80, 30, 61, 21))
49
50
        self.f_max.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
51
52
53
54
55
56
57
58
59
60
61
        self.f_max.setObjectName("f_max")
        self.f_max_label = QtWidgets.QLabel(self.forcaBox)
        self.f_max_label.setGeometry(QtCore.QRect(20, 30, 57, 21))
        self.f_max_label.setStyleSheet("border: rgb(255,255,255)")
        self.f_max_label.setObjectName("f_max_label")
        self.f_min_label = QtWidgets.QLabel(self.forcaBox)
        self.f_min_label.setGeometry(QtCore.QRect(20, 60, 57, 21))
        self.f_min_label.setStyleSheet("border:rgb(255,255,255)")
        self.f_min_label.setObjectName("f_min_label")
        self.f_min = QtWidgets.QLineEdit(self.forcaBox)
        self.f_min.setGeometry(QtCore.QRect(80, 60, 61, 21))
62
63
        self.f_min.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
64
65
66
        self.f_min.setObjectName("f_min")
        self.pressaoBox = QtWidgets.QGroupBox(self.escalaBox)
        self.pressaoBox.setGeometry(QtCore.QRect(200, 30, 181, 101))
67
        self.pressaoBox.setStyleSheet("background-color:rgb(53, 53, 53)")
68
69
70
        self.pressaoBox.setObjectName("pressaoBox")
        self.p_max = QtWidgets.QLineEdit(self.pressaoBox)
        self.p_max.setGeometry(QtCore.QRect(80, 30, 61, 21))
71
72
        self.p_max.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
73
74
75
76
77
78
79
80
81
82
83
        self.p_max.setObjectName("p_max")
        self.p_max_label = QtWidgets.QLabel(self.pressaoBox)
        self.p_max_label.setGeometry(QtCore.QRect(20, 30, 57, 21))
        self.p_max_label.setStyleSheet("border: rgb(255,255,255)")
        self.p_max_label.setObjectName("p_max_label")
        self.p_min_label = QtWidgets.QLabel(self.pressaoBox)
        self.p_min_label.setGeometry(QtCore.QRect(20, 60, 57, 21))
        self.p_min_label.setStyleSheet("border: rgb(255,255,255)")
        self.p_min_label.setObjectName("p_min_label")
        self.p_min = QtWidgets.QLineEdit(self.pressaoBox)
        self.p_min.setGeometry(QtCore.QRect(80, 60, 61, 21))
84
85
        self.p_min.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
86
        self.p_min.setObjectName("p_min")
87
88
89
90
91
92
93
94
95
96
97
98
99
        self.tempoGBox = QtWidgets.QGroupBox(self.escalaBox)
        self.tempoGBox.setGeometry(QtCore.QRect(100, 140, 171, 81))
        self.tempoGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
        self.tempoGBox.setObjectName("tempoGBox")
        self.t_max = QtWidgets.QLineEdit(self.tempoGBox)
        self.t_max.setGeometry(QtCore.QRect(100, 30, 61, 21))
        self.t_max.setStyleSheet("color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
        self.t_max.setObjectName("t_max")
        self.t_max_label = QtWidgets.QLabel(self.tempoGBox)
        self.t_max_label.setGeometry(QtCore.QRect(10, 30, 81, 21))
        self.t_max_label.setStyleSheet("border: rgb(255,255,255)")
        self.t_max_label.setObjectName("t_max_label")
100
101
        self.amostragemBox = QtWidgets.QGroupBox(self.centralWidget)
        self.amostragemBox.setGeometry(QtCore.QRect(20, 250, 181, 71))
102
103
        self.amostragemBox.setStyleSheet("background-color:rgb(53, 53, 53);\n"
"border:1px solid rgb(255, 83, 0);\n"
104
105
106
107
"color: rgb(255,255,255);")
        self.amostragemBox.setObjectName("amostragemBox")
        self.amostragemCBox = QtWidgets.QComboBox(self.amostragemBox)
        self.amostragemCBox.setGeometry(QtCore.QRect(50, 30, 101, 27))
108
        self.amostragemCBox.setStyleSheet("border-color: rgb(0,0,0);\n"
109
"background-color: rgb(169, 169, 169);\n"
110
"\n"
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
"")
        self.amostragemCBox.setObjectName("amostragemCBox")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.amostragemCBox.addItem("")
        self.cronometroBox = QtWidgets.QGroupBox(self.centralWidget)
        self.cronometroBox.setGeometry(QtCore.QRect(20, 330, 381, 171))
        self.cronometroBox.setStyleSheet("border:1px solid rgb(123, 0, 129);")
        self.cronometroBox.setObjectName("cronometroBox")
126
127
        self.timerOptionButton = QtWidgets.QPushButton(self.cronometroBox)
        self.timerOptionButton.setGeometry(QtCore.QRect(140, 130, 61, 31))
128
        self.timerOptionButton.setStyleSheet("background-color:rgb(53, 53, 53)")
129
130
131
        self.timerOptionButton.setObjectName("timerOptionButton")
        self.initTimerButton = QtWidgets.QPushButton(self.cronometroBox)
        self.initTimerButton.setGeometry(QtCore.QRect(140, 30, 61, 31))
132
        self.initTimerButton.setStyleSheet("background-color:rgb(53, 53, 53)")
133
134
135
        self.initTimerButton.setObjectName("initTimerButton")
        self.cronometroGBox = QtWidgets.QGroupBox(self.cronometroBox)
        self.cronometroGBox.setGeometry(QtCore.QRect(10, 30, 120, 131))
136
        self.cronometroGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
137
138
        self.cronometroGBox.setObjectName("cronometroGBox")
        self.cronometroLabel = QtWidgets.QLabel(self.cronometroGBox)
139
        self.cronometroLabel.setGeometry(QtCore.QRect(20, 60, 81, 31))
140
141
142
        self.cronometroLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 75 12pt \"Noto Serif\";")
143
        self.cronometroLabel.setObjectName("cronometroLabel")
144
145
        self.horaInicGBox = QtWidgets.QGroupBox(self.cronometroBox)
        self.horaInicGBox.setGeometry(QtCore.QRect(220, 10, 151, 71))
146
        self.horaInicGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
147
148
149
        self.horaInicGBox.setObjectName("horaInicGBox")
        self.horaInicLabel = QtWidgets.QLabel(self.horaInicGBox)
        self.horaInicLabel.setGeometry(QtCore.QRect(30, 30, 91, 31))
150
151
152
        self.horaInicLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")
153
154
155
        self.horaInicLabel.setObjectName("horaInicLabel")
        self.horaAtualGBox = QtWidgets.QGroupBox(self.cronometroBox)
        self.horaAtualGBox.setGeometry(QtCore.QRect(220, 90, 151, 71))
156
        self.horaAtualGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
157
158
159
        self.horaAtualGBox.setObjectName("horaAtualGBox")
        self.horaAtualLabel = QtWidgets.QLabel(self.horaAtualGBox)
        self.horaAtualLabel.setGeometry(QtCore.QRect(30, 30, 91, 31))
160
161
162
        self.horaAtualLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")
163
164
165
        self.horaAtualLabel.setObjectName("horaAtualLabel")
        self.stopTimerButton = QtWidgets.QPushButton(self.cronometroBox)
        self.stopTimerButton.setGeometry(QtCore.QRect(140, 80, 61, 31))
166
        self.stopTimerButton.setStyleSheet("background-color:rgb(53, 53, 53)")
167
168
169
        self.stopTimerButton.setObjectName("stopTimerButton")
        self.prensaNameGBox = QtWidgets.QGroupBox(self.centralWidget)
        self.prensaNameGBox.setGeometry(QtCore.QRect(210, 250, 191, 71))
170
171
        self.prensaNameGBox.setStyleSheet("border: 1px solid rgb(27, 144, 0);\n"
"background-color:rgb(53, 53, 53)")
172
173
174
        self.prensaNameGBox.setObjectName("prensaNameGBox")
        self.prensaName = QtWidgets.QLineEdit(self.prensaNameGBox)
        self.prensaName.setGeometry(QtCore.QRect(50, 20, 111, 31))
175
176
177
        self.prensaName.setStyleSheet("font: 12pt \"Noto Serif\";\n"
"color:rgb(0,0,0);\n"
"background-color: rgb(158, 151, 151);")
178
179
180
181
182
183
184
        self.prensaName.setObjectName("prensaName")
        self.valAbsolGBox = QtWidgets.QGroupBox(self.centralWidget)
        self.valAbsolGBox.setGeometry(QtCore.QRect(20, 510, 381, 111))
        self.valAbsolGBox.setStyleSheet("border: 1px solid rgb(26, 149, 172)")
        self.valAbsolGBox.setObjectName("valAbsolGBox")
        self.forcaGBox = QtWidgets.QGroupBox(self.valAbsolGBox)
        self.forcaGBox.setGeometry(QtCore.QRect(20, 30, 161, 71))
185
        self.forcaGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
186
187
        self.forcaGBox.setObjectName("forcaGBox")
        self.forcaLabel = QtWidgets.QLabel(self.forcaGBox)
188
        self.forcaLabel.setGeometry(QtCore.QRect(20, 30, 121, 31))
189
190
191
        self.forcaLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")
192
        self.forcaLabel.setObjectName("forcaLabel")
193
194
        self.calibranteGBox = QtWidgets.QGroupBox(self.valAbsolGBox)
        self.calibranteGBox.setGeometry(QtCore.QRect(200, 30, 161, 71))
195
        self.calibranteGBox.setStyleSheet("background-color:rgb(53, 53, 53)")
196
197
        self.calibranteGBox.setObjectName("calibranteGBox")
        self.calibranteLabel = QtWidgets.QLabel(self.calibranteGBox)
198
        self.calibranteLabel.setGeometry(QtCore.QRect(20, 30, 131, 31))
199
200
201
        self.calibranteLabel.setStyleSheet("background-color: rgb(158, 151, 151);\n"
"color:rgb(0, 0, 0);\n"
"font: 14pt \"Noto Serif\";")
202
        self.calibranteLabel.setObjectName("calibranteLabel")
203
204
205
206
207
208
        self.arquivoSalvoLabel = QtWidgets.QLabel(self.centralWidget)
        self.arquivoSalvoLabel.setGeometry(QtCore.QRect(20, 630, 111, 16))
        self.arquivoSalvoLabel.setObjectName("arquivoSalvoLabel")
        self.arqSalvoLabel = QtWidgets.QLabel(self.centralWidget)
        self.arqSalvoLabel.setGeometry(QtCore.QRect(140, 630, 241, 16))
        self.arqSalvoLabel.setObjectName("arqSalvoLabel")
209
210
        MainWindow.setCentralWidget(self.centralWidget)
        self.menuBar = QtWidgets.QMenuBar(MainWindow)
211
        self.menuBar.setGeometry(QtCore.QRect(0, 0, 1366, 23))
212
        self.menuBar.setObjectName("menuBar")
213
214
        self.menuArquivo = QtWidgets.QMenu(self.menuBar)
        self.menuArquivo.setObjectName("menuArquivo")
215
216
        self.menuEtapa = QtWidgets.QMenu(self.menuBar)
        self.menuEtapa.setObjectName("menuEtapa")
217
218
        self.menuPorta = QtWidgets.QMenu(self.menuBar)
        self.menuPorta.setObjectName("menuPorta")
219
        MainWindow.setMenuBar(self.menuBar)
220
221
222
223
224
225
226
227
228
229
230
231
        self.menuStatusBar = QtWidgets.QStatusBar(MainWindow)
        self.menuStatusBar.setObjectName("menuStatusBar")
        MainWindow.setStatusBar(self.menuStatusBar)
        self.alternaCalibraP = QtWidgets.QAction(MainWindow)
        self.alternaCalibraP.setObjectName("alternaCalibraP")
        self.alternaCalibraT = QtWidgets.QAction(MainWindow)
        self.alternaCalibraT.setObjectName("alternaCalibraT")
        self.alternaProc = QtWidgets.QAction(MainWindow)
        self.alternaProc.setObjectName("alternaProc")
        self.botaoAbrir = QtWidgets.QAction(MainWindow)
        self.botaoAbrir.setIconVisibleInMenu(True)
        self.botaoAbrir.setObjectName("botaoAbrir")
232
233
234
235
        self.actionSalvar = QtWidgets.QAction(MainWindow)
        self.actionSalvar.setObjectName("actionSalvar")
        self.actionSalvar_Como = QtWidgets.QAction(MainWindow)
        self.actionSalvar_Como.setObjectName("actionSalvar_Como")
236
237
238
239
        self.botaoSalvar = QtWidgets.QAction(MainWindow)
        self.botaoSalvar.setObjectName("botaoSalvar")
        self.botaoSalvarComo = QtWidgets.QAction(MainWindow)
        self.botaoSalvarComo.setObjectName("botaoSalvarComo")
240
241
        self.selectPortaUSB = QtWidgets.QAction(MainWindow)
        self.selectPortaUSB.setObjectName("selectPortaUSB")
242
243
244
245
246
247
248
        self.menuArquivo.addAction(self.botaoAbrir)
        self.menuArquivo.addAction(self.botaoSalvar)
        self.menuArquivo.addAction(self.botaoSalvarComo)
        self.menuEtapa.addAction(self.alternaCalibraP)
        self.menuEtapa.addAction(self.alternaCalibraT)
        self.menuEtapa.addAction(self.alternaProc)
        self.menuBar.addAction(self.menuArquivo.menuAction())
249
        self.menuBar.addAction(self.menuEtapa.menuAction())
250
        self.menuBar.addAction(self.menuPorta.menuAction())
251
252
253
254
255
256
257
258
259

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "SADAMAP - Análise de Dados: Etapa 1 - Calibração de Pressão"))
        self.escalaBox.setTitle(_translate("MainWindow", "Escalas de Visualização (Range)"))
        self.forcaBox.setTitle(_translate("MainWindow", "Força"))
260
        self.f_max.setText(_translate("MainWindow", "100"))
261
262
263
264
265
        self.f_max_label.setText(_translate("MainWindow", "Máximo:"))
        self.f_min_label.setText(_translate("MainWindow", "Mínimo:"))
        self.pressaoBox.setTitle(_translate("MainWindow", "Tensão no Calibrante"))
        self.p_max_label.setText(_translate("MainWindow", "Máximo:"))
        self.p_min_label.setText(_translate("MainWindow", "Mínimo:"))
266
267
        self.tempoGBox.setTitle(_translate("MainWindow", "Tempo"))
        self.t_max_label.setText(_translate("MainWindow", "Intervalo (s):"))
268
269
270
271
272
273
274
275
276
277
278
        self.amostragemBox.setTitle(_translate("MainWindow", "Amostragem"))
        self.amostragemCBox.setItemText(0, _translate("MainWindow", "100 mseg"))
        self.amostragemCBox.setItemText(1, _translate("MainWindow", "200 mseg"))
        self.amostragemCBox.setItemText(2, _translate("MainWindow", "500 mseg"))
        self.amostragemCBox.setItemText(3, _translate("MainWindow", "1 seg"))
        self.amostragemCBox.setItemText(4, _translate("MainWindow", "1.5 seg"))
        self.amostragemCBox.setItemText(5, _translate("MainWindow", "2 seg"))
        self.amostragemCBox.setItemText(6, _translate("MainWindow", "2.5 seg"))
        self.amostragemCBox.setItemText(7, _translate("MainWindow", "5 seg"))
        self.amostragemCBox.setItemText(8, _translate("MainWindow", "10 seg"))
        self.cronometroBox.setTitle(_translate("MainWindow", "Timer"))
279
280
281
        self.timerOptionButton.setText(_translate("MainWindow", "Opções"))
        self.initTimerButton.setText(_translate("MainWindow", "Iniciar"))
        self.cronometroGBox.setTitle(_translate("MainWindow", "Cronômetro"))
282
        self.cronometroLabel.setText(_translate("MainWindow", "10.2674 s"))
283
284
285
286
287
288
289
290
291
        self.horaInicGBox.setTitle(_translate("MainWindow", "Horário de Início"))
        self.horaInicLabel.setText(_translate("MainWindow", "16:30:15"))
        self.horaAtualGBox.setTitle(_translate("MainWindow", "Horário Atual"))
        self.horaAtualLabel.setText(_translate("MainWindow", "17:05:56"))
        self.stopTimerButton.setText(_translate("MainWindow", "Parar"))
        self.prensaNameGBox.setTitle(_translate("MainWindow", "Prensa"))
        self.prensaName.setText(_translate("MainWindow", "Pr 400 Tonf"))
        self.valAbsolGBox.setTitle(_translate("MainWindow", "Valores Absolutos"))
        self.forcaGBox.setTitle(_translate("MainWindow", "Força"))
292
        self.forcaLabel.setText(_translate("MainWindow", "-42.679 Tonf"))
293
        self.calibranteGBox.setTitle(_translate("MainWindow", "Tensão no Calibrante"))
294
        self.calibranteLabel.setText(_translate("MainWindow", "-23.804 mV"))
295
296
297
        self.arquivoSalvoLabel.setText(_translate("MainWindow", "Arquivo Salvo em:"))
        self.arqSalvoLabel.setText(_translate("MainWindow", "/home/LAPMA/Pressao/1025565.pre"))
        self.menuArquivo.setTitle(_translate("MainWindow", "Arquivo"))
298
        self.menuEtapa.setTitle(_translate("MainWindow", "Etapa"))
299
        self.menuPorta.setTitle(_translate("MainWindow", "Porta"))
300
301
302
303
        self.alternaCalibraP.setText(_translate("MainWindow", "Calibração P"))
        self.alternaCalibraT.setText(_translate("MainWindow", "Calibração T"))
        self.alternaProc.setText(_translate("MainWindow", "Processamento"))
        self.botaoAbrir.setText(_translate("MainWindow", "Abrir"))
304
305
        self.actionSalvar.setText(_translate("MainWindow", "Salvar"))
        self.actionSalvar_Como.setText(_translate("MainWindow", "Salvar Como"))
306
307
        self.botaoSalvar.setText(_translate("MainWindow", "Salvar"))
        self.botaoSalvarComo.setText(_translate("MainWindow", "Salvar Como"))
308
        self.selectPortaUSB.setText(_translate("MainWindow", "Selecionar porta USB"))
309

310
    def sceneSelector(self, scene):
311
        self.CentralGraph.setScene(scene)
312
313
314
315
316
317
318
319
        self.CentralGraph.setBackgroundBrush(QtCore.Qt.black)

    def serialListPanel(self, seriaList):
        self.usb=[]
        for i in range(0, len(seriaList)):
            self.usb.append(QtWidgets.QAction(self.MainWindow))
            self.usb[i].setText(seriaList[i].device)
            self.menuPorta.addAction(self.usb[i])