# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'resources/_ui/evalexpression.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_CalcDialog(object): def setupUi(self, CalcDialog): CalcDialog.setObjectName("CalcDialog") CalcDialog.resize(895, 547) self.gridLayout = QtWidgets.QGridLayout(CalcDialog) self.gridLayout.setObjectName("gridLayout") self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setContentsMargins(-1, 0, -1, -1) self.verticalLayout_2.setObjectName("verticalLayout_2") self.tabWidget = QtWidgets.QTabWidget(CalcDialog) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.verticalLayout = QtWidgets.QVBoxLayout(self.tab) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.textEdit = QtWidgets.QTextEdit(self.tab) self.textEdit.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.textEdit.sizePolicy().hasHeightForWidth()) self.textEdit.setSizePolicy(sizePolicy) self.textEdit.setFrameShape(QtWidgets.QFrame.NoFrame) self.textEdit.setFrameShadow(QtWidgets.QFrame.Plain) self.textEdit.setAutoFormatting(QtWidgets.QTextEdit.AutoNone) self.textEdit.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) self.textEdit.setObjectName("textEdit") self.horizontalLayout_2.addWidget(self.textEdit) self.textEdit_3 = QtWidgets.QTextEdit(self.tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.textEdit_3.sizePolicy().hasHeightForWidth()) self.textEdit_3.setSizePolicy(sizePolicy) self.textEdit_3.setFrameShape(QtWidgets.QFrame.NoFrame) self.textEdit_3.setFrameShadow(QtWidgets.QFrame.Plain) self.textEdit_3.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) self.textEdit_3.setObjectName("textEdit_3") self.horizontalLayout_2.addWidget(self.textEdit_3) self.verticalLayout.addLayout(self.horizontalLayout_2) self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tab_2) self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) self.verticalLayout_3.setSpacing(0) self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setContentsMargins(-1, 0, -1, -1) self.horizontalLayout_3.setSpacing(0) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.textEdit_2 = QtWidgets.QTextEdit(self.tab_2) self.textEdit_2.setEnabled(True) self.textEdit_2.setFrameShape(QtWidgets.QFrame.NoFrame) self.textEdit_2.setFrameShadow(QtWidgets.QFrame.Plain) self.textEdit_2.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) self.textEdit_2.setObjectName("textEdit_2") self.horizontalLayout_3.addWidget(self.textEdit_2) self.textEdit_4 = QtWidgets.QTextEdit(self.tab_2) self.textEdit_4.setFrameShape(QtWidgets.QFrame.NoFrame) self.textEdit_4.setFrameShadow(QtWidgets.QFrame.Plain) self.textEdit_4.setReadOnly(True) self.textEdit_4.setObjectName("textEdit_4") self.horizontalLayout_3.addWidget(self.textEdit_4) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.tabWidget.addTab(self.tab_2, "") self.tab_3 = QtWidgets.QWidget() self.tab_3.setObjectName("tab_3") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.tab_3) self.verticalLayout_4.setContentsMargins(0, 0, 0, 0) self.verticalLayout_4.setSpacing(0) self.verticalLayout_4.setObjectName("verticalLayout_4") self.treeWidget = QtWidgets.QTreeWidget(self.tab_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.treeWidget.sizePolicy().hasHeightForWidth()) self.treeWidget.setSizePolicy(sizePolicy) self.treeWidget.setFrameShape(QtWidgets.QFrame.NoFrame) self.treeWidget.setFrameShadow(QtWidgets.QFrame.Plain) self.treeWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) self.treeWidget.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) self.treeWidget.setObjectName("treeWidget") self.treeWidget.header().setVisible(False) self.verticalLayout_4.addWidget(self.treeWidget) self.tabWidget.addTab(self.tab_3, "") self.verticalLayout_2.addWidget(self.tabWidget) self.label = QtWidgets.QLabel(CalcDialog) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName("label") self.verticalLayout_2.addWidget(self.label) self.calc_edit = QtWidgets.QPlainTextEdit(CalcDialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.calc_edit.sizePolicy().hasHeightForWidth()) self.calc_edit.setSizePolicy(sizePolicy) self.calc_edit.setObjectName("calc_edit") self.verticalLayout_2.addWidget(self.calc_edit) self.gridLayout.addLayout(self.verticalLayout_2, 0, 3, 1, 1) self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setSpacing(0) self.verticalLayout_5.setObjectName("verticalLayout_5") self.label_2 = QtWidgets.QLabel(CalcDialog) self.label_2.setObjectName("label_2") self.verticalLayout_5.addWidget(self.label_2) self.listWidget = QtWidgets.QListWidget(CalcDialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) self.listWidget.setSizePolicy(sizePolicy) self.listWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection) self.listWidget.setObjectName("listWidget") self.verticalLayout_5.addWidget(self.listWidget) self.overwrite_checkbox = QtWidgets.QCheckBox(CalcDialog) self.overwrite_checkbox.setLayoutDirection(QtCore.Qt.LeftToRight) self.overwrite_checkbox.setObjectName("overwrite_checkbox") self.verticalLayout_5.addWidget(self.overwrite_checkbox) self.gridLayout.addLayout(self.verticalLayout_5, 0, 1, 1, 1) self.buttonBox = QtWidgets.QDialogButtonBox(CalcDialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setObjectName("buttonBox") self.gridLayout.addWidget(self.buttonBox, 1, 3, 1, 1) self.line = QtWidgets.QFrame(CalcDialog) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.gridLayout.addWidget(self.line, 0, 2, 1, 1) self.retranslateUi(CalcDialog) self.tabWidget.setCurrentIndex(0) self.buttonBox.accepted.connect(CalcDialog.accept) self.buttonBox.rejected.connect(CalcDialog.reject) QtCore.QMetaObject.connectSlotsByName(CalcDialog) def retranslateUi(self, CalcDialog): _translate = QtCore.QCoreApplication.translate CalcDialog.setWindowTitle(_translate("CalcDialog", "Evaluate stuff")) self.textEdit.setHtml(_translate("CalcDialog", "\n" "
\n" "- X, y, and Δy values
\n" "- Values of dataset on position i in list
\n" "(s[i].x and x return the same values)
\n" "- Numpy functions
\n" "- If available, fit parameters
\n" "(see namespace for available parameters)
\n" "- Fit functions:
\n" "(meaning of p and extra arguments
\n" "depend on function)
\n" "- Constants:
\n" "(nuclei are accessed by const[\'gamma\'][\'1H\'])
")) self.textEdit_3.setHtml(_translate("CalcDialog", "\n" "\n" "x y y_err
\n" "s[i].x s[i+2].y s[i-1].y_err
\n" "np.function
\n" "fit[\'NAME\']
\n" "Name.func(p, x, *args)
\n" "const[\'NAME\']
")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("CalcDialog", "Parameter")) self.textEdit_2.setHtml(_translate("CalcDialog", "\n" "\n" "Substract neighbouring datasets:
\n" "Normalize on fit value M∞:
\n" "Logscale x:
\n" "Division by exponential decay:
\n" "y = y-s[i+1].y
\n" "y = y/fit[\'M_infty\']
\n" "x = np.log10(x)
\n" "y = y/np.exp(-x/10)
\n" "y = y/Exponential_Decay.func([0, 1, 10, 1], x)
")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("CalcDialog", "Example")) self.treeWidget.headerItem().setText(0, _translate("CalcDialog", "Namespace")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("CalcDialog", "Namespace")) self.label.setText(_translate("CalcDialog", "Expressions are evaluated line by line and change previous values")) self.label_2.setText(_translate("CalcDialog", "Select sets for evaluation
(no selection = all visible):