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

# Form implementation generated from reading ui file 'brickv/plugin_system/plugins/real_time_clock/ui/calibration.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_Calibration(object):
    def setupUi(self, Calibration):
        Calibration.setObjectName("Calibration")
        Calibration.resize(703, 884)
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(Calibration)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.groupBox = QtWidgets.QGroupBox(Calibration)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.groupBox)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 5, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.groupBox)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 7, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.groupBox)
        self.label_3.setWordWrap(True)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 0, 0, 1, 2)
        self.label_measured_rtc_duration = QtWidgets.QLabel(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_measured_rtc_duration.sizePolicy().hasHeightForWidth())
        self.label_measured_rtc_duration.setSizePolicy(sizePolicy)
        self.label_measured_rtc_duration.setObjectName("label_measured_rtc_duration")
        self.gridLayout.addWidget(self.label_measured_rtc_duration, 5, 1, 1, 1)
        self.label_measured_difference = QtWidgets.QLabel(self.groupBox)
        self.label_measured_difference.setObjectName("label_measured_difference")
        self.gridLayout.addWidget(self.label_measured_difference, 7, 1, 1, 1)
        self.label_6 = QtWidgets.QLabel(self.groupBox)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 8, 0, 1, 1)
        self.label_measured_offset = QtWidgets.QLabel(self.groupBox)
        self.label_measured_offset.setObjectName("label_measured_offset")
        self.gridLayout.addWidget(self.label_measured_offset, 8, 1, 1, 1)
        self.line = QtWidgets.QFrame(self.groupBox)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.gridLayout.addWidget(self.line, 4, 0, 1, 2)
        self.label_8 = QtWidgets.QLabel(self.groupBox)
        self.label_8.setWordWrap(True)
        self.label_8.setObjectName("label_8")
        self.gridLayout.addWidget(self.label_8, 1, 0, 1, 2)
        self.button_restart = QtWidgets.QPushButton(self.groupBox)
        self.button_restart.setObjectName("button_restart")
        self.gridLayout.addWidget(self.button_restart, 11, 0, 1, 2)
        self.label_warning_title = QtWidgets.QLabel(self.groupBox)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_warning_title.setFont(font)
        self.label_warning_title.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.label_warning_title.setObjectName("label_warning_title")
        self.gridLayout.addWidget(self.label_warning_title, 9, 0, 1, 1)
        self.label_warning_message = QtWidgets.QLabel(self.groupBox)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_warning_message.setFont(font)
        self.label_warning_message.setWordWrap(True)
        self.label_warning_message.setObjectName("label_warning_message")
        self.gridLayout.addWidget(self.label_warning_message, 9, 1, 1, 1)
        self.label_11 = QtWidgets.QLabel(self.groupBox)
        self.label_11.setObjectName("label_11")
        self.gridLayout.addWidget(self.label_11, 6, 0, 1, 1)
        self.label_measured_local_duration = QtWidgets.QLabel(self.groupBox)
        self.label_measured_local_duration.setObjectName("label_measured_local_duration")
        self.gridLayout.addWidget(self.label_measured_local_duration, 6, 1, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.groupBox)
        self.label_4.setWordWrap(True)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 2, 0, 1, 2)
        self.label_9 = QtWidgets.QLabel(self.groupBox)
        self.label_9.setWordWrap(True)
        self.label_9.setObjectName("label_9")
        self.gridLayout.addWidget(self.label_9, 3, 0, 1, 2)
        self.label_timeout_title = QtWidgets.QLabel(self.groupBox)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_timeout_title.setFont(font)
        self.label_timeout_title.setObjectName("label_timeout_title")
        self.gridLayout.addWidget(self.label_timeout_title, 10, 0, 1, 1)
        self.label_timeout_count = QtWidgets.QLabel(self.groupBox)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_timeout_count.setFont(font)
        self.label_timeout_count.setObjectName("label_timeout_count")
        self.gridLayout.addWidget(self.label_timeout_count, 10, 1, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout)
        self.verticalLayout_3.addWidget(self.groupBox)
        spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem)
        self.groupBox_2 = QtWidgets.QGroupBox(Calibration)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout_9 = QtWidgets.QGridLayout()
        self.gridLayout_9.setObjectName("gridLayout_9")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label_new_offset = QtWidgets.QLabel(self.groupBox_2)
        self.label_new_offset.setObjectName("label_new_offset")
        self.horizontalLayout.addWidget(self.label_new_offset)
        self.spin_new_offset = QtWidgets.QSpinBox(self.groupBox_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.spin_new_offset.sizePolicy().hasHeightForWidth())
        self.spin_new_offset.setSizePolicy(sizePolicy)
        self.spin_new_offset.setMinimum(-128)
        self.spin_new_offset.setMaximum(127)
        self.spin_new_offset.setObjectName("spin_new_offset")
        self.horizontalLayout.addWidget(self.spin_new_offset)
        self.gridLayout_9.addLayout(self.horizontalLayout, 5, 1, 1, 1)
        self.label_55 = QtWidgets.QLabel(self.groupBox_2)
        self.label_55.setObjectName("label_55")
        self.gridLayout_9.addWidget(self.label_55, 5, 0, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.groupBox_2)
        self.label_5.setWordWrap(True)
        self.label_5.setObjectName("label_5")
        self.gridLayout_9.addWidget(self.label_5, 0, 0, 1, 2)
        self.line_2 = QtWidgets.QFrame(self.groupBox_2)
        self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.gridLayout_9.addWidget(self.line_2, 3, 0, 1, 2)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.button_optimize = QtWidgets.QPushButton(self.groupBox_2)
        self.button_optimize.setObjectName("button_optimize")
        self.horizontalLayout_2.addWidget(self.button_optimize)
        self.button_save = QtWidgets.QPushButton(self.groupBox_2)
        self.button_save.setObjectName("button_save")
        self.horizontalLayout_2.addWidget(self.button_save)
        self.gridLayout_9.addLayout(self.horizontalLayout_2, 6, 0, 1, 2)
        self.label_7 = QtWidgets.QLabel(self.groupBox_2)
        self.label_7.setWordWrap(True)
        self.label_7.setObjectName("label_7")
        self.gridLayout_9.addWidget(self.label_7, 2, 0, 1, 2)
        self.label_10 = QtWidgets.QLabel(self.groupBox_2)
        self.label_10.setObjectName("label_10")
        self.gridLayout_9.addWidget(self.label_10, 4, 0, 1, 1)
        self.label_current_offset = QtWidgets.QLabel(self.groupBox_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_current_offset.sizePolicy().hasHeightForWidth())
        self.label_current_offset.setSizePolicy(sizePolicy)
        self.label_current_offset.setObjectName("label_current_offset")
        self.gridLayout_9.addWidget(self.label_current_offset, 4, 1, 1, 1)
        self.label_12 = QtWidgets.QLabel(self.groupBox_2)
        self.label_12.setWordWrap(True)
        self.label_12.setObjectName("label_12")
        self.gridLayout_9.addWidget(self.label_12, 1, 0, 1, 2)
        self.verticalLayout.addLayout(self.gridLayout_9)
        self.verticalLayout_3.addWidget(self.groupBox_2)
        spacerItem1 = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem1)
        self.button_close = QtWidgets.QPushButton(Calibration)
        self.button_close.setObjectName("button_close")
        self.verticalLayout_3.addWidget(self.button_close)

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

    def retranslateUi(self, Calibration):
        _translate = QtCore.QCoreApplication.translate
        Calibration.setWindowTitle(_translate("Calibration", "Real-Time Clock Calibration"))
        self.groupBox.setTitle(_translate("Calibration", "Measured Offset"))
        self.label.setText(_translate("Calibration", "Real-Time Clock Duration:"))
        self.label_2.setText(_translate("Calibration", "Difference:"))
        self.label_3.setText(_translate("Calibration", "The Real-Time Clock time can deviate from the actual time due to the frequency deviation of its 32.768 kHz crystal. Even without compensation (factory default) the resulting time deviation should be at most <b>±20 ppm</b> (±52.6 seconds per month)."))
        self.label_measured_rtc_duration.setText(_translate("Calibration", "0:00:00.00"))
        self.label_measured_difference.setText(_translate("Calibration", "0.000000 seconds"))
        self.label_6.setText(_translate("Calibration", "Offset (10 min Average):"))
        self.label_measured_offset.setText(_translate("Calibration", "0.000 ppm (0.000 ppm ± 0.000 ppm)"))
        self.label_8.setText(_translate("Calibration", "This deviation can be calculated by comparing the same duration measured by the Real-Time Clock and the local clock of this computer, assuming that the local clock is accurate."))
        self.button_restart.setText(_translate("Calibration", "Restart"))
        self.label_warning_title.setText(_translate("Calibration", "Latest Warning:"))
        self.label_warning_message.setText(_translate("Calibration", "<message>"))
        self.label_11.setText(_translate("Calibration", "Local Clock Duration:"))
        self.label_measured_local_duration.setText(_translate("Calibration", "0:00:00.000000"))
        self.label_4.setText(_translate("Calibration", "For best results the configured offset should be set to <b>0 ppm</b> first and then a duration of at least <b>6 hours</b> should be measured. The deviation of the 10 min average should be less than <b>±0.25 ppm</b> (will turn from <font color=\"#FF0000\">red</font> to <font color=\"#008000\">green</font>) before the measured offset is applied as the configured offset."))
        self.label_9.setText(_translate("Calibration", "If the deviation of the 10 min average doesn\'t got down towards <b>±0.25 ppm</b> after several hours then your local clock might not be stable/accurate enough to be used for calibrating the Bricklet. Try a different computer."))
        self.label_timeout_title.setText(_translate("Calibration", "Timeouts:"))
        self.label_timeout_count.setText(_translate("Calibration", "<count>"))
        self.groupBox_2.setTitle(_translate("Calibration", "Configured Offset"))
        self.label_new_offset.setText(_translate("Calibration", "0.00 ppm"))
        self.label_55.setText(_translate("Calibration", "New Offset:"))
        self.label_5.setText(_translate("Calibration", "The Real-Time Clock can compensate for the frequency deviation of the crystal in <b>2.17 ppm</b> steps between -277.76 ppm (-128) and +275.59 ppm (127)."))
        self.button_optimize.setText(_translate("Calibration", "Optimize"))
        self.button_save.setText(_translate("Calibration", "Save"))
        self.label_7.setText(_translate("Calibration", "Click the <b>Optimize</b> button to automatically choose the best offset value based on the currently measured offset. Click the <b>Save</b> button to save the new offset."))
        self.label_10.setText(_translate("Calibration", "Current Offset:"))
        self.label_current_offset.setText(_translate("Calibration", "0.00 ppm (0)"))
        self.label_12.setText(_translate("Calibration", "<b>Warning:</b> If the measured offset is bigger than <b>±20 ppm</b> then it is probably wrong, because the crystal has a maximum specified offset of at most ±20 ppm. Configuring the offset to more than ±20 ppm will probably decrease the accuracy of the Real-Time Clock, instead of increasing it, under normal circumstances."))
        self.button_close.setText(_translate("Calibration", "Close"))
