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

# Form implementation generated from reading ui file 'tof.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.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.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.commandBox = QtWidgets.QComboBox(self.frame_4)
        self.commandBox.setMinimumSize(QtCore.QSize(50, 50))
        self.commandBox.setObjectName("commandBox")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.commandBox.addItem("")
        self.horizontalLayout_3.addWidget(self.commandBox)
        self.gridLayout.addWidget(self.frame_4, 1, 2, 1, 2)
        self.measureButton = QtWidgets.QPushButton(self.frame_5)
        self.measureButton.setMinimumSize(QtCore.QSize(50, 50))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.measureButton.setFont(font)
        self.measureButton.setObjectName("measureButton")
        self.gridLayout.addWidget(self.measureButton, 1, 0, 1, 2)
        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, 2, 0, 1, 4)
        self.OD1Box = QtWidgets.QCheckBox(self.frame_5)
        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)
        font = QtGui.QFont()
        font.setPointSize(15)
        self.OD1Box.setFont(font)
        self.OD1Box.setObjectName("OD1Box")
        self.gridLayout.addWidget(self.OD1Box, 0, 0, 1, 4)
        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.commandBox.setCurrentIndex(1)
        self.measureButton.clicked.connect(Form.makeMeasurement) # type: ignore
        self.OD1Box.clicked['bool'].connect(Form.onoff_od1) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Configure Axis"))
        self.commandBox.setItemText(0, _translate("Form", "Set To Rise Time"))
        self.commandBox.setItemText(1, _translate("Form", "Set To Fall Time"))
        self.commandBox.setItemText(2, _translate("Form", "Clear To Rise Time"))
        self.commandBox.setItemText(3, _translate("Form", "Clear To Fall Time"))
        self.measureButton.setText(_translate("Form", "MEASURE"))
        self.resultLabel.setText(_translate("Form", "RESULT:"))
        self.OD1Box.setText(_translate("Form", "RELAY ON/OFF"))
        self.label.setText(_translate("Form", "<html><head/><body><p>Measure Time of Flight.</p><p>Connect the relay signal input to OD1. Some relays turn on when OD1 is ON, and some are ON when OD1 is OFF. Toggle OD1 and try to attach the ball to the electromagnet of the relay.</p><p>Connect a metal plate to SEN, and another to GND, and place them on top of each other with a small gap. Make sure SEN value is at 3.3V . When the ball falls on this, they should make contact, and cause SEN to go to 0 Volts.</p><p>When you click the MEASURE button , OD1 is toggled, causing the ball to drop, and a stopwatch is started. When the ball hits the plates which ground SEN, the stopwatch is stopped and the time is displayed.</p></body></html>"))
from pyqtgraph import PlotWidget
from . import res_rc
