# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './src/sas/qtgui/Plotting/UI/LinearFitUI.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
[docs]class Ui_LinearFitUI(object):
[docs] def setupUi(self, LinearFitUI):
LinearFitUI.setObjectName("LinearFitUI")
LinearFitUI.resize(439, 324)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(LinearFitUI.sizePolicy().hasHeightForWidth())
LinearFitUI.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/res/ball.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
LinearFitUI.setWindowIcon(icon)
self.gridLayout_4 = QtWidgets.QGridLayout(LinearFitUI)
self.gridLayout_4.setObjectName("gridLayout_4")
self.label = QtWidgets.QLabel(LinearFitUI)
self.label.setObjectName("label")
self.gridLayout_4.addWidget(self.label, 0, 0, 1, 1)
self.groupBox_2 = QtWidgets.QGroupBox(LinearFitUI)
self.groupBox_2.setObjectName("groupBox_2")
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_2)
self.gridLayout_3.setObjectName("gridLayout_3")
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_9 = QtWidgets.QLabel(self.groupBox_2)
self.label_9.setObjectName("label_9")
self.gridLayout_2.addWidget(self.label_9, 0, 1, 1, 1)
self.label_10 = QtWidgets.QLabel(self.groupBox_2)
self.label_10.setObjectName("label_10")
self.gridLayout_2.addWidget(self.label_10, 0, 2, 1, 1)
self.label_8 = QtWidgets.QLabel(self.groupBox_2)
self.label_8.setObjectName("label_8")
self.gridLayout_2.addWidget(self.label_8, 1, 0, 1, 1)
self.txtRangeMin = QtWidgets.QLineEdit(self.groupBox_2)
self.txtRangeMin.setAutoFillBackground(True)
self.txtRangeMin.setReadOnly(True)
self.txtRangeMin.setObjectName("txtRangeMin")
self.gridLayout_2.addWidget(self.txtRangeMin, 1, 1, 1, 1)
self.txtRangeMax = QtWidgets.QLineEdit(self.groupBox_2)
self.txtRangeMax.setAutoFillBackground(True)
self.txtRangeMax.setReadOnly(True)
self.txtRangeMax.setObjectName("txtRangeMax")
self.gridLayout_2.addWidget(self.txtRangeMax, 1, 2, 1, 1)
self.lblRange = QtWidgets.QLabel(self.groupBox_2)
self.lblRange.setObjectName("lblRange")
self.gridLayout_2.addWidget(self.lblRange, 2, 0, 1, 1)
self.txtFitRangeMin = QtWidgets.QLineEdit(self.groupBox_2)
self.txtFitRangeMin.setObjectName("txtFitRangeMin")
self.gridLayout_2.addWidget(self.txtFitRangeMin, 2, 1, 1, 1)
self.txtFitRangeMax = QtWidgets.QLineEdit(self.groupBox_2)
self.txtFitRangeMax.setObjectName("txtFitRangeMax")
self.gridLayout_2.addWidget(self.txtFitRangeMax, 2, 2, 1, 1)
self.gridLayout_3.addLayout(self.gridLayout_2, 0, 0, 1, 1)
self.gridLayout_4.addWidget(self.groupBox_2, 1, 0, 1, 2)
self.groupBox = QtWidgets.QGroupBox(LinearFitUI)
self.groupBox.setObjectName("groupBox")
self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
self.gridLayout.setObjectName("gridLayout")
self.formLayout = QtWidgets.QFormLayout()
self.formLayout.setObjectName("formLayout")
self.label_3 = QtWidgets.QLabel(self.groupBox)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.txtA = QtWidgets.QLineEdit(self.groupBox)
self.txtA.setReadOnly(True)
self.txtA.setObjectName("txtA")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.txtA)
self.label_4 = QtWidgets.QLabel(self.groupBox)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.txtB = QtWidgets.QLineEdit(self.groupBox)
self.txtB.setReadOnly(True)
self.txtB.setObjectName("txtB")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.txtB)
self.label_7 = QtWidgets.QLabel(self.groupBox)
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_7)
self.txtChi2 = QtWidgets.QLineEdit(self.groupBox)
self.txtChi2.setReadOnly(True)
self.txtChi2.setObjectName("txtChi2")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.txtChi2)
self.gridLayout.addLayout(self.formLayout, 0, 0, 1, 1)
self.formLayout_2 = QtWidgets.QFormLayout()
self.formLayout_2.setObjectName("formLayout_2")
self.label_5 = QtWidgets.QLabel(self.groupBox)
self.label_5.setObjectName("label_5")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.txtAerr = QtWidgets.QLineEdit(self.groupBox)
self.txtAerr.setReadOnly(True)
self.txtAerr.setObjectName("txtAerr")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.txtAerr)
self.label_6 = QtWidgets.QLabel(self.groupBox)
self.label_6.setObjectName("label_6")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_6)
self.txtBerr = QtWidgets.QLineEdit(self.groupBox)
self.txtBerr.setReadOnly(True)
self.txtBerr.setObjectName("txtBerr")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.txtBerr)
self.gridLayout.addLayout(self.formLayout_2, 0, 1, 1, 1)
self.gridLayout_4.addWidget(self.groupBox, 2, 0, 1, 2)
self.label_2 = QtWidgets.QLabel(LinearFitUI)
self.label_2.setObjectName("label_2")
self.gridLayout_4.addWidget(self.label_2, 3, 0, 1, 2)
spacerItem = QtWidgets.QSpacerItem(20, 3, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout_4.addItem(spacerItem, 4, 1, 1, 1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.cmdFit = QtWidgets.QPushButton(LinearFitUI)
self.cmdFit.setObjectName("cmdFit")
self.horizontalLayout.addWidget(self.cmdFit)
self.cmdClose = QtWidgets.QPushButton(LinearFitUI)
self.cmdClose.setObjectName("cmdClose")
self.horizontalLayout.addWidget(self.cmdClose)
self.horizontalLayout_2.addLayout(self.horizontalLayout)
self.gridLayout_4.addLayout(self.horizontalLayout_2, 5, 0, 1, 2)
self.retranslateUi(LinearFitUI)
self.cmdClose.clicked.connect(LinearFitUI.accept)
QtCore.QMetaObject.connectSlotsByName(LinearFitUI)
[docs] def retranslateUi(self, LinearFitUI):
_translate = QtCore.QCoreApplication.translate
LinearFitUI.setWindowTitle(_translate("LinearFitUI", "Linear Fit"))
self.label.setText(_translate("LinearFitUI", "<html><head/><body><p>Perform fit for <span style=\" font-weight:600; font-style:italic;\">y(x) = ax + b</span></p></body></html>"))
self.groupBox_2.setTitle(_translate("LinearFitUI", "Fit ranges"))
self.label_9.setText(_translate("LinearFitUI", "Min"))
self.label_10.setText(_translate("LinearFitUI", "Max"))
self.label_8.setText(_translate("LinearFitUI", "Range (linear scale)"))
self.txtRangeMin.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Minimum value on the x-axis for the plotted data.</p></body></html>"))
self.txtRangeMax.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Maximum value on the x-axis for the plotted data.</p></body></html>"))
self.lblRange.setText(_translate("LinearFitUI", "<html><head/><body><p>Fit range</p></body></html>"))
self.txtFitRangeMin.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Enter the minimum value on the x-axis to be included in the fit.</p></body></html>"))
self.txtFitRangeMax.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Enter the maximum value on the x-axis to be included in the fit.</p></body></html>"))
self.groupBox.setTitle(_translate("LinearFitUI", "Fit parameters"))
self.label_3.setText(_translate("LinearFitUI", "a"))
self.txtA.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Fit value for the slope parameter.</p></body></html>"))
self.label_4.setText(_translate("LinearFitUI", "b"))
self.txtB.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Fit value for the constant parameter.</p></body></html>"))
self.label_7.setText(_translate("LinearFitUI", "<html><head/><body><p>χ<span style=\" vertical-align:super;\">2</span>/dof</p></body></html>"))
self.txtChi2.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>χ<span style=\" vertical-align:super;\">2</span> over degrees of freedom.</p></body></html>"))
self.label_5.setText(_translate("LinearFitUI", "+/-"))
self.txtAerr.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Error on the slope parameter.</p></body></html>"))
self.label_6.setText(_translate("LinearFitUI", "+/-"))
self.txtBerr.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Error on the constant parameter.</p></body></html>"))
self.label_2.setText(_translate("LinearFitUI", "<html><head/><body><p><span style=\" color:#000000;\">Resolution is NOT accounted for.<br/>Slit smeared data will give very wrong answers!</span></p></body></html>"))
self.cmdFit.setText(_translate("LinearFitUI", "Fit"))
self.cmdClose.setText(_translate("LinearFitUI", "Close"))