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

# Form implementation generated from reading ui file 'Timing.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# 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_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.setProperty("modal", False)
        Form.resize(948, 606)
        font = QtGui.QFont()
        font.setPointSize(9)
        Form.setFont(font)
        Form.setAutoFillBackground(True)
        Form.setProperty("sizeGripEnabled", True)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.splitter = QtWidgets.QSplitter(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.splitter.sizePolicy().hasHeightForWidth())
        self.splitter.setSizePolicy(sizePolicy)
        self.splitter.setStyleSheet("QSplitter::handle { background-color: #772820; }")
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setHandleWidth(10)
        self.splitter.setObjectName("splitter")
        self.frame_2 = QtWidgets.QFrame(self.splitter)
        self.frame_2.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.frame_2)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(3)
        self.verticalLayout.setObjectName("verticalLayout")
        self.frame_6 = QtWidgets.QFrame(self.frame_2)
        self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_6.setObjectName("frame_6")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame_6)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.splitter_2 = QtWidgets.QSplitter(self.frame_6)
        self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_2.setObjectName("splitter_2")
        self.tableWidget = QtWidgets.QTableWidget(self.splitter_2)
        self.tableWidget.setMaximumSize(QtCore.QSize(250, 16777215))
        self.tableWidget.setRowCount(40)
        self.tableWidget.setColumnCount(1)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.horizontalHeader().setStretchLastSection(True)
        self.plot = PlotWidget(self.splitter_2)
        self.plot.setObjectName("plot")
        self.verticalLayout_2.addWidget(self.splitter_2)
        self.verticalLayout.addWidget(self.frame_6)
        self.frame_5 = QtWidgets.QFrame(self.frame_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame_5.sizePolicy().hasHeightForWidth())
        self.frame_5.setSizePolicy(sizePolicy)
        self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_5.setObjectName("frame_5")
        self.gridLayout = QtWidgets.QGridLayout(self.frame_5)
        self.gridLayout.setObjectName("gridLayout")
        self.resultLabel = QtWidgets.QLabel(self.frame_5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.resultLabel.sizePolicy().hasHeightForWidth())
        self.resultLabel.setSizePolicy(sizePolicy)
        self.resultLabel.setMinimumSize(QtCore.QSize(50, 0))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.resultLabel.setFont(font)
        self.resultLabel.setObjectName("resultLabel")
        self.gridLayout.addWidget(self.resultLabel, 1, 4, 1, 1)
        self.commandBox = QtWidgets.QComboBox(self.frame_5)
        self.commandBox.setMinimumSize(QtCore.QSize(50, 50))
        self.commandBox.setObjectName("commandBox")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.gridLayout.addWidget(self.commandBox, 0, 0, 1, 2)
        self.resultLabel_2 = QtWidgets.QLabel(self.frame_5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.resultLabel_2.sizePolicy().hasHeightForWidth())
        self.resultLabel_2.setSizePolicy(sizePolicy)
        self.resultLabel_2.setMinimumSize(QtCore.QSize(50, 0))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.resultLabel_2.setFont(font)
        self.resultLabel_2.setObjectName("resultLabel_2")
        self.gridLayout.addWidget(self.resultLabel_2, 1, 2, 1, 1)
        self.IN2Box = QtWidgets.QComboBox(self.frame_5)
        self.IN2Box.setMinimumSize(QtCore.QSize(50, 50))
        self.IN2Box.setObjectName("IN2Box")
        self.IN2Box.addItem("")
        self.IN2Box.addItem("")
        self.gridLayout.addWidget(self.IN2Box, 1, 1, 1, 1)
        self.frame_3 = QtWidgets.QFrame(self.frame_5)
        self.frame_3.setFrameShape(QtWidgets.QFrame.Panel)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_3.setLineWidth(2)
        self.frame_3.setMidLineWidth(1)
        self.frame_3.setObjectName("frame_3")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.frame_3)
        self.horizontalLayout_2.setContentsMargins(1, 1, 1, 1)
        self.horizontalLayout_2.setSpacing(2)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.SQ1Box = QtWidgets.QCheckBox(self.frame_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.SQ1Box.sizePolicy().hasHeightForWidth())
        self.SQ1Box.setSizePolicy(sizePolicy)
        self.SQ1Box.setObjectName("SQ1Box")
        self.horizontalLayout_2.addWidget(self.SQ1Box)
        self.SQ2Box = QtWidgets.QCheckBox(self.frame_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.SQ2Box.sizePolicy().hasHeightForWidth())
        self.SQ2Box.setSizePolicy(sizePolicy)
        self.SQ2Box.setObjectName("SQ2Box")
        self.horizontalLayout_2.addWidget(self.SQ2Box)
        self.OD1Box = QtWidgets.QCheckBox(self.frame_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.OD1Box.sizePolicy().hasHeightForWidth())
        self.OD1Box.setSizePolicy(sizePolicy)
        self.OD1Box.setObjectName("OD1Box")
        self.horizontalLayout_2.addWidget(self.OD1Box)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.gridLayout.addWidget(self.frame_3, 4, 0, 1, 5)
        self.frame_4 = QtWidgets.QFrame(self.frame_5)
        self.frame_4.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_4.setObjectName("frame_4")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.frame_4)
        self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_3.setSpacing(2)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.startButton = QtWidgets.QPushButton(self.frame_4)
        self.startButton.setMinimumSize(QtCore.QSize(50, 50))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.startButton.setFont(font)
        self.startButton.setObjectName("startButton")
        self.horizontalLayout_3.addWidget(self.startButton)
        self.loading_label = QtWidgets.QLabel(self.frame_4)
        self.loading_label.setMinimumSize(QtCore.QSize(40, 0))
        self.loading_label.setMaximumSize(QtCore.QSize(50, 50))
        self.loading_label.setText("")
        self.loading_label.setObjectName("loading_label")
        self.horizontalLayout_3.addWidget(self.loading_label)
        self.repeatBox = QtWidgets.QCheckBox(self.frame_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.repeatBox.sizePolicy().hasHeightForWidth())
        self.repeatBox.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(13)
        self.repeatBox.setFont(font)
        self.repeatBox.setObjectName("repeatBox")
        self.horizontalLayout_3.addWidget(self.repeatBox)
        self.gridLayout.addWidget(self.frame_4, 0, 2, 1, 3)
        self.timeoutBox = QtWidgets.QSpinBox(self.frame_5)
        self.timeoutBox.setMaximumSize(QtCore.QSize(70, 16777215))
        self.timeoutBox.setMinimum(1)
        self.timeoutBox.setMaximum(60)
        self.timeoutBox.setProperty("value", 2)
        self.timeoutBox.setObjectName("timeoutBox")
        self.gridLayout.addWidget(self.timeoutBox, 1, 3, 1, 1)
        self.IN1Box = QtWidgets.QComboBox(self.frame_5)
        self.IN1Box.setMinimumSize(QtCore.QSize(50, 50))
        self.IN1Box.setObjectName("IN1Box")
        self.IN1Box.addItem("")
        self.IN1Box.addItem("")
        self.gridLayout.addWidget(self.IN1Box, 1, 0, 1, 1)
        self.frame_7 = QtWidgets.QFrame(self.frame_5)
        self.frame_7.setFrameShape(QtWidgets.QFrame.Panel)
        self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_7.setLineWidth(2)
        self.frame_7.setObjectName("frame_7")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.frame_7)
        self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_4.setSpacing(2)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.sqr1_label = QtWidgets.QLabel(self.frame_7)
        self.sqr1_label.setObjectName("sqr1_label")
        self.horizontalLayout_4.addWidget(self.sqr1_label)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem1)
        self.sqr1_freq = QtWidgets.QDoubleSpinBox(self.frame_7)
        self.sqr1_freq.setMinimum(0.0)
        self.sqr1_freq.setMaximum(100000.0)
        self.sqr1_freq.setProperty("value", 1000.0)
        self.sqr1_freq.setObjectName("sqr1_freq")
        self.horizontalLayout_4.addWidget(self.sqr1_freq)
        self.sqr1_dc = QtWidgets.QDoubleSpinBox(self.frame_7)
        self.sqr1_dc.setMaximum(100.0)
        self.sqr1_dc.setProperty("value", 50.0)
        self.sqr1_dc.setObjectName("sqr1_dc")
        self.horizontalLayout_4.addWidget(self.sqr1_dc)
        self.gridLayout.addWidget(self.frame_7, 2, 0, 1, 5)
        self.verticalLayout.addWidget(self.frame_5)
        self.verticalLayout.setStretch(0, 2)
        self.verticalLayout.setStretch(1, 1)
        self.frame = QtWidgets.QFrame(self.splitter)
        self.frame.setMinimumSize(QtCore.QSize(200, 0))
        self.frame.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.imageLayout = QtWidgets.QVBoxLayout(self.frame)
        self.imageLayout.setContentsMargins(0, 0, 0, 0)
        self.imageLayout.setSpacing(0)
        self.imageLayout.setObjectName("imageLayout")
        self.label = QtWidgets.QLabel(self.frame)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.imageLayout.addWidget(self.label)
        self.horizontalLayout.addWidget(self.splitter)

        self.retranslateUi(Form)
        self.IN2Box.setCurrentIndex(0)
        self.IN1Box.setCurrentIndex(0)
        self.startButton.clicked.connect(Form.makeMeasurement) # type: ignore
        self.sqr1_dc.editingFinished.connect(Form.set_sqr1) # type: ignore
        self.SQ1Box.clicked['bool'].connect(Form.onoff_sqr1) # type: ignore
        self.SQ2Box.clicked['bool'].connect(Form.onoff_sqr2) # type: ignore
        self.OD1Box.clicked['bool'].connect(Form.onoff_od1) # type: ignore
        self.sqr1_freq.editingFinished.connect(Form.set_sqr1) # type: ignore
        self.commandBox.currentIndexChanged['int'].connect(Form.setCommandType) # type: ignore
        self.IN1Box.currentIndexChanged['int'].connect(Form.modifyOutputs) # type: ignore
        self.IN2Box.currentIndexChanged['int'].connect(Form.modifyOutputs) # type: ignore
        self.repeatBox.toggled['bool'].connect(Form.setRepeat) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Configure Axis"))
        self.resultLabel.setText(_translate("Form", "RESULT:"))
        self.commandBox.setItemText(0, _translate("Form", "Rise To Rise Time"))
        self.commandBox.setItemText(1, _translate("Form", "Fall To Fall Time"))
        self.commandBox.setItemText(2, _translate("Form", "Fall To Rise Time"))
        self.commandBox.setItemText(3, _translate("Form", "Rise To Fall Time"))
        self.commandBox.setItemText(4, _translate("Form", "Set To Rise Time"))
        self.commandBox.setItemText(5, _translate("Form", "Set To Fall Time"))
        self.commandBox.setItemText(6, _translate("Form", "Clear To Rise Time"))
        self.commandBox.setItemText(7, _translate("Form", "Clear To Fall Time"))
        self.resultLabel_2.setText(_translate("Form", "Timeout (S)"))
        self.IN2Box.setItemText(0, _translate("Form", "SEN"))
        self.IN2Box.setItemText(1, _translate("Form", "IN2"))
        self.SQ1Box.setText(_translate("Form", "SQR1"))
        self.SQ2Box.setText(_translate("Form", "SQR2"))
        self.OD1Box.setText(_translate("Form", "OD1"))
        self.startButton.setText(_translate("Form", "MEASURE"))
        self.repeatBox.setText(_translate("Form", "Repeat"))
        self.IN1Box.setItemText(0, _translate("Form", "SEN"))
        self.IN1Box.setItemText(1, _translate("Form", "IN2"))
        self.sqr1_label.setText(_translate("Form", "SQR1 Frequency ( 0 = ALWAYS ON) :"))
        self.sqr1_dc.setSuffix(_translate("Form", " %"))
        self.label.setText(_translate("Form", "<html><head/><body><p>Measure Time Intervals:</p><p>e.g. Rise to Rise time , SEN, SEN means the stopwatch will be started when a rising edge (0V to 3+V transition) is seen on SEN, and will stop when another rising edge is seen on the SEN input pin.<br/><br/>e.g. Set to Rise Time: OD1 , SEN. <br/>OD1 will be initially set to OFF when you select this option. When you click on measure, OD1 will be set to high and the stopwatch is started. It will be stopped when SEN sees a rising edge<br/><br/>Keep the <span style=\" font-weight:600;\">repeat </span>box checked to continuously measure and plot values. right click the plot to export data as CSV</p></body></html>"))
from pyqtgraph import PlotWidget
from . import res_rc
