1
0
forked from IPKM/nmreval
nmreval/src/gui_qt/_py/evalexpression.py
dominik 8d148b639b BUGFIX: VFT;
change to src layout
2022-10-20 17:23:15 +02:00

218 lines
17 KiB
Python

# -*- 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", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Noto Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- X, y, and Δy values </p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- Values of dataset on position <span style=\" font-style:italic;\">i</span> in list</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> (<span style=\" font-style:italic;\">s[i].x</span> and <span style=\" font-style:italic;\">x</span> return the same values)</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- Numpy functions</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- If available, fit parameters</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> (see namespace for available parameters)</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- Fit functions:</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> (meaning of p and extra arguments </p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> depend on function)</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">- Constants:</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> (nuclei are accessed by <span style=\" font-style:italic;\">const[\'gamma\'][\'1H\']</span>)</p></body></html>"))
self.textEdit_3.setHtml(_translate("CalcDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Noto Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">x y y_err</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">s[i].x s[i+2].y</span> <span style=\" font-style:italic;\">s[i-1].y_err</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-style:italic;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">np.function</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">fit[\'NAME\']</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-style:italic;\"><br /></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">Name.func(p, x, *args) </span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-style:italic;\"><br /></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">const[\'NAME\']</span></p></body></html>"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("CalcDialog", "Parameter"))
self.textEdit_2.setHtml(_translate("CalcDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Noto Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Substract neighbouring datasets: </p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Normalize on fit value M<span style=\" vertical-align:sub;\">∞</span>:</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Logscale x:</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Division by exponential decay:</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.textEdit_4.setHtml(_translate("CalcDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Noto Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">y = y-s[i+1].y</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">y = y/fit[\'M_infty\']</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">x = np.log10(x)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">y = y/np.exp(-x/10)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">y = y/Exponential_Decay.func([0, 1, 10, 1], x)</span></p></body></html>"))
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", "<html><head/><body><p>Select sets for evaluation<br>(no selection = all visible):</p></body></html>"))
self.overwrite_checkbox.setText(_translate("CalcDialog", "Overwrite values?"))