-
Notifications
You must be signed in to change notification settings - Fork 1
/
gui.py
134 lines (125 loc) · 6.04 KB
/
gui.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1468, 936)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.LoadData = QtWidgets.QPushButton(self.centralwidget)
self.LoadData.setGeometry(QtCore.QRect(430, 850, 191, 31))
self.LoadData.setObjectName("LoadData")
self.UpdatePlot = QtWidgets.QPushButton(self.centralwidget)
self.UpdatePlot.setGeometry(QtCore.QRect(850, 850, 181, 31))
self.UpdatePlot.setObjectName("UpdatePlot")
self.ecg_before = PlotWidget(self.centralwidget)
self.ecg_before.setGeometry(QtCore.QRect(60, 60, 1081, 341))
self.ecg_before.setObjectName("ecg_before")
self.ecg_after = PlotWidget(self.centralwidget)
self.ecg_after.setGeometry(QtCore.QRect(60, 410, 1081, 431))
self.ecg_after.setObjectName("ecg_after")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(620, 10, 211, 31))
font = QtGui.QFont()
font.setPointSize(14)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setObjectName("label")
self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox.setGeometry(QtCore.QRect(1160, 270, 231, 131))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.groupBox.setFont(font)
self.groupBox.setObjectName("groupBox")
self.F_ech = QtWidgets.QDoubleSpinBox(self.groupBox)
self.F_ech.setGeometry(QtCore.QRect(120, 40, 81, 22))
self.F_ech.setMaximum(1e+56)
self.F_ech.setProperty("value", 256.0)
self.F_ech.setObjectName("F_ech")
self.qrs_width = QtWidgets.QSpinBox(self.groupBox)
self.qrs_width.setGeometry(QtCore.QRect(90, 80, 81, 22))
self.qrs_width.setMaximum(999999999)
self.qrs_width.setProperty("value", 24)
self.qrs_width.setObjectName("qrs_width")
self.label_2 = QtWidgets.QLabel(self.groupBox)
self.label_2.setGeometry(QtCore.QRect(210, 40, 21, 21))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(self.groupBox)
self.label_3.setGeometry(QtCore.QRect(10, 40, 101, 21))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(self.groupBox)
self.label_4.setGeometry(QtCore.QRect(10, 80, 71, 21))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_4.setFont(font)
self.label_4.setObjectName("label_4")
self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_2.setGeometry(QtCore.QRect(1160, 420, 261, 101))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.groupBox_2.setFont(font)
self.groupBox_2.setObjectName("groupBox_2")
self.result = QtWidgets.QLabel(self.groupBox_2)
self.result.setGeometry(QtCore.QRect(20, 70, 311, 16))
self.result.setObjectName("result")
self.label_5 = QtWidgets.QLabel(self.groupBox_2)
self.label_5.setGeometry(QtCore.QRect(20, 30, 141, 16))
self.label_5.setObjectName("label_5")
self.heartrate = QtWidgets.QLabel(self.groupBox_2)
self.heartrate.setGeometry(QtCore.QRect(170, 30, 31, 16))
self.heartrate.setObjectName("heartrate")
self.label_7 = QtWidgets.QLabel(self.groupBox_2)
self.label_7.setGeometry(QtCore.QRect(200, 30, 55, 16))
self.label_7.setObjectName("label_7")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1468, 26))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.LoadData.setText(_translate("MainWindow", "Loading ECG"))
self.UpdatePlot.setText(_translate("MainWindow", "Detection"))
self.label.setText(_translate("MainWindow", "QRS Detector"))
self.groupBox.setTitle(_translate("MainWindow", "Parameters"))
self.label_2.setText(_translate("MainWindow", "Hz"))
self.label_3.setText(_translate("MainWindow", "Sampling"))
self.label_4.setText(_translate("MainWindow", "QRS Zone"))
self.groupBox_2.setTitle(_translate("MainWindow", "Diagnostis"))
self.result.setText(_translate("MainWindow", "Heart condition : N/A"))
self.label_5.setText(_translate("MainWindow", "Heart rate:"))
self.heartrate.setText(_translate("MainWindow", "0"))
self.label_7.setText(_translate("MainWindow", "bpm"))
from pyqtgraph import PlotWidget
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())