From 837ea2504c6768a63befb367cdbf52d88417f72e 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
Links this axis with another view. When linked, both views will display the same data range.
")) - self.autoPercentSpin.setToolTip(_translate("Form", "Percent of data to be visible when auto-scaling. It may be useful to decrease this value for data with spiky noise.
")) - self.autoPercentSpin.setSuffix(_translate("Form", "%")) - self.autoRadio.setToolTip(_translate("Form", "Automatically resize this axis whenever the displayed data is changed.
")) - self.autoRadio.setText(_translate("Form", "Auto")) - self.manualRadio.setToolTip(_translate("Form", "Set the range for this axis manually. This disables automatic scaling.
")) - self.manualRadio.setText(_translate("Form", "Manual")) - self.minText.setToolTip(_translate("Form", "Minimum value to display for this axis.
")) - self.minText.setText(_translate("Form", "0")) - self.maxText.setToolTip(_translate("Form", "Maximum value to display for this axis.
")) - self.maxText.setText(_translate("Form", "0")) - self.invertCheck.setToolTip(_translate("Form", "Inverts the display of this axis. (+y points downward instead of upward)
")) - self.invertCheck.setText(_translate("Form", "Invert Axis")) - self.mouseCheck.setToolTip(_translate("Form", "Enables mouse interaction (panning, scaling) for this axis.
")) - self.mouseCheck.setText(_translate("Form", "Mouse Enabled")) - self.visibleOnlyCheck.setToolTip(_translate("Form", "When checked, the axis will only auto-scale to data that is visible along the orthogonal axis.
")) - self.visibleOnlyCheck.setText(_translate("Form", "Visible Data Only")) - self.autoPanCheck.setToolTip(_translate("Form", "When checked, the axis will automatically pan to center on the current data, but the scale along this axis will not change.
")) - self.autoPanCheck.setText(_translate("Form", "Auto Pan Only")) diff --git a/src/gui_qt/_py/baseline_dialog.py b/src/gui_qt/_py/baseline_dialog.py deleted file mode 100644 index 6c632f7..0000000 --- a/src/gui_qt/_py/baseline_dialog.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/baseline_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_SignalEdit(object): - def setupUi(self, SignalEdit): - SignalEdit.setObjectName("SignalEdit") - SignalEdit.resize(919, 595) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(SignalEdit.sizePolicy().hasHeightForWidth()) - SignalEdit.setSizePolicy(sizePolicy) - self.gridLayout = QtWidgets.QGridLayout(SignalEdit) - self.gridLayout.setObjectName("gridLayout") - self.groupBox = QtWidgets.QWidget(SignalEdit) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) - self.groupBox.setSizePolicy(sizePolicy) - self.groupBox.setObjectName("groupBox") - self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox) - self.verticalLayout.setObjectName("verticalLayout") - self.listWidget = QtWidgets.QListWidget(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setObjectName("listWidget") - self.verticalLayout.addWidget(self.listWidget) - self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(SignalEdit) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 3) - self.graphicsView = NMRPlotWidget(SignalEdit) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth()) - self.graphicsView.setSizePolicy(sizePolicy) - self.graphicsView.setObjectName("graphicsView") - self.gridLayout.addWidget(self.graphicsView, 0, 2, 1, 1) - - self.retranslateUi(SignalEdit) - self.buttonBox.accepted.connect(SignalEdit.accept) # type: ignore - self.buttonBox.rejected.connect(SignalEdit.close) # type: ignore - QtCore.QMetaObject.connectSlotsByName(SignalEdit) - - def retranslateUi(self, SignalEdit): - _translate = QtCore.QCoreApplication.translate - SignalEdit.setWindowTitle(_translate("SignalEdit", "Dialog")) -from ..lib.graph_items import NMRPlotWidget diff --git a/src/gui_qt/_py/basewindow.py b/src/gui_qt/_py/basewindow.py deleted file mode 100644 index cca4f0f..0000000 --- a/src/gui_qt/_py/basewindow.py +++ /dev/null @@ -1,662 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file './nmreval/src/resources/_ui/basewindow.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_BaseWindow(object): - def setupUi(self, BaseWindow): - BaseWindow.setObjectName("BaseWindow") - BaseWindow.resize(1386, 827) - icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(":/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - BaseWindow.setWindowIcon(icon) - BaseWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks|QtWidgets.QMainWindow.AnimatedDocks|QtWidgets.QMainWindow.ForceTabbedDocks|QtWidgets.QMainWindow.VerticalTabs) - self.centralwidget = QtWidgets.QWidget(BaseWindow) - self.centralwidget.setObjectName("centralwidget") - self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget) - self.horizontalLayout.setContentsMargins(3, 3, 3, 3) - self.horizontalLayout.setSpacing(3) - self.horizontalLayout.setObjectName("horizontalLayout") - self.splitter = QtWidgets.QSplitter(self.centralwidget) - self.splitter.setOrientation(QtCore.Qt.Horizontal) - self.splitter.setObjectName("splitter") - self.tabWidget = QtWidgets.QTabWidget(self.splitter) - self.tabWidget.setTabPosition(QtWidgets.QTabWidget.West) - self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded) - self.tabWidget.setElideMode(QtCore.Qt.ElideRight) - self.tabWidget.setTabsClosable(True) - self.tabWidget.setMovable(False) - self.tabWidget.setTabBarAutoHide(True) - self.tabWidget.setObjectName("tabWidget") - self.datawidget = DataWidget() - self.datawidget.setObjectName("datawidget") - self.tabWidget.addTab(self.datawidget, "") - self.valuewidget = ValueEditWidget() - self.valuewidget.setObjectName("valuewidget") - icon1 = QtGui.QIcon() - icon1.addPixmap(QtGui.QPixmap(":/value_dock"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.tabWidget.addTab(self.valuewidget, icon1, "") - self.fit_dialog = QFitDialog() - self.fit_dialog.setObjectName("fit_dialog") - icon2 = QtGui.QIcon() - icon2.addPixmap(QtGui.QPixmap(":/fit_dock"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.tabWidget.addTab(self.fit_dialog, icon2, "") - self.editsignalwidget = EditSignalWidget() - self.editsignalwidget.setObjectName("editsignalwidget") - icon3 = QtGui.QIcon() - icon3.addPixmap(QtGui.QPixmap(":/signal_dock"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.tabWidget.addTab(self.editsignalwidget, icon3, "") - self.ptsselectwidget = PointSelectWidget() - self.ptsselectwidget.setObjectName("ptsselectwidget") - icon4 = QtGui.QIcon() - icon4.addPixmap(QtGui.QPixmap(":/peakpick_dock"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.tabWidget.addTab(self.ptsselectwidget, icon4, "") - self.t1tauwidget = QT1Widget() - self.t1tauwidget.setObjectName("t1tauwidget") - icon5 = QtGui.QIcon() - icon5.addPixmap(QtGui.QPixmap(":/eval_t1_dock"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.tabWidget.addTab(self.t1tauwidget, icon5, "") - self.drawingswidget = DrawingsWidget() - self.drawingswidget.setObjectName("drawingswidget") - self.tabWidget.addTab(self.drawingswidget, "") - self.integralwidget = IntegralWidget() - self.integralwidget.setObjectName("integralwidget") - self.tabWidget.addTab(self.integralwidget, "") - self.area = MdiAreaTile(self.splitter) - self.area.setObjectName("area") - self.horizontalLayout.addWidget(self.splitter) - BaseWindow.setCentralWidget(self.centralwidget) - self.menubar = QtWidgets.QMenuBar(BaseWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 1386, 20)) - self.menubar.setObjectName("menubar") - self.menuFile = QtWidgets.QMenu(self.menubar) - self.menuFile.setObjectName("menuFile") - self.menuSave = QtWidgets.QMenu(self.menuFile) - icon6 = QtGui.QIcon() - icon6.addPixmap(QtGui.QPixmap(":/Daleks.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.menuSave.setIcon(icon6) - self.menuSave.setSeparatorsCollapsible(True) - self.menuSave.setObjectName("menuSave") - self.menuData = QtWidgets.QMenu(self.menubar) - self.menuData.setObjectName("menuData") - self.menuCut_to_visible_range = QtWidgets.QMenu(self.menuData) - self.menuCut_to_visible_range.setObjectName("menuCut_to_visible_range") - self.menuHelp = QtWidgets.QMenu(self.menubar) - self.menuHelp.setObjectName("menuHelp") - self.menuExtra = QtWidgets.QMenu(self.menubar) - self.menuExtra.setObjectName("menuExtra") - self.menuNormalize = QtWidgets.QMenu(self.menuExtra) - icon7 = QtGui.QIcon() - icon7.addPixmap(QtGui.QPixmap(":/normal.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.menuNormalize.setIcon(icon7) - self.menuNormalize.setObjectName("menuNormalize") - self.menuFit = QtWidgets.QMenu(self.menubar) - self.menuFit.setObjectName("menuFit") - self.menuMethod = QtWidgets.QMenu(self.menuFit) - self.menuMethod.setObjectName("menuMethod") - self.menuLimits = QtWidgets.QMenu(self.menuFit) - self.menuLimits.setObjectName("menuLimits") - self.menuOptions = QtWidgets.QMenu(self.menubar) - self.menuOptions.setObjectName("menuOptions") - self.menuWindow = QtWidgets.QMenu(self.menubar) - self.menuWindow.setObjectName("menuWindow") - self.menuView = QtWidgets.QMenu(self.menuWindow) - self.menuView.setObjectName("menuView") - self.menuNMR = QtWidgets.QMenu(self.menubar) - self.menuNMR.setObjectName("menuNMR") - self.menuBDS = QtWidgets.QMenu(self.menubar) - self.menuBDS.setObjectName("menuBDS") - self.menuSpectrum = QtWidgets.QMenu(self.menubar) - self.menuSpectrum.setObjectName("menuSpectrum") - self.menuStuff = QtWidgets.QMenu(self.menubar) - self.menuStuff.setTitle("") - self.menuStuff.setObjectName("menuStuff") - self.menuDSC = QtWidgets.QMenu(self.menubar) - self.menuDSC.setObjectName("menuDSC") - BaseWindow.setMenuBar(self.menubar) - self.toolBar = QtWidgets.QToolBar(BaseWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.toolBar.sizePolicy().hasHeightForWidth()) - self.toolBar.setSizePolicy(sizePolicy) - self.toolBar.setAllowedAreas(QtCore.Qt.AllToolBarAreas) - self.toolBar.setIconSize(QtCore.QSize(24, 24)) - self.toolBar.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) - self.toolBar.setObjectName("toolBar") - BaseWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) - self.toolbar_edit = QtWidgets.QToolBar(BaseWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.toolbar_edit.sizePolicy().hasHeightForWidth()) - self.toolbar_edit.setSizePolicy(sizePolicy) - self.toolbar_edit.setIconSize(QtCore.QSize(24, 24)) - self.toolbar_edit.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) - self.toolbar_edit.setObjectName("toolbar_edit") - BaseWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolbar_edit) - self.statusBar = QtWidgets.QStatusBar(BaseWindow) - self.statusBar.setObjectName("statusBar") - BaseWindow.setStatusBar(self.statusBar) - self.toolBar_nmr = QtWidgets.QToolBar(BaseWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.toolBar_nmr.sizePolicy().hasHeightForWidth()) - self.toolBar_nmr.setSizePolicy(sizePolicy) - self.toolBar_nmr.setIconSize(QtCore.QSize(24, 24)) - self.toolBar_nmr.setObjectName("toolBar_nmr") - BaseWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar_nmr) - self.toolBar_spectrum = QtWidgets.QToolBar(BaseWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.toolBar_spectrum.sizePolicy().hasHeightForWidth()) - self.toolBar_spectrum.setSizePolicy(sizePolicy) - self.toolBar_spectrum.setIconSize(QtCore.QSize(24, 24)) - self.toolBar_spectrum.setObjectName("toolBar_spectrum") - BaseWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar_spectrum) - self.toolBar_data = QtWidgets.QToolBar(BaseWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.toolBar_data.sizePolicy().hasHeightForWidth()) - self.toolBar_data.setSizePolicy(sizePolicy) - self.toolBar_data.setIconSize(QtCore.QSize(24, 24)) - self.toolBar_data.setObjectName("toolBar_data") - BaseWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar_data) - self.action_close = QtWidgets.QAction(BaseWindow) - self.action_close.setObjectName("action_close") - self.actionExportGraphic = QtWidgets.QAction(BaseWindow) - self.actionExportGraphic.setObjectName("actionExportGraphic") - self.action_open = QtWidgets.QAction(BaseWindow) - self.action_open.setObjectName("action_open") - self.actionExportData = QtWidgets.QAction(BaseWindow) - self.actionExportData.setObjectName("actionExportData") - self.action_calc = QtWidgets.QAction(BaseWindow) - self.action_calc.setObjectName("action_calc") - self.action_delete_sets = QtWidgets.QAction(BaseWindow) - self.action_delete_sets.setObjectName("action_delete_sets") - self.action_save_fit_parameter = QtWidgets.QAction(BaseWindow) - self.action_save_fit_parameter.setObjectName("action_save_fit_parameter") - self.action_sort_pts = QtWidgets.QAction(BaseWindow) - self.action_sort_pts.setObjectName("action_sort_pts") - self.action_reset = QtWidgets.QAction(BaseWindow) - self.action_reset.setObjectName("action_reset") - self.actionDocumentation = QtWidgets.QAction(BaseWindow) - self.actionDocumentation.setObjectName("actionDocumentation") - self.action_FitWidget = QtWidgets.QAction(BaseWindow) - self.action_FitWidget.setObjectName("action_FitWidget") - self.action_norm_max = QtWidgets.QAction(BaseWindow) - self.action_norm_max.setObjectName("action_norm_max") - self.action_norm_first = QtWidgets.QAction(BaseWindow) - self.action_norm_first.setObjectName("action_norm_first") - self.action_norm_area = QtWidgets.QAction(BaseWindow) - self.action_norm_area.setObjectName("action_norm_area") - self.action_norm_max_abs = QtWidgets.QAction(BaseWindow) - self.action_norm_max_abs.setObjectName("action_norm_max_abs") - self.action_norm_last = QtWidgets.QAction(BaseWindow) - self.action_norm_last.setObjectName("action_norm_last") - self.actionSave = QtWidgets.QAction(BaseWindow) - self.actionSave.setObjectName("actionSave") - self.actiontoolbar_display = QtWidgets.QAction(BaseWindow) - self.actiontoolbar_display.setCheckable(True) - self.actiontoolbar_display.setObjectName("actiontoolbar_display") - self.actionEdit_toolbars = QtWidgets.QAction(BaseWindow) - self.actionEdit_toolbars.setCheckable(True) - self.actionEdit_toolbars.setObjectName("actionEdit_toolbars") - self.actionAddlines = QtWidgets.QAction(BaseWindow) - self.actionAddlines.setObjectName("actionAddlines") - self.actionColors = QtWidgets.QAction(BaseWindow) - self.actionColors.setObjectName("actionColors") - self.actionConcatenate_sets = QtWidgets.QAction(BaseWindow) - self.actionConcatenate_sets.setObjectName("actionConcatenate_sets") - self.actionShift = QtWidgets.QAction(BaseWindow) - self.actionShift.setObjectName("actionShift") - self.actionShow_log = QtWidgets.QAction(BaseWindow) - icon = QtGui.QIcon.fromTheme("dialog-information") - self.actionShow_log.setIcon(icon) - self.actionShow_log.setObjectName("actionShow_log") - self.action_create_fit_function = QtWidgets.QAction(BaseWindow) - self.action_create_fit_function.setObjectName("action_create_fit_function") - self.action_colorcycle = QtWidgets.QAction(BaseWindow) - self.action_colorcycle.setObjectName("action_colorcycle") - self.actionSave_session = QtWidgets.QAction(BaseWindow) - self.actionSave_session.setObjectName("actionSave_session") - self.actionMouse_behaviour = QtWidgets.QAction(BaseWindow) - self.actionMouse_behaviour.setCheckable(True) - self.actionMouse_behaviour.setObjectName("actionMouse_behaviour") - self.actionConfiguration = QtWidgets.QAction(BaseWindow) - self.actionConfiguration.setObjectName("actionConfiguration") - self.actionRefresh = QtWidgets.QAction(BaseWindow) - self.actionRefresh.setObjectName("actionRefresh") - self.actionInterpolation = QtWidgets.QAction(BaseWindow) - self.actionInterpolation.setObjectName("actionInterpolation") - self.actionRunning_values = QtWidgets.QAction(BaseWindow) - self.actionRunning_values.setObjectName("actionRunning_values") - self.actionFit_parameter_saving = QtWidgets.QAction(BaseWindow) - self.actionFit_parameter_saving.setObjectName("actionFit_parameter_saving") - self.actionShow_fit_parameter = QtWidgets.QAction(BaseWindow) - self.actionShow_fit_parameter.setObjectName("actionShow_fit_parameter") - self.actionSkip_points = QtWidgets.QAction(BaseWindow) - self.actionSkip_points.setObjectName("actionSkip_points") - self.actionGuide_lines = QtWidgets.QAction(BaseWindow) - self.actionGuide_lines.setObjectName("actionGuide_lines") - self.actionMaximize = QtWidgets.QAction(BaseWindow) - self.actionMaximize.setCheckable(True) - self.actionMaximize.setVisible(False) - self.actionMaximize.setObjectName("actionMaximize") - self.actionTile = QtWidgets.QAction(BaseWindow) - self.actionTile.setObjectName("actionTile") - self.actionTileVertical = QtWidgets.QAction(BaseWindow) - self.actionTileVertical.setObjectName("actionTileVertical") - self.actionTileHorizontal = QtWidgets.QAction(BaseWindow) - self.actionTileHorizontal.setObjectName("actionTileHorizontal") - self.actionMinimize = QtWidgets.QAction(BaseWindow) - self.actionMinimize.setCheckable(True) - self.actionMinimize.setVisible(False) - self.actionMinimize.setObjectName("actionMinimize") - self.actionNew_window = QtWidgets.QAction(BaseWindow) - self.actionNew_window.setObjectName("actionNew_window") - self.actionDelete_window = QtWidgets.QAction(BaseWindow) - self.actionDelete_window.setObjectName("actionDelete_window") - self.actionCascade_windows = QtWidgets.QAction(BaseWindow) - self.actionCascade_windows.setObjectName("actionCascade_windows") - self.actionNext_window = QtWidgets.QAction(BaseWindow) - self.actionNext_window.setObjectName("actionNext_window") - self.actionPrevious = QtWidgets.QAction(BaseWindow) - self.actionPrevious.setObjectName("actionPrevious") - self.t1action = QtWidgets.QAction(BaseWindow) - self.t1action.setObjectName("t1action") - self.t1tau = QtWidgets.QAction(BaseWindow) - self.t1tau.setObjectName("t1tau") - self.action_coup_calc = QtWidgets.QAction(BaseWindow) - self.action_coup_calc.setObjectName("action_coup_calc") - self.action_calc_eps_derivative = QtWidgets.QAction(BaseWindow) - self.action_calc_eps_derivative.setObjectName("action_calc_eps_derivative") - self.actionOpen_FC = QtWidgets.QAction(BaseWindow) - self.actionOpen_FC.setObjectName("actionOpen_FC") - self.action_mean_t1 = QtWidgets.QAction(BaseWindow) - self.action_mean_t1.setObjectName("action_mean_t1") - self.actionFilon = QtWidgets.QAction(BaseWindow) - self.actionFilon.setObjectName("actionFilon") - self.action_new_set = QtWidgets.QAction(BaseWindow) - self.action_new_set.setObjectName("action_new_set") - self.action_magnitude = QtWidgets.QAction(BaseWindow) - self.action_magnitude.setObjectName("action_magnitude") - self.actionCenterMax = QtWidgets.QAction(BaseWindow) - self.actionCenterMax.setObjectName("actionCenterMax") - self.action_depake = QtWidgets.QAction(BaseWindow) - self.action_depake.setObjectName("action_depake") - self.action_edit = QtWidgets.QAction(BaseWindow) - self.action_edit.setObjectName("action_edit") - self.actionPick_position = QtWidgets.QAction(BaseWindow) - self.actionPick_position.setObjectName("actionPick_position") - self.actionIntegrate = QtWidgets.QAction(BaseWindow) - self.actionIntegrate.setObjectName("actionIntegrate") - self.actionDerivation = QtWidgets.QAction(BaseWindow) - self.actionDerivation.setObjectName("actionDerivation") - self.actionIntegration = QtWidgets.QAction(BaseWindow) - self.actionIntegration.setObjectName("actionIntegration") - self.actionMove_between_plots = QtWidgets.QAction(BaseWindow) - self.actionMove_between_plots.setObjectName("actionMove_between_plots") - self.actionBaseline = QtWidgets.QAction(BaseWindow) - self.actionBaseline.setObjectName("actionBaseline") - self.actionCalculateT1 = QtWidgets.QAction(BaseWindow) - self.actionCalculateT1.setObjectName("actionCalculateT1") - self.actionChange_datatypes = QtWidgets.QAction(BaseWindow) - self.actionChange_datatypes.setObjectName("actionChange_datatypes") - self.actionPrint = QtWidgets.QAction(BaseWindow) - self.actionPrint.setObjectName("actionPrint") - self.action_lm_fit = QtWidgets.QAction(BaseWindow) - self.action_lm_fit.setCheckable(True) - self.action_lm_fit.setChecked(True) - self.action_lm_fit.setObjectName("action_lm_fit") - self.action_nm_fit = QtWidgets.QAction(BaseWindow) - self.action_nm_fit.setCheckable(True) - self.action_nm_fit.setObjectName("action_nm_fit") - self.action_odr_fit = QtWidgets.QAction(BaseWindow) - self.action_odr_fit.setCheckable(True) - self.action_odr_fit.setObjectName("action_odr_fit") - self.action_no_range = QtWidgets.QAction(BaseWindow) - self.action_no_range.setCheckable(True) - self.action_no_range.setChecked(False) - self.action_no_range.setObjectName("action_no_range") - self.action_x_range = QtWidgets.QAction(BaseWindow) - self.action_x_range.setCheckable(True) - self.action_x_range.setChecked(True) - self.action_x_range.setObjectName("action_x_range") - self.action_custom_range = QtWidgets.QAction(BaseWindow) - self.action_custom_range.setCheckable(True) - self.action_custom_range.setObjectName("action_custom_range") - self.actionSnake = QtWidgets.QAction(BaseWindow) - self.actionSnake.setObjectName("actionSnake") - self.actionFunction_editor = QtWidgets.QAction(BaseWindow) - self.actionFunction_editor.setObjectName("actionFunction_editor") - self.actionLife = QtWidgets.QAction(BaseWindow) - self.actionLife.setObjectName("actionLife") - self.actionTetris = QtWidgets.QAction(BaseWindow) - self.actionTetris.setObjectName("actionTetris") - self.actionUpdate = QtWidgets.QAction(BaseWindow) - self.actionUpdate.setObjectName("actionUpdate") - self.actionMine = QtWidgets.QAction(BaseWindow) - self.actionMine.setObjectName("actionMine") - self.action_draw_object = QtWidgets.QAction(BaseWindow) - self.action_draw_object.setObjectName("action_draw_object") - self.actionBugs = QtWidgets.QAction(BaseWindow) - self.actionBugs.setObjectName("actionBugs") - self.actionShow_error_log = QtWidgets.QAction(BaseWindow) - self.actionShow_error_log.setObjectName("actionShow_error_log") - self.actionCreate_starter = QtWidgets.QAction(BaseWindow) - self.actionCreate_starter.setObjectName("actionCreate_starter") - self.actionAbout = QtWidgets.QAction(BaseWindow) - self.actionAbout.setObjectName("actionAbout") - self.actionTNMH_model = QtWidgets.QAction(BaseWindow) - self.actionTNMH_model.setObjectName("actionTNMH_model") - self.actionBinning = QtWidgets.QAction(BaseWindow) - self.actionBinning.setObjectName("actionBinning") - self.actionTNMH = QtWidgets.QAction(BaseWindow) - self.actionTNMH.setObjectName("actionTNMH") - self.actionExclude_region = QtWidgets.QAction(BaseWindow) - self.actionExclude_region.setCheckable(True) - self.actionExclude_region.setObjectName("actionExclude_region") - self.action_cut_xaxis = QtWidgets.QAction(BaseWindow) - self.action_cut_xaxis.setObjectName("action_cut_xaxis") - self.action_cut_yaxis = QtWidgets.QAction(BaseWindow) - self.action_cut_yaxis.setObjectName("action_cut_yaxis") - self.actionUse_script = QtWidgets.QAction(BaseWindow) - self.actionUse_script.setObjectName("actionUse_script") - self.menuSave.addAction(self.actionSave) - self.menuSave.addAction(self.actionExportGraphic) - self.menuSave.addAction(self.action_save_fit_parameter) - self.menuFile.addAction(self.action_open) - self.menuFile.addAction(self.actionOpen_FC) - self.menuFile.addAction(self.menuSave.menuAction()) - self.menuFile.addSeparator() - self.menuFile.addAction(self.actionPrint) - self.menuFile.addAction(self.action_reset) - self.menuFile.addSeparator() - self.menuFile.addAction(self.action_close) - self.menuFile.addSeparator() - self.menuCut_to_visible_range.addSeparator() - self.menuCut_to_visible_range.addAction(self.action_cut_xaxis) - self.menuCut_to_visible_range.addAction(self.action_cut_yaxis) - self.menuData.addAction(self.action_new_set) - self.menuData.addAction(self.action_delete_sets) - self.menuData.addAction(self.actionMove_between_plots) - self.menuData.addAction(self.actionConcatenate_sets) - self.menuData.addAction(self.actionAddlines) - self.menuData.addSeparator() - self.menuData.addAction(self.action_sort_pts) - self.menuData.addAction(self.actionSkip_points) - self.menuData.addSeparator() - self.menuData.addAction(self.menuCut_to_visible_range.menuAction()) - self.menuData.addSeparator() - self.menuData.addAction(self.actionChange_datatypes) - self.menuData.addAction(self.actionUse_script) - self.menuHelp.addAction(self.actionShow_error_log) - self.menuHelp.addAction(self.actionUpdate) - self.menuHelp.addAction(self.actionBugs) - self.menuHelp.addAction(self.actionAbout) - self.menuNormalize.addAction(self.action_norm_max) - self.menuNormalize.addAction(self.action_norm_max_abs) - self.menuNormalize.addSeparator() - self.menuNormalize.addAction(self.action_norm_first) - self.menuNormalize.addAction(self.action_norm_last) - self.menuNormalize.addSeparator() - self.menuNormalize.addAction(self.action_norm_area) - self.menuExtra.addAction(self.action_mean_t1) - self.menuExtra.addSeparator() - self.menuExtra.addAction(self.actionFilon) - self.menuExtra.addAction(self.actionDerivation) - self.menuExtra.addAction(self.actionIntegration) - self.menuExtra.addSeparator() - self.menuExtra.addAction(self.menuNormalize.menuAction()) - self.menuExtra.addAction(self.actionInterpolation) - self.menuExtra.addAction(self.actionBinning) - self.menuExtra.addAction(self.actionRunning_values) - self.menuExtra.addAction(self.actionShift) - self.menuExtra.addSeparator() - self.menuExtra.addAction(self.action_calc) - self.menuMethod.addAction(self.action_lm_fit) - self.menuMethod.addAction(self.action_nm_fit) - self.menuMethod.addAction(self.action_odr_fit) - self.menuLimits.addAction(self.action_no_range) - self.menuLimits.addAction(self.action_x_range) - self.menuLimits.addAction(self.action_custom_range) - self.menuLimits.addAction(self.actionExclude_region) - self.menuFit.addAction(self.action_FitWidget) - self.menuFit.addSeparator() - self.menuFit.addAction(self.action_create_fit_function) - self.menuFit.addAction(self.actionFunction_editor) - self.menuFit.addSeparator() - self.menuFit.addAction(self.menuMethod.menuAction()) - self.menuFit.addAction(self.menuLimits.menuAction()) - self.menuOptions.addAction(self.actionMouse_behaviour) - self.menuOptions.addSeparator() - self.menuOptions.addAction(self.action_colorcycle) - self.menuOptions.addAction(self.actionConfiguration) - self.menuOptions.addAction(self.actionCreate_starter) - self.menuView.addAction(self.actionTile) - self.menuView.addAction(self.actionTileVertical) - self.menuView.addAction(self.actionTileHorizontal) - self.menuView.addAction(self.actionCascade_windows) - self.menuWindow.addAction(self.actionNew_window) - self.menuWindow.addAction(self.actionDelete_window) - self.menuWindow.addSeparator() - self.menuWindow.addAction(self.actionNext_window) - self.menuWindow.addAction(self.actionPrevious) - self.menuWindow.addAction(self.actionMaximize) - self.menuWindow.addAction(self.actionMinimize) - self.menuWindow.addAction(self.menuView.menuAction()) - self.menuWindow.addSeparator() - self.menuWindow.addAction(self.actionRefresh) - self.menuWindow.addSeparator() - self.menuWindow.addAction(self.action_draw_object) - self.menuNMR.addAction(self.t1action) - self.menuNMR.addAction(self.actionCalculateT1) - self.menuNMR.addAction(self.action_coup_calc) - self.menuBDS.addAction(self.action_calc_eps_derivative) - self.menuSpectrum.addAction(self.action_magnitude) - self.menuSpectrum.addAction(self.actionCenterMax) - self.menuSpectrum.addAction(self.action_depake) - self.menuSpectrum.addSeparator() - self.menuSpectrum.addAction(self.action_edit) - self.menuSpectrum.addAction(self.actionBaseline) - self.menuSpectrum.addAction(self.actionPick_position) - self.menuStuff.addAction(self.actionSnake) - self.menuStuff.addAction(self.actionLife) - self.menuStuff.addAction(self.actionTetris) - self.menuStuff.addAction(self.actionMine) - self.menuDSC.addAction(self.actionTNMH_model) - self.menubar.addAction(self.menuFile.menuAction()) - self.menubar.addAction(self.menuWindow.menuAction()) - self.menubar.addAction(self.menuData.menuAction()) - self.menubar.addAction(self.menuExtra.menuAction()) - self.menubar.addAction(self.menuSpectrum.menuAction()) - self.menubar.addAction(self.menuFit.menuAction()) - self.menubar.addAction(self.menuNMR.menuAction()) - self.menubar.addAction(self.menuBDS.menuAction()) - self.menubar.addAction(self.menuDSC.menuAction()) - self.menubar.addAction(self.menuOptions.menuAction()) - self.menubar.addAction(self.menuHelp.menuAction()) - self.menubar.addAction(self.menuStuff.menuAction()) - self.toolBar.addAction(self.action_open) - self.toolBar.addAction(self.actionSave) - self.toolBar.addSeparator() - self.toolBar.addAction(self.actionMouse_behaviour) - self.toolBar.addSeparator() - self.toolBar.addAction(self.actionPrevious) - self.toolBar.addAction(self.actionNext_window) - self.toolbar_edit.addAction(self.action_calc) - self.toolbar_edit.addAction(self.action_mean_t1) - self.toolbar_edit.addAction(self.actionShift) - self.toolBar_nmr.addAction(self.t1action) - self.toolBar_nmr.addAction(self.actionCalculateT1) - self.toolBar_spectrum.addAction(self.action_edit) - self.toolBar_spectrum.addAction(self.actionPick_position) - self.toolBar_data.addAction(self.actionConcatenate_sets) - self.toolBar_data.addAction(self.action_sort_pts) - - self.retranslateUi(BaseWindow) - self.tabWidget.setCurrentIndex(0) - self.action_close.triggered.connect(BaseWindow.close) # type: ignore - QtCore.QMetaObject.connectSlotsByName(BaseWindow) - - def retranslateUi(self, BaseWindow): - _translate = QtCore.QCoreApplication.translate - BaseWindow.setWindowTitle(_translate("BaseWindow", "Mr. Godot told me to tell you he won\'t come this evening but surely tomorrow.")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.datawidget), _translate("BaseWindow", "Data")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.valuewidget), _translate("BaseWindow", "Values")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.fit_dialog), _translate("BaseWindow", "Fit")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.editsignalwidget), _translate("BaseWindow", "Signals")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.ptsselectwidget), _translate("BaseWindow", "Pick points")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.t1tauwidget), _translate("BaseWindow", "SLR")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.drawingswidget), _translate("BaseWindow", "Drawings")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.integralwidget), _translate("BaseWindow", "Integrate")) - self.menuFile.setTitle(_translate("BaseWindow", "&File")) - self.menuSave.setTitle(_translate("BaseWindow", "&Save...")) - self.menuData.setTitle(_translate("BaseWindow", "&Data")) - self.menuCut_to_visible_range.setTitle(_translate("BaseWindow", "Cut to visible range")) - self.menuHelp.setTitle(_translate("BaseWindow", "&Help")) - self.menuExtra.setTitle(_translate("BaseWindow", "Math")) - self.menuNormalize.setTitle(_translate("BaseWindow", "&Normalize")) - self.menuFit.setTitle(_translate("BaseWindow", "F&it")) - self.menuMethod.setTitle(_translate("BaseWindow", "Method")) - self.menuLimits.setTitle(_translate("BaseWindow", "Limits")) - self.menuOptions.setTitle(_translate("BaseWindow", "Options")) - self.menuWindow.setTitle(_translate("BaseWindow", "Plots")) - self.menuView.setTitle(_translate("BaseWindow", "View")) - self.menuNMR.setTitle(_translate("BaseWindow", "NMR")) - self.menuBDS.setTitle(_translate("BaseWindow", "BDS")) - self.menuSpectrum.setTitle(_translate("BaseWindow", "Spectrum")) - self.menuDSC.setTitle(_translate("BaseWindow", "DSC")) - self.toolBar.setWindowTitle(_translate("BaseWindow", "Main")) - self.toolbar_edit.setWindowTitle(_translate("BaseWindow", "Math")) - self.toolBar_nmr.setWindowTitle(_translate("BaseWindow", "NMR")) - self.toolBar_spectrum.setWindowTitle(_translate("BaseWindow", "Spectrum")) - self.toolBar_data.setWindowTitle(_translate("BaseWindow", "Data")) - self.action_close.setText(_translate("BaseWindow", "&Quit")) - self.action_close.setShortcut(_translate("BaseWindow", "Ctrl+Q")) - self.actionExportGraphic.setText(_translate("BaseWindow", "Export graphic...")) - self.actionExportGraphic.setShortcut(_translate("BaseWindow", "Ctrl+Shift+S")) - self.action_open.setText(_translate("BaseWindow", "&Open...")) - self.action_open.setShortcut(_translate("BaseWindow", "Ctrl+O")) - self.actionExportData.setText(_translate("BaseWindow", "Export data...")) - self.actionExportData.setShortcut(_translate("BaseWindow", "Ctrl+Shift+S")) - self.action_calc.setText(_translate("BaseWindow", "&Evaluate expression...")) - self.action_delete_sets.setText(_translate("BaseWindow", "&Delete Set")) - self.action_delete_sets.setShortcut(_translate("BaseWindow", "Ctrl+Del")) - self.action_save_fit_parameter.setText(_translate("BaseWindow", "Save fit ¶meter...")) - self.action_sort_pts.setText(_translate("BaseWindow", "Sort &points")) - self.action_reset.setText(_translate("BaseWindow", "&Reset")) - self.action_reset.setShortcut(_translate("BaseWindow", "Ctrl+R")) - self.actionDocumentation.setText(_translate("BaseWindow", "&Documentation")) - self.actionDocumentation.setShortcut(_translate("BaseWindow", "F1")) - self.action_FitWidget.setText(_translate("BaseWindow", "Open &Fit")) - self.action_FitWidget.setShortcut(_translate("BaseWindow", "Ctrl+F")) - self.action_norm_max.setText(_translate("BaseWindow", "&Max")) - self.action_norm_first.setText(_translate("BaseWindow", "&First point")) - self.action_norm_area.setText(_translate("BaseWindow", "&Area")) - self.action_norm_max_abs.setText(_translate("BaseWindow", "Ma&x(Abs)")) - self.action_norm_last.setText(_translate("BaseWindow", "&Last point")) - self.actionSave.setText(_translate("BaseWindow", "S&ave...")) - self.actionSave.setShortcut(_translate("BaseWindow", "Ctrl+S")) - self.actiontoolbar_display.setText(_translate("BaseWindow", "&Views")) - self.actionEdit_toolbars.setText(_translate("BaseWindow", "&Edit")) - self.actionAddlines.setText(_translate("BaseWindow", "Set by function...")) - self.actionColors.setText(_translate("BaseWindow", "&Reset color")) - self.actionConcatenate_sets.setText(_translate("BaseWindow", "Join sets")) - self.actionShift.setText(_translate("BaseWindow", "&Shift/scale...")) - self.actionShow_log.setText(_translate("BaseWindow", "&Show log...")) - self.action_create_fit_function.setText(_translate("BaseWindow", "&Create fit function...")) - self.action_colorcycle.setText(_translate("BaseWindow", "Color cycles...")) - self.actionSave_session.setText(_translate("BaseWindow", "Update session")) - self.actionMouse_behaviour.setText(_translate("BaseWindow", "Mouse behaviour")) - self.actionMouse_behaviour.setToolTip(_translate("BaseWindow", "Switch between zoom and pan in graph.")) - self.actionConfiguration.setText(_translate("BaseWindow", "Configuration...")) - self.actionRefresh.setText(_translate("BaseWindow", "Refresh")) - self.actionRefresh.setShortcut(_translate("BaseWindow", "F5")) - self.actionInterpolation.setText(_translate("BaseWindow", "Interpolation...")) - self.actionRunning_values.setText(_translate("BaseWindow", "Smoothing...")) - self.actionFit_parameter_saving.setText(_translate("BaseWindow", "Fit parameter saving...")) - self.actionShow_fit_parameter.setText(_translate("BaseWindow", "Parameter...")) - self.actionSkip_points.setText(_translate("BaseWindow", "Skip points...")) - self.actionGuide_lines.setText(_translate("BaseWindow", "Draw lines...")) - self.actionMaximize.setText(_translate("BaseWindow", "Maximize")) - self.actionTile.setText(_translate("BaseWindow", "Tile windows")) - self.actionTileVertical.setText(_translate("BaseWindow", "Tile windows vertically")) - self.actionTileHorizontal.setText(_translate("BaseWindow", "Tile windows horizontally")) - self.actionMinimize.setText(_translate("BaseWindow", "Minimize")) - self.actionNew_window.setText(_translate("BaseWindow", "New graph")) - self.actionDelete_window.setText(_translate("BaseWindow", "Delete graph")) - self.actionCascade_windows.setText(_translate("BaseWindow", "Cascade windows")) - self.actionNext_window.setText(_translate("BaseWindow", "Next")) - self.actionNext_window.setShortcut(_translate("BaseWindow", "Alt+Right")) - self.actionPrevious.setText(_translate("BaseWindow", "Previous")) - self.actionPrevious.setShortcut(_translate("BaseWindow", "Alt+Left")) - self.t1action.setText(_translate("BaseWindow", "Evaluate T1 minimum...")) - self.t1tau.setText(_translate("BaseWindow", "Calculate T1...")) - self.action_coup_calc.setText(_translate("BaseWindow", "Coupling values...")) - self.action_calc_eps_derivative.setText(_translate("BaseWindow", "Calculate derivative loss")) - self.actionOpen_FC.setText(_translate("BaseWindow", "Read FC data...")) - self.action_mean_t1.setText(_translate("BaseWindow", "Convert mean values...")) - self.actionFilon.setText(_translate("BaseWindow", "Log FT...")) - self.action_new_set.setText(_translate("BaseWindow", "New set")) - self.action_magnitude.setText(_translate("BaseWindow", "Calculate magnitude")) - self.actionCenterMax.setText(_translate("BaseWindow", "Center on max")) - self.action_depake.setText(_translate("BaseWindow", "De-paked spectrum")) - self.action_edit.setText(_translate("BaseWindow", "Edit signals...")) - self.actionPick_position.setText(_translate("BaseWindow", "Pick points...")) - self.actionIntegrate.setText(_translate("BaseWindow", "Integrate")) - self.actionDerivation.setText(_translate("BaseWindow", "Differentiation...")) - self.actionIntegration.setText(_translate("BaseWindow", "Integration...")) - self.actionMove_between_plots.setText(_translate("BaseWindow", "Move sets...")) - self.actionBaseline.setText(_translate("BaseWindow", "Baseline...")) - self.actionCalculateT1.setText(_translate("BaseWindow", "Calculate relaxation...")) - self.actionChange_datatypes.setText(_translate("BaseWindow", "Change datatypes...")) - self.actionPrint.setText(_translate("BaseWindow", "Print...")) - self.actionPrint.setShortcut(_translate("BaseWindow", "Ctrl+P")) - self.action_lm_fit.setText(_translate("BaseWindow", "Default stuff")) - self.action_nm_fit.setText(_translate("BaseWindow", "Nelder-Mead")) - self.action_odr_fit.setText(_translate("BaseWindow", "ODR")) - self.action_no_range.setText(_translate("BaseWindow", "None")) - self.action_x_range.setText(_translate("BaseWindow", "Visible x range")) - self.action_custom_range.setText(_translate("BaseWindow", "Custom")) - self.actionSnake.setText(_translate("BaseWindow", "Worm")) - self.actionFunction_editor.setText(_translate("BaseWindow", "Function editor...")) - self.actionLife.setText(_translate("BaseWindow", "Life...")) - self.actionTetris.setText(_translate("BaseWindow", "Not Tetris")) - self.actionUpdate.setText(_translate("BaseWindow", "Look for updates")) - self.actionMine.setText(_translate("BaseWindow", "Mine")) - self.action_draw_object.setText(_translate("BaseWindow", "Draw objects...")) - self.actionBugs.setText(_translate("BaseWindow", "Bugs! Problems! Wishes!")) - self.actionShow_error_log.setText(_translate("BaseWindow", "Show error log")) - self.actionCreate_starter.setText(_translate("BaseWindow", "Create starter..")) - self.actionAbout.setText(_translate("BaseWindow", "About...")) - self.actionTNMH_model.setText(_translate("BaseWindow", "Tg , Hodge, TNMH,,,")) - self.actionBinning.setText(_translate("BaseWindow", "Binning...")) - self.actionTNMH.setText(_translate("BaseWindow", "TNMH...")) - self.actionExclude_region.setText(_translate("BaseWindow", "Exclude region")) - self.action_cut_xaxis.setText(_translate("BaseWindow", "x axis")) - self.action_cut_xaxis.setToolTip(_translate("BaseWindow", "Remove data points outside visible x range.")) - self.action_cut_yaxis.setText(_translate("BaseWindow", "y axis")) - self.action_cut_yaxis.setToolTip(_translate("BaseWindow", "Remove data points outside visible y range. Uses real part of points.")) - self.actionUse_script.setText(_translate("BaseWindow", "Use script...")) -from ..data.datawidget.datawidget import DataWidget -from ..data.integral_widget import IntegralWidget -from ..data.point_select import PointSelectWidget -from ..data.signaledit.editsignalwidget import EditSignalWidget -from ..data.valueeditwidget import ValueEditWidget -from ..fit.fitwindow import QFitDialog -from ..graphs.drawings import DrawingsWidget -from ..lib.mdiarea import MdiAreaTile -from ..nmr.t1widget import QT1Widget diff --git a/src/gui_qt/_py/bdsdialog.py b/src/gui_qt/_py/bdsdialog.py deleted file mode 100644 index 795bff1..0000000 --- a/src/gui_qt/_py/bdsdialog.py +++ /dev/null @@ -1,124 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/bdsdialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(544, 443) - self.gridLayout = QtWidgets.QGridLayout(Dialog) - self.gridLayout.setContentsMargins(3, 3, 3, 3) - self.gridLayout.setSpacing(3) - self.gridLayout.setObjectName("gridLayout") - self.listWidget = QListWidgetSelect(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) - self.listWidget.setObjectName("listWidget") - self.gridLayout.addWidget(self.listWidget, 1, 0, 2, 1) - self.groupBox_2 = QtWidgets.QGroupBox(Dialog) - 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.setSpacing(3) - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.freq_button = QtWidgets.QRadioButton(self.groupBox_2) - self.freq_button.setChecked(True) - self.freq_button.setObjectName("freq_button") - self.buttonGroup = QtWidgets.QButtonGroup(Dialog) - self.buttonGroup.setObjectName("buttonGroup") - self.buttonGroup.addButton(self.freq_button) - self.verticalLayout_3.addWidget(self.freq_button) - self.temp_button = QtWidgets.QRadioButton(self.groupBox_2) - self.temp_button.setObjectName("temp_button") - self.buttonGroup.addButton(self.temp_button) - self.verticalLayout_3.addWidget(self.temp_button) - self.gridLayout.addWidget(self.groupBox_2, 1, 1, 1, 1) - self.groupBox = QtWidgets.QGroupBox(Dialog) - self.groupBox.setObjectName("groupBox") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox) - self.verticalLayout_2.setContentsMargins(3, 3, 3, 3) - self.verticalLayout_2.setSpacing(3) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.eps_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.eps_checkBox.setChecked(True) - self.eps_checkBox.setObjectName("eps_checkBox") - self.verticalLayout_2.addWidget(self.eps_checkBox) - self.modul_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.modul_checkBox.setObjectName("modul_checkBox") - self.verticalLayout_2.addWidget(self.modul_checkBox) - self.cond_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.cond_checkBox.setObjectName("cond_checkBox") - self.verticalLayout_2.addWidget(self.cond_checkBox) - self.loss_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.loss_checkBox.setObjectName("loss_checkBox") - self.verticalLayout_2.addWidget(self.loss_checkBox) - self.line = QtWidgets.QFrame(self.groupBox) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.verticalLayout_2.addWidget(self.line) - self.cap_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.cap_checkBox.setObjectName("cap_checkBox") - self.verticalLayout_2.addWidget(self.cap_checkBox) - self.temp_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.temp_checkBox.setObjectName("temp_checkBox") - self.verticalLayout_2.addWidget(self.temp_checkBox) - self.time_checkBox = QtWidgets.QCheckBox(self.groupBox) - self.time_checkBox.setObjectName("time_checkBox") - self.verticalLayout_2.addWidget(self.time_checkBox) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_2.addItem(spacerItem) - self.gridLayout.addWidget(self.groupBox, 2, 1, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 2) - self.label = QtWidgets.QLabel(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - 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, 0, 0, 1, 2) - - self.retranslateUi(Dialog) - self.buttonBox.accepted.connect(Dialog.accept) # type: ignore - self.buttonBox.rejected.connect(Dialog.reject) # type: ignore - QtCore.QMetaObject.connectSlotsByName(Dialog) - Dialog.setTabOrder(self.freq_button, self.temp_button) - Dialog.setTabOrder(self.temp_button, self.eps_checkBox) - Dialog.setTabOrder(self.eps_checkBox, self.modul_checkBox) - Dialog.setTabOrder(self.modul_checkBox, self.cond_checkBox) - Dialog.setTabOrder(self.cond_checkBox, self.listWidget) - - def retranslateUi(self, Dialog): - _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Read BDS data")) - self.groupBox_2.setTitle(_translate("Dialog", "X Axis")) - self.freq_button.setText(_translate("Dialog", "Frequency")) - self.temp_button.setText(_translate("Dialog", "Temperature")) - self.groupBox.setTitle(_translate("Dialog", "Y Axis")) - self.eps_checkBox.setText(_translate("Dialog", "Permittivity ε")) - self.modul_checkBox.setText(_translate("Dialog", "Modulus 1/ε")) - self.cond_checkBox.setText(_translate("Dialog", "Conductivity iεω")) - self.loss_checkBox.setText(_translate("Dialog", "Loss factor tan(δ)")) - self.cap_checkBox.setText(_translate("Dialog", "Capacity")) - self.temp_checkBox.setText(_translate("Dialog", "Meas. temperature")) - self.time_checkBox.setText(_translate("Dialog", "Meas. time")) - self.label.setText(_translate("Dialog", "Found entries")) -from ..lib.listwidget import QListWidgetSelect diff --git a/src/gui_qt/_py/color_palette.py b/src/gui_qt/_py/color_palette.py deleted file mode 100644 index 7aa29e6..0000000 --- a/src/gui_qt/_py/color_palette.py +++ /dev/null @@ -1,104 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/color_palette.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(390, 409) - self.gridLayout = QtWidgets.QGridLayout(Dialog) - self.gridLayout.setContentsMargins(3, 3, 3, 3) - self.gridLayout.setSpacing(3) - self.gridLayout.setObjectName("gridLayout") - self.palette_combobox = QtWidgets.QComboBox(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.palette_combobox.sizePolicy().hasHeightForWidth()) - self.palette_combobox.setSizePolicy(sizePolicy) - self.palette_combobox.setObjectName("palette_combobox") - self.gridLayout.addWidget(self.palette_combobox, 0, 1, 1, 2) - self.add_color_button = QtWidgets.QPushButton(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.add_color_button.sizePolicy().hasHeightForWidth()) - self.add_color_button.setSizePolicy(sizePolicy) - self.add_color_button.setObjectName("add_color_button") - self.gridLayout.addWidget(self.add_color_button, 3, 2, 1, 1) - self.colorlist = QtWidgets.QListWidget(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.colorlist.sizePolicy().hasHeightForWidth()) - self.colorlist.setSizePolicy(sizePolicy) - self.colorlist.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove) - self.colorlist.setObjectName("colorlist") - self.gridLayout.addWidget(self.colorlist, 4, 1, 1, 2) - self.add_palette_button = QtWidgets.QPushButton(Dialog) - self.add_palette_button.setObjectName("add_palette_button") - self.gridLayout.addWidget(self.add_palette_button, 1, 1, 1, 1) - self.new_name_edit = QtWidgets.QLineEdit(Dialog) - self.new_name_edit.setObjectName("new_name_edit") - self.gridLayout.addWidget(self.new_name_edit, 6, 1, 1, 2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 7, 0, 1, 3) - self.color_combobox = ColorListEditor(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.color_combobox.sizePolicy().hasHeightForWidth()) - self.color_combobox.setSizePolicy(sizePolicy) - self.color_combobox.setObjectName("color_combobox") - self.gridLayout.addWidget(self.color_combobox, 3, 1, 1, 1) - self.line = QtWidgets.QFrame(Dialog) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 2, 0, 1, 3) - self.save_button = QtWidgets.QPushButton(Dialog) - self.save_button.setObjectName("save_button") - self.gridLayout.addWidget(self.save_button, 6, 0, 1, 1) - self.label = QtWidgets.QLabel(Dialog) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 0, 0, 1, 1) - self.append_palette_button = QtWidgets.QPushButton(Dialog) - self.append_palette_button.setObjectName("append_palette_button") - self.gridLayout.addWidget(self.append_palette_button, 1, 2, 1, 1) - self.label_2 = QtWidgets.QLabel(Dialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1) - self.line_2 = QtWidgets.QFrame(Dialog) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout.addWidget(self.line_2, 5, 0, 1, 3) - self.label.setBuddy(self.palette_combobox) - self.label_2.setBuddy(self.color_combobox) - - self.retranslateUi(Dialog) - self.buttonBox.accepted.connect(Dialog.accept) - self.buttonBox.rejected.connect(Dialog.reject) - QtCore.QMetaObject.connectSlotsByName(Dialog) - - def retranslateUi(self, Dialog): - _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Color cycles")) - self.add_color_button.setText(_translate("Dialog", "Add color")) - self.add_palette_button.setText(_translate("Dialog", "Load")) - self.save_button.setText(_translate("Dialog", "Save as new list")) - self.label.setText(_translate("Dialog", "Color cycles")) - self.append_palette_button.setText(_translate("Dialog", "Append")) - self.label_2.setText(_translate("Dialog", "Available color")) -from ..lib.delegates import ColorListEditor diff --git a/src/gui_qt/_py/coupling_calculator.py b/src/gui_qt/_py/coupling_calculator.py deleted file mode 100644 index 72ac914..0000000 --- a/src/gui_qt/_py/coupling_calculator.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/coupling_calculator.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_coupling_calc_dialog(object): - def setupUi(self, coupling_calc_dialog): - coupling_calc_dialog.setObjectName("coupling_calc_dialog") - coupling_calc_dialog.resize(400, 280) - self.verticalLayout = QtWidgets.QVBoxLayout(coupling_calc_dialog) - self.verticalLayout.setObjectName("verticalLayout") - self.comboBox = QtWidgets.QComboBox(coupling_calc_dialog) - self.comboBox.setObjectName("comboBox") - self.verticalLayout.addWidget(self.comboBox) - self.label_2 = QtWidgets.QLabel(coupling_calc_dialog) - self.label_2.setObjectName("label_2") - self.verticalLayout.addWidget(self.label_2) - self.verticalFrame = QtWidgets.QFrame(coupling_calc_dialog) - self.verticalFrame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.verticalFrame.setObjectName("verticalFrame") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.verticalFrame) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.verticalLayout.addWidget(self.verticalFrame) - self.label = QtWidgets.QLabel(coupling_calc_dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) - self.label.setSizePolicy(sizePolicy) - self.label.setStyleSheet("font-weight: bold") - self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout.addItem(spacerItem) - self.buttonBox = QtWidgets.QDialogButtonBox(coupling_calc_dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout.addWidget(self.buttonBox) - - self.retranslateUi(coupling_calc_dialog) - self.buttonBox.accepted.connect(coupling_calc_dialog.accept) - self.buttonBox.rejected.connect(coupling_calc_dialog.reject) - QtCore.QMetaObject.connectSlotsByName(coupling_calc_dialog) - - def retranslateUi(self, coupling_calc_dialog): - _translate = QtCore.QCoreApplication.translate - coupling_calc_dialog.setWindowTitle(_translate("coupling_calc_dialog", "Calculate BPP coupling constants")) - self.label_2.setText(_translate("coupling_calc_dialog", "TextLabel")) - self.label.setText(_translate("coupling_calc_dialog", "TextLabel")) diff --git a/src/gui_qt/_py/coupling_t1_from_tau.py b/src/gui_qt/_py/coupling_t1_from_tau.py deleted file mode 100644 index 4a18eea..0000000 --- a/src/gui_qt/_py/coupling_t1_from_tau.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/coupling_t1_from_tau.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_couplingForm(object): - def setupUi(self, couplingForm): - couplingForm.setObjectName("couplingForm") - couplingForm.resize(400, 300) - self.horizontalLayout = QtWidgets.QHBoxLayout(couplingForm) - self.horizontalLayout.setObjectName("horizontalLayout") - self.label = QtWidgets.QLabel(couplingForm) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.lineEdit = LineEdit(couplingForm) - self.lineEdit.setObjectName("lineEdit") - self.horizontalLayout.addWidget(self.lineEdit) - self.radioButton_2 = QtWidgets.QRadioButton(couplingForm) - self.radioButton_2.setChecked(True) - self.radioButton_2.setObjectName("radioButton_2") - self.buttonGroup = QtWidgets.QButtonGroup(couplingForm) - self.buttonGroup.setObjectName("buttonGroup") - self.buttonGroup.addButton(self.radioButton_2) - self.horizontalLayout.addWidget(self.radioButton_2) - self.radioButton = QtWidgets.QRadioButton(couplingForm) - self.radioButton.setObjectName("radioButton") - self.buttonGroup.addButton(self.radioButton) - self.horizontalLayout.addWidget(self.radioButton) - - self.retranslateUi(couplingForm) - QtCore.QMetaObject.connectSlotsByName(couplingForm) - - def retranslateUi(self, couplingForm): - _translate = QtCore.QCoreApplication.translate - couplingForm.setWindowTitle(_translate("couplingForm", "Form")) - self.label.setText(_translate("couplingForm", "parameter_name")) - self.radioButton_2.setText(_translate("couplingForm", "Value")) - self.radioButton.setText(_translate("couplingForm", "Index")) -from nmrevalgui.lib.forms import LineEdit diff --git a/src/gui_qt/_py/datawidget.py b/src/gui_qt/_py/datawidget.py deleted file mode 100644 index 2f742b6..0000000 --- a/src/gui_qt/_py/datawidget.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file './nmreval/src/resources/_ui/datawidget.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_DataWidget(object): - def setupUi(self, DataWidget): - DataWidget.setObjectName("DataWidget") - DataWidget.resize(307, 847) - self.verticalLayout_2 = QtWidgets.QVBoxLayout(DataWidget) - self.verticalLayout_2.setContentsMargins(3, 3, 3, 3) - self.verticalLayout_2.setSpacing(3) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") - self.verticalLayout_2.addLayout(self.verticalLayout) - self.propwidget = ExpandableWidget(DataWidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.propwidget.sizePolicy().hasHeightForWidth()) - self.propwidget.setSizePolicy(sizePolicy) - self.propwidget.setObjectName("propwidget") - self.verticalLayout_2.addWidget(self.propwidget) - self.frame = QtWidgets.QFrame(DataWidget) - self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame.setFrameShadow(QtWidgets.QFrame.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.graph_toolButton = QtWidgets.QToolButton(self.frame) - self.graph_toolButton.setObjectName("graph_toolButton") - self.horizontalLayout.addWidget(self.graph_toolButton) - self.empty_toolButton = QtWidgets.QToolButton(self.frame) - self.empty_toolButton.setObjectName("empty_toolButton") - self.horizontalLayout.addWidget(self.empty_toolButton) - self.func_toolButton = QtWidgets.QToolButton(self.frame) - self.func_toolButton.setText("") - self.func_toolButton.setObjectName("func_toolButton") - self.horizontalLayout.addWidget(self.func_toolButton) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.pokemon_toolbutton = QtWidgets.QToolButton(self.frame) - self.pokemon_toolbutton.setText("") - self.pokemon_toolbutton.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly) - self.pokemon_toolbutton.setAutoRaise(True) - self.pokemon_toolbutton.setObjectName("pokemon_toolbutton") - self.horizontalLayout.addWidget(self.pokemon_toolbutton) - self.verticalLayout_2.addWidget(self.frame) - - self.retranslateUi(DataWidget) - QtCore.QMetaObject.connectSlotsByName(DataWidget) - - def retranslateUi(self, DataWidget): - _translate = QtCore.QCoreApplication.translate - DataWidget.setWindowTitle(_translate("DataWidget", "Data")) - self.graph_toolButton.setToolTip(_translate("DataWidget", "New graph")) - self.graph_toolButton.setText(_translate("DataWidget", "New graph")) - self.empty_toolButton.setToolTip(_translate("DataWidget", "New set")) - self.empty_toolButton.setText(_translate("DataWidget", "Empty set")) -from ..lib.expandablewidget import ExpandableWidget diff --git a/src/gui_qt/_py/dscfile_dialog.py b/src/gui_qt/_py/dscfile_dialog.py deleted file mode 100644 index 1e84afc..0000000 --- a/src/gui_qt/_py/dscfile_dialog.py +++ /dev/null @@ -1,231 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/dscfile_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(1341, 799) - self.verticalLayout_5 = QtWidgets.QVBoxLayout(Dialog) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.splitter = QtWidgets.QSplitter(Dialog) - self.splitter.setOrientation(QtCore.Qt.Horizontal) - self.splitter.setObjectName("splitter") - self.verticalLayoutWidget = QtWidgets.QWidget(self.splitter) - self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") - self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) - self.verticalLayout_4.setContentsMargins(6, 6, 6, 6) - self.verticalLayout_4.setObjectName("verticalLayout_4") - self.groupBox = QtWidgets.QGroupBox(self.verticalLayoutWidget) - self.groupBox.setFlat(False) - self.groupBox.setObjectName("groupBox") - self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox) - self.verticalLayout.setContentsMargins(6, 6, 6, 6) - self.verticalLayout.setObjectName("verticalLayout") - self.step_listWidget = QtWidgets.QListWidget(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.step_listWidget.sizePolicy().hasHeightForWidth()) - self.step_listWidget.setSizePolicy(sizePolicy) - self.step_listWidget.setMinimumSize(QtCore.QSize(0, 0)) - self.step_listWidget.setObjectName("step_listWidget") - self.verticalLayout.addWidget(self.step_listWidget) - self.verticalLayout_4.addWidget(self.groupBox) - self.groupBox_2 = QtWidgets.QGroupBox(self.verticalLayoutWidget) - self.groupBox_2.setObjectName("groupBox_2") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2) - self.verticalLayout_2.setContentsMargins(6, 6, 6, 6) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.groupBox_4 = QtWidgets.QGroupBox(self.groupBox_2) - self.groupBox_4.setObjectName("groupBox_4") - self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.groupBox_4) - self.verticalLayout_6.setContentsMargins(6, 6, 6, 6) - self.verticalLayout_6.setObjectName("verticalLayout_6") - self.empty_label = QtWidgets.QLabel(self.groupBox_4) - self.empty_label.setObjectName("empty_label") - self.verticalLayout_6.addWidget(self.empty_label) - self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setSpacing(3) - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.loadempty_button = QtWidgets.QPushButton(self.groupBox_4) - self.loadempty_button.setObjectName("loadempty_button") - self.horizontalLayout_2.addWidget(self.loadempty_button) - self.delempty_button = QtWidgets.QPushButton(self.groupBox_4) - self.delempty_button.setObjectName("delempty_button") - self.horizontalLayout_2.addWidget(self.delempty_button) - self.verticalLayout_6.addLayout(self.horizontalLayout_2) - self.verticalLayout_2.addWidget(self.groupBox_4) - self.groupBox_5 = QtWidgets.QGroupBox(self.groupBox_2) - self.groupBox_5.setObjectName("groupBox_5") - self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.groupBox_5) - self.verticalLayout_7.setContentsMargins(6, 6, 6, 6) - self.verticalLayout_7.setSpacing(3) - self.verticalLayout_7.setObjectName("verticalLayout_7") - self.none_radioButton = QtWidgets.QRadioButton(self.groupBox_5) - self.none_radioButton.setObjectName("none_radioButton") - self.buttonGroup = QtWidgets.QButtonGroup(Dialog) - self.buttonGroup.setObjectName("buttonGroup") - self.buttonGroup.addButton(self.none_radioButton) - self.verticalLayout_7.addWidget(self.none_radioButton) - self.isotherm_radioButton = QtWidgets.QRadioButton(self.groupBox_5) - self.isotherm_radioButton.setChecked(True) - self.isotherm_radioButton.setObjectName("isotherm_radioButton") - self.buttonGroup.addButton(self.isotherm_radioButton) - self.verticalLayout_7.addWidget(self.isotherm_radioButton) - self.slope_radioButton = QtWidgets.QRadioButton(self.groupBox_5) - self.slope_radioButton.setObjectName("slope_radioButton") - self.buttonGroup.addButton(self.slope_radioButton) - self.verticalLayout_7.addWidget(self.slope_radioButton) - self.widget = QtWidgets.QWidget(self.groupBox_5) - self.widget.setMinimumSize(QtCore.QSize(0, 33)) - self.widget.setObjectName("widget") - self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.widget) - self.horizontalLayout_3.setContentsMargins(3, 3, 3, 3) - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.limit1_lineedit = QtWidgets.QLineEdit(self.widget) - self.limit1_lineedit.setObjectName("limit1_lineedit") - self.horizontalLayout_3.addWidget(self.limit1_lineedit) - self.limit2_lineedit = QtWidgets.QLineEdit(self.widget) - self.limit2_lineedit.setText("") - self.limit2_lineedit.setObjectName("limit2_lineedit") - self.horizontalLayout_3.addWidget(self.limit2_lineedit) - self.verticalLayout_7.addWidget(self.widget) - self.verticalLayout_2.addWidget(self.groupBox_5) - self.verticalLayout_4.addWidget(self.groupBox_2) - self.groupBox_3 = QtWidgets.QGroupBox(self.verticalLayoutWidget) - self.groupBox_3.setObjectName("groupBox_3") - self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_3) - self.verticalLayout_3.setContentsMargins(6, 6, 6, 6) - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.cp_checkBox = QtWidgets.QCheckBox(self.groupBox_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.cp_checkBox.sizePolicy().hasHeightForWidth()) - self.cp_checkBox.setSizePolicy(sizePolicy) - self.cp_checkBox.setChecked(True) - self.cp_checkBox.setObjectName("cp_checkBox") - self.verticalLayout_3.addWidget(self.cp_checkBox) - self.reference_tableWidget = QtWidgets.QTableWidget(self.groupBox_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.reference_tableWidget.sizePolicy().hasHeightForWidth()) - self.reference_tableWidget.setSizePolicy(sizePolicy) - self.reference_tableWidget.setMinimumSize(QtCore.QSize(0, 0)) - self.reference_tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) - self.reference_tableWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) - self.reference_tableWidget.setColumnCount(2) - self.reference_tableWidget.setObjectName("reference_tableWidget") - self.reference_tableWidget.setRowCount(0) - self.reference_tableWidget.horizontalHeader().setVisible(False) - self.reference_tableWidget.horizontalHeader().setStretchLastSection(True) - self.reference_tableWidget.verticalHeader().setVisible(False) - self.verticalLayout_3.addWidget(self.reference_tableWidget) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setSpacing(3) - self.horizontalLayout.setObjectName("horizontalLayout") - self.ref_add_pushButton = QtWidgets.QPushButton(self.groupBox_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.ref_add_pushButton.sizePolicy().hasHeightForWidth()) - self.ref_add_pushButton.setSizePolicy(sizePolicy) - self.ref_add_pushButton.setObjectName("ref_add_pushButton") - self.horizontalLayout.addWidget(self.ref_add_pushButton) - self.ref_remove_pushButton = QtWidgets.QPushButton(self.groupBox_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.ref_remove_pushButton.sizePolicy().hasHeightForWidth()) - self.ref_remove_pushButton.setSizePolicy(sizePolicy) - self.ref_remove_pushButton.setObjectName("ref_remove_pushButton") - self.horizontalLayout.addWidget(self.ref_remove_pushButton) - self.verticalLayout_3.addLayout(self.horizontalLayout) - self.verticalLayout_4.addWidget(self.groupBox_3) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_4.addItem(spacerItem) - self.buttonBox = QtWidgets.QDialogButtonBox(self.verticalLayoutWidget) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Save) - self.buttonBox.setCenterButtons(True) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout_4.addWidget(self.buttonBox) - self.layoutWidget = QtWidgets.QWidget(self.splitter) - self.layoutWidget.setObjectName("layoutWidget") - self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget) - self.gridLayout.setContentsMargins(0, 0, 0, 0) - self.gridLayout.setObjectName("gridLayout") - self.raw_graph = NMRPlotWidget(self.layoutWidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.raw_graph.sizePolicy().hasHeightForWidth()) - self.raw_graph.setSizePolicy(sizePolicy) - self.raw_graph.setMinimumSize(QtCore.QSize(300, 200)) - self.raw_graph.setObjectName("raw_graph") - self.gridLayout.addWidget(self.raw_graph, 0, 0, 1, 1) - self.calib_graph = NMRPlotWidget(self.layoutWidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.calib_graph.sizePolicy().hasHeightForWidth()) - self.calib_graph.setSizePolicy(sizePolicy) - self.calib_graph.setMinimumSize(QtCore.QSize(300, 200)) - self.calib_graph.setObjectName("calib_graph") - self.gridLayout.addWidget(self.calib_graph, 1, 0, 1, 1) - self.baseline_graph = NMRPlotWidget(self.layoutWidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.baseline_graph.sizePolicy().hasHeightForWidth()) - self.baseline_graph.setSizePolicy(sizePolicy) - self.baseline_graph.setMinimumSize(QtCore.QSize(300, 200)) - self.baseline_graph.setObjectName("baseline_graph") - self.gridLayout.addWidget(self.baseline_graph, 0, 1, 1, 1) - self.end_graph = NMRPlotWidget(self.layoutWidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.end_graph.sizePolicy().hasHeightForWidth()) - self.end_graph.setSizePolicy(sizePolicy) - self.end_graph.setMinimumSize(QtCore.QSize(0, 0)) - self.end_graph.setObjectName("end_graph") - self.gridLayout.addWidget(self.end_graph, 1, 1, 1, 1) - self.verticalLayout_5.addWidget(self.splitter) - - 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", "Read DSC file")) - self.groupBox.setTitle(_translate("Dialog", "Detected steps")) - self.groupBox_2.setTitle(_translate("Dialog", "Baseline corrections")) - self.groupBox_4.setTitle(_translate("Dialog", "Empty measurement")) - self.empty_label.setText(_translate("Dialog", "No emtpy measurement")) - self.loadempty_button.setText(_translate("Dialog", "Load empty")) - self.delempty_button.setText(_translate("Dialog", "Remove empty")) - self.groupBox_5.setTitle(_translate("Dialog", "Slope correction")) - self.none_radioButton.setText(_translate("Dialog", "None")) - self.isotherm_radioButton.setText(_translate("Dialog", "Isotherms")) - self.slope_radioButton.setText(_translate("Dialog", "Curve slope")) - self.limit1_lineedit.setPlaceholderText(_translate("Dialog", "start (in min)")) - self.limit2_lineedit.setPlaceholderText(_translate("Dialog", "stop (in min)")) - self.groupBox_3.setTitle(_translate("Dialog", "References")) - self.cp_checkBox.setText(_translate("Dialog", "Use reference to convert to heat capacity")) - self.ref_add_pushButton.setText(_translate("Dialog", "Add reference")) - self.ref_remove_pushButton.setText(_translate("Dialog", "Remove reference")) -from ..lib.graph_items import NMRPlotWidget diff --git a/src/gui_qt/_py/editsignalwidget.py b/src/gui_qt/_py/editsignalwidget.py deleted file mode 100644 index 227e705..0000000 --- a/src/gui_qt/_py/editsignalwidget.py +++ /dev/null @@ -1,204 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/editsignalwidget.ui' -# -# Created by: PyQt5 UI code generator 5.15.2 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(328, 732) - self.verticalLayout = QtWidgets.QVBoxLayout(Form) - self.verticalLayout.setContentsMargins(3, 3, 3, 3) - self.verticalLayout.setSpacing(3) - self.verticalLayout.setObjectName("verticalLayout") - self.baseline_box = QtWidgets.QGroupBox(Form) - self.baseline_box.setObjectName("baseline_box") - self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.baseline_box) - self.horizontalLayout_3.setContentsMargins(3, 3, 3, 3) - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.baselinebutton = QtWidgets.QPushButton(self.baseline_box) - self.baselinebutton.setObjectName("baselinebutton") - self.horizontalLayout_3.addWidget(self.baselinebutton) - self.verticalLayout.addWidget(self.baseline_box) - self.leftshift_box = QtWidgets.QGroupBox(Form) - self.leftshift_box.setObjectName("leftshift_box") - self.gridLayout_3 = QtWidgets.QGridLayout(self.leftshift_box) - self.gridLayout_3.setContentsMargins(3, 3, 3, 3) - self.gridLayout_3.setObjectName("gridLayout_3") - self.leftshiftbutton = QtWidgets.QPushButton(self.leftshift_box) - self.leftshiftbutton.setObjectName("leftshiftbutton") - self.gridLayout_3.addWidget(self.leftshiftbutton, 1, 0, 1, 2) - self.leftshift_comboBox = QtWidgets.QComboBox(self.leftshift_box) - self.leftshift_comboBox.setObjectName("leftshift_comboBox") - self.leftshift_comboBox.addItem("") - self.leftshift_comboBox.addItem("") - self.gridLayout_3.addWidget(self.leftshift_comboBox, 0, 0, 1, 1) - self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setContentsMargins(-1, 0, -1, -1) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.ls_spinBox = QtWidgets.QSpinBox(self.leftshift_box) - self.ls_spinBox.setMaximum(9999) - self.ls_spinBox.setObjectName("ls_spinBox") - self.verticalLayout_2.addWidget(self.ls_spinBox) - self.ls_lineEdit = QtWidgets.QLineEdit(self.leftshift_box) - self.ls_lineEdit.setObjectName("ls_lineEdit") - self.verticalLayout_2.addWidget(self.ls_lineEdit) - self.gridLayout_3.addLayout(self.verticalLayout_2, 0, 1, 1, 1) - self.verticalLayout.addWidget(self.leftshift_box) - self.zerofill_box = QtWidgets.QGroupBox(Form) - self.zerofill_box.setFlat(False) - self.zerofill_box.setObjectName("zerofill_box") - self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.zerofill_box) - self.horizontalLayout_4.setContentsMargins(3, 3, 3, 3) - self.horizontalLayout_4.setObjectName("horizontalLayout_4") - self.zfbutton = QtWidgets.QPushButton(self.zerofill_box) - self.zfbutton.setObjectName("zfbutton") - self.horizontalLayout_4.addWidget(self.zfbutton) - self.verticalLayout.addWidget(self.zerofill_box) - self.phase_box = QtWidgets.QGroupBox(Form) - self.phase_box.setFlat(False) - self.phase_box.setObjectName("phase_box") - self.gridLayout_4 = QtWidgets.QGridLayout(self.phase_box) - self.gridLayout_4.setContentsMargins(3, 3, 3, 3) - self.gridLayout_4.setVerticalSpacing(0) - self.gridLayout_4.setObjectName("gridLayout_4") - self.label_8 = QtWidgets.QLabel(self.phase_box) - self.label_8.setObjectName("label_8") - self.gridLayout_4.addWidget(self.label_8, 7, 0, 1, 1) - self.phase_prev_button = QtWidgets.QPushButton(self.phase_box) - self.phase_prev_button.setObjectName("phase_prev_button") - self.gridLayout_4.addWidget(self.phase_prev_button, 9, 0, 1, 1) - self.ph0slider = QtWidgets.QDoubleSpinBox(self.phase_box) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.ph0slider.sizePolicy().hasHeightForWidth()) - self.ph0slider.setSizePolicy(sizePolicy) - self.ph0slider.setWrapping(True) - self.ph0slider.setMinimum(-180.0) - self.ph0slider.setMaximum(180.0) - self.ph0slider.setObjectName("ph0slider") - self.gridLayout_4.addWidget(self.ph0slider, 2, 1, 1, 1) - self.ph1slider = QtWidgets.QDoubleSpinBox(self.phase_box) - self.ph1slider.setWrapping(True) - self.ph1slider.setMinimum(-360.0) - self.ph1slider.setMaximum(360.0) - self.ph1slider.setObjectName("ph1slider") - self.gridLayout_4.addWidget(self.ph1slider, 5, 1, 1, 1) - self.phasebutton = QtWidgets.QPushButton(self.phase_box) - self.phasebutton.setObjectName("phasebutton") - self.gridLayout_4.addWidget(self.phasebutton, 9, 1, 1, 1) - self.label_6 = QtWidgets.QLabel(self.phase_box) - self.label_6.setObjectName("label_6") - self.gridLayout_4.addWidget(self.label_6, 4, 0, 3, 1) - self.label = QtWidgets.QLabel(self.phase_box) - self.label.setObjectName("label") - self.gridLayout_4.addWidget(self.label, 1, 0, 3, 1) - self.pivot_lineedit = QtWidgets.QLineEdit(self.phase_box) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pivot_lineedit.sizePolicy().hasHeightForWidth()) - self.pivot_lineedit.setSizePolicy(sizePolicy) - self.pivot_lineedit.setInputMethodHints(QtCore.Qt.ImhDigitsOnly) - self.pivot_lineedit.setObjectName("pivot_lineedit") - self.gridLayout_4.addWidget(self.pivot_lineedit, 7, 1, 1, 1) - self.autophase_check = QtWidgets.QCheckBox(self.phase_box) - self.autophase_check.setObjectName("autophase_check") - self.gridLayout_4.addWidget(self.autophase_check, 8, 0, 1, 2) - self.verticalLayout.addWidget(self.phase_box) - self.apod_box = QtWidgets.QGroupBox(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.apod_box.sizePolicy().hasHeightForWidth()) - self.apod_box.setSizePolicy(sizePolicy) - self.apod_box.setObjectName("apod_box") - self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.apod_box) - self.verticalLayout_7.setContentsMargins(3, 3, 3, 3) - self.verticalLayout_7.setObjectName("verticalLayout_7") - self.apodcombobox = QtWidgets.QComboBox(self.apod_box) - self.apodcombobox.setObjectName("apodcombobox") - self.verticalLayout_7.addWidget(self.apodcombobox) - self.apod_name_label = QtWidgets.QLabel(self.apod_box) - self.apod_name_label.setIndent(3) - self.apod_name_label.setObjectName("apod_name_label") - self.verticalLayout_7.addWidget(self.apod_name_label) - self.apod_layout = QtWidgets.QVBoxLayout() - self.apod_layout.setSpacing(0) - self.apod_layout.setObjectName("apod_layout") - self.verticalLayout_7.addLayout(self.apod_layout) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") - self.apod_prev_button = QtWidgets.QPushButton(self.apod_box) - self.apod_prev_button.setObjectName("apod_prev_button") - self.horizontalLayout.addWidget(self.apod_prev_button) - self.apodbutton = QtWidgets.QPushButton(self.apod_box) - self.apodbutton.setObjectName("apodbutton") - self.horizontalLayout.addWidget(self.apodbutton) - self.verticalLayout_7.addLayout(self.horizontalLayout) - self.verticalLayout.addWidget(self.apod_box) - self.fft_box = QtWidgets.QGroupBox(Form) - self.fft_box.setObjectName("fft_box") - self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.fft_box) - self.horizontalLayout_5.setContentsMargins(3, 3, 3, 3) - self.horizontalLayout_5.setObjectName("horizontalLayout_5") - self.fourierutton = QtWidgets.QPushButton(self.fft_box) - self.fourierutton.setObjectName("fourierutton") - self.horizontalLayout_5.addWidget(self.fourierutton) - self.verticalLayout.addWidget(self.fft_box) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout.addItem(spacerItem) - - self.retranslateUi(Form) - QtCore.QMetaObject.connectSlotsByName(Form) - Form.setTabOrder(self.baselinebutton, self.leftshift_comboBox) - Form.setTabOrder(self.leftshift_comboBox, self.ls_spinBox) - Form.setTabOrder(self.ls_spinBox, self.ls_lineEdit) - Form.setTabOrder(self.ls_lineEdit, self.leftshiftbutton) - Form.setTabOrder(self.leftshiftbutton, self.zfbutton) - Form.setTabOrder(self.zfbutton, self.ph0slider) - Form.setTabOrder(self.ph0slider, self.ph1slider) - Form.setTabOrder(self.ph1slider, self.pivot_lineedit) - Form.setTabOrder(self.pivot_lineedit, self.autophase_check) - Form.setTabOrder(self.autophase_check, self.phase_prev_button) - Form.setTabOrder(self.phase_prev_button, self.phasebutton) - Form.setTabOrder(self.phasebutton, self.apodcombobox) - Form.setTabOrder(self.apodcombobox, self.apod_prev_button) - Form.setTabOrder(self.apod_prev_button, self.apodbutton) - Form.setTabOrder(self.apodbutton, self.fourierutton) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "Form")) - self.baseline_box.setTitle(_translate("Form", "Baseline correction")) - self.baselinebutton.setText(_translate("Form", "Apply")) - self.leftshift_box.setTitle(_translate("Form", "Left shift")) - self.leftshiftbutton.setText(_translate("Form", "Apply")) - self.leftshift_comboBox.setItemText(0, _translate("Form", "Points")) - self.leftshift_comboBox.setItemText(1, _translate("Form", "Seconds")) - self.zerofill_box.setTitle(_translate("Form", "Zerofilling")) - self.zfbutton.setText(_translate("Form", "Apply")) - self.phase_box.setTitle(_translate("Form", "Phase correction")) - self.label_8.setText(_translate("Form", "Pivot")) - self.phase_prev_button.setText(_translate("Form", "Preview")) - self.phasebutton.setText(_translate("Form", "Apply")) - self.label_6.setText(_translate("Form", "Phase 1")) - self.label.setText(_translate("Form", "Phase 0")) - self.pivot_lineedit.setText(_translate("Form", "0")) - self.autophase_check.setText(_translate("Form", "Autophase at pivot point")) - self.apod_box.setTitle(_translate("Form", "Apodization")) - self.apod_name_label.setText(_translate("Form", "TextLabel")) - self.apod_prev_button.setText(_translate("Form", "Preview")) - self.apodbutton.setText(_translate("Form", "Apply")) - self.fft_box.setTitle(_translate("Form", "FFT")) - self.fourierutton.setText(_translate("Form", "Apply")) diff --git a/src/gui_qt/_py/eval_expr_dialog.py b/src/gui_qt/_py/eval_expr_dialog.py deleted file mode 100644 index 844b343..0000000 --- a/src/gui_qt/_py/eval_expr_dialog.py +++ /dev/null @@ -1,242 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/eval_expr_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.2 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_CalcDialog(object): - def setupUi(self, CalcDialog): - CalcDialog.setObjectName("CalcDialog") - CalcDialog.setWindowModality(QtCore.Qt.WindowModal) - CalcDialog.resize(804, 627) - self.verticalLayout_5 = QtWidgets.QVBoxLayout(CalcDialog) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.splitter_2 = QtWidgets.QSplitter(CalcDialog) - self.splitter_2.setOrientation(QtCore.Qt.Horizontal) - self.splitter_2.setObjectName("splitter_2") - self.verticalLayoutWidget = QtWidgets.QWidget(self.splitter_2) - self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") - self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) - self.verticalLayout.setContentsMargins(0, 0, 0, 0) - self.verticalLayout.setObjectName("verticalLayout") - self.stackedWidget = QtWidgets.QStackedWidget(self.verticalLayoutWidget) - self.stackedWidget.setObjectName("stackedWidget") - self.page = QtWidgets.QWidget() - self.page.setObjectName("page") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.page) - self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.label_2 = QtWidgets.QLabel(self.page) - self.label_2.setObjectName("label_2") - self.verticalLayout_2.addWidget(self.label_2) - self.listWidget = QListWidgetSelect(self.page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) - self.listWidget.setObjectName("listWidget") - self.verticalLayout_2.addWidget(self.listWidget) - self.overwrite_checkbox = QtWidgets.QCheckBox(self.page) - self.overwrite_checkbox.setLayoutDirection(QtCore.Qt.LeftToRight) - self.overwrite_checkbox.setObjectName("overwrite_checkbox") - self.verticalLayout_2.addWidget(self.overwrite_checkbox) - self.stackedWidget.addWidget(self.page) - self.page_2 = QtWidgets.QWidget() - self.page_2.setObjectName("page_2") - self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.page_2) - self.verticalLayout_4.setObjectName("verticalLayout_4") - self.groupBox_2 = QtWidgets.QGroupBox(self.page_2) - self.groupBox_2.setObjectName("groupBox_2") - self.formLayout_3 = QtWidgets.QFormLayout(self.groupBox_2) - self.formLayout_3.setContentsMargins(3, 3, 3, 3) - self.formLayout_3.setHorizontalSpacing(3) - self.formLayout_3.setObjectName("formLayout_3") - self.label_3 = QtWidgets.QLabel(self.groupBox_2) - self.label_3.setObjectName("label_3") - self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_3) - self.label_lineEdit = QtWidgets.QLineEdit(self.groupBox_2) - self.label_lineEdit.setObjectName("label_lineEdit") - self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.label_lineEdit) - self.label_9 = QtWidgets.QLabel(self.groupBox_2) - self.label_9.setObjectName("label_9") - self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_9) - self.value_lineEdit = QtWidgets.QLineEdit(self.groupBox_2) - self.value_lineEdit.setObjectName("value_lineEdit") - self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.value_lineEdit) - self.label_6 = QtWidgets.QLabel(self.groupBox_2) - self.label_6.setObjectName("label_6") - self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_6) - self.dtype_comboBox = QtWidgets.QComboBox(self.groupBox_2) - self.dtype_comboBox.setObjectName("dtype_comboBox") - self.dtype_comboBox.addItem("") - self.dtype_comboBox.addItem("") - self.dtype_comboBox.addItem("") - self.dtype_comboBox.addItem("") - self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.dtype_comboBox) - self.verticalLayout_4.addWidget(self.groupBox_2) - self.groupBox = QtWidgets.QGroupBox(self.page_2) - self.groupBox.setObjectName("groupBox") - self.formLayout_2 = QtWidgets.QFormLayout(self.groupBox) - self.formLayout_2.setContentsMargins(3, 3, 3, 3) - self.formLayout_2.setSpacing(3) - self.formLayout_2.setObjectName("formLayout_2") - self.label_4 = QtWidgets.QLabel(self.groupBox) - self.label_4.setObjectName("label_4") - self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_4) - self.symcolor_comboBox = ColorListEditor(self.groupBox) - self.symcolor_comboBox.setObjectName("symcolor_comboBox") - self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.symcolor_comboBox) - self.label_5 = QtWidgets.QLabel(self.groupBox) - self.label_5.setObjectName("label_5") - self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_5) - self.symbol_spinBox = QtWidgets.QSpinBox(self.groupBox) - self.symbol_spinBox.setProperty("value", 10) - self.symbol_spinBox.setObjectName("symbol_spinBox") - self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.symbol_spinBox) - self.symbol_comboBox = SymbolStyleEditor(self.groupBox) - self.symbol_comboBox.setObjectName("symbol_comboBox") - self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.symbol_comboBox) - self.label_10 = QtWidgets.QLabel(self.groupBox) - self.label_10.setObjectName("label_10") - self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_10) - self.verticalLayout_4.addWidget(self.groupBox) - self.groupBox_3 = QtWidgets.QGroupBox(self.page_2) - self.groupBox_3.setObjectName("groupBox_3") - self.formLayout = QtWidgets.QFormLayout(self.groupBox_3) - self.formLayout.setContentsMargins(3, 3, 3, 3) - self.formLayout.setSpacing(3) - self.formLayout.setObjectName("formLayout") - self.label_7 = QtWidgets.QLabel(self.groupBox_3) - self.label_7.setObjectName("label_7") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_7) - self.linecolor_comboBox = ColorListEditor(self.groupBox_3) - self.linecolor_comboBox.setObjectName("linecolor_comboBox") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.linecolor_comboBox) - self.label_8 = QtWidgets.QLabel(self.groupBox_3) - self.label_8.setObjectName("label_8") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_8) - self.line_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_3) - self.line_doubleSpinBox.setProperty("value", 1.0) - self.line_doubleSpinBox.setObjectName("line_doubleSpinBox") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.line_doubleSpinBox) - self.linestyle_comboBox = LineStyleEditor(self.groupBox_3) - self.linestyle_comboBox.setObjectName("linestyle_comboBox") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.linestyle_comboBox) - self.label_11 = QtWidgets.QLabel(self.groupBox_3) - self.label_11.setObjectName("label_11") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_11) - self.verticalLayout_4.addWidget(self.groupBox_3) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_4.addItem(spacerItem) - self.graph_comboBox = QtWidgets.QComboBox(self.page_2) - self.graph_comboBox.setObjectName("graph_comboBox") - self.verticalLayout_4.addWidget(self.graph_comboBox) - self.groupBox.raise_() - self.groupBox_2.raise_() - self.groupBox_3.raise_() - self.graph_comboBox.raise_() - self.stackedWidget.addWidget(self.page_2) - self.page_3 = QtWidgets.QWidget() - self.page_3.setObjectName("page_3") - self.stackedWidget.addWidget(self.page_3) - self.verticalLayout.addWidget(self.stackedWidget) - self.splitter = QtWidgets.QSplitter(self.splitter_2) - self.splitter.setOrientation(QtCore.Qt.Vertical) - self.splitter.setChildrenCollapsible(False) - self.splitter.setObjectName("splitter") - self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.splitter) - self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") - self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2) - self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_6.setObjectName("verticalLayout_6") - self.namespace_widget = QNamespaceWidget(self.verticalLayoutWidget_2) - self.namespace_widget.setObjectName("namespace_widget") - self.verticalLayout_6.addWidget(self.namespace_widget) - self.verticalLayoutWidget_3 = QtWidgets.QWidget(self.splitter) - self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3") - self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_3) - self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.line_2 = QtWidgets.QFrame(self.verticalLayoutWidget_3) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.verticalLayout_3.addWidget(self.line_2) - self.label = QtWidgets.QLabel(self.verticalLayoutWidget_3) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label.setFont(font) - self.label.setObjectName("label") - self.verticalLayout_3.addWidget(self.label) - self.calc_edit = QtWidgets.QPlainTextEdit(self.verticalLayoutWidget_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.calc_edit.sizePolicy().hasHeightForWidth()) - self.calc_edit.setSizePolicy(sizePolicy) - self.calc_edit.setObjectName("calc_edit") - self.verticalLayout_3.addWidget(self.calc_edit) - self.verticalLayout_5.addWidget(self.splitter_2) - self.buttonBox = QtWidgets.QDialogButtonBox(CalcDialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout_5.addWidget(self.buttonBox) - self.label_3.setBuddy(self.label_lineEdit) - self.label_9.setBuddy(self.value_lineEdit) - self.label_6.setBuddy(self.dtype_comboBox) - self.label_4.setBuddy(self.symcolor_comboBox) - self.label_5.setBuddy(self.symbol_spinBox) - self.label_7.setBuddy(self.linecolor_comboBox) - self.label_8.setBuddy(self.line_doubleSpinBox) - - self.retranslateUi(CalcDialog) - self.stackedWidget.setCurrentIndex(0) - QtCore.QMetaObject.connectSlotsByName(CalcDialog) - CalcDialog.setTabOrder(self.calc_edit, self.listWidget) - CalcDialog.setTabOrder(self.listWidget, self.overwrite_checkbox) - CalcDialog.setTabOrder(self.overwrite_checkbox, self.label_lineEdit) - CalcDialog.setTabOrder(self.label_lineEdit, self.value_lineEdit) - CalcDialog.setTabOrder(self.value_lineEdit, self.dtype_comboBox) - CalcDialog.setTabOrder(self.dtype_comboBox, self.symcolor_comboBox) - CalcDialog.setTabOrder(self.symcolor_comboBox, self.symbol_spinBox) - CalcDialog.setTabOrder(self.symbol_spinBox, self.linecolor_comboBox) - CalcDialog.setTabOrder(self.linecolor_comboBox, self.line_doubleSpinBox) - - def retranslateUi(self, CalcDialog): - _translate = QtCore.QCoreApplication.translate - CalcDialog.setWindowTitle(_translate("CalcDialog", "Evaluate stuff")) - self.label_2.setText(_translate("CalcDialog", "Select sets for evaluation")) - self.overwrite_checkbox.setText(_translate("CalcDialog", "Overwrite values")) - self.groupBox_2.setTitle(_translate("CalcDialog", "GroupBox")) - self.label_3.setText(_translate("CalcDialog", "Label")) - self.label_9.setText(_translate("CalcDialog", "Value")) - self.label_6.setText(_translate("CalcDialog", "Datatype")) - self.dtype_comboBox.setItemText(0, _translate("CalcDialog", "Points")) - self.dtype_comboBox.setItemText(1, _translate("CalcDialog", "Timesignal")) - self.dtype_comboBox.setItemText(2, _translate("CalcDialog", "Spectrum")) - self.dtype_comboBox.setItemText(3, _translate("CalcDialog", "BDS")) - self.groupBox.setTitle(_translate("CalcDialog", "Symbol")) - self.label_4.setText(_translate("CalcDialog", "Color")) - self.label_5.setText(_translate("CalcDialog", "Size")) - self.label_10.setText(_translate("CalcDialog", "Style")) - self.groupBox_3.setTitle(_translate("CalcDialog", "Line")) - self.label_7.setText(_translate("CalcDialog", "Color")) - self.label_8.setText(_translate("CalcDialog", "Width")) - self.label_11.setText(_translate("CalcDialog", "Style")) - self.label.setText(_translate("CalcDialog", "Expressions are evaluated line by line and change previous values")) -from ..lib.delegates import ColorListEditor, LineStyleEditor, SymbolStyleEditor -from ..lib.listwidget import QListWidgetSelect -from ..lib.namespace import QNamespaceWidget diff --git a/src/gui_qt/_py/evalexpression.py b/src/gui_qt/_py/evalexpression.py deleted file mode 100644 index 43e0f9c..0000000 --- a/src/gui_qt/_py/evalexpression.py +++ /dev/null @@ -1,217 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/evalexpression.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_CalcDialog(object): - def setupUi(self, CalcDialog): - CalcDialog.setObjectName("CalcDialog") - CalcDialog.resize(895, 547) - self.gridLayout = QtWidgets.QGridLayout(CalcDialog) - self.gridLayout.setObjectName("gridLayout") - self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setContentsMargins(-1, 0, -1, -1) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.tabWidget = QtWidgets.QTabWidget(CalcDialog) - self.tabWidget.setObjectName("tabWidget") - self.tab = QtWidgets.QWidget() - self.tab.setObjectName("tab") - self.verticalLayout = QtWidgets.QVBoxLayout(self.tab) - self.verticalLayout.setContentsMargins(0, 0, 0, 0) - self.verticalLayout.setSpacing(0) - self.verticalLayout.setObjectName("verticalLayout") - self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayout_2.setSpacing(0) - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.textEdit = QtWidgets.QTextEdit(self.tab) - self.textEdit.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.textEdit.sizePolicy().hasHeightForWidth()) - self.textEdit.setSizePolicy(sizePolicy) - self.textEdit.setFrameShape(QtWidgets.QFrame.NoFrame) - self.textEdit.setFrameShadow(QtWidgets.QFrame.Plain) - self.textEdit.setAutoFormatting(QtWidgets.QTextEdit.AutoNone) - self.textEdit.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) - self.textEdit.setObjectName("textEdit") - self.horizontalLayout_2.addWidget(self.textEdit) - self.textEdit_3 = QtWidgets.QTextEdit(self.tab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.textEdit_3.sizePolicy().hasHeightForWidth()) - self.textEdit_3.setSizePolicy(sizePolicy) - self.textEdit_3.setFrameShape(QtWidgets.QFrame.NoFrame) - self.textEdit_3.setFrameShadow(QtWidgets.QFrame.Plain) - self.textEdit_3.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) - self.textEdit_3.setObjectName("textEdit_3") - self.horizontalLayout_2.addWidget(self.textEdit_3) - self.verticalLayout.addLayout(self.horizontalLayout_2) - self.tabWidget.addTab(self.tab, "") - self.tab_2 = QtWidgets.QWidget() - self.tab_2.setObjectName("tab_2") - self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tab_2) - self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_3.setSpacing(0) - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.horizontalLayout_3 = QtWidgets.QHBoxLayout() - self.horizontalLayout_3.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayout_3.setSpacing(0) - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.textEdit_2 = QtWidgets.QTextEdit(self.tab_2) - self.textEdit_2.setEnabled(True) - self.textEdit_2.setFrameShape(QtWidgets.QFrame.NoFrame) - self.textEdit_2.setFrameShadow(QtWidgets.QFrame.Plain) - self.textEdit_2.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) - self.textEdit_2.setObjectName("textEdit_2") - self.horizontalLayout_3.addWidget(self.textEdit_2) - self.textEdit_4 = QtWidgets.QTextEdit(self.tab_2) - self.textEdit_4.setFrameShape(QtWidgets.QFrame.NoFrame) - self.textEdit_4.setFrameShadow(QtWidgets.QFrame.Plain) - self.textEdit_4.setReadOnly(True) - self.textEdit_4.setObjectName("textEdit_4") - self.horizontalLayout_3.addWidget(self.textEdit_4) - self.verticalLayout_3.addLayout(self.horizontalLayout_3) - self.tabWidget.addTab(self.tab_2, "") - self.tab_3 = QtWidgets.QWidget() - self.tab_3.setObjectName("tab_3") - self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.tab_3) - self.verticalLayout_4.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_4.setSpacing(0) - self.verticalLayout_4.setObjectName("verticalLayout_4") - self.treeWidget = QtWidgets.QTreeWidget(self.tab_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.treeWidget.sizePolicy().hasHeightForWidth()) - self.treeWidget.setSizePolicy(sizePolicy) - self.treeWidget.setFrameShape(QtWidgets.QFrame.NoFrame) - self.treeWidget.setFrameShadow(QtWidgets.QFrame.Plain) - self.treeWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.treeWidget.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) - self.treeWidget.setObjectName("treeWidget") - self.treeWidget.header().setVisible(False) - self.verticalLayout_4.addWidget(self.treeWidget) - self.tabWidget.addTab(self.tab_3, "") - self.verticalLayout_2.addWidget(self.tabWidget) - self.label = QtWidgets.QLabel(CalcDialog) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label.setFont(font) - self.label.setObjectName("label") - self.verticalLayout_2.addWidget(self.label) - self.calc_edit = QtWidgets.QPlainTextEdit(CalcDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.calc_edit.sizePolicy().hasHeightForWidth()) - self.calc_edit.setSizePolicy(sizePolicy) - self.calc_edit.setObjectName("calc_edit") - self.verticalLayout_2.addWidget(self.calc_edit) - self.gridLayout.addLayout(self.verticalLayout_2, 0, 3, 1, 1) - self.verticalLayout_5 = QtWidgets.QVBoxLayout() - self.verticalLayout_5.setSpacing(0) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.label_2 = QtWidgets.QLabel(CalcDialog) - self.label_2.setObjectName("label_2") - self.verticalLayout_5.addWidget(self.label_2) - self.listWidget = QtWidgets.QListWidget(CalcDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection) - self.listWidget.setObjectName("listWidget") - self.verticalLayout_5.addWidget(self.listWidget) - self.overwrite_checkbox = QtWidgets.QCheckBox(CalcDialog) - self.overwrite_checkbox.setLayoutDirection(QtCore.Qt.LeftToRight) - self.overwrite_checkbox.setObjectName("overwrite_checkbox") - self.verticalLayout_5.addWidget(self.overwrite_checkbox) - self.gridLayout.addLayout(self.verticalLayout_5, 0, 1, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(CalcDialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 1, 3, 1, 1) - self.line = QtWidgets.QFrame(CalcDialog) - self.line.setFrameShape(QtWidgets.QFrame.VLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 0, 2, 1, 1) - - self.retranslateUi(CalcDialog) - self.tabWidget.setCurrentIndex(0) - self.buttonBox.accepted.connect(CalcDialog.accept) - self.buttonBox.rejected.connect(CalcDialog.reject) - QtCore.QMetaObject.connectSlotsByName(CalcDialog) - - def retranslateUi(self, CalcDialog): - _translate = QtCore.QCoreApplication.translate - CalcDialog.setWindowTitle(_translate("CalcDialog", "Evaluate stuff")) - self.textEdit.setHtml(_translate("CalcDialog", "\n" -"\n" -"- X, y, and Δy values
\n" -"- Values of dataset on position i in list
\n" -"(s[i].x and x return the same values)
\n" -"- Numpy functions
\n" -"- If available, fit parameters
\n" -"(see namespace for available parameters)
\n" -"- Fit functions:
\n" -"(meaning of p and extra arguments
\n" -"depend on function)
\n" -"- Constants:
\n" -"(nuclei are accessed by const[\'gamma\'][\'1H\'])
")) - self.textEdit_3.setHtml(_translate("CalcDialog", "\n" -"\n" -"x y y_err
\n" -"s[i].x s[i+2].y s[i-1].y_err
\n" -"np.function
\n" -"fit[\'NAME\']
\n" -"Name.func(p, x, *args)
\n" -"const[\'NAME\']
")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("CalcDialog", "Parameter")) - self.textEdit_2.setHtml(_translate("CalcDialog", "\n" -"\n" -"Substract neighbouring datasets:
\n" -"Normalize on fit value M∞:
\n" -"Logscale x:
\n" -"Division by exponential decay:
\n" -"y = y-s[i+1].y
\n" -"y = y/fit[\'M_infty\']
\n" -"x = np.log10(x)
\n" -"y = y/np.exp(-x/10)
\n" -"y = y/Exponential_Decay.func([0, 1, 10, 1], x)
")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("CalcDialog", "Example")) - self.treeWidget.headerItem().setText(0, _translate("CalcDialog", "Namespace")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("CalcDialog", "Namespace")) - self.label.setText(_translate("CalcDialog", "Expressions are evaluated line by line and change previous values")) - self.label_2.setText(_translate("CalcDialog", "Select sets for evaluation
(no selection = all visible):
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/fitparametertable.py b/src/gui_qt/_py/fitparametertable.py deleted file mode 100644 index 5ad7241..0000000 --- a/src/gui_qt/_py/fitparametertable.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/fitparametertable.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_FitParameterDialog(object): - def setupUi(self, FitParameterDialog): - FitParameterDialog.setObjectName("FitParameterDialog") - FitParameterDialog.resize(898, 583) - self.verticalLayout = QtWidgets.QVBoxLayout(FitParameterDialog) - self.verticalLayout.setObjectName("verticalLayout") - self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.verticalLayout.addLayout(self.verticalLayout_2) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.pushButton = QtWidgets.QPushButton(FitParameterDialog) - self.pushButton.setObjectName("pushButton") - self.horizontalLayout.addWidget(self.pushButton) - self.buttonBox = QtWidgets.QDialogButtonBox(FitParameterDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth()) - self.buttonBox.setSizePolicy(sizePolicy) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) - self.buttonBox.setCenterButtons(False) - self.buttonBox.setObjectName("buttonBox") - self.horizontalLayout.addWidget(self.buttonBox) - self.verticalLayout.addLayout(self.horizontalLayout) - - self.retranslateUi(FitParameterDialog) - self.buttonBox.accepted.connect(FitParameterDialog.accept) - self.buttonBox.rejected.connect(FitParameterDialog.reject) - QtCore.QMetaObject.connectSlotsByName(FitParameterDialog) - - def retranslateUi(self, FitParameterDialog): - _translate = QtCore.QCoreApplication.translate - FitParameterDialog.setWindowTitle(_translate("FitParameterDialog", "Fitparameter")) - self.pushButton.setText(_translate("FitParameterDialog", "Copy")) diff --git a/src/gui_qt/_py/fitparameterwidget.py b/src/gui_qt/_py/fitparameterwidget.py deleted file mode 100644 index 6d282bd..0000000 --- a/src/gui_qt/_py/fitparameterwidget.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/fitparameterwidget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_FormFit(object): - def setupUi(self, FormFit): - FormFit.setObjectName("FormFit") - FormFit.resize(292, 477) - self.verticalLayout = QtWidgets.QVBoxLayout(FormFit) - self.verticalLayout.setContentsMargins(0, 0, 0, 0) - self.verticalLayout.setSpacing(3) - self.verticalLayout.setObjectName("verticalLayout") - self.tabWidget = QtWidgets.QTabWidget(FormFit) - self.tabWidget.setObjectName("tabWidget") - self.general_tab = QtWidgets.QWidget() - self.general_tab.setObjectName("general_tab") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.general_tab) - self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.scrollArea = QtWidgets.QScrollArea(self.general_tab) - self.scrollArea.setFrameShape(QtWidgets.QFrame.NoFrame) - self.scrollArea.setFrameShadow(QtWidgets.QFrame.Plain) - self.scrollArea.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents) - self.scrollArea.setWidgetResizable(True) - self.scrollArea.setObjectName("scrollArea") - self.scrollwidget = QtWidgets.QWidget() - self.scrollwidget.setGeometry(QtCore.QRect(0, 0, 284, 442)) - self.scrollwidget.setObjectName("scrollwidget") - self.scrollArea.setWidget(self.scrollwidget) - self.verticalLayout_2.addWidget(self.scrollArea) - self.tabWidget.addTab(self.general_tab, "") - self.data_tab = QtWidgets.QWidget() - self.data_tab.setObjectName("data_tab") - self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.data_tab) - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.comboBox = QtWidgets.QComboBox(self.data_tab) - self.comboBox.setObjectName("comboBox") - self.verticalLayout_3.addWidget(self.comboBox) - self.scrollArea2 = QtWidgets.QScrollArea(self.data_tab) - self.scrollArea2.setFrameShape(QtWidgets.QFrame.NoFrame) - self.scrollArea2.setFrameShadow(QtWidgets.QFrame.Plain) - self.scrollArea2.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents) - self.scrollArea2.setWidgetResizable(True) - self.scrollArea2.setObjectName("scrollArea2") - self.scrollwidget2 = QtWidgets.QWidget() - self.scrollwidget2.setGeometry(QtCore.QRect(0, 0, 272, 392)) - self.scrollwidget2.setObjectName("scrollwidget2") - self.scrollArea2.setWidget(self.scrollwidget2) - self.verticalLayout_3.addWidget(self.scrollArea2) - self.tabWidget.addTab(self.data_tab, "") - self.verticalLayout.addWidget(self.tabWidget) - - self.retranslateUi(FormFit) - self.tabWidget.setCurrentIndex(0) - QtCore.QMetaObject.connectSlotsByName(FormFit) - - def retranslateUi(self, FormFit): - _translate = QtCore.QCoreApplication.translate - FormFit.setWindowTitle(_translate("FormFit", "Form")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.general_tab), _translate("FormFit", "General settings")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.data_tab), _translate("FormFit", "Data parameter")) diff --git a/src/gui_qt/_py/fitresult.py b/src/gui_qt/_py/fitresult.py deleted file mode 100644 index 0f73b79..0000000 --- a/src/gui_qt/_py/fitresult.py +++ /dev/null @@ -1,293 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/fitresult.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_3.addItem(spacerItem, 2, 3, 1, 1) - self.autoscale_box = QtWidgets.QToolButton(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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_3.addItem(spacerItem1, 2, 1, 1, 1) - self.verticalGroupBox_2 = QtWidgets.QGroupBox(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(self.verticalGroupBox_2) - self.logx_box.setLayoutDirection(QtCore.Qt.LeftToRight) - self.logx_box.setObjectName("logx_box") - self.verticalLayout_4.addWidget(self.logx_box) - self.logy_box = QtWidgets.QCheckBox(self.verticalGroupBox_2) - self.logy_box.setLayoutDirection(QtCore.Qt.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(self.stackPage1) - self.verticalGroupBox.setObjectName("verticalGroupBox") - self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalGroupBox) - self.verticalLayout.setObjectName("verticalLayout") - self.rel_dev_button = QtWidgets.QRadioButton(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(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(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(self.stackPage2) - self.stats_tableWidget.setFrameShape(QtWidgets.QFrame.Box) - self.stats_tableWidget.setGridStyle(QtCore.Qt.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(self.stackPage3) - self.corr_tableWidget.setFrameShape(QtWidgets.QFrame.Box) - self.corr_tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.corr_tableWidget.setGridStyle(QtCore.Qt.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(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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.ScrollBarAsNeeded) - self.param_tableWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored) - self.param_tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.param_tableWidget.setAlternatingRowColors(True) - self.param_tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.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(Dialog) - self.del_prev_checkBox.setObjectName("del_prev_checkBox") - self.gridLayout.addWidget(self.del_prev_checkBox, 3, 0, 1, 1) - self.line = QtWidgets.QFrame(Dialog) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 5, 0, 1, 2) - self.sets_comboBox = ElideComboBox(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(Dialog) - self.reject_fit_checkBox.setObjectName("reject_fit_checkBox") - self.gridLayout.addWidget(self.reject_fit_checkBox, 2, 0, 1, 1) - self.groupBox = QtWidgets.QGroupBox(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(self.groupBox) - self.graph_comboBox.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(self.groupBox) - self.minx_line.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(self.groupBox) - self.extrapolate_box.setObjectName("extrapolate_box") - self.gridLayout_2.addWidget(self.extrapolate_box, 1, 0, 1, 1) - self.numx_line = QtWidgets.QLineEdit(self.groupBox) - self.numx_line.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(self.groupBox) - self.maxx_line.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(self.groupBox) - self.line_2.setFrameShape(QtWidgets.QFrame.VLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout_2.addWidget(self.line_2, 0, 5, 2, 1) - self.newx_log_checkbox = QtWidgets.QCheckBox(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(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(Dialog) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.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/ftdialog.py b/src/gui_qt/_py/ftdialog.py deleted file mode 100644 index 1fd694f..0000000 --- a/src/gui_qt/_py/ftdialog.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/ftdialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(400, 300) - self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) - self.verticalLayout.setContentsMargins(3, 3, 3, 3) - self.verticalLayout.setSpacing(3) - self.verticalLayout.setObjectName("verticalLayout") - self.listWidget = QtWidgets.QListWidget(Dialog) - self.listWidget.setObjectName("listWidget") - self.verticalLayout.addWidget(self.listWidget) - self.mode_comboBox = QtWidgets.QComboBox(Dialog) - self.mode_comboBox.setObjectName("mode_comboBox") - self.mode_comboBox.addItem("") - self.mode_comboBox.addItem("") - self.mode_comboBox.addItem("") - self.verticalLayout.addWidget(self.mode_comboBox) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayout.setSpacing(3) - self.horizontalLayout.setObjectName("horizontalLayout") - self.graph_checkBox = QtWidgets.QCheckBox(Dialog) - self.graph_checkBox.setObjectName("graph_checkBox") - self.horizontalLayout.addWidget(self.graph_checkBox) - self.graph_comboBox = QtWidgets.QComboBox(Dialog) - self.graph_comboBox.setObjectName("graph_comboBox") - self.horizontalLayout.addWidget(self.graph_comboBox) - self.verticalLayout.addLayout(self.horizontalLayout) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout.addWidget(self.buttonBox) - - self.retranslateUi(Dialog) - self.buttonBox.accepted.connect(Dialog.accept) - self.buttonBox.rejected.connect(Dialog.reject) - QtCore.QMetaObject.connectSlotsByName(Dialog) - - def retranslateUi(self, Dialog): - _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Logarithmic Fourier")) - self.mode_comboBox.setItemText(0, _translate("Dialog", "Real")) - self.mode_comboBox.setItemText(1, _translate("Dialog", "Imag")) - self.mode_comboBox.setItemText(2, _translate("Dialog", "Complex")) - self.graph_checkBox.setText(_translate("Dialog", "New graph")) diff --git a/src/gui_qt/_py/function_tree_widget.py b/src/gui_qt/_py/function_tree_widget.py deleted file mode 100644 index 5235d8d..0000000 --- a/src/gui_qt/_py/function_tree_widget.py +++ /dev/null @@ -1,123 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/function_tree_widget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(314, 232) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth()) - Form.setSizePolicy(sizePolicy) - self.gridLayout = QtWidgets.QGridLayout(Form) - self.gridLayout.setContentsMargins(0, 0, 0, 0) - self.gridLayout.setSpacing(3) - self.gridLayout.setObjectName("gridLayout") - self.widget_2 = ExpandableWidget(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Maximum) - 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.gridLayout.addWidget(self.widget_2, 4, 0, 1, 2) - self.widget = QtWidgets.QWidget(Form) - self.widget.setObjectName("widget") - self.gridLayout_2 = QtWidgets.QGridLayout(self.widget) - self.gridLayout_2.setContentsMargins(0, 0, 0, 0) - self.gridLayout_2.setObjectName("gridLayout_2") - self.label_2 = QtWidgets.QLabel(self.widget) - self.label_2.setObjectName("label_2") - self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1) - self.complex_comboBox = QtWidgets.QComboBox(self.widget) - self.complex_comboBox.setObjectName("complex_comboBox") - self.complex_comboBox.addItem("") - self.complex_comboBox.addItem("") - self.complex_comboBox.addItem("") - self.gridLayout_2.addWidget(self.complex_comboBox, 1, 1, 1, 1) - self.label = QtWidgets.QLabel(self.widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) - self.label.setSizePolicy(sizePolicy) - self.label.setObjectName("label") - self.gridLayout_2.addWidget(self.label, 0, 0, 1, 2) - self.gridLayout.addWidget(self.widget, 5, 0, 1, 2) - self.use_function_button = QtWidgets.QToolButton(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.use_function_button.sizePolicy().hasHeightForWidth()) - self.use_function_button.setSizePolicy(sizePolicy) - self.use_function_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) - self.use_function_button.setAutoRaise(False) - self.use_function_button.setArrowType(QtCore.Qt.RightArrow) - self.use_function_button.setObjectName("use_function_button") - self.gridLayout.addWidget(self.use_function_button, 3, 1, 1, 1) - self.fitcomboBox = QtWidgets.QComboBox(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.fitcomboBox.sizePolicy().hasHeightForWidth()) - self.fitcomboBox.setSizePolicy(sizePolicy) - self.fitcomboBox.setObjectName("fitcomboBox") - self.gridLayout.addWidget(self.fitcomboBox, 1, 0, 1, 2) - self.typecomboBox = QtWidgets.QComboBox(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.typecomboBox.sizePolicy().hasHeightForWidth()) - self.typecomboBox.setSizePolicy(sizePolicy) - self.typecomboBox.setObjectName("typecomboBox") - self.gridLayout.addWidget(self.typecomboBox, 0, 0, 1, 2) - self.fitequation = QtWidgets.QLabel(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.fitequation.sizePolicy().hasHeightForWidth()) - self.fitequation.setSizePolicy(sizePolicy) - self.fitequation.setWordWrap(True) - self.fitequation.setObjectName("fitequation") - self.gridLayout.addWidget(self.fitequation, 2, 0, 1, 2) - self.operator_combobox = QtWidgets.QComboBox(Form) - self.operator_combobox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents) - self.operator_combobox.setFrame(True) - self.operator_combobox.setObjectName("operator_combobox") - self.operator_combobox.addItem("") - self.operator_combobox.addItem("") - self.operator_combobox.addItem("") - self.operator_combobox.addItem("") - self.gridLayout.addWidget(self.operator_combobox, 3, 0, 1, 1) - self.comboBox_2 = QtWidgets.QComboBox(Form) - self.comboBox_2.setObjectName("comboBox_2") - self.gridLayout.addWidget(self.comboBox_2, 6, 0, 1, 2) - - 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", "Select part to fit")) - self.complex_comboBox.setItemText(0, _translate("Form", "Complex")) - self.complex_comboBox.setItemText(1, _translate("Form", "Real")) - self.complex_comboBox.setItemText(2, _translate("Form", "Imaginary")) - self.label.setText(_translate("Form", "Complex function found")) - self.use_function_button.setText(_translate("Form", "Use")) - self.fitequation.setText(_translate("Form", "Equation")) - self.operator_combobox.setItemText(0, _translate("Form", "Add")) - self.operator_combobox.setItemText(1, _translate("Form", "Multiply")) - self.operator_combobox.setItemText(2, _translate("Form", "Subtract")) - self.operator_combobox.setItemText(3, _translate("Form", "Divide by")) -from ..lib.expandablewidget import ExpandableWidget diff --git a/src/gui_qt/_py/gol.py b/src/gui_qt/_py/gol.py deleted file mode 100644 index 2d00e06..0000000 --- a/src/gui_qt/_py/gol.py +++ /dev/null @@ -1,276 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/gol.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(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(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(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(self.widget) - self.radioButton.setObjectName("radioButton") - self.buttonGroup.addButton(self.radioButton) - self.verticalLayout_3.addWidget(self.radioButton) - self.line = QtWidgets.QFrame(self.widget) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.verticalLayout_3.addWidget(self.line) - self.faster_button = QtWidgets.QToolButton(self.widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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.ToolButtonTextBesideIcon) - self.faster_button.setArrowType(QtCore.Qt.RightArrow) - self.faster_button.setObjectName("faster_button") - self.verticalLayout_3.addWidget(self.faster_button) - self.velocity_label = QtWidgets.QLabel(self.widget) - self.velocity_label.setObjectName("velocity_label") - self.verticalLayout_3.addWidget(self.velocity_label) - self.slower_button = QtWidgets.QToolButton(self.widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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.ToolButtonTextBesideIcon) - self.slower_button.setArrowType(QtCore.Qt.LeftArrow) - self.slower_button.setObjectName("slower_button") - self.verticalLayout_3.addWidget(self.slower_button) - self.current_step = QtWidgets.QLabel(self.widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.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(self.widget) - self.line_3.setFrameShape(QtWidgets.QFrame.HLine) - self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_3.setObjectName("line_3") - self.verticalLayout_3.addWidget(self.line_3) - self.label_6 = QtWidgets.QLabel(self.widget) - self.label_6.setObjectName("label_6") - self.verticalLayout_3.addWidget(self.label_6) - self.cover_label = QtWidgets.QLabel(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.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_3.addItem(spacerItem) - self.gridLayout_2.addWidget(self.widget, 0, 0, 1, 1) - self.view = QtWidgets.QGraphicsView(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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.NoFrame) - self.view.setObjectName("view") - self.gridLayout_2.addWidget(self.view, 0, 1, 1, 1) - self.option_frame = QtWidgets.QFrame(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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.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(self.option_frame) - self.rule_label.setObjectName("rule_label") - self.horizontalLayout_2.addWidget(self.rule_label) - self.rule_cb = QtWidgets.QComboBox(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(self.option_frame) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.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(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(self.object_widget) - self.label_5.setObjectName("label_5") - self.horizontalLayout_6.addWidget(self.label_5) - self.object_size = QtWidgets.QSpinBox(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(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(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(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(self.option_frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.option_frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(self.option_frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.option_frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(self.option_frame) - self.label.setObjectName("label") - self.horizontalLayout_3.addWidget(self.label) - self.width_box = QtWidgets.QSpinBox(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(self.option_frame) - self.label_2.setObjectName("label_2") - self.horizontalLayout_3.addWidget(self.label_2) - self.height_box = QtWidgets.QSpinBox(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(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(self.option_frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.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(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/gracemsgdialog.py b/src/gui_qt/_py/gracemsgdialog.py deleted file mode 100644 index 9c3c25f..0000000 --- a/src/gui_qt/_py/gracemsgdialog.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/gracemsgdialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_GraceMsgDialog(object): - def setupUi(self, GraceMsgDialog): - GraceMsgDialog.setObjectName("GraceMsgDialog") - GraceMsgDialog.resize(400, 300) - self.gridLayout = QtWidgets.QGridLayout(GraceMsgDialog) - self.gridLayout.setObjectName("gridLayout") - self.graph_combo = QtWidgets.QComboBox(GraceMsgDialog) - self.graph_combo.setObjectName("graph_combo") - self.gridLayout.addWidget(self.graph_combo, 1, 1, 1, 1) - self.graph_button = QtWidgets.QRadioButton(GraceMsgDialog) - self.graph_button.setObjectName("graph_button") - self.buttonGroup = QtWidgets.QButtonGroup(GraceMsgDialog) - self.buttonGroup.setObjectName("buttonGroup") - self.buttonGroup.addButton(self.graph_button) - self.gridLayout.addWidget(self.graph_button, 1, 0, 1, 1) - self.overwrite_button = QtWidgets.QRadioButton(GraceMsgDialog) - self.overwrite_button.setChecked(True) - self.overwrite_button.setObjectName("overwrite_button") - self.buttonGroup.addButton(self.overwrite_button) - self.gridLayout.addWidget(self.overwrite_button, 0, 0, 1, 1) - self.radioButton = QtWidgets.QRadioButton(GraceMsgDialog) - self.radioButton.setObjectName("radioButton") - self.buttonGroup.addButton(self.radioButton) - self.gridLayout.addWidget(self.radioButton, 2, 0, 1, 1) - self.tableWidget = QtWidgets.QTableWidget(GraceMsgDialog) - self.tableWidget.setColumnCount(2) - self.tableWidget.setObjectName("tableWidget") - self.tableWidget.setRowCount(0) - self.tableWidget.horizontalHeader().setVisible(False) - self.gridLayout.addWidget(self.tableWidget, 3, 0, 2, 2) - self.buttonBox = QtWidgets.QDialogButtonBox(GraceMsgDialog) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 2) - - self.retranslateUi(GraceMsgDialog) - QtCore.QMetaObject.connectSlotsByName(GraceMsgDialog) - - def retranslateUi(self, GraceMsgDialog): - _translate = QtCore.QCoreApplication.translate - GraceMsgDialog.setWindowTitle(_translate("GraceMsgDialog", "Goodness gracious, file already exists.")) - self.graph_button.setText(_translate("GraceMsgDialog", "Add to graph")) - self.overwrite_button.setText(_translate("GraceMsgDialog", "Overwrite file")) - self.radioButton.setText(_translate("GraceMsgDialog", "Replace sets")) diff --git a/src/gui_qt/_py/gracereader.py b/src/gui_qt/_py/gracereader.py deleted file mode 100644 index b769d0d..0000000 --- a/src/gui_qt/_py/gracereader.py +++ /dev/null @@ -1,92 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/gracereader.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(Dialog) - self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - self.treeWidget = QtWidgets.QTreeWidget(Dialog) - self.treeWidget.setSelectionMode(QtWidgets.QAbstractItemView.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(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth()) - self.tableWidget.setSizePolicy(sizePolicy) - self.tableWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) - self.tableWidget.setGridStyle(QtCore.Qt.NoPen) - self.tableWidget.setRowCount(4) - self.tableWidget.setColumnCount(2) - self.tableWidget.setObjectName("tableWidget") - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(0, 0, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(0, 1, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(1, 0, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(1, 1, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(2, 0, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(2, 1, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled) - self.tableWidget.setItem(3, 0, item) - item = QtWidgets.QTableWidgetItem() - item.setFlags(QtCore.Qt.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(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout.addWidget(self.buttonBox) - - self.retranslateUi(Dialog) - self.buttonBox.accepted.connect(Dialog.accept) - self.buttonBox.rejected.connect(Dialog.reject) - 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 deleted file mode 100644 index b54a751..0000000 --- a/src/gui_qt/_py/graph.py +++ /dev/null @@ -1,281 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/graph.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(GraphWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(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(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(self.widget) - self.line.setFrameShape(QtWidgets.QFrame.VLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.horizontalLayout.addWidget(self.line) - self.gridbutton = QtWidgets.QToolButton(self.widget) - self.gridbutton.setCheckable(True) - self.gridbutton.setAutoRaise(True) - self.gridbutton.setObjectName("gridbutton") - self.horizontalLayout.addWidget(self.gridbutton) - self.bwbutton = QtWidgets.QToolButton(self.widget) - self.bwbutton.setCheckable(True) - self.bwbutton.setAutoRaise(True) - self.bwbutton.setObjectName("bwbutton") - self.horizontalLayout.addWidget(self.bwbutton) - self.line_2 = QtWidgets.QFrame(self.widget) - self.line_2.setFrameShape(QtWidgets.QFrame.VLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.horizontalLayout.addWidget(self.line_2) - self.legend_button = QtWidgets.QToolButton(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(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(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(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(self.widget) - self.line_3.setFrameShape(QtWidgets.QFrame.VLine) - self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_3.setObjectName("line_3") - self.horizontalLayout.addWidget(self.line_3) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.limit_button = QtWidgets.QToolButton(self.widget) - self.limit_button.setCheckable(True) - self.limit_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) - self.limit_button.setAutoRaise(True) - self.limit_button.setArrowType(QtCore.Qt.RightArrow) - self.limit_button.setObjectName("limit_button") - self.horizontalLayout.addWidget(self.limit_button) - self.label_button = QtWidgets.QToolButton(self.widget) - self.label_button.setCheckable(True) - self.label_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) - self.label_button.setAutoRaise(True) - self.label_button.setArrowType(QtCore.Qt.RightArrow) - self.label_button.setObjectName("label_button") - self.horizontalLayout.addWidget(self.label_button) - self.verticalLayout.addWidget(self.widget) - self.line_4 = QtWidgets.QFrame(GraphWindow) - self.line_4.setFrameShape(QtWidgets.QFrame.HLine) - self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_4.setObjectName("line_4") - self.verticalLayout.addWidget(self.line_4) - self.limit_widget = QtWidgets.QWidget(GraphWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.limit_widget) - self.label.setObjectName("label") - self.horizontalLayout_2.addWidget(self.label) - self.xmin_lineedit = QtWidgets.QLineEdit(self.limit_widget) - self.xmin_lineedit.setObjectName("xmin_lineedit") - self.horizontalLayout_2.addWidget(self.xmin_lineedit) - self.label_2 = QtWidgets.QLabel(self.limit_widget) - self.label_2.setObjectName("label_2") - self.horizontalLayout_2.addWidget(self.label_2) - self.xmax_lineedit = QtWidgets.QLineEdit(self.limit_widget) - self.xmax_lineedit.setObjectName("xmax_lineedit") - self.horizontalLayout_2.addWidget(self.xmax_lineedit) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem1) - self.label_3 = QtWidgets.QLabel(self.limit_widget) - self.label_3.setObjectName("label_3") - self.horizontalLayout_2.addWidget(self.label_3) - self.ymin_lineedit = QtWidgets.QLineEdit(self.limit_widget) - self.ymin_lineedit.setObjectName("ymin_lineedit") - self.horizontalLayout_2.addWidget(self.ymin_lineedit) - self.label_4 = QtWidgets.QLabel(self.limit_widget) - self.label_4.setObjectName("label_4") - self.horizontalLayout_2.addWidget(self.label_4) - self.ymax_lineedit = QtWidgets.QLineEdit(self.limit_widget) - self.ymax_lineedit.setObjectName("ymax_lineedit") - self.horizontalLayout_2.addWidget(self.ymax_lineedit) - self.apply_button = QtWidgets.QPushButton(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(GraphWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.label_widget) - self.label_5.setObjectName("label_5") - self.horizontalLayout_3.addWidget(self.label_5) - self.title_lineedit = QtWidgets.QLineEdit(self.label_widget) - self.title_lineedit.setObjectName("title_lineedit") - self.horizontalLayout_3.addWidget(self.title_lineedit) - spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_3.addItem(spacerItem2) - self.label_6 = QtWidgets.QLabel(self.label_widget) - self.label_6.setObjectName("label_6") - self.horizontalLayout_3.addWidget(self.label_6) - self.xaxis_linedit = QtWidgets.QLineEdit(self.label_widget) - self.xaxis_linedit.setObjectName("xaxis_linedit") - self.horizontalLayout_3.addWidget(self.xaxis_linedit) - spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_3.addItem(spacerItem3) - self.label_7 = QtWidgets.QLabel(self.label_widget) - self.label_7.setObjectName("label_7") - self.horizontalLayout_3.addWidget(self.label_7) - self.yaxis_linedit = QtWidgets.QLineEdit(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(GraphWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) - self.listWidget.setObjectName("listWidget") - self.gridLayout.addWidget(self.listWidget, 1, 1, 1, 1) - self.checkBox = QtWidgets.QCheckBox(GraphWindow) - self.checkBox.setChecked(True) - self.checkBox.setObjectName("checkBox") - self.gridLayout.addWidget(self.checkBox, 0, 1, 1, 1) - self.graphic = NMRPlotWidget(GraphWindow) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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 deleted file mode 100644 index 10df080..0000000 --- a/src/gui_qt/_py/guidelinewidget.py +++ /dev/null @@ -1,186 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file '/autohome/dominik/nmreval/src/resources/_ui/guidelinewidget.ui' -# -# Created by: PyQt5 UI code generator 5.15.4 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Form) - self.graph_comboBox.setObjectName("graph_comboBox") - self.verticalLayout_2.addWidget(self.graph_comboBox) - self.listWidget_2 = QtWidgets.QListWidget(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(Form) - self.pushButton.setObjectName("pushButton") - self.horizontalLayout.addWidget(self.pushButton) - self.pushButton_2 = QtWidgets.QPushButton(Form) - self.pushButton_2.setObjectName("pushButton_2") - self.horizontalLayout.addWidget(self.pushButton_2) - self.pushButton_3 = QtWidgets.QPushButton(Form) - self.pushButton_3.setObjectName("pushButton_3") - self.horizontalLayout.addWidget(self.pushButton_3) - self.verticalLayout_2.addLayout(self.horizontalLayout) - self.frame = QtWidgets.QFrame(Form) - self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) - self.frame.setFrameShadow(QtWidgets.QFrame.Raised) - self.frame.setObjectName("frame") - self.formLayout = QtWidgets.QFormLayout(self.frame) - self.formLayout.setObjectName("formLayout") - self.mode_comboBox = QtWidgets.QComboBox(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.FieldRole, self.mode_comboBox) - self.label_12 = QtWidgets.QLabel(self.frame) - self.label_12.setObjectName("label_12") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_12) - self.label_6 = QtWidgets.QLabel(self.frame) - self.label_6.setObjectName("label_6") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_6) - self.comment_lineEdit = QtWidgets.QLineEdit(self.frame) - self.comment_lineEdit.setObjectName("comment_lineEdit") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.comment_lineEdit) - self.label_2 = QtWidgets.QLabel(self.frame) - self.label_2.setObjectName("label_2") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2) - self.color_comboBox = ColorListEditor(self.frame) - self.color_comboBox.setObjectName("color_comboBox") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.color_comboBox) - self.stackedWidget = QtWidgets.QStackedWidget(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(self.page) - self.label_13.setObjectName("label_13") - self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_13) - self.lineEdit_8 = QtWidgets.QLineEdit(self.page) - self.lineEdit_8.setObjectName("lineEdit_8") - self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit_8) - self.label = QtWidgets.QLabel(self.page) - self.label.setObjectName("label") - self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label) - self.infiniteline_angle_spinbox = QtWidgets.QSpinBox(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.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(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(self.page_3) - self.label_5.setObjectName("label_5") - self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_5) - self.lineEdit = QtWidgets.QLineEdit(self.page_3) - self.lineEdit.setObjectName("lineEdit") - self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit) - self.label_3 = QtWidgets.QLabel(self.page_3) - self.label_3.setObjectName("label_3") - self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_3) - self.lineEdit_2 = QtWidgets.QLineEdit(self.page_3) - self.lineEdit_2.setObjectName("lineEdit_2") - self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lineEdit_2) - self.label_9 = QtWidgets.QLabel(self.page_3) - self.label_9.setObjectName("label_9") - self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_9) - self.lineEdit_3 = QtWidgets.QLineEdit(self.page_3) - self.lineEdit_3.setObjectName("lineEdit_3") - self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_3) - self.label_4 = QtWidgets.QLabel(self.page_3) - self.label_4.setObjectName("label_4") - self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4) - self.spinBox = QtWidgets.QSpinBox(self.page_3) - self.spinBox.setObjectName("spinBox") - self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.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(self.page_4) - self.label_7.setObjectName("label_7") - self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_7) - self.lineEdit_4 = QtWidgets.QLineEdit(self.page_4) - self.lineEdit_4.setObjectName("lineEdit_4") - self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit_4) - self.label_8 = QtWidgets.QLabel(self.page_4) - self.label_8.setObjectName("label_8") - self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_8) - self.lineEdit_5 = QtWidgets.QLineEdit(self.page_4) - self.lineEdit_5.setObjectName("lineEdit_5") - self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lineEdit_5) - self.label_10 = QtWidgets.QLabel(self.page_4) - self.label_10.setObjectName("label_10") - self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_10) - self.lineEdit_6 = QtWidgets.QLineEdit(self.page_4) - self.lineEdit_6.setObjectName("lineEdit_6") - self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_6) - self.label_11 = QtWidgets.QLabel(self.page_4) - self.label_11.setObjectName("label_11") - self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_11) - self.lineEdit_7 = QtWidgets.QLineEdit(self.page_4) - self.lineEdit_7.setObjectName("lineEdit_7") - self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.lineEdit_7) - self.stackedWidget.addWidget(self.page_4) - self.formLayout.setWidget(3, QtWidgets.QFormLayout.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 deleted file mode 100644 index adaafcf..0000000 --- a/src/gui_qt/_py/hdftree.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/hdftree.ui' -# -# Created by: PyQt5 UI code generator 5.15.4 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Hdf_Dialog) - self.label_3.setTextFormat(QtCore.Qt.RichText) - self.label_3.setObjectName("label_3") - self.verticalLayout_2.addWidget(self.label_3) - self.splitter = QtWidgets.QSplitter(Hdf_Dialog) - self.splitter.setOrientation(QtCore.Qt.Vertical) - self.splitter.setChildrenCollapsible(False) - self.splitter.setObjectName("splitter") - self.horizontalLayoutWidget = QtWidgets.QWidget(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(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(self.widget) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 0, 0, 1, 1) - self.comboBox_2 = QtWidgets.QComboBox(self.widget) - self.comboBox_2.setObjectName("comboBox_2") - self.gridLayout.addWidget(self.comboBox_2, 1, 1, 1, 1) - self.label_2 = QtWidgets.QLabel(self.widget) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) - self.comboBox = QtWidgets.QComboBox(self.widget) - self.comboBox.setObjectName("comboBox") - self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) - self.verticalLayout.addWidget(self.widget) - self.widget_2 = ExpandableWidget(self.splitter) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(Hdf_Dialog) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout_2.addWidget(self.buttonBox) - - self.retranslateUi(Hdf_Dialog) - self.buttonBox.rejected.connect(Hdf_Dialog.close) - self.buttonBox.accepted.connect(Hdf_Dialog.accept) - 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 deleted file mode 100644 index 0d5e015..0000000 --- a/src/gui_qt/_py/integral_widget.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/integral_widget.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Form) - self.label_2.setObjectName("label_2") - self.verticalLayout.addWidget(self.label_2) - self.set_combobox = QtWidgets.QComboBox(Form) - self.set_combobox.setObjectName("set_combobox") - self.verticalLayout.addWidget(self.set_combobox) - self.treeWidget = QtWidgets.QTreeWidget(Form) - self.treeWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.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(Form) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.pushButton = QtWidgets.QPushButton(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 deleted file mode 100644 index f607cad..0000000 --- a/src/gui_qt/_py/integratederive_dialog.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/integratederive_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Dialog) - self.listWidget.setObjectName("listWidget") - self.verticalLayout.addWidget(self.listWidget) - self.widget = QtWidgets.QWidget(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(self.widget) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.start_lineedit = QtWidgets.QLineEdit(self.widget) - self.start_lineedit.setEnabled(False) - self.start_lineedit.setObjectName("start_lineedit") - self.horizontalLayout.addWidget(self.start_lineedit) - self.stop_lineedit = QtWidgets.QLineEdit(self.widget) - self.stop_lineedit.setEnabled(False) - self.stop_lineedit.setObjectName("stop_lineedit") - self.horizontalLayout.addWidget(self.stop_lineedit) - self.range_checkbox = QtWidgets.QCheckBox(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(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(Dialog) - self.log_checkbox.setObjectName("log_checkbox") - self.verticalLayout.addWidget(self.log_checkbox) - self.freq_box = QtWidgets.QCheckBox(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(Dialog) - self.newgraph_checkbox.setObjectName("newgraph_checkbox") - self.horizontalLayout_2.addWidget(self.newgraph_checkbox) - self.graph_combobox = QtWidgets.QComboBox(Dialog) - self.graph_combobox.setObjectName("graph_combobox") - self.horizontalLayout_2.addWidget(self.graph_combobox) - self.verticalLayout.addLayout(self.horizontalLayout_2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.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 deleted file mode 100644 index c0ef858..0000000 --- a/src/gui_qt/_py/interpol_dialog.py +++ /dev/null @@ -1,167 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file './nmreval/src/resources/_ui/interpol_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(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(self.src_widget) - self.graph_combobox.setObjectName("graph_combobox") - self.horizontalLayout.addWidget(self.graph_combobox) - self.set_combobox = QtWidgets.QComboBox(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(Dialog) - self.label_3.setObjectName("label_3") - self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1) - self.label = QtWidgets.QLabel(Dialog) - self.label.setToolTip("") - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 4, 0, 1, 1) - self.line_2 = QtWidgets.QFrame(Dialog) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout.addWidget(self.line_2, 5, 0, 1, 2) - self.ylog_checkBox = QtWidgets.QCheckBox(Dialog) - self.ylog_checkBox.setObjectName("ylog_checkBox") - self.gridLayout.addWidget(self.ylog_checkBox, 2, 1, 1, 1) - self.interp_comboBox = QtWidgets.QComboBox(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(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 12, 0, 1, 2) - self.line = QtWidgets.QFrame(Dialog) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 3, 0, 1, 2) - self.label_2 = QtWidgets.QLabel(Dialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1) - self.listWidget = QListWidgetSelect(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection) - self.listWidget.setObjectName("listWidget") - self.gridLayout.addWidget(self.listWidget, 1, 0, 1, 2) - self.sampling_widget = QtWidgets.QWidget(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(self.sampling_widget) - self.label_4.setObjectName("label_4") - self.horizontalLayout_2.addWidget(self.label_4) - self.start_lineEdit = QtWidgets.QLineEdit(self.sampling_widget) - self.start_lineEdit.setObjectName("start_lineEdit") - self.horizontalLayout_2.addWidget(self.start_lineEdit) - self.label_5 = QtWidgets.QLabel(self.sampling_widget) - self.label_5.setObjectName("label_5") - self.horizontalLayout_2.addWidget(self.label_5) - self.stop_lineEdit = QtWidgets.QLineEdit(self.sampling_widget) - self.stop_lineEdit.setObjectName("stop_lineEdit") - self.horizontalLayout_2.addWidget(self.stop_lineEdit) - self.label_6 = QtWidgets.QLabel(self.sampling_widget) - self.label_6.setObjectName("label_6") - self.horizontalLayout_2.addWidget(self.label_6) - self.step_lineEdit = QtWidgets.QLineEdit(self.sampling_widget) - self.step_lineEdit.setObjectName("step_lineEdit") - self.horizontalLayout_2.addWidget(self.step_lineEdit) - self.logspace_checkBox = QtWidgets.QCheckBox(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(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(Dialog) - self.line_3.setFrameShape(QtWidgets.QFrame.HLine) - self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_3.setObjectName("line_3") - self.gridLayout.addWidget(self.line_3, 9, 0, 1, 2) - self.dest_combobox = QtWidgets.QComboBox(Dialog) - self.dest_combobox.setObjectName("dest_combobox") - self.gridLayout.addWidget(self.dest_combobox, 10, 1, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout.addItem(spacerItem, 11, 0, 1, 1) - self.label_8 = QtWidgets.QLabel(Dialog) - self.label_8.setObjectName("label_8") - self.gridLayout.addWidget(self.label_8, 10, 0, 1, 1) - self.xlog_checkBox = QtWidgets.QCheckBox(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/lineedit_dialog.py b/src/gui_qt/_py/lineedit_dialog.py deleted file mode 100644 index 5a1bf2c..0000000 --- a/src/gui_qt/_py/lineedit_dialog.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/lineedit_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_LineEdit_Dialog(object): - def setupUi(self, LineEdit_Dialog): - LineEdit_Dialog.setObjectName("LineEdit_Dialog") - LineEdit_Dialog.resize(400, 84) - self.formLayout = QtWidgets.QFormLayout(LineEdit_Dialog) - self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow) - self.formLayout.setObjectName("formLayout") - self.label = QtWidgets.QLabel(LineEdit_Dialog) - self.label.setObjectName("label") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label) - self.new_string = QtWidgets.QLineEdit(LineEdit_Dialog) - self.new_string.setObjectName("new_string") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.new_string) - self.buttonBox = QtWidgets.QDialogButtonBox(LineEdit_Dialog) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.buttonBox) - - self.retranslateUi(LineEdit_Dialog) - self.buttonBox.accepted.connect(LineEdit_Dialog.accept) - self.buttonBox.rejected.connect(LineEdit_Dialog.reject) - QtCore.QMetaObject.connectSlotsByName(LineEdit_Dialog) - - def retranslateUi(self, LineEdit_Dialog): - _translate = QtCore.QCoreApplication.translate - LineEdit_Dialog.setWindowTitle(_translate("LineEdit_Dialog", "Dialog")) - self.label.setText(_translate("LineEdit_Dialog", "Label")) diff --git a/src/gui_qt/_py/mean_form.py b/src/gui_qt/_py/mean_form.py deleted file mode 100644 index f120794..0000000 --- a/src/gui_qt/_py/mean_form.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/mean_form.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(mean_form) - self.label.setAlignment(QtCore.Qt.AlignCenter) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.digit_checkbox = QtWidgets.QCheckBox(mean_form) - self.digit_checkbox.setChecked(True) - self.digit_checkbox.setObjectName("digit_checkbox") - self.horizontalLayout.addWidget(self.digit_checkbox) - self.lineEdit = QtWidgets.QLineEdit(mean_form) - self.lineEdit.setObjectName("lineEdit") - self.horizontalLayout.addWidget(self.lineEdit) - self.data_checkbox = QtWidgets.QCheckBox(mean_form) - self.data_checkbox.setObjectName("data_checkbox") - self.horizontalLayout.addWidget(self.data_checkbox) - self.frame = QtWidgets.QFrame(mean_form) - self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame.setFrameShadow(QtWidgets.QFrame.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(self.frame) - self.graph_combobox.setObjectName("graph_combobox") - self.horizontalLayout_2.addWidget(self.graph_combobox) - self.set_combobox = QtWidgets.QComboBox(self.frame) - self.set_combobox.setSizeAdjustPolicy(QtWidgets.QComboBox.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 deleted file mode 100644 index 9a59fcf..0000000 --- a/src/gui_qt/_py/meandialog.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/meandialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(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(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(calc_means_dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.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(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(calc_means_dialog) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.verticalLayout_2.addWidget(self.line) - self.label = QtWidgets.QLabel(calc_means_dialog) - self.label.setObjectName("label") - self.verticalLayout_2.addWidget(self.label) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(calc_means_dialog) - self.checkBox.setObjectName("checkBox") - self.horizontalLayout_2.addWidget(self.checkBox) - self.graph_combobox = QtWidgets.QComboBox(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(calc_means_dialog) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.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/modelwidget.py b/src/gui_qt/_py/modelwidget.py deleted file mode 100644 index df2c5ac..0000000 --- a/src/gui_qt/_py/modelwidget.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/modelwidget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(188, 44) - self.horizontalLayout = QtWidgets.QHBoxLayout(Form) - self.horizontalLayout.setObjectName("horizontalLayout") - self.label = QtWidgets.QLabel(Form) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.lineEdit = QtWidgets.QLineEdit(Form) - self.lineEdit.setObjectName("lineEdit") - self.horizontalLayout.addWidget(self.lineEdit) - - self.retranslateUi(Form) - QtCore.QMetaObject.connectSlotsByName(Form) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "Form")) - self.label.setText(_translate("Form", "TextLabel")) diff --git a/src/gui_qt/_py/move_dialog.py b/src/gui_qt/_py/move_dialog.py deleted file mode 100644 index 4234ddb..0000000 --- a/src/gui_qt/_py/move_dialog.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/move_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(MoveDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(MoveDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(MoveDialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 6, 0, 1, 2) - self.label_2 = QtWidgets.QLabel(MoveDialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1) - self.line = QtWidgets.QFrame(MoveDialog) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 4, 0, 1, 2) - self.label = QtWidgets.QLabel(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(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(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(MoveDialog) - self.listWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.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/namespace_widget.py b/src/gui_qt/_py/namespace_widget.py deleted file mode 100644 index e0f508b..0000000 --- a/src/gui_qt/_py/namespace_widget.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/namespace_widget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(Form) - self.groups_comboBox.setObjectName("groups_comboBox") - self.gridLayout_2.addWidget(self.groups_comboBox, 0, 0, 1, 1) - self.subgroups_comboBox = QtWidgets.QComboBox(Form) - self.subgroups_comboBox.setObjectName("subgroups_comboBox") - self.gridLayout_2.addWidget(self.subgroups_comboBox, 0, 1, 1, 1) - self.namespace_table = QtWidgets.QTableWidget(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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.NoEditTriggers) - self.namespace_table.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) - self.namespace_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) - self.namespace_table.setTextElideMode(QtCore.Qt.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/option_selection.py b/src/gui_qt/_py/option_selection.py deleted file mode 100644 index 456ec65..0000000 --- a/src/gui_qt/_py/option_selection.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/option_selection.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(400, 182) - self.gridLayout = QtWidgets.QGridLayout(Form) - self.gridLayout.setObjectName("gridLayout") - self.tableWidget = QtWidgets.QTableWidget(Form) - self.tableWidget.setObjectName("tableWidget") - self.tableWidget.setColumnCount(2) - self.tableWidget.setRowCount(0) - item = QtWidgets.QTableWidgetItem() - self.tableWidget.setHorizontalHeaderItem(0, item) - item = QtWidgets.QTableWidgetItem() - self.tableWidget.setHorizontalHeaderItem(1, item) - self.gridLayout.addWidget(self.tableWidget, 1, 1, 1, 1) - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") - self.label_2 = QtWidgets.QLabel(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) - self.label_2.setSizePolicy(sizePolicy) - self.label_2.setObjectName("label_2") - self.verticalLayout.addWidget(self.label_2) - self.lineEdit = QtWidgets.QLineEdit(Form) - self.lineEdit.setObjectName("lineEdit") - self.verticalLayout.addWidget(self.lineEdit) - self.label = QtWidgets.QLabel(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) - self.label.setSizePolicy(sizePolicy) - self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - self.comboBox = QtWidgets.QComboBox(Form) - self.comboBox.setObjectName("comboBox") - self.verticalLayout.addWidget(self.comboBox) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout.addItem(spacerItem) - self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1) - self.pushButton = QtWidgets.QPushButton(Form) - self.pushButton.setObjectName("pushButton") - self.gridLayout.addWidget(self.pushButton, 2, 1, 1, 1) - - self.retranslateUi(Form) - QtCore.QMetaObject.connectSlotsByName(Form) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "Form")) - item = self.tableWidget.horizontalHeaderItem(0) - item.setText(_translate("Form", "Name")) - item = self.tableWidget.horizontalHeaderItem(1) - item.setText(_translate("Form", "Value")) - self.label_2.setText(_translate("Form", "Nice name")) - self.label.setText(_translate("Form", "TextLabel")) - self.pushButton.setText(_translate("Form", "Add option")) diff --git a/src/gui_qt/_py/parameterform.py b/src/gui_qt/_py/parameterform.py deleted file mode 100644 index 5bf7ba2..0000000 --- a/src/gui_qt/_py/parameterform.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/parameterform.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_parameterform(object): - def setupUi(self, parameterform): - parameterform.setObjectName("parameterform") - parameterform.setWindowModality(QtCore.Qt.WindowModal) - parameterform.resize(290, 37) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(parameterform.sizePolicy().hasHeightForWidth()) - parameterform.setSizePolicy(sizePolicy) - parameterform.setAutoFillBackground(True) - self.horizontalLayout = QtWidgets.QHBoxLayout(parameterform) - self.horizontalLayout.setContentsMargins(1, 1, 1, 1) - self.horizontalLayout.setSpacing(2) - self.horizontalLayout.setObjectName("horizontalLayout") - self.line_2 = QtWidgets.QFrame(parameterform) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.horizontalLayout.addWidget(self.line_2) - self.label = QtWidgets.QLabel(parameterform) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(1) - sizePolicy.setVerticalStretch(10) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) - self.label.setSizePolicy(sizePolicy) - self.label.setFrameShape(QtWidgets.QFrame.NoFrame) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - spacerItem = QtWidgets.QSpacerItem(65, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.vals = QtWidgets.QLineEdit(parameterform) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.vals.sizePolicy().hasHeightForWidth()) - self.vals.setSizePolicy(sizePolicy) - self.vals.setObjectName("vals") - self.horizontalLayout.addWidget(self.vals) - self.checkBox = QtWidgets.QCheckBox(parameterform) - self.checkBox.setObjectName("checkBox") - self.horizontalLayout.addWidget(self.checkBox) - - self.retranslateUi(parameterform) - QtCore.QMetaObject.connectSlotsByName(parameterform) - - def retranslateUi(self, parameterform): - _translate = QtCore.QCoreApplication.translate - parameterform.setWindowTitle(_translate("parameterform", "Form")) - self.label.setText(_translate("parameterform", "Name")) - self.vals.setText(_translate("parameterform", "1")) - self.checkBox.setText(_translate("parameterform", "Fix?")) diff --git a/src/gui_qt/_py/phase_corr_dialog.py b/src/gui_qt/_py/phase_corr_dialog.py deleted file mode 100644 index b0f12fe..0000000 --- a/src/gui_qt/_py/phase_corr_dialog.py +++ /dev/null @@ -1,97 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/phase_corr_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_SignalEdit(object): - def setupUi(self, SignalEdit): - SignalEdit.setObjectName("SignalEdit") - SignalEdit.resize(919, 595) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(SignalEdit.sizePolicy().hasHeightForWidth()) - SignalEdit.setSizePolicy(sizePolicy) - self.gridLayout = QtWidgets.QGridLayout(SignalEdit) - self.gridLayout.setContentsMargins(6, 6, 6, 6) - self.gridLayout.setSpacing(3) - self.gridLayout.setObjectName("gridLayout") - self.graphicsView = NMRPlotWidget(SignalEdit) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth()) - self.graphicsView.setSizePolicy(sizePolicy) - self.graphicsView.setObjectName("graphicsView") - self.gridLayout.addWidget(self.graphicsView, 0, 0, 1, 8) - self.pivot_lineedit = QtWidgets.QLineEdit(SignalEdit) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pivot_lineedit.sizePolicy().hasHeightForWidth()) - self.pivot_lineedit.setSizePolicy(sizePolicy) - self.pivot_lineedit.setInputMethodHints(QtCore.Qt.ImhDigitsOnly) - self.pivot_lineedit.setObjectName("pivot_lineedit") - self.gridLayout.addWidget(self.pivot_lineedit, 1, 7, 1, 1) - self.ph0slider = QtWidgets.QDoubleSpinBox(SignalEdit) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.ph0slider.sizePolicy().hasHeightForWidth()) - self.ph0slider.setSizePolicy(sizePolicy) - self.ph0slider.setWrapping(True) - self.ph0slider.setMinimum(-180.0) - self.ph0slider.setMaximum(180.0) - self.ph0slider.setObjectName("ph0slider") - self.gridLayout.addWidget(self.ph0slider, 1, 1, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(SignalEdit) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 2, 1, 1, 7) - self.ph1slider = QtWidgets.QDoubleSpinBox(SignalEdit) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.ph1slider.sizePolicy().hasHeightForWidth()) - self.ph1slider.setSizePolicy(sizePolicy) - self.ph1slider.setWrapping(True) - self.ph1slider.setMinimum(-360.0) - self.ph1slider.setMaximum(360.0) - self.ph1slider.setObjectName("ph1slider") - self.gridLayout.addWidget(self.ph1slider, 1, 4, 1, 1) - self.label_8 = QtWidgets.QLabel(SignalEdit) - self.label_8.setObjectName("label_8") - self.gridLayout.addWidget(self.label_8, 1, 6, 1, 1) - self.label_6 = QtWidgets.QLabel(SignalEdit) - self.label_6.setObjectName("label_6") - self.gridLayout.addWidget(self.label_6, 1, 3, 1, 1) - self.label = QtWidgets.QLabel(SignalEdit) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 1, 0, 1, 1) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem, 1, 2, 1, 1) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem1, 1, 5, 1, 1) - - self.retranslateUi(SignalEdit) - self.buttonBox.accepted.connect(SignalEdit.accept) # type: ignore - self.buttonBox.rejected.connect(SignalEdit.close) # type: ignore - QtCore.QMetaObject.connectSlotsByName(SignalEdit) - - def retranslateUi(self, SignalEdit): - _translate = QtCore.QCoreApplication.translate - SignalEdit.setWindowTitle(_translate("SignalEdit", "Phase correction")) - self.pivot_lineedit.setText(_translate("SignalEdit", "0")) - self.label_8.setText(_translate("SignalEdit", "Pivot")) - self.label_6.setText(_translate("SignalEdit", "Phase 1")) - self.label.setText(_translate("SignalEdit", "Phase 0")) -from ..lib.graph_items import NMRPlotWidget diff --git a/src/gui_qt/_py/plotConfigTemplate.py b/src/gui_qt/_py/plotConfigTemplate.py deleted file mode 100644 index a88d8db..0000000 --- a/src/gui_qt/_py/plotConfigTemplate.py +++ /dev/null @@ -1,179 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/plotConfigTemplate.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(481, 840) - self.averageGroup = QtWidgets.QGroupBox(Form) - self.averageGroup.setGeometry(QtCore.QRect(0, 640, 242, 182)) - self.averageGroup.setCheckable(True) - self.averageGroup.setChecked(False) - self.averageGroup.setObjectName("averageGroup") - self.gridLayout_5 = QtWidgets.QGridLayout(self.averageGroup) - self.gridLayout_5.setContentsMargins(0, 0, 0, 0) - self.gridLayout_5.setSpacing(0) - self.gridLayout_5.setObjectName("gridLayout_5") - self.avgParamList = QtWidgets.QListWidget(self.averageGroup) - self.avgParamList.setObjectName("avgParamList") - self.gridLayout_5.addWidget(self.avgParamList, 0, 0, 1, 1) - self.decimateGroup = QtWidgets.QFrame(Form) - self.decimateGroup.setGeometry(QtCore.QRect(10, 140, 191, 171)) - self.decimateGroup.setObjectName("decimateGroup") - self.gridLayout_4 = QtWidgets.QGridLayout(self.decimateGroup) - self.gridLayout_4.setContentsMargins(0, 0, 0, 0) - self.gridLayout_4.setSpacing(0) - self.gridLayout_4.setObjectName("gridLayout_4") - self.clipToViewCheck = QtWidgets.QCheckBox(self.decimateGroup) - self.clipToViewCheck.setObjectName("clipToViewCheck") - self.gridLayout_4.addWidget(self.clipToViewCheck, 7, 0, 1, 3) - self.maxTracesCheck = QtWidgets.QCheckBox(self.decimateGroup) - self.maxTracesCheck.setObjectName("maxTracesCheck") - self.gridLayout_4.addWidget(self.maxTracesCheck, 8, 0, 1, 2) - self.downsampleCheck = QtWidgets.QCheckBox(self.decimateGroup) - self.downsampleCheck.setObjectName("downsampleCheck") - self.gridLayout_4.addWidget(self.downsampleCheck, 0, 0, 1, 3) - self.peakRadio = QtWidgets.QRadioButton(self.decimateGroup) - self.peakRadio.setChecked(True) - self.peakRadio.setObjectName("peakRadio") - self.gridLayout_4.addWidget(self.peakRadio, 6, 1, 1, 2) - self.maxTracesSpin = QtWidgets.QSpinBox(self.decimateGroup) - self.maxTracesSpin.setObjectName("maxTracesSpin") - self.gridLayout_4.addWidget(self.maxTracesSpin, 8, 2, 1, 1) - self.forgetTracesCheck = QtWidgets.QCheckBox(self.decimateGroup) - self.forgetTracesCheck.setObjectName("forgetTracesCheck") - self.gridLayout_4.addWidget(self.forgetTracesCheck, 9, 0, 1, 3) - self.meanRadio = QtWidgets.QRadioButton(self.decimateGroup) - self.meanRadio.setObjectName("meanRadio") - self.gridLayout_4.addWidget(self.meanRadio, 3, 1, 1, 2) - self.subsampleRadio = QtWidgets.QRadioButton(self.decimateGroup) - self.subsampleRadio.setObjectName("subsampleRadio") - self.gridLayout_4.addWidget(self.subsampleRadio, 2, 1, 1, 2) - self.autoDownsampleCheck = QtWidgets.QCheckBox(self.decimateGroup) - self.autoDownsampleCheck.setChecked(True) - self.autoDownsampleCheck.setObjectName("autoDownsampleCheck") - self.gridLayout_4.addWidget(self.autoDownsampleCheck, 1, 2, 1, 1) - spacerItem = QtWidgets.QSpacerItem(30, 20, QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_4.addItem(spacerItem, 2, 0, 1, 1) - self.downsampleSpin = QtWidgets.QSpinBox(self.decimateGroup) - self.downsampleSpin.setMinimum(1) - self.downsampleSpin.setMaximum(100000) - self.downsampleSpin.setProperty("value", 1) - self.downsampleSpin.setObjectName("downsampleSpin") - self.gridLayout_4.addWidget(self.downsampleSpin, 1, 1, 1, 1) - self.transformGroup = QtWidgets.QFrame(Form) - self.transformGroup.setGeometry(QtCore.QRect(10, 10, 171, 101)) - self.transformGroup.setObjectName("transformGroup") - self.gridLayout = QtWidgets.QGridLayout(self.transformGroup) - self.gridLayout.setContentsMargins(0, 0, 0, 0) - self.gridLayout.setSpacing(0) - self.gridLayout.setObjectName("gridLayout") - self.logYCheck = QtWidgets.QCheckBox(self.transformGroup) - self.logYCheck.setObjectName("logYCheck") - self.gridLayout.addWidget(self.logYCheck, 2, 0, 1, 1) - self.logXCheck = QtWidgets.QCheckBox(self.transformGroup) - self.logXCheck.setObjectName("logXCheck") - self.gridLayout.addWidget(self.logXCheck, 1, 0, 1, 1) - self.fftCheck = QtWidgets.QCheckBox(self.transformGroup) - self.fftCheck.setObjectName("fftCheck") - self.gridLayout.addWidget(self.fftCheck, 0, 0, 1, 1) - self.derivativeCheck = QtWidgets.QCheckBox(self.transformGroup) - self.derivativeCheck.setObjectName("derivativeCheck") - self.gridLayout.addWidget(self.derivativeCheck, 3, 0, 1, 1) - self.phasemapCheck = QtWidgets.QCheckBox(self.transformGroup) - self.phasemapCheck.setObjectName("phasemapCheck") - self.gridLayout.addWidget(self.phasemapCheck, 4, 0, 1, 1) - self.pointsGroup = QtWidgets.QGroupBox(Form) - self.pointsGroup.setGeometry(QtCore.QRect(10, 550, 234, 58)) - self.pointsGroup.setCheckable(True) - self.pointsGroup.setObjectName("pointsGroup") - self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.pointsGroup) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.autoPointsCheck = QtWidgets.QCheckBox(self.pointsGroup) - self.autoPointsCheck.setChecked(True) - self.autoPointsCheck.setObjectName("autoPointsCheck") - self.verticalLayout_5.addWidget(self.autoPointsCheck) - self.gridGroup = QtWidgets.QFrame(Form) - self.gridGroup.setGeometry(QtCore.QRect(10, 460, 221, 81)) - self.gridGroup.setObjectName("gridGroup") - self.gridLayout_2 = QtWidgets.QGridLayout(self.gridGroup) - self.gridLayout_2.setObjectName("gridLayout_2") - self.xGridCheck = QtWidgets.QCheckBox(self.gridGroup) - self.xGridCheck.setObjectName("xGridCheck") - self.gridLayout_2.addWidget(self.xGridCheck, 0, 0, 1, 2) - self.yGridCheck = QtWidgets.QCheckBox(self.gridGroup) - self.yGridCheck.setObjectName("yGridCheck") - self.gridLayout_2.addWidget(self.yGridCheck, 1, 0, 1, 2) - self.gridAlphaSlider = QtWidgets.QSlider(self.gridGroup) - self.gridAlphaSlider.setMaximum(255) - self.gridAlphaSlider.setProperty("value", 128) - self.gridAlphaSlider.setOrientation(QtCore.Qt.Horizontal) - self.gridAlphaSlider.setObjectName("gridAlphaSlider") - self.gridLayout_2.addWidget(self.gridAlphaSlider, 2, 1, 1, 1) - self.label = QtWidgets.QLabel(self.gridGroup) - self.label.setObjectName("label") - self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1) - self.alphaGroup = QtWidgets.QGroupBox(Form) - self.alphaGroup.setGeometry(QtCore.QRect(10, 390, 234, 60)) - self.alphaGroup.setCheckable(True) - self.alphaGroup.setObjectName("alphaGroup") - self.horizontalLayout = QtWidgets.QHBoxLayout(self.alphaGroup) - self.horizontalLayout.setObjectName("horizontalLayout") - self.autoAlphaCheck = QtWidgets.QCheckBox(self.alphaGroup) - self.autoAlphaCheck.setChecked(False) - self.autoAlphaCheck.setObjectName("autoAlphaCheck") - self.horizontalLayout.addWidget(self.autoAlphaCheck) - self.alphaSlider = QtWidgets.QSlider(self.alphaGroup) - self.alphaSlider.setMaximum(1000) - self.alphaSlider.setProperty("value", 1000) - self.alphaSlider.setOrientation(QtCore.Qt.Horizontal) - self.alphaSlider.setObjectName("alphaSlider") - self.horizontalLayout.addWidget(self.alphaSlider) - - self.retranslateUi(Form) - QtCore.QMetaObject.connectSlotsByName(Form) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "PyQtGraph")) - self.averageGroup.setToolTip(_translate("Form", "Display averages of the curves displayed in this plot. The parameter list allows you to choose parameters to average over (if any are available).")) - self.averageGroup.setTitle(_translate("Form", "Average")) - self.clipToViewCheck.setToolTip(_translate("Form", "Plot only the portion of each curve that is visible. This assumes X values are uniformly spaced.")) - self.clipToViewCheck.setText(_translate("Form", "Clip to View")) - self.maxTracesCheck.setToolTip(_translate("Form", "If multiple curves are displayed in this plot, check this box to limit the number of traces that are displayed.")) - self.maxTracesCheck.setText(_translate("Form", "Max Traces:")) - self.downsampleCheck.setText(_translate("Form", "Downsample")) - self.peakRadio.setToolTip(_translate("Form", "Downsample by drawing a saw wave that follows the min and max of the original data. This method produces the best visual representation of the data but is slower.")) - self.peakRadio.setText(_translate("Form", "Peak")) - self.maxTracesSpin.setToolTip(_translate("Form", "If multiple curves are displayed in this plot, check \"Max Traces\" and set this value to limit the number of traces that are displayed.")) - self.forgetTracesCheck.setToolTip(_translate("Form", "If MaxTraces is checked, remove curves from memory after they are hidden (saves memory, but traces can not be un-hidden).")) - self.forgetTracesCheck.setText(_translate("Form", "Forget hidden traces")) - self.meanRadio.setToolTip(_translate("Form", "Downsample by taking the mean of N samples.")) - self.meanRadio.setText(_translate("Form", "Mean")) - self.subsampleRadio.setToolTip(_translate("Form", "Downsample by taking the first of N samples. This method is fastest and least accurate.")) - self.subsampleRadio.setText(_translate("Form", "Subsample")) - self.autoDownsampleCheck.setToolTip(_translate("Form", "Automatically downsample data based on the visible range. This assumes X values are uniformly spaced.")) - self.autoDownsampleCheck.setText(_translate("Form", "Auto")) - self.downsampleSpin.setToolTip(_translate("Form", "Downsample data before plotting. (plot every Nth sample)")) - self.downsampleSpin.setSuffix(_translate("Form", "x")) - self.logYCheck.setText(_translate("Form", "Log Y")) - self.logXCheck.setText(_translate("Form", "Log X")) - self.fftCheck.setText(_translate("Form", "Power Spectrum (FFT)")) - self.derivativeCheck.setText(_translate("Form", "dy/dx")) - self.phasemapCheck.setText(_translate("Form", "Y vs. Y\'")) - self.pointsGroup.setTitle(_translate("Form", "Points")) - self.autoPointsCheck.setText(_translate("Form", "Auto")) - self.xGridCheck.setText(_translate("Form", "Show X Grid")) - self.yGridCheck.setText(_translate("Form", "Show Y Grid")) - self.label.setText(_translate("Form", "Opacity")) - self.alphaGroup.setTitle(_translate("Form", "Alpha")) - self.autoAlphaCheck.setText(_translate("Form", "Auto")) diff --git a/src/gui_qt/_py/pokeentry.py b/src/gui_qt/_py/pokeentry.py deleted file mode 100644 index f12e3d9..0000000 --- a/src/gui_qt/_py/pokeentry.py +++ /dev/null @@ -1,260 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file './nmreval/src/resources/_ui/pokeentry.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Form) - self.artwork_label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.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(Form) - self.label.setObjectName("label") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label) - self.nationaldex_label = QtWidgets.QLabel(Form) - self.nationaldex_label.setObjectName("nationaldex_label") - self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.nationaldex_label) - self.label_1 = QtWidgets.QLabel(Form) - self.label_1.setObjectName("label_1") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_1) - self.species_label = QtWidgets.QLabel(Form) - self.species_label.setObjectName("species_label") - self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.species_label) - self.label_4 = QtWidgets.QLabel(Form) - self.label_4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.label_4.setObjectName("label_4") - self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_4) - self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.type1_label = QtWidgets.QLabel(Form) - self.type1_label.setObjectName("type1_label") - self.verticalLayout_2.addWidget(self.type1_label) - self.type2_label = QtWidgets.QLabel(Form) - self.type2_label.setObjectName("type2_label") - self.verticalLayout_2.addWidget(self.type2_label) - self.formLayout.setLayout(2, QtWidgets.QFormLayout.FieldRole, self.verticalLayout_2) - self.label_5 = QtWidgets.QLabel(Form) - self.label_5.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.label_5.setObjectName("label_5") - self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_5) - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") - self.ability1_label = QtWidgets.QLabel(Form) - self.ability1_label.setObjectName("ability1_label") - self.verticalLayout.addWidget(self.ability1_label) - self.ability2_label = QtWidgets.QLabel(Form) - self.ability2_label.setObjectName("ability2_label") - self.verticalLayout.addWidget(self.ability2_label) - self.ability3_label = QtWidgets.QLabel(Form) - self.ability3_label.setObjectName("ability3_label") - self.verticalLayout.addWidget(self.ability3_label) - self.formLayout.setLayout(3, QtWidgets.QFormLayout.FieldRole, self.verticalLayout) - self.label_2 = QtWidgets.QLabel(Form) - self.label_2.setObjectName("label_2") - self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_2) - self.height_label = QtWidgets.QLabel(Form) - self.height_label.setObjectName("height_label") - self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.height_label) - self.label_3 = QtWidgets.QLabel(Form) - self.label_3.setObjectName("label_3") - self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_3) - self.weight_label = QtWidgets.QLabel(Form) - self.weight_label.setObjectName("weight_label") - self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.weight_label) - self.gender_label = QtWidgets.QLabel(Form) - self.gender_label.setObjectName("gender_label") - self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.gender_label) - self.verticalLayout_4.addLayout(self.formLayout) - self.groupBox = QtWidgets.QGroupBox(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(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(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(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(self.groupBox) - self.label_6.setFrameShadow(QtWidgets.QFrame.Plain) - self.label_6.setObjectName("label_6") - self.gridLayout_4.addWidget(self.label_6, 0, 0, 1, 1) - self.hp_bar = QtWidgets.QProgressBar(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(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(self.groupBox) - self.label_11.setObjectName("label_11") - self.gridLayout_4.addWidget(self.label_11, 2, 2, 1, 1) - self.label_10 = QtWidgets.QLabel(self.groupBox) - self.label_10.setObjectName("label_10") - self.gridLayout_4.addWidget(self.label_10, 1, 2, 1, 1) - self.defense_bar = QtWidgets.QProgressBar(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(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(self.groupBox) - self.label_7.setObjectName("label_7") - self.gridLayout_4.addWidget(self.label_7, 1, 0, 1, 1) - self.label_9 = QtWidgets.QLabel(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(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(self.groupBox_2) - self.tableWidget.setStyleSheet("background-color: transparent;") - self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.tableWidget.setShowGrid(False) - self.tableWidget.setGridStyle(QtCore.Qt.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.Minimum, QtWidgets.QSizePolicy.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 deleted file mode 100644 index 2cca68b..0000000 --- a/src/gui_qt/_py/pokewindow.py +++ /dev/null @@ -1,131 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file './nmreval/src/resources/_ui/pokewindow.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Dialog) - self.pushButton.setObjectName("pushButton") - self.gridLayout.addWidget(self.pushButton, 0, 2, 1, 1) - self.comboBox_2 = QtWidgets.QComboBox(Dialog) - self.comboBox_2.setObjectName("comboBox_2") - self.gridLayout.addWidget(self.comboBox_2, 0, 0, 1, 1) - self.comboBox = QtWidgets.QComboBox(Dialog) - self.comboBox.setObjectName("comboBox") - self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem, 0, 4, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth()) - self.buttonBox.setSizePolicy(sizePolicy) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 0, 3, 1, 1) - self.splitter = QtWidgets.QSplitter(Dialog) - self.splitter.setOrientation(QtCore.Qt.Horizontal) - self.splitter.setObjectName("splitter") - self.tableWidget_2 = QtWidgets.QTableWidget(self.splitter) - self.tableWidget_2.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.tableWidget_2.setAlternatingRowColors(True) - self.tableWidget_2.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) - self.tableWidget_2.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) - self.tableWidget_2.setShowGrid(False) - self.tableWidget_2.setGridStyle(QtCore.Qt.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(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/propwidget.py b/src/gui_qt/_py/propwidget.py deleted file mode 100644 index a3c4c3b..0000000 --- a/src/gui_qt/_py/propwidget.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/propwidget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(400, 300) - self.verticalLayout = QtWidgets.QVBoxLayout(Form) - self.verticalLayout.setContentsMargins(2, 2, 2, 2) - self.verticalLayout.setSpacing(2) - self.verticalLayout.setObjectName("verticalLayout") - self.tabWidget = QtWidgets.QTabWidget(Form) - self.tabWidget.setObjectName("tabWidget") - self.tabWidgetPage2 = QtWidgets.QWidget() - self.tabWidgetPage2.setObjectName("tabWidgetPage2") - self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tabWidgetPage2) - self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_3.setSpacing(0) - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.tableWidget_2 = QtWidgets.QTableWidget(self.tabWidgetPage2) - self.tableWidget_2.setObjectName("tableWidget_2") - self.tableWidget_2.setColumnCount(0) - self.tableWidget_2.setRowCount(0) - self.verticalLayout_3.addWidget(self.tableWidget_2) - self.tabWidget.addTab(self.tabWidgetPage2, "") - self.tabWidgetPage1 = QtWidgets.QWidget() - self.tabWidgetPage1.setObjectName("tabWidgetPage1") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tabWidgetPage1) - self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.tableWidget = QtWidgets.QTableWidget(self.tabWidgetPage1) - self.tableWidget.setObjectName("tableWidget") - self.tableWidget.setColumnCount(0) - self.tableWidget.setRowCount(0) - self.verticalLayout_2.addWidget(self.tableWidget) - self.tabWidget.addTab(self.tabWidgetPage1, "") - self.verticalLayout.addWidget(self.tabWidget) - - self.retranslateUi(Form) - self.tabWidget.setCurrentIndex(0) - QtCore.QMetaObject.connectSlotsByName(Form) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "Form")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabWidgetPage2), _translate("Form", "General")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabWidgetPage1), _translate("Form", "Symbol")) diff --git a/src/gui_qt/_py/ptstab.py b/src/gui_qt/_py/ptstab.py deleted file mode 100644 index 211722f..0000000 --- a/src/gui_qt/_py/ptstab.py +++ /dev/null @@ -1,136 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file './nmreval/src/resources/_ui/ptstab.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(Form) - self.peaktable.setEditTriggers(QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.EditKeyPressed) - self.peaktable.setObjectName("peaktable") - self.verticalLayout.addWidget(self.peaktable) - self.groupBox = QtWidgets.QGroupBox(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(self.groupBox) - self.left_pt.setMaximum(999) - self.left_pt.setObjectName("left_pt") - self.horizontalLayout.addWidget(self.left_pt) - self.right_pt = QtWidgets.QSpinBox(self.groupBox) - self.right_pt.setMaximum(999) - self.right_pt.setObjectName("right_pt") - self.horizontalLayout.addWidget(self.right_pt) - self.average_combobox = QtWidgets.QComboBox(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(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(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(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(self.groupBox_3) - self.xbutton.setObjectName("xbutton") - self.gridLayout.addWidget(self.xbutton, 0, 0, 1, 1) - self.ybutton = QtWidgets.QCheckBox(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(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(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(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(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/qfiledialog.py b/src/gui_qt/_py/qfiledialog.py deleted file mode 100644 index 52829e2..0000000 --- a/src/gui_qt/_py/qfiledialog.py +++ /dev/null @@ -1,179 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/qfiledialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_QFileDialog(object): - def setupUi(self, QFileDialog): - QFileDialog.setObjectName("QFileDialog") - QFileDialog.resize(521, 316) - QFileDialog.setSizeGripEnabled(True) - self.gridlayout = QtWidgets.QGridLayout(QFileDialog) - self.gridlayout.setObjectName("gridlayout") - self.lookInLabel = QtWidgets.QLabel(QFileDialog) - self.lookInLabel.setObjectName("lookInLabel") - self.gridlayout.addWidget(self.lookInLabel, 0, 0, 1, 1) - self.hboxlayout = QtWidgets.QHBoxLayout() - self.hboxlayout.setObjectName("hboxlayout") - self.lookInCombo = QtWidgets.QComboBox(QFileDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(1) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.lookInCombo.sizePolicy().hasHeightForWidth()) - self.lookInCombo.setSizePolicy(sizePolicy) - self.lookInCombo.setMinimumSize(QtCore.QSize(50, 0)) - self.lookInCombo.setObjectName("lookInCombo") - self.hboxlayout.addWidget(self.lookInCombo) - self.backButton = QtWidgets.QToolButton(QFileDialog) - self.backButton.setObjectName("backButton") - self.hboxlayout.addWidget(self.backButton) - self.forwardButton = QtWidgets.QToolButton(QFileDialog) - self.forwardButton.setObjectName("forwardButton") - self.hboxlayout.addWidget(self.forwardButton) - self.toParentButton = QtWidgets.QToolButton(QFileDialog) - self.toParentButton.setObjectName("toParentButton") - self.hboxlayout.addWidget(self.toParentButton) - self.newFolderButton = QtWidgets.QToolButton(QFileDialog) - self.newFolderButton.setObjectName("newFolderButton") - self.hboxlayout.addWidget(self.newFolderButton) - self.listModeButton = QtWidgets.QToolButton(QFileDialog) - self.listModeButton.setObjectName("listModeButton") - self.hboxlayout.addWidget(self.listModeButton) - self.detailModeButton = QtWidgets.QToolButton(QFileDialog) - self.detailModeButton.setObjectName("detailModeButton") - self.hboxlayout.addWidget(self.detailModeButton) - self.gridlayout.addLayout(self.hboxlayout, 0, 1, 1, 2) - self.splitter = QtWidgets.QSplitter(QFileDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.splitter.sizePolicy().hasHeightForWidth()) - self.splitter.setSizePolicy(sizePolicy) - self.splitter.setOrientation(QtCore.Qt.Horizontal) - self.splitter.setChildrenCollapsible(False) - self.splitter.setObjectName("splitter") - self.sidebar = QtWidgets.QListWidget(self.splitter) - self.sidebar.setObjectName("sidebar") - self.frame = QtWidgets.QFrame(self.splitter) - self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame.setFrameShadow(QtWidgets.QFrame.Raised) - self.frame.setObjectName("frame") - self.vboxlayout = QtWidgets.QVBoxLayout(self.frame) - self.vboxlayout.setContentsMargins(0, 0, 0, 0) - self.vboxlayout.setSpacing(0) - self.vboxlayout.setObjectName("vboxlayout") - self.stackedWidget = QtWidgets.QStackedWidget(self.frame) - self.stackedWidget.setObjectName("stackedWidget") - self.page = QtWidgets.QWidget() - self.page.setObjectName("page") - self.vboxlayout1 = QtWidgets.QVBoxLayout(self.page) - self.vboxlayout1.setContentsMargins(0, 0, 0, 0) - self.vboxlayout1.setSpacing(0) - self.vboxlayout1.setObjectName("vboxlayout1") - self.listView = QtWidgets.QListView(self.page) - self.listView.setObjectName("listView") - self.vboxlayout1.addWidget(self.listView) - self.stackedWidget.addWidget(self.page) - self.page_2 = QtWidgets.QWidget() - self.page_2.setObjectName("page_2") - self.vboxlayout2 = QtWidgets.QVBoxLayout(self.page_2) - self.vboxlayout2.setContentsMargins(0, 0, 0, 0) - self.vboxlayout2.setSpacing(0) - self.vboxlayout2.setObjectName("vboxlayout2") - self.treeView = QtWidgets.QTreeView(self.page_2) - self.treeView.setObjectName("treeView") - self.vboxlayout2.addWidget(self.treeView) - self.stackedWidget.addWidget(self.page_2) - self.vboxlayout.addWidget(self.stackedWidget) - self.gridlayout.addWidget(self.splitter, 1, 0, 1, 3) - self.fileNameLabel = QtWidgets.QLabel(QFileDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.fileNameLabel.sizePolicy().hasHeightForWidth()) - self.fileNameLabel.setSizePolicy(sizePolicy) - self.fileNameLabel.setMinimumSize(QtCore.QSize(0, 0)) - self.fileNameLabel.setObjectName("fileNameLabel") - self.gridlayout.addWidget(self.fileNameLabel, 2, 0, 1, 1) - self.fileNameEdit = QtWidgets.QLineEdit(QFileDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(1) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.fileNameEdit.sizePolicy().hasHeightForWidth()) - self.fileNameEdit.setSizePolicy(sizePolicy) - self.fileNameEdit.setObjectName("fileNameEdit") - self.gridlayout.addWidget(self.fileNameEdit, 2, 1, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(QFileDialog) - self.buttonBox.setOrientation(QtCore.Qt.Vertical) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridlayout.addWidget(self.buttonBox, 2, 2, 2, 1) - self.fileTypeLabel = QtWidgets.QLabel(QFileDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.fileTypeLabel.sizePolicy().hasHeightForWidth()) - self.fileTypeLabel.setSizePolicy(sizePolicy) - self.fileTypeLabel.setObjectName("fileTypeLabel") - self.gridlayout.addWidget(self.fileTypeLabel, 3, 0, 1, 1) - self.fileTypeCombo = QtWidgets.QComboBox(QFileDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.fileTypeCombo.sizePolicy().hasHeightForWidth()) - self.fileTypeCombo.setSizePolicy(sizePolicy) - self.fileTypeCombo.setObjectName("fileTypeCombo") - self.gridlayout.addWidget(self.fileTypeCombo, 3, 1, 1, 1) - - self.retranslateUi(QFileDialog) - self.stackedWidget.setCurrentIndex(0) - QtCore.QMetaObject.connectSlotsByName(QFileDialog) - QFileDialog.setTabOrder(self.lookInCombo, self.backButton) - QFileDialog.setTabOrder(self.backButton, self.forwardButton) - QFileDialog.setTabOrder(self.forwardButton, self.toParentButton) - QFileDialog.setTabOrder(self.toParentButton, self.newFolderButton) - QFileDialog.setTabOrder(self.newFolderButton, self.listModeButton) - QFileDialog.setTabOrder(self.listModeButton, self.detailModeButton) - QFileDialog.setTabOrder(self.detailModeButton, self.sidebar) - QFileDialog.setTabOrder(self.sidebar, self.treeView) - QFileDialog.setTabOrder(self.treeView, self.listView) - QFileDialog.setTabOrder(self.listView, self.fileNameEdit) - QFileDialog.setTabOrder(self.fileNameEdit, self.buttonBox) - QFileDialog.setTabOrder(self.buttonBox, self.fileTypeCombo) - - def retranslateUi(self, QFileDialog): - _translate = QtCore.QCoreApplication.translate - self.lookInLabel.setText(_translate("QFileDialog", "Look in:")) - self.backButton.setToolTip(_translate("QFileDialog", "Back")) - self.backButton.setAccessibleName(_translate("QFileDialog", "Back")) - self.backButton.setAccessibleDescription(_translate("QFileDialog", "Go back")) - self.backButton.setShortcut(_translate("QFileDialog", "Alt+Left")) - self.forwardButton.setToolTip(_translate("QFileDialog", "Forward")) - self.forwardButton.setAccessibleName(_translate("QFileDialog", "Forward")) - self.forwardButton.setAccessibleDescription(_translate("QFileDialog", "Go forward")) - self.forwardButton.setShortcut(_translate("QFileDialog", "Alt+Right")) - self.toParentButton.setToolTip(_translate("QFileDialog", "Parent Directory")) - self.toParentButton.setAccessibleName(_translate("QFileDialog", "Parent Directory")) - self.toParentButton.setAccessibleDescription(_translate("QFileDialog", "Go to the parent directory")) - self.toParentButton.setShortcut(_translate("QFileDialog", "Alt+Up")) - self.newFolderButton.setToolTip(_translate("QFileDialog", "Create New Folder")) - self.newFolderButton.setAccessibleName(_translate("QFileDialog", "Create New Folder")) - self.newFolderButton.setAccessibleDescription(_translate("QFileDialog", "Create a New Folder")) - self.listModeButton.setToolTip(_translate("QFileDialog", "List View")) - self.listModeButton.setAccessibleName(_translate("QFileDialog", "List View")) - self.listModeButton.setAccessibleDescription(_translate("QFileDialog", "Change to list view mode")) - self.detailModeButton.setToolTip(_translate("QFileDialog", "Detail View")) - self.detailModeButton.setAccessibleName(_translate("QFileDialog", "Detail View")) - self.detailModeButton.setAccessibleDescription(_translate("QFileDialog", "Change to detail view mode")) - self.sidebar.setAccessibleName(_translate("QFileDialog", "Sidebar")) - self.sidebar.setAccessibleDescription(_translate("QFileDialog", "List of places and bookmarks")) - self.listView.setAccessibleName(_translate("QFileDialog", "Files")) - self.treeView.setAccessibleName(_translate("QFileDialog", "Files")) - self.fileTypeLabel.setText(_translate("QFileDialog", "Files of type:")) diff --git a/src/gui_qt/_py/save_fit_parameter.py b/src/gui_qt/_py/save_fit_parameter.py deleted file mode 100644 index 4db6c00..0000000 --- a/src/gui_qt/_py/save_fit_parameter.py +++ /dev/null @@ -1,131 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/save_fit_parameter.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(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(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(fitparameter_save_dialog) - self.comment_line.setObjectName("comment_line") - self.gridLayout.addWidget(self.comment_line, 6, 6, 1, 1) - self.prec_spinbox = QtWidgets.QSpinBox(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(fitparameter_save_dialog) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout.addWidget(self.line_2, 4, 0, 1, 7) - self.label_5 = QtWidgets.QLabel(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(fitparameter_save_dialog) - self.col_line.setObjectName("col_line") - self.horizontalLayout.addWidget(self.col_line) - self.usage_button = QtWidgets.QToolButton(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(fitparameter_save_dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.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(fitparameter_save_dialog) - self.label_4.setObjectName("label_4") - self.gridLayout.addWidget(self.label_4, 6, 2, 1, 1) - self.line = QtWidgets.QFrame(fitparameter_save_dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.line.sizePolicy().hasHeightForWidth()) - self.line.setSizePolicy(sizePolicy) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 1, 0, 1, 7) - self.missing_value_line = QtWidgets.QLineEdit(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(fitparameter_save_dialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 6, 4, 1, 1) - self.tableWidget = QtWidgets.QTableWidget(fitparameter_save_dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth()) - self.tableWidget.setSizePolicy(sizePolicy) - self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - self.tableWidget.setDragDropMode(QtWidgets.QAbstractItemView.DragOnly) - self.tableWidget.setAlternatingRowColors(True) - self.tableWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.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(fitparameter_save_dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 7, 0, 1, 7) - self.label = QtWidgets.QLabel(fitparameter_save_dialog) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 6, 0, 1, 1) - self.header_checkBox = QtWidgets.QCheckBox(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) - self.buttonBox.rejected.connect(fitparameter_save_dialog.reject) - 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 deleted file mode 100644 index 25f058a..0000000 --- a/src/gui_qt/_py/save_fitmodel_dialog.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/save_fitmodel_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(SaveDialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(SaveDialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 3, 1, 1, 1) - self.comboBox = QtWidgets.QComboBox(SaveDialog) - self.comboBox.setObjectName("comboBox") - self.gridLayout.addWidget(self.comboBox, 1, 1, 1, 1) - self.label = QtWidgets.QLabel(SaveDialog) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 0, 0, 1, 1) - self.lineEdit = QtWidgets.QLineEdit(SaveDialog) - self.lineEdit.setObjectName("lineEdit") - self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout.addItem(spacerItem, 4, 1, 1, 1) - self.frame = QtWidgets.QFrame(SaveDialog) - self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame.setFrameShadow(QtWidgets.QFrame.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(self.frame) - self.lineEdit_2.setObjectName("lineEdit_2") - self.horizontalLayout.addWidget(self.lineEdit_2) - self.toolButton = QtWidgets.QToolButton(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) - self.buttonBox.rejected.connect(SaveDialog.reject) - 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/save_options.py b/src/gui_qt/_py/save_options.py deleted file mode 100644 index 602a2c8..0000000 --- a/src/gui_qt/_py/save_options.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/save_options.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(400, 58) - self.verticalLayout = QtWidgets.QVBoxLayout(Form) - self.verticalLayout.setObjectName("verticalLayout") - self.label = QtWidgets.QLabel(Form) - self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - self.checkBox = QtWidgets.QCheckBox(Form) - self.checkBox.setObjectName("checkBox") - self.verticalLayout.addWidget(self.checkBox) - - self.retranslateUi(Form) - QtCore.QMetaObject.connectSlotsByName(Form) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "Form")) - self.label.setText(_translate("Form", "Use <label> as placeholder in filename for data label.
")) - self.checkBox.setText(_translate("Form", "Replace spaces with underscore")) diff --git a/src/gui_qt/_py/saveoptions.py b/src/gui_qt/_py/saveoptions.py deleted file mode 100644 index c210a7e..0000000 --- a/src/gui_qt/_py/saveoptions.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/saveoptions.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Frame(object): - def setupUi(self, Frame): - Frame.setObjectName("Frame") - Frame.resize(464, 62) - Frame.setFrameShape(QtWidgets.QFrame.StyledPanel) - Frame.setFrameShadow(QtWidgets.QFrame.Raised) - self.verticalLayout = QtWidgets.QVBoxLayout(Frame) - self.verticalLayout.setObjectName("verticalLayout") - self.label = QtWidgets.QLabel(Frame) - self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - self.line = QtWidgets.QFrame(Frame) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.verticalLayout.addWidget(self.line) - self.checkBox = QtWidgets.QCheckBox(Frame) - self.checkBox.setChecked(True) - self.checkBox.setObjectName("checkBox") - self.verticalLayout.addWidget(self.checkBox) - - self.retranslateUi(Frame) - QtCore.QMetaObject.connectSlotsByName(Frame) - - def retranslateUi(self, Frame): - _translate = QtCore.QCoreApplication.translate - Frame.setWindowTitle(_translate("Frame", "Frame")) - self.label.setText(_translate("Frame", "Use <label> as placeholder in filename. (e.g. t1_<label>.dat)
")) - self.checkBox.setText(_translate("Frame", "Replace spaces with underscore")) diff --git a/src/gui_qt/_py/sdmodelwidget.py b/src/gui_qt/_py/sdmodelwidget.py deleted file mode 100644 index 4f3a9a0..0000000 --- a/src/gui_qt/_py/sdmodelwidget.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/sdmodelwidget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_SDParameter(object): - def setupUi(self, SDParameter): - SDParameter.setObjectName("SDParameter") - SDParameter.setWindowModality(QtCore.Qt.WindowModal) - SDParameter.resize(290, 37) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(SDParameter.sizePolicy().hasHeightForWidth()) - SDParameter.setSizePolicy(sizePolicy) - SDParameter.setAutoFillBackground(True) - self.verticalLayout = QtWidgets.QVBoxLayout(SDParameter) - self.verticalLayout.setContentsMargins(1, 0, 0, 0) - self.verticalLayout.setSpacing(0) - self.verticalLayout.setObjectName("verticalLayout") - self.gridLayout = QtWidgets.QGridLayout() - self.gridLayout.setContentsMargins(6, -1, 0, -1) - self.gridLayout.setSpacing(0) - self.gridLayout.setObjectName("gridLayout") - self.parameter_line = LineEdit(SDParameter) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.parameter_line.sizePolicy().hasHeightForWidth()) - self.parameter_line.setSizePolicy(sizePolicy) - self.parameter_line.setObjectName("parameter_line") - self.gridLayout.addWidget(self.parameter_line, 0, 2, 1, 1) - self.parametername = QtWidgets.QLabel(SDParameter) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(1) - sizePolicy.setVerticalStretch(10) - sizePolicy.setHeightForWidth(self.parametername.sizePolicy().hasHeightForWidth()) - self.parametername.setSizePolicy(sizePolicy) - self.parametername.setFrameShape(QtWidgets.QFrame.NoFrame) - self.parametername.setObjectName("parametername") - self.gridLayout.addWidget(self.parametername, 0, 0, 1, 1) - self.checkBox = QtWidgets.QCheckBox(SDParameter) - self.checkBox.setObjectName("checkBox") - self.gridLayout.addWidget(self.checkBox, 0, 3, 1, 1) - self.line_2 = QtWidgets.QFrame(SDParameter) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout.addWidget(self.line_2, 1, 0, 1, 4) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem, 0, 1, 1, 1) - self.verticalLayout.addLayout(self.gridLayout) - - self.retranslateUi(SDParameter) - QtCore.QMetaObject.connectSlotsByName(SDParameter) - - def retranslateUi(self, SDParameter): - _translate = QtCore.QCoreApplication.translate - SDParameter.setWindowTitle(_translate("SDParameter", "Form")) - self.parameter_line.setText(_translate("SDParameter", "1")) - self.parametername.setText(_translate("SDParameter", "Fitparameter")) - self.checkBox.setText(_translate("SDParameter", "Fix?")) -from nmrevalgui.lib.forms import LineEdit diff --git a/src/gui_qt/_py/selection_widget.py b/src/gui_qt/_py/selection_widget.py deleted file mode 100644 index 45614d4..0000000 --- a/src/gui_qt/_py/selection_widget.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/selection_widget.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_SelectionWidget(object): - def setupUi(self, SelectionWidget): - SelectionWidget.setObjectName("SelectionWidget") - SelectionWidget.resize(367, 43) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(SelectionWidget.sizePolicy().hasHeightForWidth()) - SelectionWidget.setSizePolicy(sizePolicy) - self.horizontalLayout = QtWidgets.QHBoxLayout(SelectionWidget) - self.horizontalLayout.setContentsMargins(0, 0, 0, 0) - self.horizontalLayout.setSpacing(0) - self.horizontalLayout.setObjectName("horizontalLayout") - self.label = QtWidgets.QLabel(SelectionWidget) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.comboBox = QtWidgets.QComboBox(SelectionWidget) - self.comboBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLength) - self.comboBox.setFrame(True) - self.comboBox.setObjectName("comboBox") - self.horizontalLayout.addWidget(self.comboBox) - - self.retranslateUi(SelectionWidget) - QtCore.QMetaObject.connectSlotsByName(SelectionWidget) - - def retranslateUi(self, SelectionWidget): - _translate = QtCore.QCoreApplication.translate - SelectionWidget.setWindowTitle(_translate("SelectionWidget", "Form")) - self.label.setText(_translate("SelectionWidget", "TextLabel")) diff --git a/src/gui_qt/_py/setbyfunction_dialog.py b/src/gui_qt/_py/setbyfunction_dialog.py deleted file mode 100644 index ecd065d..0000000 --- a/src/gui_qt/_py/setbyfunction_dialog.py +++ /dev/null @@ -1,225 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/setbyfunction_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_NewCurveDialog(object): - def setupUi(self, NewCurveDialog): - NewCurveDialog.setObjectName("NewCurveDialog") - NewCurveDialog.resize(648, 578) - self.gridLayout_4 = QtWidgets.QGridLayout(NewCurveDialog) - self.gridLayout_4.setObjectName("gridLayout_4") - self.groupBox_2 = QtWidgets.QGroupBox(NewCurveDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth()) - self.groupBox_2.setSizePolicy(sizePolicy) - self.groupBox_2.setObjectName("groupBox_2") - self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2) - self.gridLayout_2.setContentsMargins(2, 2, 2, 2) - self.gridLayout_2.setSpacing(2) - self.gridLayout_2.setObjectName("gridLayout_2") - self.lineEdit_3 = QtWidgets.QLineEdit(self.groupBox_2) - self.lineEdit_3.setPlaceholderText("") - self.lineEdit_3.setObjectName("lineEdit_3") - self.gridLayout_2.addWidget(self.lineEdit_3, 0, 1, 1, 1) - self.lineEdit_5 = QtWidgets.QLineEdit(self.groupBox_2) - self.lineEdit_5.setObjectName("lineEdit_5") - self.gridLayout_2.addWidget(self.lineEdit_5, 0, 6, 1, 1) - self.label_5 = QtWidgets.QLabel(self.groupBox_2) - self.label_5.setObjectName("label_5") - self.gridLayout_2.addWidget(self.label_5, 0, 3, 1, 1) - self.lineEdit_4 = QtWidgets.QLineEdit(self.groupBox_2) - self.lineEdit_4.setObjectName("lineEdit_4") - self.gridLayout_2.addWidget(self.lineEdit_4, 0, 4, 1, 1) - self.label_4 = QtWidgets.QLabel(self.groupBox_2) - self.label_4.setObjectName("label_4") - self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1) - self.label_6 = QtWidgets.QLabel(self.groupBox_2) - self.label_6.setObjectName("label_6") - self.gridLayout_2.addWidget(self.label_6, 0, 5, 1, 1) - self.checkBox = QtWidgets.QCheckBox(self.groupBox_2) - self.checkBox.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox.setObjectName("checkBox") - self.gridLayout_2.addWidget(self.checkBox, 0, 7, 1, 1) - self.gridLayout_4.addWidget(self.groupBox_2, 0, 0, 1, 1) - self.groupBox = QtWidgets.QGroupBox(NewCurveDialog) - 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.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox) - self.lineEdit_2.setObjectName("lineEdit_2") - self.gridLayout_3.addWidget(self.lineEdit_2, 1, 2, 1, 1) - self.comboBox_6 = QtWidgets.QComboBox(self.groupBox) - self.comboBox_6.setObjectName("comboBox_6") - self.gridLayout_3.addWidget(self.comboBox_6, 2, 0, 1, 1) - self.pushButton = QtWidgets.QPushButton(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth()) - self.pushButton.setSizePolicy(sizePolicy) - self.pushButton.setObjectName("pushButton") - self.gridLayout_3.addWidget(self.pushButton, 4, 0, 1, 1) - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") - self.gridLayout_3.addLayout(self.verticalLayout, 3, 0, 1, 1) - self.comboBox_7 = QtWidgets.QComboBox(self.groupBox) - self.comboBox_7.setObjectName("comboBox_7") - self.gridLayout_3.addWidget(self.comboBox_7, 2, 2, 1, 1) - self.lineEdit = QtWidgets.QLineEdit(self.groupBox) - self.lineEdit.setObjectName("lineEdit") - self.gridLayout_3.addWidget(self.lineEdit, 1, 0, 1, 1) - self.label = QtWidgets.QLabel(self.groupBox) - self.label.setObjectName("label") - self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1) - self.verticalLayout_2 = QtWidgets.QVBoxLayout() - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.gridLayout_3.addLayout(self.verticalLayout_2, 3, 2, 1, 1) - self.label_2 = QtWidgets.QLabel(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) - self.label_2.setSizePolicy(sizePolicy) - self.label_2.setObjectName("label_2") - self.gridLayout_3.addWidget(self.label_2, 0, 2, 1, 1) - self.line_2 = QtWidgets.QFrame(self.groupBox) - self.line_2.setFrameShape(QtWidgets.QFrame.VLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout_3.addWidget(self.line_2, 0, 1, 4, 1) - self.gridLayout_4.addWidget(self.groupBox, 1, 0, 1, 1) - self.groupBox_3 = QtWidgets.QGroupBox(NewCurveDialog) - self.groupBox_3.setObjectName("groupBox_3") - self.gridLayout = QtWidgets.QGridLayout(self.groupBox_3) - self.gridLayout.setContentsMargins(3, 3, 3, 3) - self.gridLayout.setSpacing(2) - self.gridLayout.setObjectName("gridLayout") - self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_3) - self.doubleSpinBox.setDecimals(1) - self.doubleSpinBox.setMaximum(20.0) - self.doubleSpinBox.setSingleStep(0.5) - self.doubleSpinBox.setProperty("value", 1.0) - self.doubleSpinBox.setObjectName("doubleSpinBox") - self.gridLayout.addWidget(self.doubleSpinBox, 3, 4, 1, 1) - self.line = QtWidgets.QFrame(self.groupBox_3) - self.line.setFrameShape(QtWidgets.QFrame.VLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 0, 2, 4, 1) - self.spinBox = QtWidgets.QSpinBox(self.groupBox_3) - self.spinBox.setMaximum(100) - self.spinBox.setProperty("value", 10) - self.spinBox.setObjectName("spinBox") - self.gridLayout.addWidget(self.spinBox, 3, 1, 1, 1) - self.label_8 = QtWidgets.QLabel(self.groupBox_3) - self.label_8.setObjectName("label_8") - self.gridLayout.addWidget(self.label_8, 0, 4, 1, 1) - self.comboBox = SymbolStyleEditor(self.groupBox_3) - self.comboBox.setObjectName("comboBox") - self.gridLayout.addWidget(self.comboBox, 1, 1, 1, 1) - self.comboBox_2 = LineStyleEditor(self.groupBox_3) - self.comboBox_2.setObjectName("comboBox_2") - self.gridLayout.addWidget(self.comboBox_2, 1, 4, 1, 1) - self.label_7 = QtWidgets.QLabel(self.groupBox_3) - self.label_7.setObjectName("label_7") - self.gridLayout.addWidget(self.label_7, 0, 1, 1, 1) - self.comboBox_4 = ColorListEditor(self.groupBox_3) - self.comboBox_4.setObjectName("comboBox_4") - self.gridLayout.addWidget(self.comboBox_4, 2, 4, 1, 1) - self.comboBox_5 = ColorListEditor(self.groupBox_3) - self.comboBox_5.setObjectName("comboBox_5") - self.gridLayout.addWidget(self.comboBox_5, 2, 1, 1, 1) - self.gridLayout_4.addWidget(self.groupBox_3, 2, 0, 1, 1) - self.groupBox_21 = QtWidgets.QGroupBox(NewCurveDialog) - self.groupBox_21.setObjectName("groupBox_21") - self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_21) - self.gridLayout_5.setObjectName("gridLayout_5") - self.label_3 = QtWidgets.QLabel(self.groupBox_21) - self.label_3.setObjectName("label_3") - self.gridLayout_5.addWidget(self.label_3, 0, 0, 1, 1) - self.lineEdit_6 = QtWidgets.QLineEdit(self.groupBox_21) - self.lineEdit_6.setObjectName("lineEdit_6") - self.gridLayout_5.addWidget(self.lineEdit_6, 0, 1, 1, 1) - self.label_10 = QtWidgets.QLabel(self.groupBox_21) - self.label_10.setObjectName("label_10") - self.gridLayout_5.addWidget(self.label_10, 0, 2, 1, 1) - self.comboBox_3 = QtWidgets.QComboBox(self.groupBox_21) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_3.sizePolicy().hasHeightForWidth()) - self.comboBox_3.setSizePolicy(sizePolicy) - self.comboBox_3.setObjectName("comboBox_3") - self.gridLayout_5.addWidget(self.comboBox_3, 0, 3, 1, 1) - self.gridLayout_4.addWidget(self.groupBox_21, 3, 0, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(NewCurveDialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout_4.addWidget(self.buttonBox, 5, 0, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_4.addItem(spacerItem, 4, 0, 1, 1) - self.label_5.setBuddy(self.lineEdit_4) - self.label_4.setBuddy(self.lineEdit_3) - self.label_6.setBuddy(self.lineEdit_5) - self.label.setBuddy(self.lineEdit) - self.label_2.setBuddy(self.lineEdit_2) - self.label_8.setBuddy(self.comboBox_2) - self.label_7.setBuddy(self.comboBox) - self.label_3.setBuddy(self.lineEdit_6) - self.label_10.setBuddy(self.comboBox_3) - - self.retranslateUi(NewCurveDialog) - self.comboBox.setCurrentIndex(-1) - self.comboBox_2.setCurrentIndex(-1) - self.buttonBox.accepted.connect(NewCurveDialog.accept) - self.buttonBox.rejected.connect(NewCurveDialog.reject) - QtCore.QMetaObject.connectSlotsByName(NewCurveDialog) - NewCurveDialog.setTabOrder(self.lineEdit_3, self.lineEdit_4) - NewCurveDialog.setTabOrder(self.lineEdit_4, self.lineEdit_5) - NewCurveDialog.setTabOrder(self.lineEdit_5, self.checkBox) - NewCurveDialog.setTabOrder(self.checkBox, self.lineEdit) - NewCurveDialog.setTabOrder(self.lineEdit, self.comboBox) - NewCurveDialog.setTabOrder(self.comboBox, self.spinBox) - NewCurveDialog.setTabOrder(self.spinBox, self.comboBox_2) - NewCurveDialog.setTabOrder(self.comboBox_2, self.doubleSpinBox) - NewCurveDialog.setTabOrder(self.doubleSpinBox, self.lineEdit_6) - NewCurveDialog.setTabOrder(self.lineEdit_6, self.comboBox_3) - NewCurveDialog.setTabOrder(self.comboBox_3, self.buttonBox) - - def retranslateUi(self, NewCurveDialog): - _translate = QtCore.QCoreApplication.translate - NewCurveDialog.setWindowTitle(_translate("NewCurveDialog", "Create new data by function")) - self.groupBox_2.setTitle(_translate("NewCurveDialog", "Control variable i")) - self.lineEdit_3.setText(_translate("NewCurveDialog", "0")) - self.lineEdit_5.setText(_translate("NewCurveDialog", "10")) - self.label_5.setText(_translate("NewCurveDialog", "Stop at")) - self.lineEdit_4.setText(_translate("NewCurveDialog", "1")) - self.label_4.setText(_translate("NewCurveDialog", "Start at")) - self.label_6.setText(_translate("NewCurveDialog", "# points")) - self.checkBox.setText(_translate("NewCurveDialog", "Logarithmic?")) - self.groupBox.setTitle(_translate("NewCurveDialog", "Expressions")) - self.lineEdit_2.setText(_translate("NewCurveDialog", "x**2")) - self.pushButton.setText(_translate("NewCurveDialog", "Check")) - self.lineEdit.setText(_translate("NewCurveDialog", "i")) - self.label.setText(_translate("NewCurveDialog", " x = ")) - self.label_2.setText(_translate("NewCurveDialog", " y = ")) - self.groupBox_3.setTitle(_translate("NewCurveDialog", "Look")) - self.label_8.setText(_translate("NewCurveDialog", "Line")) - self.label_7.setText(_translate("NewCurveDialog", "Symbol")) - self.groupBox_21.setTitle(_translate("NewCurveDialog", "Designation")) - self.label_3.setText(_translate("NewCurveDialog", "Name")) - self.label_10.setText(_translate("NewCurveDialog", "Graph")) -from ..lib.delegates import ColorListEditor, LineStyleEditor, SymbolStyleEditor diff --git a/src/gui_qt/_py/shift_scale_dialog.py b/src/gui_qt/_py/shift_scale_dialog.py deleted file mode 100644 index fbb01ed..0000000 --- a/src/gui_qt/_py/shift_scale_dialog.py +++ /dev/null @@ -1,315 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/shift_scale_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(shift_dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.splitter.sizePolicy().hasHeightForWidth()) - self.splitter.setSizePolicy(sizePolicy) - self.splitter.setOrientation(QtCore.Qt.Horizontal) - self.splitter.setObjectName("splitter") - self.tabWidget = QtWidgets.QTabWidget(self.splitter) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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.Preferred, QtWidgets.QSizePolicy.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(self.shift_page) - self.label_7.setObjectName("label_7") - self.gridLayout_2.addWidget(self.label_7, 2, 0, 1, 1) - self.label = QtWidgets.QLabel(self.shift_page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) - self.label.setSizePolicy(sizePolicy) - self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label.setObjectName("label") - self.gridLayout_2.addWidget(self.label, 2, 1, 1, 1) - self.x_shift_spinbox = SciSpinBox(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(self.shift_page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_5.setObjectName("label_5") - self.gridLayout_2.addWidget(self.label_5, 3, 1, 1, 1) - self.y_shift_spinbox = SciSpinBox(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(self.shift_page) - self.shift_table.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) - self.shift_table.setSelectionBehavior(QtWidgets.QAbstractItemView.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.Minimum, QtWidgets.QSizePolicy.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(self.scale_page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_3.setObjectName("label_3") - self.gridLayout.addWidget(self.label_3, 1, 1, 1, 1) - self.x_scale_spinbox = SciSpinBox(self.scale_page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.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(self.scale_page) - self.label_6.setObjectName("label_6") - self.gridLayout.addWidget(self.label_6, 1, 0, 1, 1) - self.label_2 = QtWidgets.QLabel(self.scale_page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 2, 1, 1, 1) - self.y_scale_spinbox = SciSpinBox(self.scale_page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.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(self.scale_page) - self.scale_table.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) - self.scale_table.setSelectionBehavior(QtWidgets.QAbstractItemView.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(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(self.verticalFrame_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.label_4 = QtWidgets.QLabel(self.verticalFrame_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.verticalFrame_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.verticalFrame_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(shift_dialog) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.verticalLayout.addWidget(self.line) - self.frame = QtWidgets.QFrame(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(self.frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(self.frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(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(self.frame) - self.data_combobox.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(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(self.frame) - self.values_combobox.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(shift_dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.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 deleted file mode 100644 index f541dc2..0000000 --- a/src/gui_qt/_py/skipdialog.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/skipdialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(SkipDialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout.addItem(spacerItem, 3, 0, 1, 1) - self.label_4 = QtWidgets.QLabel(SkipDialog) - self.label_4.setObjectName("label_4") - self.gridLayout.addWidget(self.label_4, 0, 0, 1, 4) - self.offset_spinbox = QtWidgets.QSpinBox(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(SkipDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(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(SkipDialog) - self.invert_check.setLayoutDirection(QtCore.Qt.LeftToRight) - self.invert_check.setObjectName("invert_check") - self.gridLayout.addWidget(self.invert_check, 1, 4, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(SkipDialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 4, 0, 1, 5) - self.hide_button = QtWidgets.QRadioButton(SkipDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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(SkipDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.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) - self.buttonBox.rejected.connect(SkipDialog.reject) - 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 deleted file mode 100644 index b560eba..0000000 --- a/src/gui_qt/_py/t1_calc_dialog.py +++ /dev/null @@ -1,318 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/t1_calc_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(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(self.groupBox_2) - self.specdens_combobox.setObjectName("specdens_combobox") - self.verticalLayout_2.addWidget(self.specdens_combobox) - self.specdens_frame = QtWidgets.QFrame(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(self.groupBox_2) - self.coupling_combobox.setObjectName("coupling_combobox") - self.verticalLayout_2.addWidget(self.coupling_combobox) - self.coupling_frame = QtWidgets.QFrame(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(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(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(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(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.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_2.addItem(spacerItem, 3, 0, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout_2.addWidget(self.buttonBox, 4, 0, 1, 1) - self.groupBox = QtWidgets.QGroupBox(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(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(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(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(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(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(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(self.groupBox) - self.label_7.setObjectName("label_7") - self.gridLayout_3.addWidget(self.label_7, 10, 0, 1, 1) - self.line = QtWidgets.QFrame(self.groupBox) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout_3.addWidget(self.line, 9, 0, 1, 2) - self.line_2 = QtWidgets.QFrame(self.groupBox) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout_3.addWidget(self.line_2, 7, 0, 1, 2) - self.range_widget = QtWidgets.QWidget(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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem1, 0, 0, 1, 1) - self.stop_lineEdit = QtWidgets.QLineEdit(self.range_widget) - self.stop_lineEdit.setObjectName("stop_lineEdit") - self.gridLayout.addWidget(self.stop_lineEdit, 0, 3, 1, 1) - self.label_4 = QtWidgets.QLabel(self.range_widget) - self.label_4.setObjectName("label_4") - self.gridLayout.addWidget(self.label_4, 0, 2, 1, 1) - self.spinBox = QtWidgets.QSpinBox(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(self.range_widget) - self.start_lineEdit.setObjectName("start_lineEdit") - self.gridLayout.addWidget(self.start_lineEdit, 0, 1, 1, 1) - self.checkBox = QtWidgets.QCheckBox(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(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(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(self.data_widget) - self.tau_set_combobox.setObjectName("tau_set_combobox") - self.horizontalLayout_2.addWidget(self.tau_set_combobox) - self.label_10 = QtWidgets.QLabel(self.data_widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(self.data_widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(self.data_widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.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(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(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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem2) - self.label = QtWidgets.QLabel(self.arr_widget) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.tau0_lineEdit = QtWidgets.QLineEdit(self.arr_widget) - self.tau0_lineEdit.setObjectName("tau0_lineEdit") - self.horizontalLayout.addWidget(self.tau0_lineEdit) - spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem3) - self.label_2 = QtWidgets.QLabel(self.arr_widget) - self.label_2.setObjectName("label_2") - self.horizontalLayout.addWidget(self.label_2) - self.ea_lineEdit = QtWidgets.QLineEdit(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(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(self.vft_widget) - self.label_3.setObjectName("label_3") - self.horizontalLayout_3.addWidget(self.label_3) - self.tau0_vft_lineEdit = QtWidgets.QLineEdit(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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_3.addItem(spacerItem4) - self.label_5 = QtWidgets.QLabel(self.vft_widget) - self.label_5.setObjectName("label_5") - self.horizontalLayout_3.addWidget(self.label_5) - self.b_vft_lineEdit = QtWidgets.QLineEdit(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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_3.addItem(spacerItem5) - self.label_6 = QtWidgets.QLabel(self.vft_widget) - self.label_6.setObjectName("label_6") - self.horizontalLayout_3.addWidget(self.label_6) - self.t0_vft_lineEdit = QtWidgets.QLineEdit(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(self.temp_widget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(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(self.groupBox) - self.label_8.setObjectName("label_8") - self.gridLayout_3.addWidget(self.label_8, 8, 0, 1, 1) - self.label_9 = QtWidgets.QLabel(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) - self.buttonBox.rejected.connect(Dialog.reject) - 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/t1_dock.py b/src/gui_qt/_py/t1_dock.py deleted file mode 100644 index cc1bdf0..0000000 --- a/src/gui_qt/_py/t1_dock.py +++ /dev/null @@ -1,258 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/t1_dock.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_t1dialog(object): - def setupUi(self, t1dialog): - t1dialog.setObjectName("t1dialog") - t1dialog.resize(295, 771) - self.dockWidgetContents = QtWidgets.QWidget() - self.dockWidgetContents.setObjectName("dockWidgetContents") - self.verticalLayout = QtWidgets.QVBoxLayout(self.dockWidgetContents) - self.verticalLayout.setObjectName("verticalLayout") - self.scrollArea = QtWidgets.QScrollArea(self.dockWidgetContents) - self.scrollArea.setFrameShape(QtWidgets.QFrame.NoFrame) - self.scrollArea.setWidgetResizable(True) - self.scrollArea.setObjectName("scrollArea") - self.scrollAreaWidgetContents = QtWidgets.QWidget() - self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 279, 727)) - self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") - self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents) - self.verticalLayout_7.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_7.setSpacing(0) - self.verticalLayout_7.setObjectName("verticalLayout_7") - self.groupBox_1 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox_1.setObjectName("groupBox_1") - self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_1) - self.gridLayout_3.setVerticalSpacing(0) - self.gridLayout_3.setObjectName("gridLayout_3") - self.comboBox_3 = QtWidgets.QComboBox(self.groupBox_1) - self.comboBox_3.setObjectName("comboBox_3") - self.comboBox_3.addItem("") - self.comboBox_3.addItem("") - self.comboBox_3.addItem("") - self.comboBox_3.addItem("") - self.gridLayout_3.addWidget(self.comboBox_3, 0, 1, 1, 1) - self.label_6 = QtWidgets.QLabel(self.groupBox_1) - self.label_6.setObjectName("label_6") - self.gridLayout_3.addWidget(self.label_6, 0, 0, 1, 1) - self.comboBox_2 = QtWidgets.QComboBox(self.groupBox_1) - self.comboBox_2.setObjectName("comboBox_2") - self.comboBox_2.addItem("") - self.comboBox_2.addItem("") - self.comboBox_2.addItem("") - self.gridLayout_3.addWidget(self.comboBox_2, 1, 1, 1, 1) - self.label_5 = QtWidgets.QLabel(self.groupBox_1) - self.label_5.setObjectName("label_5") - self.gridLayout_3.addWidget(self.label_5, 1, 0, 1, 1) - self.verticalLayout_7.addWidget(self.groupBox_1) - self.groupBox_5 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox_5.setObjectName("groupBox_5") - self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.groupBox_5) - self.verticalLayout_6.setSpacing(0) - self.verticalLayout_6.setObjectName("verticalLayout_6") - self.comboBox_6 = QtWidgets.QComboBox(self.groupBox_5) - self.comboBox_6.setObjectName("comboBox_6") - self.comboBox_6.addItem("") - self.comboBox_6.addItem("") - self.comboBox_6.addItem("") - self.comboBox_6.addItem("") - self.verticalLayout_6.addWidget(self.comboBox_6) - self.frame = QtWidgets.QFrame(self.groupBox_5) - self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame.setFrameShadow(QtWidgets.QFrame.Plain) - self.frame.setObjectName("frame") - self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame) - self.horizontalLayout.setContentsMargins(0, 6, 0, 0) - self.horizontalLayout.setObjectName("horizontalLayout") - self.label_9 = QtWidgets.QLabel(self.frame) - self.label_9.setObjectName("label_9") - self.horizontalLayout.addWidget(self.label_9) - self.lineEdit_2 = QtWidgets.QLineEdit(self.frame) - self.lineEdit_2.setObjectName("lineEdit_2") - self.horizontalLayout.addWidget(self.lineEdit_2) - self.label_10 = QtWidgets.QLabel(self.frame) - self.label_10.setObjectName("label_10") - self.horizontalLayout.addWidget(self.label_10) - self.lineEdit_3 = QtWidgets.QLineEdit(self.frame) - self.lineEdit_3.setObjectName("lineEdit_3") - self.horizontalLayout.addWidget(self.lineEdit_3) - self.checkBox = QtWidgets.QCheckBox(self.frame) - self.checkBox.setObjectName("checkBox") - self.horizontalLayout.addWidget(self.checkBox) - self.verticalLayout_6.addWidget(self.frame) - self.frame_2 = QtWidgets.QFrame(self.groupBox_5) - self.frame_2.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame_2.setFrameShadow(QtWidgets.QFrame.Plain) - self.frame_2.setObjectName("frame_2") - self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.frame_2) - self.horizontalLayout_2.setContentsMargins(0, 6, 0, 0) - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.label_11 = QtWidgets.QLabel(self.frame_2) - self.label_11.setObjectName("label_11") - self.horizontalLayout_2.addWidget(self.label_11) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem) - self.label_13 = QtWidgets.QLabel(self.frame_2) - self.label_13.setObjectName("label_13") - self.horizontalLayout_2.addWidget(self.label_13) - self.label_12 = QtWidgets.QLabel(self.frame_2) - self.label_12.setObjectName("label_12") - self.horizontalLayout_2.addWidget(self.label_12) - self.pushButton_2 = QtWidgets.QPushButton(self.frame_2) - self.pushButton_2.setObjectName("pushButton_2") - self.horizontalLayout_2.addWidget(self.pushButton_2) - self.verticalLayout_6.addWidget(self.frame_2) - self.verticalLayout_7.addWidget(self.groupBox_5) - self.groupBox_2 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox_2.setObjectName("groupBox_2") - self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2) - self.gridLayout.setVerticalSpacing(0) - self.gridLayout.setObjectName("gridLayout") - self.label_3 = QtWidgets.QLabel(self.groupBox_2) - self.label_3.setObjectName("label_3") - self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1) - self.label_2 = QtWidgets.QLabel(self.groupBox_2) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 0, 3, 1, 1) - self.t1_min_edit = QtWidgets.QLineEdit(self.groupBox_2) - self.t1_min_edit.setObjectName("t1_min_edit") - self.gridLayout.addWidget(self.t1_min_edit, 0, 4, 1, 1) - self.label_7 = QtWidgets.QLabel(self.groupBox_2) - self.label_7.setObjectName("label_7") - self.gridLayout.addWidget(self.label_7, 0, 5, 1, 1) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem1, 0, 1, 1, 1) - self.t1_pos_edit = QtWidgets.QLineEdit(self.groupBox_2) - self.t1_pos_edit.setObjectName("t1_pos_edit") - self.gridLayout.addWidget(self.t1_pos_edit, 0, 2, 1, 1) - self.label = QtWidgets.QLabel(self.groupBox_2) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 1, 0, 1, 1) - self.label_8 = QtWidgets.QLabel(self.groupBox_2) - self.label_8.setObjectName("label_8") - self.gridLayout.addWidget(self.label_8, 1, 5, 1, 1) - self.lineEdit = QtWidgets.QLineEdit(self.groupBox_2) - self.lineEdit.setInputMethodHints(QtCore.Qt.ImhDigitsOnly|QtCore.Qt.ImhFormattedNumbersOnly|QtCore.Qt.ImhPreferNumbers) - self.lineEdit.setObjectName("lineEdit") - self.gridLayout.addWidget(self.lineEdit, 1, 4, 1, 1) - self.verticalLayout_7.addWidget(self.groupBox_2) - self.groupBox = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox.setObjectName("groupBox") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.comboBox_4 = QtWidgets.QComboBox(self.groupBox) - self.comboBox_4.setObjectName("comboBox_4") - self.verticalLayout_2.addWidget(self.comboBox_4) - self.verticalLayout_3 = QtWidgets.QVBoxLayout() - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.verticalLayout_2.addLayout(self.verticalLayout_3) - self.label_14 = QtWidgets.QLabel(self.groupBox) - self.label_14.setObjectName("label_14") - self.verticalLayout_2.addWidget(self.label_14) - self.verticalLayout_7.addWidget(self.groupBox) - self.groupBox_4 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox_4.setObjectName("groupBox_4") - self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_4) - self.verticalLayout_5.setSpacing(0) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.comboBox_5 = QtWidgets.QComboBox(self.groupBox_4) - self.comboBox_5.setObjectName("comboBox_5") - self.verticalLayout_5.addWidget(self.comboBox_5) - self.verticalLayout_4 = QtWidgets.QVBoxLayout() - self.verticalLayout_4.setContentsMargins(-1, -1, 0, 0) - self.verticalLayout_4.setObjectName("verticalLayout_4") - self.verticalLayout_5.addLayout(self.verticalLayout_4) - self.verticalLayout_7.addWidget(self.groupBox_4) - self.groupBox_3 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox_3.setObjectName("groupBox_3") - self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3) - self.gridLayout_2.setContentsMargins(-1, 1, -1, -1) - self.gridLayout_2.setObjectName("gridLayout_2") - self.comboBox = QtWidgets.QComboBox(self.groupBox_3) - self.comboBox.setObjectName("comboBox") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.gridLayout_2.addWidget(self.comboBox, 0, 1, 1, 1) - self.label_4 = QtWidgets.QLabel(self.groupBox_3) - self.label_4.setObjectName("label_4") - self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1) - self.checkBox_interpol = QtWidgets.QCheckBox(self.groupBox_3) - self.checkBox_interpol.setObjectName("checkBox_interpol") - self.gridLayout_2.addWidget(self.checkBox_interpol, 1, 1, 1, 1) - self.verticalLayout_7.addWidget(self.groupBox_3) - self.pushButton = QtWidgets.QPushButton(self.scrollAreaWidgetContents) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.pushButton.setFont(font) - self.pushButton.setObjectName("pushButton") - self.verticalLayout_7.addWidget(self.pushButton) - spacerItem2 = QtWidgets.QSpacerItem(17, 423, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_7.addItem(spacerItem2) - self.scrollArea.setWidget(self.scrollAreaWidgetContents) - self.verticalLayout.addWidget(self.scrollArea) - t1dialog.setWidget(self.dockWidgetContents) - - self.retranslateUi(t1dialog) - QtCore.QMetaObject.connectSlotsByName(t1dialog) - - def retranslateUi(self, t1dialog): - _translate = QtCore.QCoreApplication.translate - t1dialog.setWindowTitle(_translate("t1dialog", "Evaluate T1 (temperature)")) - self.groupBox_1.setTitle(_translate("t1dialog", "Axes")) - self.comboBox_3.setItemText(0, _translate("t1dialog", "T1")) - self.comboBox_3.setItemText(1, _translate("t1dialog", "1/T1")) - self.comboBox_3.setItemText(2, _translate("t1dialog", "log10(T1)")) - self.comboBox_3.setItemText(3, _translate("t1dialog", "log10(1/T1)")) - self.label_6.setText(_translate("t1dialog", "Relaxation in")) - self.comboBox_2.setItemText(0, _translate("t1dialog", "T")) - self.comboBox_2.setItemText(1, _translate("t1dialog", "1000/T")) - self.comboBox_2.setItemText(2, _translate("t1dialog", "1/T")) - self.label_5.setText(_translate("t1dialog", "Temperature in")) - self.groupBox_5.setTitle(_translate("t1dialog", "T1 minimon")) - self.comboBox_6.setItemText(0, _translate("t1dialog", "Data minimum")) - self.comboBox_6.setItemText(1, _translate("t1dialog", "Parabola")) - self.comboBox_6.setItemText(2, _translate("t1dialog", "Cubic spline")) - self.comboBox_6.setItemText(3, _translate("t1dialog", "Pchip")) - self.label_9.setText(_translate("t1dialog", "start (K)")) - self.lineEdit_2.setPlaceholderText(_translate("t1dialog", "1")) - self.label_10.setText(_translate("t1dialog", " end (K)")) - self.lineEdit_3.setPlaceholderText(_translate("t1dialog", "2")) - self.checkBox.setText(_translate("t1dialog", "Show?")) - self.label_11.setText(_translate("t1dialog", "Minimon")) - self.label_13.setText(_translate("t1dialog", "x value")) - self.label_12.setText(_translate("t1dialog", "y value")) - self.pushButton_2.setText(_translate("t1dialog", "Use")) - self.groupBox_2.setTitle(_translate("t1dialog", "Parameter")) - self.label_3.setText(_translate("t1dialog", "T1 minimum
")) - self.label_2.setText(_translate("t1dialog", "K")) - self.t1_min_edit.setPlaceholderText(_translate("t1dialog", "1e-3")) - self.label_7.setText(_translate("t1dialog", "s")) - self.t1_pos_edit.setPlaceholderText(_translate("t1dialog", "100")) - self.label.setText(_translate("t1dialog", "frequency")) - self.label_8.setText(_translate("t1dialog", "Hz")) - self.lineEdit.setPlaceholderText(_translate("t1dialog", "100e6")) - self.groupBox.setTitle(_translate("t1dialog", "Spectral density")) - self.label_14.setText(_translate("t1dialog", "Calculated minimum:")) - self.groupBox_4.setTitle(_translate("t1dialog", "Coupling")) - self.groupBox_3.setTitle(_translate("t1dialog", "Result")) - self.comboBox.setStatusTip(_translate("t1dialog", "NOTE: Mean values are not available for all spectral densities. For more information ask someone.")) - self.comboBox.setItemText(0, _translate("t1dialog", "Fit parameter: τ")) - self.comboBox.setItemText(1, _translate("t1dialog", "Peak time: τₚ")) - self.comboBox.setItemText(2, _translate("t1dialog", "Arithmetic mean: ⟨τ⟩")) - self.comboBox.setItemText(3, _translate("t1dialog", "Geometric mean: exp(⟨ln τ⟩)")) - self.label_4.setText(_translate("t1dialog", "Result as")) - self.checkBox_interpol.setText(_translate("t1dialog", "Use interpolation")) - self.pushButton.setText(_translate("t1dialog", "Calculate")) diff --git a/src/gui_qt/_py/t1_tau_calculation.py b/src/gui_qt/_py/t1_tau_calculation.py deleted file mode 100644 index d61945a..0000000 --- a/src/gui_qt/_py/t1_tau_calculation.py +++ /dev/null @@ -1,215 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/t1_tau_calculation.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Form(object): - def setupUi(self, Form): - Form.setObjectName("Form") - Form.resize(400, 799) - self.verticalLayout = QtWidgets.QVBoxLayout(Form) - self.verticalLayout.setObjectName("verticalLayout") - self.groupBox_2 = QtWidgets.QGroupBox(Form) - self.groupBox_2.setObjectName("groupBox_2") - self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2) - self.gridLayout_2.setContentsMargins(3, 3, 3, 3) - self.gridLayout_2.setHorizontalSpacing(3) - self.gridLayout_2.setVerticalSpacing(1) - self.gridLayout_2.setObjectName("gridLayout_2") - self.freq_spinbox = QtWidgets.QDoubleSpinBox(self.groupBox_2) - self.freq_spinbox.setMaximum(999.99) - self.freq_spinbox.setProperty("value", 100.0) - self.freq_spinbox.setObjectName("freq_spinbox") - self.gridLayout_2.addWidget(self.freq_spinbox, 0, 0, 1, 1) - self.freq_combox = QtWidgets.QComboBox(self.groupBox_2) - self.freq_combox.setObjectName("freq_combox") - self.freq_combox.addItem("") - self.freq_combox.addItem("") - self.freq_combox.addItem("") - self.gridLayout_2.addWidget(self.freq_combox, 0, 1, 1, 1) - self.verticalLayout.addWidget(self.groupBox_2) - self.scrollArea = QtWidgets.QScrollArea(Form) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth()) - self.scrollArea.setSizePolicy(sizePolicy) - self.scrollArea.setFrameShape(QtWidgets.QFrame.NoFrame) - self.scrollArea.setFrameShadow(QtWidgets.QFrame.Plain) - self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) - self.scrollArea.setWidgetResizable(True) - self.scrollArea.setObjectName("scrollArea") - self.scrollAreaWidgetContents = QtWidgets.QWidget() - self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 388, 713)) - self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") - self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents) - self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_5.setSpacing(3) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.groupBox_6 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox_6.setObjectName("groupBox_6") - self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.groupBox_6) - self.verticalLayout_7.setContentsMargins(3, 3, 3, 3) - self.verticalLayout_7.setSpacing(1) - self.verticalLayout_7.setObjectName("verticalLayout_7") - self.comboBox_7 = QtWidgets.QComboBox(self.groupBox_6) - self.comboBox_7.setObjectName("comboBox_7") - self.comboBox_7.addItem("") - self.comboBox_7.addItem("") - self.comboBox_7.addItem("") - self.verticalLayout_7.addWidget(self.comboBox_7) - self.arr_frame = QtWidgets.QFrame(self.groupBox_6) - self.arr_frame.setObjectName("arr_frame") - self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.arr_frame) - self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_6.setSpacing(1) - self.verticalLayout_6.setObjectName("verticalLayout_6") - self.verticalLayout_7.addWidget(self.arr_frame) - self.temp_frame = QtWidgets.QFrame(self.groupBox_6) - self.temp_frame.setObjectName("temp_frame") - self.gridLayout = QtWidgets.QGridLayout(self.temp_frame) - self.gridLayout.setContentsMargins(0, 0, 0, 0) - self.gridLayout.setObjectName("gridLayout") - self.lineEdit_3 = QtWidgets.QLineEdit(self.temp_frame) - self.lineEdit_3.setObjectName("lineEdit_3") - self.gridLayout.addWidget(self.lineEdit_3, 0, 1, 1, 1) - self.checkBox = QtWidgets.QCheckBox(self.temp_frame) - self.checkBox.setObjectName("checkBox") - self.gridLayout.addWidget(self.checkBox, 0, 7, 1, 1) - self.label_4 = QtWidgets.QLabel(self.temp_frame) - self.label_4.setObjectName("label_4") - self.gridLayout.addWidget(self.label_4, 0, 2, 1, 1) - self.lineEdit_4 = QtWidgets.QLineEdit(self.temp_frame) - self.lineEdit_4.setObjectName("lineEdit_4") - self.gridLayout.addWidget(self.lineEdit_4, 0, 3, 1, 1) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem, 0, 4, 1, 1) - self.spinBox = QtWidgets.QSpinBox(self.temp_frame) - self.spinBox.setProperty("value", 50) - self.spinBox.setObjectName("spinBox") - self.gridLayout.addWidget(self.spinBox, 0, 5, 1, 1) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem1, 0, 6, 1, 1) - self.verticalLayout_7.addWidget(self.temp_frame) - self.data_frame = QtWidgets.QFrame(self.groupBox_6) - self.data_frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.data_frame.setFrameShadow(QtWidgets.QFrame.Raised) - self.data_frame.setObjectName("data_frame") - self.horizontalLayout = QtWidgets.QHBoxLayout(self.data_frame) - self.horizontalLayout.setContentsMargins(0, 0, 0, 0) - self.horizontalLayout.setSpacing(1) - self.horizontalLayout.setObjectName("horizontalLayout") - self.tau_graph_combobox = QtWidgets.QComboBox(self.data_frame) - self.tau_graph_combobox.setObjectName("tau_graph_combobox") - self.horizontalLayout.addWidget(self.tau_graph_combobox) - self.tau_set_combobox = QtWidgets.QComboBox(self.data_frame) - self.tau_set_combobox.setObjectName("tau_set_combobox") - self.horizontalLayout.addWidget(self.tau_set_combobox) - self.verticalLayout_7.addWidget(self.data_frame) - self.comboBox = QtWidgets.QComboBox(self.groupBox_6) - self.comboBox.setObjectName("comboBox") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.verticalLayout_7.addWidget(self.comboBox) - self.verticalLayout_5.addWidget(self.groupBox_6) - self.groupBox = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - self.groupBox.setObjectName("groupBox") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox) - self.verticalLayout_2.setContentsMargins(3, 3, 3, 3) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.specdens_combobox = QtWidgets.QComboBox(self.groupBox) - self.specdens_combobox.setObjectName("specdens_combobox") - self.verticalLayout_2.addWidget(self.specdens_combobox) - self.specdens_frame = QtWidgets.QFrame(self.groupBox) - 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(self.groupBox) - self.coupling_combobox.setObjectName("coupling_combobox") - self.verticalLayout_2.addWidget(self.coupling_combobox) - self.coupling_frame = QtWidgets.QFrame(self.groupBox) - 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.verticalLayout_5.addWidget(self.groupBox) - self.groupBox_3 = QtWidgets.QGroupBox(self.scrollAreaWidgetContents) - 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.tau_combox = QtWidgets.QComboBox(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, 0, 0, 1, 2) - self.graph_checkbox = QtWidgets.QCheckBox(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.graph_combobox = QtWidgets.QComboBox(self.groupBox_3) - self.graph_combobox.setEnabled(True) - self.graph_combobox.setObjectName("graph_combobox") - self.gridLayout_4.addWidget(self.graph_combobox, 1, 1, 1, 1) - self.verticalLayout_5.addWidget(self.groupBox_3) - self.pushButton = QtWidgets.QPushButton(self.scrollAreaWidgetContents) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.pushButton.setFont(font) - self.pushButton.setObjectName("pushButton") - self.verticalLayout_5.addWidget(self.pushButton) - spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout_5.addItem(spacerItem2) - self.scrollArea.setWidget(self.scrollAreaWidgetContents) - self.verticalLayout.addWidget(self.scrollArea) - - self.retranslateUi(Form) - QtCore.QMetaObject.connectSlotsByName(Form) - - def retranslateUi(self, Form): - _translate = QtCore.QCoreApplication.translate - Form.setWindowTitle(_translate("Form", "Form")) - self.groupBox_2.setTitle(_translate("Form", "Frequency")) - self.freq_combox.setItemText(0, _translate("Form", "MHz")) - self.freq_combox.setItemText(1, _translate("Form", "kHz")) - self.freq_combox.setItemText(2, _translate("Form", "Hz")) - self.groupBox_6.setTitle(_translate("Form", "Correlation times")) - self.comboBox_7.setItemText(0, _translate("Form", "Arrhenius")) - self.comboBox_7.setItemText(1, _translate("Form", "VFT")) - self.comboBox_7.setItemText(2, _translate("Form", "Data")) - self.lineEdit_3.setPlaceholderText(_translate("Form", "1 K")) - self.checkBox.setText(_translate("Form", "1000/T")) - self.label_4.setText(_translate("Form", "–")) - self.lineEdit_4.setPlaceholderText(_translate("Form", "100 K")) - self.spinBox.setSuffix(_translate("Form", " pts.")) - self.comboBox.setItemText(0, _translate("Form", "Fit parameter: τ")) - self.comboBox.setItemText(1, _translate("Form", "Peak time: τₚ")) - self.comboBox.setItemText(2, _translate("Form", "Arithmetic mean: ⟨τ⟩")) - self.comboBox.setItemText(3, _translate("Form", "Geometric mean: exp(⟨ln τ⟩)")) - self.groupBox.setTitle(_translate("Form", "Model")) - self.groupBox_3.setTitle(_translate("Form", "Result")) - self.tau_combox.setStatusTip(_translate("Form", "NOTE: Mean values are not available for all spectral densities. For more information ask someone.")) - self.tau_combox.setItemText(0, _translate("Form", "Fit parameter: τ")) - self.tau_combox.setItemText(1, _translate("Form", "Peak time: τₚ")) - self.tau_combox.setItemText(2, _translate("Form", "Arithmetic mean: ⟨τ⟩")) - self.tau_combox.setItemText(3, _translate("Form", "Geometric mean: exp(⟨ln τ⟩)")) - self.graph_checkbox.setText(_translate("Form", "New graph?")) - self.pushButton.setText(_translate("Form", "Calculate")) diff --git a/src/gui_qt/_py/t1dialog.py b/src/gui_qt/_py/t1dialog.py deleted file mode 100644 index f277459..0000000 --- a/src/gui_qt/_py/t1dialog.py +++ /dev/null @@ -1,230 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/t1dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(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(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(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(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(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(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(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(self.groupBox) - self.specdens_combobox.setObjectName("specdens_combobox") - self.verticalLayout_2.addWidget(self.specdens_combobox) - self.sd_frame = QtWidgets.QFrame(self.groupBox) - self.sd_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) - self.sd_frame.setFrameShadow(QtWidgets.QFrame.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(self.groupBox) - self.coupling_combobox.setObjectName("coupling_combobox") - self.verticalLayout_2.addWidget(self.coupling_combobox) - self.cp_frame = QtWidgets.QFrame(self.groupBox) - self.cp_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) - self.cp_frame.setFrameShadow(QtWidgets.QFrame.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(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(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(self.groupBox_5) - self.frame.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame.setFrameShadow(QtWidgets.QFrame.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(self.frame) - self.label_9.setObjectName("label_9") - self.horizontalLayout.addWidget(self.label_9) - self.lineEdit_2 = QtWidgets.QLineEdit(self.frame) - self.lineEdit_2.setObjectName("lineEdit_2") - self.horizontalLayout.addWidget(self.lineEdit_2) - self.label_10 = QtWidgets.QLabel(self.frame) - self.label_10.setObjectName("label_10") - self.horizontalLayout.addWidget(self.label_10) - self.lineEdit_3 = QtWidgets.QLineEdit(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(self.groupBox_5) - self.frame_2.setFrameShape(QtWidgets.QFrame.NoFrame) - self.frame_2.setFrameShadow(QtWidgets.QFrame.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(self.frame_2) - self.label_11.setObjectName("label_11") - self.horizontalLayout_2.addWidget(self.label_11) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem) - self.label_13 = QtWidgets.QLabel(self.frame_2) - self.label_13.setObjectName("label_13") - self.horizontalLayout_2.addWidget(self.label_13) - self.label_12 = QtWidgets.QLabel(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(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(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(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(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(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(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(self.groupBox_3) - self.label.setObjectName("label") - self.gridLayout_4.addWidget(self.label, 0, 0, 1, 1) - self.label_t1min = QtWidgets.QLabel(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.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_2.addItem(spacerItem1, 6, 0, 1, 1) - self.calc_pushButton = QtWidgets.QPushButton(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 deleted file mode 100644 index f683f18..0000000 --- a/src/gui_qt/_py/tnmh_dialog.py +++ /dev/null @@ -1,253 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/tnmh_dialog.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(DSCEvalDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) - self.listWidget.setObjectName("listWidget") - self.gridLayout.addWidget(self.listWidget, 0, 0, 1, 1) - self.stackedWidget = QtWidgets.QStackedWidget(DSCEvalDialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.stackedWidget.sizePolicy().hasHeightForWidth()) - self.stackedWidget.setSizePolicy(sizePolicy) - self.stackedWidget.setFrameShape(QtWidgets.QFrame.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(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.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_9.addItem(spacerItem, 3, 0, 1, 1) - self.tglines_export_check = QtWidgets.QCheckBox(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(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(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(self.page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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(self.page) - self.label.setObjectName("label") - self.horizontalLayout_4.addWidget(self.label) - self.calctg_button = QtWidgets.QPushButton(self.page) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(self.page_2) - self.label_4.setObjectName("label_4") - self.gridLayout_3.addWidget(self.label_4, 2, 0, 1, 1) - self.tghodge_graph = NMRPlotWidget(self.page_2) - self.tghodge_graph.setObjectName("tghodge_graph") - self.gridLayout_3.addWidget(self.tghodge_graph, 1, 0, 1, 1) - self.tau_plot = NMRPlotWidget(self.page_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.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(self.page_2) - self.label_2.setObjectName("label_2") - self.horizontalLayout_3.addWidget(self.label_2) - self.hodge_button = QtWidgets.QPushButton(self.page_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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(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(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(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(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(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(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(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(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.Expanding, QtWidgets.QSizePolicy.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(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(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(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(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(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(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(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.Minimum, QtWidgets.QSizePolicy.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(self.page_3) - self.label_3.setObjectName("label_3") - self.horizontalLayout_2.addWidget(self.label_3) - self.tnhm_fitbutton = QtWidgets.QPushButton(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.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem3) - self.back_button = QtWidgets.QToolButton(DSCEvalDialog) - self.back_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) - self.back_button.setArrowType(QtCore.Qt.LeftArrow) - self.back_button.setObjectName("back_button") - self.horizontalLayout.addWidget(self.back_button) - self.next_button = QtWidgets.QToolButton(DSCEvalDialog) - self.next_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) - self.next_button.setArrowType(QtCore.Qt.RightArrow) - self.next_button.setObjectName("next_button") - self.horizontalLayout.addWidget(self.next_button) - self.close_button = QtWidgets.QPushButton(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/tntdialog.py b/src/gui_qt/_py/tntdialog.py deleted file mode 100644 index d3754ec..0000000 --- a/src/gui_qt/_py/tntdialog.py +++ /dev/null @@ -1,138 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/tntdialog.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_tntdialog(object): - def setupUi(self, tntdialog): - tntdialog.setObjectName("tntdialog") - tntdialog.resize(373, 482) - self.gridLayout = QtWidgets.QGridLayout(tntdialog) - self.gridLayout.setObjectName("gridLayout") - self.widget_3 = QDelayWidget(tntdialog) - self.widget_3.setObjectName("widget_3") - self.gridLayout.addWidget(self.widget_3, 3, 1, 1, 2) - self.label_3 = QtWidgets.QLabel(tntdialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - 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.gridLayout.addWidget(self.label_3, 0, 2, 1, 1) - self.widget = QDelayWidget(tntdialog) - self.widget.setObjectName("widget") - self.gridLayout.addWidget(self.widget, 1, 1, 1, 2) - self.label_2 = QtWidgets.QLabel(tntdialog) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 0, 1, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout.addItem(spacerItem, 6, 1, 1, 1) - self.widget_2 = QDelayWidget(tntdialog) - self.widget_2.setObjectName("widget_2") - self.gridLayout.addWidget(self.widget_2, 2, 1, 1, 2) - self.buttonBox = QtWidgets.QDialogButtonBox(tntdialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 9, 1, 1, 2) - self.frame = QtWidgets.QFrame(tntdialog) - self.frame.setObjectName("frame") - self.gridLayout_2 = QtWidgets.QGridLayout(self.frame) - self.gridLayout_2.setContentsMargins(0, 0, 0, 0) - self.gridLayout_2.setSpacing(0) - self.gridLayout_2.setObjectName("gridLayout_2") - self.checkBox_2 = QtWidgets.QCheckBox(self.frame) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_2.sizePolicy().hasHeightForWidth()) - self.checkBox_2.setSizePolicy(sizePolicy) - self.checkBox_2.setObjectName("checkBox_2") - self.gridLayout_2.addWidget(self.checkBox_2, 3, 0, 1, 1) - self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.label_5 = QtWidgets.QLabel(self.frame) - self.label_5.setObjectName("label_5") - self.horizontalLayout_2.addWidget(self.label_5) - self.start_lineedit = QtWidgets.QLineEdit(self.frame) - self.start_lineedit.setObjectName("start_lineedit") - self.horizontalLayout_2.addWidget(self.start_lineedit) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem1) - self.label_6 = QtWidgets.QLabel(self.frame) - self.label_6.setObjectName("label_6") - self.horizontalLayout_2.addWidget(self.label_6) - self.end_lineedit = QtWidgets.QLineEdit(self.frame) - self.end_lineedit.setFrame(True) - self.end_lineedit.setObjectName("end_lineedit") - self.horizontalLayout_2.addWidget(self.end_lineedit) - self.gridLayout_2.addLayout(self.horizontalLayout_2, 1, 0, 1, 2) - self.label = QtWidgets.QLabel(self.frame) - self.label.setObjectName("label") - self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) - self.lineEdit = QtWidgets.QLineEdit(self.frame) - self.lineEdit.setObjectName("lineEdit") - self.gridLayout_2.addWidget(self.lineEdit, 0, 1, 1, 1) - self.spinBox = QtWidgets.QSpinBox(self.frame) - self.spinBox.setObjectName("spinBox") - self.gridLayout_2.addWidget(self.spinBox, 3, 1, 1, 1) - self.checkBox = QtWidgets.QCheckBox(self.frame) - self.checkBox.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox.setObjectName("checkBox") - self.gridLayout_2.addWidget(self.checkBox, 4, 0, 1, 1) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setContentsMargins(25, -1, -1, -1) - self.horizontalLayout.setSpacing(0) - self.horizontalLayout.setObjectName("horizontalLayout") - self.pushButton = QtWidgets.QPushButton(self.frame) - self.pushButton.setObjectName("pushButton") - self.horizontalLayout.addWidget(self.pushButton) - self.pushButton_2 = QtWidgets.QPushButton(self.frame) - self.pushButton_2.setObjectName("pushButton_2") - self.horizontalLayout.addWidget(self.pushButton_2) - self.gridLayout_2.addLayout(self.horizontalLayout, 4, 1, 1, 1) - self.gridLayout.addWidget(self.frame, 8, 1, 1, 2) - self.frame_2 = QtWidgets.QFrame(tntdialog) - self.frame_2.setObjectName("frame_2") - self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.frame_2) - self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.label_4 = QtWidgets.QLabel(self.frame_2) - self.label_4.setObjectName("label_4") - self.horizontalLayout_3.addWidget(self.label_4) - self.unknown_delay_combobox = QtWidgets.QComboBox(self.frame_2) - self.unknown_delay_combobox.setObjectName("unknown_delay_combobox") - self.horizontalLayout_3.addWidget(self.unknown_delay_combobox) - self.gridLayout.addWidget(self.frame_2, 4, 1, 1, 2) - - self.retranslateUi(tntdialog) - self.buttonBox.accepted.connect(tntdialog.accept) - self.buttonBox.rejected.connect(tntdialog.reject) - QtCore.QMetaObject.connectSlotsByName(tntdialog) - - def retranslateUi(self, tntdialog): - _translate = QtCore.QCoreApplication.translate - tntdialog.setWindowTitle(_translate("tntdialog", "Read tnt file")) - self.label_3.setText(_translate("tntdialog", "TextLabel")) - self.label_2.setText(_translate("tntdialog", "Dimensions")) - self.checkBox_2.setText(_translate("tntdialog", "Staggered range")) - self.label_5.setText(_translate("tntdialog", "Start")) - self.start_lineedit.setPlaceholderText(_translate("tntdialog", "0")) - self.label_6.setText(_translate("tntdialog", "End")) - self.end_lineedit.setPlaceholderText(_translate("tntdialog", "1")) - self.label.setText(_translate("tntdialog", "Name")) - self.checkBox.setToolTip(_translate("tntdialog", "NOTE: There is no inspection if start and end are valid values.")) - self.checkBox.setText(_translate("tntdialog", "Logarithmic scale")) - self.pushButton.setText(_translate("tntdialog", "Apply")) - self.pushButton_2.setText(_translate("tntdialog", "Cancel")) - self.label_4.setText(_translate("tntdialog", "Unassigned lists")) -from widgets.subwidgets import QDelayWidget diff --git a/src/gui_qt/_py/typeconversion.py b/src/gui_qt/_py/typeconversion.py deleted file mode 100644 index fcfa751..0000000 --- a/src/gui_qt/_py/typeconversion.py +++ /dev/null @@ -1,139 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/typeconversion.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_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(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.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.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.label_4.setObjectName("label_4") - self.verticalLayout_2.addWidget(self.label_4) - self.splitter = QtWidgets.QSplitter(Dialog) - self.splitter.setOrientation(QtCore.Qt.Horizontal) - self.splitter.setObjectName("splitter") - self.set_list = QtWidgets.QListWidget(self.splitter) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.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.DragOnly) - self.set_list.setObjectName("set_list") - self.verticalLayoutWidget = QtWidgets.QWidget(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(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(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(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(self.page_1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.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.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(self.page_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.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.NoEditTriggers) - self.merge_table.setDragDropMode(QtWidgets.QAbstractItemView.DropOnly) - self.merge_table.setDefaultDropAction(QtCore.Qt.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(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close|QtWidgets.QDialogButtonBox.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/untitled.py b/src/gui_qt/_py/untitled.py deleted file mode 100644 index 4b991d4..0000000 --- a/src/gui_qt/_py/untitled.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/untitled.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_MainWindow(object): - def setupUi(self, MainWindow): - MainWindow.setObjectName("MainWindow") - MainWindow.resize(800, 600) - self.centralwidget = QtWidgets.QWidget(MainWindow) - self.centralwidget.setObjectName("centralwidget") - self.toolButton = QtWidgets.QToolButton(self.centralwidget) - self.toolButton.setGeometry(QtCore.QRect(0, 0, 31, 34)) - self.toolButton.setObjectName("toolButton") - MainWindow.setCentralWidget(self.centralwidget) - self.menubar = QtWidgets.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 30)) - self.menubar.setObjectName("menubar") - self.menuDfgdfg = QtWidgets.QMenu(self.menubar) - self.menuDfgdfg.setObjectName("menuDfgdfg") - MainWindow.setMenuBar(self.menubar) - self.statusbar = QtWidgets.QStatusBar(MainWindow) - self.statusbar.setObjectName("statusbar") - MainWindow.setStatusBar(self.statusbar) - self.toolBar = QtWidgets.QToolBar(MainWindow) - self.toolBar.setObjectName("toolBar") - MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) - self.actionAsdasd = QtWidgets.QAction(MainWindow) - self.actionAsdasd.setObjectName("actionAsdasd") - self.menuDfgdfg.addAction(self.actionAsdasd) - self.menubar.addAction(self.menuDfgdfg.menuAction()) - self.toolBar.addSeparator() - - self.retranslateUi(MainWindow) - QtCore.QMetaObject.connectSlotsByName(MainWindow) - - def retranslateUi(self, MainWindow): - _translate = QtCore.QCoreApplication.translate - MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) - self.toolButton.setText(_translate("MainWindow", "...")) - self.menuDfgdfg.setTitle(_translate("MainWindow", "dfgdfg")) - self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar")) - self.actionAsdasd.setText(_translate("MainWindow", "asdasd")) diff --git a/src/gui_qt/_py/userfitassist.py b/src/gui_qt/_py/userfitassist.py deleted file mode 100644 index c587927..0000000 --- a/src/gui_qt/_py/userfitassist.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/userfitassist.ui' -# -# Created by: PyQt5 UI code generator 5.12.3 -# -# WARNING! All changes made in this file will be lost! - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(675, 682) - self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) - self.verticalLayout.setObjectName("verticalLayout") - self.label_3 = QtWidgets.QLabel(Dialog) - self.label_3.setIndent(4) - self.label_3.setObjectName("label_3") - self.verticalLayout.addWidget(self.label_3) - self.lineEdit_2 = QtWidgets.QLineEdit(Dialog) - self.lineEdit_2.setObjectName("lineEdit_2") - self.verticalLayout.addWidget(self.lineEdit_2) - self.label_4 = QtWidgets.QLabel(Dialog) - self.label_4.setIndent(4) - self.label_4.setObjectName("label_4") - self.verticalLayout.addWidget(self.label_4) - self.lineEdit_3 = QtWidgets.QLineEdit(Dialog) - self.lineEdit_3.setObjectName("lineEdit_3") - self.verticalLayout.addWidget(self.lineEdit_3) - self.label_2 = QtWidgets.QLabel(Dialog) - self.label_2.setIndent(4) - self.label_2.setObjectName("label_2") - self.verticalLayout.addWidget(self.label_2) - self.lineEdit = QtWidgets.QLineEdit(Dialog) - self.lineEdit.setText("") - self.lineEdit.setObjectName("lineEdit") - self.verticalLayout.addWidget(self.lineEdit) - self.parameterLabel = QtWidgets.QLabel(Dialog) - self.parameterLabel.setIndent(4) - self.parameterLabel.setObjectName("parameterLabel") - self.verticalLayout.addWidget(self.parameterLabel) - self.parameterLineEdit = QtWidgets.QLineEdit(Dialog) - self.parameterLineEdit.setObjectName("parameterLineEdit") - self.verticalLayout.addWidget(self.parameterLineEdit) - self.checkBox = QtWidgets.QCheckBox(Dialog) - self.checkBox.setObjectName("checkBox") - self.verticalLayout.addWidget(self.checkBox) - self.externalParametersLineEdit = QtWidgets.QLineEdit(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.externalParametersLineEdit.sizePolicy().hasHeightForWidth()) - self.externalParametersLineEdit.setSizePolicy(sizePolicy) - self.externalParametersLineEdit.setObjectName("externalParametersLineEdit") - self.verticalLayout.addWidget(self.externalParametersLineEdit) - self.checkBox_2 = QtWidgets.QCheckBox(Dialog) - self.checkBox_2.setObjectName("checkBox_2") - self.verticalLayout.addWidget(self.checkBox_2) - self.tableWidget = QtWidgets.QTableWidget(Dialog) - self.tableWidget.setObjectName("tableWidget") - self.tableWidget.setColumnCount(0) - self.tableWidget.setRowCount(0) - self.verticalLayout.addWidget(self.tableWidget) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout.addItem(spacerItem) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Save) - self.buttonBox.setObjectName("buttonBox") - self.verticalLayout.addWidget(self.buttonBox) - self.label_3.setBuddy(self.lineEdit_2) - self.label_4.setBuddy(self.lineEdit_3) - self.label_2.setBuddy(self.lineEdit) - self.parameterLabel.setBuddy(self.parameterLineEdit) - - self.retranslateUi(Dialog) - self.buttonBox.accepted.connect(Dialog.accept) - self.buttonBox.rejected.connect(Dialog.reject) - QtCore.QMetaObject.connectSlotsByName(Dialog) - - def retranslateUi(self, Dialog): - _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Dialog")) - self.label_3.setText(_translate("Dialog", "Name")) - self.lineEdit_2.setPlaceholderText(_translate("Dialog", "Name of function, e.g. Hopperbagger")) - self.label_4.setText(_translate("Dialog", "Group")) - self.lineEdit_3.setPlaceholderText(_translate("Dialog", "Type of function, e.g., Relaxation, Diffusion, Dredge,...")) - self.label_2.setText(_translate("Dialog", "Equation")) - self.lineEdit.setPlaceholderText(_translate("Dialog", "\\alpha + B*exp(x*C_{33}) + D")) - self.parameterLabel.setText(_translate("Dialog", "Parameters")) - self.parameterLineEdit.setPlaceholderText(_translate("Dialog", "\\alpha B C_{33}")) - self.checkBox.setText(_translate("Dialog", "Fixed parameter")) - self.externalParametersLineEdit.setPlaceholderText(_translate("Dialog", "D")) - self.checkBox_2.setText(_translate("Dialog", "Selection")) - self.buttonBox.setToolTip(_translate("Dialog", "Fit model is saved in myfitmodels.py and ready to use without restart.")) diff --git a/src/gui_qt/_py/usermodeleditor.py b/src/gui_qt/_py/usermodeleditor.py deleted file mode 100644 index 0a098df..0000000 --- a/src/gui_qt/_py/usermodeleditor.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'resources/_ui/usermodeleditor.ui' -# -# Created by: PyQt5 UI code generator 5.15.10 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -class Ui_MainWindow(object): - def setupUi(self, MainWindow): - MainWindow.setObjectName("MainWindow") - MainWindow.resize(800, 600) - self.centralwidget = QtWidgets.QWidget(MainWindow) - self.centralwidget.setObjectName("centralwidget") - self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) - self.verticalLayout.setContentsMargins(3, 3, 3, 3) - self.verticalLayout.setSpacing(3) - self.verticalLayout.setObjectName("verticalLayout") - self.widget = EditorWidget(self.centralwidget) - self.widget.setObjectName("widget") - self.verticalLayout.addWidget(self.widget) - MainWindow.setCentralWidget(self.centralwidget) - self.menubar = QtWidgets.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 20)) - self.menubar.setObjectName("menubar") - self.menuFile = QtWidgets.QMenu(self.menubar) - self.menuFile.setObjectName("menuFile") - MainWindow.setMenuBar(self.menubar) - self.statusbar = QtWidgets.QStatusBar(MainWindow) - self.statusbar.setObjectName("statusbar") - MainWindow.setStatusBar(self.statusbar) - self.actionOpen = QtWidgets.QAction(MainWindow) - self.actionOpen.setObjectName("actionOpen") - self.actionSave = QtWidgets.QAction(MainWindow) - self.actionSave.setObjectName("actionSave") - self.actionSave_as = QtWidgets.QAction(MainWindow) - self.actionSave_as.setObjectName("actionSave_as") - self.actionClose = QtWidgets.QAction(MainWindow) - self.actionClose.setObjectName("actionClose") - self.menuFile.addAction(self.actionOpen) - self.menuFile.addAction(self.actionSave) - self.menuFile.addAction(self.actionSave_as) - self.menuFile.addAction(self.actionClose) - self.menubar.addAction(self.menuFile.menuAction()) - - self.retranslateUi(MainWindow) - QtCore.QMetaObject.connectSlotsByName(MainWindow) - - def retranslateUi(self, MainWindow): - _translate = QtCore.QCoreApplication.translate - MainWindow.setWindowTitle(_translate("MainWindow", "Editor")) - self.menuFile.setTitle(_translate("MainWindow", "File")) - self.actionOpen.setText(_translate("MainWindow", "Open...")) - self.actionSave.setText(_translate("MainWindow", "Save")) - self.actionSave_as.setText(_translate("MainWindow", "Save as...")) - self.actionClose.setText(_translate("MainWindow", "Close")) -from ..lib.codeeditor import EditorWidget diff --git a/src/gui_qt/_py/valueeditor.py b/src/gui_qt/_py/valueeditor.py deleted file mode 100644 index cac1bcf..0000000 --- a/src/gui_qt/_py/valueeditor.py +++ /dev/null @@ -1,107 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'src/resources/_ui/valueeditor.ui' -# -# Created by: PyQt5 UI code generator 5.15.9 -# -# WARNING: Any manual changes made to this file will be lost when pyuic5 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt5 import QtCore, QtGui, QtWidgets - - -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(MaskDialog) - self.graph_combobox.setObjectName("graph_combobox") - self.verticalLayout.addWidget(self.graph_combobox) - self.set_combobox = QtWidgets.QComboBox(MaskDialog) - self.set_combobox.setObjectName("set_combobox") - self.verticalLayout.addWidget(self.set_combobox) - self.tableView = QtWidgets.QTableView(MaskDialog) - self.tableView.setSelectionBehavior(QtWidgets.QAbstractItemView.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(MaskDialog) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - self.spinBox = QtWidgets.QSpinBox(MaskDialog) - self.spinBox.setMinimum(1) - self.spinBox.setObjectName("spinBox") - self.horizontalLayout.addWidget(self.spinBox) - self.toolButton = QtWidgets.QToolButton(MaskDialog) - self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) - self.toolButton.setAutoRaise(True) - self.toolButton.setArrowType(QtCore.Qt.RightArrow) - self.toolButton.setObjectName("toolButton") - self.horizontalLayout.addWidget(self.toolButton) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.verticalLayout.addLayout(self.horizontalLayout) - self.line = QtWidgets.QFrame(MaskDialog) - self.line.setFrameShadow(QtWidgets.QFrame.Raised) - self.line.setLineWidth(3) - self.line.setFrameShape(QtWidgets.QFrame.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(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(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(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(MaskDialog) - self.line_2.setLineWidth(3) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.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(MaskDialog) - self.mask_button.setObjectName("mask_button") - self.horizontalLayout_3.addWidget(self.mask_button) - self.unmaskbutton = QtWidgets.QPushButton(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/data/container.py b/src/gui_qt/data/container.py index 7364579..14a3ffb 100644 --- a/src/gui_qt/data/container.py +++ b/src/gui_qt/data/container.py @@ -12,10 +12,10 @@ from nmreval.lib.logger import logger from nmreval.utils.text import convert from nmreval.data.bds import BDS from nmreval.data.dsc import DSC -from nmreval.lib.colors import BaseColor, TUColors -from nmreval.lib.lines import LineStyle -from nmreval.lib.symbols import SymbolStyle, symbolcycle from nmreval.data.nmr import Spectrum, FID +from nmreval.lib.colors import BaseColor, TUColors +from ..lib.lines import LineStyle +from ..lib.symbols import SymbolStyle, symbolcycle from ..Qt import QtCore, QtGui from ..io.exporters import GraceExporter diff --git a/src/gui_qt/data/conversion.py b/src/gui_qt/data/conversion.py index ac1f38f..39e0c55 100644 --- a/src/gui_qt/data/conversion.py +++ b/src/gui_qt/data/conversion.py @@ -32,16 +32,16 @@ class ConversionDialog(QtWidgets.QDialog, Ui_Dialog): item_name = set_name + ' (' + graph[1] + ')' item1 = QtWidgets.QListWidgetItem(item_name) - item1.setData(QtCore.Qt.UserRole, set_id) - item1.setData(QtCore.Qt.UserRole+1, graph[0]) + item1.setData(QtCore.Qt.ItemDataRole.UserRole, set_id) + item1.setData(QtCore.Qt.ItemDataRole.UserRole+1, graph[0]) self.set_list.addItem(item1) def eventFilter(self, src: QtCore.QObject, evt: QtCore.QEvent): - if evt.type() in [QtCore.QEvent.DragEnter, QtCore.QEvent.DragMove]: + if evt.type() in [QtCore.QEvent.Type.DragEnter, QtCore.QEvent.Type.DragMove]: evt.accept() return True - if evt.type() == QtCore.QEvent.KeyPress and evt.key() == QtCore.Qt.Key_Delete: + if evt.type() == QtCore.QEvent.Type.KeyPress and evt.key() == QtCore.Qt.Key.Key_Delete: if src == self.simple_table: type_idx = 1 else: @@ -113,8 +113,8 @@ class ConversionDialog(QtWidgets.QDialog, Ui_Dialog): src_sets = [] for row in range(self.simple_table.rowCount()): item = self.simple_table.item(row, 0) - set_id = item.data(QtCore.Qt.UserRole) - graph_id = item.data(QtCore.Qt.UserRole+1) + set_id = item.data(QtCore.Qt.ItemDataRole.UserRole) + graph_id = item.data(QtCore.Qt.ItemDataRole.UserRole+1) type_idx = self.simple_table.cellWidget(row, 1).currentIndex() src_sets.append((set_id, graph_id, type_idx)) @@ -123,15 +123,15 @@ class ConversionDialog(QtWidgets.QDialog, Ui_Dialog): item = self.merge_table.item(row, 0) graph_id = '' if item is not None: - set_id_real = item.data(QtCore.Qt.UserRole) - graph_id = item.data(QtCore.Qt.UserRole+1) + set_id_real = item.data(QtCore.Qt.ItemDataRole.UserRole) + graph_id = item.data(QtCore.Qt.ItemDataRole.UserRole+1) else: set_id_real = '' item = self.merge_table.item(row, 1) if item is not None: - set_id_imag = item.data(QtCore.Qt.UserRole) - graph_id = item.data(QtCore.Qt.UserRole+1) if graph_id == '' else graph_id + set_id_imag = item.data(QtCore.Qt.ItemDataRole.UserRole) + graph_id = item.data(QtCore.Qt.ItemDataRole.UserRole+1) if graph_id == '' else graph_id else: set_id_imag = '' type_idx = self.merge_table.cellWidget(row, 2).currentIndex() + 1 diff --git a/src/gui_qt/data/datawidget/datawidget.py b/src/gui_qt/data/datawidget/datawidget.py index a600e91..409d772 100644 --- a/src/gui_qt/data/datawidget/datawidget.py +++ b/src/gui_qt/data/datawidget/datawidget.py @@ -19,30 +19,29 @@ class DataTree(QtWidgets.QTreeWidget): saveFits = QtCore.pyqtSignal(list) extendFits = QtCore.pyqtSignal(list, bool) - # noinspection PyUnresolvedReferences def __init__(self, parent=None): super().__init__(parent=parent) - self.invisibleRootItem().setFlags(self.invisibleRootItem().flags() ^ QtCore.Qt.ItemIsDropEnabled) + self.invisibleRootItem().setFlags(self.invisibleRootItem().flags() ^ QtCore.Qt.ItemFlag.ItemIsDropEnabled) self.itemChanged.connect(self.data_change) self.itemClicked.connect(self.new_selection) self.setColumnCount(2) - self.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) - self.setDragDropMode(QtWidgets.QTreeView.InternalMove) - self.setDefaultDropAction(QtCore.Qt.IgnoreAction) - self.setSelectionMode(QtWidgets.QTreeView.ExtendedSelection) - self.setSelectionBehavior(QtWidgets.QTreeView.SelectRows) + self.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Expanding) + self.setDragDropMode(QtWidgets.QTreeView.DragDropMode.InternalMove) + self.setDefaultDropAction(QtCore.Qt.DropAction.IgnoreAction) + self.setSelectionMode(QtWidgets.QTreeView.SelectionMode.ExtendedSelection) + self.setSelectionBehavior(QtWidgets.QTreeView.SelectionBehavior.SelectRows) self._checked_graphs = set() self._checked_sets = set() self.management = None - header = QtWidgets.QHeaderView(QtCore.Qt.Horizontal, self) + header = QtWidgets.QHeaderView(QtCore.Qt.Orientation.Horizontal, self) self.setHeader(header) - header.setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch) + header.setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeMode.Stretch) header.setVisible(False) header.moveSection(1, 0) self.setItemDelegateForColumn(1, HeaderDelegate()) diff --git a/src/gui_qt/data/datawidget/properties.py b/src/gui_qt/data/datawidget/properties.py index cb4266a..c8ebee1 100644 --- a/src/gui_qt/data/datawidget/properties.py +++ b/src/gui_qt/data/datawidget/properties.py @@ -57,8 +57,8 @@ class PropTable(QtWidgets.QTableWidget): self.horizontalHeader().setStretchLastSection(True) self.verticalHeader().setVisible(False) self.horizontalHeader().setVisible(False) - self.setFrameShape(QtWidgets.QFrame.NoFrame) - self.setFrameShadow(QtWidgets.QFrame.Plain) + self.setFrameShape(QtWidgets.QFrame.Shape.NoFrame) + self.setFrameShadow(QtWidgets.QFrame.Shadow.Plain) def populate(self, prop: dict): self.clear() diff --git a/src/gui_qt/data/integral_widget.py b/src/gui_qt/data/integral_widget.py index ea938ac..e308ffe 100644 --- a/src/gui_qt/data/integral_widget.py +++ b/src/gui_qt/data/integral_widget.py @@ -1,7 +1,7 @@ from itertools import cycle import pyqtgraph as pg -from numpy import nanmax, nanmin, inf, argsort, where +from numpy import nanmax, nanmin, inf from nmreval.lib.colors import Tab10 from ..lib.pg_objects import PlotItem, RegionItem @@ -63,7 +63,7 @@ class IntegralWidget(QtWidgets.QWidget, Ui_Form): return self def keyPressEvent(self, e): - if e.key() == QtCore.Qt.Key_Delete: + if e.key() == QtCore.Qt.Key.Key_Delete: self.remove_integral() else: super().keyPressEvent(e) @@ -110,9 +110,9 @@ class IntegralWidget(QtWidgets.QWidget, Ui_Form): for text, val in [('Start', pts_i[0]), ('Stop', pts_i[1]), ('Areas', 0), ('Ratio', 1.)]: child = QtWidgets.QTreeWidgetItem() if text.startswith('S'): - child.setFlags(child.flags() | QtCore.Qt.ItemIsEditable) + child.setFlags(child.flags() | QtCore.Qt.ItemFlag.ItemIsEditable) else: - child.setFlags(QtCore.Qt.NoItemFlags) + child.setFlags(QtCore.Qt.ItemFlag.NoItemFlags) child.setText(0, f'{text}: {val:.5g}') child.setForeground(0, QtGui.QBrush(QtGui.QColor('black'))) diff --git a/src/gui_qt/data/point_select.py b/src/gui_qt/data/point_select.py index 377ee38..f403244 100644 --- a/src/gui_qt/data/point_select.py +++ b/src/gui_qt/data/point_select.py @@ -33,9 +33,9 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form): self.peaktable.itemDoubleClicked.connect(self.editing_started) def keyPressEvent(self, e): - if e.key() == QtCore.Qt.Key_Delete: + if e.key() == QtCore.Qt.Key.Key_Delete: self.remove_points() - elif e.key() == QtCore.Qt.Key_F2: + elif e.key() == QtCore.Qt.Key.Key_F2: self.editing_started() else: super().keyPressEvent(e) diff --git a/src/gui_qt/data/shift_graphs.py b/src/gui_qt/data/shift_graphs.py index f436989..b6550a4 100644 --- a/src/gui_qt/data/shift_graphs.py +++ b/src/gui_qt/data/shift_graphs.py @@ -66,9 +66,9 @@ class QShift(QtWidgets.QDialog, Ui_shift_dialog): item = QtWidgets.QTableWidgetItem(name) item.setForeground(QtGui.QBrush(color)) - item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled) - item.setCheckState(QtCore.Qt.Checked) - item.setData(QtCore.Qt.UserRole, idx) + item.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable | QtCore.Qt.ItemFlag.ItemIsUserCheckable | QtCore.Qt.ItemFlag.ItemIsEnabled) + item.setCheckState(QtCore.Qt.CheckState.Checked) + item.setData(QtCore.Qt.ItemDataRole.UserRole, idx) tw.setItem(row, 0, item) tw.setItem(row, 1, QtWidgets.QTableWidgetItem(str(i))) @@ -85,7 +85,7 @@ class QShift(QtWidgets.QDialog, Ui_shift_dialog): def glob_shift_scale(self, widget: QtWidgets.QTableWidget, mode: int, col: int, value: float): for row in range(widget.rowCount()): - if widget.item(row, 0).checkState() == QtCore.Qt.Checked: + if widget.item(row, 0).checkState() == QtCore.Qt.CheckState.Checked: item = widget.item(row, col) item.setText(str(value)) self.shift_scale(widget, mode, row, col-1, value) @@ -109,7 +109,7 @@ class QShift(QtWidgets.QDialog, Ui_shift_dialog): def shift_scale(self, widget: QtWidgets.QTableWidget, mode: int, row: int, col: int, value: float): item = widget.item(row, 0) - key = item.data(QtCore.Qt.UserRole) + key = item.data(QtCore.Qt.ItemDataRole.UserRole) self.movements[key][mode][col] = value (x_off, y_off), (x_scale, y_scale) = self.movements[key] @@ -146,18 +146,18 @@ class QShift(QtWidgets.QDialog, Ui_shift_dialog): self.graphicsView.enableAutoRange() def on_overwrite_checkbox_stateChanged(self, state: int): - self.data_newgraph.setVisible(state != QtCore.Qt.Checked) - self.data_combobox.setVisible(state != QtCore.Qt.Checked) + self.data_newgraph.setVisible(state != QtCore.Qt.CheckState.Checked) + self.data_combobox.setVisible(state != QtCore.Qt.CheckState.Checked) def on_value_checkbox_stateChanged(self, state: int): - self.values_newgraph.setVisible(state == QtCore.Qt.Checked) - self.values_combobox.setVisible(state == QtCore.Qt.Checked) + self.values_newgraph.setVisible(state == QtCore.Qt.CheckState.Checked) + self.values_combobox.setVisible(state == QtCore.Qt.CheckState.Checked) def on_data_newgraph_stateChanged(self, state: int): - self.data_combobox.setEnabled(state != QtCore.Qt.Checked) + self.data_combobox.setEnabled(state != QtCore.Qt.CheckState.Checked) def on_values_newgraph_stateChanged(self, state: int): - self.values_combobox.setEnabled(state != QtCore.Qt.Checked) + self.values_combobox.setEnabled(state != QtCore.Qt.CheckState.Checked) def accept(self): data_saving = None diff --git a/src/gui_qt/data/signaledit/baseline_dialog.py b/src/gui_qt/data/signaledit/baseline_dialog.py index 79ca27b..741ce2c 100644 --- a/src/gui_qt/data/signaledit/baseline_dialog.py +++ b/src/gui_qt/data/signaledit/baseline_dialog.py @@ -82,7 +82,7 @@ class QBaselineDialog(QtWidgets.QDialog, Ui_SignalEdit): self.graph_corr.setData(x=x, y=y.real-bl) def keyPressEvent(self, evt): - if self.listWidget.hasFocus() and evt.key() == QtCore.Qt.Key_Delete: + if self.listWidget.hasFocus() and evt.key() == QtCore.Qt.Key.Key_Delete: r = self.listWidget.currentRow() self.anchors.pop(r+1) listitem = self.listWidget.takeItem(r) diff --git a/src/gui_qt/data/signaledit/phase_dialog.py b/src/gui_qt/data/signaledit/phase_dialog.py index d040312..37e9d7f 100644 --- a/src/gui_qt/data/signaledit/phase_dialog.py +++ b/src/gui_qt/data/signaledit/phase_dialog.py @@ -434,7 +434,7 @@ class QPreviewDialog(QtWidgets.QDialog, Ui_ApodEdit): self.logx_freq: lambda _x: self.freq_graph.setLogMode(x=_x), self.logy_freq: lambda _x: self.freq_graph.setLogMode(y=_x), }[self.sender()] - switch(state == QtCore.Qt.Checked) + switch(state == QtCore.Qt.CheckState.Checked) vb = self.freq_graph.getPlotItem().getViewBox() vb.disableAutoRange(axis=vb.YAxis) diff --git a/src/gui_qt/data/valueeditwidget.py b/src/gui_qt/data/valueeditwidget.py index de2376b..caec238 100644 --- a/src/gui_qt/data/valueeditwidget.py +++ b/src/gui_qt/data/valueeditwidget.py @@ -131,7 +131,7 @@ class ValueEditWidget(QtWidgets.QWidget, Ui_MaskDialog): self.split() def keyPressEvent(self, evt): - if evt.matches(QtGui.QKeySequence.Copy): + if evt.matches(QtGui.QKeySequence.StandardKey.Copy): self.copy_selection() elif evt.key() == QtCore.Qt.Key.Key_Delete: self.delete_item() @@ -275,16 +275,16 @@ class ValueModel(QtCore.QAbstractTableModel): elif role == QtCore.Qt.ItemDataRole.BackgroundRole: pal = QtGui.QGuiApplication.palette() if not self.mask[row]: - return pal.color(QtGui.QPalette.Disabled, QtGui.QPalette.Base) + return pal.color(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Base) else: - return pal.color(QtGui.QPalette.Base) + return pal.color(QtGui.QPalette.ColorRole.Base) elif role == QtCore.Qt.ItemDataRole.ForegroundRole: pal = QtGui.QGuiApplication.palette() if not self.mask[row]: - return pal.color(QtGui.QPalette.Disabled, QtGui.QPalette.Text) + return pal.color(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Text) else: - return pal.color(QtGui.QPalette.Text) + return pal.color(QtGui.QPalette.ColorRole.Text) elif role == ValueModel.maskRole: return self.mask[row] diff --git a/src/gui_qt/editors/codeeditor.py b/src/gui_qt/editors/codeeditor.py index a90840f..a812a20 100644 --- a/src/gui_qt/editors/codeeditor.py +++ b/src/gui_qt/editors/codeeditor.py @@ -1,7 +1,10 @@ # CodeEditor based on QT example, Python syntax highlighter found on Python site +import enum import typing from ast import parse +from PyQt5.QtGui import QTextCharFormat + from ..Qt import QtGui, QtCore, QtWidgets @@ -14,7 +17,7 @@ def _make_textformats(color, style=''): _format = QtGui.QTextCharFormat() _format.setForeground(_color) if 'bold' in style: - _format.setFontWeight(QtGui.QFont.Bold) + _format.setFontWeight(QtGui.QFont.Weight.Bold) if 'italic' in style: _format.setFontItalic(True) @@ -22,17 +25,17 @@ def _make_textformats(color, style=''): # Syntax styles that can be shared by all languages -STYLES = { - 'keyword': _make_textformats('blue'), - 'operator': _make_textformats('black'), - 'brace': _make_textformats('black'), - 'defclass': _make_textformats('black', 'bold'), - 'string': _make_textformats('darkGreen'), - 'comment': _make_textformats('gray', 'italic'), - 'self': _make_textformats('brown', 'italic'), - 'property': _make_textformats('brown'), - 'numbers': _make_textformats('darkRed'), -} +class CodeStyle(enum.Enum): + KEYWORD = _make_textformats('blue') + OPERATOR = _make_textformats('black') + BRACE = _make_textformats('black') + CLASS_DEFINE = _make_textformats('black', 'bold') + STRING = _make_textformats('darkGreen') + COMMENT = _make_textformats('gray', 'italic') + SELF = _make_textformats('brown', 'italic') + PROPERTY = _make_textformats('brown') + NUMBER = _make_textformats('darkRed') + class PythonHighlighter(QtGui.QSyntaxHighlighter): @@ -55,43 +58,43 @@ class PythonHighlighter(QtGui.QSyntaxHighlighter): # Multi-line strings (expression, flag, style) # FIXME: The triple-quotes in these two lines will mess up the # syntax highlighting from this point onward - self.tri_single = (QtCore.QRegExp("r'{3}"), 1, STYLES['string']) - self.tri_double = (QtCore.QRegExp('r?"{3}'), 2, STYLES['string']) + self.tri_single = (QtCore.QRegularExpression("r'{3}"), 1, CodeStyle.STRING.value) + self.tri_double = (QtCore.QRegularExpression('r?"{3}'), 2, CodeStyle.STRING.value) rules = [] # Keyword, operator, and brace rules - rules += [(rf'\b{w}\b', 0, STYLES['keyword']) for w in PythonHighlighter.keywords] + rules += [(rf'\b{w}\b', 0, CodeStyle.KEYWORD.value) for w in PythonHighlighter.keywords] # Other rules rules += [ # 'self' - (r'\bself\b', 0, STYLES['self']), + (r'\bself\b', 0, CodeStyle.SELF.value), # 'def' followed by an identifier - (r'\bdef\b\s*(\w+)', 1, STYLES['defclass']), + (r'\bdef\b\s*(\w+)', 1, CodeStyle.CLASS_DEFINE.value), # 'class' followed by an identifier - (r'\bclass\b\s*(\w+)', 1, STYLES['defclass']), + (r'\bclass\b\s*(\w+)', 1, CodeStyle.CLASS_DEFINE.value), # decorator @ followed by a word - (r'\s*@(\w+)\s*', 0, STYLES['property']), + (r'\s*@(\w+)\s*', 0, CodeStyle.PROPERTY.value), # Numeric literals - (r'\b[+-]?\d+[lL]?\b', 0, STYLES['numbers']), - (r'\b[+-]?0[xX][\dA-Fa-f]+[lL]?\b', 0, STYLES['numbers']), - (r'\b[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b', 0, STYLES['numbers']), + (r'\b[+-]?\d+[lL]?\b', 0, CodeStyle.NUMBER.value), + (r'\b[+-]?0[xX][\dA-Fa-f]+[lL]?\b', 0, CodeStyle.NUMBER.value), + (r'\b[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b', 0, CodeStyle.NUMBER.value), # Double-quoted string, possibly containing escape sequences - (r'[rf]?"[^"\\]*(\\.[^"\\]*)*"', 0, STYLES['string']), + (r'[rf]?"[^"\\]*(\\.[^"\\]*)*"', 0, CodeStyle.STRING.value), # Single-quoted string, possibly containing escape sequences - (r"[rf]?'[^'\\]*(\\.[^'\\]*)*'", 0, STYLES['string']), + (r"[rf]?'[^'\\]*(\\.[^'\\]*)*'", 0, CodeStyle.STRING.value), # From '#' until a newline - (r'#[^\n]*', 0, STYLES['comment']), + (r'#[^\n]*', 0, CodeStyle.COMMENT.value), ] # Build a QRegExp for each pattern - self.rules = [(QtCore.QRegExp(pat), index, fmt) for (pat, index, fmt) in rules] + self.rules = [(QtCore.QRegularExpression(pat), index, fmt) for (pat, index, fmt) in rules] def highlightBlock(self, text): """ @@ -99,14 +102,12 @@ class PythonHighlighter(QtGui.QSyntaxHighlighter): """ # Do other syntax formatting for expression, nth, rule in self.rules: - index = expression.indexIn(text, 0) + index = expression.globalMatch(text) - while index >= 0: - # We actually want the index of the nth match - index = expression.pos(nth) - length = len(expression.cap(nth)) - self.setFormat(index, length, rule) - index = expression.indexIn(text, index + length) + while index.hasNext(): + match = index.next() + + self.setFormat(match.capturedStart(nth), match.capturedLength(nth), rule) self.setCurrentBlockState(0) @@ -115,7 +116,7 @@ class PythonHighlighter(QtGui.QSyntaxHighlighter): if not in_multiline: in_multiline = self.match_multiline(text, *self.tri_double) - def match_multiline(self, text, delimiter, in_state, style): + def match_multiline(self, text: str, delimiter: QtCore.QRegularExpression, in_state: int, style: QtGui.QTextCharFormat): """ Highlighting of multi-line strings. ``delimiter`` should be a ``QRegExp`` for triple-single-quotes or triple-double-quotes, and @@ -124,40 +125,42 @@ class PythonHighlighter(QtGui.QSyntaxHighlighter): inside a multi-line string when this function is finished. """ # If inside triple-single quotes, start at 0 - if self.previousBlockState() == in_state: - start = 0 - add = 0 - # Otherwise, look for the delimiter on this line - else: - start = delimiter.indexIn(text) - # Move past this match - add = delimiter.matchedLength() - - # As long as there's a delimiter match on this line... - while start >= 0: - # Look for the ending delimiter - end = delimiter.indexIn(text, start + add) - # Ending delimiter on this line? - if end >= add: - length = end - start + add + delimiter.matchedLength() - self.setCurrentBlockState(0) - # No; multi-line string - else: - self.setCurrentBlockState(in_state) - try: - length = text.length() - start + add - except AttributeError: - length = len(text) - start + add - # Apply formatting - self.setFormat(start, length, style) - # Look for the next match - start = delimiter.indexIn(text, start + length) - - # Return True if still inside a multi-line string, False otherwise - if self.currentBlockState() == in_state: - return True - else: - return False + # TODO + return False + # if self.previousBlockState() == in_state: + # start = 0 + # add = 0 + # # Otherwise, look for the delimiter on this line + # else: + # start = delimiter.match(text). + # # Move past this match + # add = delimiter.matchedLength() + # + # # As long as there's a delimiter match on this line... + # while start >= 0: + # # Look for the ending delimiter + # end = delimiter.indexIn(text, start + add) + # # Ending delimiter on this line? + # if end >= add: + # length = end - start + add + delimiter.matchedLength() + # self.setCurrentBlockState(0) + # # No; multi-line string + # else: + # self.setCurrentBlockState(in_state) + # try: + # length = text.length() - start + add + # except AttributeError: + # length = len(text) - start + add + # # Apply formatting + # self.setFormat(start, length, style) + # # Look for the next match + # start = delimiter.indexIn(text, start + length) + # + # # Return True if still inside a multi-line string, False otherwise + # if self.currentBlockState() == in_state: + # return True + # else: + # return False class LineNumbers(QtWidgets.QWidget): @@ -195,19 +198,18 @@ class CodeEditor(QtWidgets.QPlainTextEdit): else: super().keyPressEvent(evt) - @property def width_linenumber(self): digits = 1 count = max(1, self.blockCount()) while count >= 10: count /= 10 digits += 1 - space = 6 + self.fontMetrics().width('9') * digits + space = 6 + self.fontMetrics().horizontalAdvance('9') * digits return space def update_width_linenumber(self, _): - self.setViewportMargins(self.width_linenumber, 0, 0, 0) + self.setViewportMargins(self.width_linenumber(), 0, 0, 0) def update_current_area(self, rect, dy): if dy: @@ -221,7 +223,7 @@ class CodeEditor(QtWidgets.QPlainTextEdit): super().resizeEvent(evt) cr = self.contentsRect() - self.current_linenumber.setGeometry(QtCore.QRect(cr.left(), cr.top(), self.width_linenumber, cr.height())) + self.current_linenumber.setGeometry(QtCore.QRect(cr.left(), cr.top(), self.width_linenumber(), cr.height())) def paintevent_linenumber(self, evt): painter = QtGui.QPainter(self.current_linenumber) @@ -255,7 +257,7 @@ class CodeEditor(QtWidgets.QPlainTextEdit): line_color = QtGui.QColor(QtCore.Qt.GlobalColor.yellow).lighter(180) selection.format.setBackground(line_color) - selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True) + selection.format.setProperty(QtGui.QTextFormat.Property.FullWidthSelection, True) selection.cursor = self.textCursor() selection.cursor.clearSelection() extra_selections.append(selection) diff --git a/src/gui_qt/editors/script_editor.py b/src/gui_qt/editors/script_editor.py index ae3d175..e7d9790 100644 --- a/src/gui_qt/editors/script_editor.py +++ b/src/gui_qt/editors/script_editor.py @@ -3,7 +3,7 @@ from __future__ import annotations from pathlib import Path from .usermodeleditor import QUsermodelEditor -from ..Qt import QtWidgets, QtCore, QtGui +from ..Qt import QtWidgets, QtCore class QEditor(QUsermodelEditor): diff --git a/src/gui_qt/editors/usermodeleditor.py b/src/gui_qt/editors/usermodeleditor.py index 3cc1dbc..ab07ea9 100644 --- a/src/gui_qt/editors/usermodeleditor.py +++ b/src/gui_qt/editors/usermodeleditor.py @@ -28,7 +28,7 @@ class QUsermodelEditor(QtWidgets.QMainWindow): self.edit_field = EditorWidget(self.centralwidget) font = QtGui.QFont('default') - font.setStyleHint(font.Monospace) + font.setStyleHint(font.StyleHint.Monospace) font.setPointSize(10) self.edit_field.setFont(font) @@ -43,11 +43,11 @@ class QUsermodelEditor(QtWidgets.QMainWindow): self.menuFile = QtWidgets.QMenu('File', self.menubar) self.menubar.addMenu(self.menuFile) - self.menuFile.addAction('Open...', self.open_file, QtGui.QKeySequence.Open) - self.menuFile.addAction('Save', self.overwrite_file, QtGui.QKeySequence.Save) - self.menuFile.addAction('Save as...', self.save_file, QtGui.QKeySequence('Ctrl+Shift+S')) + self.menuFile.addAction('Open...', QtGui.QKeySequence.StandardKey.Open, self.open_file) + self.menuFile.addAction('Save', QtGui.QKeySequence.StandardKey.Save, self.overwrite_file) + self.menuFile.addAction('Save as...', QtGui.QKeySequence('Ctrl+Shift+S'), self.save_file) self.menuFile.addSeparator() - self.menuFile.addAction('Close', self.close, QtGui.QKeySequence.Quit) + self.menuFile.addAction('Close', QtGui.QKeySequence.StandardKey.Quit), self.close self.resize(800, 600) self.setGeometry( @@ -55,7 +55,7 @@ class QUsermodelEditor(QtWidgets.QMainWindow): QtCore.Qt.LayoutDirection.LeftToRight, QtCore.Qt.AlignmentFlag.AlignCenter, self.size(), - QtWidgets.qApp.desktop().availableGeometry() + QtWidgets.QApplication.primaryScreen().availableGeometry(), ) ) @@ -90,7 +90,6 @@ class QUsermodelEditor(QtWidgets.QMainWindow): elif fname.is_dir(): self._dir = fname - def changes_saved(self) -> bool: if not self.is_modified(): return True @@ -98,12 +97,13 @@ class QUsermodelEditor(QtWidgets.QMainWindow): ret = QtWidgets.QMessageBox.question(self, 'Time to think', 'The document was modified.
\n' 'Do you want to save changes?
', - QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No | - QtWidgets.QMessageBox.Cancel) - if ret == QtWidgets.QMessageBox.Yes: + QtWidgets.QMessageBox.StandardButton.Yes | + QtWidgets.QMessageBox.StandardButton.No | + QtWidgets.QMessageBox.StandardButton.Cancel) + if ret == QtWidgets.QMessageBox.StandardButton.Yes: self.save_file() - if ret == QtWidgets.QMessageBox.No: + if ret == QtWidgets.QMessageBox.StandardButton.No: self.set_modified(False) return not self.is_modified() diff --git a/src/gui_qt/fit/fit_forms.py b/src/gui_qt/fit/fit_forms.py index 2a9c4a2..be38c55 100644 --- a/src/gui_qt/fit/fit_forms.py +++ b/src/gui_qt/fit/fit_forms.py @@ -52,7 +52,7 @@ class FitModelTree(QtWidgets.QTreeWidget): super().__init__(parent=parent) self.setHeaderHidden(True) self.setDragEnabled(True) - self.setDragDropMode(QtWidgets.QTreeWidget.InternalMove) + self.setDragDropMode(QtWidgets.QTreeWidget.DragDropMode.InternalMove) self.setDefaultDropAction(QtCore.Qt.DropAction.MoveAction) self.itemSelectionChanged.connect(lambda: self.treeChanged.emit()) @@ -210,7 +210,7 @@ class FitTableWidget(TableWidget): self.horizontalHeader().hide() self.verticalHeader().hide() self.setColumnCount(2) - self.setSelectionBehavior(QtWidgets.QTableWidget.SelectRows) + self.setSelectionBehavior(QtWidgets.QTableWidget.SelectionBehavior.SelectRows) self.horizontalHeader().setStretchLastSection(True) self.hideColumn(1) diff --git a/src/gui_qt/fit/fit_parameter.py b/src/gui_qt/fit/fit_parameter.py index 756fb3f..4e0a6b4 100644 --- a/src/gui_qt/fit/fit_parameter.py +++ b/src/gui_qt/fit/fit_parameter.py @@ -319,7 +319,7 @@ class ParameterSingleWidget(QtWidgets.QWidget): self.parametername = QtWidgets.QLabel(self) layout.addWidget(self.parametername) - layout.addSpacerItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) + layout.addSpacerItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)) self.value_line = QtWidgets.QLineEdit(self) self.value_line.textEdited.connect(lambda x: self.show_as_local_parameter(True)) diff --git a/src/gui_qt/fit/fit_toolbar.py b/src/gui_qt/fit/fit_toolbar.py index 74ed526..4a77cca 100644 --- a/src/gui_qt/fit/fit_toolbar.py +++ b/src/gui_qt/fit/fit_toolbar.py @@ -6,7 +6,7 @@ from ..lib.pg_objects import RegionItem class FitToolbar(QtWidgets.QToolBar): def __init__( self, - fitaction: QtWidgets.QAction, + fitaction: QtGui.QAction, limit_menu: QtWidgets.QMenu, parent=None, ): @@ -18,7 +18,7 @@ class FitToolbar(QtWidgets.QToolBar): self.fitlim_button = QtWidgets.QToolButton(self) self.fitlim_button.setMenu(limit_menu) - self.fitlim_button.setPopupMode(self.fitlim_button.InstantPopup) + self.fitlim_button.setPopupMode(self.fitlim_button.ToolButtonPopupMode.InstantPopup) self.fitlim_button.setIcon(get_icon('fit_region')) self.addWidget(self.fitlim_button) @@ -44,7 +44,7 @@ class FitToolbar(QtWidgets.QToolBar): self.lineedit2.setMaximumWidth(92) self.lineedit2.setEnabled(False) - self.limit_group = QtWidgets.QActionGroup(self) + self.limit_group = QtGui.QActionGroup(self) for ac in limit_menu.actions(): self.limit_group.addAction(ac) @@ -56,10 +56,9 @@ class FitToolbar(QtWidgets.QToolBar): self.lineedit.textChanged.connect(self.move_region) self.lineedit2.textChanged.connect(self.move_region) - @QtCore.pyqtSlot(QtWidgets.QAction) - def change_limit_type(self, action: QtWidgets.QAction): + @QtCore.pyqtSlot(QtGui.QAction) + def change_limit_type(self, action: QtGui.QAction): is_custom = (action.text() in ['Custom', 'Exclude region']) - print(is_custom) for w in [self.label, self.label2, self.lineedit, self.lineedit2]: w.setEnabled(is_custom) diff --git a/src/gui_qt/fit/fitwindow.py b/src/gui_qt/fit/fitwindow.py index 9aeaed3..c5cdda5 100644 --- a/src/gui_qt/fit/fitwindow.py +++ b/src/gui_qt/fit/fitwindow.py @@ -246,7 +246,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog): p, glob = self.param_widgets[f['cnt']].get_parameter(function_use) except ValueError as e: _ = QtWidgets.QMessageBox().warning(self, 'Invalid value', str(e), - QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.StandardButton.Ok) return {}, -1 parameter['color'].append(f['color']) @@ -332,7 +332,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog): except KeyError: QtWidgets.QMessageBox().warning(self, 'Invalid value', 'Parameter cannot be linked: Model is unused', - QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.StandardButton.Ok) return try: @@ -341,7 +341,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog): QtWidgets.QMessageBox().warning(self, 'Invalid value', 'Parameter cannot be linked: ' 'Function is probably not checked or deleted', - QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.StandardButton.Ok) return repl_idx = sum(f['len'][:f_idx])+rep_pos @@ -349,7 +349,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog): _ = QtWidgets.QMessageBox().warning(self, 'Invalid value', 'Parameter cannot be linked: ' 'Destination is not a global parameter.', - QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.StandardButton.Ok) return replaceable.append((model_name, i, rep_model, repl_idx)) diff --git a/src/gui_qt/fit/function_creation_dialog.py b/src/gui_qt/fit/function_creation_dialog.py index caf7d42..3aeeb15 100644 --- a/src/gui_qt/fit/function_creation_dialog.py +++ b/src/gui_qt/fit/function_creation_dialog.py @@ -10,18 +10,18 @@ import numpy as np from ..Qt import QtCore, QtWidgets, QtGui from .._py.fitcreationdialog import Ui_Dialog -from ..editors.namespace import QNamespaceWidget +from ..lib.namespace import QNamespaceWidget __all__ = ['QUserFitCreator'] -validator = QtGui.QRegExpValidator(QtCore.QRegExp('[_A-Za-z][_A-Za-z0-9]*')) +validator = QtGui.QRegularExpressionValidator(QtCore.QRegularExpression('[_A-Za-z][_A-Za-z0-9]*')) pattern = re.compile(r'def func\(.*\):', flags=re.MULTILINE) class QUserFitCreator(QtWidgets.QDialog, Ui_Dialog): classCreated = QtCore.pyqtSignal() - def __init__(self, filepath: str|pathlib.Path, parent=None): + def __init__(self, filepath: str | pathlib.Path, parent=None): super().__init__(parent=parent) self.setupUi(self) @@ -349,7 +349,7 @@ class ArgWidget(QtWidgets.QWidget): self.table = QtWidgets.QTableWidget(self) self.table.setColumnCount(4) - self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) + self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) self.table.setRowCount(0) self.table.setHorizontalHeaderLabels(['Variable', 'Disp. name', 'Lower bound', 'Upper bound']) self.table.itemChanged.connect(lambda x: self.Changed.emit()) diff --git a/src/gui_qt/fit/result.py b/src/gui_qt/fit/result.py index 3676175..97e05ea 100644 --- a/src/gui_qt/fit/result.py +++ b/src/gui_qt/fit/result.py @@ -426,7 +426,7 @@ class FitExtension(QtWidgets.QDialog): self.buttonBox = QtWidgets.QDialogButtonBox() self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel | QtWidgets.QDialogButtonBox.StandardButton.Ok) gridLayout.addWidget(self.buttonBox, 4, 0, 1, 2) self.setLayout(gridLayout) diff --git a/src/gui_qt/graphs/graphwindow.py b/src/gui_qt/graphs/graphwindow.py index 405e520..fd225f2 100644 --- a/src/gui_qt/graphs/graphwindow.py +++ b/src/gui_qt/graphs/graphwindow.py @@ -437,12 +437,12 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): evt.ignore() return - res = QtWidgets.QMessageBox.Yes + res = QtWidgets.QMessageBox.StandardButton.Yes if len(self.sets) != 0: res = QtWidgets.QMessageBox.question(self, 'Plot not empty', 'Graph is not empty. Deleting with all data?', - QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No) + QtWidgets.QMessageBox.StandardButton.Yes, QtWidgets.QMessageBox.StandardButton.No) - if res == QtWidgets.QMessageBox.Yes: + if res == QtWidgets.QMessageBox.StandardButton.Yes: self.aboutToClose.emit([self.id]) evt.accept() else: @@ -635,9 +635,9 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): outfile = None f = FileDialog(caption='Export graphic', filter=filters, mode='save') - f.setOption(FileDialog.DontConfirmOverwrite) + f.setOption(FileDialog.Option.DontConfirmOverwrite) mode = f.exec() - if mode == QtWidgets.QDialog.Accepted: + if mode == QtWidgets.QDialog.DialogCode.Accepted: outfile = f.save_file() if outfile: self.export(outfile) @@ -675,9 +675,9 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): 'Export graphic', f'{os.path.split(outfile)[1]} already exists.\n' f'Do you REALLY want to replace it?', - QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No, - QtWidgets.QMessageBox.No - ) == QtWidgets.QMessageBox.No: + QtWidgets.QMessageBox.StandardButton.Yes | QtWidgets.QMessageBox.StandardButton.No, + QtWidgets.QMessageBox.StandardButton.No + ) == QtWidgets.QMessageBox.StandardButton.No: return bg_color = self._bgcolor diff --git a/src/gui_qt/graphs/movedialog.py b/src/gui_qt/graphs/movedialog.py index 21ad24a..c9557ad 100644 --- a/src/gui_qt/graphs/movedialog.py +++ b/src/gui_qt/graphs/movedialog.py @@ -33,21 +33,21 @@ class QMover(QtWidgets.QDialog, Ui_MoveDialog): if idd is not None: for i, j in self.entries[idd]: it = QtWidgets.QListWidgetItem(j) - it.setData(QtCore.Qt.UserRole, i) + it.setData(QtCore.Qt.ItemDataRole.UserRole, i) self.listWidget.addItem(it) @QtCore.pyqtSlot(QtWidgets.QAbstractButton) def button_clicked(self, btn: QtWidgets.QAbstractButton): - if self.buttonBox.buttonRole(btn) in [QtWidgets.QDialogButtonBox.ApplyRole, - QtWidgets.QDialogButtonBox.AcceptRole]: + if self.buttonBox.buttonRole(btn) in [QtWidgets.QDialogButtonBox.ButtonRole.ApplyRole, + QtWidgets.QDialogButtonBox.ButtonRole.AcceptRole]: from_graph = self.fromcomboBox.itemData(self.fromcomboBox.currentIndex()) to_graph = self.tocomboBox.itemData(self.tocomboBox.currentIndex()) if from_graph != to_graph: moving = [] for idx in self.listWidget.selectedIndexes(): it = self.listWidget.itemFromIndex(idx) - moving.append(it.data(QtCore.Qt.UserRole)) - it_data = (it.data(QtCore.Qt.UserRole), it.text()) + moving.append(it.data(QtCore.Qt.ItemDataRole.UserRole)) + it_data = (it.data(QtCore.Qt.ItemDataRole.UserRole), it.text()) if self.move_button.isChecked(): self.entries[from_graph].remove(it_data) self.entries[to_graph].append(it_data) @@ -58,10 +58,10 @@ class QMover(QtWidgets.QDialog, Ui_MoveDialog): else: self.copyData.emit(moving, to_graph) - if self.buttonBox.buttonRole(btn) == QtWidgets.QDialogButtonBox.AcceptRole: + if self.buttonBox.buttonRole(btn) == QtWidgets.QDialogButtonBox.ButtonRole.AcceptRole: self.close() - elif self.buttonBox.buttonRole(btn) == QtWidgets.QDialogButtonBox.RejectRole: + elif self.buttonBox.buttonRole(btn) == QtWidgets.QDialogButtonBox.ButtonRole.RejectRole: self.close() else: return diff --git a/src/gui_qt/io/asciireader.py b/src/gui_qt/io/asciireader.py index 5fb765b..c4ffc3d 100644 --- a/src/gui_qt/io/asciireader.py +++ b/src/gui_qt/io/asciireader.py @@ -25,15 +25,15 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader): self.comment_textfield = QtWidgets.QPlainTextEdit(self.header_widget) self.comment_textfield.setReadOnly(True) pal = QtWidgets.QApplication.instance().palette() - rgb = pal.color(pal.Base).getRgb()[:3] - rgb2 = pal.color(pal.Text).getRgb()[:3] + rgb = pal.color(pal.ColorRole.Base).getRgb()[:3] + rgb2 = pal.color(pal.ColorRole.Text).getRgb()[:3] self.comment_textfield.setStyleSheet(f'background-color: rgb{rgb}; color: rgb{rgb2};') self.header_widget.setText('Header') self.header_widget.addWidget(self.comment_textfield) self.ascii_table.horizontalHeader().setStretchLastSection(True) - self.buttonbox.button(QtWidgets.QDialogButtonBox.Apply).clicked.connect(self.apply) - self.buttonbox.button(QtWidgets.QDialogButtonBox.Ok).clicked.connect(self.accept) + self.buttonbox.button(QtWidgets.QDialogButtonBox.StandardButton.Apply).clicked.connect(self.apply) + self.buttonbox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok).clicked.connect(self.accept) self.changestaggeredrange(0) diff --git a/src/gui_qt/io/bdsreader.py b/src/gui_qt/io/bdsreader.py index dc52c4c..d167bbc 100644 --- a/src/gui_qt/io/bdsreader.py +++ b/src/gui_qt/io/bdsreader.py @@ -43,8 +43,8 @@ class QBDSReader(QtWidgets.QDialog, Ui_Dialog): for x2 in secondary: item = QtWidgets.QListWidgetItem(f'{x2:.8g}') - item.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsSelectable) - item.setCheckState(QtCore.Qt.Checked) + item.setFlags(QtCore.Qt.ItemFlag.ItemIsEnabled | QtCore.Qt.ItemFlag.ItemIsUserCheckable | QtCore.Qt.ItemFlag.ItemIsSelectable) + item.setCheckState(QtCore.Qt.CheckState.Checked) self.listWidget.addItem(item) def accept(self): @@ -53,7 +53,7 @@ class QBDSReader(QtWidgets.QDialog, Ui_Dialog): x2 = [] for i in range(self.listWidget.count()): item = self.listWidget.item(i) - if item.checkState() == QtCore.Qt.Checked: + if item.checkState() == QtCore.Qt.CheckState.Checked: x2.append(i) xmode = 'freq' if self.freq_button.isChecked() else 'temp' @@ -67,7 +67,7 @@ class QBDSReader(QtWidgets.QDialog, Ui_Dialog): ('sample_temp', self.temp_checkBox), ('loss_factor', self.loss_checkBox) ]: - if cb.checkState() == QtCore.Qt.Checked: + if cb.checkState() == QtCore.Qt.CheckState.Checked: values = self.reader.export(ymode=mode, xmode=xmode) for t in x2: data.append(values[t]) diff --git a/src/gui_qt/io/exporters.py b/src/gui_qt/io/exporters.py index a394322..efd167a 100644 --- a/src/gui_qt/io/exporters.py +++ b/src/gui_qt/io/exporters.py @@ -119,12 +119,11 @@ class PDFPrintExporter: def export(self, outfile): printer = QtPrintSupport.QPrinter() - printer.setOutputFormat(printer.PdfFormat) + printer.setOutputFormat(printer.OutputFormat.PdfFormat) printer.setOutputFileName(outfile) - printer.setPaperSize(QtCore.QSizeF(self.graphic.width(), self.graphic.height()), - printer.DevicePixel) - printer.setPageMargins(0, 0, 0, 0, printer.DevicePixel) + printer.setPageSize(QtGui.QPageSize(QtCore.QSizeF(self.graphic.width(), self.graphic.height()), QtGui.QPageSize.Unit.Millimeter)) + # printer.setPageMargins(0, 0, 0, 0, ) painter = QtGui.QPainter(printer) self.graphic.render(painter) diff --git a/src/gui_qt/io/fcbatchreader.py b/src/gui_qt/io/fcbatchreader.py index c62acb2..d9069f0 100644 --- a/src/gui_qt/io/fcbatchreader.py +++ b/src/gui_qt/io/fcbatchreader.py @@ -66,7 +66,7 @@ class QFCReader(QtWidgets.QDialog, Ui_FCEval_dialog): infiles = QtWidgets.QFileDialog.getExistingDirectory( caption='Select input directory', directory=str(self.path), - options=QtWidgets.QFileDialog.ShowDirsOnly, + options=QtWidgets.QFileDialog.Option.ShowDirsOnly, ) infiles = [infiles] if infiles else infiles @@ -81,7 +81,7 @@ class QFCReader(QtWidgets.QDialog, Ui_FCEval_dialog): self, caption='Select directory', directory=self.label.text(), - options=QtWidgets.QFileDialog.ShowDirsOnly, + options=QtWidgets.QFileDialog.Option.ShowDirsOnly, ) if outfile: self.label.setText(outfile) diff --git a/src/gui_qt/io/filedialog.py b/src/gui_qt/io/filedialog.py index 6134d00..658bae3 100644 --- a/src/gui_qt/io/filedialog.py +++ b/src/gui_qt/io/filedialog.py @@ -11,8 +11,8 @@ class FileDialog(QtWidgets.QFileDialog): def __init__(self, directory=None, caption=None, filter='', mode='open', parent=None): super().__init__(parent=parent) - self.setOption(QtWidgets.QFileDialog.DontUseNativeDialog, True) - self.setAcceptMode(QtWidgets.QFileDialog.AcceptOpen if mode == 'open' else QtWidgets.QFileDialog.AcceptSave) + self.setOption(QtWidgets.QFileDialog.Option.DontUseNativeDialog, True) + self.setAcceptMode(QtWidgets.QFileDialog.AcceptMode.AcceptOpen if mode == 'open' else QtWidgets.QFileDialog.AcceptMode.AcceptSave) self.setWindowTitle(caption) if directory: @@ -25,15 +25,15 @@ class FileDialog(QtWidgets.QFileDialog): file_tree = self.findChild(QtWidgets.QTreeView, 'treeView') file_tree.setSortingEnabled(True) for i in range(file_tree.header().count()): - file_tree.header().setSectionResizeMode(i, 0) + file_tree.header().setSectionResizeMode(i, QtWidgets.QHeaderView.ResizeMode.Interactive) file_tree.model().sort(0) file_list = self.findChild(QtWidgets.QListView, 'listView') file_list.model().sort(0) line = QtWidgets.QFrame(self) - line.setFrameShape(line.HLine) - line.setFrameShadow(line.Sunken) + line.setFrameShape(line.Shape.HLine) + line.setFrameShadow(line.Shadow.Sunken) self.layout().addWidget(line, self.layout().rowCount(), 0, 1, self.layout().columnCount()) def save_file(self) -> pathlib.Path | None: @@ -66,7 +66,7 @@ class OpenFileDialog(FileDialog): def __init__(self, **kwargs): super().__init__(**kwargs) - self.setFileMode(QtWidgets.QFileDialog.ExistingFiles) + self.setFileMode(QtWidgets.QFileDialog.FileMode.ExistingFiles) self.checkBox = QtWidgets.QCheckBox(self) self.checkBox.setChecked(False) @@ -91,7 +91,7 @@ class OpenFileDialog(FileDialog): self.checkBox.hide() def checkbox_state(self, checked: QtCore.Qt.CheckState): - if checked == QtCore.Qt.Checked: + if checked == QtCore.Qt.CheckState.Checked: self.comboBox.setEnabled(True) self.add_to_graph = self.comboBox.currentData() else: @@ -107,19 +107,19 @@ class SaveDirectoryDialog(FileDialog): def __init__(self, **kwargs): super().__init__(**kwargs) - self.setOption(QtWidgets.QFileDialog.DontConfirmOverwrite, False) - self.setAcceptMode(QtWidgets.QFileDialog.AcceptSave) + self.setOption(QtWidgets.QFileDialog.Option.DontConfirmOverwrite, False) + self.setAcceptMode(QtWidgets.QFileDialog.AcceptMode.AcceptSave) lay = self.layout() self.label = QtWidgets.QLabel(self) - self.label.setTextFormat(QtCore.Qt.RichText) + self.label.setTextFormat(QtCore.Qt.TextFormat.RichText) self.label.setText('Use <label> as placeholder in filename. (e.g. t1_<label>.dat)') lay.addWidget(self.label, lay.rowCount(), 0, 1, lay.columnCount()) line = QtWidgets.QFrame(self) - line.setFrameShape(line.HLine) - line.setFrameShadow(line.Sunken) + line.setFrameShape(line.Shape.HLine) + line.setFrameShadow(line.Shadow.Sunken) lay.addWidget(line, lay.rowCount(), 0, 1, lay.columnCount()) h_layout = QtWidgets.QHBoxLayout() diff --git a/src/gui_qt/io/filereaders.py b/src/gui_qt/io/filereaders.py index 59b491a..486cc94 100755 --- a/src/gui_qt/io/filereaders.py +++ b/src/gui_qt/io/filereaders.py @@ -51,7 +51,7 @@ class QFileReader(QtCore.QObject): if not isinstance(fname, list): fname = [fname] - status = QtWidgets.QDialog.Accepted + status = QtWidgets.QDialog.DialogCode.Accepted for f in fname: f = Path(f) dtype = self.guess_type(f) diff --git a/src/gui_qt/io/gracereader.py b/src/gui_qt/io/gracereader.py index 987bed8..479dae6 100644 --- a/src/gui_qt/io/gracereader.py +++ b/src/gui_qt/io/gracereader.py @@ -1,12 +1,13 @@ import numpy as np -from nmreval.lib.lines import LineStyle -from nmreval.lib.symbols import SymbolStyle from nmreval.data.points import Points from nmreval.io.graceeditor import GraceEditor from nmreval.utils.text import convert from ..Qt import QtCore, QtWidgets, QtGui + +from ..lib.symbols import SymbolStyle +from ..lib.lines import LineStyle from .._py.gracereader import Ui_Dialog @@ -30,15 +31,16 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog): return self def eventFilter(self, src: QtCore.QObject, evt: QtCore.QEvent): - if evt.type() == QtCore.QEvent.KeyPress: - if evt.key() == QtCore.Qt.Key_Space: + if evt.type() == QtCore.QEvent.Type.KeyPress: + if evt.key() == QtCore.Qt.Key.Key_Space: iterator = QtWidgets.QTreeWidgetItemIterator(self.treeWidget) while iterator.value(): item = iterator.value() if item.parent() is not None and item.isSelected(): - item.setCheckState(0, - QtCore.Qt.Checked if item.checkState(0) == QtCore.Qt.Unchecked else - QtCore.Qt.Unchecked) + item.setCheckState( + 0, + QtCore.Qt.Checked if item.checkState(0) == QtCore.Qt.CheckState.Unchecked else QtCore.Qt.CheckState.Unchecked, + ) iterator += 1 @@ -62,8 +64,8 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog): item_2 = QtWidgets.QTreeWidgetItem([f'Set {gset.idx} (Label: {legend_str}, ' f'shape: {ds.shape})']) - item_2.setCheckState(0, QtCore.Qt.Checked) - item_2.setData(0, QtCore.Qt.UserRole, (graphs.idx, gset.idx)) + item_2.setCheckState(0, QtCore.Qt.CheckState.Checked) + item_2.setData(0, QtCore.Qt.ItemDataRole.UserRole, (graphs.idx, gset.idx)) item.addChild(item_2) self.treeWidget.addTopLevelItem(item) @@ -71,7 +73,7 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog): @QtCore.pyqtSlot(QtWidgets.QTreeWidgetItem, int) def show_property(self, item: QtWidgets.QTreeWidgetItem, col: int): - keys = item.data(col, QtCore.Qt.UserRole) + keys = item.data(col, QtCore.Qt.ItemDataRole.UserRole) if keys is not None: cols = self._reader.colors @@ -86,9 +88,10 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog): def accept(self): data = [] - iterator = QtWidgets.QTreeWidgetItemIterator(self.treeWidget, - QtWidgets.QTreeWidgetItemIterator.NoChildren | - QtWidgets.QTreeWidgetItemIterator.Checked) + iterator = QtWidgets.QTreeWidgetItemIterator( + self.treeWidget, + QtWidgets.QTreeWidgetItemIterator.NoChildren | QtWidgets.QTreeWidgetItemIterator.Checked, + ) while iterator.value(): item = iterator.value() diff --git a/src/gui_qt/io/hdfreader.py b/src/gui_qt/io/hdfreader.py index c59ad01..7e71671 100644 --- a/src/gui_qt/io/hdfreader.py +++ b/src/gui_qt/io/hdfreader.py @@ -58,11 +58,11 @@ class QHdfViewer(QtWidgets.QDialog, Ui_Hdf_Dialog): if node.children is not None: for child in node.children.values(): label_item = QtWidgets.QTreeWidgetItem([child.name]) - label_item.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsSelectable) + label_item.setFlags(QtCore.Qt.ItemFlag.ItemIsEnabled | QtCore.Qt.ItemFlag.ItemIsUserCheckable | QtCore.Qt.ItemFlag.ItemIsSelectable) label_item.setCheckState(0, QtCore.Qt.Unchecked) if child.type == 'signal': label_item.setBackground(0, QtGui.QBrush(QtGui.QColor(31, 119, 180))) - label_item.setCheckState(1, QtCore.Qt.Unchecked) + label_item.setCheckState(1, QtCore.Qt.CheckState.Unchecked) elif child.type == 'points': label_item.setBackground(0, QtGui.QBrush(QtGui.QColor(255, 127, 14))) item.addChild(label_item) @@ -93,7 +93,7 @@ class QHdfViewer(QtWidgets.QDialog, Ui_Hdf_Dialog): else: group = self.comboBox_2.currentText() - iterator = QtWidgets.QTreeWidgetItemIterator(self.treewidget, QtWidgets.QTreeWidgetItemIterator.NoChildren) + iterator = QtWidgets.QTreeWidgetItemIterator(self.treewidget, QtWidgets.QTreeWidgetItemIterator.IteratorFlag.NoChildren) selected = [] while iterator.value(): item = iterator.value() @@ -132,7 +132,7 @@ class VarTable(QtWidgets.QTableWidget): self.setRowCount(len(vars)) for i, (k, v) in enumerate(vars.items()): key_item = QtWidgets.QTableWidgetItem(k) - key_item.setFlags(QtCore.Qt.NoItemFlags) + key_item.setFlags(QtCore.Qt.ItemFlag.NoItemFlags) key_item.setForeground(QtGui.QBrush(QtGui.QColor(0, 0, 0))) if isinstance(v, list): val = f'<{len(v)} values>' @@ -145,7 +145,7 @@ class VarTable(QtWidgets.QTableWidget): val = str(v) tip = val value_item = QtWidgets.QTableWidgetItem(val) - value_item.setFlags(QtCore.Qt.NoItemFlags) + value_item.setFlags(QtCore.Qt.ItemFlag.NoItemFlags) value_item.setForeground(QtGui.QBrush(QtGui.QColor(0, 0, 0))) value_item.setToolTip(tip) self.setItem(i, 0, key_item) @@ -157,17 +157,17 @@ class HDFTreeWidget(QtWidgets.QTreeWidget): super().__init__(parent=parent) self.setHeaderLabels(['Data', 'Spectrum?']) - self.header().setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch) - self.header().setSectionResizeMode(1, QtWidgets.QHeaderView.Fixed) + self.header().setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeMode.Stretch) + self.header().setSectionResizeMode(1, QtWidgets.QHeaderView.ResizeMode.Fixed) self.header().setStretchLastSection(False) self.header().setCascadingSectionResizes(True) - self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) - self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectItems) + self.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection) + self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectItems) self.itemChanged.connect(self.change_item) def keyPressEvent(self, evt: QtGui.QKeyEvent): - if evt.key() == QtCore.Qt.Key_Space: + if evt.key() == QtCore.Qt.Key.Key_Space: for idx in self.selectedIndexes(): item = self.itemFromIndex(idx) col = idx.column() diff --git a/src/gui_qt/io/save_fitparameter.py b/src/gui_qt/io/save_fitparameter.py index 44769dc..d90ed92 100644 --- a/src/gui_qt/io/save_fitparameter.py +++ b/src/gui_qt/io/save_fitparameter.py @@ -43,7 +43,7 @@ class QSaveFit(QtWidgets.QDialog, Ui_fitparameter_save_dialog): self.col_line.setText(self.tableWidget.item(row, 0).text()) def set_save_path(self): - fname, _ = QtWidgets.QFileDialog.getSaveFileName(options=QtWidgets.QFileDialog.DontConfirmOverwrite, + fname, _ = QtWidgets.QFileDialog.getSaveFileName(options=QtWidgets.QFileDialog.Option.DontConfirmOverwrite, directory=self.outpath) if fname: diff --git a/src/gui_qt/lib/backup.py b/src/gui_qt/lib/backup.py index 29ed6f3..2ff0b32 100644 --- a/src/gui_qt/lib/backup.py +++ b/src/gui_qt/lib/backup.py @@ -143,12 +143,12 @@ class QLonelyBackupWindow(QtWidgets.QDialog): self.table.setGridStyle(QtCore.Qt.PenStyle.DashLine) # self.table.horizontalHeader().setStretchLastSection(True) self.table.verticalHeader().setVisible(False) - self.table.horizontalHeader().setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch) + self.table.horizontalHeader().setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeMode.Stretch) layout.addWidget(self.table) self.buttons = QtWidgets.QDialogButtonBox(self) self.buttons.setOrientation(QtCore.Qt.Orientation.Horizontal) - self.buttons.setStandardButtons(QtWidgets.QDialogButtonBox.Ok) + self.buttons.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Ok) layout.addWidget(self.buttons) self.buttons.accepted.connect(self.accept) diff --git a/src/gui_qt/lib/color_dialog.py b/src/gui_qt/lib/color_dialog.py index 538938a..7ddc084 100644 --- a/src/gui_qt/lib/color_dialog.py +++ b/src/gui_qt/lib/color_dialog.py @@ -17,8 +17,8 @@ class ColorDialog(QtWidgets.QDialog, Ui_Dialog): self.colorlist.installEventFilter(self) def eventFilter(self, src: QtCore.QObject, evt: QtCore.QEvent) -> bool: - if evt.type() == evt.KeyPress: - if evt.key() == QtCore.Qt.Key_Delete: + if evt.type() == evt.Type.KeyPress: + if evt.key() == QtCore.Qt.Key.Key_Delete: self.colorlist.takeItem(self.colorlist.currentRow()) return True @@ -33,14 +33,14 @@ class ColorDialog(QtWidgets.QDialog, Ui_Dialog): for color in self._palettes[self.palette_combobox.currentText()]: item = QtWidgets.QListWidgetItem(color.name) - item.setData(QtCore.Qt.DecorationRole, QtGui.QColor.fromRgbF(*color.rgb(normed=True))) + item.setData(QtCore.Qt.ItemDataRole.DecorationRole, QtGui.QColor.fromRgbF(*color.rgb(normed=True))) self.colorlist.addItem(item) @QtCore.pyqtSlot(name='on_add_color_button_pressed') def add_color(self): color = self.color_combobox.value item = QtWidgets.QListWidgetItem(color.name) - item.setData(QtCore.Qt.DecorationRole, QtGui.QColor.fromRgbF(*color.rgb(normed=True))) + item.setData(QtCore.Qt.ItemDataRole.DecorationRole, QtGui.QColor.fromRgbF(*color.rgb(normed=True))) self.colorlist.addItem(item) @QtCore.pyqtSlot(name='on_save_button_pressed') @@ -65,7 +65,7 @@ class ColorDialog(QtWidgets.QDialog, Ui_Dialog): f.write('#-- %s\n' % color_name) for i in range(self.colorlist.count()): item = self.colorlist.item(i) - r, g, b = item.data(QtCore.Qt.DecorationRole).getRgbF()[:3] + r, g, b = item.data(QtCore.Qt.ItemDataRole.DecorationRole).getRgbF()[:3] new_palette.append(Colors.from_rgb(r, g, b, normed=True)) f.write(f'{r*255:.1f}, {g*255:.1f}, {b*255:.1f}\n') f.write('\n') diff --git a/src/gui_qt/lib/configurations.py b/src/gui_qt/lib/configurations.py index 092193e..96a6745 100644 --- a/src/gui_qt/lib/configurations.py +++ b/src/gui_qt/lib/configurations.py @@ -62,7 +62,7 @@ class GraceMsgBox(QtWidgets.QDialog): layout.addWidget(self.graph_combobox, 4, 2, 1, 1) self.buttonbox = QtWidgets.QDialogButtonBox(self) - self.buttonbox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) + self.buttonbox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel | QtWidgets.QDialogButtonBox.StandardButton.Ok) layout.addWidget(self.buttonbox, 5, 1, 1, 2) self.buttonbox.rejected.connect(self.reject) @@ -120,7 +120,7 @@ class GeneralConfiguration(QtWidgets.QDialog): layout.addWidget(group) self.buttonbox = QtWidgets.QDialogButtonBox(self) - self.buttonbox.setStandardButtons(self.buttonbox.Ok|self.buttonbox.Cancel) + self.buttonbox.setStandardButtons(self.buttonbox.StandardButton.Ok | self.buttonbox.StandardButton.Cancel) self.buttonbox.rejected.connect(self.close) self.buttonbox.accepted.connect(self.accept) layout.addWidget(self.buttonbox) diff --git a/src/gui_qt/lib/delegates.py b/src/gui_qt/lib/delegates.py index 2ef865c..55c4b67 100644 --- a/src/gui_qt/lib/delegates.py +++ b/src/gui_qt/lib/delegates.py @@ -1,15 +1,15 @@ import re from nmreval.lib.colors import BaseColor, Colors -from nmreval.lib.lines import LineStyle -from nmreval.lib.symbols import SymbolStyle, make_symbol_pixmap from ..Qt import QtWidgets, QtGui, QtCore +from ..lib.lines import LineStyle +from ..lib.symbols import SymbolStyle, make_symbol_pixmap class PropertyDelegate(QtWidgets.QStyledItemDelegate): def paint(self, painter: QtGui.QPainter, options: QtWidgets.QStyleOptionViewItem, idx: QtCore.QModelIndex): - r = idx.data(QtCore.Qt.DisplayRole) + r = idx.data(QtCore.Qt.ItemDataRole.DisplayRole) if r is not None: if isinstance(r, BaseColor): painter.save() @@ -22,10 +22,10 @@ class PropertyDelegate(QtWidgets.QStyledItemDelegate): painter.save() pen = QtGui.QPen() pal = QtGui.QGuiApplication.palette() - pen.setColor(pal.color(QtGui.QPalette.Text)) + pen.setColor(pal.color(QtGui.QPalette.ColorRole.Text)) pen.setWidth(2) - pen.setStyle(r.value) - pen.setCapStyle(QtCore.Qt.RoundCap) + pen.setStyle(r.to_qt()) + pen.setCapStyle(QtCore.Qt.PenCapStyle.RoundCap) painter.setPen(pen) rect = options.rect @@ -38,14 +38,14 @@ class PropertyDelegate(QtWidgets.QStyledItemDelegate): painter.save() pen = QtGui.QPen() pal = QtGui.QGuiApplication.palette() - pen.setColor(pal.color(QtGui.QPalette.Text)) + pen.setColor(pal.color(QtGui.QPalette.ColorRole.Text)) painter.setPen(pen) pm = make_symbol_pixmap(r) painter.drawPixmap(options.rect.topLeft()+QtCore.QPoint(3, int((options.rect.height()-pm.height())/2)), pm) style = QtWidgets.QApplication.style() - text_rect = style.subElementRect(QtWidgets.QStyle.SE_ItemViewItemText, options, None) + text_rect = style.subElementRect(QtWidgets.QStyle.SubElement.SE_ItemViewItemText, options, None) text_rect.adjust(5+pm.width(), 0, 0, 0) painter.drawText(text_rect, options.displayAlignment, r.name) @@ -112,7 +112,7 @@ class ColorListEditor(QtWidgets.QComboBox): self.setItemData(i, colorName) px = QtGui.QPixmap(self.iconSize()) px.fill(color) - self.setItemData(i, QtGui.QIcon(px), QtCore.Qt.DecorationRole) + self.setItemData(i, QtGui.QIcon(px), QtCore.Qt.ItemDataRole.DecorationRole) class SpinBoxEditor(QtWidgets.QDoubleSpinBox): @@ -159,17 +159,17 @@ class LineStyleEditor(QtWidgets.QComboBox): painter = QtWidgets.QStylePainter(self) opt = QtWidgets.QStyleOptionComboBox() self.initStyleOption(opt) - painter.drawComplexControl(QtWidgets.QStyle.CC_ComboBox, opt) + painter.drawComplexControl(QtWidgets.QStyle.ComplexControl.CC_ComboBox, opt) pen = QtGui.QPen() pal = QtGui.QGuiApplication.palette() - pen.setColor(pal.color(QtGui.QPalette.Text)) + pen.setColor(pal.color(QtGui.QPalette.ColorRole.Text)) pen.setWidth(2) - pen.setStyle(self.currentData().value) - pen.setCapStyle(QtCore.Qt.RoundCap) + pen.setStyle(self.currentData().to_qt()) + pen.setCapStyle(QtCore.Qt.PenCapStyle.RoundCap) painter.setPen(pen) - rect = painter.style().subControlRect(QtWidgets.QStyle.CC_ComboBox, - opt, QtWidgets.QStyle.SC_ComboBoxEditField, None) + rect = painter.style().subControlRect(QtWidgets.QStyle.ComplexControl.CC_ComboBox, + opt, QtWidgets.QStyle.SubControl.SC_ComboBoxEditField, None) rect.adjust(+10, 0, -10, 0) mid = int((rect.bottom() + rect.top()) / 2) painter.drawLine(rect.left(), mid, rect.right(), mid) @@ -180,15 +180,15 @@ class LineStyleEditor(QtWidgets.QComboBox): class LineStyleDelegate(QtWidgets.QStyledItemDelegate): def paint(self, painter, option, index): - data = index.data(QtCore.Qt.UserRole) + data = index.data(QtCore.Qt.ItemDataRole.UserRole) if data is not None: pen = QtGui.QPen() pal = QtGui.QGuiApplication.palette() - pen.setColor(pal.color(QtGui.QPalette.Text)) + pen.setColor(pal.color(QtGui.QPalette.ColorRole.Text)) pen.setWidth(2) - pen.setStyle(data.value) - pen.setCapStyle(QtCore.Qt.RoundCap) + pen.setStyle(data.to_qt()) + pen.setCapStyle(QtCore.Qt.PenCapStyle.RoundCap) painter.setPen(pen) rect = option.rect @@ -220,7 +220,7 @@ class SymbolStyleEditor(QtWidgets.QComboBox): for i, s in enumerate(SymbolStyle): self.insertItem(i, re.sub(r'([A-Z])', r' \g<1>', s.name)) self.setItemData(i, s) - self.setItemData(i, make_symbol_pixmap(s), QtCore.Qt.DecorationRole) + self.setItemData(i, make_symbol_pixmap(s), QtCore.Qt.ItemDataRole.DecorationRole) class HeaderDelegate(QtWidgets.QStyledItemDelegate): @@ -230,12 +230,12 @@ class HeaderDelegate(QtWidgets.QStyledItemDelegate): header_option.rect = option.rect style = QtWidgets.QApplication.style() - style.drawControl(QtWidgets.QStyle.CE_HeaderSection, header_option, painter) + style.drawControl(QtWidgets.QStyle.ControlElement.CE_HeaderSection, header_option, painter) - text_rect = style.subElementRect(QtWidgets.QStyle.SE_ItemViewItemText, option, None) + text_rect = style.subElementRect(QtWidgets.QStyle.SubElement.SE_ItemViewItemText, option, None) text_rect.adjust(2, 0, 0, 0) - if option.state & QtWidgets.QStyle.State_Selected: + if option.state & QtWidgets.QStyle.StateFlag.State_Selected: painter.fillRect(option.rect, option.palette.highlight()) - painter.drawText(text_rect, option.displayAlignment, index.data(QtCore.Qt.DisplayRole)) + painter.drawText(text_rect, option.displayAlignment, index.data(QtCore.Qt.ItemDataRole.DisplayRole)) diff --git a/src/gui_qt/lib/expandablewidget.py b/src/gui_qt/lib/expandablewidget.py index 12b9ec9..3a33998 100644 --- a/src/gui_qt/lib/expandablewidget.py +++ b/src/gui_qt/lib/expandablewidget.py @@ -23,13 +23,13 @@ class ExpandableWidget(QtWidgets.QWidget): self.horizontalLayout.setSpacing(0) self.toolButton = QtWidgets.QToolButton(self) - self.toolButton.setArrowType(QtCore.Qt.RightArrow) + self.toolButton.setArrowType(QtCore.Qt.ArrowType.RightArrow) self.toolButton.setStyleSheet('border: 0') - self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) + self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonStyle.ToolButtonTextBesideIcon) self.horizontalLayout.addWidget(self.toolButton) self.line = QtWidgets.QFrame(self) - self.line.setFrameShape(QtWidgets.QFrame.HLine) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) self.horizontalLayout.addWidget(self.line) self.verticalLayout.addLayout(self.horizontalLayout) @@ -55,9 +55,9 @@ class ExpandableWidget(QtWidgets.QWidget): def setExpansion(self, state: bool): self.blockSignals(True) if state: - self.toolButton.setArrowType(QtCore.Qt.DownArrow) + self.toolButton.setArrowType(QtCore.Qt.ArrowType.DownArrow) else: - self.toolButton.setArrowType(QtCore.Qt.RightArrow) + self.toolButton.setArrowType(QtCore.Qt.ArrowType.RightArrow) self._expanded = state if self._widget is not None: diff --git a/src/gui_qt/lib/forms.py b/src/gui_qt/lib/forms.py index ab20ce3..0cf1988 100644 --- a/src/gui_qt/lib/forms.py +++ b/src/gui_qt/lib/forms.py @@ -130,7 +130,7 @@ class FormWidget(QtWidgets.QWidget): self.label = QtWidgets.QLabel(self) layout.addWidget(self.label) - layout.addSpacerItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) + layout.addSpacerItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)) self.vals = QtWidgets.QLineEdit(self) layout.addWidget(self.vals) @@ -156,7 +156,7 @@ class FormWidget(QtWidgets.QWidget): def setChecked(self, enable): if self._checkable: - self.checkBox.setCheckState(QtCore.Qt.Checked if enable else QtCore.Qt.Unchecked) + self.checkBox.setCheckState(QtCore.Qt.CheckState.Checked if enable else QtCore.Qt.CheckState.Unchecked) else: print(f'Parameter {self._name} is not variable') @@ -189,8 +189,8 @@ class SelectionWidget(QtWidgets.QWidget): layout.addWidget(self.label) layout.addSpacerItem(QtWidgets.QSpacerItem(65, 20, - QtWidgets.QSizePolicy.Expanding, - QtWidgets.QSizePolicy.Minimum)) + QtWidgets.QSizePolicy.Policy.Expanding, + QtWidgets.QSizePolicy.Policy.Minimum)) self.comboBox = QtWidgets.QComboBox(self) layout.addWidget(self.comboBox) @@ -249,7 +249,7 @@ class Widget(QtWidgets.QWidget, Ui_mean_form): def change_graph(self, idx: int): self.set_combobox.clear() - key = self.graph_combobox.itemData(idx, QtCore.Qt.UserRole) + key = self.graph_combobox.itemData(idx, QtCore.Qt.ItemDataRole.UserRole) if key is not None: for set_key, set_name in self._tree[key][1]: self.set_combobox.addItem(set_name, userData=set_key) @@ -273,9 +273,9 @@ class Widget(QtWidgets.QWidget, Ui_mean_form): box = self.sender() other_box = self.data_checkbox if box == self.digit_checkbox else self.digit_checkbox - if (state == QtCore.Qt.Unchecked) and (other_box.checkState() == QtCore.Qt.Unchecked): + if (state == QtCore.Qt.CheckState.Unchecked) and (other_box.checkState() == QtCore.Qt.CheckState.Unchecked): box.blockSignals(True) - box.setCheckState(QtCore.Qt.Checked) + box.setCheckState(QtCore.Qt.CheckState.Checked) box.blockSignals(False) return @@ -287,7 +287,7 @@ class Widget(QtWidgets.QWidget, Ui_mean_form): @QtCore.pyqtSlot(int) def collapse_widgets(self, state: int): - data_is_checked = state == QtCore.Qt.Checked + data_is_checked = state == QtCore.Qt.CheckState.Checked self.frame.setVisible(data_is_checked) self.lineEdit.setVisible(not data_is_checked) @@ -300,9 +300,9 @@ class CheckBoxHeader(QtWidgets.QHeaderView): _width = 20 _height = 20 - def __init__(self, column_indices, orientation=QtCore.Qt.Horizontal, parent=None): + def __init__(self, column_indices, orientation=QtCore.Qt.Orientation.Horizontal, parent=None): super().__init__(orientation, parent) - self.setSectionResizeMode(QtWidgets.QHeaderView.Stretch) + self.setSectionResizeMode(QtWidgets.QHeaderView.ResizeMode.Stretch) # self.setClickable(True) if isinstance(column_indices, list) or isinstance(column_indices, tuple): @@ -326,15 +326,15 @@ class CheckBoxHeader(QtWidgets.QHeaderView): if logicalIndex in self.column_indices: option = QtWidgets.QStyleOptionButton() option.rect = QtCore.QRect(rect.x() + self._x_offset, rect.y() + self._y_offset, self._width, self._height) - option.state = QtWidgets.QStyle.State_Enabled | QtWidgets.QStyle.State_Active + option.state = QtWidgets.QStyle.StateFlag.State_Enabled | QtWidgets.QStyle.StateFlag.State_Active if self.isChecked[logicalIndex] == 2: - option.state |= QtWidgets.QStyle.State_NoChange + option.state |= QtWidgets.QStyle.StateFlag.State_NoChange elif self.isChecked[logicalIndex]: - option.state |= QtWidgets.QStyle.State_On + option.state |= QtWidgets.QStyle.StateFlag.State_On else: - option.state |= QtWidgets.QStyle.State_Off + option.state |= QtWidgets.QStyle.StateFlag.State_Off - self.style().drawControl(QtWidgets.QStyle.CE_CheckBox,option,painter) + self.style().drawControl(QtWidgets.QStyle.ControlElement.CE_CheckBox, option, painter) def updateCheckState(self, index, state): self.isChecked[index] = state @@ -376,7 +376,7 @@ class CustomRangeDialog(QtWidgets.QDialog): self._limits[i-1].append(lim) self.gl.addWidget(lim, i, 2*j+1) - self.buttonbox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok) + self.buttonbox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.StandardButton.Ok) self.buttonbox.accepted.connect(self.accept) self.gl.addWidget(self.buttonbox, 3, 0, 1, 4) @@ -398,19 +398,19 @@ class CustomRangeDialog(QtWidgets.QDialog): class ElideComboBox(QtWidgets.QComboBox): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.view().setTextElideMode(QtCore.Qt.ElideRight) + self.view().setTextElideMode(QtCore.Qt.TextElideMode.ElideRight) def paintEvent(self, evt: QtGui.QPaintEvent): opt = QtWidgets.QStyleOptionComboBox() self.initStyleOption(opt) painter = QtWidgets.QStylePainter(self) - painter.drawComplexControl(QtWidgets.QStyle.CC_ComboBox, opt) + painter.drawComplexControl(QtWidgets.QStyle.ComplexControl.CC_ComboBox, opt) - rect = self.style().subControlRect(QtWidgets.QStyle.CC_ComboBox, opt, QtWidgets.QStyle.SC_ComboBoxEditField, self) + rect = self.style().subControlRect(QtWidgets.QStyle.ComplexControl.CC_ComboBox, opt, QtWidgets.QStyle.SubControl.SC_ComboBoxEditField, self) - opt.currentText = painter.fontMetrics().elidedText(opt.currentText, QtCore.Qt.ElideRight, rect.width()) - painter.drawControl(QtWidgets.QStyle.CE_ComboBoxLabel, opt) + opt.currentText = painter.fontMetrics().elidedText(opt.currentText, QtCore.Qt.TextElideMode.ElideRight, rect.width()) + painter.drawControl(QtWidgets.QStyle.ControlElement.CE_ComboBoxLabel, opt) class CheckCombobox(QtWidgets.QComboBox): @@ -419,8 +419,8 @@ class CheckCombobox(QtWidgets.QComboBox): super().addItem(text, userData=userData) item = self.model().item(self.count()-1) - item.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsUserCheckable) - item.setCheckState(QtCore.Qt.Checked) + item.setFlags(QtCore.Qt.ItemFlag.ItemIsEnabled | QtCore.Qt.ItemFlag.ItemIsUserCheckable) + item.setCheckState(QtCore.Qt.CheckState.Checked) def addItems(self, text): for text_i in text: diff --git a/src/gui_qt/lib/gol.py b/src/gui_qt/lib/gol.py index 6974b03..1140384 100644 --- a/src/gui_qt/lib/gol.py +++ b/src/gui_qt/lib/gol.py @@ -2,7 +2,6 @@ from __future__ import annotations import numbers import numpy as np -import sys from itertools import accumulate from ..Qt import QtWidgets, QtGui, QtCore @@ -45,6 +44,7 @@ def plus(a): return pxl + # birth, survival predefined_rules = { 'Conway': ('23', '3'), @@ -209,7 +209,7 @@ class QGameOfLife(QtWidgets.QDialog, Ui_Form): for w in self.random_widgets[1:] + [self.object_widget]: w.hide() - self.setGeometry(QtWidgets.QStyle.alignedRect(QtCore.Qt.LeftToRight, QtCore.Qt.AlignCenter, + self.setGeometry(QtWidgets.QStyle.alignedRect(QtCore.Qt.LayoutDirection.LeftToRight, QtCore.Qt.AlignmentFlag.AlignCenter, self.size(), QtWidgets.qApp.desktop().availableGeometry())) self.view.resizeEvent = self.resizeEvent @@ -292,7 +292,7 @@ class QGameOfLife(QtWidgets.QDialog, Ui_Form): self.game = GameOfLife(self._size, pattern=pattern, fill=fill, num_pop=num_pop, rules=(self.birth_line.text(), self.survival_line.text())) self.draw() - self.view.fitInView(self.item, QtCore.Qt.KeepAspectRatio) + self.view.fitInView(self.item, QtCore.Qt.AspectRatioMode.KeepAspectRatio) self.timer.start() @@ -332,7 +332,7 @@ class QGameOfLife(QtWidgets.QDialog, Ui_Form): def draw(self): bitmap = self.game.draw(shade=self._shading) h, w, c = bitmap.shape - image = QtGui.QImage(bitmap.tobytes(), w, h, w*c, QtGui.QImage.Format_RGB888) + image = QtGui.QImage(bitmap.tobytes(), w, h, w*c, QtGui.QImage.Format.Format_RGB888) self.scene.removeItem(self.item) pixmap = QtGui.QPixmap.fromImage(image) self.item = self.scene.addPixmap(pixmap) @@ -340,15 +340,15 @@ class QGameOfLife(QtWidgets.QDialog, Ui_Form): @QtCore.pyqtSlot(int) def on_hide_button_stateChanged(self, state: int): self.option_frame.setVisible(not state) - self.view.fitInView(self.scene.sceneRect(), QtCore.Qt.KeepAspectRatio) + self.view.fitInView(self.scene.sceneRect(), QtCore.Qt.AspectRatioMode.KeepAspectRatio) def resizeEvent(self, evt): super().resizeEvent(evt) - self.view.fitInView(self.item, QtCore.Qt.KeepAspectRatio) + self.view.fitInView(self.item, QtCore.Qt.AspectRatioMode.KeepAspectRatio) def showEvent(self, evt): super().showEvent(evt) - self.view.fitInView(self.scene.sceneRect(), QtCore.Qt.KeepAspectRatio) + self.view.fitInView(self.scene.sceneRect(), QtCore.Qt.AspectRatioMode.KeepAspectRatio) class QSliderText(QtWidgets.QWidget): @@ -359,9 +359,9 @@ class QSliderText(QtWidgets.QWidget): layout.setSpacing(3) self.slider = QtWidgets.QSlider(self) - self.slider.setOrientation(QtCore.Qt.Horizontal) + self.slider.setOrientation(QtCore.Qt.Orientation.Horizontal) self.slider.setMaximum(100) - self.slider.setTickPosition(self.slider.TicksBothSides) + self.slider.setTickPosition(self.slider.TickPosition.TicksBothSides) self.slider.setTickInterval(5) self.value = QtWidgets.QLabel(self) diff --git a/src/gui_qt/lib/iconloading.py b/src/gui_qt/lib/iconloading.py index 0a41634..f550a4d 100644 --- a/src/gui_qt/lib/iconloading.py +++ b/src/gui_qt/lib/iconloading.py @@ -24,7 +24,7 @@ def make_action_icons(widget): dirname = 'resources.icons.%s_light' % icon_type with path(dirname, img+'.png') as imgpath: icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(str(imgpath)), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(str(imgpath)), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) getattr(widget, ac).setIcon(icon) else: @@ -35,7 +35,7 @@ def make_action_icons(widget): dirname = 'resources.icons.%s_light' % icon_type imgpath = resource_filename(dirname, img+'.png') icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(str(imgpath)), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(str(imgpath)), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) getattr(widget, ac).setIcon(icon) @@ -55,12 +55,12 @@ def get_icon(icon_name): if HAS_IMPORTLIB_RESOURCE: with path(dirname, icon_name+'.png') as imgpath: icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(str(imgpath)), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(str(imgpath)), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) return icon else: imgpath = resource_filename(dirname, icon_name+'.png') icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(imgpath), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(imgpath), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) return icon diff --git a/src/nmreval/lib/lines.py b/src/gui_qt/lib/lines.py similarity index 59% rename from src/nmreval/lib/lines.py rename to src/gui_qt/lib/lines.py index 93e7608..69bc037 100644 --- a/src/nmreval/lib/lines.py +++ b/src/gui_qt/lib/lines.py @@ -1,8 +1,8 @@ import enum try: - from ..Qt import QtCore + from gui_qt.Qt import QtCore HAS_QT = True -except ImportError: +except OverflowError: HAS_QT = False @@ -19,8 +19,14 @@ class LineStyle(enum.Enum): def to_qt(self): if HAS_QT: - return [QtCore.Qt.NoPen, QtCore.Qt.SolidLine, QtCore.Qt.DashLine, - QtCore.Qt.DotLine, QtCore.Qt.DashDotLine, QtCore.Qt.DashDotDotLine][self.value] + return [ + QtCore.Qt.PenStyle.NoPen, + QtCore.Qt.PenStyle.SolidLine, + QtCore.Qt.PenStyle.DashLine, + QtCore.Qt.PenStyle.DotLine, + QtCore.Qt.PenStyle.DashDotLine, + QtCore.Qt.PenStyle.DashDotDotLine + ][self.value] else: raise ImportError('Qt library is not loaded.') diff --git a/src/gui_qt/lib/logger.py b/src/gui_qt/lib/logger.py index e495ee1..cffe873 100644 --- a/src/gui_qt/lib/logger.py +++ b/src/gui_qt/lib/logger.py @@ -1,3 +1,4 @@ +import enum import logging from pathlib import Path @@ -8,14 +9,13 @@ from ..Qt import QtWidgets, QtCore, QtGui from nmreval.configs import config_paths -STYLES = { - 'INFO': _make_textformats('black'), - 'WARNING': _make_textformats('blue'), - 'ERROR': _make_textformats('red', 'bold'), - 'DEBUG': _make_textformats('black', 'italic'), - 'file': _make_textformats('red', 'italic'), - 'PyError': _make_textformats('red', 'bold-italic'), -} +class Styles(enum.Enum): + INFO = _make_textformats('black') + WARNING = _make_textformats('blue') + ERROR = _make_textformats('red', 'bold') + DEBUG = _make_textformats('black', 'italic') + FILE = _make_textformats('red', 'italic') + PYERROR = _make_textformats('red', 'bold-italic') class LogHighlighter(QtGui.QSyntaxHighlighter): @@ -24,29 +24,26 @@ class LogHighlighter(QtGui.QSyntaxHighlighter): def __init__(self, parent): super(LogHighlighter, self).__init__(parent) - rules = list() - rules += [(r'\b\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2} - %s - .*' % m, 0, STYLES[m]) for m in LogHighlighter.msg] - rules += [(r'\b[A-Z]\w*Error: .*\b', 0, STYLES['PyError'])] - rules += [(r'\bFile .*', 0, STYLES['file'])] + rules = [(r'\b\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2} - %s - .*' % m, 0, Styles[m]) for m in LogHighlighter.msg] + rules += [(r'\b[A-Z]\w*Error: .*\b', 0, Styles.PYERROR)] + rules += [(r'\bFile .*', 0, Styles.FILE)] - self.rules = [(QtCore.QRegExp(pat), index, fmt) for (pat, index, fmt) in rules] + self.rules = [(QtCore.QRegularExpression(pat), index, fmt.value) for (pat, index, fmt) in rules] def highlightBlock(self, text): """Apply syntax highlighting to the given block of text. """ # Do other syntax formatting - for expression, nth, format in self.rules: - index = expression.indexIn(text, 0) + for expression, nth, formatting in self.rules: + index = expression.globalMatch(text, 0) - while index >= 0: + while index.hasNext(): # We actually want the index of the nth match - index = expression.pos(nth) - try: - length = expression.cap(nth).length() - except AttributeError: - length = len(expression.cap(nth)) - self.setFormat(index, length, format) - index = expression.indexIn(text, index + length) + # index = expression.pos(nth) + match = index.next() + match.capturedStart(nth) + + self.setFormat(match.capturedStart(nth), match.capturedLength(nth), formatting) self.setCurrentBlockState(0) diff --git a/src/gui_qt/lib/mdiarea.py b/src/gui_qt/lib/mdiarea.py index 3338fdb..6a89656 100644 --- a/src/gui_qt/lib/mdiarea.py +++ b/src/gui_qt/lib/mdiarea.py @@ -35,10 +35,10 @@ class MdiAreaTile(QtWidgets.QMdiArea): pos.setX(pos.x() + win.width()) - def addSubWindow(self, widget: QtWidgets.QWidget, flags: QtCore.Qt.WindowFlags = QtCore.Qt.WindowFlags()) -> QtWidgets.QMdiSubWindow | None: - subwindow = super().addSubWindow(widget) - subwindow.setOption(QtWidgets.QMdiSubWindow.RubberBandMove, True) - subwindow.setOption(QtWidgets.QMdiSubWindow.RubberBandResize, True) + def addSubWindow(self, widget: QtWidgets.QWidget, **kwargs) -> QtWidgets.QMdiSubWindow | None: + subwindow = super().addSubWindow(widget, **kwargs) + subwindow.setOption(QtWidgets.QMdiSubWindow.SubWindowOption.RubberBandMove, True) + subwindow.setOption(QtWidgets.QMdiSubWindow.SubWindowOption.RubberBandResize, True) subwindow.setMinimumHeight(240) subwindow.setMinimumWidth(360) diff --git a/src/gui_qt/lib/pg_objects.py b/src/gui_qt/lib/pg_objects.py index fa678e1..7af8a92 100644 --- a/src/gui_qt/lib/pg_objects.py +++ b/src/gui_qt/lib/pg_objects.py @@ -9,8 +9,8 @@ from pyqtgraph import ( ) from nmreval.lib.colors import BaseColor, Colors -from nmreval.lib.lines import LineStyle -from nmreval.lib.symbols import SymbolStyle +from .lines import LineStyle +from gui_qt.lib.symbols import SymbolStyle from ..Qt import QtCore, QtGui @@ -216,7 +216,7 @@ class PlotItem(PlotDataItem): if pen is None: return LineStyle.No else: - return LineStyle(pen.style()) + return LineStyle(pen.style().value) @property def linewidth(self) -> float: @@ -319,13 +319,13 @@ class PlotItem(PlotDataItem): def set_line(self, *, style=None, width=None, color=None): pen = self.opts['pen'] if pen is None: - pen = mkPen(style=QtCore.Qt.NoPen) + pen = mkPen(style=QtCore.Qt.PenStyle.NoPen) if width is not None: pen.setWidthF(width) if style is not None: if isinstance(style, LineStyle): - style = style.value + style = style.to_qt() pen.setStyle(style) @@ -473,7 +473,7 @@ class LegendItemBlock(LegendItem): self.layout.setContentsMargins(1, 1, 1, 1) def mouseDragEvent(self, ev): - if ev.button() == QtCore.Qt.LeftButton: + if ev.button() == QtCore.Qt.MouseButton.LeftButton: ev.accept() dpos = ev.pos() - ev.lastPos() diff --git a/src/gui_qt/lib/pokemon.py b/src/gui_qt/lib/pokemon.py index b538acd..74d7bec 100644 --- a/src/gui_qt/lib/pokemon.py +++ b/src/gui_qt/lib/pokemon.py @@ -5,8 +5,8 @@ from functools import cache from PyQt5 import QtWidgets, QtGui, QtCore from numpy.random import randint -from gui_qt._py.pokewindow import Ui_Dialog -from gui_qt._py.pokeentry import Ui_Form +from .._py.pokewindow import Ui_Dialog +from .._py.pokeentry import Ui_Form def get_connection(db): diff --git a/src/gui_qt/lib/stuff.py b/src/gui_qt/lib/stuff.py index e4b682d..36680a4 100644 --- a/src/gui_qt/lib/stuff.py +++ b/src/gui_qt/lib/stuff.py @@ -79,11 +79,11 @@ class Board(QtWidgets.QFrame): self._ispaused = False self._isdead = True - self.setFrameStyle(QtWidgets.QFrame.Box | QtWidgets.QFrame.Raised) + self.setFrameStyle(QtWidgets.QFrame.Shape.Box | QtWidgets.QFrame.Shadow.Raised) self.setLineWidth(3) - self.setFocusPolicy(QtCore.Qt.StrongFocus) - self.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) + self.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) + self.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) def _init_game(self): raise NotImplementedError @@ -138,7 +138,7 @@ class Board(QtWidgets.QFrame): painter.restore() def keyPressEvent(self, evt): - if evt.key() == QtCore.Qt.Key_P: + if evt.key() == QtCore.Qt.Key.Key_P: self.pause() else: super().keyPressEvent(evt) @@ -242,16 +242,16 @@ class SnakeBoard(Board): def keyPressEvent(self, event): key = event.key() - if key in (QtCore.Qt.Key_Left, QtCore.Qt.Key_A): + if key in (QtCore.Qt.Key.Key_Left, QtCore.Qt.Key.Key_A): self.next_direction.append('l') - elif key in (QtCore.Qt.Key_Right, QtCore.Qt.Key_D): + elif key in (QtCore.Qt.Key.Key_Right, QtCore.Qt.Key.Key_D): self.next_direction.append('r') - elif key in (QtCore.Qt.Key_Down, QtCore.Qt.Key_S): + elif key in (QtCore.Qt.Key.Key_Down, QtCore.Qt.Key.Key_S): self.next_direction.append('d') - elif key in (QtCore.Qt.Key_Up, QtCore.Qt.Key_W): + elif key in (QtCore.Qt.Key.Key_Up, QtCore.Qt.Key.Key_W): self.next_direction.append('u') else: @@ -386,21 +386,21 @@ class TetrisBoard(Board): if self.curr_piece is None: return super().keyPressEvent(event) - if key == QtCore.Qt.Key_Left: + if key == QtCore.Qt.Key.Key_Left: self.try_move(self.curr_piece, self.curr_x-1, self.curr_y) - elif key == QtCore.Qt.Key_Right: + elif key == QtCore.Qt.Key.Key_Right: self.try_move(self.curr_piece, self.curr_x+1, self.curr_y) - elif key == QtCore.Qt.Key_Down: + elif key == QtCore.Qt.Key.Key_Down: if not self.try_move(self.curr_piece.rotate(), self.curr_x, self.curr_y): self.curr_piece.rotate(clockwise=False) - elif key == QtCore.Qt.Key_Up: + elif key == QtCore.Qt.Key.Key_Up: if not self.try_move(self.curr_piece.rotate(clockwise=False), self.curr_x, self.curr_y): self.curr_piece.rotate() - elif key == QtCore.Qt.Key_Space: + elif key == QtCore.Qt.Key.Key_Space: self.drop_to_bottom() else: @@ -546,9 +546,9 @@ class Field(QtWidgets.QToolButton): if self.grid.status == 'finished': return - if evt.button() == QtCore.Qt.RightButton: + if evt.button() == QtCore.Qt.MouseButton.RightButton: self.set_flag() - elif evt.button() == QtCore.Qt.LeftButton: + elif evt.button() == QtCore.Qt.MouseButton.LeftButton: self.select() else: super().mousePressEvent(evt) @@ -629,7 +629,7 @@ class QMines(QtWidgets.QMainWindow): self.central = QtWidgets.QWidget() self.setCentralWidget(self.central) - layout.addItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding), + layout.addItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding), 0, 0) self.grid_layout = QtWidgets.QGridLayout() @@ -643,7 +643,7 @@ class QMines(QtWidgets.QMainWindow): self.new_game.pressed.connect(self._init_map) layout.addWidget(self.new_game, 0, 1) - layout.addItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding), + layout.addItem(QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding), 2, 2) self.central.setLayout(layout) diff --git a/src/gui_qt/lib/styles.py b/src/gui_qt/lib/styles.py index df6d1fd..16e6aa4 100644 --- a/src/gui_qt/lib/styles.py +++ b/src/gui_qt/lib/styles.py @@ -6,72 +6,72 @@ class DarkPalette(QtGui.QPalette): def __init__(self): super().__init__() - self.setColor(QtGui.QPalette.Base, QtGui.QColor(42, 42, 42)) - self.setColor(QtGui.QPalette.AlternateBase, QtGui.QColor(66, 66, 66)) - self.setColor(QtGui.QPalette.Window, QtGui.QColor(93, 93, 93)) - self.setColor(QtGui.QPalette.ToolTipBase, QtGui.QColor(93, 93, 93)) - self.setColor(QtGui.QPalette.Button, QtGui.QColor(93, 93, 93)) + self.setColor(QtGui.QPalette.ColorRole.Base, QtGui.QColor(42, 42, 42)) + self.setColor(QtGui.QPalette.ColorRole.AlternateBase, QtGui.QColor(66, 66, 66)) + self.setColor(QtGui.QPalette.ColorRole.Window, QtGui.QColor(93, 93, 93)) + self.setColor(QtGui.QPalette.ColorRole.ToolTipBase, QtGui.QColor(93, 93, 93)) + self.setColor(QtGui.QPalette.ColorRole.Button, QtGui.QColor(93, 93, 93)) - self.setColor(QtGui.QPalette.WindowText, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.ToolTipText, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.Text, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.BrightText, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.ButtonText, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.HighlightedText, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.WindowText, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.ToolTipText, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.Text, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.BrightText, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.ButtonText, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.HighlightedText, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.Shadow, QtGui.QColor(20, 20, 20)) - self.setColor(QtGui.QPalette.Dark, QtGui.QColor(35, 35, 35)) + self.setColor(QtGui.QPalette.ColorRole.Shadow, QtGui.QColor(20, 20, 20)) + self.setColor(QtGui.QPalette.ColorRole.Dark, QtGui.QColor(35, 35, 35)) - self.setColor(QtGui.QPalette.Highlight, QtGui.QColor(42, 130, 218)) - self.setColor(QtGui.QPalette.Link, QtGui.QColor(220, 220, 220)) - self.setColor(QtGui.QPalette.LinkVisited, QtGui.QColor(108, 180, 218)) + self.setColor(QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(42, 130, 218)) + self.setColor(QtGui.QPalette.ColorRole.Link, QtGui.QColor(220, 220, 220)) + self.setColor(QtGui.QPalette.ColorRole.LinkVisited, QtGui.QColor(108, 180, 218)) # disabled - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Base, QtGui.QColor(80, 80, 80)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Window, QtGui.QColor(80, 80, 80)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Base, QtGui.QColor(80, 80, 80)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Window, QtGui.QColor(80, 80, 80)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Text, QtGui.QColor(127, 127, 127)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, QtGui.QColor(127, 127, 127)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.HighlightedText, QtGui.QColor(127, 127, 127)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, QtGui.QColor(127, 127, 127)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Text, QtGui.QColor(127, 127, 127)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.ButtonText, QtGui.QColor(127, 127, 127)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.HighlightedText, QtGui.QColor(127, 127, 127)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.WindowText, QtGui.QColor(127, 127, 127)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, QtGui.QColor(80, 80, 80)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(80, 80, 80)) class LightPalette(QtGui.QPalette): def __init__(self): super().__init__() - self.setColor(QtGui.QPalette.Base, QtGui.QColor(237, 237, 237)) - self.setColor(QtGui.QPalette.AlternateBase, QtGui.QColor(225, 225, 225)) - self.setColor(QtGui.QPalette.Window, QtGui.QColor(240, 240, 240)) - self.setColor(QtGui.QPalette.ToolTipBase, QtGui.QColor(240, 240, 240)) - self.setColor(QtGui.QPalette.Button, QtGui.QColor(240, 240, 240)) + self.setColor(QtGui.QPalette.ColorRole.Base, QtGui.QColor(237, 237, 237)) + self.setColor(QtGui.QPalette.ColorRole.AlternateBase, QtGui.QColor(225, 225, 225)) + self.setColor(QtGui.QPalette.ColorRole.Window, QtGui.QColor(240, 240, 240)) + self.setColor(QtGui.QPalette.ColorRole.ToolTipBase, QtGui.QColor(240, 240, 240)) + self.setColor(QtGui.QPalette.ColorRole.Button, QtGui.QColor(240, 240, 240)) - self.setColor(QtGui.QPalette.WindowText, QtGui.QColor(0, 0, 0)) - self.setColor(QtGui.QPalette.Text, QtGui.QColor(0, 0, 0)) - self.setColor(QtGui.QPalette.BrightText, QtGui.QColor(0, 0, 0)) - self.setColor(QtGui.QPalette.ButtonText, QtGui.QColor(0, 0, 0)) - self.setColor(QtGui.QPalette.ToolTipText, QtGui.QColor(0, 0, 0)) - self.setColor(QtGui.QPalette.HighlightedText, QtGui.QColor(0, 0, 0)) + self.setColor(QtGui.QPalette.ColorRole.WindowText, QtGui.QColor(0, 0, 0)) + self.setColor(QtGui.QPalette.ColorRole.Text, QtGui.QColor(0, 0, 0)) + self.setColor(QtGui.QPalette.ColorRole.BrightText, QtGui.QColor(0, 0, 0)) + self.setColor(QtGui.QPalette.ColorRole.ButtonText, QtGui.QColor(0, 0, 0)) + self.setColor(QtGui.QPalette.ColorRole.ToolTipText, QtGui.QColor(0, 0, 0)) + self.setColor(QtGui.QPalette.ColorRole.HighlightedText, QtGui.QColor(0, 0, 0)) - self.setColor(QtGui.QPalette.Shadow, QtGui.QColor(20, 20, 20)) - self.setColor(QtGui.QPalette.Dark, QtGui.QColor(225, 225, 225)) + self.setColor(QtGui.QPalette.ColorRole.Shadow, QtGui.QColor(20, 20, 20)) + self.setColor(QtGui.QPalette.ColorRole.Dark, QtGui.QColor(225, 225, 225)) - self.setColor(QtGui.QPalette.Highlight, QtGui.QColor(218, 66, 42)) - self.setColor(QtGui.QPalette.Link, QtGui.QColor(0, 162, 232)) - self.setColor(QtGui.QPalette.LinkVisited, QtGui.QColor(222, 222, 222)) + self.setColor(QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(218, 66, 42)) + self.setColor(QtGui.QPalette.ColorRole.Link, QtGui.QColor(0, 162, 232)) + self.setColor(QtGui.QPalette.ColorRole.LinkVisited, QtGui.QColor(222, 222, 222)) # disabled - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Base, QtGui.QColor(115, 115, 115)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Window, QtGui.QColor(115, 115, 115)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Base, QtGui.QColor(115, 115, 115)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Window, QtGui.QColor(115, 115, 115)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, QtGui.QColor(115, 115, 115)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Text, QtGui.QColor(115, 115, 115)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, QtGui.QColor(115, 115, 115)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.HighlightedText, QtGui.QColor(115, 115, 115)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.WindowText, QtGui.QColor(115, 115, 115)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Text, QtGui.QColor(115, 115, 115)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.ButtonText, QtGui.QColor(115, 115, 115)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.HighlightedText, QtGui.QColor(115, 115, 115)) - self.setColor(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, QtGui.QColor(190, 190, 190)) + self.setColor(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Highlight, QtGui.QColor(190, 190, 190)) class MyProxyStyle(QtWidgets.QProxyStyle): @@ -102,9 +102,9 @@ class MyProxyStyle(QtWidgets.QProxyStyle): def drawComplexControl(self, control: QtWidgets.QStyle.ComplexControl, opts: QtWidgets.QStyleOptionComplex, painter: QtGui.QPainter, widget=None): - if control == QtWidgets.QStyle.CC_ComboBox: - textrect = self.baseStyle().subControlRect(QtWidgets.QStyle.CC_ComboBox, opts, QtWidgets.QStyle.SC_ComboBoxEditField, widget) - opts.currentText = painter.fontMetrics().elidedText(opts.currentText, QtCore.Qt.ElideRight, textrect.width()) + if control == QtWidgets.QStyle.ComplexControl.CC_ComboBox: + textrect = self.baseStyle().subControlRect(QtWidgets.QStyle.ComplexControl.CC_ComboBox, opts, QtWidgets.QStyle.SubControl.SC_ComboBoxEditField, widget) + opts.currentText = painter.fontMetrics().elidedText(opts.currentText, QtCore.Qt.TextElideMode.ElideRight, textrect.width()) super().drawComplexControl(control, opts, painter, widget=widget) else: super().drawComplexControl(control, opts, painter, widget=widget) diff --git a/src/nmreval/lib/symbols.py b/src/gui_qt/lib/symbols.py similarity index 88% rename from src/nmreval/lib/symbols.py rename to src/gui_qt/lib/symbols.py index a5a9bea..62957ab 100644 --- a/src/nmreval/lib/symbols.py +++ b/src/gui_qt/lib/symbols.py @@ -77,16 +77,16 @@ def symbol_path(style: SymbolStyle, size: QtCore.QRectF) -> QtGui.QPainterPath: def make_symbol_pixmap(style): px = QtGui.QPixmap(14, 14) - px.fill(QtCore.Qt.transparent) + px.fill(QtCore.Qt.GlobalColor.transparent) px_size = px.rect().adjusted(1, 1, -1, -1) painter = QtGui.QPainter(px) - painter.setRenderHint(QtGui.QPainter.Antialiasing) + painter.setRenderHint(QtGui.QPainter.RenderHint.Antialiasing) pal = QtGui.QGuiApplication.palette() - col = pal.color(QtGui.QPalette.Text) + col = pal.color(QtGui.QPalette.ColorRole.Text) - painter.setPen(QtGui.QPen(col, 1, QtCore.Qt.SolidLine, QtCore.Qt.SquareCap, QtCore.Qt.MiterJoin)) + painter.setPen(QtGui.QPen(col, 1, QtCore.Qt.PenStyle.SolidLine, QtCore.Qt.PenCapStyle.SquareCap, QtCore.Qt.PenJoinStyle.MiterJoin)) painter.setBrush(col) painter.drawPath(symbol_path(style, QtCore.QRectF(px_size))) diff --git a/src/gui_qt/lib/tables.py b/src/gui_qt/lib/tables.py index a7b6ef1..2b9bbad 100644 --- a/src/gui_qt/lib/tables.py +++ b/src/gui_qt/lib/tables.py @@ -3,7 +3,7 @@ from ..Qt import QtWidgets, QtGui, QtCore class TreeWidget(QtWidgets.QTreeWidget): def keyPressEvent(self, evt: QtGui.QKeyEvent): - if evt.key() == QtCore.Qt.Key_Space: + if evt.key() == QtCore.Qt.Key.Key_Space: sets = [] from_parent = [] @@ -20,13 +20,13 @@ class TreeWidget(QtWidgets.QTreeWidget): # child.setCheckState(0, is_selected) from_parent.append(child) self.blockSignals(False) - item.setCheckState(0, QtCore.Qt.Unchecked if is_selected == QtCore.Qt.Checked else QtCore.Qt.Checked) + item.setCheckState(0, QtCore.Qt.CheckState.Unchecked if is_selected == QtCore.Qt.CheckState.Checked else QtCore.Qt.CheckState.Checked) else: sets.append(item) for it in sets: if it in from_parent: continue - it.setCheckState(0, QtCore.Qt.Unchecked if it.checkState(0) == QtCore.Qt.Checked else QtCore.Qt.Checked) + it.setCheckState(0, QtCore.Qt.CheckState.Unchecked if it.checkState(0) == QtCore.Qt.CheckState.Checked else QtCore.Qt.CheckState.Checked) else: super().keyPressEvent(evt) diff --git a/src/gui_qt/lib/undos.py b/src/gui_qt/lib/undos.py index 683dedf..b0c7a1b 100644 --- a/src/gui_qt/lib/undos.py +++ b/src/gui_qt/lib/undos.py @@ -5,12 +5,12 @@ import copy from numpy import argsort from . import Relations -from ..Qt import QtWidgets, QtCore +from ..Qt import QtWidgets, QtCore, QtGui from ..data.container import FitContainer from ..graphs.graphwindow import QGraphWindow -class ApodizationCommand(QtWidgets.QUndoCommand): +class ApodizationCommand(QtGui.QUndoCommand): def __init__(self, data, apod_values: list, apod_func: object): super().__init__('Apodization') @@ -27,7 +27,7 @@ class ApodizationCommand(QtWidgets.QUndoCommand): self.__data.apply('ap', (self.__apod_values, self.__apod_func)) -class CutCommand(QtWidgets.QUndoCommand): +class CutCommand(QtGui.QUndoCommand): def __init__(self, data, *limits): super().__init__('Apodization') @@ -43,7 +43,7 @@ class CutCommand(QtWidgets.QUndoCommand): self.__data.apply('cut', self.__limits) -class PhaseCommand(QtWidgets.QUndoCommand): +class PhaseCommand(QtGui.QUndoCommand): def __init__(self, data, ph0: float, ph1: float, pvt: float): super().__init__('Phase correction') @@ -57,7 +57,7 @@ class PhaseCommand(QtWidgets.QUndoCommand): self.__data.apply('ph', self.__phase) -class AutophaseCommand(QtWidgets.QUndoCommand): +class AutophaseCommand(QtGui.QUndoCommand): def __init__(self, data, pvt: float): super().__init__('Autophase') @@ -72,7 +72,7 @@ class AutophaseCommand(QtWidgets.QUndoCommand): self.__data.apply('autoph', (self.__pvt,)) -class ShiftCommand(QtWidgets.QUndoCommand): +class ShiftCommand(QtGui.QUndoCommand): def __init__(self, data, value, mode): super().__init__('Fourier') @@ -87,7 +87,7 @@ class ShiftCommand(QtWidgets.QUndoCommand): self.__data.apply('ls', self.__args) -class EditCommand(QtWidgets.QUndoCommand): +class EditCommand(QtGui.QUndoCommand): def __init__(self, data, *args): super().__init__('Edit signal') @@ -102,7 +102,7 @@ class EditCommand(QtWidgets.QUndoCommand): self.__data.edit_signal(*self.__arguments) -class NormCommand(QtWidgets.QUndoCommand): +class NormCommand(QtGui.QUndoCommand): def __init__(self, data, mode): super().__init__('Normalize') @@ -120,7 +120,7 @@ class NormCommand(QtWidgets.QUndoCommand): self.__scale = max_value / self.__data.y.max() -class CenterCommand(QtWidgets.QUndoCommand): +class CenterCommand(QtGui.QUndoCommand): def __init__(self, data): super().__init__('Normalize') @@ -138,7 +138,7 @@ class CenterCommand(QtWidgets.QUndoCommand): self.__offset = x0 - self.__data.x[0] -class ZerofillCommand(QtWidgets.QUndoCommand): +class ZerofillCommand(QtGui.QUndoCommand): def __init__(self, data): super().__init__('Zero filling') @@ -151,7 +151,7 @@ class ZerofillCommand(QtWidgets.QUndoCommand): self.__data.apply('zf', (1,)) -class BaselineCommand(QtWidgets.QUndoCommand): +class BaselineCommand(QtGui.QUndoCommand): def __init__(self, data): super().__init__('Baseline correction') @@ -167,7 +167,7 @@ class BaselineCommand(QtWidgets.QUndoCommand): self.__baseline = y_prev - self.__data.y[-1] -class BaselineSplineCommand(QtWidgets.QUndoCommand): +class BaselineSplineCommand(QtGui.QUndoCommand): def __init__(self, data, baseline): super().__init__('Baseline correction') @@ -181,7 +181,7 @@ class BaselineSplineCommand(QtWidgets.QUndoCommand): self.__data.apply('bls', (self.__baseline,)) -class FourierCommand(QtWidgets.QUndoCommand): +class FourierCommand(QtGui.QUndoCommand): def __init__(self, data): super().__init__('Fourier') @@ -195,7 +195,7 @@ class FourierCommand(QtWidgets.QUndoCommand): self.__data.apply('ft', tuple()) -class SortCommand(QtWidgets.QUndoCommand): +class SortCommand(QtGui.QUndoCommand): def __init__(self, data): super().__init__('Sort') @@ -210,7 +210,7 @@ class SortCommand(QtWidgets.QUndoCommand): self.__data.apply('sort', tuple()) -class DeleteGraphCommand(QtWidgets.QUndoCommand): +class DeleteGraphCommand(QtGui.QUndoCommand): def __init__(self, container: dict, key: str, signal1: QtCore.pyqtSignal, signal2: QtCore.pyqtSignal): super().__init__('Delete graph') @@ -233,7 +233,7 @@ class DeleteGraphCommand(QtWidgets.QUndoCommand): self.__signal_add.emit(self.__key) -class DeleteCommand(QtWidgets.QUndoCommand): +class DeleteCommand(QtGui.QUndoCommand): def __init__(self, container: dict, keys: list[str], graphs: dict, graphid: str, signal1: QtCore.pyqtSignal, signal2: QtCore.pyqtSignal): super().__init__('Delete data') @@ -299,7 +299,7 @@ class DeleteCommand(QtWidgets.QUndoCommand): self.__graph_container[self.__graph_key].block(False) -class EvalCommand(QtWidgets.QUndoCommand): +class EvalCommand(QtGui.QUndoCommand): def __init__(self, container: dict, key: str, new_data, title: str): super().__init__(title) self.__container = container diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index d4c28eb..9c33276 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -100,7 +100,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.norm_toolbutton = QtWidgets.QToolButton(self) self.norm_toolbutton.setMenu(self.menuNormalize) - self.norm_toolbutton.setPopupMode(self.norm_toolbutton.InstantPopup) + self.norm_toolbutton.setPopupMode(self.norm_toolbutton.ToolButtonPopupMode.InstantPopup) self.norm_toolbutton.setIcon(get_icon('normal')) self.toolbar_edit.addWidget(self.norm_toolbutton) @@ -116,9 +116,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.mousepos = QtWidgets.QLabel('') self.status = QtWidgets.QLabel('') - # noinspection PyUnresolvedReferences self.statusBar.addWidget(self.status) - # noinspection PyUnresolvedReferences self.statusBar.addWidget(self.mousepos) self._fit_plot_id = None @@ -126,17 +124,19 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.fit_toolbar = FitToolbar(self.action_FitWidget, self.menuLimits, self) self.addToolBar(self.fit_toolbar) - self.setGeometry(QtWidgets.QStyle.alignedRect( - QtCore.Qt.LayoutDirection.LeftToRight, - QtCore.Qt.AlignmentFlag.AlignCenter, - self.size(), - QtWidgets.qApp.desktop().availableGeometry()), + self.setGeometry( + QtWidgets.QStyle.alignedRect( + QtCore.Qt.LayoutDirection.LeftToRight, + QtCore.Qt.AlignmentFlag.AlignCenter, + self.size(), + QtWidgets.QApplication.primaryScreen().availableGeometry(), + ) ) self.datawidget.management = self.management self.integralwidget.management = self.management - self.ac_group = QtWidgets.QActionGroup(self) + self.ac_group = QtGui.QActionGroup(self) self.ac_group.addAction(self.action_lm_fit) self.ac_group.addAction(self.action_nm_fit) self.ac_group.addAction(self.action_odr_fit) @@ -145,17 +145,16 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.actionRedo = self.management.undostack.createRedoAction(self) icon = QtGui.QIcon.fromTheme("edit-redo") self.actionRedo.setIcon(icon) - self.actionRedo.setShortcuts(QtGui.QKeySequence.Redo) + self.actionRedo.setShortcuts(QtGui.QKeySequence.StandardKey.Redo) self.menuData.insertAction(self.action_new_set, self.actionRedo) self.actionUndo = self.management.undostack.createUndoAction(self) - self.actionUndo.setShortcuts(QtGui.QKeySequence.Undo) + self.actionUndo.setShortcuts(QtGui.QKeySequence.StandardKey.Undo) icon = QtGui.QIcon.fromTheme("edit-undo") self.actionUndo.setIcon(icon) self.menuData.insertAction(self.actionRedo, self.actionUndo) self.action_save_fit_parameter.triggered.connect(self.save_fit_parameter) - # noinspection PyUnresolvedReferences self.fit_toolbar.limit_group.triggered.connect(self.change_fit_limits) self.t1action.triggered.connect(lambda: self._show_tab('t1_temp')) @@ -211,7 +210,6 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.t1tauwidget.newData.connect(self.management.add_new_data) self.editsignalwidget.do_something.connect(self.management.apply) - # self.editsignalwidget.preview_triggered.connect(self.do_preview) self.action_sort_pts.triggered.connect(lambda: self.management.apply('sort', ())) self.action_calc_eps_derivative.triggered.connect(self.management.bds_deriv) @@ -287,7 +285,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): save_dialog = SaveDirectoryDialog(directory=str(self.path), parent=self) mode = save_dialog.exec() - if mode == QtWidgets.QDialog.Accepted: + if mode == QtWidgets.QDialog.DialogCode.Accepted: savefile = save_dialog.save_file() selected_filter = save_dialog.selectedNameFilter() @@ -313,11 +311,11 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): def save_fit_parameter(self, fit_sets: list[str] = None): save_dialog = FileDialog(parent=self, caption='Save fit parameter', directory=str(self.path), filter='All files(*, *);;Text files(*.dat *.txt)') - save_dialog.setAcceptMode(FileDialog.AcceptSave) - save_dialog.setOption(QtWidgets.QFileDialog.DontConfirmOverwrite, True) + save_dialog.setAcceptMode(FileDialog.AcceptMode.AcceptSave) + save_dialog.setOption(QtWidgets.QFileDialog.Option.DontConfirmOverwrite, True) mode = save_dialog.exec() - if mode == QtWidgets.QDialog.Accepted: + if mode == QtWidgets.QDialog.DialogCode.Accepted: savefile = save_dialog.save_file() if savefile: self.management.save_fit_parameter(savefile, fit_sets=fit_sets) @@ -452,8 +450,8 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): w = self.management.graphs[key] subwindow = self.area.addSubWindow(w) - subwindow.setOption(QtWidgets.QMdiSubWindow.RubberBandMove, True) - subwindow.setOption(QtWidgets.QMdiSubWindow.RubberBandResize, True) + subwindow.setOption(QtWidgets.QMdiSubWindow.SubWindowOption.RubberBandMove, True) + subwindow.setOption(QtWidgets.QMdiSubWindow.SubWindowOption.RubberBandResize, True) subwindow.setMinimumHeight(400) subwindow.setMinimumWidth(600) @@ -564,7 +562,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self._select_valuewidget(widget == self.valuewidget) pick_required, block_window = self._select_t1tauwidget(widget == self.t1tauwidget, pick_required, block_window) block_window = self._select_fitwidget(widget == self.fit_dialog, block_window) - pick_required = self._select_integralwidget(widget == self.integralwidget, pick_required, block_window) + pick_required, block_window = self._select_integralwidget(widget == self.integralwidget, pick_required, block_window) self._set_pick_block(pick_required, block_window) @@ -825,7 +823,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): if not success: break - if success and dialog.exec() == QtWidgets.QDialog.Accepted: + if success and dialog.exec() == QtWidgets.QDialog.DialogCode.Accepted: self.management.edit_signals(dialog.get_value()) @QtCore.pyqtSlot(name='on_actionMove_between_plots_triggered') @@ -913,8 +911,8 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): return block_window - @QtCore.pyqtSlot(QtWidgets.QAction) - def change_fit_limits(self, action: QtWidgets.QAction): + @QtCore.pyqtSlot(QtGui.QAction) + def change_fit_limits(self, action: QtGui.QAction): if self.current_graph_widget is None: return diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index 31553e3..15fb3f3 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -121,7 +121,7 @@ class UpperManagement(QtCore.QObject): self.current_graph = None self.graphs = GraphDict(self.data) self.namespace = None - self.undostack = QtWidgets.QUndoStack() + self.undostack = QtGui.QUndoStack() self.deleteData.connect(self.plot_from_graph) self._filereader = None diff --git a/src/gui_qt/math/binning.py b/src/gui_qt/math/binning.py index cc38f87..c53a26b 100644 --- a/src/gui_qt/math/binning.py +++ b/src/gui_qt/math/binning.py @@ -13,7 +13,7 @@ class BinningWindow(QtWidgets.QDialog): self.spinbox.setText('1') layout.addRow(self.label, self.spinbox) - self.dialogbox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel) + self.dialogbox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.StandardButton.Ok | QtWidgets.QDialogButtonBox.StandardButton.Cancel) self.dialogbox.accepted.connect(self.accept) self.dialogbox.rejected.connect(self.reject) layout.addWidget(self.dialogbox) diff --git a/src/gui_qt/math/evaluation.py b/src/gui_qt/math/evaluation.py index f27a16f..b86fdb0 100644 --- a/src/gui_qt/math/evaluation.py +++ b/src/gui_qt/math/evaluation.py @@ -41,7 +41,7 @@ class QEvalDialog(QtWidgets.QDialog, Ui_CalcDialog): new_one = True for i in range(len(tmp)): w = tmp[i] - if w.data(QtCore.Qt.UserRole) == set_id: + if w.data(QtCore.Qt.ItemDataRole.UserRole) == set_id: w.setText(name) self.listWidget.addItem(w) tmp.pop(i) @@ -51,9 +51,9 @@ class QEvalDialog(QtWidgets.QDialog, Ui_CalcDialog): # new set, create item if new_one: item = QtWidgets.QListWidgetItem(name) - item.setData(QtCore.Qt.UserRole, set_id) - item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEditable) - item.setCheckState(QtCore.Qt.Checked) + item.setData(QtCore.Qt.ItemDataRole.UserRole, set_id) + item.setFlags(item.flags() ^ QtCore.Qt.ItemFlag.ItemIsEditable) + item.setCheckState(QtCore.Qt.CheckState.Checked) self.listWidget.addItem(item) while len(tmp): @@ -73,10 +73,10 @@ class QEvalDialog(QtWidgets.QDialog, Ui_CalcDialog): def on_buttonBox_clicked(self, bttn): bttn_role = self.buttonBox.buttonRole(bttn) - if bttn_role == QtWidgets.QDialogButtonBox.ApplyRole: + if bttn_role == QtWidgets.QDialogButtonBox.ButtonRole.ApplyRole: self.collect_args() - elif bttn_role == QtWidgets.QDialogButtonBox.AcceptRole: + elif bttn_role == QtWidgets.QDialogButtonBox.ButtonRole.AcceptRole: self.collect_args() if self.success: self.accept() @@ -95,8 +95,8 @@ class QEvalDialog(QtWidgets.QDialog, Ui_CalcDialog): set_id = [] for i in range(self.listWidget.count()): item = self.listWidget.item(i) - if item.checkState() == QtCore.Qt.Checked: - set_id.append(item.data(QtCore.Qt.UserRole)) + if item.checkState() == QtCore.Qt.CheckState.Checked: + set_id.append(item.data(QtCore.Qt.ItemDataRole.UserRole)) self.do_eval.emit(cmds, set_id, self.overwrite_checkbox.isChecked()) diff --git a/src/gui_qt/math/integrate_derive.py b/src/gui_qt/math/integrate_derive.py index 8c6aaaa..a4a82ef 100644 --- a/src/gui_qt/math/integrate_derive.py +++ b/src/gui_qt/math/integrate_derive.py @@ -43,18 +43,18 @@ class QDeriveIntegrate(QtWidgets.QDialog, Ui_Dialog): self.listWidget.clear() for (set_id, set_name) in sets: item = QtWidgets.QListWidgetItem(set_name) - item.setData(QtCore.Qt.UserRole, set_id) - item.setCheckState(QtCore.Qt.Checked) + item.setData(QtCore.Qt.ItemDataRole.UserRole, set_id) + item.setCheckState(QtCore.Qt.CheckState.Checked) self.listWidget.addItem(item) @QtCore.pyqtSlot(int, name='on_checkBox_2_stateChanged') def enable_graph(self, state: int): - self.graph_combobox.setEnabled(state != QtCore.Qt.Checked) + self.graph_combobox.setEnabled(state != QtCore.Qt.CheckState.Checked) @QtCore.pyqtSlot(int, name='on_range_checkbox_stateChanged') def enable_limits(self, full_range: int): - self.start_lineedit.setEnabled(full_range != QtCore.Qt.Checked) - self.stop_lineedit.setEnabled(full_range != QtCore.Qt.Checked) + self.start_lineedit.setEnabled(full_range != QtCore.Qt.CheckState.Checked) + self.stop_lineedit.setEnabled(full_range != QtCore.Qt.CheckState.Checked) def get_options(self): opts = { @@ -86,7 +86,7 @@ class QDeriveIntegrate(QtWidgets.QDialog, Ui_Dialog): for i in range(self.listWidget.count()): item = self.listWidget.item(i) - if item.checkState() == QtCore.Qt.Checked: - opts['sets'].append(item.data(QtCore.Qt.UserRole)) + if item.checkState() == QtCore.Qt.CheckState.Checked: + opts['sets'].append(item.data(QtCore.Qt.ItemDataRole.UserRole)) return opts diff --git a/src/gui_qt/math/mean_dialog.py b/src/gui_qt/math/mean_dialog.py index 4fd0d87..d20e766 100644 --- a/src/gui_qt/math/mean_dialog.py +++ b/src/gui_qt/math/mean_dialog.py @@ -26,13 +26,13 @@ class QMeanTimes(QtWidgets.QDialog, Ui_calc_means_dialog): self.to_combobox.currentIndexChanged.connect(lambda idx: self.calculate_means()) def update_graphs(self, graph: dict): - graph_id = self.graph_combobox.currentData(QtCore.Qt.UserRole) + graph_id = self.graph_combobox.currentData(QtCore.Qt.ItemDataRole.UserRole) self.graph_combobox.clear() for key, (name, _) in graph.items(): self.graph_combobox.addItem(name, userData=key) if graph_id is not None: - self.graph_combobox.setCurrentIndex(self.graph_combobox.findData(graph_id, QtCore.Qt.UserRole)) + self.graph_combobox.setCurrentIndex(self.graph_combobox.findData(graph_id, QtCore.Qt.ItemDataRole.UserRole)) else: self.graph_combobox.setCurrentIndex(0) @@ -102,12 +102,12 @@ class QMeanTimes(QtWidgets.QDialog, Ui_calc_means_dialog): def button_clicked(self, bttn: QtWidgets.QAbstractButton): role = self.buttonBox.buttonRole(bttn) - if role == QtWidgets.QDialogButtonBox.RejectRole: + if role == QtWidgets.QDialogButtonBox.ButtonRole.RejectRole: self.close() - elif role == QtWidgets.QDialogButtonBox.AcceptRole: + elif role == QtWidgets.QDialogButtonBox.ButtonRole.AcceptRole: self.get_parameter() self.close() - elif role == QtWidgets.QDialogButtonBox.ApplyRole: + elif role == QtWidgets.QDialogButtonBox.ButtonRole.ApplyRole: self.get_parameter() else: print('Unknown role') diff --git a/src/gui_qt/nmr/t1_from_tau.py b/src/gui_qt/nmr/t1_from_tau.py index f7d8e62..2449102 100644 --- a/src/gui_qt/nmr/t1_from_tau.py +++ b/src/gui_qt/nmr/t1_from_tau.py @@ -65,11 +65,11 @@ class QRelaxCalc(QtWidgets.QDialog, Ui_Dialog): for (gid, name) in graphs: self.graph_combobox.addItem(name, userData=gid) - self.graph_combobox.setCurrentIndex(self.graph_combobox.findData(current_id, QtCore.Qt.UserRole)) + self.graph_combobox.setCurrentIndex(self.graph_combobox.findData(current_id, QtCore.Qt.ItemDataRole.UserRole)) @QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged') def changed_state(self, checked): - self.graph_combobox.setEnabled(checked != QtCore.Qt.Checked) + self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked) @QtCore.pyqtSlot(int, name='on_tau_graph_combobox_currentIndexChanged') def tau_graph_changed(self, idx: int): diff --git a/src/nmreval/io/nmrreader.py b/src/nmreval/io/nmrreader.py index 18bae10..85292a9 100644 --- a/src/nmreval/io/nmrreader.py +++ b/src/nmreval/io/nmrreader.py @@ -10,8 +10,8 @@ from ..data.dsc import DSC from ..data.points import Points from ..fit.result import FitResult, FitResultCreator from ..lib.colors import Colors -from ..lib.lines import LineStyle -from ..lib.symbols import SymbolStyle +from gui_qt.lib.lines import LineStyle +from gui_qt.lib.symbols import SymbolStyle class NMRReader: