# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '.\serial.ui'
#
# Created by: PyQt5 UI code generator 5.13.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):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1094, 650)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout()
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.verticalLayout_6.addLayout(self.horizontalLayout_5)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout()
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setContentsMargins(5, 5, 5, 5)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.pushButtonRecord = QtWidgets.QPushButton(self.centralwidget)
        self.pushButtonRecord.setEnabled(False)
        self.pushButtonRecord.setMaximumSize(QtCore.QSize(1000, 16777215))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("download.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonRecord.setIcon(icon)
        self.pushButtonRecord.setObjectName("pushButtonRecord")
        self.verticalLayout_3.addWidget(self.pushButtonRecord)
        self.checkBoxECG = QtWidgets.QCheckBox(self.centralwidget)
        self.checkBoxECG.setObjectName("checkBoxECG")
        self.verticalLayout_3.addWidget(self.checkBoxECG)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.verticalLayout_3.addItem(spacerItem)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.verticalLayout_3.addItem(spacerItem1)
        self.pushButtonAnalyze = QtWidgets.QPushButton(self.centralwidget)
        self.pushButtonAnalyze.setObjectName("pushButtonAnalyze")
        self.verticalLayout_3.addWidget(self.pushButtonAnalyze)
        self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout_3.addWidget(self.textBrowser)
        self.labelSampRate = QtWidgets.QLabel(self.centralwidget)
        self.labelSampRate.setObjectName("labelSampRate")
        self.verticalLayout_3.addWidget(self.labelSampRate)
        self.labelHR = QtWidgets.QLabel(self.centralwidget)
        self.labelHR.setMaximumSize(QtCore.QSize(80, 16777215))
        self.labelHR.setObjectName("labelHR")
        self.verticalLayout_3.addWidget(self.labelHR)
        self.horizontalLayout_3.addLayout(self.verticalLayout_3)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.widget = PlotWidget(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.widget.sizePolicy().hasHeightForWidth())
        self.widget.setSizePolicy(sizePolicy)
        self.widget.setObjectName("widget")
        self.horizontalLayout_2.addWidget(self.widget)
        self.verticalSliderTrsh = QtWidgets.QSlider(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.verticalSliderTrsh.sizePolicy().hasHeightForWidth())
        self.verticalSliderTrsh.setSizePolicy(sizePolicy)
        self.verticalSliderTrsh.setMaximumSize(QtCore.QSize(20, 16777215))
        self.verticalSliderTrsh.setMaximum(700)
        self.verticalSliderTrsh.setProperty("value", 700)
        self.verticalSliderTrsh.setOrientation(QtCore.Qt.Vertical)
        self.verticalSliderTrsh.setObjectName("verticalSliderTrsh")
        self.horizontalLayout_2.addWidget(self.verticalSliderTrsh)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalSliderZoom = QtWidgets.QSlider(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.horizontalSliderZoom.sizePolicy().hasHeightForWidth())
        self.horizontalSliderZoom.setSizePolicy(sizePolicy)
        self.horizontalSliderZoom.setMaximumSize(QtCore.QSize(16777215, 20))
        self.horizontalSliderZoom.setMinimum(-1000)
        self.horizontalSliderZoom.setMaximum(-50)
        self.horizontalSliderZoom.setProperty("value", -500)
        self.horizontalSliderZoom.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSliderZoom.setObjectName("horizontalSliderZoom")
        self.verticalLayout.addWidget(self.horizontalSliderZoom)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.label_4 = QtWidgets.QLabel(self.centralwidget)
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_6.addWidget(self.label_4)
        self.radioButtonMP = QtWidgets.QRadioButton(self.centralwidget)
        self.radioButtonMP.setChecked(True)
        self.radioButtonMP.setObjectName("radioButtonMP")
        self.horizontalLayout_6.addWidget(self.radioButtonMP)
        self.radioButtonFP = QtWidgets.QRadioButton(self.centralwidget)
        self.radioButtonFP.setChecked(False)
        self.radioButtonFP.setObjectName("radioButtonFP")
        self.horizontalLayout_6.addWidget(self.radioButtonFP)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem2)
        self.checkBoxAutoTrsh = QtWidgets.QCheckBox(self.centralwidget)
        self.checkBoxAutoTrsh.setObjectName("checkBoxAutoTrsh")
        self.horizontalLayout_6.addWidget(self.checkBoxAutoTrsh)
        self.verticalLayout.addLayout(self.horizontalLayout_6)
        self.verticalLayout_5 = QtWidgets.QVBoxLayout()
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.widgetRRplot = PlotWidget(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.widgetRRplot.sizePolicy().hasHeightForWidth())
        self.widgetRRplot.setSizePolicy(sizePolicy)
        self.widgetRRplot.setObjectName("widgetRRplot")
        self.verticalLayout_5.addWidget(self.widgetRRplot)
        self.horizontalSliderRRZoom = QtWidgets.QSlider(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.horizontalSliderRRZoom.sizePolicy().hasHeightForWidth())
        self.horizontalSliderRRZoom.setSizePolicy(sizePolicy)
        self.horizontalSliderRRZoom.setMaximumSize(QtCore.QSize(16777215, 20))
        self.horizontalSliderRRZoom.setMinimum(-1000)
        self.horizontalSliderRRZoom.setMaximum(-50)
        self.horizontalSliderRRZoom.setProperty("value", -500)
        self.horizontalSliderRRZoom.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSliderRRZoom.setObjectName("horizontalSliderRRZoom")
        self.verticalLayout_5.addWidget(self.horizontalSliderRRZoom)
        self.verticalLayout.addLayout(self.verticalLayout_5)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        self.verticalLayout_2.setStretch(0, 20)
        self.horizontalLayout_3.addLayout(self.verticalLayout_2)
        self.horizontalLayout_3.setStretch(0, 3)
        self.horizontalLayout_3.setStretch(1, 15)
        self.verticalLayout_4.addLayout(self.horizontalLayout_3)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.comboBoxPorts = QtWidgets.QComboBox(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.comboBoxPorts.sizePolicy().hasHeightForWidth())
        self.comboBoxPorts.setSizePolicy(sizePolicy)
        self.comboBoxPorts.setMaximumSize(QtCore.QSize(16777215, 30))
        self.comboBoxPorts.setObjectName("comboBoxPorts")
        self.horizontalLayout.addWidget(self.comboBoxPorts)
        self.label = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setMaximumSize(QtCore.QSize(16777215, 40))
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.pushButtonRefeshPorts = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonRefeshPorts.sizePolicy().hasHeightForWidth())
        self.pushButtonRefeshPorts.setSizePolicy(sizePolicy)
        self.pushButtonRefeshPorts.setMaximumSize(QtCore.QSize(16777215, 30))
        self.pushButtonRefeshPorts.setObjectName("pushButtonRefeshPorts")
        self.horizontalLayout.addWidget(self.pushButtonRefeshPorts)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.horizontalLayout.addItem(spacerItem3)
        self.line_3 = QtWidgets.QFrame(self.centralwidget)
        self.line_3.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.horizontalLayout.addWidget(self.line_3)
        self.pushButtonStartM = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonStartM.sizePolicy().hasHeightForWidth())
        self.pushButtonStartM.setSizePolicy(sizePolicy)
        self.pushButtonStartM.setMaximumSize(QtCore.QSize(16777215, 40))
        self.pushButtonStartM.setObjectName("pushButtonStartM")
        self.horizontalLayout.addWidget(self.pushButtonStartM)
        self.pushButtonStopM = QtWidgets.QPushButton(self.centralwidget)
        self.pushButtonStopM.setEnabled(False)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonStopM.sizePolicy().hasHeightForWidth())
        self.pushButtonStopM.setSizePolicy(sizePolicy)
        self.pushButtonStopM.setMaximumSize(QtCore.QSize(16777215, 40))
        self.pushButtonStopM.setObjectName("pushButtonStopM")
        self.horizontalLayout.addWidget(self.pushButtonStopM)
        self.pushButtonClear = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonClear.sizePolicy().hasHeightForWidth())
        self.pushButtonClear.setSizePolicy(sizePolicy)
        self.pushButtonClear.setMaximumSize(QtCore.QSize(16777215, 40))
        self.pushButtonClear.setObjectName("pushButtonClear")
        self.horizontalLayout.addWidget(self.pushButtonClear)
        self.pushButtonGraph = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonGraph.sizePolicy().hasHeightForWidth())
        self.pushButtonGraph.setSizePolicy(sizePolicy)
        self.pushButtonGraph.setMaximumSize(QtCore.QSize(16777215, 40))
        self.pushButtonGraph.setObjectName("pushButtonGraph")
        self.horizontalLayout.addWidget(self.pushButtonGraph)
        self.line = QtWidgets.QFrame(self.centralwidget)
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout.addWidget(self.line)
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMaximumSize(QtCore.QSize(40, 20))
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        self.spinBoxFps = QtWidgets.QSpinBox(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.spinBoxFps.sizePolicy().hasHeightForWidth())
        self.spinBoxFps.setSizePolicy(sizePolicy)
        self.spinBoxFps.setMaximumSize(QtCore.QSize(40, 30))
        self.spinBoxFps.setMinimum(1)
        self.spinBoxFps.setMaximum(30)
        self.spinBoxFps.setProperty("value", 20)
        self.spinBoxFps.setObjectName("spinBoxFps")
        self.horizontalLayout.addWidget(self.spinBoxFps)
        self.line_2 = QtWidgets.QFrame(self.centralwidget)
        self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.horizontalLayout.addWidget(self.line_2)
        self.horizontalLayout.setStretch(0, 2)
        self.horizontalLayout.setStretch(1, 1)
        self.horizontalLayout.setStretch(2, 1)
        self.horizontalLayout.setStretch(3, 1)
        self.horizontalLayout.setStretch(5, 1)
        self.horizontalLayout.setStretch(6, 1)
        self.horizontalLayout.setStretch(7, 1)
        self.horizontalLayout.setStretch(8, 1)
        self.horizontalLayout.setStretch(10, 1)
        self.horizontalLayout.setStretch(11, 1)
        self.verticalLayout_4.addLayout(self.horizontalLayout)
        self.verticalLayout_4.setStretch(0, 15)
        self.verticalLayout_4.setStretch(1, 1)
        self.horizontalLayout_4.addLayout(self.verticalLayout_4)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.gridLayout.setColumnStretch(0, 1)
        self.horizontalLayout_4.addLayout(self.gridLayout)
        self.horizontalLayout_4.setStretch(0, 15)
        self.verticalLayout_6.addLayout(self.horizontalLayout_4)
        self.gridLayout_2.addLayout(self.verticalLayout_6, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1094, 26))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionSave_ECG_data = QtWidgets.QAction(MainWindow)
        self.actionSave_ECG_data.setObjectName("actionSave_ECG_data")
        self.actionSave_RR_data = QtWidgets.QAction(MainWindow)
        self.actionSave_RR_data.setObjectName("actionSave_RR_data")
        self.actionGenerate_HRV_report = QtWidgets.QAction(MainWindow)
        self.actionGenerate_HRV_report.setObjectName("actionGenerate_HRV_report")
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.pushButtonStopM, self.pushButtonClear)
        MainWindow.setTabOrder(self.pushButtonClear, self.pushButtonRefeshPorts)
        MainWindow.setTabOrder(self.pushButtonRefeshPorts, self.spinBoxFps)
        MainWindow.setTabOrder(self.spinBoxFps, self.pushButtonStartM)
        MainWindow.setTabOrder(self.pushButtonStartM, self.pushButtonGraph)
        MainWindow.setTabOrder(self.pushButtonGraph, self.comboBoxPorts)
        MainWindow.setTabOrder(self.comboBoxPorts, self.verticalSliderTrsh)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.pushButtonRecord.setText(_translate("MainWindow", "Record"))
        self.checkBoxECG.setText(_translate("MainWindow", "Add ECG data"))
        self.pushButtonAnalyze.setText(_translate("MainWindow", "Analyze"))
        self.labelSampRate.setText(_translate("MainWindow", "Sample Rate : "))
        self.labelHR.setText(_translate("MainWindow", "Heart Rate :  "))
        self.label_4.setText(_translate("MainWindow", "R detection method"))
        self.radioButtonMP.setText(_translate("MainWindow", "Max Pick"))
        self.radioButtonFP.setText(_translate("MainWindow", "First Pick"))
        self.checkBoxAutoTrsh.setText(_translate("MainWindow", "Autotreshold"))
        self.label.setText(_translate("MainWindow", "Select Com Port"))
        self.pushButtonRefeshPorts.setText(_translate("MainWindow", "Refresh"))
        self.pushButtonStartM.setText(_translate("MainWindow", "Start Monitor"))
        self.pushButtonStopM.setText(_translate("MainWindow", "Stop Monitor"))
        self.pushButtonClear.setText(_translate("MainWindow", "Clear"))
        self.pushButtonGraph.setText(_translate("MainWindow", "Graph"))
        self.label_2.setText(_translate("MainWindow", "FPS"))
        self.menuFile.setTitle(_translate("MainWindow", "File"))
        self.actionSave_ECG_data.setText(_translate("MainWindow", "Save ECG data"))
        self.actionSave_RR_data.setText(_translate("MainWindow", "Save RR data"))
        self.actionGenerate_HRV_report.setText(_translate("MainWindow", "Generate HRV report"))
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_())
