# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\src\sas\qtgui\Plotting\UI\LinearFitUI.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
# 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
[docs]class Ui_LinearFitUI(object):
[docs] def setupUi(self, LinearFitUI):
LinearFitUI.setObjectName("LinearFitUI")
LinearFitUI.resize(503, 564)
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_5 = QtWidgets.QGridLayout(LinearFitUI)
self.gridLayout_5.setObjectName("gridLayout_5")
self.label = QtWidgets.QLabel(LinearFitUI)
self.label.setObjectName("label")
self.gridLayout_5.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.setEnabled(False)
self.txtRangeMin.setAutoFillBackground(True)
self.txtRangeMin.setStyleSheet("color: rgb(0, 0, 0);")
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.setEnabled(False)
self.txtRangeMax.setAutoFillBackground(False)
self.txtRangeMax.setStyleSheet("color: rgb(0, 0, 0);")
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_5.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.setEnabled(False)
self.txtA.setStyleSheet("color: rgb(0, 0, 0);")
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.setEnabled(False)
self.txtB.setStyleSheet("color: rgb(0, 0, 0);")
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.setEnabled(False)
self.txtChi2.setStyleSheet("color: rgb(0, 0, 0);")
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.setEnabled(False)
self.txtAerr.setStyleSheet("color: rgb(0, 0, 0);")
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.setEnabled(False)
self.txtBerr.setStyleSheet("color: rgb(0, 0, 0);")
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_5.addWidget(self.groupBox, 2, 0, 1, 2)
self.guinier_box = QtWidgets.QGroupBox(LinearFitUI)
self.guinier_box.setEnabled(True)
self.guinier_box.setObjectName("guinier_box")
self.gridLayout_4 = QtWidgets.QGridLayout(self.guinier_box)
self.gridLayout_4.setObjectName("gridLayout_4")
self.formLayout_4 = QtWidgets.QFormLayout()
self.formLayout_4.setObjectName("formLayout_4")
self.label_11 = QtWidgets.QLabel(self.guinier_box)
self.label_11.setObjectName("label_11")
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_11)
self.txtGuinier_1 = QtWidgets.QLineEdit(self.guinier_box)
self.txtGuinier_1.setEnabled(False)
self.txtGuinier_1.setStyleSheet("color: rgb(0, 0, 0);")
self.txtGuinier_1.setObjectName("txtGuinier_1")
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.txtGuinier_1)
self.label_12 = QtWidgets.QLabel(self.guinier_box)
self.label_12.setObjectName("label_12")
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_12)
self.txtGuinier_2 = QtWidgets.QLineEdit(self.guinier_box)
self.txtGuinier_2.setEnabled(False)
self.txtGuinier_2.setStyleSheet("color: rgb(0, 0, 0);")
self.txtGuinier_2.setObjectName("txtGuinier_2")
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.txtGuinier_2)
self.label_15 = QtWidgets.QLabel(self.guinier_box)
self.label_15.setObjectName("label_15")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_15)
self.txtGuinier_3 = QtWidgets.QLineEdit(self.guinier_box)
self.txtGuinier_3.setEnabled(False)
self.txtGuinier_3.setStyleSheet("color: rgb(0, 0, 0);")
self.txtGuinier_3.setObjectName("txtGuinier_3")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.txtGuinier_3)
self.label_16 = QtWidgets.QLabel(self.guinier_box)
self.label_16.setObjectName("label_16")
self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_16)
self.txtGuinier_4 = QtWidgets.QLineEdit(self.guinier_box)
self.txtGuinier_4.setEnabled(False)
self.txtGuinier_4.setStyleSheet("color: rgb(0, 0, 0);")
self.txtGuinier_4.setObjectName("txtGuinier_4")
self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.txtGuinier_4)
self.gridLayout_4.addLayout(self.formLayout_4, 0, 0, 1, 1)
self.formLayout_3 = QtWidgets.QFormLayout()
self.formLayout_3.setObjectName("formLayout_3")
self.label_13 = QtWidgets.QLabel(self.guinier_box)
self.label_13.setObjectName("label_13")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_13)
self.txtGuinier1_Err = QtWidgets.QLineEdit(self.guinier_box)
self.txtGuinier1_Err.setEnabled(False)
self.txtGuinier1_Err.setStyleSheet("color: rgb(0, 0, 0);")
self.txtGuinier1_Err.setReadOnly(True)
self.txtGuinier1_Err.setObjectName("txtGuinier1_Err")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.txtGuinier1_Err)
self.label_14 = QtWidgets.QLabel(self.guinier_box)
self.label_14.setObjectName("label_14")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_14)
self.txtGuinier2_Err = QtWidgets.QLineEdit(self.guinier_box)
self.txtGuinier2_Err.setEnabled(False)
self.txtGuinier2_Err.setStyleSheet("color: rgb(0, 0, 0);")
self.txtGuinier2_Err.setReadOnly(True)
self.txtGuinier2_Err.setObjectName("txtGuinier2_Err")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.txtGuinier2_Err)
self.gridLayout_4.addLayout(self.formLayout_3, 0, 1, 1, 1)
self.gridLayout_5.addWidget(self.guinier_box, 3, 0, 1, 2)
self.label_2 = QtWidgets.QLabel(LinearFitUI)
self.label_2.setObjectName("label_2")
self.gridLayout_5.addWidget(self.label_2, 4, 0, 1, 2)
spacerItem = QtWidgets.QSpacerItem(20, 3, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout_5.addItem(spacerItem, 5, 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_5.addLayout(self.horizontalLayout_2, 6, 0, 1, 2)
self.guinier_box.raise_()
self.label.raise_()
self.groupBox_2.raise_()
self.groupBox.raise_()
self.label_2.raise_()
self.retranslateUi(LinearFitUI)
self.cmdClose.clicked.connect(LinearFitUI.accept) # type: ignore
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.guinier_box.setTitle(_translate("LinearFitUI", "Guinier analysis "))
self.label_11.setText(_translate("LinearFitUI", "I(q=0)"))
self.label_12.setText(_translate("LinearFitUI", "<html><head/><body><p>R<span style=\" vertical-align:sub;\">g </span>[Å]</p></body></html>"))
self.label_15.setText(_translate("LinearFitUI", "<html><head/><body><p>R<span style=\" vertical-align:sub;\">g</span>*Q<span style=\" vertical-align:sub;\">max</span></p></body></html>"))
self.label_16.setText(_translate("LinearFitUI", "<html><head/><body><p>R<span style=\" vertical-align:sub;\">g</span>*Q<span style=\" vertical-align:sub;\">min</span></p></body></html>"))
self.label_13.setText(_translate("LinearFitUI", "+/-"))
self.txtGuinier1_Err.setToolTip(_translate("LinearFitUI", "<html><head/><body><p>Error on the slope parameter.</p></body></html>"))
self.label_14.setText(_translate("LinearFitUI", "+/-"))
self.txtGuinier2_Err.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"))