From 7c83b6e1cae37b3b8e08ece9b5330af959b51aea Mon Sep 17 00:00:00 2001
From: Dominik Demuth
Specify which columns are used for y values.
- \'Points\': Every number creates a new data set;
- \'FID\'/\'Spectrum\': Numbers at even positions are used for real parts, at odd positions for imaginary parts.
Specify which column is used for x values, write index to use row numbers (starting with 0).
")) + self.label_5.setText(_translate("ascii_reader", "Δy
")) + self.x_label.setText(_translate("ascii_reader", "x")) + self.dsdfsf.setText(_translate("ascii_reader", "Numerical value")) + self.label_9.setText(_translate("ascii_reader", "Match index")) + self.regex_input.setToolTip(_translate("ascii_reader", "Token:
[abc]: Matches any of a, b, or c
[a-z]: Matches any digit in the range a-z
\\d: Matches any digit in the range 0-9 (equal to [0-9}
Quantifiers:
a*: 0 or more of a
a*: 1 or more of a
a?: 0 or 1 of a
Lower bound. Same bound is used for all data. Leave empty for no boundary condition.
")) + self.label_3.setText(_translate("FitParameter", "Textlabel")) + self.lineEdit_2.setToolTip(_translate("FitParameter", "Upper bound. Same bound is used for all data. Leave empty for no boundary condition.
")) +from ..lib.forms import LineEdit diff --git a/src/gui_qt/_py/fitresult.py b/src/gui_qt/_py/fitresult.py new file mode 100644 index 0000000..b4424ab --- /dev/null +++ b/src/gui_qt/_py/fitresult.py @@ -0,0 +1,291 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/fitresult.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(969, 974) + self.gridLayout = QtWidgets.QGridLayout(Dialog) + self.gridLayout.setObjectName("gridLayout") + self.stack = QtWidgets.QTabWidget(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.stack.sizePolicy().hasHeightForWidth()) + self.stack.setSizePolicy(sizePolicy) + self.stack.setObjectName("stack") + self.stackPage1 = QtWidgets.QWidget() + self.stackPage1.setObjectName("stackPage1") + self.gridLayout_3 = QtWidgets.QGridLayout(self.stackPage1) + self.gridLayout_3.setContentsMargins(6, 3, 6, 3) + self.gridLayout_3.setSpacing(3) + self.gridLayout_3.setObjectName("gridLayout_3") + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.gridLayout_3.addItem(spacerItem, 2, 3, 1, 1) + self.autoscale_box = QtWidgets.QToolButton(parent=self.stackPage1) + self.autoscale_box.setObjectName("autoscale_box") + self.gridLayout_3.addWidget(self.autoscale_box, 2, 4, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.gridLayout_3.addItem(spacerItem1, 2, 1, 1, 1) + self.verticalGroupBox_2 = QtWidgets.QGroupBox(parent=self.stackPage1) + self.verticalGroupBox_2.setObjectName("verticalGroupBox_2") + self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.verticalGroupBox_2) + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.logx_box = QtWidgets.QCheckBox(parent=self.verticalGroupBox_2) + self.logx_box.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight) + self.logx_box.setObjectName("logx_box") + self.verticalLayout_4.addWidget(self.logx_box) + self.logy_box = QtWidgets.QCheckBox(parent=self.verticalGroupBox_2) + self.logy_box.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight) + self.logy_box.setObjectName("logy_box") + self.verticalLayout_4.addWidget(self.logy_box) + self.gridLayout_3.addWidget(self.verticalGroupBox_2, 2, 2, 1, 1) + self.verticalGroupBox = QtWidgets.QGroupBox(parent=self.stackPage1) + self.verticalGroupBox.setObjectName("verticalGroupBox") + self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalGroupBox) + self.verticalLayout.setObjectName("verticalLayout") + self.rel_dev_button = QtWidgets.QRadioButton(parent=self.verticalGroupBox) + self.rel_dev_button.setObjectName("rel_dev_button") + self.buttonGroup = QtWidgets.QButtonGroup(Dialog) + self.buttonGroup.setObjectName("buttonGroup") + self.buttonGroup.addButton(self.rel_dev_button) + self.verticalLayout.addWidget(self.rel_dev_button) + self.abs_dev_button = QtWidgets.QRadioButton(parent=self.verticalGroupBox) + self.abs_dev_button.setChecked(True) + self.abs_dev_button.setObjectName("abs_dev_button") + self.buttonGroup.addButton(self.abs_dev_button) + self.verticalLayout.addWidget(self.abs_dev_button) + self.gridLayout_3.addWidget(self.verticalGroupBox, 2, 0, 1, 1) + self.graphicsView = GraphicsLayoutWidget(parent=self.stackPage1) + self.graphicsView.setObjectName("graphicsView") + self.gridLayout_3.addWidget(self.graphicsView, 0, 0, 1, 5) + self.stack.addTab(self.stackPage1, "") + self.stackPage2 = QtWidgets.QWidget() + self.stackPage2.setObjectName("stackPage2") + self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.stackPage2) + self.verticalLayout_2.setContentsMargins(3, 3, 3, 3) + self.verticalLayout_2.setSpacing(3) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.stats_tableWidget = QtWidgets.QTableWidget(parent=self.stackPage2) + self.stats_tableWidget.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.stats_tableWidget.setGridStyle(QtCore.Qt.PenStyle.NoPen) + self.stats_tableWidget.setColumnCount(1) + self.stats_tableWidget.setObjectName("stats_tableWidget") + self.stats_tableWidget.setRowCount(0) + self.stats_tableWidget.horizontalHeader().setVisible(False) + self.stats_tableWidget.horizontalHeader().setSortIndicatorShown(True) + self.verticalLayout_2.addWidget(self.stats_tableWidget) + self.stack.addTab(self.stackPage2, "") + self.stackPage3 = QtWidgets.QWidget() + self.stackPage3.setObjectName("stackPage3") + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.stackPage3) + self.verticalLayout_3.setContentsMargins(3, 3, 3, 3) + self.verticalLayout_3.setSpacing(3) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.corr_tableWidget = QtWidgets.QTableWidget(parent=self.stackPage3) + self.corr_tableWidget.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.corr_tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.corr_tableWidget.setGridStyle(QtCore.Qt.PenStyle.NoPen) + self.corr_tableWidget.setObjectName("corr_tableWidget") + self.corr_tableWidget.setColumnCount(4) + self.corr_tableWidget.setRowCount(0) + item = QtWidgets.QTableWidgetItem() + self.corr_tableWidget.setHorizontalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.corr_tableWidget.setHorizontalHeaderItem(1, item) + item = QtWidgets.QTableWidgetItem() + self.corr_tableWidget.setHorizontalHeaderItem(2, item) + item = QtWidgets.QTableWidgetItem() + self.corr_tableWidget.setHorizontalHeaderItem(3, item) + self.corr_tableWidget.horizontalHeader().setStretchLastSection(True) + self.corr_tableWidget.verticalHeader().setVisible(False) + self.verticalLayout_3.addWidget(self.corr_tableWidget) + self.stack.addTab(self.stackPage3, "") + self.gridLayout.addWidget(self.stack, 0, 1, 5, 1) + self.param_tableWidget = QtWidgets.QTableWidget(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.param_tableWidget.sizePolicy().hasHeightForWidth()) + self.param_tableWidget.setSizePolicy(sizePolicy) + self.param_tableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAsNeeded) + self.param_tableWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.SizeAdjustPolicy.AdjustIgnored) + self.param_tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.param_tableWidget.setAlternatingRowColors(True) + self.param_tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection) + self.param_tableWidget.setColumnCount(1) + self.param_tableWidget.setObjectName("param_tableWidget") + self.param_tableWidget.setRowCount(0) + self.param_tableWidget.horizontalHeader().setVisible(False) + self.param_tableWidget.horizontalHeader().setStretchLastSection(True) + self.gridLayout.addWidget(self.param_tableWidget, 1, 0, 1, 1) + self.del_prev_checkBox = QtWidgets.QCheckBox(parent=Dialog) + self.del_prev_checkBox.setObjectName("del_prev_checkBox") + self.gridLayout.addWidget(self.del_prev_checkBox, 3, 0, 1, 1) + self.line = QtWidgets.QFrame(parent=Dialog) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.gridLayout.addWidget(self.line, 5, 0, 1, 2) + self.sets_comboBox = ElideComboBox(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sets_comboBox.sizePolicy().hasHeightForWidth()) + self.sets_comboBox.setSizePolicy(sizePolicy) + self.sets_comboBox.setMaximumSize(QtCore.QSize(400, 16777215)) + self.sets_comboBox.setBaseSize(QtCore.QSize(200, 0)) + self.sets_comboBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLength) + self.sets_comboBox.setObjectName("sets_comboBox") + self.gridLayout.addWidget(self.sets_comboBox, 0, 0, 1, 1) + self.reject_fit_checkBox = QtWidgets.QCheckBox(parent=Dialog) + self.reject_fit_checkBox.setObjectName("reject_fit_checkBox") + self.gridLayout.addWidget(self.reject_fit_checkBox, 2, 0, 1, 1) + self.groupBox = QtWidgets.QGroupBox(parent=Dialog) + self.groupBox.setObjectName("groupBox") + self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox) + self.gridLayout_2.setContentsMargins(3, 3, 3, 3) + self.gridLayout_2.setSpacing(3) + self.gridLayout_2.setObjectName("gridLayout_2") + self.graph_comboBox = QtWidgets.QComboBox(parent=self.groupBox) + self.graph_comboBox.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.graph_comboBox.sizePolicy().hasHeightForWidth()) + self.graph_comboBox.setSizePolicy(sizePolicy) + self.graph_comboBox.setObjectName("graph_comboBox") + self.gridLayout_2.addWidget(self.graph_comboBox, 1, 7, 1, 1) + self.minx_line = QtWidgets.QLineEdit(parent=self.groupBox) + self.minx_line.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.minx_line.sizePolicy().hasHeightForWidth()) + self.minx_line.setSizePolicy(sizePolicy) + self.minx_line.setObjectName("minx_line") + self.gridLayout_2.addWidget(self.minx_line, 1, 1, 1, 1) + self.extrapolate_box = QtWidgets.QCheckBox(parent=self.groupBox) + self.extrapolate_box.setObjectName("extrapolate_box") + self.gridLayout_2.addWidget(self.extrapolate_box, 1, 0, 1, 1) + self.numx_line = QtWidgets.QLineEdit(parent=self.groupBox) + self.numx_line.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.numx_line.sizePolicy().hasHeightForWidth()) + self.numx_line.setSizePolicy(sizePolicy) + self.numx_line.setObjectName("numx_line") + self.gridLayout_2.addWidget(self.numx_line, 1, 3, 1, 1) + self.graph_checkBox = QtWidgets.QCheckBox(parent=self.groupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.graph_checkBox.sizePolicy().hasHeightForWidth()) + self.graph_checkBox.setSizePolicy(sizePolicy) + self.graph_checkBox.setChecked(True) + self.graph_checkBox.setObjectName("graph_checkBox") + self.gridLayout_2.addWidget(self.graph_checkBox, 1, 6, 1, 1) + self.maxx_line = QtWidgets.QLineEdit(parent=self.groupBox) + self.maxx_line.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.maxx_line.sizePolicy().hasHeightForWidth()) + self.maxx_line.setSizePolicy(sizePolicy) + self.maxx_line.setObjectName("maxx_line") + self.gridLayout_2.addWidget(self.maxx_line, 1, 2, 1, 1) + self.line_2 = QtWidgets.QFrame(parent=self.groupBox) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.VLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout_2.addWidget(self.line_2, 0, 5, 2, 1) + self.newx_log_checkbox = QtWidgets.QCheckBox(parent=self.groupBox) + self.newx_log_checkbox.setEnabled(False) + self.newx_log_checkbox.setObjectName("newx_log_checkbox") + self.gridLayout_2.addWidget(self.newx_log_checkbox, 1, 4, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.curve_checkbox = QtWidgets.QCheckBox(parent=self.groupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.curve_checkbox.sizePolicy().hasHeightForWidth()) + self.curve_checkbox.setSizePolicy(sizePolicy) + self.curve_checkbox.setChecked(True) + self.curve_checkbox.setObjectName("curve_checkbox") + self.horizontalLayout.addWidget(self.curve_checkbox) + self.partial_checkBox = QtWidgets.QCheckBox(parent=self.groupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.partial_checkBox.sizePolicy().hasHeightForWidth()) + self.partial_checkBox.setSizePolicy(sizePolicy) + self.partial_checkBox.setObjectName("partial_checkBox") + self.horizontalLayout.addWidget(self.partial_checkBox) + self.gridLayout_2.addLayout(self.horizontalLayout, 0, 0, 1, 5) + self.parameter_checkbox = QtWidgets.QCheckBox(parent=self.groupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.parameter_checkbox.sizePolicy().hasHeightForWidth()) + self.parameter_checkbox.setSizePolicy(sizePolicy) + self.parameter_checkbox.setObjectName("parameter_checkbox") + self.gridLayout_2.addWidget(self.parameter_checkbox, 0, 6, 1, 2) + self.gridLayout.addWidget(self.groupBox, 7, 0, 1, 2) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok|QtWidgets.QDialogButtonBox.StandardButton.Retry) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 8, 0, 1, 2) + + self.retranslateUi(Dialog) + self.stack.setCurrentIndex(0) + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Fit results")) + self.autoscale_box.setToolTip(_translate("Dialog", "Auto-scale graph for all sets")) + self.autoscale_box.setText(_translate("Dialog", "Autoscale all sets")) + self.verticalGroupBox_2.setTitle(_translate("Dialog", "Logarithmic axes")) + self.logx_box.setText(_translate("Dialog", "x axis")) + self.logy_box.setText(_translate("Dialog", "y axis")) + self.verticalGroupBox.setTitle(_translate("Dialog", "Residuals")) + self.rel_dev_button.setText(_translate("Dialog", "relative deviation")) + self.abs_dev_button.setText(_translate("Dialog", "absolute deviation")) + self.stack.setTabText(self.stack.indexOf(self.stackPage1), _translate("Dialog", "Plot")) + self.stack.setTabText(self.stack.indexOf(self.stackPage2), _translate("Dialog", "Statistics")) + item = self.corr_tableWidget.horizontalHeaderItem(0) + item.setText(_translate("Dialog", "Parameter 1")) + item = self.corr_tableWidget.horizontalHeaderItem(1) + item.setText(_translate("Dialog", "Parameter 2")) + item = self.corr_tableWidget.horizontalHeaderItem(2) + item.setText(_translate("Dialog", "Corr.")) + item = self.corr_tableWidget.horizontalHeaderItem(3) + item.setText(_translate("Dialog", "Partial Corr.")) + self.stack.setTabText(self.stack.indexOf(self.stackPage3), _translate("Dialog", "Correlations")) + self.del_prev_checkBox.setText(_translate("Dialog", "Delete previous fits of this set")) + self.reject_fit_checkBox.setText(_translate("Dialog", "Reject this fit")) + self.groupBox.setTitle(_translate("Dialog", "Output")) + self.minx_line.setToolTip(_translate("Dialog", "Leave empty to start at lowest point")) + self.minx_line.setPlaceholderText(_translate("Dialog", "min x")) + self.extrapolate_box.setToolTip(_translate("Dialog", "Extrapolates only main function")) + self.extrapolate_box.setText(_translate("Dialog", "Extrapolate curves")) + self.numx_line.setPlaceholderText(_translate("Dialog", "# pts")) + self.graph_checkBox.setText(_translate("Dialog", "New graph for parameter")) + self.maxx_line.setToolTip(_translate("Dialog", "Leave empty to start at highest point")) + self.maxx_line.setPlaceholderText(_translate("Dialog", "max x")) + self.newx_log_checkbox.setText(_translate("Dialog", "log-spaced?")) + self.curve_checkbox.setText(_translate("Dialog", "Plot fit curve")) + self.partial_checkBox.setText(_translate("Dialog", "Plot partial functions")) + self.parameter_checkbox.setText(_translate("Dialog", "Plot parameter")) +from ..lib.forms import ElideComboBox +from pyqtgraph import GraphicsLayoutWidget diff --git a/src/gui_qt/_py/gol.py b/src/gui_qt/_py/gol.py new file mode 100644 index 0000000..0b77c02 --- /dev/null +++ b/src/gui_qt/_py/gol.py @@ -0,0 +1,275 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/gol.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Form(object): + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(883, 732) + self.gridLayout_2 = QtWidgets.QGridLayout(Form) + self.gridLayout_2.setObjectName("gridLayout_2") + self.widget = QtWidgets.QWidget(parent=Form) + self.widget.setObjectName("widget") + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.widget) + self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.vanish_shadow = QtWidgets.QRadioButton(parent=self.widget) + self.vanish_shadow.setChecked(True) + self.vanish_shadow.setObjectName("vanish_shadow") + self.buttonGroup = QtWidgets.QButtonGroup(Form) + self.buttonGroup.setObjectName("buttonGroup") + self.buttonGroup.addButton(self.vanish_shadow) + self.verticalLayout_3.addWidget(self.vanish_shadow) + self.full_shadow = QtWidgets.QRadioButton(parent=self.widget) + self.full_shadow.setObjectName("full_shadow") + self.buttonGroup.addButton(self.full_shadow) + self.verticalLayout_3.addWidget(self.full_shadow) + self.radioButton = QtWidgets.QRadioButton(parent=self.widget) + self.radioButton.setObjectName("radioButton") + self.buttonGroup.addButton(self.radioButton) + self.verticalLayout_3.addWidget(self.radioButton) + self.line = QtWidgets.QFrame(parent=self.widget) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.verticalLayout_3.addWidget(self.line) + self.faster_button = QtWidgets.QToolButton(parent=self.widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.faster_button.sizePolicy().hasHeightForWidth()) + self.faster_button.setSizePolicy(sizePolicy) + self.faster_button.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.faster_button.setArrowType(QtCore.Qt.ArrowType.RightArrow) + self.faster_button.setObjectName("faster_button") + self.verticalLayout_3.addWidget(self.faster_button) + self.velocity_label = QtWidgets.QLabel(parent=self.widget) + self.velocity_label.setObjectName("velocity_label") + self.verticalLayout_3.addWidget(self.velocity_label) + self.slower_button = QtWidgets.QToolButton(parent=self.widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.slower_button.sizePolicy().hasHeightForWidth()) + self.slower_button.setSizePolicy(sizePolicy) + self.slower_button.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.slower_button.setArrowType(QtCore.Qt.ArrowType.LeftArrow) + self.slower_button.setObjectName("slower_button") + self.verticalLayout_3.addWidget(self.slower_button) + self.current_step = QtWidgets.QLabel(parent=self.widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.current_step.sizePolicy().hasHeightForWidth()) + self.current_step.setSizePolicy(sizePolicy) + self.current_step.setObjectName("current_step") + self.verticalLayout_3.addWidget(self.current_step) + self.pause_button = QtWidgets.QPushButton(parent=self.widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Ignored, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pause_button.sizePolicy().hasHeightForWidth()) + self.pause_button.setSizePolicy(sizePolicy) + self.pause_button.setCheckable(True) + self.pause_button.setObjectName("pause_button") + self.verticalLayout_3.addWidget(self.pause_button) + self.line_3 = QtWidgets.QFrame(parent=self.widget) + self.line_3.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_3.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_3.setObjectName("line_3") + self.verticalLayout_3.addWidget(self.line_3) + self.label_6 = QtWidgets.QLabel(parent=self.widget) + self.label_6.setObjectName("label_6") + self.verticalLayout_3.addWidget(self.label_6) + self.cover_label = QtWidgets.QLabel(parent=self.widget) + self.cover_label.setText("") + self.cover_label.setObjectName("cover_label") + self.verticalLayout_3.addWidget(self.cover_label) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.verticalLayout_3.addItem(spacerItem) + self.gridLayout_2.addWidget(self.widget, 0, 0, 1, 1) + self.view = QtWidgets.QGraphicsView(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.view.sizePolicy().hasHeightForWidth()) + self.view.setSizePolicy(sizePolicy) + self.view.setStyleSheet("background-color: transparent") + self.view.setFrameShape(QtWidgets.QFrame.Shape.NoFrame) + self.view.setObjectName("view") + self.gridLayout_2.addWidget(self.view, 0, 1, 1, 1) + self.option_frame = QtWidgets.QFrame(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.option_frame.sizePolicy().hasHeightForWidth()) + self.option_frame.setSizePolicy(sizePolicy) + self.option_frame.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.option_frame.setObjectName("option_frame") + self.gridLayout = QtWidgets.QGridLayout(self.option_frame) + self.gridLayout.setContentsMargins(3, 3, 3, 3) + self.gridLayout.setHorizontalSpacing(6) + self.gridLayout.setVerticalSpacing(3) + self.gridLayout.setObjectName("gridLayout") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.rule_label = QtWidgets.QLabel(parent=self.option_frame) + self.rule_label.setObjectName("rule_label") + self.horizontalLayout_2.addWidget(self.rule_label) + self.rule_cb = QtWidgets.QComboBox(parent=self.option_frame) + self.rule_cb.setObjectName("rule_cb") + self.horizontalLayout_2.addWidget(self.rule_cb) + self.gridLayout.addLayout(self.horizontalLayout_2, 3, 0, 1, 1) + self.line_2 = QtWidgets.QFrame(parent=self.option_frame) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout.addWidget(self.line_2, 2, 0, 1, 1) + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setContentsMargins(-1, 0, -1, 0) + self.verticalLayout_2.setSpacing(3) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.object_widget = QtWidgets.QWidget(parent=self.option_frame) + self.object_widget.setObjectName("object_widget") + self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.object_widget) + self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_6.setSpacing(3) + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.label_5 = QtWidgets.QLabel(parent=self.object_widget) + self.label_5.setObjectName("label_5") + self.horizontalLayout_6.addWidget(self.label_5) + self.object_size = QtWidgets.QSpinBox(parent=self.object_widget) + self.object_size.setMinimum(1) + self.object_size.setMaximum(600) + self.object_size.setObjectName("object_size") + self.horizontalLayout_6.addWidget(self.object_size) + self.verticalLayout_2.addWidget(self.object_widget) + self.rand_button_wdgt = QtWidgets.QWidget(parent=self.option_frame) + self.rand_button_wdgt.setObjectName("rand_button_wdgt") + self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.rand_button_wdgt) + self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_7.setSpacing(3) + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.add_random_button = QtWidgets.QPushButton(parent=self.rand_button_wdgt) + self.add_random_button.setObjectName("add_random_button") + self.horizontalLayout_7.addWidget(self.add_random_button) + self.remove_random_button = QtWidgets.QPushButton(parent=self.rand_button_wdgt) + self.remove_random_button.setObjectName("remove_random_button") + self.horizontalLayout_7.addWidget(self.remove_random_button) + self.verticalLayout_2.addWidget(self.rand_button_wdgt) + self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + self.verticalLayout_2.addLayout(self.verticalLayout) + self.gridLayout.addLayout(self.verticalLayout_2, 2, 1, 4, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.label_3 = QtWidgets.QLabel(parent=self.option_frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) + self.label_3.setSizePolicy(sizePolicy) + self.label_3.setObjectName("label_3") + self.horizontalLayout.addWidget(self.label_3) + self.survival_line = QtWidgets.QLineEdit(parent=self.option_frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.survival_line.sizePolicy().hasHeightForWidth()) + self.survival_line.setSizePolicy(sizePolicy) + self.survival_line.setObjectName("survival_line") + self.horizontalLayout.addWidget(self.survival_line) + self.label_4 = QtWidgets.QLabel(parent=self.option_frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + self.label_4.setSizePolicy(sizePolicy) + self.label_4.setObjectName("label_4") + self.horizontalLayout.addWidget(self.label_4) + self.birth_line = QtWidgets.QLineEdit(parent=self.option_frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.birth_line.sizePolicy().hasHeightForWidth()) + self.birth_line.setSizePolicy(sizePolicy) + self.birth_line.setObjectName("birth_line") + self.horizontalLayout.addWidget(self.birth_line) + self.gridLayout.addLayout(self.horizontalLayout, 4, 0, 1, 1) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.label = QtWidgets.QLabel(parent=self.option_frame) + self.label.setObjectName("label") + self.horizontalLayout_3.addWidget(self.label) + self.width_box = QtWidgets.QSpinBox(parent=self.option_frame) + self.width_box.setMaximum(600) + self.width_box.setProperty("value", 100) + self.width_box.setObjectName("width_box") + self.horizontalLayout_3.addWidget(self.width_box) + self.label_2 = QtWidgets.QLabel(parent=self.option_frame) + self.label_2.setObjectName("label_2") + self.horizontalLayout_3.addWidget(self.label_2) + self.height_box = QtWidgets.QSpinBox(parent=self.option_frame) + self.height_box.setMaximum(600) + self.height_box.setProperty("value", 100) + self.height_box.setObjectName("height_box") + self.horizontalLayout_3.addWidget(self.height_box) + self.gridLayout.addLayout(self.horizontalLayout_3, 1, 0, 1, 1) + self.object_combobox = QtWidgets.QComboBox(parent=self.option_frame) + self.object_combobox.setObjectName("object_combobox") + self.object_combobox.addItem("") + self.object_combobox.addItem("") + self.object_combobox.addItem("") + self.object_combobox.addItem("") + self.object_combobox.addItem("") + self.gridLayout.addWidget(self.object_combobox, 1, 1, 1, 1) + self.start_button = QtWidgets.QPushButton(parent=self.option_frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Ignored, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.start_button.sizePolicy().hasHeightForWidth()) + self.start_button.setSizePolicy(sizePolicy) + self.start_button.setObjectName("start_button") + self.gridLayout.addWidget(self.start_button, 0, 0, 1, 2) + self.gridLayout_2.addWidget(self.option_frame, 1, 1, 1, 1) + self.hide_button = QtWidgets.QCheckBox(parent=Form) + self.hide_button.setObjectName("hide_button") + self.gridLayout_2.addWidget(self.hide_button, 1, 0, 1, 1) + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "Game Of Life")) + self.vanish_shadow.setText(_translate("Form", "Motion blur")) + self.full_shadow.setText(_translate("Form", "Scorched earth")) + self.radioButton.setText(_translate("Form", "Nothing")) + self.faster_button.setText(_translate("Form", "Faster")) + self.velocity_label.setText(_translate("Form", "10 steps / s")) + self.slower_button.setText(_translate("Form", "Slower")) + self.current_step.setText(_translate("Form", "0 step")) + self.pause_button.setText(_translate("Form", "Pause")) + self.label_6.setText(_translate("Form", "Coverage:")) + self.rule_label.setText(_translate("Form", "Rule")) + self.label_5.setText(_translate("Form", "Size")) + self.add_random_button.setText(_translate("Form", "Add Random")) + self.remove_random_button.setText(_translate("Form", "Remove Random")) + self.label_3.setText(_translate("Form", "Survival")) + self.label_4.setText(_translate("Form", " Birth")) + self.label.setText(_translate("Form", "Width")) + self.label_2.setText(_translate("Form", "Height")) + self.object_combobox.setItemText(0, _translate("Form", "Random")) + self.object_combobox.setItemText(1, _translate("Form", "Circle")) + self.object_combobox.setItemText(2, _translate("Form", "Square")) + self.object_combobox.setItemText(3, _translate("Form", "Diamond")) + self.object_combobox.setItemText(4, _translate("Form", "Plus")) + self.start_button.setText(_translate("Form", "Start")) + self.hide_button.setText(_translate("Form", "Hide options")) diff --git a/src/gui_qt/_py/gracereader.py b/src/gui_qt/_py/gracereader.py new file mode 100644 index 0000000..6137fbd --- /dev/null +++ b/src/gui_qt/_py/gracereader.py @@ -0,0 +1,91 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/gracereader.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(400, 613) + self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) + self.verticalLayout.setObjectName("verticalLayout") + self.label = QtWidgets.QLabel(parent=Dialog) + self.label.setObjectName("label") + self.verticalLayout.addWidget(self.label) + self.treeWidget = QtWidgets.QTreeWidget(parent=Dialog) + self.treeWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection) + self.treeWidget.setObjectName("treeWidget") + self.treeWidget.headerItem().setText(0, "1") + self.treeWidget.header().setVisible(False) + self.verticalLayout.addWidget(self.treeWidget) + self.tableWidget = QtWidgets.QTableWidget(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth()) + self.tableWidget.setSizePolicy(sizePolicy) + self.tableWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.tableWidget.setGridStyle(QtCore.Qt.PenStyle.NoPen) + self.tableWidget.setRowCount(4) + self.tableWidget.setColumnCount(2) + self.tableWidget.setObjectName("tableWidget") + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(0, 0, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(0, 1, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(1, 0, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(1, 1, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(2, 0, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(2, 1, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable|QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(3, 0, item) + item = QtWidgets.QTableWidgetItem() + item.setFlags(QtCore.Qt.ItemFlag.ItemIsEnabled) + self.tableWidget.setItem(3, 1, item) + self.tableWidget.horizontalHeader().setVisible(False) + self.tableWidget.horizontalHeader().setStretchLastSection(True) + self.tableWidget.verticalHeader().setVisible(False) + self.verticalLayout.addWidget(self.tableWidget) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout.addWidget(self.buttonBox) + + self.retranslateUi(Dialog) + self.buttonBox.accepted.connect(Dialog.accept) # type: ignore + self.buttonBox.rejected.connect(Dialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Load data from agr")) + self.label.setText(_translate("Dialog", "Only data will be loaded, no line and symbol properties!")) + __sortingEnabled = self.tableWidget.isSortingEnabled() + self.tableWidget.setSortingEnabled(False) + item = self.tableWidget.item(0, 0) + item.setText(_translate("Dialog", "Symbol")) + item = self.tableWidget.item(1, 0) + item.setText(_translate("Dialog", "Symbol color")) + item = self.tableWidget.item(2, 0) + item.setText(_translate("Dialog", "Linestyle")) + item = self.tableWidget.item(3, 0) + item.setText(_translate("Dialog", "Line color")) + self.tableWidget.setSortingEnabled(__sortingEnabled) diff --git a/src/gui_qt/_py/graph.py b/src/gui_qt/_py/graph.py new file mode 100644 index 0000000..3526a5e --- /dev/null +++ b/src/gui_qt/_py/graph.py @@ -0,0 +1,279 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/graph.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_GraphWindow(object): + def setupUi(self, GraphWindow): + GraphWindow.setObjectName("GraphWindow") + GraphWindow.resize(680, 520) + GraphWindow.setBaseSize(QtCore.QSize(300, 10)) + self.verticalLayout = QtWidgets.QVBoxLayout(GraphWindow) + self.verticalLayout.setContentsMargins(3, 3, 3, 3) + self.verticalLayout.setSpacing(3) + self.verticalLayout.setObjectName("verticalLayout") + self.widget = QtWidgets.QWidget(parent=GraphWindow) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.widget.sizePolicy().hasHeightForWidth()) + self.widget.setSizePolicy(sizePolicy) + self.widget.setObjectName("widget") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setSpacing(1) + self.horizontalLayout.setObjectName("horizontalLayout") + self.logx_button = QtWidgets.QToolButton(parent=self.widget) + self.logx_button.setIconSize(QtCore.QSize(16, 16)) + self.logx_button.setCheckable(True) + self.logx_button.setAutoRaise(True) + self.logx_button.setObjectName("logx_button") + self.horizontalLayout.addWidget(self.logx_button) + self.logy_button = QtWidgets.QToolButton(parent=self.widget) + self.logy_button.setIconSize(QtCore.QSize(16, 16)) + self.logy_button.setCheckable(True) + self.logy_button.setAutoRaise(True) + self.logy_button.setObjectName("logy_button") + self.horizontalLayout.addWidget(self.logy_button) + self.line = QtWidgets.QFrame(parent=self.widget) + self.line.setFrameShape(QtWidgets.QFrame.Shape.VLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.horizontalLayout.addWidget(self.line) + self.gridbutton = QtWidgets.QToolButton(parent=self.widget) + self.gridbutton.setCheckable(True) + self.gridbutton.setAutoRaise(True) + self.gridbutton.setObjectName("gridbutton") + self.horizontalLayout.addWidget(self.gridbutton) + self.bwbutton = QtWidgets.QToolButton(parent=self.widget) + self.bwbutton.setCheckable(True) + self.bwbutton.setAutoRaise(True) + self.bwbutton.setObjectName("bwbutton") + self.horizontalLayout.addWidget(self.bwbutton) + self.line_2 = QtWidgets.QFrame(parent=self.widget) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.VLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.horizontalLayout.addWidget(self.line_2) + self.legend_button = QtWidgets.QToolButton(parent=self.widget) + self.legend_button.setIconSize(QtCore.QSize(16, 16)) + self.legend_button.setCheckable(True) + self.legend_button.setAutoRaise(True) + self.legend_button.setObjectName("legend_button") + self.horizontalLayout.addWidget(self.legend_button) + self.imag_button = QtWidgets.QToolButton(parent=self.widget) + self.imag_button.setIconSize(QtCore.QSize(16, 16)) + self.imag_button.setCheckable(True) + self.imag_button.setChecked(True) + self.imag_button.setAutoRaise(True) + self.imag_button.setObjectName("imag_button") + self.horizontalLayout.addWidget(self.imag_button) + self.real_button = QtWidgets.QToolButton(parent=self.widget) + self.real_button.setIconSize(QtCore.QSize(16, 16)) + self.real_button.setCheckable(True) + self.real_button.setChecked(True) + self.real_button.setAutoRaise(True) + self.real_button.setObjectName("real_button") + self.horizontalLayout.addWidget(self.real_button) + self.error_button = QtWidgets.QToolButton(parent=self.widget) + self.error_button.setIconSize(QtCore.QSize(16, 16)) + self.error_button.setCheckable(True) + self.error_button.setAutoRaise(True) + self.error_button.setObjectName("error_button") + self.horizontalLayout.addWidget(self.error_button) + self.line_3 = QtWidgets.QFrame(parent=self.widget) + self.line_3.setFrameShape(QtWidgets.QFrame.Shape.VLine) + self.line_3.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_3.setObjectName("line_3") + self.horizontalLayout.addWidget(self.line_3) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem) + self.limit_button = QtWidgets.QToolButton(parent=self.widget) + self.limit_button.setCheckable(True) + self.limit_button.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.limit_button.setAutoRaise(True) + self.limit_button.setArrowType(QtCore.Qt.ArrowType.RightArrow) + self.limit_button.setObjectName("limit_button") + self.horizontalLayout.addWidget(self.limit_button) + self.label_button = QtWidgets.QToolButton(parent=self.widget) + self.label_button.setCheckable(True) + self.label_button.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.label_button.setAutoRaise(True) + self.label_button.setArrowType(QtCore.Qt.ArrowType.RightArrow) + self.label_button.setObjectName("label_button") + self.horizontalLayout.addWidget(self.label_button) + self.verticalLayout.addWidget(self.widget) + self.line_4 = QtWidgets.QFrame(parent=GraphWindow) + self.line_4.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_4.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_4.setObjectName("line_4") + self.verticalLayout.addWidget(self.line_4) + self.limit_widget = QtWidgets.QWidget(parent=GraphWindow) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.limit_widget.sizePolicy().hasHeightForWidth()) + self.limit_widget.setSizePolicy(sizePolicy) + self.limit_widget.setObjectName("limit_widget") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.limit_widget) + self.horizontalLayout_2.setContentsMargins(1, 1, 1, 1) + self.horizontalLayout_2.setSpacing(2) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.label = QtWidgets.QLabel(parent=self.limit_widget) + self.label.setObjectName("label") + self.horizontalLayout_2.addWidget(self.label) + self.xmin_lineedit = QtWidgets.QLineEdit(parent=self.limit_widget) + self.xmin_lineedit.setObjectName("xmin_lineedit") + self.horizontalLayout_2.addWidget(self.xmin_lineedit) + self.label_2 = QtWidgets.QLabel(parent=self.limit_widget) + self.label_2.setObjectName("label_2") + self.horizontalLayout_2.addWidget(self.label_2) + self.xmax_lineedit = QtWidgets.QLineEdit(parent=self.limit_widget) + self.xmax_lineedit.setObjectName("xmax_lineedit") + self.horizontalLayout_2.addWidget(self.xmax_lineedit) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_2.addItem(spacerItem1) + self.label_3 = QtWidgets.QLabel(parent=self.limit_widget) + self.label_3.setObjectName("label_3") + self.horizontalLayout_2.addWidget(self.label_3) + self.ymin_lineedit = QtWidgets.QLineEdit(parent=self.limit_widget) + self.ymin_lineedit.setObjectName("ymin_lineedit") + self.horizontalLayout_2.addWidget(self.ymin_lineedit) + self.label_4 = QtWidgets.QLabel(parent=self.limit_widget) + self.label_4.setObjectName("label_4") + self.horizontalLayout_2.addWidget(self.label_4) + self.ymax_lineedit = QtWidgets.QLineEdit(parent=self.limit_widget) + self.ymax_lineedit.setObjectName("ymax_lineedit") + self.horizontalLayout_2.addWidget(self.ymax_lineedit) + self.apply_button = QtWidgets.QPushButton(parent=self.limit_widget) + icon = QtGui.QIcon.fromTheme("dialog-ok") + self.apply_button.setIcon(icon) + self.apply_button.setObjectName("apply_button") + self.horizontalLayout_2.addWidget(self.apply_button) + self.verticalLayout.addWidget(self.limit_widget) + self.label_widget = QtWidgets.QWidget(parent=GraphWindow) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_widget.sizePolicy().hasHeightForWidth()) + self.label_widget.setSizePolicy(sizePolicy) + self.label_widget.setObjectName("label_widget") + self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.label_widget) + self.horizontalLayout_3.setContentsMargins(1, 1, 1, 1) + self.horizontalLayout_3.setSpacing(2) + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.label_5 = QtWidgets.QLabel(parent=self.label_widget) + self.label_5.setObjectName("label_5") + self.horizontalLayout_3.addWidget(self.label_5) + self.title_lineedit = QtWidgets.QLineEdit(parent=self.label_widget) + self.title_lineedit.setObjectName("title_lineedit") + self.horizontalLayout_3.addWidget(self.title_lineedit) + spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_3.addItem(spacerItem2) + self.label_6 = QtWidgets.QLabel(parent=self.label_widget) + self.label_6.setObjectName("label_6") + self.horizontalLayout_3.addWidget(self.label_6) + self.xaxis_linedit = QtWidgets.QLineEdit(parent=self.label_widget) + self.xaxis_linedit.setObjectName("xaxis_linedit") + self.horizontalLayout_3.addWidget(self.xaxis_linedit) + spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_3.addItem(spacerItem3) + self.label_7 = QtWidgets.QLabel(parent=self.label_widget) + self.label_7.setObjectName("label_7") + self.horizontalLayout_3.addWidget(self.label_7) + self.yaxis_linedit = QtWidgets.QLineEdit(parent=self.label_widget) + self.yaxis_linedit.setObjectName("yaxis_linedit") + self.horizontalLayout_3.addWidget(self.yaxis_linedit) + self.verticalLayout.addWidget(self.label_widget) + self.gridLayout = QtWidgets.QGridLayout() + self.gridLayout.setHorizontalSpacing(3) + self.gridLayout.setVerticalSpacing(0) + self.gridLayout.setObjectName("gridLayout") + self.listWidget = QListWidgetSelect(parent=GraphWindow) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) + self.listWidget.setSizePolicy(sizePolicy) + self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection) + self.listWidget.setObjectName("listWidget") + self.gridLayout.addWidget(self.listWidget, 1, 1, 1, 1) + self.checkBox = QtWidgets.QCheckBox(parent=GraphWindow) + self.checkBox.setChecked(True) + self.checkBox.setObjectName("checkBox") + self.gridLayout.addWidget(self.checkBox, 0, 1, 1, 1) + self.graphic = NMRPlotWidget(parent=GraphWindow) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.graphic.sizePolicy().hasHeightForWidth()) + self.graphic.setSizePolicy(sizePolicy) + self.graphic.setObjectName("graphic") + self.gridLayout.addWidget(self.graphic, 0, 0, 2, 1) + self.verticalLayout.addLayout(self.gridLayout) + self.label.setBuddy(self.xmin_lineedit) + self.label_2.setBuddy(self.xmax_lineedit) + self.label_3.setBuddy(self.ymin_lineedit) + self.label_4.setBuddy(self.ymax_lineedit) + self.label_5.setBuddy(self.title_lineedit) + self.label_6.setBuddy(self.xaxis_linedit) + self.label_7.setBuddy(self.yaxis_linedit) + + self.retranslateUi(GraphWindow) + QtCore.QMetaObject.connectSlotsByName(GraphWindow) + GraphWindow.setTabOrder(self.logx_button, self.logy_button) + GraphWindow.setTabOrder(self.logy_button, self.gridbutton) + GraphWindow.setTabOrder(self.gridbutton, self.legend_button) + GraphWindow.setTabOrder(self.legend_button, self.imag_button) + GraphWindow.setTabOrder(self.imag_button, self.error_button) + GraphWindow.setTabOrder(self.error_button, self.limit_button) + GraphWindow.setTabOrder(self.limit_button, self.label_button) + GraphWindow.setTabOrder(self.label_button, self.xmin_lineedit) + GraphWindow.setTabOrder(self.xmin_lineedit, self.xmax_lineedit) + GraphWindow.setTabOrder(self.xmax_lineedit, self.ymin_lineedit) + GraphWindow.setTabOrder(self.ymin_lineedit, self.ymax_lineedit) + GraphWindow.setTabOrder(self.ymax_lineedit, self.title_lineedit) + GraphWindow.setTabOrder(self.title_lineedit, self.xaxis_linedit) + GraphWindow.setTabOrder(self.xaxis_linedit, self.yaxis_linedit) + + def retranslateUi(self, GraphWindow): + _translate = QtCore.QCoreApplication.translate + GraphWindow.setWindowTitle(_translate("GraphWindow", "Form")) + self.logx_button.setToolTip(_translate("GraphWindow", "Change x axis linear <-> logarithmic")) + self.logx_button.setText(_translate("GraphWindow", "Log X")) + self.logy_button.setToolTip(_translate("GraphWindow", "Change y axis linear <-> logarithmic")) + self.logy_button.setText(_translate("GraphWindow", "Log Y")) + self.gridbutton.setToolTip(_translate("GraphWindow", "Show/hide grid")) + self.gridbutton.setText(_translate("GraphWindow", "Grid")) + self.bwbutton.setToolTip(_translate("GraphWindow", "Change background")) + self.bwbutton.setText(_translate("GraphWindow", "Black/white")) + self.legend_button.setToolTip(_translate("GraphWindow", "Change legend")) + self.legend_button.setText(_translate("GraphWindow", "Legend")) + self.imag_button.setToolTip(_translate("GraphWindow", "Show/hide imaginary part")) + self.imag_button.setText(_translate("GraphWindow", "Imaginary")) + self.real_button.setToolTip(_translate("GraphWindow", "Show/hide real part")) + self.real_button.setText(_translate("GraphWindow", "Real")) + self.error_button.setToolTip(_translate("GraphWindow", "Show/hide errorbars")) + self.error_button.setText(_translate("GraphWindow", "Errorbars")) + self.limit_button.setText(_translate("GraphWindow", "Limits")) + self.label_button.setText(_translate("GraphWindow", "Labels")) + self.label.setText(_translate("GraphWindow", "X: ")) + self.label_2.setText(_translate("GraphWindow", "---")) + self.label_3.setText(_translate("GraphWindow", "Y: ")) + self.label_4.setText(_translate("GraphWindow", "---")) + self.apply_button.setText(_translate("GraphWindow", "Apply")) + self.label_5.setText(_translate("GraphWindow", "Title")) + self.title_lineedit.setToolTip(_translate("GraphWindow", "Uses simple latex syntax, does not support italic/math environment. Sub-/superscripts need curly brackets.
Example: \\alpha^{123}
")) + self.label_6.setText(_translate("GraphWindow", "X Axis")) + self.xaxis_linedit.setToolTip(_translate("GraphWindow", "Uses simple latex syntax, does not support italic/math environment. Sub-/superscripts need curly brackets.
Example: \\alpha^{123}
")) + self.label_7.setText(_translate("GraphWindow", "Y Axis")) + self.yaxis_linedit.setToolTip(_translate("GraphWindow", "Uses simple latex syntax, does not support italic/math environment. Sub-/superscripts need curly brackets.
Example: \\alpha^{123}
")) + self.checkBox.setText(_translate("GraphWindow", "Show legend")) +from ..lib.graph_items import NMRPlotWidget +from ..lib.listwidget import QListWidgetSelect diff --git a/src/gui_qt/_py/guidelinewidget.py b/src/gui_qt/_py/guidelinewidget.py new file mode 100644 index 0000000..e8b314e --- /dev/null +++ b/src/gui_qt/_py/guidelinewidget.py @@ -0,0 +1,184 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/guidelinewidget.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Form(object): + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(459, 830) + self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.graph_comboBox = QtWidgets.QComboBox(parent=Form) + self.graph_comboBox.setObjectName("graph_comboBox") + self.verticalLayout_2.addWidget(self.graph_comboBox) + self.listWidget_2 = QtWidgets.QListWidget(parent=Form) + self.listWidget_2.setObjectName("listWidget_2") + self.verticalLayout_2.addWidget(self.listWidget_2) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.pushButton = QtWidgets.QPushButton(parent=Form) + self.pushButton.setObjectName("pushButton") + self.horizontalLayout.addWidget(self.pushButton) + self.pushButton_2 = QtWidgets.QPushButton(parent=Form) + self.pushButton_2.setObjectName("pushButton_2") + self.horizontalLayout.addWidget(self.pushButton_2) + self.pushButton_3 = QtWidgets.QPushButton(parent=Form) + self.pushButton_3.setObjectName("pushButton_3") + self.horizontalLayout.addWidget(self.pushButton_3) + self.verticalLayout_2.addLayout(self.horizontalLayout) + self.frame = QtWidgets.QFrame(parent=Form) + self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.frame.setObjectName("frame") + self.formLayout = QtWidgets.QFormLayout(self.frame) + self.formLayout.setObjectName("formLayout") + self.mode_comboBox = QtWidgets.QComboBox(parent=self.frame) + self.mode_comboBox.setObjectName("mode_comboBox") + self.mode_comboBox.addItem("") + self.mode_comboBox.addItem("") + self.mode_comboBox.addItem("") + self.mode_comboBox.addItem("") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.mode_comboBox) + self.label_12 = QtWidgets.QLabel(parent=self.frame) + self.label_12.setObjectName("label_12") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_12) + self.label_6 = QtWidgets.QLabel(parent=self.frame) + self.label_6.setObjectName("label_6") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_6) + self.comment_lineEdit = QtWidgets.QLineEdit(parent=self.frame) + self.comment_lineEdit.setObjectName("comment_lineEdit") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.comment_lineEdit) + self.label_2 = QtWidgets.QLabel(parent=self.frame) + self.label_2.setObjectName("label_2") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_2) + self.color_comboBox = ColorListEditor(parent=self.frame) + self.color_comboBox.setObjectName("color_comboBox") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.color_comboBox) + self.stackedWidget = QtWidgets.QStackedWidget(parent=self.frame) + self.stackedWidget.setObjectName("stackedWidget") + self.page = QtWidgets.QWidget() + self.page.setObjectName("page") + self.formLayout_2 = QtWidgets.QFormLayout(self.page) + self.formLayout_2.setObjectName("formLayout_2") + self.label_13 = QtWidgets.QLabel(parent=self.page) + self.label_13.setObjectName("label_13") + self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_13) + self.lineEdit_8 = QtWidgets.QLineEdit(parent=self.page) + self.lineEdit_8.setObjectName("lineEdit_8") + self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_8) + self.label = QtWidgets.QLabel(parent=self.page) + self.label.setObjectName("label") + self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label) + self.infiniteline_angle_spinbox = QtWidgets.QSpinBox(parent=self.page) + self.infiniteline_angle_spinbox.setWrapping(True) + self.infiniteline_angle_spinbox.setMaximum(179) + self.infiniteline_angle_spinbox.setObjectName("infiniteline_angle_spinbox") + self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.infiniteline_angle_spinbox) + self.stackedWidget.addWidget(self.page) + self.page_2 = QtWidgets.QWidget() + self.page_2.setObjectName("page_2") + self.verticalLayout = QtWidgets.QVBoxLayout(self.page_2) + self.verticalLayout.setObjectName("verticalLayout") + self.listWidget = QtWidgets.QListWidget(parent=self.page_2) + self.listWidget.setObjectName("listWidget") + self.verticalLayout.addWidget(self.listWidget) + self.stackedWidget.addWidget(self.page_2) + self.page_3 = QtWidgets.QWidget() + self.page_3.setObjectName("page_3") + self.formLayout_3 = QtWidgets.QFormLayout(self.page_3) + self.formLayout_3.setObjectName("formLayout_3") + self.label_5 = QtWidgets.QLabel(parent=self.page_3) + self.label_5.setObjectName("label_5") + self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_5) + self.lineEdit = QtWidgets.QLineEdit(parent=self.page_3) + self.lineEdit.setObjectName("lineEdit") + self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit) + self.label_3 = QtWidgets.QLabel(parent=self.page_3) + self.label_3.setObjectName("label_3") + self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3) + self.lineEdit_2 = QtWidgets.QLineEdit(parent=self.page_3) + self.lineEdit_2.setObjectName("lineEdit_2") + self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_2) + self.label_9 = QtWidgets.QLabel(parent=self.page_3) + self.label_9.setObjectName("label_9") + self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_9) + self.lineEdit_3 = QtWidgets.QLineEdit(parent=self.page_3) + self.lineEdit_3.setObjectName("lineEdit_3") + self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_3) + self.label_4 = QtWidgets.QLabel(parent=self.page_3) + self.label_4.setObjectName("label_4") + self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4) + self.spinBox = QtWidgets.QSpinBox(parent=self.page_3) + self.spinBox.setObjectName("spinBox") + self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.spinBox) + self.stackedWidget.addWidget(self.page_3) + self.page_4 = QtWidgets.QWidget() + self.page_4.setObjectName("page_4") + self.formLayout_4 = QtWidgets.QFormLayout(self.page_4) + self.formLayout_4.setObjectName("formLayout_4") + self.label_7 = QtWidgets.QLabel(parent=self.page_4) + self.label_7.setObjectName("label_7") + self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_7) + self.lineEdit_4 = QtWidgets.QLineEdit(parent=self.page_4) + self.lineEdit_4.setObjectName("lineEdit_4") + self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_4) + self.label_8 = QtWidgets.QLabel(parent=self.page_4) + self.label_8.setObjectName("label_8") + self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_8) + self.lineEdit_5 = QtWidgets.QLineEdit(parent=self.page_4) + self.lineEdit_5.setObjectName("lineEdit_5") + self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_5) + self.label_10 = QtWidgets.QLabel(parent=self.page_4) + self.label_10.setObjectName("label_10") + self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_10) + self.lineEdit_6 = QtWidgets.QLineEdit(parent=self.page_4) + self.lineEdit_6.setObjectName("lineEdit_6") + self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_6) + self.label_11 = QtWidgets.QLabel(parent=self.page_4) + self.label_11.setObjectName("label_11") + self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_11) + self.lineEdit_7 = QtWidgets.QLineEdit(parent=self.page_4) + self.lineEdit_7.setObjectName("lineEdit_7") + self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_7) + self.stackedWidget.addWidget(self.page_4) + self.formLayout.setWidget(3, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.stackedWidget) + self.verticalLayout_2.addWidget(self.frame) + self.label_6.setBuddy(self.comment_lineEdit) + self.label_2.setBuddy(self.color_comboBox) + + self.retranslateUi(Form) + self.stackedWidget.setCurrentIndex(3) + QtCore.QMetaObject.connectSlotsByName(Form) + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "Form")) + self.pushButton.setText(_translate("Form", "New object")) + self.pushButton_2.setText(_translate("Form", "Edit")) + self.pushButton_3.setText(_translate("Form", "Delete")) + self.mode_comboBox.setItemText(0, _translate("Form", "Infinite Line")) + self.mode_comboBox.setItemText(1, _translate("Form", "Multiple points")) + self.mode_comboBox.setItemText(2, _translate("Form", "Rectangle")) + self.mode_comboBox.setItemText(3, _translate("Form", "Ellipse")) + self.label_12.setText(_translate("Form", "Type")) + self.label_6.setText(_translate("Form", "Comment")) + self.label_2.setText(_translate("Form", "Color")) + self.label_13.setText(_translate("Form", "Position")) + self.label.setText(_translate("Form", "Angle")) + self.infiniteline_angle_spinbox.setSuffix(_translate("Form", "°")) + self.label_5.setText(_translate("Form", "Lower left")) + self.label_3.setText(_translate("Form", "Width")) + self.label_9.setText(_translate("Form", "Height")) + self.label_4.setText(_translate("Form", "Angle")) + self.label_7.setText(_translate("Form", "Centre")) + self.label_8.setText(_translate("Form", "Axis")) + self.label_10.setText(_translate("Form", "Axis")) + self.label_11.setText(_translate("Form", "Angle")) +from ..lib.delegates import ColorListEditor diff --git a/src/gui_qt/_py/hdftree.py b/src/gui_qt/_py/hdftree.py new file mode 100644 index 0000000..2ccb658 --- /dev/null +++ b/src/gui_qt/_py/hdftree.py @@ -0,0 +1,78 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/hdftree.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Hdf_Dialog(object): + def setupUi(self, Hdf_Dialog): + Hdf_Dialog.setObjectName("Hdf_Dialog") + Hdf_Dialog.resize(460, 772) + self.verticalLayout_2 = QtWidgets.QVBoxLayout(Hdf_Dialog) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.label_3 = QtWidgets.QLabel(parent=Hdf_Dialog) + self.label_3.setTextFormat(QtCore.Qt.TextFormat.RichText) + self.label_3.setObjectName("label_3") + self.verticalLayout_2.addWidget(self.label_3) + self.splitter = QtWidgets.QSplitter(parent=Hdf_Dialog) + self.splitter.setOrientation(QtCore.Qt.Orientation.Vertical) + self.splitter.setChildrenCollapsible(False) + self.splitter.setObjectName("splitter") + self.horizontalLayoutWidget = QtWidgets.QWidget(parent=self.splitter) + self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") + self.verticalLayout = QtWidgets.QVBoxLayout(self.horizontalLayoutWidget) + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setSpacing(0) + self.verticalLayout.setObjectName("verticalLayout") + self.verticalLayout_3 = QtWidgets.QVBoxLayout() + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.verticalLayout.addLayout(self.verticalLayout_3) + self.widget = QtWidgets.QWidget(parent=self.horizontalLayoutWidget) + self.widget.setObjectName("widget") + self.gridLayout = QtWidgets.QGridLayout(self.widget) + self.gridLayout.setContentsMargins(0, 0, 0, 0) + self.gridLayout.setSpacing(2) + self.gridLayout.setObjectName("gridLayout") + self.label = QtWidgets.QLabel(parent=self.widget) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 0, 1, 1) + self.comboBox_2 = QtWidgets.QComboBox(parent=self.widget) + self.comboBox_2.setObjectName("comboBox_2") + self.gridLayout.addWidget(self.comboBox_2, 1, 1, 1, 1) + self.label_2 = QtWidgets.QLabel(parent=self.widget) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) + self.comboBox = QtWidgets.QComboBox(parent=self.widget) + self.comboBox.setObjectName("comboBox") + self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) + self.verticalLayout.addWidget(self.widget) + self.widget_2 = ExpandableWidget(parent=self.splitter) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth()) + self.widget_2.setSizePolicy(sizePolicy) + self.widget_2.setObjectName("widget_2") + self.verticalLayout_2.addWidget(self.splitter) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Hdf_Dialog) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout_2.addWidget(self.buttonBox) + + self.retranslateUi(Hdf_Dialog) + self.buttonBox.rejected.connect(Hdf_Dialog.close) # type: ignore + self.buttonBox.accepted.connect(Hdf_Dialog.accept) # type: ignore + QtCore.QMetaObject.connectSlotsByName(Hdf_Dialog) + + def retranslateUi(self, Hdf_Dialog): + _translate = QtCore.QCoreApplication.translate + Hdf_Dialog.setWindowTitle(_translate("Hdf_Dialog", "View HDF file")) + self.label_3.setText(_translate("Hdf_Dialog", "Colors: Time signals and spectra, accumulations
")) + self.label.setText(_translate("Hdf_Dialog", "Label")) + self.label_2.setText(_translate("Hdf_Dialog", "Group")) +from ..lib.expandablewidget import ExpandableWidget diff --git a/src/gui_qt/_py/integral_widget.py b/src/gui_qt/_py/integral_widget.py new file mode 100644 index 0000000..6e22c77 --- /dev/null +++ b/src/gui_qt/_py/integral_widget.py @@ -0,0 +1,51 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/integral_widget.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Form(object): + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(397, 681) + self.verticalLayout = QtWidgets.QVBoxLayout(Form) + self.verticalLayout.setContentsMargins(3, 3, 3, 3) + self.verticalLayout.setSpacing(3) + self.verticalLayout.setObjectName("verticalLayout") + self.label_2 = QtWidgets.QLabel(parent=Form) + self.label_2.setObjectName("label_2") + self.verticalLayout.addWidget(self.label_2) + self.set_combobox = QtWidgets.QComboBox(parent=Form) + self.set_combobox.setObjectName("set_combobox") + self.verticalLayout.addWidget(self.set_combobox) + self.treeWidget = QtWidgets.QTreeWidget(parent=Form) + self.treeWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.treeWidget.setHeaderHidden(True) + self.treeWidget.setObjectName("treeWidget") + self.treeWidget.headerItem().setText(0, "1") + self.verticalLayout.addWidget(self.treeWidget) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setSpacing(3) + self.horizontalLayout.setObjectName("horizontalLayout") + self.label = QtWidgets.QLabel(parent=Form) + self.label.setObjectName("label") + self.horizontalLayout.addWidget(self.label) + self.pushButton = QtWidgets.QPushButton(parent=Form) + self.pushButton.setObjectName("pushButton") + self.horizontalLayout.addWidget(self.pushButton) + self.verticalLayout.addLayout(self.horizontalLayout) + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "Form")) + self.label_2.setText(_translate("Form", "TextLabel")) + self.label.setText(_translate("Form", "Save area as datasets")) + self.pushButton.setText(_translate("Form", "Apply")) diff --git a/src/gui_qt/_py/integratederive_dialog.py b/src/gui_qt/_py/integratederive_dialog.py new file mode 100644 index 0000000..89d0c85 --- /dev/null +++ b/src/gui_qt/_py/integratederive_dialog.py @@ -0,0 +1,86 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/integratederive_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(400, 375) + self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) + self.verticalLayout.setObjectName("verticalLayout") + self.listWidget = QtWidgets.QListWidget(parent=Dialog) + self.listWidget.setObjectName("listWidget") + self.verticalLayout.addWidget(self.listWidget) + self.widget = QtWidgets.QWidget(parent=Dialog) + self.widget.setObjectName("widget") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setObjectName("horizontalLayout") + self.label = QtWidgets.QLabel(parent=self.widget) + self.label.setObjectName("label") + self.horizontalLayout.addWidget(self.label) + self.start_lineedit = QtWidgets.QLineEdit(parent=self.widget) + self.start_lineedit.setEnabled(False) + self.start_lineedit.setObjectName("start_lineedit") + self.horizontalLayout.addWidget(self.start_lineedit) + self.stop_lineedit = QtWidgets.QLineEdit(parent=self.widget) + self.stop_lineedit.setEnabled(False) + self.stop_lineedit.setObjectName("stop_lineedit") + self.horizontalLayout.addWidget(self.stop_lineedit) + self.range_checkbox = QtWidgets.QCheckBox(parent=self.widget) + self.range_checkbox.setChecked(True) + self.range_checkbox.setObjectName("range_checkbox") + self.horizontalLayout.addWidget(self.range_checkbox) + self.verticalLayout.addWidget(self.widget) + self.ft_comboBox = QtWidgets.QComboBox(parent=Dialog) + self.ft_comboBox.setObjectName("ft_comboBox") + self.ft_comboBox.addItem("") + self.ft_comboBox.addItem("") + self.ft_comboBox.addItem("") + self.verticalLayout.addWidget(self.ft_comboBox) + self.log_checkbox = QtWidgets.QCheckBox(parent=Dialog) + self.log_checkbox.setObjectName("log_checkbox") + self.verticalLayout.addWidget(self.log_checkbox) + self.freq_box = QtWidgets.QCheckBox(parent=Dialog) + self.freq_box.setObjectName("freq_box") + self.verticalLayout.addWidget(self.freq_box) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout_2.setSpacing(3) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.newgraph_checkbox = QtWidgets.QCheckBox(parent=Dialog) + self.newgraph_checkbox.setObjectName("newgraph_checkbox") + self.horizontalLayout_2.addWidget(self.newgraph_checkbox) + self.graph_combobox = QtWidgets.QComboBox(parent=Dialog) + self.graph_combobox.setObjectName("graph_combobox") + self.horizontalLayout_2.addWidget(self.graph_combobox) + self.verticalLayout.addLayout(self.horizontalLayout_2) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout.addWidget(self.buttonBox) + + self.retranslateUi(Dialog) + self.buttonBox.accepted.connect(Dialog.accept) # type: ignore + self.buttonBox.rejected.connect(Dialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Dialog")) + self.label.setText(_translate("Dialog", "Limits")) + self.range_checkbox.setText(_translate("Dialog", "Full")) + self.ft_comboBox.setItemText(0, _translate("Dialog", "Real")) + self.ft_comboBox.setItemText(1, _translate("Dialog", "Imag")) + self.ft_comboBox.setItemText(2, _translate("Dialog", "Complex")) + self.log_checkbox.setText(_translate("Dialog", "use logarithmic x axis")) + self.freq_box.setText(_translate("Dialog", "return x axis as f, not omega")) + self.newgraph_checkbox.setText(_translate("Dialog", "New graph")) diff --git a/src/gui_qt/_py/interpol_dialog.py b/src/gui_qt/_py/interpol_dialog.py new file mode 100644 index 0000000..c116cf3 --- /dev/null +++ b/src/gui_qt/_py/interpol_dialog.py @@ -0,0 +1,165 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/interpol_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(416, 494) + self.gridLayout = QtWidgets.QGridLayout(Dialog) + self.gridLayout.setContentsMargins(3, 3, 3, 3) + self.gridLayout.setSpacing(3) + self.gridLayout.setObjectName("gridLayout") + self.src_widget = QtWidgets.QWidget(parent=Dialog) + self.src_widget.setObjectName("src_widget") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.src_widget) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setSpacing(3) + self.horizontalLayout.setObjectName("horizontalLayout") + self.graph_combobox = QtWidgets.QComboBox(parent=self.src_widget) + self.graph_combobox.setObjectName("graph_combobox") + self.horizontalLayout.addWidget(self.graph_combobox) + self.set_combobox = QtWidgets.QComboBox(parent=self.src_widget) + self.set_combobox.setObjectName("set_combobox") + self.horizontalLayout.addWidget(self.set_combobox) + self.gridLayout.addWidget(self.src_widget, 8, 0, 1, 2) + self.label_3 = QtWidgets.QLabel(parent=Dialog) + self.label_3.setObjectName("label_3") + self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1) + self.label = QtWidgets.QLabel(parent=Dialog) + self.label.setToolTip("") + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 4, 0, 1, 1) + self.line_2 = QtWidgets.QFrame(parent=Dialog) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout.addWidget(self.line_2, 5, 0, 1, 2) + self.ylog_checkBox = QtWidgets.QCheckBox(parent=Dialog) + self.ylog_checkBox.setObjectName("ylog_checkBox") + self.gridLayout.addWidget(self.ylog_checkBox, 2, 1, 1, 1) + self.interp_comboBox = QtWidgets.QComboBox(parent=Dialog) + self.interp_comboBox.setToolTip("") + self.interp_comboBox.setObjectName("interp_comboBox") + self.interp_comboBox.addItem("") + self.interp_comboBox.addItem("") + self.gridLayout.addWidget(self.interp_comboBox, 4, 1, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Apply|QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 12, 0, 1, 2) + self.line = QtWidgets.QFrame(parent=Dialog) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.gridLayout.addWidget(self.line, 3, 0, 1, 2) + self.label_2 = QtWidgets.QLabel(parent=Dialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1) + self.listWidget = QListWidgetSelect(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) + self.listWidget.setSizePolicy(sizePolicy) + self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.MultiSelection) + self.listWidget.setObjectName("listWidget") + self.gridLayout.addWidget(self.listWidget, 1, 0, 1, 2) + self.sampling_widget = QtWidgets.QWidget(parent=Dialog) + self.sampling_widget.setObjectName("sampling_widget") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.sampling_widget) + self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_2.setSpacing(3) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.label_4 = QtWidgets.QLabel(parent=self.sampling_widget) + self.label_4.setObjectName("label_4") + self.horizontalLayout_2.addWidget(self.label_4) + self.start_lineEdit = QtWidgets.QLineEdit(parent=self.sampling_widget) + self.start_lineEdit.setObjectName("start_lineEdit") + self.horizontalLayout_2.addWidget(self.start_lineEdit) + self.label_5 = QtWidgets.QLabel(parent=self.sampling_widget) + self.label_5.setObjectName("label_5") + self.horizontalLayout_2.addWidget(self.label_5) + self.stop_lineEdit = QtWidgets.QLineEdit(parent=self.sampling_widget) + self.stop_lineEdit.setObjectName("stop_lineEdit") + self.horizontalLayout_2.addWidget(self.stop_lineEdit) + self.label_6 = QtWidgets.QLabel(parent=self.sampling_widget) + self.label_6.setObjectName("label_6") + self.horizontalLayout_2.addWidget(self.label_6) + self.step_lineEdit = QtWidgets.QLineEdit(parent=self.sampling_widget) + self.step_lineEdit.setObjectName("step_lineEdit") + self.horizontalLayout_2.addWidget(self.step_lineEdit) + self.logspace_checkBox = QtWidgets.QCheckBox(parent=self.sampling_widget) + self.logspace_checkBox.setObjectName("logspace_checkBox") + self.horizontalLayout_2.addWidget(self.logspace_checkBox) + self.gridLayout.addWidget(self.sampling_widget, 7, 0, 1, 2) + self.xaxis_comboBox = QtWidgets.QComboBox(parent=Dialog) + self.xaxis_comboBox.setObjectName("xaxis_comboBox") + self.xaxis_comboBox.addItem("") + self.xaxis_comboBox.addItem("") + self.gridLayout.addWidget(self.xaxis_comboBox, 6, 1, 1, 1) + self.line_3 = QtWidgets.QFrame(parent=Dialog) + self.line_3.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_3.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_3.setObjectName("line_3") + self.gridLayout.addWidget(self.line_3, 9, 0, 1, 2) + self.dest_combobox = QtWidgets.QComboBox(parent=Dialog) + self.dest_combobox.setObjectName("dest_combobox") + self.gridLayout.addWidget(self.dest_combobox, 10, 1, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout.addItem(spacerItem, 11, 0, 1, 1) + self.label_8 = QtWidgets.QLabel(parent=Dialog) + self.label_8.setObjectName("label_8") + self.gridLayout.addWidget(self.label_8, 10, 0, 1, 1) + self.xlog_checkBox = QtWidgets.QCheckBox(parent=Dialog) + self.xlog_checkBox.setObjectName("xlog_checkBox") + self.gridLayout.addWidget(self.xlog_checkBox, 2, 0, 1, 1) + self.label.setBuddy(self.interp_comboBox) + self.label_2.setBuddy(self.xaxis_comboBox) + self.label_4.setBuddy(self.start_lineEdit) + self.label_5.setBuddy(self.stop_lineEdit) + self.label_6.setBuddy(self.step_lineEdit) + self.label_8.setBuddy(self.dest_combobox) + + self.retranslateUi(Dialog) + QtCore.QMetaObject.connectSlotsByName(Dialog) + Dialog.setTabOrder(self.listWidget, self.ylog_checkBox) + Dialog.setTabOrder(self.ylog_checkBox, self.interp_comboBox) + Dialog.setTabOrder(self.interp_comboBox, self.xaxis_comboBox) + Dialog.setTabOrder(self.xaxis_comboBox, self.start_lineEdit) + Dialog.setTabOrder(self.start_lineEdit, self.stop_lineEdit) + Dialog.setTabOrder(self.stop_lineEdit, self.step_lineEdit) + Dialog.setTabOrder(self.step_lineEdit, self.logspace_checkBox) + Dialog.setTabOrder(self.logspace_checkBox, self.graph_combobox) + Dialog.setTabOrder(self.graph_combobox, self.set_combobox) + Dialog.setTabOrder(self.set_combobox, self.dest_combobox) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Data interpolation")) + self.label_3.setText(_translate("Dialog", "Source data")) + self.label.setText(_translate("Dialog", "Spline")) + self.ylog_checkBox.setToolTip(_translate("Dialog", "If your data is on a logarithmic scale in y, check this box")) + self.ylog_checkBox.setText(_translate("Dialog", "use log(y)")) + self.interp_comboBox.setItemText(0, _translate("Dialog", "Cubic")) + self.interp_comboBox.setItemText(1, _translate("Dialog", "Linear")) + self.buttonBox.setToolTip(_translate("Dialog", "Accept to create new data sets.")) + self.label_2.setText(_translate("Dialog", "New x axis")) + self.listWidget.setToolTip(_translate("Dialog", "Select sets that shall be interpolated. No selection will create interpolations of all visible sets.")) + self.label_4.setText(_translate("Dialog", "Start")) + self.label_5.setText(_translate("Dialog", "Stop")) + self.label_6.setText(_translate("Dialog", "Steps")) + self.logspace_checkBox.setText(_translate("Dialog", "log-spaced?")) + self.xaxis_comboBox.setItemText(0, _translate("Dialog", "new values")) + self.xaxis_comboBox.setItemText(1, _translate("Dialog", "from data")) + self.label_8.setText(_translate("Dialog", "Add interpolated data to")) + self.xlog_checkBox.setText(_translate("Dialog", "use log(x)")) +from ..lib.listwidget import QListWidgetSelect diff --git a/src/gui_qt/_py/mean_form.py b/src/gui_qt/_py/mean_form.py new file mode 100644 index 0000000..3edea9b --- /dev/null +++ b/src/gui_qt/_py/mean_form.py @@ -0,0 +1,61 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/mean_form.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_mean_form(object): + def setupUi(self, mean_form): + mean_form.setObjectName("mean_form") + mean_form.resize(712, 34) + self.horizontalLayout = QtWidgets.QHBoxLayout(mean_form) + self.horizontalLayout.setContentsMargins(1, 1, 1, 1) + self.horizontalLayout.setObjectName("horizontalLayout") + self.label = QtWidgets.QLabel(parent=mean_form) + self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.label.setObjectName("label") + self.horizontalLayout.addWidget(self.label) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem) + self.digit_checkbox = QtWidgets.QCheckBox(parent=mean_form) + self.digit_checkbox.setChecked(True) + self.digit_checkbox.setObjectName("digit_checkbox") + self.horizontalLayout.addWidget(self.digit_checkbox) + self.lineEdit = QtWidgets.QLineEdit(parent=mean_form) + self.lineEdit.setObjectName("lineEdit") + self.horizontalLayout.addWidget(self.lineEdit) + self.data_checkbox = QtWidgets.QCheckBox(parent=mean_form) + self.data_checkbox.setObjectName("data_checkbox") + self.horizontalLayout.addWidget(self.data_checkbox) + self.frame = QtWidgets.QFrame(parent=mean_form) + self.frame.setFrameShape(QtWidgets.QFrame.Shape.NoFrame) + self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.frame.setObjectName("frame") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.frame) + self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_2.setSpacing(2) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.graph_combobox = QtWidgets.QComboBox(parent=self.frame) + self.graph_combobox.setObjectName("graph_combobox") + self.horizontalLayout_2.addWidget(self.graph_combobox) + self.set_combobox = QtWidgets.QComboBox(parent=self.frame) + self.set_combobox.setSizeAdjustPolicy(QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents) + self.set_combobox.setObjectName("set_combobox") + self.horizontalLayout_2.addWidget(self.set_combobox) + self.horizontalLayout.addWidget(self.frame) + + self.retranslateUi(mean_form) + QtCore.QMetaObject.connectSlotsByName(mean_form) + + def retranslateUi(self, mean_form): + _translate = QtCore.QCoreApplication.translate + mean_form.setWindowTitle(_translate("mean_form", "Form")) + self.label.setText(_translate("mean_form", "TextLabel")) + self.digit_checkbox.setText(_translate("mean_form", "Digit")) + self.lineEdit.setText(_translate("mean_form", "1")) + self.data_checkbox.setText(_translate("mean_form", "Data")) diff --git a/src/gui_qt/_py/meandialog.py b/src/gui_qt/_py/meandialog.py new file mode 100644 index 0000000..858c6c6 --- /dev/null +++ b/src/gui_qt/_py/meandialog.py @@ -0,0 +1,95 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/meandialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_calc_means_dialog(object): + def setupUi(self, calc_means_dialog): + calc_means_dialog.setObjectName("calc_means_dialog") + calc_means_dialog.resize(481, 322) + self.verticalLayout_2 = QtWidgets.QVBoxLayout(calc_means_dialog) + self.verticalLayout_2.setSpacing(3) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.dist_combobox = QtWidgets.QComboBox(parent=calc_means_dialog) + self.dist_combobox.setObjectName("dist_combobox") + self.verticalLayout_2.addWidget(self.dist_combobox) + self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + self.verticalLayout_2.addLayout(self.verticalLayout) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.from_combobox = QtWidgets.QComboBox(parent=calc_means_dialog) + self.from_combobox.setObjectName("from_combobox") + self.from_combobox.addItem("") + self.from_combobox.addItem("") + self.from_combobox.addItem("") + self.from_combobox.addItem("") + self.horizontalLayout.addWidget(self.from_combobox) + self.label_4 = QtWidgets.QLabel(parent=calc_means_dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + self.label_4.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(20) + self.label_4.setFont(font) + self.label_4.setObjectName("label_4") + self.horizontalLayout.addWidget(self.label_4) + self.to_combobox = QtWidgets.QComboBox(parent=calc_means_dialog) + self.to_combobox.setObjectName("to_combobox") + self.to_combobox.addItem("") + self.to_combobox.addItem("") + self.to_combobox.addItem("") + self.to_combobox.addItem("") + self.horizontalLayout.addWidget(self.to_combobox) + self.verticalLayout_2.addLayout(self.horizontalLayout) + self.line = QtWidgets.QFrame(parent=calc_means_dialog) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.verticalLayout_2.addWidget(self.line) + self.label = QtWidgets.QLabel(parent=calc_means_dialog) + self.label.setObjectName("label") + self.verticalLayout_2.addWidget(self.label) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.verticalLayout_2.addItem(spacerItem) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.checkBox = QtWidgets.QCheckBox(parent=calc_means_dialog) + self.checkBox.setObjectName("checkBox") + self.horizontalLayout_2.addWidget(self.checkBox) + self.graph_combobox = QtWidgets.QComboBox(parent=calc_means_dialog) + self.graph_combobox.setObjectName("graph_combobox") + self.horizontalLayout_2.addWidget(self.graph_combobox) + self.verticalLayout_2.addLayout(self.horizontalLayout_2) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=calc_means_dialog) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Apply|QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout_2.addWidget(self.buttonBox) + + self.retranslateUi(calc_means_dialog) + self.to_combobox.setCurrentIndex(1) + QtCore.QMetaObject.connectSlotsByName(calc_means_dialog) + + def retranslateUi(self, calc_means_dialog): + _translate = QtCore.QCoreApplication.translate + calc_means_dialog.setWindowTitle(_translate("calc_means_dialog", "Mean times")) + self.from_combobox.setItemText(0, _translate("calc_means_dialog", "Function value: τ")) + self.from_combobox.setItemText(1, _translate("calc_means_dialog", "Peak time: τₚ")) + self.from_combobox.setItemText(2, _translate("calc_means_dialog", "Arithmetic mean: ⟨τ⟩")) + self.from_combobox.setItemText(3, _translate("calc_means_dialog", "Geometric mean: exp( ⟨ln(τ)⟩ )")) + self.label_4.setText(_translate("calc_means_dialog", " ➝ ")) + self.to_combobox.setItemText(0, _translate("calc_means_dialog", "Function value: τ")) + self.to_combobox.setItemText(1, _translate("calc_means_dialog", "Peak time: τₚ")) + self.to_combobox.setItemText(2, _translate("calc_means_dialog", "Arithmetic mean: ⟨τ⟩")) + self.to_combobox.setItemText(3, _translate("calc_means_dialog", "Geometric mean: exp( ⟨ln(τ)⟩ )")) + self.label.setText(_translate("calc_means_dialog", "TextLabel")) + self.checkBox.setText(_translate("calc_means_dialog", "New graph")) diff --git a/src/gui_qt/_py/move_dialog.py b/src/gui_qt/_py/move_dialog.py new file mode 100644 index 0000000..d4d8d30 --- /dev/null +++ b/src/gui_qt/_py/move_dialog.py @@ -0,0 +1,86 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/move_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_MoveDialog(object): + def setupUi(self, MoveDialog): + MoveDialog.setObjectName("MoveDialog") + MoveDialog.resize(395, 345) + self.gridLayout = QtWidgets.QGridLayout(MoveDialog) + self.gridLayout.setVerticalSpacing(1) + self.gridLayout.setObjectName("gridLayout") + self.tocomboBox = QtWidgets.QComboBox(parent=MoveDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tocomboBox.sizePolicy().hasHeightForWidth()) + self.tocomboBox.setSizePolicy(sizePolicy) + self.tocomboBox.setObjectName("tocomboBox") + self.gridLayout.addWidget(self.tocomboBox, 3, 1, 1, 1) + self.fromcomboBox = QtWidgets.QComboBox(parent=MoveDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.fromcomboBox.sizePolicy().hasHeightForWidth()) + self.fromcomboBox.setSizePolicy(sizePolicy) + self.fromcomboBox.setObjectName("fromcomboBox") + self.gridLayout.addWidget(self.fromcomboBox, 0, 1, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=MoveDialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Apply|QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 6, 0, 1, 2) + self.label_2 = QtWidgets.QLabel(parent=MoveDialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1) + self.line = QtWidgets.QFrame(parent=MoveDialog) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.gridLayout.addWidget(self.line, 4, 0, 1, 2) + self.label = QtWidgets.QLabel(parent=MoveDialog) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout.setObjectName("horizontalLayout") + self.copy_button = QtWidgets.QRadioButton(parent=MoveDialog) + self.copy_button.setObjectName("copy_button") + self.buttonGroup = QtWidgets.QButtonGroup(MoveDialog) + self.buttonGroup.setObjectName("buttonGroup") + self.buttonGroup.addButton(self.copy_button) + self.horizontalLayout.addWidget(self.copy_button) + self.move_button = QtWidgets.QRadioButton(parent=MoveDialog) + self.move_button.setChecked(True) + self.move_button.setObjectName("move_button") + self.buttonGroup.addButton(self.move_button) + self.horizontalLayout.addWidget(self.move_button) + self.gridLayout.addLayout(self.horizontalLayout, 5, 0, 1, 2) + self.listWidget = QtWidgets.QListWidget(parent=MoveDialog) + self.listWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.MultiSelection) + self.listWidget.setObjectName("listWidget") + self.gridLayout.addWidget(self.listWidget, 1, 1, 1, 1) + self.label_2.setBuddy(self.tocomboBox) + self.label.setBuddy(self.fromcomboBox) + + self.retranslateUi(MoveDialog) + QtCore.QMetaObject.connectSlotsByName(MoveDialog) + MoveDialog.setTabOrder(self.fromcomboBox, self.listWidget) + MoveDialog.setTabOrder(self.listWidget, self.tocomboBox) + MoveDialog.setTabOrder(self.tocomboBox, self.buttonBox) + + def retranslateUi(self, MoveDialog): + _translate = QtCore.QCoreApplication.translate + MoveDialog.setWindowTitle(_translate("MoveDialog", "Insert Reel 2 Real song.")) + self.label_2.setText(_translate("MoveDialog", "To")) + self.label.setText(_translate("MoveDialog", "From")) + self.copy_button.setText(_translate("MoveDialog", "Copy")) + self.move_button.setText(_translate("MoveDialog", "Move")) diff --git a/src/gui_qt/_py/movedialog.py b/src/gui_qt/_py/movedialog.py new file mode 100644 index 0000000..5cb950b --- /dev/null +++ b/src/gui_qt/_py/movedialog.py @@ -0,0 +1,8 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/movedialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + diff --git a/src/gui_qt/_py/namespace_widget.py b/src/gui_qt/_py/namespace_widget.py new file mode 100644 index 0000000..774beca --- /dev/null +++ b/src/gui_qt/_py/namespace_widget.py @@ -0,0 +1,70 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/namespace_widget.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Form(object): + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(400, 300) + self.gridLayout_2 = QtWidgets.QGridLayout(Form) + self.gridLayout_2.setContentsMargins(1, 1, 1, 1) + self.gridLayout_2.setSpacing(3) + self.gridLayout_2.setObjectName("gridLayout_2") + self.groups_comboBox = QtWidgets.QComboBox(parent=Form) + self.groups_comboBox.setObjectName("groups_comboBox") + self.gridLayout_2.addWidget(self.groups_comboBox, 0, 0, 1, 1) + self.subgroups_comboBox = QtWidgets.QComboBox(parent=Form) + self.subgroups_comboBox.setObjectName("subgroups_comboBox") + self.gridLayout_2.addWidget(self.subgroups_comboBox, 0, 1, 1, 1) + self.namespace_table = QtWidgets.QTableWidget(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.namespace_table.sizePolicy().hasHeightForWidth()) + self.namespace_table.setSizePolicy(sizePolicy) + self.namespace_table.setMinimumSize(QtCore.QSize(0, 0)) + self.namespace_table.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.namespace_table.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection) + self.namespace_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.namespace_table.setTextElideMode(QtCore.Qt.TextElideMode.ElideNone) + self.namespace_table.setColumnCount(2) + self.namespace_table.setObjectName("namespace_table") + self.namespace_table.setRowCount(5) + item = QtWidgets.QTableWidgetItem() + self.namespace_table.setVerticalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.namespace_table.setVerticalHeaderItem(1, item) + item = QtWidgets.QTableWidgetItem() + self.namespace_table.setVerticalHeaderItem(2, item) + item = QtWidgets.QTableWidgetItem() + self.namespace_table.setVerticalHeaderItem(3, item) + item = QtWidgets.QTableWidgetItem() + self.namespace_table.setVerticalHeaderItem(4, item) + self.namespace_table.horizontalHeader().setVisible(False) + self.namespace_table.horizontalHeader().setStretchLastSection(True) + self.namespace_table.verticalHeader().setVisible(False) + self.gridLayout_2.addWidget(self.namespace_table, 1, 0, 1, 2) + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "Form")) + item = self.namespace_table.verticalHeaderItem(0) + item.setText(_translate("Form", "Neue Zeile")) + item = self.namespace_table.verticalHeaderItem(1) + item.setText(_translate("Form", "Neue Zeile")) + item = self.namespace_table.verticalHeaderItem(2) + item.setText(_translate("Form", "Neue Zeile")) + item = self.namespace_table.verticalHeaderItem(3) + item.setText(_translate("Form", "Neue Zeile")) + item = self.namespace_table.verticalHeaderItem(4) + item.setText(_translate("Form", "Neue Zeile")) diff --git a/src/gui_qt/_py/pokeentry.py b/src/gui_qt/_py/pokeentry.py new file mode 100644 index 0000000..382fcb6 --- /dev/null +++ b/src/gui_qt/_py/pokeentry.py @@ -0,0 +1,258 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/pokeentry.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Form(object): + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(640, 642) + self.verticalLayout_4 = QtWidgets.QVBoxLayout(Form) + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.artwork_label = QtWidgets.QLabel(parent=Form) + self.artwork_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignTop) + self.artwork_label.setObjectName("artwork_label") + self.verticalLayout_4.addWidget(self.artwork_label) + self.formLayout = QtWidgets.QFormLayout() + self.formLayout.setContentsMargins(3, 3, 3, 3) + self.formLayout.setVerticalSpacing(12) + self.formLayout.setObjectName("formLayout") + self.label = QtWidgets.QLabel(parent=Form) + self.label.setObjectName("label") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label) + self.nationaldex_label = QtWidgets.QLabel(parent=Form) + self.nationaldex_label.setObjectName("nationaldex_label") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.nationaldex_label) + self.label_1 = QtWidgets.QLabel(parent=Form) + self.label_1.setObjectName("label_1") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_1) + self.species_label = QtWidgets.QLabel(parent=Form) + self.species_label.setObjectName("species_label") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.species_label) + self.label_4 = QtWidgets.QLabel(parent=Form) + self.label_4.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignTop) + self.label_4.setObjectName("label_4") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4) + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.type1_label = QtWidgets.QLabel(parent=Form) + self.type1_label.setObjectName("type1_label") + self.verticalLayout_2.addWidget(self.type1_label) + self.type2_label = QtWidgets.QLabel(parent=Form) + self.type2_label.setObjectName("type2_label") + self.verticalLayout_2.addWidget(self.type2_label) + self.formLayout.setLayout(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.verticalLayout_2) + self.label_5 = QtWidgets.QLabel(parent=Form) + self.label_5.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignTop) + self.label_5.setObjectName("label_5") + self.formLayout.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_5) + self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + self.ability1_label = QtWidgets.QLabel(parent=Form) + self.ability1_label.setObjectName("ability1_label") + self.verticalLayout.addWidget(self.ability1_label) + self.ability2_label = QtWidgets.QLabel(parent=Form) + self.ability2_label.setObjectName("ability2_label") + self.verticalLayout.addWidget(self.ability2_label) + self.ability3_label = QtWidgets.QLabel(parent=Form) + self.ability3_label.setObjectName("ability3_label") + self.verticalLayout.addWidget(self.ability3_label) + self.formLayout.setLayout(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.verticalLayout) + self.label_2 = QtWidgets.QLabel(parent=Form) + self.label_2.setObjectName("label_2") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_2) + self.height_label = QtWidgets.QLabel(parent=Form) + self.height_label.setObjectName("height_label") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.height_label) + self.label_3 = QtWidgets.QLabel(parent=Form) + self.label_3.setObjectName("label_3") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3) + self.weight_label = QtWidgets.QLabel(parent=Form) + self.weight_label.setObjectName("weight_label") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.ItemRole.FieldRole, self.weight_label) + self.gender_label = QtWidgets.QLabel(parent=Form) + self.gender_label.setObjectName("gender_label") + self.formLayout.setWidget(6, QtWidgets.QFormLayout.ItemRole.LabelRole, self.gender_label) + self.verticalLayout_4.addLayout(self.formLayout) + self.groupBox = QtWidgets.QGroupBox(parent=Form) + self.groupBox.setFlat(True) + self.groupBox.setObjectName("groupBox") + self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox) + self.gridLayout_4.setContentsMargins(3, 3, 3, 3) + self.gridLayout_4.setObjectName("gridLayout_4") + self.spec_attack_bar = QtWidgets.QProgressBar(parent=self.groupBox) + self.spec_attack_bar.setStyleSheet("QProgressBar{\n" +" border: none;\n" +" background-color: transparent;\n" +" text-align: center;\n" +"}\n" +"\n" +"QProgressBar::chunk {\n" +" background-color: #009cda;\n" +" border-radius: 3px;\n" +"}") + self.spec_attack_bar.setMaximum(194) + self.spec_attack_bar.setProperty("value", 24) + self.spec_attack_bar.setObjectName("spec_attack_bar") + self.gridLayout_4.addWidget(self.spec_attack_bar, 0, 3, 1, 1) + self.label_8 = QtWidgets.QLabel(parent=self.groupBox) + self.label_8.setObjectName("label_8") + self.gridLayout_4.addWidget(self.label_8, 0, 2, 1, 1) + self.spec_defense_bar = QtWidgets.QProgressBar(parent=self.groupBox) + self.spec_defense_bar.setStyleSheet("QProgressBar{\n" +" border: none;\n" +" background-color: transparent;\n" +" text-align: center;\n" +"}\n" +"\n" +"QProgressBar::chunk {\n" +" background-color: #009cda;\n" +" border-radius: 3px;\n" +"}") + self.spec_defense_bar.setMaximum(250) + self.spec_defense_bar.setProperty("value", 24) + self.spec_defense_bar.setObjectName("spec_defense_bar") + self.gridLayout_4.addWidget(self.spec_defense_bar, 1, 3, 1, 1) + self.label_6 = QtWidgets.QLabel(parent=self.groupBox) + self.label_6.setFrameShadow(QtWidgets.QFrame.Shadow.Plain) + self.label_6.setObjectName("label_6") + self.gridLayout_4.addWidget(self.label_6, 0, 0, 1, 1) + self.hp_bar = QtWidgets.QProgressBar(parent=self.groupBox) + self.hp_bar.setStyleSheet("QProgressBar{\n" +" border: none;\n" +" background-color: transparent;\n" +" text-align: center;\n" +"}\n" +"\n" +"QProgressBar::chunk {\n" +" background-color: #009cda;\n" +" border-radius: 3px;\n" +"}") + self.hp_bar.setMaximum(255) + self.hp_bar.setProperty("value", 24) + self.hp_bar.setObjectName("hp_bar") + self.gridLayout_4.addWidget(self.hp_bar, 0, 1, 1, 1) + self.speed_bar = QtWidgets.QProgressBar(parent=self.groupBox) + self.speed_bar.setStyleSheet("QProgressBar{\n" +" border: none;\n" +" background-color: transparent;\n" +" text-align: center;\n" +"}\n" +"\n" +"QProgressBar::chunk {\n" +" background-color: #009cda;\n" +" border-radius: 3px;\n" +"}") + self.speed_bar.setMaximum(200) + self.speed_bar.setProperty("value", 24) + self.speed_bar.setObjectName("speed_bar") + self.gridLayout_4.addWidget(self.speed_bar, 2, 3, 1, 1) + self.label_11 = QtWidgets.QLabel(parent=self.groupBox) + self.label_11.setObjectName("label_11") + self.gridLayout_4.addWidget(self.label_11, 2, 2, 1, 1) + self.label_10 = QtWidgets.QLabel(parent=self.groupBox) + self.label_10.setObjectName("label_10") + self.gridLayout_4.addWidget(self.label_10, 1, 2, 1, 1) + self.defense_bar = QtWidgets.QProgressBar(parent=self.groupBox) + self.defense_bar.setStyleSheet("QProgressBar{\n" +" border: none;\n" +" background-color: transparent;\n" +" text-align: center;\n" +"}\n" +"\n" +"QProgressBar::chunk {\n" +" background-color: #009cda;\n" +" border-radius: 3px;\n" +"}") + self.defense_bar.setMaximum(250) + self.defense_bar.setProperty("value", 24) + self.defense_bar.setObjectName("defense_bar") + self.gridLayout_4.addWidget(self.defense_bar, 2, 1, 1, 1) + self.attack_bar = QtWidgets.QProgressBar(parent=self.groupBox) + self.attack_bar.setStyleSheet("QProgressBar{\n" +" border: none;\n" +" background-color: transparent;\n" +" text-align: center;\n" +"}\n" +"\n" +"QProgressBar::chunk {\n" +" background-color: #009cda;\n" +" border-radius: 3px;\n" +"}") + self.attack_bar.setMaximum(190) + self.attack_bar.setProperty("value", 24) + self.attack_bar.setObjectName("attack_bar") + self.gridLayout_4.addWidget(self.attack_bar, 1, 1, 1, 1) + self.label_7 = QtWidgets.QLabel(parent=self.groupBox) + self.label_7.setObjectName("label_7") + self.gridLayout_4.addWidget(self.label_7, 1, 0, 1, 1) + self.label_9 = QtWidgets.QLabel(parent=self.groupBox) + self.label_9.setObjectName("label_9") + self.gridLayout_4.addWidget(self.label_9, 2, 0, 1, 1) + self.verticalLayout_4.addWidget(self.groupBox) + self.groupBox_2 = QtWidgets.QGroupBox(parent=Form) + self.groupBox_2.setFlat(True) + self.groupBox_2.setCheckable(False) + self.groupBox_2.setObjectName("groupBox_2") + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_2) + self.verticalLayout_3.setContentsMargins(3, 3, 3, 3) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.tableWidget = QtWidgets.QTableWidget(parent=self.groupBox_2) + self.tableWidget.setStyleSheet("background-color: transparent;") + self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.tableWidget.setShowGrid(False) + self.tableWidget.setGridStyle(QtCore.Qt.PenStyle.NoPen) + self.tableWidget.setWordWrap(False) + self.tableWidget.setObjectName("tableWidget") + self.tableWidget.setColumnCount(0) + self.tableWidget.setRowCount(0) + self.tableWidget.horizontalHeader().setVisible(False) + self.tableWidget.verticalHeader().setVisible(False) + self.verticalLayout_3.addWidget(self.tableWidget) + self.verticalLayout_4.addWidget(self.groupBox_2) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.verticalLayout_4.addItem(spacerItem) + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "Form")) + self.artwork_label.setText(_translate("Form", "TextLabel")) + self.label.setText(_translate("Form", "National No.")) + self.nationaldex_label.setText(_translate("Form", "TextLabel")) + self.label_1.setText(_translate("Form", "Species")) + self.species_label.setText(_translate("Form", "TextLabel")) + self.label_4.setText(_translate("Form", "Type")) + self.type1_label.setText(_translate("Form", "TextLabel")) + self.type2_label.setText(_translate("Form", "TextLabel")) + self.label_5.setText(_translate("Form", "Abilities")) + self.ability1_label.setText(_translate("Form", "TextLabel")) + self.ability2_label.setText(_translate("Form", "TextLabel")) + self.ability3_label.setText(_translate("Form", "TextLabel")) + self.label_2.setText(_translate("Form", "Height")) + self.height_label.setText(_translate("Form", "0.0 m")) + self.label_3.setText(_translate("Form", "Weight")) + self.weight_label.setText(_translate("Form", "0.0 kg")) + self.gender_label.setText(_translate("Form", "TextLabel")) + self.groupBox.setTitle(_translate("Form", "Stats")) + self.spec_attack_bar.setFormat(_translate("Form", "%v")) + self.label_8.setText(_translate("Form", "Special Attack")) + self.spec_defense_bar.setFormat(_translate("Form", "%v")) + self.label_6.setText(_translate("Form", "HP")) + self.hp_bar.setFormat(_translate("Form", "%v")) + self.speed_bar.setFormat(_translate("Form", "%v")) + self.label_11.setText(_translate("Form", "Speed")) + self.label_10.setText(_translate("Form", "Special Defense")) + self.defense_bar.setFormat(_translate("Form", "%v")) + self.attack_bar.setFormat(_translate("Form", "%v")) + self.label_7.setText(_translate("Form", "Attack")) + self.label_9.setText(_translate("Form", "Defense")) + self.groupBox_2.setTitle(_translate("Form", "Evolution chain")) diff --git a/src/gui_qt/_py/pokewindow.py b/src/gui_qt/_py/pokewindow.py new file mode 100644 index 0000000..d3c819a --- /dev/null +++ b/src/gui_qt/_py/pokewindow.py @@ -0,0 +1,129 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/pokewindow.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(1687, 991) + self.gridLayout = QtWidgets.QGridLayout(Dialog) + self.gridLayout.setObjectName("gridLayout") + self.pushButton = QtWidgets.QPushButton(parent=Dialog) + self.pushButton.setObjectName("pushButton") + self.gridLayout.addWidget(self.pushButton, 0, 2, 1, 1) + self.comboBox_2 = QtWidgets.QComboBox(parent=Dialog) + self.comboBox_2.setObjectName("comboBox_2") + self.gridLayout.addWidget(self.comboBox_2, 0, 0, 1, 1) + self.comboBox = QtWidgets.QComboBox(parent=Dialog) + self.comboBox.setObjectName("comboBox") + self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.gridLayout.addItem(spacerItem, 0, 4, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth()) + self.buttonBox.setSizePolicy(sizePolicy) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Close) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 0, 3, 1, 1) + self.splitter = QtWidgets.QSplitter(parent=Dialog) + self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.splitter.setObjectName("splitter") + self.tableWidget_2 = QtWidgets.QTableWidget(parent=self.splitter) + self.tableWidget_2.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.tableWidget_2.setAlternatingRowColors(True) + self.tableWidget_2.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection) + self.tableWidget_2.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.tableWidget_2.setShowGrid(False) + self.tableWidget_2.setGridStyle(QtCore.Qt.PenStyle.NoPen) + self.tableWidget_2.setObjectName("tableWidget_2") + self.tableWidget_2.setColumnCount(13) + self.tableWidget_2.setRowCount(0) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(1, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(2, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(3, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(4, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(5, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(6, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(7, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(8, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(9, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(10, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(11, item) + item = QtWidgets.QTableWidgetItem() + self.tableWidget_2.setHorizontalHeaderItem(12, item) + self.tableWidget_2.horizontalHeader().setDefaultSectionSize(80) + self.tableWidget_2.horizontalHeader().setStretchLastSection(False) + self.tableWidget_2.verticalHeader().setVisible(False) + self.tabWidget = QtWidgets.QTabWidget(parent=self.splitter) + self.tabWidget.setMinimumSize(QtCore.QSize(418, 0)) + self.tabWidget.setObjectName("tabWidget") + self.gridLayout.addWidget(self.splitter, 1, 0, 1, 5) + + self.retranslateUi(Dialog) + self.tabWidget.setCurrentIndex(-1) + self.buttonBox.rejected.connect(Dialog.close) # type: ignore + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Gotta catch \'em all!")) + self.pushButton.setText(_translate("Dialog", "Random")) + self.tableWidget_2.setSortingEnabled(True) + item = self.tableWidget_2.horizontalHeaderItem(0) + item.setText(_translate("Dialog", "#")) + item = self.tableWidget_2.horizontalHeaderItem(1) + item.setText(_translate("Dialog", "Pokemon")) + item = self.tableWidget_2.horizontalHeaderItem(2) + item.setText(_translate("Dialog", "Type")) + item = self.tableWidget_2.horizontalHeaderItem(3) + item.setText(_translate("Dialog", "Total")) + item = self.tableWidget_2.horizontalHeaderItem(4) + item.setText(_translate("Dialog", "HP")) + item.setToolTip(_translate("Dialog", "Hit Points; Kraftpunkte")) + item = self.tableWidget_2.horizontalHeaderItem(5) + item.setText(_translate("Dialog", "Attack")) + item.setToolTip(_translate("Dialog", "Attacke")) + item = self.tableWidget_2.horizontalHeaderItem(6) + item.setText(_translate("Dialog", "Defense")) + item.setToolTip(_translate("Dialog", "Verteidigung")) + item = self.tableWidget_2.horizontalHeaderItem(7) + item.setText(_translate("Dialog", "Sp. Attack")) + item.setToolTip(_translate("Dialog", "Special Attack; Spezial-Attacke")) + item = self.tableWidget_2.horizontalHeaderItem(8) + item.setText(_translate("Dialog", "Sp. Defense")) + item.setToolTip(_translate("Dialog", "Special Defense; Spezial-Verteidigung")) + item = self.tableWidget_2.horizontalHeaderItem(9) + item.setText(_translate("Dialog", "Speed")) + item.setToolTip(_translate("Dialog", "Initiative")) + item = self.tableWidget_2.horizontalHeaderItem(10) + item.setText(_translate("Dialog", "Height")) + item.setToolTip(_translate("Dialog", "Größe")) + item = self.tableWidget_2.horizontalHeaderItem(11) + item.setText(_translate("Dialog", "Weight")) + item.setToolTip(_translate("Dialog", "Gewicht")) + item = self.tableWidget_2.horizontalHeaderItem(12) + item.setText(_translate("Dialog", "BMI")) + item.setToolTip(_translate("Dialog", "Body-Mass-Index")) diff --git a/src/gui_qt/_py/ptstab.py b/src/gui_qt/_py/ptstab.py new file mode 100644 index 0000000..206660a --- /dev/null +++ b/src/gui_qt/_py/ptstab.py @@ -0,0 +1,134 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/ptstab.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Form(object): + def setupUi(self, Form): + Form.setObjectName("Form") + Form.resize(316, 747) + self.verticalLayout = QtWidgets.QVBoxLayout(Form) + self.verticalLayout.setContentsMargins(3, 3, 3, 3) + self.verticalLayout.setObjectName("verticalLayout") + self.peaktable = QtWidgets.QListWidget(parent=Form) + self.peaktable.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.DoubleClicked|QtWidgets.QAbstractItemView.EditTrigger.EditKeyPressed) + self.peaktable.setObjectName("peaktable") + self.verticalLayout.addWidget(self.peaktable) + self.groupBox = QtWidgets.QGroupBox(parent=Form) + self.groupBox.setObjectName("groupBox") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox) + self.horizontalLayout.setContentsMargins(3, 3, 3, 3) + self.horizontalLayout.setSpacing(3) + self.horizontalLayout.setObjectName("horizontalLayout") + self.left_pt = QtWidgets.QSpinBox(parent=self.groupBox) + self.left_pt.setMaximum(999) + self.left_pt.setObjectName("left_pt") + self.horizontalLayout.addWidget(self.left_pt) + self.right_pt = QtWidgets.QSpinBox(parent=self.groupBox) + self.right_pt.setMaximum(999) + self.right_pt.setObjectName("right_pt") + self.horizontalLayout.addWidget(self.right_pt) + self.average_combobox = QtWidgets.QComboBox(parent=self.groupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.average_combobox.sizePolicy().hasHeightForWidth()) + self.average_combobox.setSizePolicy(sizePolicy) + self.average_combobox.setObjectName("average_combobox") + self.average_combobox.addItem("") + self.average_combobox.addItem("") + self.average_combobox.addItem("") + self.average_combobox.addItem("") + self.horizontalLayout.addWidget(self.average_combobox) + self.verticalLayout.addWidget(self.groupBox) + self.groupBox_2 = QtWidgets.QGroupBox(parent=Form) + self.groupBox_2.setCheckable(True) + self.groupBox_2.setChecked(False) + self.groupBox_2.setObjectName("groupBox_2") + self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.groupBox_2) + self.horizontalLayout_5.setContentsMargins(3, 3, 3, 3) + self.horizontalLayout_5.setSpacing(2) + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.special_comboBox = QtWidgets.QComboBox(parent=self.groupBox_2) + self.special_comboBox.setObjectName("special_comboBox") + self.special_comboBox.addItem("") + self.special_comboBox.addItem("") + self.special_comboBox.addItem("") + self.special_comboBox.addItem("") + self.horizontalLayout_5.addWidget(self.special_comboBox) + self.verticalLayout.addWidget(self.groupBox_2) + self.groupBox_3 = QtWidgets.QGroupBox(parent=Form) + self.groupBox_3.setObjectName("groupBox_3") + self.gridLayout = QtWidgets.QGridLayout(self.groupBox_3) + self.gridLayout.setContentsMargins(3, 3, 3, 3) + self.gridLayout.setSpacing(3) + self.gridLayout.setObjectName("gridLayout") + self.xbutton = QtWidgets.QCheckBox(parent=self.groupBox_3) + self.xbutton.setObjectName("xbutton") + self.gridLayout.addWidget(self.xbutton, 0, 0, 1, 1) + self.ybutton = QtWidgets.QCheckBox(parent=self.groupBox_3) + self.ybutton.setChecked(True) + self.ybutton.setObjectName("ybutton") + self.gridLayout.addWidget(self.ybutton, 0, 1, 1, 1) + self.graph_checkbox = QtWidgets.QCheckBox(parent=self.groupBox_3) + self.graph_checkbox.setChecked(True) + self.graph_checkbox.setObjectName("graph_checkbox") + self.gridLayout.addWidget(self.graph_checkbox, 1, 0, 1, 1) + self.graph_combobox = QtWidgets.QComboBox(parent=self.groupBox_3) + self.graph_combobox.setEnabled(False) + self.graph_combobox.setObjectName("graph_combobox") + self.gridLayout.addWidget(self.graph_combobox, 1, 1, 1, 1) + self.verticalLayout.addWidget(self.groupBox_3) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout_2.setSpacing(2) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.okButton = QtWidgets.QPushButton(parent=Form) + icon = QtGui.QIcon.fromTheme("dialog-ok") + self.okButton.setIcon(icon) + self.okButton.setObjectName("okButton") + self.horizontalLayout_2.addWidget(self.okButton) + self.deleteButton = QtWidgets.QPushButton(parent=Form) + icon = QtGui.QIcon.fromTheme("dialog-cancel") + self.deleteButton.setIcon(icon) + self.deleteButton.setObjectName("deleteButton") + self.horizontalLayout_2.addWidget(self.deleteButton) + self.verticalLayout.addLayout(self.horizontalLayout_2) + + self.retranslateUi(Form) + QtCore.QMetaObject.connectSlotsByName(Form) + + def retranslateUi(self, Form): + _translate = QtCore.QCoreApplication.translate + Form.setWindowTitle(_translate("Form", "Form")) + self.peaktable.setToolTip(_translate("Form", "Edit by entering new value: \n" +"Single number for points (e.g. 1e-6); \n" +"two numbers separated by space for regions (e.g. 1e-6 5e-6). \n" +"Changing between regions and points is NOT possible")) + self.groupBox.setTitle(_translate("Form", "Average (drop-down used for pts and regions)")) + self.left_pt.setSuffix(_translate("Form", " pts")) + self.left_pt.setPrefix(_translate("Form", "- ")) + self.right_pt.setSuffix(_translate("Form", " pts")) + self.right_pt.setPrefix(_translate("Form", "+ ")) + self.average_combobox.setItemText(0, _translate("Form", "Mean")) + self.average_combobox.setItemText(1, _translate("Form", "Sum")) + self.average_combobox.setItemText(2, _translate("Form", "Integral")) + self.average_combobox.setItemText(3, _translate("Form", "Std. deviation")) + self.groupBox_2.setTitle(_translate("Form", "Special value")) + self.special_comboBox.setToolTip(_translate("Form", "Automatic selection of respective points")) + self.special_comboBox.setItemText(0, _translate("Form", "max(y)")) + self.special_comboBox.setItemText(1, _translate("Form", "max(abs(y))")) + self.special_comboBox.setItemText(2, _translate("Form", "min(y)")) + self.special_comboBox.setItemText(3, _translate("Form", "min(abs(y))")) + self.groupBox_3.setTitle(_translate("Form", "Result")) + self.xbutton.setText(_translate("Form", "x")) + self.ybutton.setText(_translate("Form", "y")) + self.graph_checkbox.setText(_translate("Form", "New graph?")) + self.okButton.setText(_translate("Form", "Apply")) + self.deleteButton.setText(_translate("Form", "Delete selected")) diff --git a/src/gui_qt/_py/save_fit_parameter.py b/src/gui_qt/_py/save_fit_parameter.py new file mode 100644 index 0000000..b30d029 --- /dev/null +++ b/src/gui_qt/_py/save_fit_parameter.py @@ -0,0 +1,130 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/save_fit_parameter.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_fitparameter_save_dialog(object): + def setupUi(self, fitparameter_save_dialog): + fitparameter_save_dialog.setObjectName("fitparameter_save_dialog") + fitparameter_save_dialog.resize(578, 537) + self.gridLayout = QtWidgets.QGridLayout(fitparameter_save_dialog) + self.gridLayout.setObjectName("gridLayout") + self.save_path_line = QtWidgets.QLineEdit(parent=fitparameter_save_dialog) + self.save_path_line.setObjectName("save_path_line") + self.gridLayout.addWidget(self.save_path_line, 0, 1, 1, 6) + self.save_path_button = QtWidgets.QToolButton(parent=fitparameter_save_dialog) + self.save_path_button.setObjectName("save_path_button") + self.gridLayout.addWidget(self.save_path_button, 0, 0, 1, 1) + self.comment_line = QtWidgets.QLineEdit(parent=fitparameter_save_dialog) + self.comment_line.setObjectName("comment_line") + self.gridLayout.addWidget(self.comment_line, 6, 6, 1, 1) + self.prec_spinbox = QtWidgets.QSpinBox(parent=fitparameter_save_dialog) + self.prec_spinbox.setProperty("value", 8) + self.prec_spinbox.setObjectName("prec_spinbox") + self.gridLayout.addWidget(self.prec_spinbox, 6, 3, 1, 1) + self.line_2 = QtWidgets.QFrame(parent=fitparameter_save_dialog) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout.addWidget(self.line_2, 4, 0, 1, 7) + self.label_5 = QtWidgets.QLabel(parent=fitparameter_save_dialog) + self.label_5.setObjectName("label_5") + self.gridLayout.addWidget(self.label_5, 3, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.col_line = QtWidgets.QLineEdit(parent=fitparameter_save_dialog) + self.col_line.setObjectName("col_line") + self.horizontalLayout.addWidget(self.col_line) + self.usage_button = QtWidgets.QToolButton(parent=fitparameter_save_dialog) + self.usage_button.setObjectName("usage_button") + self.horizontalLayout.addWidget(self.usage_button) + self.gridLayout.addLayout(self.horizontalLayout, 3, 1, 1, 6) + self.header_edit = QtWidgets.QTextEdit(parent=fitparameter_save_dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.header_edit.sizePolicy().hasHeightForWidth()) + self.header_edit.setSizePolicy(sizePolicy) + self.header_edit.setObjectName("header_edit") + self.gridLayout.addWidget(self.header_edit, 5, 1, 1, 6) + self.label_4 = QtWidgets.QLabel(parent=fitparameter_save_dialog) + self.label_4.setObjectName("label_4") + self.gridLayout.addWidget(self.label_4, 6, 2, 1, 1) + self.line = QtWidgets.QFrame(parent=fitparameter_save_dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.line.sizePolicy().hasHeightForWidth()) + self.line.setSizePolicy(sizePolicy) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.gridLayout.addWidget(self.line, 1, 0, 1, 7) + self.missing_value_line = QtWidgets.QLineEdit(parent=fitparameter_save_dialog) + self.missing_value_line.setObjectName("missing_value_line") + self.gridLayout.addWidget(self.missing_value_line, 6, 1, 1, 1) + self.label_2 = QtWidgets.QLabel(parent=fitparameter_save_dialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 6, 4, 1, 1) + self.tableWidget = QtWidgets.QTableWidget(parent=fitparameter_save_dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth()) + self.tableWidget.setSizePolicy(sizePolicy) + self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.tableWidget.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DragOnly) + self.tableWidget.setAlternatingRowColors(True) + self.tableWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.tableWidget.setColumnCount(2) + self.tableWidget.setObjectName("tableWidget") + self.tableWidget.setRowCount(0) + self.tableWidget.horizontalHeader().setVisible(False) + self.tableWidget.horizontalHeader().setStretchLastSection(True) + self.gridLayout.addWidget(self.tableWidget, 2, 0, 1, 7) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=fitparameter_save_dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 7, 0, 1, 7) + self.label = QtWidgets.QLabel(parent=fitparameter_save_dialog) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 6, 0, 1, 1) + self.header_checkBox = QtWidgets.QCheckBox(parent=fitparameter_save_dialog) + self.header_checkBox.setObjectName("header_checkBox") + self.gridLayout.addWidget(self.header_checkBox, 5, 0, 1, 1) + self.label_5.setBuddy(self.col_line) + self.label_2.setBuddy(self.comment_line) + self.label.setBuddy(self.missing_value_line) + + self.retranslateUi(fitparameter_save_dialog) + self.buttonBox.accepted.connect(fitparameter_save_dialog.accept) # type: ignore + self.buttonBox.rejected.connect(fitparameter_save_dialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(fitparameter_save_dialog) + fitparameter_save_dialog.setTabOrder(self.save_path_button, self.save_path_line) + fitparameter_save_dialog.setTabOrder(self.save_path_line, self.tableWidget) + fitparameter_save_dialog.setTabOrder(self.tableWidget, self.header_edit) + fitparameter_save_dialog.setTabOrder(self.header_edit, self.missing_value_line) + fitparameter_save_dialog.setTabOrder(self.missing_value_line, self.comment_line) + + def retranslateUi(self, fitparameter_save_dialog): + _translate = QtCore.QCoreApplication.translate + fitparameter_save_dialog.setWindowTitle(_translate("fitparameter_save_dialog", "Save parameter")) + self.save_path_button.setText(_translate("fitparameter_save_dialog", "Save path...")) + self.comment_line.setText(_translate("fitparameter_save_dialog", "#")) + self.label_5.setText(_translate("fitparameter_save_dialog", "Columns")) + self.col_line.setPlaceholderText(_translate("fitparameter_save_dialog", "e.g. x; 1000/x; mean(T_1,beta); {beta/beta_1}; M_0*x")) + self.usage_button.setText(_translate("fitparameter_save_dialog", "Usage?")) + self.header_edit.setPlaceholderText(_translate("fitparameter_save_dialog", "Header ends always with column description. Additional header lines are commented automatically")) + self.label_4.setText(_translate("fitparameter_save_dialog", "Precision")) + self.missing_value_line.setText(_translate("fitparameter_save_dialog", "1e308")) + self.label_2.setText(_translate("fitparameter_save_dialog", "Comment")) + self.buttonBox.setToolTip(_translate("fitparameter_save_dialog", "Number of significant digits.")) + self.label.setText(_translate("fitparameter_save_dialog", "Missing values")) + self.header_checkBox.setText(_translate("fitparameter_save_dialog", "Header")) diff --git a/src/gui_qt/_py/save_fitmodel_dialog.py b/src/gui_qt/_py/save_fitmodel_dialog.py new file mode 100644 index 0000000..3c44051 --- /dev/null +++ b/src/gui_qt/_py/save_fitmodel_dialog.py @@ -0,0 +1,63 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/save_fitmodel_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_SaveDialog(object): + def setupUi(self, SaveDialog): + SaveDialog.setObjectName("SaveDialog") + SaveDialog.resize(400, 166) + self.gridLayout = QtWidgets.QGridLayout(SaveDialog) + self.gridLayout.setObjectName("gridLayout") + self.label_2 = QtWidgets.QLabel(parent=SaveDialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=SaveDialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 3, 1, 1, 1) + self.comboBox = QtWidgets.QComboBox(parent=SaveDialog) + self.comboBox.setObjectName("comboBox") + self.gridLayout.addWidget(self.comboBox, 1, 1, 1, 1) + self.label = QtWidgets.QLabel(parent=SaveDialog) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 0, 1, 1) + self.lineEdit = QtWidgets.QLineEdit(parent=SaveDialog) + self.lineEdit.setObjectName("lineEdit") + self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout.addItem(spacerItem, 4, 1, 1, 1) + self.frame = QtWidgets.QFrame(parent=SaveDialog) + self.frame.setFrameShape(QtWidgets.QFrame.Shape.NoFrame) + self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Plain) + self.frame.setObjectName("frame") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setSpacing(0) + self.horizontalLayout.setObjectName("horizontalLayout") + self.lineEdit_2 = QtWidgets.QLineEdit(parent=self.frame) + self.lineEdit_2.setObjectName("lineEdit_2") + self.horizontalLayout.addWidget(self.lineEdit_2) + self.toolButton = QtWidgets.QToolButton(parent=self.frame) + self.toolButton.setObjectName("toolButton") + self.horizontalLayout.addWidget(self.toolButton) + self.gridLayout.addWidget(self.frame, 2, 1, 1, 1) + + self.retranslateUi(SaveDialog) + self.buttonBox.accepted.connect(SaveDialog.accept) # type: ignore + self.buttonBox.rejected.connect(SaveDialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(SaveDialog) + + def retranslateUi(self, SaveDialog): + _translate = QtCore.QCoreApplication.translate + SaveDialog.setWindowTitle(_translate("SaveDialog", "Dialog")) + self.label_2.setText(_translate("SaveDialog", "Group")) + self.label.setText(_translate("SaveDialog", "Name")) + self.toolButton.setText(_translate("SaveDialog", "OK")) diff --git a/src/gui_qt/_py/shift_scale_dialog.py b/src/gui_qt/_py/shift_scale_dialog.py new file mode 100644 index 0000000..0edcfab --- /dev/null +++ b/src/gui_qt/_py/shift_scale_dialog.py @@ -0,0 +1,313 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/shift_scale_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_shift_dialog(object): + def setupUi(self, shift_dialog): + shift_dialog.setObjectName("shift_dialog") + shift_dialog.resize(959, 639) + self.verticalLayout = QtWidgets.QVBoxLayout(shift_dialog) + self.verticalLayout.setObjectName("verticalLayout") + self.splitter = QtWidgets.QSplitter(parent=shift_dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.splitter.sizePolicy().hasHeightForWidth()) + self.splitter.setSizePolicy(sizePolicy) + self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.splitter.setObjectName("splitter") + self.tabWidget = QtWidgets.QTabWidget(parent=self.splitter) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) + self.tabWidget.setSizePolicy(sizePolicy) + self.tabWidget.setObjectName("tabWidget") + self.shift_page = QtWidgets.QWidget() + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.shift_page.sizePolicy().hasHeightForWidth()) + self.shift_page.setSizePolicy(sizePolicy) + self.shift_page.setObjectName("shift_page") + self.gridLayout_2 = QtWidgets.QGridLayout(self.shift_page) + self.gridLayout_2.setContentsMargins(3, 3, 3, 3) + self.gridLayout_2.setObjectName("gridLayout_2") + self.label_7 = QtWidgets.QLabel(parent=self.shift_page) + self.label_7.setObjectName("label_7") + self.gridLayout_2.addWidget(self.label_7, 2, 0, 1, 1) + self.label = QtWidgets.QLabel(parent=self.shift_page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) + self.label.setSizePolicy(sizePolicy) + self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.label.setObjectName("label") + self.gridLayout_2.addWidget(self.label, 2, 1, 1, 1) + self.x_shift_spinbox = SciSpinBox(parent=self.shift_page) + self.x_shift_spinbox.setMinimumSize(QtCore.QSize(150, 0)) + self.x_shift_spinbox.setDecimals(3) + self.x_shift_spinbox.setProperty("value", 0.0) + self.x_shift_spinbox.setObjectName("x_shift_spinbox") + self.gridLayout_2.addWidget(self.x_shift_spinbox, 2, 2, 1, 1) + self.label_5 = QtWidgets.QLabel(parent=self.shift_page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth()) + self.label_5.setSizePolicy(sizePolicy) + self.label_5.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.label_5.setObjectName("label_5") + self.gridLayout_2.addWidget(self.label_5, 3, 1, 1, 1) + self.y_shift_spinbox = SciSpinBox(parent=self.shift_page) + self.y_shift_spinbox.setMinimumSize(QtCore.QSize(150, 0)) + self.y_shift_spinbox.setDecimals(3) + self.y_shift_spinbox.setProperty("value", 0.0) + self.y_shift_spinbox.setObjectName("y_shift_spinbox") + self.gridLayout_2.addWidget(self.y_shift_spinbox, 3, 2, 1, 1) + self.shift_table = QtWidgets.QTableWidget(parent=self.shift_page) + self.shift_table.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection) + self.shift_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.shift_table.setColumnCount(3) + self.shift_table.setObjectName("shift_table") + self.shift_table.setRowCount(0) + item = QtWidgets.QTableWidgetItem() + self.shift_table.setHorizontalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.shift_table.setHorizontalHeaderItem(1, item) + item = QtWidgets.QTableWidgetItem() + self.shift_table.setHorizontalHeaderItem(2, item) + self.shift_table.verticalHeader().setVisible(False) + self.gridLayout_2.addWidget(self.shift_table, 0, 0, 1, 3) + self.tabWidget.addTab(self.shift_page, "") + self.scale_page = QtWidgets.QWidget() + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.scale_page.sizePolicy().hasHeightForWidth()) + self.scale_page.setSizePolicy(sizePolicy) + self.scale_page.setObjectName("scale_page") + self.gridLayout = QtWidgets.QGridLayout(self.scale_page) + self.gridLayout.setContentsMargins(3, 3, 3, 3) + self.gridLayout.setObjectName("gridLayout") + self.label_3 = QtWidgets.QLabel(parent=self.scale_page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) + self.label_3.setSizePolicy(sizePolicy) + self.label_3.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.label_3.setObjectName("label_3") + self.gridLayout.addWidget(self.label_3, 1, 1, 1, 1) + self.x_scale_spinbox = SciSpinBox(parent=self.scale_page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.x_scale_spinbox.sizePolicy().hasHeightForWidth()) + self.x_scale_spinbox.setSizePolicy(sizePolicy) + self.x_scale_spinbox.setMinimumSize(QtCore.QSize(150, 0)) + self.x_scale_spinbox.setDecimals(3) + self.x_scale_spinbox.setProperty("value", 1.0) + self.x_scale_spinbox.setObjectName("x_scale_spinbox") + self.gridLayout.addWidget(self.x_scale_spinbox, 1, 2, 1, 1) + self.label_6 = QtWidgets.QLabel(parent=self.scale_page) + self.label_6.setObjectName("label_6") + self.gridLayout.addWidget(self.label_6, 1, 0, 1, 1) + self.label_2 = QtWidgets.QLabel(parent=self.scale_page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) + self.label_2.setSizePolicy(sizePolicy) + self.label_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 2, 1, 1, 1) + self.y_scale_spinbox = SciSpinBox(parent=self.scale_page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.y_scale_spinbox.sizePolicy().hasHeightForWidth()) + self.y_scale_spinbox.setSizePolicy(sizePolicy) + self.y_scale_spinbox.setMinimumSize(QtCore.QSize(150, 0)) + self.y_scale_spinbox.setDecimals(3) + self.y_scale_spinbox.setProperty("value", 1.0) + self.y_scale_spinbox.setObjectName("y_scale_spinbox") + self.gridLayout.addWidget(self.y_scale_spinbox, 2, 2, 1, 1) + self.scale_table = QtWidgets.QTableWidget(parent=self.scale_page) + self.scale_table.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection) + self.scale_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.scale_table.setObjectName("scale_table") + self.scale_table.setColumnCount(3) + self.scale_table.setRowCount(0) + item = QtWidgets.QTableWidgetItem() + self.scale_table.setHorizontalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.scale_table.setHorizontalHeaderItem(1, item) + item = QtWidgets.QTableWidgetItem() + self.scale_table.setHorizontalHeaderItem(2, item) + self.scale_table.verticalHeader().setVisible(False) + self.gridLayout.addWidget(self.scale_table, 0, 0, 1, 3) + self.tabWidget.addTab(self.scale_page, "") + self.verticalFrame_2 = QtWidgets.QFrame(parent=self.splitter) + self.verticalFrame_2.setObjectName("verticalFrame_2") + self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.verticalFrame_2) + self.verticalLayout_2.setSpacing(3) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.graphicsView = NMRPlotWidget(parent=self.verticalFrame_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth()) + self.graphicsView.setSizePolicy(sizePolicy) + self.graphicsView.setObjectName("graphicsView") + self.verticalLayout_2.addWidget(self.graphicsView) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem) + self.label_4 = QtWidgets.QLabel(parent=self.verticalFrame_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + self.label_4.setSizePolicy(sizePolicy) + self.label_4.setObjectName("label_4") + self.horizontalLayout.addWidget(self.label_4) + self.xlog_checkbox = QtWidgets.QCheckBox(parent=self.verticalFrame_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.xlog_checkbox.sizePolicy().hasHeightForWidth()) + self.xlog_checkbox.setSizePolicy(sizePolicy) + self.xlog_checkbox.setObjectName("xlog_checkbox") + self.horizontalLayout.addWidget(self.xlog_checkbox) + self.ylog_checkbox = QtWidgets.QCheckBox(parent=self.verticalFrame_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ylog_checkbox.sizePolicy().hasHeightForWidth()) + self.ylog_checkbox.setSizePolicy(sizePolicy) + self.ylog_checkbox.setObjectName("ylog_checkbox") + self.horizontalLayout.addWidget(self.ylog_checkbox) + self.verticalLayout_2.addLayout(self.horizontalLayout) + self.verticalLayout.addWidget(self.splitter) + self.line = QtWidgets.QFrame(parent=shift_dialog) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.verticalLayout.addWidget(self.line) + self.frame = QtWidgets.QFrame(parent=shift_dialog) + self.frame.setObjectName("frame") + self.gridLayout_4 = QtWidgets.QGridLayout(self.frame) + self.gridLayout_4.setContentsMargins(3, 3, 3, 3) + self.gridLayout_4.setSpacing(3) + self.gridLayout_4.setObjectName("gridLayout_4") + self.value_checkbox = QtWidgets.QCheckBox(parent=self.frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.value_checkbox.sizePolicy().hasHeightForWidth()) + self.value_checkbox.setSizePolicy(sizePolicy) + self.value_checkbox.setChecked(True) + self.value_checkbox.setObjectName("value_checkbox") + self.gridLayout_4.addWidget(self.value_checkbox, 0, 1, 1, 1) + self.overwrite_checkbox = QtWidgets.QCheckBox(parent=self.frame) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.overwrite_checkbox.sizePolicy().hasHeightForWidth()) + self.overwrite_checkbox.setSizePolicy(sizePolicy) + self.overwrite_checkbox.setObjectName("overwrite_checkbox") + self.gridLayout_4.addWidget(self.overwrite_checkbox, 0, 0, 1, 1) + self.data_newgraph = QtWidgets.QCheckBox(parent=self.frame) + self.data_newgraph.setChecked(True) + self.data_newgraph.setObjectName("data_newgraph") + self.gridLayout_4.addWidget(self.data_newgraph, 1, 0, 1, 1) + self.data_combobox = QtWidgets.QComboBox(parent=self.frame) + self.data_combobox.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.data_combobox.sizePolicy().hasHeightForWidth()) + self.data_combobox.setSizePolicy(sizePolicy) + self.data_combobox.setObjectName("data_combobox") + self.gridLayout_4.addWidget(self.data_combobox, 2, 0, 1, 1) + self.values_newgraph = QtWidgets.QCheckBox(parent=self.frame) + self.values_newgraph.setChecked(True) + self.values_newgraph.setObjectName("values_newgraph") + self.gridLayout_4.addWidget(self.values_newgraph, 1, 1, 1, 1) + self.values_combobox = QtWidgets.QComboBox(parent=self.frame) + self.values_combobox.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.values_combobox.sizePolicy().hasHeightForWidth()) + self.values_combobox.setSizePolicy(sizePolicy) + self.values_combobox.setObjectName("values_combobox") + self.gridLayout_4.addWidget(self.values_combobox, 2, 1, 1, 1) + self.verticalLayout.addWidget(self.frame) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=shift_dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout.addWidget(self.buttonBox) + self.label.setBuddy(self.x_shift_spinbox) + self.label_5.setBuddy(self.y_shift_spinbox) + self.label_3.setBuddy(self.x_scale_spinbox) + self.label_2.setBuddy(self.y_scale_spinbox) + + self.retranslateUi(shift_dialog) + self.tabWidget.setCurrentIndex(0) + self.buttonBox.accepted.connect(shift_dialog.accept) # type: ignore + self.buttonBox.rejected.connect(shift_dialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(shift_dialog) + shift_dialog.setTabOrder(self.tabWidget, self.shift_table) + shift_dialog.setTabOrder(self.shift_table, self.x_shift_spinbox) + shift_dialog.setTabOrder(self.x_shift_spinbox, self.y_shift_spinbox) + shift_dialog.setTabOrder(self.y_shift_spinbox, self.scale_table) + shift_dialog.setTabOrder(self.scale_table, self.x_scale_spinbox) + shift_dialog.setTabOrder(self.x_scale_spinbox, self.y_scale_spinbox) + shift_dialog.setTabOrder(self.y_scale_spinbox, self.xlog_checkbox) + shift_dialog.setTabOrder(self.xlog_checkbox, self.ylog_checkbox) + shift_dialog.setTabOrder(self.ylog_checkbox, self.graphicsView) + + def retranslateUi(self, shift_dialog): + _translate = QtCore.QCoreApplication.translate + shift_dialog.setWindowTitle(_translate("shift_dialog", "Shift + Scale")) + self.label_7.setText(_translate("shift_dialog", "Global")) + self.label.setText(_translate("shift_dialog", "x
")) + self.label_5.setText(_translate("shift_dialog", "y
")) + item = self.shift_table.horizontalHeaderItem(0) + item.setText(_translate("shift_dialog", "Data")) + item = self.shift_table.horizontalHeaderItem(1) + item.setText(_translate("shift_dialog", "x")) + item = self.shift_table.horizontalHeaderItem(2) + item.setText(_translate("shift_dialog", "y")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.shift_page), _translate("shift_dialog", "Shift")) + self.label_3.setText(_translate("shift_dialog", "x
")) + self.label_6.setText(_translate("shift_dialog", "Global:")) + self.label_2.setText(_translate("shift_dialog", "y
")) + item = self.scale_table.horizontalHeaderItem(0) + item.setText(_translate("shift_dialog", "Data")) + item = self.scale_table.horizontalHeaderItem(1) + item.setText(_translate("shift_dialog", "x")) + item = self.scale_table.horizontalHeaderItem(2) + item.setText(_translate("shift_dialog", "y")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.scale_page), _translate("shift_dialog", "Scale")) + self.label_4.setText(_translate("shift_dialog", "Axes:")) + self.xlog_checkbox.setText(_translate("shift_dialog", "log x")) + self.ylog_checkbox.setText(_translate("shift_dialog", "log y")) + self.value_checkbox.setText(_translate("shift_dialog", "Export shift/scale values")) + self.overwrite_checkbox.setText(_translate("shift_dialog", "Overwrite data")) + self.data_newgraph.setText(_translate("shift_dialog", "New graph")) + self.values_newgraph.setText(_translate("shift_dialog", "New graph")) +from ..lib.graph_items import NMRPlotWidget +from ..lib.spinboxes import SciSpinBox diff --git a/src/gui_qt/_py/skipdialog.py b/src/gui_qt/_py/skipdialog.py new file mode 100644 index 0000000..d25dcff --- /dev/null +++ b/src/gui_qt/_py/skipdialog.py @@ -0,0 +1,94 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/skipdialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_SkipDialog(object): + def setupUi(self, SkipDialog): + SkipDialog.setObjectName("SkipDialog") + SkipDialog.resize(448, 208) + SkipDialog.setWindowTitle("") + self.gridLayout = QtWidgets.QGridLayout(SkipDialog) + self.gridLayout.setObjectName("gridLayout") + self.label_2 = QtWidgets.QLabel(parent=SkipDialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout.addItem(spacerItem, 3, 0, 1, 1) + self.label_4 = QtWidgets.QLabel(parent=SkipDialog) + self.label_4.setObjectName("label_4") + self.gridLayout.addWidget(self.label_4, 0, 0, 1, 4) + self.offset_spinbox = QtWidgets.QSpinBox(parent=SkipDialog) + self.offset_spinbox.setMinimum(0) + self.offset_spinbox.setMaximum(1) + self.offset_spinbox.setProperty("value", 0) + self.offset_spinbox.setObjectName("offset_spinbox") + self.gridLayout.addWidget(self.offset_spinbox, 1, 3, 1, 1) + self.label = QtWidgets.QLabel(parent=SkipDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) + self.label.setSizePolicy(sizePolicy) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 1, 2, 1, 1) + self.step_spinbox = QtWidgets.QSpinBox(parent=SkipDialog) + self.step_spinbox.setMinimum(2) + self.step_spinbox.setObjectName("step_spinbox") + self.gridLayout.addWidget(self.step_spinbox, 1, 1, 1, 1) + self.invert_check = QtWidgets.QCheckBox(parent=SkipDialog) + self.invert_check.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight) + self.invert_check.setObjectName("invert_check") + self.gridLayout.addWidget(self.invert_check, 1, 4, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=SkipDialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 4, 0, 1, 5) + self.hide_button = QtWidgets.QRadioButton(parent=SkipDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.hide_button.sizePolicy().hasHeightForWidth()) + self.hide_button.setSizePolicy(sizePolicy) + self.hide_button.setChecked(True) + self.hide_button.setObjectName("hide_button") + self.buttonGroup = QtWidgets.QButtonGroup(SkipDialog) + self.buttonGroup.setObjectName("buttonGroup") + self.buttonGroup.addButton(self.hide_button) + self.gridLayout.addWidget(self.hide_button, 2, 0, 1, 2) + self.delete_button = QtWidgets.QRadioButton(parent=SkipDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.delete_button.sizePolicy().hasHeightForWidth()) + self.delete_button.setSizePolicy(sizePolicy) + self.delete_button.setObjectName("delete_button") + self.buttonGroup.addButton(self.delete_button) + self.gridLayout.addWidget(self.delete_button, 2, 2, 1, 3) + self.label_2.setBuddy(self.step_spinbox) + self.label.setBuddy(self.offset_spinbox) + + self.retranslateUi(SkipDialog) + self.buttonBox.accepted.connect(SkipDialog.accept) # type: ignore + self.buttonBox.rejected.connect(SkipDialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(SkipDialog) + SkipDialog.setTabOrder(self.step_spinbox, self.offset_spinbox) + SkipDialog.setTabOrder(self.offset_spinbox, self.invert_check) + SkipDialog.setTabOrder(self.invert_check, self.hide_button) + SkipDialog.setTabOrder(self.hide_button, self.delete_button) + + def retranslateUi(self, SkipDialog): + _translate = QtCore.QCoreApplication.translate + self.label_2.setText(_translate("SkipDialog", "Step")) + self.label_4.setText(_translate("SkipDialog", "Show every step point, beginning with offset (<step).
Use Invert to hide every step point.
Number of data points used as smoothing window.
")) + self.comboBox.setItemText(0, _translate("SmoothDialog", "Moving mean")) + self.comboBox.setItemText(1, _translate("SmoothDialog", "Savitzky-Golay")) + self.comboBox.setItemText(2, _translate("SmoothDialog", "Loess (slow, use for < 10000 pts)")) + self.comboBox.setItemText(3, _translate("SmoothDialog", "Moving median")) + self.comboBox.setItemText(4, _translate("SmoothDialog", "Moving standard deviation")) + self.comboBox.setItemText(5, _translate("SmoothDialog", "Moving variance")) + self.comboBox.setItemText(6, _translate("SmoothDialog", "Moving maximum")) + self.comboBox.setItemText(7, _translate("SmoothDialog", "Moving minimum")) + self.comboBox.setItemText(8, _translate("SmoothDialog", "Moving sum")) + self.label_2.setText(_translate("SmoothDialog", "Note: Sets must be sorted for correct results
")) diff --git a/src/gui_qt/_py/t1_calc_dialog.py b/src/gui_qt/_py/t1_calc_dialog.py new file mode 100644 index 0000000..d786031 --- /dev/null +++ b/src/gui_qt/_py/t1_calc_dialog.py @@ -0,0 +1,317 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/t1_calc_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(582, 698) + self.gridLayout_2 = QtWidgets.QGridLayout(Dialog) + self.gridLayout_2.setObjectName("gridLayout_2") + self.groupBox_2 = QtWidgets.QGroupBox(parent=Dialog) + self.groupBox_2.setObjectName("groupBox_2") + self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2) + self.verticalLayout_2.setContentsMargins(3, 3, 3, 3) + self.verticalLayout_2.setSpacing(0) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.specdens_combobox = QtWidgets.QComboBox(parent=self.groupBox_2) + self.specdens_combobox.setObjectName("specdens_combobox") + self.verticalLayout_2.addWidget(self.specdens_combobox) + self.specdens_frame = QtWidgets.QFrame(parent=self.groupBox_2) + self.specdens_frame.setObjectName("specdens_frame") + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.specdens_frame) + self.verticalLayout_3.setSpacing(0) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.verticalLayout_2.addWidget(self.specdens_frame) + self.coupling_combobox = QtWidgets.QComboBox(parent=self.groupBox_2) + self.coupling_combobox.setObjectName("coupling_combobox") + self.verticalLayout_2.addWidget(self.coupling_combobox) + self.coupling_frame = QtWidgets.QFrame(parent=self.groupBox_2) + self.coupling_frame.setObjectName("coupling_frame") + self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.coupling_frame) + self.verticalLayout_4.setContentsMargins(-1, -1, 1, 1) + self.verticalLayout_4.setSpacing(0) + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.verticalLayout_2.addWidget(self.coupling_frame) + self.gridLayout_2.addWidget(self.groupBox_2, 1, 0, 1, 1) + self.groupBox_3 = QtWidgets.QGroupBox(parent=Dialog) + self.groupBox_3.setObjectName("groupBox_3") + self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_3) + self.gridLayout_4.setContentsMargins(3, 3, 3, 3) + self.gridLayout_4.setSpacing(3) + self.gridLayout_4.setObjectName("gridLayout_4") + self.graph_combobox = QtWidgets.QComboBox(parent=self.groupBox_3) + self.graph_combobox.setEnabled(False) + self.graph_combobox.setObjectName("graph_combobox") + self.gridLayout_4.addWidget(self.graph_combobox, 1, 1, 1, 1) + self.graph_checkbox = QtWidgets.QCheckBox(parent=self.groupBox_3) + self.graph_checkbox.setChecked(True) + self.graph_checkbox.setObjectName("graph_checkbox") + self.gridLayout_4.addWidget(self.graph_checkbox, 1, 0, 1, 1) + self.relax_combox = QtWidgets.QComboBox(parent=self.groupBox_3) + self.relax_combox.setObjectName("relax_combox") + self.relax_combox.addItem("") + self.relax_combox.addItem("") + self.gridLayout_4.addWidget(self.relax_combox, 0, 0, 1, 2) + self.gridLayout_2.addWidget(self.groupBox_3, 2, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout_2.addItem(spacerItem, 3, 0, 1, 1) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Apply|QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout_2.addWidget(self.buttonBox, 4, 0, 1, 1) + self.groupBox = QtWidgets.QGroupBox(parent=Dialog) + self.groupBox.setObjectName("groupBox") + self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox) + self.gridLayout_3.setContentsMargins(3, 3, 3, 3) + self.gridLayout_3.setSpacing(2) + self.gridLayout_3.setObjectName("gridLayout_3") + self.second_x_lineEdit = QtWidgets.QLineEdit(parent=self.groupBox) + self.second_x_lineEdit.setObjectName("second_x_lineEdit") + self.gridLayout_3.addWidget(self.second_x_lineEdit, 10, 1, 1, 1) + self.x_input_combobox = QtWidgets.QComboBox(parent=self.groupBox) + self.x_input_combobox.setObjectName("x_input_combobox") + self.x_input_combobox.addItem("") + self.x_input_combobox.addItem("") + self.gridLayout_3.addWidget(self.x_input_combobox, 1, 1, 1, 1) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setSpacing(2) + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.radioButton = QtWidgets.QRadioButton(parent=self.groupBox) + self.radioButton.setChecked(True) + self.radioButton.setObjectName("radioButton") + self.buttonGroup = QtWidgets.QButtonGroup(Dialog) + self.buttonGroup.setObjectName("buttonGroup") + self.buttonGroup.addButton(self.radioButton) + self.horizontalLayout_4.addWidget(self.radioButton) + self.radioButton_2 = QtWidgets.QRadioButton(parent=self.groupBox) + self.radioButton_2.setObjectName("radioButton_2") + self.buttonGroup.addButton(self.radioButton_2) + self.horizontalLayout_4.addWidget(self.radioButton_2) + self.radioButton_4 = QtWidgets.QRadioButton(parent=self.groupBox) + self.radioButton_4.setObjectName("radioButton_4") + self.buttonGroup.addButton(self.radioButton_4) + self.horizontalLayout_4.addWidget(self.radioButton_4) + self.radioButton_3 = QtWidgets.QRadioButton(parent=self.groupBox) + self.radioButton_3.setObjectName("radioButton_3") + self.buttonGroup.addButton(self.radioButton_3) + self.horizontalLayout_4.addWidget(self.radioButton_3) + self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 2) + self.label_7 = QtWidgets.QLabel(parent=self.groupBox) + self.label_7.setObjectName("label_7") + self.gridLayout_3.addWidget(self.label_7, 10, 0, 1, 1) + self.line = QtWidgets.QFrame(parent=self.groupBox) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.gridLayout_3.addWidget(self.line, 9, 0, 1, 2) + self.line_2 = QtWidgets.QFrame(parent=self.groupBox) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout_3.addWidget(self.line_2, 7, 0, 1, 2) + self.range_widget = QtWidgets.QWidget(parent=self.groupBox) + self.range_widget.setObjectName("range_widget") + self.gridLayout = QtWidgets.QGridLayout(self.range_widget) + self.gridLayout.setContentsMargins(0, 0, 0, 0) + self.gridLayout.setObjectName("gridLayout") + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.gridLayout.addItem(spacerItem1, 0, 0, 1, 1) + self.stop_lineEdit = QtWidgets.QLineEdit(parent=self.range_widget) + self.stop_lineEdit.setObjectName("stop_lineEdit") + self.gridLayout.addWidget(self.stop_lineEdit, 0, 3, 1, 1) + self.label_4 = QtWidgets.QLabel(parent=self.range_widget) + self.label_4.setObjectName("label_4") + self.gridLayout.addWidget(self.label_4, 0, 2, 1, 1) + self.spinBox = QtWidgets.QSpinBox(parent=self.range_widget) + self.spinBox.setProperty("value", 50) + self.spinBox.setObjectName("spinBox") + self.gridLayout.addWidget(self.spinBox, 0, 5, 1, 1) + self.start_lineEdit = QtWidgets.QLineEdit(parent=self.range_widget) + self.start_lineEdit.setObjectName("start_lineEdit") + self.gridLayout.addWidget(self.start_lineEdit, 0, 1, 1, 1) + self.checkBox = QtWidgets.QCheckBox(parent=self.range_widget) + self.checkBox.setObjectName("checkBox") + self.gridLayout.addWidget(self.checkBox, 0, 6, 1, 1) + self.gridLayout_3.addWidget(self.range_widget, 2, 0, 1, 2) + self.data_widget = QtWidgets.QWidget(parent=self.groupBox) + self.data_widget.setObjectName("data_widget") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.data_widget) + self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_2.setSpacing(2) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.tau_graph_combobox = QtWidgets.QComboBox(parent=self.data_widget) + self.tau_graph_combobox.setObjectName("tau_graph_combobox") + self.horizontalLayout_2.addWidget(self.tau_graph_combobox) + self.tau_set_combobox = QtWidgets.QComboBox(parent=self.data_widget) + self.tau_set_combobox.setObjectName("tau_set_combobox") + self.horizontalLayout_2.addWidget(self.tau_set_combobox) + self.label_10 = QtWidgets.QLabel(parent=self.data_widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_10.sizePolicy().hasHeightForWidth()) + self.label_10.setSizePolicy(sizePolicy) + self.label_10.setObjectName("label_10") + self.horizontalLayout_2.addWidget(self.label_10) + self.x_radioButton = QtWidgets.QRadioButton(parent=self.data_widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.x_radioButton.sizePolicy().hasHeightForWidth()) + self.x_radioButton.setSizePolicy(sizePolicy) + self.x_radioButton.setObjectName("x_radioButton") + self.buttonGroup_2 = QtWidgets.QButtonGroup(Dialog) + self.buttonGroup_2.setObjectName("buttonGroup_2") + self.buttonGroup_2.addButton(self.x_radioButton) + self.horizontalLayout_2.addWidget(self.x_radioButton) + self.y_radioButton = QtWidgets.QRadioButton(parent=self.data_widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.y_radioButton.sizePolicy().hasHeightForWidth()) + self.y_radioButton.setSizePolicy(sizePolicy) + self.y_radioButton.setChecked(True) + self.y_radioButton.setObjectName("y_radioButton") + self.buttonGroup_2.addButton(self.y_radioButton) + self.horizontalLayout_2.addWidget(self.y_radioButton) + self.gridLayout_3.addWidget(self.data_widget, 3, 0, 1, 2) + self.temp_widget = QtWidgets.QWidget(parent=self.groupBox) + self.temp_widget.setObjectName("temp_widget") + self.gridLayout_5 = QtWidgets.QGridLayout(self.temp_widget) + self.gridLayout_5.setContentsMargins(0, 0, 0, 0) + self.gridLayout_5.setHorizontalSpacing(6) + self.gridLayout_5.setVerticalSpacing(0) + self.gridLayout_5.setObjectName("gridLayout_5") + self.arr_widget = QtWidgets.QWidget(parent=self.temp_widget) + self.arr_widget.setObjectName("arr_widget") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.arr_widget) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setSpacing(2) + self.horizontalLayout.setObjectName("horizontalLayout") + spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem2) + self.label = QtWidgets.QLabel(parent=self.arr_widget) + self.label.setObjectName("label") + self.horizontalLayout.addWidget(self.label) + self.tau0_lineEdit = QtWidgets.QLineEdit(parent=self.arr_widget) + self.tau0_lineEdit.setObjectName("tau0_lineEdit") + self.horizontalLayout.addWidget(self.tau0_lineEdit) + spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem3) + self.label_2 = QtWidgets.QLabel(parent=self.arr_widget) + self.label_2.setObjectName("label_2") + self.horizontalLayout.addWidget(self.label_2) + self.ea_lineEdit = QtWidgets.QLineEdit(parent=self.arr_widget) + self.ea_lineEdit.setObjectName("ea_lineEdit") + self.horizontalLayout.addWidget(self.ea_lineEdit) + self.gridLayout_5.addWidget(self.arr_widget, 0, 1, 1, 1) + self.vft_widget = QtWidgets.QWidget(parent=self.temp_widget) + self.vft_widget.setObjectName("vft_widget") + self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.vft_widget) + self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_3.setSpacing(2) + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.label_3 = QtWidgets.QLabel(parent=self.vft_widget) + self.label_3.setObjectName("label_3") + self.horizontalLayout_3.addWidget(self.label_3) + self.tau0_vft_lineEdit = QtWidgets.QLineEdit(parent=self.vft_widget) + self.tau0_vft_lineEdit.setObjectName("tau0_vft_lineEdit") + self.horizontalLayout_3.addWidget(self.tau0_vft_lineEdit) + spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_3.addItem(spacerItem4) + self.label_5 = QtWidgets.QLabel(parent=self.vft_widget) + self.label_5.setObjectName("label_5") + self.horizontalLayout_3.addWidget(self.label_5) + self.b_vft_lineEdit = QtWidgets.QLineEdit(parent=self.vft_widget) + self.b_vft_lineEdit.setObjectName("b_vft_lineEdit") + self.horizontalLayout_3.addWidget(self.b_vft_lineEdit) + spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_3.addItem(spacerItem5) + self.label_6 = QtWidgets.QLabel(parent=self.vft_widget) + self.label_6.setObjectName("label_6") + self.horizontalLayout_3.addWidget(self.label_6) + self.t0_vft_lineEdit = QtWidgets.QLineEdit(parent=self.vft_widget) + self.t0_vft_lineEdit.setObjectName("t0_vft_lineEdit") + self.horizontalLayout_3.addWidget(self.t0_vft_lineEdit) + self.gridLayout_5.addWidget(self.vft_widget, 1, 1, 1, 1) + self.temp_combobox = QtWidgets.QComboBox(parent=self.temp_widget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.temp_combobox.sizePolicy().hasHeightForWidth()) + self.temp_combobox.setSizePolicy(sizePolicy) + self.temp_combobox.setObjectName("temp_combobox") + self.temp_combobox.addItem("") + self.temp_combobox.addItem("") + self.gridLayout_5.addWidget(self.temp_combobox, 0, 0, 2, 1) + self.gridLayout_3.addWidget(self.temp_widget, 4, 0, 1, 2) + self.xtype_combobox = QtWidgets.QComboBox(parent=self.groupBox) + self.xtype_combobox.setObjectName("xtype_combobox") + self.xtype_combobox.addItem("") + self.xtype_combobox.addItem("") + self.xtype_combobox.addItem("") + self.xtype_combobox.addItem("") + self.gridLayout_3.addWidget(self.xtype_combobox, 8, 1, 1, 1) + self.label_8 = QtWidgets.QLabel(parent=self.groupBox) + self.label_8.setObjectName("label_8") + self.gridLayout_3.addWidget(self.label_8, 8, 0, 1, 1) + self.label_9 = QtWidgets.QLabel(parent=self.groupBox) + self.label_9.setObjectName("label_9") + self.gridLayout_3.addWidget(self.label_9, 1, 0, 1, 1) + self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 1) + + self.retranslateUi(Dialog) + self.buttonBox.accepted.connect(Dialog.accept) # type: ignore + self.buttonBox.rejected.connect(Dialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Calculate relaxation")) + self.groupBox_2.setTitle(_translate("Dialog", "Model")) + self.groupBox_3.setTitle(_translate("Dialog", "Result")) + self.graph_checkbox.setText(_translate("Dialog", "New graph?")) + self.relax_combox.setStatusTip(_translate("Dialog", "NOTE: Mean values are not available for all spectral densities. For more information ask someone.")) + self.relax_combox.setItemText(0, _translate("Dialog", "Spin-Lattice Relaxation T1")) + self.relax_combox.setItemText(1, _translate("Dialog", "Spin-Spin Relaxation T2")) + self.groupBox.setTitle(_translate("Dialog", "Axis")) + self.x_input_combobox.setItemText(0, _translate("Dialog", "Range")) + self.x_input_combobox.setItemText(1, _translate("Dialog", "Data")) + self.radioButton.setText(_translate("Dialog", "τ / s")) + self.radioButton_2.setText(_translate("Dialog", "ω / Hz")) + self.radioButton_4.setText(_translate("Dialog", "1000 K / T")) + self.radioButton_3.setText(_translate("Dialog", "T / K")) + self.label_7.setText(_translate("Dialog", "2nd axis")) + self.label_4.setText(_translate("Dialog", "–")) + self.spinBox.setSuffix(_translate("Dialog", " pts.")) + self.checkBox.setText(_translate("Dialog", "Log?")) + self.label_10.setText(_translate("Dialog", " Use")) + self.x_radioButton.setText(_translate("Dialog", "x")) + self.y_radioButton.setText(_translate("Dialog", "y")) + self.label.setText(_translate("Dialog", "τ0 / s ")) + self.tau0_lineEdit.setText(_translate("Dialog", "1")) + self.label_2.setText(_translate("Dialog", "E_A / eV ")) + self.ea_lineEdit.setText(_translate("Dialog", "1")) + self.label_3.setText(_translate("Dialog", "τ0 / s ")) + self.tau0_vft_lineEdit.setText(_translate("Dialog", "1")) + self.label_5.setText(_translate("Dialog", "B / K ")) + self.b_vft_lineEdit.setText(_translate("Dialog", "1")) + self.label_6.setText(_translate("Dialog", "T_0 / K ")) + self.t0_vft_lineEdit.setText(_translate("Dialog", "1")) + self.temp_combobox.setItemText(0, _translate("Dialog", "Arrhenius")) + self.temp_combobox.setItemText(1, _translate("Dialog", "VFT")) + self.xtype_combobox.setItemText(0, _translate("Dialog", "Function parameter: τ")) + self.xtype_combobox.setItemText(1, _translate("Dialog", "Peak time: τₚ")) + self.xtype_combobox.setItemText(2, _translate("Dialog", "Arithmetic mean: ⟨τ⟩")) + self.xtype_combobox.setItemText(3, _translate("Dialog", "Geometric mean: exp(⟨ln τ⟩)")) + self.label_8.setText(_translate("Dialog", "Interpretation as:")) + self.label_9.setText(_translate("Dialog", "Input from: ")) diff --git a/src/gui_qt/_py/t1dialog.py b/src/gui_qt/_py/t1dialog.py new file mode 100644 index 0000000..26b613c --- /dev/null +++ b/src/gui_qt/_py/t1dialog.py @@ -0,0 +1,228 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/t1dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_t1dialog(object): + def setupUi(self, t1dialog): + t1dialog.setObjectName("t1dialog") + t1dialog.resize(316, 741) + self.gridLayout_2 = QtWidgets.QGridLayout(t1dialog) + self.gridLayout_2.setContentsMargins(3, 3, 3, 3) + self.gridLayout_2.setObjectName("gridLayout_2") + self.groupBox_1 = QtWidgets.QGroupBox(parent=t1dialog) + self.groupBox_1.setObjectName("groupBox_1") + self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_1) + self.gridLayout_3.setContentsMargins(3, 3, 3, 3) + self.gridLayout_3.setHorizontalSpacing(3) + self.gridLayout_3.setVerticalSpacing(0) + self.gridLayout_3.setObjectName("gridLayout_3") + self.t1_combobox = QtWidgets.QComboBox(parent=self.groupBox_1) + self.t1_combobox.setObjectName("t1_combobox") + self.t1_combobox.addItem("") + self.t1_combobox.addItem("") + self.gridLayout_3.addWidget(self.t1_combobox, 1, 1, 1, 1) + self.temp_combobox = QtWidgets.QComboBox(parent=self.groupBox_1) + self.temp_combobox.setObjectName("temp_combobox") + self.temp_combobox.addItem("") + self.temp_combobox.addItem("") + self.temp_combobox.addItem("") + self.gridLayout_3.addWidget(self.temp_combobox, 1, 0, 1, 1) + self.gridLayout_2.addWidget(self.groupBox_1, 0, 0, 1, 1) + self.groupBox_2 = QtWidgets.QGroupBox(parent=t1dialog) + self.groupBox_2.setObjectName("groupBox_2") + self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2) + self.gridLayout.setContentsMargins(3, 3, 3, 3) + self.gridLayout.setHorizontalSpacing(3) + self.gridLayout.setVerticalSpacing(1) + self.gridLayout.setObjectName("gridLayout") + self.freq_combox = QtWidgets.QComboBox(parent=self.groupBox_2) + self.freq_combox.setObjectName("freq_combox") + self.freq_combox.addItem("") + self.freq_combox.addItem("") + self.freq_combox.addItem("") + self.gridLayout.addWidget(self.freq_combox, 0, 1, 1, 1) + self.freq_spinbox = QtWidgets.QDoubleSpinBox(parent=self.groupBox_2) + self.freq_spinbox.setMaximum(999.99) + self.freq_spinbox.setProperty("value", 100.0) + self.freq_spinbox.setObjectName("freq_spinbox") + self.gridLayout.addWidget(self.freq_spinbox, 0, 0, 1, 1) + self.gridLayout_2.addWidget(self.groupBox_2, 1, 0, 1, 1) + self.groupBox = QtWidgets.QGroupBox(parent=t1dialog) + self.groupBox.setObjectName("groupBox") + self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox) + self.verticalLayout_2.setContentsMargins(3, 3, 3, -1) + self.verticalLayout_2.setSpacing(2) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.specdens_combobox = QtWidgets.QComboBox(parent=self.groupBox) + self.specdens_combobox.setObjectName("specdens_combobox") + self.verticalLayout_2.addWidget(self.specdens_combobox) + self.sd_frame = QtWidgets.QFrame(parent=self.groupBox) + self.sd_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.sd_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.sd_frame.setObjectName("sd_frame") + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.sd_frame) + self.verticalLayout_3.setContentsMargins(1, 1, 1, 1) + self.verticalLayout_3.setSpacing(0) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.verticalLayout_2.addWidget(self.sd_frame) + self.coupling_combobox = QtWidgets.QComboBox(parent=self.groupBox) + self.coupling_combobox.setObjectName("coupling_combobox") + self.verticalLayout_2.addWidget(self.coupling_combobox) + self.cp_frame = QtWidgets.QFrame(parent=self.groupBox) + self.cp_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.cp_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.cp_frame.setObjectName("cp_frame") + self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.cp_frame) + self.verticalLayout_4.setContentsMargins(1, 1, 1, 1) + self.verticalLayout_4.setSpacing(0) + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.verticalLayout_2.addWidget(self.cp_frame) + self.gridLayout_2.addWidget(self.groupBox, 3, 0, 1, 1) + self.groupBox_5 = QtWidgets.QGroupBox(parent=t1dialog) + self.groupBox_5.setObjectName("groupBox_5") + self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_5) + self.gridLayout_5.setContentsMargins(3, 3, 3, 3) + self.gridLayout_5.setHorizontalSpacing(2) + self.gridLayout_5.setObjectName("gridLayout_5") + self.interpol_combobox = QtWidgets.QComboBox(parent=self.groupBox_5) + self.interpol_combobox.setObjectName("interpol_combobox") + self.interpol_combobox.addItem("") + self.interpol_combobox.addItem("") + self.interpol_combobox.addItem("") + self.interpol_combobox.addItem("") + self.gridLayout_5.addWidget(self.interpol_combobox, 0, 0, 1, 1) + self.frame = QtWidgets.QFrame(parent=self.groupBox_5) + self.frame.setFrameShape(QtWidgets.QFrame.Shape.NoFrame) + self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Plain) + self.frame.setObjectName("frame") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setObjectName("horizontalLayout") + self.label_9 = QtWidgets.QLabel(parent=self.frame) + self.label_9.setObjectName("label_9") + self.horizontalLayout.addWidget(self.label_9) + self.lineEdit_2 = QtWidgets.QLineEdit(parent=self.frame) + self.lineEdit_2.setObjectName("lineEdit_2") + self.horizontalLayout.addWidget(self.lineEdit_2) + self.label_10 = QtWidgets.QLabel(parent=self.frame) + self.label_10.setObjectName("label_10") + self.horizontalLayout.addWidget(self.label_10) + self.lineEdit_3 = QtWidgets.QLineEdit(parent=self.frame) + self.lineEdit_3.setObjectName("lineEdit_3") + self.horizontalLayout.addWidget(self.lineEdit_3) + self.gridLayout_5.addWidget(self.frame, 1, 0, 1, 2) + self.frame_2 = QtWidgets.QFrame(parent=self.groupBox_5) + self.frame_2.setFrameShape(QtWidgets.QFrame.Shape.NoFrame) + self.frame_2.setFrameShadow(QtWidgets.QFrame.Shadow.Plain) + self.frame_2.setObjectName("frame_2") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.frame_2) + self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.label_11 = QtWidgets.QLabel(parent=self.frame_2) + self.label_11.setObjectName("label_11") + self.horizontalLayout_2.addWidget(self.label_11) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_2.addItem(spacerItem) + self.label_13 = QtWidgets.QLabel(parent=self.frame_2) + self.label_13.setObjectName("label_13") + self.horizontalLayout_2.addWidget(self.label_13) + self.label_12 = QtWidgets.QLabel(parent=self.frame_2) + self.label_12.setObjectName("label_12") + self.horizontalLayout_2.addWidget(self.label_12) + self.gridLayout_5.addWidget(self.frame_2, 2, 0, 1, 2) + self.t1min_toolButton = QtWidgets.QToolButton(parent=self.groupBox_5) + self.t1min_toolButton.setObjectName("t1min_toolButton") + self.gridLayout_5.addWidget(self.t1min_toolButton, 0, 1, 1, 1) + self.gridLayout_2.addWidget(self.groupBox_5, 2, 0, 1, 1) + self.groupBox_3 = QtWidgets.QGroupBox(parent=t1dialog) + self.groupBox_3.setObjectName("groupBox_3") + self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_3) + self.gridLayout_4.setContentsMargins(3, 3, 3, 3) + self.gridLayout_4.setSpacing(3) + self.gridLayout_4.setObjectName("gridLayout_4") + self.graph_combobox = QtWidgets.QComboBox(parent=self.groupBox_3) + self.graph_combobox.setEnabled(False) + self.graph_combobox.setObjectName("graph_combobox") + self.gridLayout_4.addWidget(self.graph_combobox, 3, 1, 1, 1) + self.tau_combox = QtWidgets.QComboBox(parent=self.groupBox_3) + self.tau_combox.setObjectName("tau_combox") + self.tau_combox.addItem("") + self.tau_combox.addItem("") + self.tau_combox.addItem("") + self.tau_combox.addItem("") + self.gridLayout_4.addWidget(self.tau_combox, 1, 0, 1, 2) + self.checkBox_interpol = QtWidgets.QCheckBox(parent=self.groupBox_3) + self.checkBox_interpol.setEnabled(False) + self.checkBox_interpol.setObjectName("checkBox_interpol") + self.gridLayout_4.addWidget(self.checkBox_interpol, 2, 0, 1, 2) + self.graph_checkbox = QtWidgets.QCheckBox(parent=self.groupBox_3) + self.graph_checkbox.setChecked(True) + self.graph_checkbox.setObjectName("graph_checkbox") + self.gridLayout_4.addWidget(self.graph_checkbox, 3, 0, 1, 1) + self.label = QtWidgets.QLabel(parent=self.groupBox_3) + self.label.setObjectName("label") + self.gridLayout_4.addWidget(self.label, 0, 0, 1, 1) + self.label_t1min = QtWidgets.QLabel(parent=self.groupBox_3) + self.label_t1min.setText("") + self.label_t1min.setObjectName("label_t1min") + self.gridLayout_4.addWidget(self.label_t1min, 0, 1, 1, 1) + self.gridLayout_2.addWidget(self.groupBox_3, 4, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(17, 19, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout_2.addItem(spacerItem1, 6, 0, 1, 1) + self.calc_pushButton = QtWidgets.QPushButton(parent=t1dialog) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.calc_pushButton.setFont(font) + self.calc_pushButton.setObjectName("calc_pushButton") + self.gridLayout_2.addWidget(self.calc_pushButton, 5, 0, 1, 1) + self.label_9.setBuddy(self.lineEdit_2) + self.label_10.setBuddy(self.lineEdit_3) + + self.retranslateUi(t1dialog) + QtCore.QMetaObject.connectSlotsByName(t1dialog) + + def retranslateUi(self, t1dialog): + _translate = QtCore.QCoreApplication.translate + t1dialog.setWindowTitle(_translate("t1dialog", "Form")) + self.groupBox_1.setTitle(_translate("t1dialog", "Axes")) + self.t1_combobox.setItemText(0, _translate("t1dialog", "T1")) + self.t1_combobox.setItemText(1, _translate("t1dialog", "1/T1")) + self.temp_combobox.setItemText(0, _translate("t1dialog", "1000/T")) + self.temp_combobox.setItemText(1, _translate("t1dialog", "T")) + self.temp_combobox.setItemText(2, _translate("t1dialog", "1/T")) + self.groupBox_2.setTitle(_translate("t1dialog", "Frequency")) + self.freq_combox.setItemText(0, _translate("t1dialog", "MHz")) + self.freq_combox.setItemText(1, _translate("t1dialog", "kHz")) + self.freq_combox.setItemText(2, _translate("t1dialog", "Hz")) + self.groupBox.setTitle(_translate("t1dialog", "Model")) + self.groupBox_5.setTitle(_translate("t1dialog", "Pick T1 minimon")) + self.interpol_combobox.setItemText(0, _translate("t1dialog", "Data minimum")) + self.interpol_combobox.setItemText(1, _translate("t1dialog", "Parabola")) + self.interpol_combobox.setItemText(2, _translate("t1dialog", "Cubic spline")) + self.interpol_combobox.setItemText(3, _translate("t1dialog", "Akima spline")) + self.label_9.setText(_translate("t1dialog", "Interpolate")) + self.lineEdit_2.setPlaceholderText(_translate("t1dialog", "1 K")) + self.label_10.setText(_translate("t1dialog", "--")) + self.lineEdit_3.setPlaceholderText(_translate("t1dialog", "2000 K")) + self.label_11.setText(_translate("t1dialog", "Minimon")) + self.label_13.setText(_translate("t1dialog", "x value")) + self.label_12.setText(_translate("t1dialog", "y value")) + self.t1min_toolButton.setText(_translate("t1dialog", "Set")) + self.groupBox_3.setTitle(_translate("t1dialog", "Result")) + self.tau_combox.setStatusTip(_translate("t1dialog", "NOTE: Mean values are not available for all spectral densities. For more information ask someone.")) + self.tau_combox.setItemText(0, _translate("t1dialog", "Fit parameter: τ")) + self.tau_combox.setItemText(1, _translate("t1dialog", "Peak time: τₚ")) + self.tau_combox.setItemText(2, _translate("t1dialog", "Arithmetic mean: ⟨τ⟩")) + self.tau_combox.setItemText(3, _translate("t1dialog", "Geometric mean: exp(⟨ln τ⟩)")) + self.checkBox_interpol.setText(_translate("t1dialog", "Use minimon interpolation")) + self.graph_checkbox.setText(_translate("t1dialog", "New graph?")) + self.label.setText(_translate("t1dialog", "Calculated minimon")) + self.calc_pushButton.setText(_translate("t1dialog", "Calculate")) diff --git a/src/gui_qt/_py/tnmh_dialog.py b/src/gui_qt/_py/tnmh_dialog.py new file mode 100644 index 0000000..b8d58f7 --- /dev/null +++ b/src/gui_qt/_py/tnmh_dialog.py @@ -0,0 +1,251 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/tnmh_dialog.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_DSCEvalDialog(object): + def setupUi(self, DSCEvalDialog): + DSCEvalDialog.setObjectName("DSCEvalDialog") + DSCEvalDialog.resize(996, 712) + self.gridLayout = QtWidgets.QGridLayout(DSCEvalDialog) + self.gridLayout.setObjectName("gridLayout") + self.listWidget = QListWidgetSelect(parent=DSCEvalDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Maximum, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) + self.listWidget.setSizePolicy(sizePolicy) + self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection) + self.listWidget.setObjectName("listWidget") + self.gridLayout.addWidget(self.listWidget, 0, 0, 1, 1) + self.stackedWidget = QtWidgets.QStackedWidget(parent=DSCEvalDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.stackedWidget.sizePolicy().hasHeightForWidth()) + self.stackedWidget.setSizePolicy(sizePolicy) + self.stackedWidget.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.stackedWidget.setObjectName("stackedWidget") + self.page = QtWidgets.QWidget() + self.page.setObjectName("page") + self.gridLayout_2 = QtWidgets.QGridLayout(self.page) + self.gridLayout_2.setObjectName("gridLayout_2") + self.gridLayout_9 = QtWidgets.QGridLayout() + self.gridLayout_9.setObjectName("gridLayout_9") + self.tg_export_check = QtWidgets.QCheckBox(parent=self.page) + self.tg_export_check.setChecked(True) + self.tg_export_check.setObjectName("tg_export_check") + self.gridLayout_9.addWidget(self.tg_export_check, 0, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout_9.addItem(spacerItem, 3, 0, 1, 1) + self.tglines_export_check = QtWidgets.QCheckBox(parent=self.page) + self.tglines_export_check.setChecked(True) + self.tglines_export_check.setObjectName("tglines_export_check") + self.gridLayout_9.addWidget(self.tglines_export_check, 0, 1, 1, 1) + self.tg_export_button = QtWidgets.QPushButton(parent=self.page) + self.tg_export_button.setObjectName("tg_export_button") + self.gridLayout_9.addWidget(self.tg_export_button, 2, 0, 1, 2) + self.gridLayout_2.addLayout(self.gridLayout_9, 2, 1, 1, 1) + self.tg_tree = QtWidgets.QTreeWidget(parent=self.page) + self.tg_tree.setObjectName("tg_tree") + self.tg_tree.headerItem().setText(0, "1") + self.tg_tree.header().setVisible(False) + self.gridLayout_2.addWidget(self.tg_tree, 2, 0, 1, 1) + self.dsc_plot = NMRPlotWidget(parent=self.page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.dsc_plot.sizePolicy().hasHeightForWidth()) + self.dsc_plot.setSizePolicy(sizePolicy) + self.dsc_plot.setObjectName("dsc_plot") + self.gridLayout_2.addWidget(self.dsc_plot, 1, 0, 1, 2) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.label = QtWidgets.QLabel(parent=self.page) + self.label.setObjectName("label") + self.horizontalLayout_4.addWidget(self.label) + self.calctg_button = QtWidgets.QPushButton(parent=self.page) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.calctg_button.sizePolicy().hasHeightForWidth()) + self.calctg_button.setSizePolicy(sizePolicy) + self.calctg_button.setObjectName("calctg_button") + self.horizontalLayout_4.addWidget(self.calctg_button) + self.gridLayout_2.addLayout(self.horizontalLayout_4, 0, 0, 1, 2) + self.stackedWidget.addWidget(self.page) + self.page_2 = QtWidgets.QWidget() + self.page_2.setObjectName("page_2") + self.gridLayout_3 = QtWidgets.QGridLayout(self.page_2) + self.gridLayout_3.setObjectName("gridLayout_3") + self.label_4 = QtWidgets.QLabel(parent=self.page_2) + self.label_4.setObjectName("label_4") + self.gridLayout_3.addWidget(self.label_4, 2, 0, 1, 1) + self.tghodge_graph = NMRPlotWidget(parent=self.page_2) + self.tghodge_graph.setObjectName("tghodge_graph") + self.gridLayout_3.addWidget(self.tghodge_graph, 1, 0, 1, 1) + self.tau_plot = NMRPlotWidget(parent=self.page_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tau_plot.sizePolicy().hasHeightForWidth()) + self.tau_plot.setSizePolicy(sizePolicy) + self.tau_plot.setObjectName("tau_plot") + self.gridLayout_3.addWidget(self.tau_plot, 1, 1, 1, 1) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.label_2 = QtWidgets.QLabel(parent=self.page_2) + self.label_2.setObjectName("label_2") + self.horizontalLayout_3.addWidget(self.label_2) + self.hodge_button = QtWidgets.QPushButton(parent=self.page_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.hodge_button.sizePolicy().hasHeightForWidth()) + self.hodge_button.setSizePolicy(sizePolicy) + self.hodge_button.setObjectName("hodge_button") + self.horizontalLayout_3.addWidget(self.hodge_button) + self.gridLayout_3.addLayout(self.horizontalLayout_3, 0, 0, 1, 2) + self.export_hodge_button = QtWidgets.QPushButton(parent=self.page_2) + self.export_hodge_button.setObjectName("export_hodge_button") + self.gridLayout_3.addWidget(self.export_hodge_button, 5, 1, 1, 1) + self.hodge_graph_combo = QtWidgets.QComboBox(parent=self.page_2) + self.hodge_graph_combo.setEnabled(False) + self.hodge_graph_combo.setObjectName("hodge_graph_combo") + self.gridLayout_3.addWidget(self.hodge_graph_combo, 4, 1, 1, 1) + self.hodge_graph_check = QtWidgets.QCheckBox(parent=self.page_2) + self.hodge_graph_check.setChecked(True) + self.hodge_graph_check.setObjectName("hodge_graph_check") + self.gridLayout_3.addWidget(self.hodge_graph_check, 4, 0, 1, 1) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.onset_check = QtWidgets.QCheckBox(parent=self.page_2) + self.onset_check.setChecked(True) + self.onset_check.setObjectName("onset_check") + self.horizontalLayout_5.addWidget(self.onset_check) + self.mid_check = QtWidgets.QCheckBox(parent=self.page_2) + self.mid_check.setChecked(True) + self.mid_check.setObjectName("mid_check") + self.horizontalLayout_5.addWidget(self.mid_check) + self.end_check = QtWidgets.QCheckBox(parent=self.page_2) + self.end_check.setChecked(True) + self.end_check.setObjectName("end_check") + self.horizontalLayout_5.addWidget(self.end_check) + self.inflection_check = QtWidgets.QCheckBox(parent=self.page_2) + self.inflection_check.setChecked(True) + self.inflection_check.setObjectName("inflection_check") + self.horizontalLayout_5.addWidget(self.inflection_check) + self.fictive_check = QtWidgets.QCheckBox(parent=self.page_2) + self.fictive_check.setChecked(True) + self.fictive_check.setObjectName("fictive_check") + self.horizontalLayout_5.addWidget(self.fictive_check) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_5.addItem(spacerItem1) + self.gridLayout_3.addLayout(self.horizontalLayout_5, 3, 0, 1, 2) + self.stackedWidget.addWidget(self.page_2) + self.page_3 = QtWidgets.QWidget() + self.page_3.setObjectName("page_3") + self.gridLayout_6 = QtWidgets.QGridLayout(self.page_3) + self.gridLayout_6.setObjectName("gridLayout_6") + self.tnmh_graphics = NMRPlotWidget(parent=self.page_3) + self.tnmh_graphics.setObjectName("tnmh_graphics") + self.gridLayout_6.addWidget(self.tnmh_graphics, 1, 0, 1, 2) + self.tnmh_tree = QtWidgets.QTreeWidget(parent=self.page_3) + self.tnmh_tree.setObjectName("tnmh_tree") + self.tnmh_tree.headerItem().setText(0, "1") + self.tnmh_tree.header().setVisible(False) + self.gridLayout_6.addWidget(self.tnmh_tree, 2, 0, 1, 1) + self.gridLayout_5 = QtWidgets.QGridLayout() + self.gridLayout_5.setObjectName("gridLayout_5") + self.tnmh_graph_check = QtWidgets.QCheckBox(parent=self.page_3) + self.tnmh_graph_check.setChecked(True) + self.tnmh_graph_check.setObjectName("tnmh_graph_check") + self.gridLayout_5.addWidget(self.tnmh_graph_check, 1, 0, 1, 1) + self.tnmhfit_export_check = QtWidgets.QCheckBox(parent=self.page_3) + self.tnmhfit_export_check.setChecked(True) + self.tnmhfit_export_check.setObjectName("tnmhfit_export_check") + self.gridLayout_5.addWidget(self.tnmhfit_export_check, 0, 0, 1, 1) + self.tnmh_export_button = QtWidgets.QPushButton(parent=self.page_3) + self.tnmh_export_button.setObjectName("tnmh_export_button") + self.gridLayout_5.addWidget(self.tnmh_export_button, 2, 0, 1, 2) + self.fictive_export_check = QtWidgets.QCheckBox(parent=self.page_3) + self.fictive_export_check.setChecked(True) + self.fictive_export_check.setObjectName("fictive_export_check") + self.gridLayout_5.addWidget(self.fictive_export_check, 0, 1, 1, 1) + self.tnmh_graph_combo = QtWidgets.QComboBox(parent=self.page_3) + self.tnmh_graph_combo.setEnabled(False) + self.tnmh_graph_combo.setObjectName("tnmh_graph_combo") + self.gridLayout_5.addWidget(self.tnmh_graph_combo, 1, 1, 1, 1) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.gridLayout_5.addItem(spacerItem2, 3, 0, 1, 1) + self.gridLayout_6.addLayout(self.gridLayout_5, 2, 1, 1, 1) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.label_3 = QtWidgets.QLabel(parent=self.page_3) + self.label_3.setObjectName("label_3") + self.horizontalLayout_2.addWidget(self.label_3) + self.tnhm_fitbutton = QtWidgets.QPushButton(parent=self.page_3) + self.tnhm_fitbutton.setObjectName("tnhm_fitbutton") + self.horizontalLayout_2.addWidget(self.tnhm_fitbutton) + self.gridLayout_6.addLayout(self.horizontalLayout_2, 0, 0, 1, 2) + self.stackedWidget.addWidget(self.page_3) + self.gridLayout.addWidget(self.stackedWidget, 0, 1, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem3) + self.back_button = QtWidgets.QToolButton(parent=DSCEvalDialog) + self.back_button.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.back_button.setArrowType(QtCore.Qt.ArrowType.LeftArrow) + self.back_button.setObjectName("back_button") + self.horizontalLayout.addWidget(self.back_button) + self.next_button = QtWidgets.QToolButton(parent=DSCEvalDialog) + self.next_button.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.next_button.setArrowType(QtCore.Qt.ArrowType.RightArrow) + self.next_button.setObjectName("next_button") + self.horizontalLayout.addWidget(self.next_button) + self.close_button = QtWidgets.QPushButton(parent=DSCEvalDialog) + self.close_button.setObjectName("close_button") + self.horizontalLayout.addWidget(self.close_button) + self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 2) + + self.retranslateUi(DSCEvalDialog) + self.stackedWidget.setCurrentIndex(0) + self.close_button.clicked.connect(DSCEvalDialog.close) # type: ignore + QtCore.QMetaObject.connectSlotsByName(DSCEvalDialog) + + def retranslateUi(self, DSCEvalDialog): + _translate = QtCore.QCoreApplication.translate + DSCEvalDialog.setWindowTitle(_translate("DSCEvalDialog", "To boldly go where no man has gone before")) + self.tg_export_check.setText(_translate("DSCEvalDialog", "Export Tg")) + self.tglines_export_check.setText(_translate("DSCEvalDialog", "Export lines")) + self.tg_export_button.setText(_translate("DSCEvalDialog", "Export")) + self.label.setText(_translate("DSCEvalDialog", "Glass transition
")) + self.calctg_button.setText(_translate("DSCEvalDialog", "Calculate Tg")) + self.label_4.setText(_translate("DSCEvalDialog", "Export tau:")) + self.label_2.setText(_translate("DSCEvalDialog", "Hodge tau
")) + self.hodge_button.setText(_translate("DSCEvalDialog", "Make it so.")) + self.export_hodge_button.setText(_translate("DSCEvalDialog", "Export")) + self.hodge_graph_check.setText(_translate("DSCEvalDialog", "New graph")) + self.onset_check.setText(_translate("DSCEvalDialog", "Onset")) + self.mid_check.setText(_translate("DSCEvalDialog", "Midpoint")) + self.end_check.setText(_translate("DSCEvalDialog", "End")) + self.inflection_check.setText(_translate("DSCEvalDialog", "Inflection")) + self.fictive_check.setText(_translate("DSCEvalDialog", "Fictive")) + self.tnmh_graph_check.setText(_translate("DSCEvalDialog", "New graph")) + self.tnmhfit_export_check.setText(_translate("DSCEvalDialog", "Export fit")) + self.tnmh_export_button.setText(_translate("DSCEvalDialog", "Export")) + self.fictive_export_check.setText(_translate("DSCEvalDialog", "Export dTf / dT")) + self.label_3.setText(_translate("DSCEvalDialog", "dTf/dT and TNMH
")) + self.tnhm_fitbutton.setText(_translate("DSCEvalDialog", "Engage!")) + self.back_button.setText(_translate("DSCEvalDialog", "Back")) + self.next_button.setText(_translate("DSCEvalDialog", "Next")) + self.close_button.setText(_translate("DSCEvalDialog", "Close")) +from ..lib.graph_items import NMRPlotWidget +from ..lib.listwidget import QListWidgetSelect diff --git a/src/gui_qt/_py/typeconversion.py b/src/gui_qt/_py/typeconversion.py new file mode 100644 index 0000000..2b90d16 --- /dev/null +++ b/src/gui_qt/_py/typeconversion.py @@ -0,0 +1,138 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/typeconversion.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(839, 502) + self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog) + self.verticalLayout_2.setContentsMargins(3, 3, 3, 3) + self.verticalLayout_2.setSpacing(3) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.label_4 = QtWidgets.QLabel(parent=Dialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + self.label_4.setSizePolicy(sizePolicy) + self.label_4.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.label_4.setObjectName("label_4") + self.verticalLayout_2.addWidget(self.label_4) + self.splitter = QtWidgets.QSplitter(parent=Dialog) + self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.splitter.setObjectName("splitter") + self.set_list = QtWidgets.QListWidget(parent=self.splitter) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.set_list.sizePolicy().hasHeightForWidth()) + self.set_list.setSizePolicy(sizePolicy) + self.set_list.setDragEnabled(True) + self.set_list.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DragOnly) + self.set_list.setObjectName("set_list") + self.verticalLayoutWidget = QtWidgets.QWidget(parent=self.splitter) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.gridLayout = QtWidgets.QGridLayout(self.verticalLayoutWidget) + self.gridLayout.setContentsMargins(0, 0, 0, 0) + self.gridLayout.setHorizontalSpacing(0) + self.gridLayout.setVerticalSpacing(2) + self.gridLayout.setObjectName("gridLayout") + self.simple_button = QtWidgets.QRadioButton(parent=self.verticalLayoutWidget) + self.simple_button.setChecked(True) + self.simple_button.setObjectName("simple_button") + self.buttonGroup = QtWidgets.QButtonGroup(Dialog) + self.buttonGroup.setObjectName("buttonGroup") + self.buttonGroup.addButton(self.simple_button) + self.gridLayout.addWidget(self.simple_button, 0, 0, 1, 1) + self.merge_button = QtWidgets.QRadioButton(parent=self.verticalLayoutWidget) + self.merge_button.setObjectName("merge_button") + self.buttonGroup.addButton(self.merge_button) + self.gridLayout.addWidget(self.merge_button, 0, 1, 1, 1) + self.stackedWidget = QtWidgets.QStackedWidget(parent=self.verticalLayoutWidget) + self.stackedWidget.setObjectName("stackedWidget") + self.page_1 = QtWidgets.QWidget() + self.page_1.setObjectName("page_1") + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.page_1) + self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) + self.verticalLayout_3.setSpacing(0) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.simple_table = QtWidgets.QTableWidget(parent=self.page_1) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.simple_table.sizePolicy().hasHeightForWidth()) + self.simple_table.setSizePolicy(sizePolicy) + self.simple_table.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DropOnly) + self.simple_table.setObjectName("simple_table") + self.simple_table.setColumnCount(2) + self.simple_table.setRowCount(0) + item = QtWidgets.QTableWidgetItem() + self.simple_table.setHorizontalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.simple_table.setHorizontalHeaderItem(1, item) + self.simple_table.horizontalHeader().setStretchLastSection(True) + self.verticalLayout_3.addWidget(self.simple_table) + self.stackedWidget.addWidget(self.page_1) + self.page_2 = QtWidgets.QWidget() + self.page_2.setObjectName("page_2") + self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.page_2) + self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) + self.verticalLayout_5.setSpacing(0) + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.merge_table = QtWidgets.QTableWidget(parent=self.page_2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.merge_table.sizePolicy().hasHeightForWidth()) + self.merge_table.setSizePolicy(sizePolicy) + self.merge_table.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers) + self.merge_table.setDragDropMode(QtWidgets.QAbstractItemView.DragDropMode.DropOnly) + self.merge_table.setDefaultDropAction(QtCore.Qt.DropAction.CopyAction) + self.merge_table.setObjectName("merge_table") + self.merge_table.setColumnCount(3) + self.merge_table.setRowCount(0) + item = QtWidgets.QTableWidgetItem() + self.merge_table.setHorizontalHeaderItem(0, item) + item = QtWidgets.QTableWidgetItem() + self.merge_table.setHorizontalHeaderItem(1, item) + item = QtWidgets.QTableWidgetItem() + self.merge_table.setHorizontalHeaderItem(2, item) + self.merge_table.horizontalHeader().setStretchLastSection(True) + self.verticalLayout_5.addWidget(self.merge_table) + self.stackedWidget.addWidget(self.page_2) + self.gridLayout.addWidget(self.stackedWidget, 1, 0, 1, 2) + self.verticalLayout_2.addWidget(self.splitter) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Close|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout_2.addWidget(self.buttonBox) + + self.retranslateUi(Dialog) + self.stackedWidget.setCurrentIndex(0) + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Change type")) + self.label_4.setText(_translate("Dialog", "Drag & drop datasets and select new type.")) + self.simple_button.setText(_translate("Dialog", "Simple conversion")) + self.merge_button.setText(_translate("Dialog", "Merge to complex set")) + item = self.simple_table.horizontalHeaderItem(0) + item.setText(_translate("Dialog", "Set")) + item = self.simple_table.horizontalHeaderItem(1) + item.setText(_translate("Dialog", "Type")) + item = self.merge_table.horizontalHeaderItem(0) + item.setText(_translate("Dialog", "Real")) + item = self.merge_table.horizontalHeaderItem(1) + item.setText(_translate("Dialog", "Imag")) + item = self.merge_table.horizontalHeaderItem(2) + item.setText(_translate("Dialog", "Type")) diff --git a/src/gui_qt/_py/valueeditor.py b/src/gui_qt/_py/valueeditor.py new file mode 100644 index 0000000..bf4b673 --- /dev/null +++ b/src/gui_qt/_py/valueeditor.py @@ -0,0 +1,105 @@ +# Form implementation generated from reading ui file 'nmreval/src/resources/_ui/valueeditor.ui' +# +# Created by: PyQt6 UI code generator 6.7.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_MaskDialog(object): + def setupUi(self, MaskDialog): + MaskDialog.setObjectName("MaskDialog") + MaskDialog.resize(383, 645) + self.verticalLayout = QtWidgets.QVBoxLayout(MaskDialog) + self.verticalLayout.setContentsMargins(3, 3, 3, 3) + self.verticalLayout.setSpacing(3) + self.verticalLayout.setObjectName("verticalLayout") + self.graph_combobox = QtWidgets.QComboBox(parent=MaskDialog) + self.graph_combobox.setObjectName("graph_combobox") + self.verticalLayout.addWidget(self.graph_combobox) + self.set_combobox = QtWidgets.QComboBox(parent=MaskDialog) + self.set_combobox.setObjectName("set_combobox") + self.verticalLayout.addWidget(self.set_combobox) + self.tableView = QtWidgets.QTableView(parent=MaskDialog) + self.tableView.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) + self.tableView.setObjectName("tableView") + self.verticalLayout.addWidget(self.tableView) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout.setObjectName("horizontalLayout") + self.label = QtWidgets.QLabel(parent=MaskDialog) + self.label.setObjectName("label") + self.horizontalLayout.addWidget(self.label) + self.spinBox = QtWidgets.QSpinBox(parent=MaskDialog) + self.spinBox.setMinimum(1) + self.spinBox.setObjectName("spinBox") + self.horizontalLayout.addWidget(self.spinBox) + self.toolButton = QtWidgets.QToolButton(parent=MaskDialog) + self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) + self.toolButton.setAutoRaise(True) + self.toolButton.setArrowType(QtCore.Qt.ArrowType.RightArrow) + self.toolButton.setObjectName("toolButton") + self.horizontalLayout.addWidget(self.toolButton) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout.addItem(spacerItem) + self.verticalLayout.addLayout(self.horizontalLayout) + self.line = QtWidgets.QFrame(parent=MaskDialog) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.line.setLineWidth(3) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setObjectName("line") + self.verticalLayout.addWidget(self.line) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout_2.setSpacing(3) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.add_button = QtWidgets.QPushButton(parent=MaskDialog) + icon = QtGui.QIcon.fromTheme("list-add") + self.add_button.setIcon(icon) + self.add_button.setObjectName("add_button") + self.horizontalLayout_2.addWidget(self.add_button) + self.delete_button = QtWidgets.QPushButton(parent=MaskDialog) + icon = QtGui.QIcon.fromTheme("list-remove") + self.delete_button.setIcon(icon) + self.delete_button.setObjectName("delete_button") + self.horizontalLayout_2.addWidget(self.delete_button) + self.split_button = QtWidgets.QPushButton(parent=MaskDialog) + self.split_button.setObjectName("split_button") + self.horizontalLayout_2.addWidget(self.split_button) + self.verticalLayout.addLayout(self.horizontalLayout_2) + self.line_2 = QtWidgets.QFrame(parent=MaskDialog) + self.line_2.setLineWidth(3) + self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line_2.setObjectName("line_2") + self.verticalLayout.addWidget(self.line_2) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout_3.setSpacing(3) + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.mask_button = QtWidgets.QPushButton(parent=MaskDialog) + self.mask_button.setObjectName("mask_button") + self.horizontalLayout_3.addWidget(self.mask_button) + self.unmaskbutton = QtWidgets.QPushButton(parent=MaskDialog) + self.unmaskbutton.setObjectName("unmaskbutton") + self.horizontalLayout_3.addWidget(self.unmaskbutton) + self.verticalLayout.addLayout(self.horizontalLayout_3) + self.label.setBuddy(self.spinBox) + + self.retranslateUi(MaskDialog) + QtCore.QMetaObject.connectSlotsByName(MaskDialog) + + def retranslateUi(self, MaskDialog): + _translate = QtCore.QCoreApplication.translate + MaskDialog.setWindowTitle(_translate("MaskDialog", "Form")) + self.label.setText(_translate("MaskDialog", "Go to line:")) + self.toolButton.setText(_translate("MaskDialog", "Go Go Power Rangers!")) + self.add_button.setText(_translate("MaskDialog", "Add row")) + self.delete_button.setText(_translate("MaskDialog", "Delete rows")) + self.split_button.setText(_translate("MaskDialog", "Split after selection")) + self.mask_button.setToolTip(_translate("MaskDialog", "Masked rows are shown in green
")) + self.mask_button.setText(_translate("MaskDialog", "Hide/Show selected")) + self.unmaskbutton.setText(_translate("MaskDialog", "Show all")) diff --git a/src/gui_qt/lib/logger.py b/src/gui_qt/lib/logger.py index cffe873..b99dc49 100644 --- a/src/gui_qt/lib/logger.py +++ b/src/gui_qt/lib/logger.py @@ -2,8 +2,6 @@ import enum import logging from pathlib import Path -from PyQt5 import QtWidgets - from ..editors.codeeditor import _make_textformats from ..Qt import QtWidgets, QtCore, QtGui from nmreval.configs import config_paths @@ -99,7 +97,7 @@ class QLog(QtWidgets.QDialog): layout.addWidget(self.plainTextEdit) self.buttonBox = QtWidgets.QDialogButtonBox() - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Close) self.buttonBox.accepted.connect(self.accept) self.buttonBox.rejected.connect(self.reject)