1
0
forked from IPKM/nmreval

16 Commits

Author SHA1 Message Date
0d00ea2638 export drawings to agr 2023-04-02 16:46:23 +02:00
8d2bfacaca display drawings of graphs 2023-04-01 20:25:44 +02:00
c31f52cefe multi-points drawing 2023-04-01 18:58:16 +02:00
2d42a8cd46 ellipses done 2023-04-01 18:23:49 +02:00
3ddc81dbfa rectangles done 2023-04-01 17:21:12 +02:00
9681d09ed4 edit existing lines 2023-03-13 20:14:04 +01:00
62f3839b20 move to listwidget 2023-03-13 17:59:12 +01:00
b31dec4c7b move to combobox + list instead of tree 2023-02-24 17:39:45 +01:00
bd4b88102a graph title is displayed when maximized 2023-02-22 18:57:39 +01:00
a17a4e0c01 add graph title 2023-02-21 18:55:41 +01:00
3bb99f4406 basics are working 2023-02-05 15:29:31 +01:00
72d2fc5018 outsource ui creation 2023-02-04 19:19:15 +01:00
67332cc9b9 rerun of ui->py make 2023-02-04 18:02:52 +01:00
cab35e45a3 add objects to graph 2023-02-04 16:42:12 +01:00
793786fda8 first objects added 2023-02-04 16:36:55 +01:00
8e2fdcef4c redesigned widget for drawing object 2023-02-04 16:27:26 +01:00
110 changed files with 2194 additions and 1179 deletions

View File

@ -87,6 +87,6 @@ AppDir:
command: ./AppRun
AppImage:
update-information: 'zsync|https://gitea.pkm.physik.tu-darmstadt.de/api/packages/IPKM/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync'
update-information: 'zsync|https://gitea.pkm.physik.tu-darmstadt.de/api/packages/IPKM-Public/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync'
sign-key: 976AC9D78688B628B00D4944D319B98C2D6CE5D3
arch: x86_64

13
LICENSE
View File

@ -1,13 +0,0 @@
BSD 3-Clause License
Copyright (c) 2023 Dominik Demuth.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -5,10 +5,10 @@ PYUIC = pyuic5
PYRCC = pyrcc5
#Directory with ui files
RESOURCE_DIR = resources/_ui
RESOURCE_DIR = src/resources/_ui
#Directory for compiled resources
COMPILED_DIR = nmreval/gui_qt/_py
#Directory for compiled ui
COMPILED_DIR = src/gui_qt/_py
#UI files to compile, uses every *.ui found in RESOURCE_DIR
UI_FILES = $(foreach dir, $(RESOURCE_DIR), $(notdir $(wildcard $(dir)/*.ui)))

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '_ui/agroptiondialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/agroptiondialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -289,8 +290,8 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '_ui/apod_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/apod_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -63,8 +64,8 @@ class Ui_ApodEdit(object):
self.gridLayout.addWidget(self.eqn_label, 0, 1, 1, 1)
self.retranslateUi(ApodEdit)
self.buttonBox.accepted.connect(ApodEdit.accept)
self.buttonBox.rejected.connect(ApodEdit.close)
self.buttonBox.accepted.connect(ApodEdit.accept) # type: ignore
self.buttonBox.rejected.connect(ApodEdit.close) # type: ignore
QtCore.QMetaObject.connectSlotsByName(ApodEdit)
def retranslateUi(self, ApodEdit):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '_ui/axisConfigTemplate.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/axisConfigTemplate.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '_ui/baseline_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/baseline_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -54,8 +55,8 @@ class Ui_SignalEdit(object):
self.gridLayout.addWidget(self.graphicsView, 0, 2, 1, 1)
self.retranslateUi(SignalEdit)
self.buttonBox.accepted.connect(SignalEdit.accept)
self.buttonBox.rejected.connect(SignalEdit.close)
self.buttonBox.accepted.connect(SignalEdit.accept) # type: ignore
self.buttonBox.rejected.connect(SignalEdit.close) # type: ignore
QtCore.QMetaObject.connectSlotsByName(SignalEdit)
def retranslateUi(self, SignalEdit):

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/basewindow.ui'
# Form implementation generated from reading ui file '/autohome/dominik/nmreval-gitea/src/resources/_ui/basewindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
@ -257,13 +257,13 @@ class Ui_BaseWindow(object):
self.actionGuide_lines.setObjectName("actionGuide_lines")
self.actionMaximize = QtWidgets.QAction(BaseWindow)
self.actionMaximize.setCheckable(True)
self.actionMaximize.setVisible(False)
self.actionMaximize.setVisible(True)
self.actionMaximize.setObjectName("actionMaximize")
self.actionTile = QtWidgets.QAction(BaseWindow)
self.actionTile.setObjectName("actionTile")
self.actionMinimize = QtWidgets.QAction(BaseWindow)
self.actionMinimize.setCheckable(True)
self.actionMinimize.setVisible(False)
self.actionMinimize.setVisible(True)
self.actionMinimize.setObjectName("actionMinimize")
self.actionNew_window = QtWidgets.QAction(BaseWindow)
self.actionNew_window.setObjectName("actionNew_window")
@ -506,7 +506,7 @@ class Ui_BaseWindow(object):
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.menuWindow.setTitle(_translate("BaseWindow", "&Plots"))
self.menuView.setTitle(_translate("BaseWindow", "View"))
self.menuNMR.setTitle(_translate("BaseWindow", "NMR"))
self.menuBDS.setTitle(_translate("BaseWindow", "BDS"))
@ -568,6 +568,7 @@ class Ui_BaseWindow(object):
self.actionTile.setText(_translate("BaseWindow", "Tile windows"))
self.actionMinimize.setText(_translate("BaseWindow", "Minimize"))
self.actionNew_window.setText(_translate("BaseWindow", "New graph"))
self.actionNew_window.setShortcut(_translate("BaseWindow", "Ctrl+N"))
self.actionDelete_window.setText(_translate("BaseWindow", "Delete graph"))
self.actionCascade_windows.setText(_translate("BaseWindow", "Cascade windows"))
self.actionNext_window.setText(_translate("BaseWindow", "Next"))
@ -582,6 +583,7 @@ class Ui_BaseWindow(object):
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_new_set.setShortcut(_translate("BaseWindow", "Ctrl+Shift+N"))
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"))

View File

@ -1,13 +1,16 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/bdsdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/bdsdialog.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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")
@ -93,8 +96,8 @@ class Ui_Dialog(object):
self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
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)
@ -117,4 +120,3 @@ class Ui_Dialog(object):
self.temp_checkBox.setText(_translate("Dialog", "Meas. temperature"))
self.time_checkBox.setText(_translate("Dialog", "Meas. time"))
self.label.setText(_translate("Dialog", "Found entries"))

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/color_palette.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/color_palette.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -88,8 +89,8 @@ class Ui_Dialog(object):
self.label_2.setBuddy(self.color_combobox)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/coupling_calculator.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/coupling_calculator.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -46,8 +47,8 @@ class Ui_coupling_calc_dialog(object):
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)
self.buttonBox.accepted.connect(coupling_calc_dialog.accept) # type: ignore
self.buttonBox.rejected.connect(coupling_calc_dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(coupling_calc_dialog)
def retranslateUi(self, coupling_calc_dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/coupling_t1_from_tau.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/coupling_t1_from_tau.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/datawidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/datawidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,13 +1,16 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/dscfile_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/dscfile_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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")
@ -189,8 +192,8 @@ class Ui_Dialog(object):
self.gridLayout_2.addLayout(self.gridLayout, 0, 1, 1, 1)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
@ -209,5 +212,4 @@ class Ui_Dialog(object):
self.none_radioButton.setText(_translate("Dialog", "None"))
self.ref_add_pushButton.setText(_translate("Dialog", "Add reference"))
self.ref_remove_pushButton.setText(_translate("Dialog", "Remove reference"))
from pyqtgraph import PlotWidget

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'src/resources/_ui/editsignalwidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.

View File

@ -0,0 +1,67 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/ellipsewidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_ellipsewidget(object):
def setupUi(self, ellipsewidget):
ellipsewidget.setObjectName("ellipsewidget")
ellipsewidget.resize(400, 300)
self.gridLayout = QtWidgets.QGridLayout(ellipsewidget)
self.gridLayout.setObjectName("gridLayout")
self.height_line = QtWidgets.QLineEdit(ellipsewidget)
self.height_line.setObjectName("height_line")
self.gridLayout.addWidget(self.height_line, 3, 2, 1, 1)
self.center_x = QtWidgets.QLineEdit(ellipsewidget)
self.center_x.setObjectName("center_x")
self.gridLayout.addWidget(self.center_x, 2, 1, 1, 1)
self.axes_label = QtWidgets.QLabel(ellipsewidget)
self.axes_label.setObjectName("axes_label")
self.gridLayout.addWidget(self.axes_label, 3, 0, 1, 1)
self.color_label = QtWidgets.QLabel(ellipsewidget)
self.color_label.setObjectName("color_label")
self.gridLayout.addWidget(self.color_label, 0, 0, 1, 1)
self.center_y = QtWidgets.QLineEdit(ellipsewidget)
self.center_y.setObjectName("center_y")
self.gridLayout.addWidget(self.center_y, 2, 2, 1, 1)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
self.center_label = QtWidgets.QLabel(ellipsewidget)
self.center_label.setObjectName("center_label")
self.gridLayout.addWidget(self.center_label, 2, 0, 1, 1)
self.width_line = QtWidgets.QLineEdit(ellipsewidget)
self.width_line.setObjectName("width_line")
self.gridLayout.addWidget(self.width_line, 3, 1, 1, 1)
self.color_box = ColorListEditor(ellipsewidget)
self.color_box.setObjectName("color_box")
self.gridLayout.addWidget(self.color_box, 0, 1, 1, 2)
self.fill_box = ColorListEditor(ellipsewidget)
self.fill_box.setObjectName("fill_box")
self.gridLayout.addWidget(self.fill_box, 1, 1, 1, 2)
self.fill_label = QtWidgets.QLabel(ellipsewidget)
self.fill_label.setObjectName("fill_label")
self.gridLayout.addWidget(self.fill_label, 1, 0, 1, 1)
self.retranslateUi(ellipsewidget)
QtCore.QMetaObject.connectSlotsByName(ellipsewidget)
def retranslateUi(self, ellipsewidget):
_translate = QtCore.QCoreApplication.translate
ellipsewidget.setWindowTitle(_translate("ellipsewidget", "Form"))
self.height_line.setPlaceholderText(_translate("ellipsewidget", "axis 2"))
self.center_x.setPlaceholderText(_translate("ellipsewidget", "x"))
self.axes_label.setText(_translate("ellipsewidget", "Axes"))
self.color_label.setText(_translate("ellipsewidget", "Color"))
self.center_y.setPlaceholderText(_translate("ellipsewidget", "y"))
self.center_label.setText(_translate("ellipsewidget", "Center"))
self.width_line.setPlaceholderText(_translate("ellipsewidget", "axis 1"))
self.fill_label.setText(_translate("ellipsewidget", "Fill color"))
from gui_qt.lib.delegates import ColorListEditor

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/eval_expr_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/eval_expr_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/evalexpression.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/evalexpression.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -153,8 +154,8 @@ class Ui_CalcDialog(object):
self.retranslateUi(CalcDialog)
self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(CalcDialog.accept)
self.buttonBox.rejected.connect(CalcDialog.reject)
self.buttonBox.accepted.connect(CalcDialog.accept) # type: ignore
self.buttonBox.rejected.connect(CalcDialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(CalcDialog)
def retranslateUi(self, CalcDialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/expandablewidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/expandablewidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/exportConfigTemplate.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/exportConfigTemplate.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fcreader.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fcreader.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -167,8 +168,8 @@ class Ui_FCEval_dialog(object):
self.label_6.setBuddy(self.m0_cb)
self.retranslateUi(FCEval_dialog)
self.buttonBox.accepted.connect(FCEval_dialog.accept)
self.buttonBox.rejected.connect(FCEval_dialog.reject)
self.buttonBox.accepted.connect(FCEval_dialog.accept) # type: ignore
self.buttonBox.rejected.connect(FCEval_dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(FCEval_dialog)
def retranslateUi(self, FCEval_dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/filedialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/filedialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitcreationdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitcreationdialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.
@ -63,8 +63,8 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitdialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitdialog_window.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitdialog_window.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitfunctionwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitfunctionwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitfuncwidget_old.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitfuncwidget_old.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitmodelfixwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitmodelfixwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitmodelwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitmodelwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitparametertable.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitparametertable.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -40,8 +41,8 @@ class Ui_FitParameterDialog(object):
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(FitParameterDialog)
self.buttonBox.accepted.connect(FitParameterDialog.accept)
self.buttonBox.rejected.connect(FitParameterDialog.reject)
self.buttonBox.accepted.connect(FitParameterDialog.accept) # type: ignore
self.buttonBox.rejected.connect(FitParameterDialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(FitParameterDialog)
def retranslateUi(self, FitParameterDialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/fitparameterwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitparameterwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/autohome/dominik/nmreval-gitea/src/resources/_ui/fitresult.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/fitresult.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(864, 649)
Dialog.resize(817, 584)
self.gridLayout = QtWidgets.QGridLayout(Dialog)
self.gridLayout.setObjectName("gridLayout")
self.sets_comboBox = ElideComboBox(Dialog)
@ -51,21 +51,6 @@ class Ui_Dialog(object):
self.gridLayout_2.setContentsMargins(3, 3, 3, 3)
self.gridLayout_2.setSpacing(3)
self.gridLayout_2.setObjectName("gridLayout_2")
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.parameter_checkbox = QtWidgets.QCheckBox(self.groupBox)
self.parameter_checkbox.setObjectName("parameter_checkbox")
self.gridLayout_2.addWidget(self.parameter_checkbox, 0, 5, 1, 1)
self.graph_comboBox = QtWidgets.QComboBox(self.groupBox)
self.graph_comboBox.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, 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, 6, 1, 1)
self.graph_checkBox = QtWidgets.QCheckBox(self.groupBox)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@ -74,44 +59,22 @@ class Ui_Dialog(object):
self.graph_checkBox.setSizePolicy(sizePolicy)
self.graph_checkBox.setChecked(True)
self.graph_checkBox.setObjectName("graph_checkBox")
self.gridLayout_2.addWidget(self.graph_checkBox, 1, 5, 1, 1)
self.minx_line = QtWidgets.QLineEdit(self.groupBox)
self.minx_line.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, 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.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, 4, 2, 1)
self.maxx_line = QtWidgets.QLineEdit(self.groupBox)
self.maxx_line.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, 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.numx_line = QtWidgets.QLineEdit(self.groupBox)
self.numx_line.setEnabled(False)
self.numx_line.setObjectName("numx_line")
self.gridLayout_2.addWidget(self.numx_line, 1, 3, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.gridLayout_2.addWidget(self.graph_checkBox, 1, 1, 1, 1)
self.graph_comboBox = QtWidgets.QComboBox(self.groupBox)
self.graph_comboBox.setEnabled(False)
self.graph_comboBox.setObjectName("graph_comboBox")
self.gridLayout_2.addWidget(self.graph_comboBox, 1, 2, 1, 1)
self.curve_checkbox = QtWidgets.QCheckBox(self.groupBox)
self.curve_checkbox.setChecked(True)
self.curve_checkbox.setObjectName("curve_checkbox")
self.horizontalLayout.addWidget(self.curve_checkbox)
self.gridLayout_2.addWidget(self.curve_checkbox, 0, 0, 1, 1)
self.partial_checkBox = QtWidgets.QCheckBox(self.groupBox)
self.partial_checkBox.setObjectName("partial_checkBox")
self.horizontalLayout.addWidget(self.partial_checkBox)
self.gridLayout_2.addLayout(self.horizontalLayout, 0, 0, 1, 4)
self.gridLayout_2.addWidget(self.partial_checkBox, 1, 0, 1, 1)
self.parameter_checkbox = QtWidgets.QCheckBox(self.groupBox)
self.parameter_checkbox.setChecked(True)
self.parameter_checkbox.setObjectName("parameter_checkbox")
self.gridLayout_2.addWidget(self.parameter_checkbox, 0, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox, 5, 0, 1, 2)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setSpacing(3)
@ -128,38 +91,40 @@ class Ui_Dialog(object):
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 3, 0, 1, 2)
self.stack = QtWidgets.QTabWidget(Dialog)
self.stack = QtWidgets.QToolBox(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.page = QtWidgets.QWidget()
self.page.setGeometry(QtCore.QRect(0, 0, 399, 346))
self.page.setObjectName("page")
self.gridLayout_3 = QtWidgets.QGridLayout(self.page)
self.gridLayout_3.setContentsMargins(3, 3, 3, 3)
self.gridLayout_3.setSpacing(3)
self.gridLayout_3.setObjectName("gridLayout_3")
self.logy_box = QtWidgets.QCheckBox(self.stackPage1)
self.logy_box = QtWidgets.QCheckBox(self.page)
self.logy_box.setLayoutDirection(QtCore.Qt.RightToLeft)
self.logy_box.setObjectName("logy_box")
self.gridLayout_3.addWidget(self.logy_box, 2, 1, 1, 1)
self.logx_box = QtWidgets.QCheckBox(self.stackPage1)
self.logx_box = QtWidgets.QCheckBox(self.page)
self.logx_box.setLayoutDirection(QtCore.Qt.RightToLeft)
self.logx_box.setObjectName("logx_box")
self.gridLayout_3.addWidget(self.logx_box, 2, 0, 1, 1)
self.graphicsView = GraphicsLayoutWidget(self.stackPage1)
self.graphicsView = GraphicsLayoutWidget(self.page)
self.graphicsView.setObjectName("graphicsView")
self.gridLayout_3.addWidget(self.graphicsView, 0, 0, 1, 2)
self.stack.addTab(self.stackPage1, "")
self.stackPage2 = QtWidgets.QWidget()
self.stackPage2.setObjectName("stackPage2")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.stackPage2)
self.stack.addItem(self.page, "")
self.page_2 = QtWidgets.QWidget()
self.page_2.setGeometry(QtCore.QRect(0, 0, 399, 346))
self.page_2.setObjectName("page_2")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.page_2)
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 = QtWidgets.QTableWidget(self.page_2)
self.stats_tableWidget.setFrameShape(QtWidgets.QFrame.Box)
self.stats_tableWidget.setGridStyle(QtCore.Qt.NoPen)
self.stats_tableWidget.setColumnCount(1)
@ -168,14 +133,15 @@ class Ui_Dialog(object):
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.stack.addItem(self.page_2, "")
self.page_3 = QtWidgets.QWidget()
self.page_3.setGeometry(QtCore.QRect(0, 0, 399, 346))
self.page_3.setObjectName("page_3")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.page_3)
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 = QtWidgets.QTableWidget(self.page_3)
self.corr_tableWidget.setFrameShape(QtWidgets.QFrame.Box)
self.corr_tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.corr_tableWidget.setGridStyle(QtCore.Qt.NoPen)
@ -193,34 +159,28 @@ class Ui_Dialog(object):
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.stack.addItem(self.page_3, "")
self.gridLayout.addWidget(self.stack, 0, 1, 3, 1)
self.retranslateUi(Dialog)
self.stack.setCurrentIndex(0)
self.stack.layout().setSpacing(0)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Fit results"))
self.groupBox.setTitle(_translate("Dialog", "Output"))
self.extrapolate_box.setToolTip(_translate("Dialog", "Extrapolates only main function"))
self.extrapolate_box.setText(_translate("Dialog", "Extrapolate curves"))
self.parameter_checkbox.setText(_translate("Dialog", "Plot parameter"))
self.graph_checkBox.setText(_translate("Dialog", "New graph for parameter"))
self.minx_line.setToolTip(_translate("Dialog", "Leave empty to start at lowest point"))
self.minx_line.setPlaceholderText(_translate("Dialog", "min x"))
self.maxx_line.setToolTip(_translate("Dialog", "Leave empty to start at highest point"))
self.maxx_line.setPlaceholderText(_translate("Dialog", "max x"))
self.numx_line.setPlaceholderText(_translate("Dialog", "# pts"))
self.graph_checkBox.setText(_translate("Dialog", "New graph"))
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"))
self.reject_fit_checkBox.setText(_translate("Dialog", "Reject this fit"))
self.del_prev_checkBox.setText(_translate("Dialog", "Delete previous fits"))
self.logy_box.setText(_translate("Dialog", "logarithmic y axis"))
self.logx_box.setText(_translate("Dialog", "logarithmic x axis"))
self.stack.setTabText(self.stack.indexOf(self.stackPage1), _translate("Dialog", "Plot"))
self.stack.setTabText(self.stack.indexOf(self.stackPage2), _translate("Dialog", "Statistics"))
self.stack.setItemText(self.stack.indexOf(self.page), _translate("Dialog", "Plot"))
self.stack.setItemText(self.stack.indexOf(self.page_2), _translate("Dialog", "Statistics"))
item = self.corr_tableWidget.horizontalHeaderItem(0)
item.setText(_translate("Dialog", "Parameter 1"))
item = self.corr_tableWidget.horizontalHeaderItem(1)
@ -229,6 +189,6 @@ class Ui_Dialog(object):
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.stack.setItemText(self.stack.indexOf(self.page_3), _translate("Dialog", "Correlations"))
from ..lib.forms import ElideComboBox
from pyqtgraph import GraphicsLayoutWidget

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/ftdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/ftdialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -45,8 +46,8 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/function_tree_widget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/function_tree_widget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/gol.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/gol.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/gracemsgdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/gracemsgdialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/gracereader.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/gracereader.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -71,8 +72,8 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/graph.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/graph.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -13,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_GraphWindow(object):
def setupUi(self, GraphWindow):
GraphWindow.setObjectName("GraphWindow")
GraphWindow.resize(680, 520)
GraphWindow.resize(865, 520)
GraphWindow.setBaseSize(QtCore.QSize(300, 10))
self.verticalLayout = QtWidgets.QVBoxLayout(GraphWindow)
self.verticalLayout.setContentsMargins(3, 3, 3, 3)
@ -95,6 +96,12 @@ class Ui_GraphWindow(object):
self.horizontalLayout.addWidget(self.line_3)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.graph_label = QtWidgets.QLabel(self.widget)
self.graph_label.setText("")
self.graph_label.setObjectName("graph_label")
self.horizontalLayout.addWidget(self.graph_label)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.limit_button = QtWidgets.QToolButton(self.widget)
self.limit_button.setCheckable(True)
self.limit_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
@ -138,8 +145,8 @@ class Ui_GraphWindow(object):
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)
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem2)
self.label_3 = QtWidgets.QLabel(self.limit_widget)
self.label_3.setObjectName("label_3")
self.horizontalLayout_2.addWidget(self.label_3)
@ -175,16 +182,16 @@ class Ui_GraphWindow(object):
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)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem3)
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)
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem4)
self.label_7 = QtWidgets.QLabel(self.label_widget)
self.label_7.setObjectName("label_7")
self.horizontalLayout_3.addWidget(self.label_7)

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/autohome/dominik/nmreval/src/resources/_ui/guidelinewidget.ui'
# Form implementation generated from reading ui file '/autohome/dominik/nmreval-gitea/src/resources/_ui/guidelinewidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.
@ -14,173 +14,77 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(459, 830)
Form.resize(316, 678)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form)
self.verticalLayout_2.setContentsMargins(3, 3, 3, 3)
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.graph_combobox = QtWidgets.QComboBox(Form)
self.graph_combobox.setObjectName("graph_combobox")
self.verticalLayout_2.addWidget(self.graph_combobox)
self.listWidget = QtWidgets.QListWidget(Form)
self.listWidget.setObjectName("listWidget")
self.verticalLayout_2.addWidget(self.listWidget)
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.newButton = QtWidgets.QPushButton(Form)
self.newButton.setObjectName("newButton")
self.horizontalLayout.addWidget(self.newButton)
self.editButton = QtWidgets.QPushButton(Form)
self.editButton.setObjectName("editButton")
self.horizontalLayout.addWidget(self.editButton)
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.setContentsMargins(-1, -1, -1, 6)
self.formLayout.setObjectName("formLayout")
self.type_label = QtWidgets.QLabel(self.frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.type_label.sizePolicy().hasHeightForWidth())
self.type_label.setSizePolicy(sizePolicy)
self.type_label.setObjectName("type_label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.type_label)
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.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.setFrameShape(QtWidgets.QFrame.NoFrame)
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.formLayout.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.stackedWidget)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.createButton = QtWidgets.QPushButton(self.frame)
self.createButton.setObjectName("createButton")
self.horizontalLayout_2.addWidget(self.createButton)
self.cancelbutton = QtWidgets.QPushButton(self.frame)
self.cancelbutton.setObjectName("cancelbutton")
self.horizontalLayout_2.addWidget(self.cancelbutton)
self.formLayout.setLayout(2, QtWidgets.QFormLayout.SpanningRole, self.horizontalLayout_2)
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)
self.stackedWidget.setCurrentIndex(-1)
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.newButton.setText(_translate("Form", "New object"))
self.editButton.setText(_translate("Form", "Edit"))
self.type_label.setText(_translate("Form", "Type"))
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
self.mode_comboBox.setItemText(2, _translate("Form", "Text"))
self.mode_comboBox.setItemText(3, _translate("Form", "Rectangle"))
self.mode_comboBox.setItemText(4, _translate("Form", "Ellipse"))
self.createButton.setText(_translate("Form", "Apply"))
self.cancelbutton.setText(_translate("Form", "Cancel"))

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/hdftree.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/hdftree.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.
@ -67,8 +67,8 @@ class Ui_Hdf_Dialog(object):
self.verticalLayout_2.addWidget(self.buttonBox)
self.retranslateUi(Hdf_Dialog)
self.buttonBox.rejected.connect(Hdf_Dialog.close)
self.buttonBox.accepted.connect(Hdf_Dialog.accept)
self.buttonBox.rejected.connect(Hdf_Dialog.close) # type: ignore
self.buttonBox.accepted.connect(Hdf_Dialog.accept) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Hdf_Dialog)
def retranslateUi(self, Hdf_Dialog):

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/autohome/dominik/nmreval/src/resources/_ui/integral_widget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/integral_widget.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/integratederive_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/integratederive_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -67,8 +68,8 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/interpol_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/interpol_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -130,8 +131,8 @@ class Ui_Dialog(object):
self.label_8.setBuddy(self.dest_combobox)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
Dialog.setTabOrder(self.listWidget, self.ylog_checkBox)
Dialog.setTabOrder(self.ylog_checkBox, self.interp_comboBox)

View File

@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/linedrawwidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_linewidget(object):
def setupUi(self, linewidget):
linewidget.setObjectName("linewidget")
linewidget.resize(400, 300)
self.gridLayout = QtWidgets.QGridLayout(linewidget)
self.gridLayout.setObjectName("gridLayout")
self.pos_lineedit = QtWidgets.QLineEdit(linewidget)
self.pos_lineedit.setObjectName("pos_lineedit")
self.gridLayout.addWidget(self.pos_lineedit, 1, 1, 1, 1)
self.orientation_label = QtWidgets.QLabel(linewidget)
self.orientation_label.setObjectName("orientation_label")
self.gridLayout.addWidget(self.orientation_label, 2, 0, 1, 1)
self.orient_combobox = QtWidgets.QComboBox(linewidget)
self.orient_combobox.setObjectName("orient_combobox")
self.orient_combobox.addItem("")
self.orient_combobox.addItem("")
self.gridLayout.addWidget(self.orient_combobox, 2, 1, 1, 1)
self.color_label = QtWidgets.QLabel(linewidget)
self.color_label.setObjectName("color_label")
self.gridLayout.addWidget(self.color_label, 0, 0, 1, 1)
self.pos_label = QtWidgets.QLabel(linewidget)
self.pos_label.setObjectName("pos_label")
self.gridLayout.addWidget(self.pos_label, 1, 0, 1, 1)
self.color_box = ColorListEditor(linewidget)
self.color_box.setObjectName("color_box")
self.gridLayout.addWidget(self.color_box, 0, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 3, 1, 1, 1)
self.retranslateUi(linewidget)
QtCore.QMetaObject.connectSlotsByName(linewidget)
def retranslateUi(self, linewidget):
_translate = QtCore.QCoreApplication.translate
linewidget.setWindowTitle(_translate("linewidget", "Form"))
self.orientation_label.setText(_translate("linewidget", "Orientation"))
self.orient_combobox.setItemText(0, _translate("linewidget", "Horizontal"))
self.orient_combobox.setItemText(1, _translate("linewidget", "Vertical"))
self.color_label.setText(_translate("linewidget", "Color"))
self.pos_label.setText(_translate("linewidget", "Position"))
from gui_qt.lib.delegates import ColorListEditor

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/lineedit_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/lineedit_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -29,8 +30,8 @@ class Ui_LineEdit_Dialog(object):
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)
self.buttonBox.accepted.connect(LineEdit_Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(LineEdit_Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(LineEdit_Dialog)
def retranslateUi(self, LineEdit_Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/mean_form.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/mean_form.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/meandialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/meandialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/modelwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/modelwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/move_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/move_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/multipointwidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_multipointwidget(object):
def setupUi(self, multipointwidget):
multipointwidget.setObjectName("multipointwidget")
multipointwidget.resize(400, 300)
self.gridLayout = QtWidgets.QGridLayout(multipointwidget)
self.gridLayout.setObjectName("gridLayout")
self.loop_checkbox = QtWidgets.QCheckBox(multipointwidget)
self.loop_checkbox.setObjectName("loop_checkbox")
self.gridLayout.addWidget(self.loop_checkbox, 1, 0, 1, 2)
self.addButton = QtWidgets.QPushButton(multipointwidget)
self.addButton.setObjectName("addButton")
self.gridLayout.addWidget(self.addButton, 3, 0, 1, 1)
self.color_label = QtWidgets.QLabel(multipointwidget)
self.color_label.setObjectName("color_label")
self.gridLayout.addWidget(self.color_label, 0, 0, 1, 1)
self.table_widget = QtWidgets.QTableWidget(multipointwidget)
self.table_widget.setObjectName("table_widget")
self.table_widget.setColumnCount(2)
self.table_widget.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.table_widget.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.table_widget.setHorizontalHeaderItem(1, item)
self.table_widget.horizontalHeader().setStretchLastSection(True)
self.gridLayout.addWidget(self.table_widget, 2, 0, 1, 2)
self.color_box = ColorListEditor(multipointwidget)
self.color_box.setObjectName("color_box")
self.gridLayout.addWidget(self.color_box, 0, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
self.removeButton = QtWidgets.QPushButton(multipointwidget)
self.removeButton.setObjectName("removeButton")
self.gridLayout.addWidget(self.removeButton, 3, 1, 1, 1)
self.retranslateUi(multipointwidget)
QtCore.QMetaObject.connectSlotsByName(multipointwidget)
def retranslateUi(self, multipointwidget):
_translate = QtCore.QCoreApplication.translate
multipointwidget.setWindowTitle(_translate("multipointwidget", "Form"))
self.loop_checkbox.setText(_translate("multipointwidget", "Close loop"))
self.addButton.setText(_translate("multipointwidget", "Add point"))
self.color_label.setText(_translate("multipointwidget", "Color"))
item = self.table_widget.horizontalHeaderItem(0)
item.setText(_translate("multipointwidget", "x"))
item = self.table_widget.horizontalHeaderItem(1)
item.setText(_translate("multipointwidget", "y"))
self.removeButton.setText(_translate("multipointwidget", "Remove last point"))
from gui_qt.lib.delegates import ColorListEditor

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/namespace_widget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/namespace_widget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/option_selection.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/option_selection.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/parameterform.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/parameterform.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/phase_corr_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/phase_corr_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.
@ -83,8 +83,8 @@ class Ui_SignalEdit(object):
self.gridLayout.addItem(spacerItem1, 1, 5, 1, 1)
self.retranslateUi(SignalEdit)
self.buttonBox.accepted.connect(SignalEdit.accept)
self.buttonBox.rejected.connect(SignalEdit.close)
self.buttonBox.accepted.connect(SignalEdit.accept) # type: ignore
self.buttonBox.rejected.connect(SignalEdit.close) # type: ignore
QtCore.QMetaObject.connectSlotsByName(SignalEdit)
def retranslateUi(self, SignalEdit):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/plotConfigTemplate.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/plotConfigTemplate.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/pokemon.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/pokemon.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -93,7 +94,7 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(-1)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/propwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/propwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/ptstab.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/ptstab.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/qfiledialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/qfiledialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -0,0 +1,67 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/rectanglewidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_rectanglewidget(object):
def setupUi(self, rectanglewidget):
rectanglewidget.setObjectName("rectanglewidget")
rectanglewidget.resize(400, 300)
self.gridLayout = QtWidgets.QGridLayout(rectanglewidget)
self.gridLayout.setObjectName("gridLayout")
self.color_label = QtWidgets.QLabel(rectanglewidget)
self.color_label.setObjectName("color_label")
self.gridLayout.addWidget(self.color_label, 0, 0, 1, 1)
self.left_x = QtWidgets.QLineEdit(rectanglewidget)
self.left_x.setObjectName("left_x")
self.gridLayout.addWidget(self.left_x, 2, 1, 1, 1)
self.left_y = QtWidgets.QLineEdit(rectanglewidget)
self.left_y.setObjectName("left_y")
self.gridLayout.addWidget(self.left_y, 2, 2, 1, 1)
self.right_x = QtWidgets.QLineEdit(rectanglewidget)
self.right_x.setObjectName("right_x")
self.gridLayout.addWidget(self.right_x, 3, 1, 1, 1)
self.color_box = ColorListEditor(rectanglewidget)
self.color_box.setObjectName("color_box")
self.gridLayout.addWidget(self.color_box, 0, 1, 1, 2)
self.left_label = QtWidgets.QLabel(rectanglewidget)
self.left_label.setObjectName("left_label")
self.gridLayout.addWidget(self.left_label, 2, 0, 1, 1)
self.right_y = QtWidgets.QLineEdit(rectanglewidget)
self.right_y.setObjectName("right_y")
self.gridLayout.addWidget(self.right_y, 3, 2, 1, 1)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
self.right_label = QtWidgets.QLabel(rectanglewidget)
self.right_label.setObjectName("right_label")
self.gridLayout.addWidget(self.right_label, 3, 0, 1, 1)
self.fill_label = QtWidgets.QLabel(rectanglewidget)
self.fill_label.setObjectName("fill_label")
self.gridLayout.addWidget(self.fill_label, 1, 0, 1, 1)
self.fill_box = ColorListEditor(rectanglewidget)
self.fill_box.setObjectName("fill_box")
self.gridLayout.addWidget(self.fill_box, 1, 1, 1, 2)
self.retranslateUi(rectanglewidget)
QtCore.QMetaObject.connectSlotsByName(rectanglewidget)
def retranslateUi(self, rectanglewidget):
_translate = QtCore.QCoreApplication.translate
rectanglewidget.setWindowTitle(_translate("rectanglewidget", "Form"))
self.color_label.setText(_translate("rectanglewidget", "Color"))
self.left_x.setPlaceholderText(_translate("rectanglewidget", "x"))
self.left_y.setPlaceholderText(_translate("rectanglewidget", "y"))
self.right_x.setPlaceholderText(_translate("rectanglewidget", "x"))
self.left_label.setText(_translate("rectanglewidget", "Lower left"))
self.right_y.setPlaceholderText(_translate("rectanglewidget", "y"))
self.right_label.setText(_translate("rectanglewidget", "Upper right"))
self.fill_label.setText(_translate("rectanglewidget", "Fill color"))
from gui_qt.lib.delegates import ColorListEditor

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/save_fit_parameter.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/save_fit_parameter.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -105,8 +106,8 @@ class Ui_fitparameter_save_dialog(object):
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)
self.buttonBox.accepted.connect(fitparameter_save_dialog.accept) # type: ignore
self.buttonBox.rejected.connect(fitparameter_save_dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(fitparameter_save_dialog)
fitparameter_save_dialog.setTabOrder(self.save_path_button, self.save_path_line)
fitparameter_save_dialog.setTabOrder(self.save_path_line, self.tableWidget)

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/save_fitmodel_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/save_fitmodel_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -52,8 +53,8 @@ class Ui_SaveDialog(object):
self.gridLayout.addWidget(self.frame, 2, 1, 1, 1)
self.retranslateUi(SaveDialog)
self.buttonBox.accepted.connect(SaveDialog.accept)
self.buttonBox.rejected.connect(SaveDialog.reject)
self.buttonBox.accepted.connect(SaveDialog.accept) # type: ignore
self.buttonBox.rejected.connect(SaveDialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(SaveDialog)
def retranslateUi(self, SaveDialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/save_options.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/save_options.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/saveoptions.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/saveoptions.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/sdmodelwidget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/sdmodelwidget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/selection_widget.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/selection_widget.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/setbyfunction_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/setbyfunction_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -184,8 +185,8 @@ class Ui_NewCurveDialog(object):
self.retranslateUi(NewCurveDialog)
self.comboBox.setCurrentIndex(-1)
self.comboBox_2.setCurrentIndex(-1)
self.buttonBox.accepted.connect(NewCurveDialog.accept)
self.buttonBox.rejected.connect(NewCurveDialog.reject)
self.buttonBox.accepted.connect(NewCurveDialog.accept) # type: ignore
self.buttonBox.rejected.connect(NewCurveDialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(NewCurveDialog)
NewCurveDialog.setTabOrder(self.lineEdit_3, self.lineEdit_4)
NewCurveDialog.setTabOrder(self.lineEdit_4, self.lineEdit_5)

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/shift_scale_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/shift_scale_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -267,8 +268,8 @@ class Ui_shift_dialog(object):
self.retranslateUi(shift_dialog)
self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(shift_dialog.accept)
self.buttonBox.rejected.connect(shift_dialog.reject)
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)

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/skipdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/skipdialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -77,8 +78,8 @@ class Ui_SkipDialog(object):
self.label.setBuddy(self.offset_spinbox)
self.retranslateUi(SkipDialog)
self.buttonBox.accepted.connect(SkipDialog.accept)
self.buttonBox.rejected.connect(SkipDialog.reject)
self.buttonBox.accepted.connect(SkipDialog.accept) # type: ignore
self.buttonBox.rejected.connect(SkipDialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(SkipDialog)
SkipDialog.setTabOrder(self.step_spinbox, self.offset_spinbox)
SkipDialog.setTabOrder(self.offset_spinbox, self.invert_check)

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/smoothdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/smoothdialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -91,8 +92,8 @@ class Ui_SmoothDialog(object):
self.label.setBuddy(self.polynom_spinBox)
self.retranslateUi(SmoothDialog)
self.buttonBox.accepted.connect(SmoothDialog.accept)
self.buttonBox.rejected.connect(SmoothDialog.reject)
self.buttonBox.accepted.connect(SmoothDialog.accept) # type: ignore
self.buttonBox.rejected.connect(SmoothDialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(SmoothDialog)
SmoothDialog.setTabOrder(self.comboBox, self.frac_spinBox)
SmoothDialog.setTabOrder(self.frac_spinBox, self.polynom_spinBox)

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/t1_calc_dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/t1_calc_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -271,8 +272,8 @@ class Ui_Dialog(object):
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)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/t1_dock.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/t1_dock.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/t1_tau_calculation.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/t1_tau_calculation.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/t1dialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/t1dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/textdrawidget.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_textwidget(object):
def setupUi(self, textwidget):
textwidget.setObjectName("textwidget")
textwidget.resize(400, 300)
self.gridLayout = QtWidgets.QGridLayout(textwidget)
self.gridLayout.setObjectName("gridLayout")
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 3, 0, 1, 1)
self.color_label = QtWidgets.QLabel(textwidget)
self.color_label.setObjectName("color_label")
self.gridLayout.addWidget(self.color_label, 0, 0, 1, 1)
self.center_x = QtWidgets.QLineEdit(textwidget)
self.center_x.setObjectName("center_x")
self.gridLayout.addWidget(self.center_x, 1, 1, 1, 1)
self.center_y = QtWidgets.QLineEdit(textwidget)
self.center_y.setObjectName("center_y")
self.gridLayout.addWidget(self.center_y, 1, 2, 1, 1)
self.center_label = QtWidgets.QLabel(textwidget)
self.center_label.setObjectName("center_label")
self.gridLayout.addWidget(self.center_label, 1, 0, 1, 1)
self.color_box = ColorListEditor(textwidget)
self.color_box.setObjectName("color_box")
self.gridLayout.addWidget(self.color_box, 0, 1, 1, 2)
self.text_label = QtWidgets.QLabel(textwidget)
self.text_label.setObjectName("text_label")
self.gridLayout.addWidget(self.text_label, 2, 0, 1, 1)
self.text_lineedit = QtWidgets.QLineEdit(textwidget)
self.text_lineedit.setObjectName("text_lineedit")
self.gridLayout.addWidget(self.text_lineedit, 2, 1, 1, 2)
self.retranslateUi(textwidget)
QtCore.QMetaObject.connectSlotsByName(textwidget)
def retranslateUi(self, textwidget):
_translate = QtCore.QCoreApplication.translate
textwidget.setWindowTitle(_translate("textwidget", "Form"))
self.color_label.setText(_translate("textwidget", "Color"))
self.center_x.setPlaceholderText(_translate("textwidget", "x"))
self.center_y.setPlaceholderText(_translate("textwidget", "y"))
self.center_label.setText(_translate("textwidget", "Center"))
self.text_label.setText(_translate("textwidget", "Text"))
from gui_qt.lib.delegates import ColorListEditor

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/tntdialog.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/tntdialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -115,8 +116,8 @@ class Ui_tntdialog(object):
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)
self.buttonBox.accepted.connect(tntdialog.accept) # type: ignore
self.buttonBox.rejected.connect(tntdialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(tntdialog)
def retranslateUi(self, tntdialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/typeconversion.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/typeconversion.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/untitled.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/untitled.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/userfitassist.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/userfitassist.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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
@ -77,8 +78,8 @@ class Ui_Dialog(object):
self.parameterLabel.setBuddy(self.parameterLineEdit)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/usermodeleditor.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/usermodeleditor.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# 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

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/valueeditor.ui'
# Form implementation generated from reading ui file 'src/resources/_ui/valueeditor.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.7
#
# 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.

View File

@ -553,9 +553,7 @@ class FitContainer(ExperimentContainer):
setattr(self, n, getattr(data, n))
def _init_plot(self, **kwargs):
color = kwargs.get('color')
if color is None:
color = kwargs.get('linecolor', (0, 0, 0))
color = kwargs.get('color', (0, 0, 0))
if isinstance(color, BaseColor):
color = color.rgb()
@ -607,7 +605,7 @@ class SignalContainer(ExperimentContainer):
linecolor = kwargs.get('linecolor', color)
if symcolor is None and linecolor is None:
color = next(self.colors) if color is None else color
color = next(self.colors)
symcolor = color
linecolor = color
elif symcolor is None:

View File

@ -17,7 +17,6 @@ class DataTree(QtWidgets.QTreeWidget):
moveItem = QtCore.pyqtSignal(list, str, str, int) # items, from, to, new row
copyItem = QtCore.pyqtSignal(list, str)
saveFits = QtCore.pyqtSignal(list)
extendFits = QtCore.pyqtSignal(list)
def __init__(self, parent=None):
super().__init__(parent=parent)
@ -342,9 +341,6 @@ class DataTree(QtWidgets.QTreeWidget):
_id = item.data(0, QtCore.Qt.UserRole)
if _id in ids:
try:
if item.parent() is None:
raise AttributeError
idx = item.parent().indexOfChild(item)
item.parent().takeChild(idx)
if _id in self._checked_sets:
@ -391,10 +387,6 @@ class DataTree(QtWidgets.QTreeWidget):
for c in available_cycles.keys():
col_menu.addAction(c)
action = menu.exec(evt.globalPos())
if action is None:
return
graphs = []
items = []
for i in self.selectedIndexes():
@ -403,6 +395,7 @@ class DataTree(QtWidgets.QTreeWidget):
items.append(self.itemFromIndex(i))
graphs.append(self.itemFromIndex(i).data(0, QtCore.Qt.UserRole))
action = menu.exec(evt.globalPos())
if action == del_action:
for gid in graphs:
self.management.delete_graph(gid)
@ -421,7 +414,8 @@ class DataTree(QtWidgets.QTreeWidget):
del_action = menu.addAction('Exterminate sets')
cp_action = menu.addAction('Replicate sets')
cat_action = menu.addAction('Join us!')
plt_action = save_action = extend_action = None
plt_action = None
save_action = None
menu.addSeparator()
col_menu = menu.addMenu('Color cycle')
for c in available_cycles.keys():
@ -452,7 +446,6 @@ class DataTree(QtWidgets.QTreeWidget):
menu.addSeparator()
plt_action = menu.addAction('Plot fit parameter')
save_action = menu.addAction('Save fit parameter')
extend_action = menu.addAction('Extrapolate fit')
action = menu.exec(evt.globalPos())
@ -476,9 +469,6 @@ class DataTree(QtWidgets.QTreeWidget):
elif action == save_action:
self.saveFits.emit(s)
elif action == extend_action:
self.extendFits.emit(s)
elif action.parent() == col_menu:
self.management.set_cycle(s, action.text())

View File

@ -4,6 +4,7 @@ from functools import reduce
from itertools import count, cycle
from operator import add
from string import ascii_letters
from typing import Dict, List, Tuple
import numpy as np
from pyqtgraph import mkPen
@ -143,7 +144,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
self._complex[self._current_model] = self.functionwidget.get_complex_state()
self._func_list[self._current_model] = self.functionwidget.get_parameter_list()
def load(self, ids: list[str]):
def load(self, ids: List[str]):
"""
Add name and id of dataset to list.
"""
@ -215,7 +216,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
self.model_frame.hide()
def _prepare(self, model: list, function_use: list = None,
parameter: dict = None, add_idx: bool = False, cnt: int = 0) -> tuple[dict, int]:
parameter: dict = None, add_idx: bool = False, cnt: int = 0) -> Tuple[dict, int]:
if parameter is None:
parameter = {'parameter': {}, 'lb': (), 'ub': (), 'var': [],
'glob': {'idx': [], 'p': [], 'var': [], 'lb': [], 'ub': []},
@ -240,8 +241,6 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
parameter['links'] += links
parameter['color'] += [f['color']]
cnt = f['cnt']
for p_k, v_k in p.items():
if add_idx:
kw_k = {f'{k}_{cnt}': v for k, v in v_k[1].items()}
@ -451,7 +450,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
return self.preview_lines
def set_parameter(self, parameter: dict[str, FitResult]):
def set_parameter(self, parameter: Dict[str, FitResult]):
# which data uses which model
data = self.data_table.collect_data(default=self.default_combobox.currentData())
@ -469,7 +468,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
self.set_parameter_iter(None, mean_parameter, self.models[fitted_model])
def set_parameter_iter(self, fit_id: str | None, param: list[float], functions: list, cnt: int = 0):
def set_parameter_iter(self, fit_id: str | None, param: List[float], functions: List, cnt: int = 0):
for model_p in functions:
if model_p['active']:
cnt += self.param_widgets[model_p['cnt']].set_parameter(fit_id, param[cnt:])

View File

@ -11,7 +11,7 @@ from ..lib.pg_objects import PlotItem
class QFitResult(QtWidgets.QDialog, Ui_Dialog):
closed = QtCore.pyqtSignal(dict, list, str, bool, bool, list)
closed = QtCore.pyqtSignal(dict, list, str, bool, dict)
redoFit = QtCore.pyqtSignal(dict)
def __init__(self, results: list, management, parent=None):
@ -20,17 +20,10 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
self._management = management
self.maxx_line.setValidator(QtGui.QDoubleValidator())
self.minx_line.setValidator(QtGui.QDoubleValidator())
self.numx_line.setValidator(QtGui.QIntValidator())
self.extrapolate_box.stateChanged.connect(lambda x: self.maxx_line.setEnabled(x))
self.extrapolate_box.stateChanged.connect(lambda x: self.minx_line.setEnabled(x))
self.extrapolate_box.stateChanged.connect(lambda x: self.numx_line.setEnabled(x))
self._prevs = {}
self._models = {}
for res in results:
for (res, parts) in results:
idx = res.idx
data_k = management.data[idx]
@ -43,7 +36,8 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
for fit in data_k.get_fits():
self._prevs[idx].append((fit.name, fit.statistics, fit.nobs-fit.nvar))
self._results = {res.idx: res for res in results}
self._results = {res.idx: res for (res, _) in results}
self._parts = {res.idx: parts for (res, parts) in results}
self._opts = [(False, False) for _ in range(len(self._results))]
self.residplot = self.graphicsView.addPlot(row=0, col=0)
@ -279,75 +273,12 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
plot_fits = self.curve_checkbox.isChecked()
if self.partial_checkBox.checkState() == QtCore.Qt.Checked:
self.closed.emit(self._results, self._opts, graph, plot_fits, self._parts)
else:
self.closed.emit(self._results, self._opts, graph, plot_fits, {})
parts = self.partial_checkBox.checkState() == QtCore.Qt.Checked
extrapolate = [None, None, None]
if self.extrapolate_box.isChecked():
try:
extrapolate[0] = float(self.minx_line.text())
except TypeError:
pass
try:
extrapolate[1] = float(self.maxx_line.text())
except TypeError:
pass
try:
extrapolate[2] = int(self.numx_line.text())
except TypeError:
pass
self.closed.emit(self._results, self._opts, graph, plot_fits, parts, extrapolate)
self.accept()
else:
self.reject()
class FitExtension(QtWidgets.QDialog):
def __init__(self, parent=None):
super().__init__(parent=parent)
gridLayout = QtWidgets.QGridLayout(self)
self.label = QtWidgets.QLabel('Minimum value')
gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.min_line = QtWidgets.QLineEdit()
self.min_line.setValidator(QtGui.QDoubleValidator())
gridLayout.addWidget(self.min_line, 0, 1, 1, 1)
self.label_2 = QtWidgets.QLabel('Maximum value')
gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
self.max_line = QtWidgets.QLineEdit()
self.max_line.setValidator(QtGui.QDoubleValidator())
gridLayout.addWidget(self.max_line, 1, 1, 1, 1)
self.label_3 = QtWidgets.QLabel('Number of pts.')
gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
self.num_pts = QtWidgets.QLineEdit()
self.num_pts.setValidator(QtGui.QIntValidator())
gridLayout.addWidget(self.num_pts, 2, 1, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox()
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
gridLayout.addWidget(self.buttonBox, 3, 0, 1, 2)
self.setLayout(gridLayout)
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
@property
def values(self):
try:
xmin = float(self.min_line.text())
xmax = float(self.max_line.text())
nums = int(self.num_pts.text())
except TypeError:
return None
return xmin, xmax, nums

View File

@ -0,0 +1,217 @@
from __future__ import annotations
from PyQt5 import QtCore, QtGui, QtWidgets
from .._py.ellipsewidget import Ui_ellipsewidget
from .._py.linedrawwidget import Ui_linewidget
from .._py.rectanglewidget import Ui_rectanglewidget
from .._py.multipointwidget import Ui_multipointwidget
from .._py.textdrawidget import Ui_textwidget
__all__ = ['LineWidget', 'MultiPointWidget', 'RectangleWidget', 'EllipseWidget', 'TextWidget']
def parse_point(x_widget: QtWidgets.QLineEdit, y_widget: QtWidgets.QLineEdit) -> None | tuple[float, float]:
x = x_widget.text()
if not x:
return
y = y_widget.text()
if not y:
return
try:
return float(x), float(y)
except ValueError:
return
class LineWidget(QtWidgets.QWidget, Ui_linewidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.setupUi(self)
self.pos_lineedit.setValidator(QtGui.QDoubleValidator())
def collect_args(self) -> dict | None:
pos = self.pos_lineedit.text()
try:
pos = float(pos)
except ValueError:
return
dic = {
'color': self.color_box.currentData(),
'pos': pos,
'angle': self.orient_combobox.currentIndex() * 90
}
return dic
def set_args(self, pos: float = None, angle: int = None, color = None):
self.pos_lineedit.setText(str(pos))
self.orient_combobox.setCurrentIndex(angle%90)
self.color_box.setCurrentIndex(self.color_box.findData(color))
class MultiPointWidget(QtWidgets.QWidget, Ui_multipointwidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.setupUi(self)
self.new_point()
self.new_point()
@QtCore.pyqtSlot(name='on_addButton_clicked')
def new_point(self):
row = self.table_widget.rowCount()
self.table_widget.setRowCount(row+1)
placeholder = ['x', 'y']
for column in range(2):
line_edit = QtWidgets.QLineEdit()
line_edit.setFrame(False)
line_edit.setPlaceholderText(placeholder[column])
line_edit.setValidator(QtGui.QDoubleValidator())
self.table_widget.setCellWidget(row, column, line_edit)
@QtCore.pyqtSlot(name='on_removeButton_clicked')
def less_point(self):
if self.table_widget.rowCount() > 2:
self.table_widget.removeRow(self.table_widget.rowCount()-1)
def collect_args(self) -> dict | None:
pts = []
if self.table_widget.rowCount() < 2:
return
for row in range(self.table_widget.rowCount()):
next_pt = parse_point(self.table_widget.cellWidget(row, 0), self.table_widget.cellWidget(row, 1))
if next_pt is None:
return
pts.append(next_pt)
dic = {
'color': self.color_box.currentData(QtCore.Qt.UserRole),
'pts': pts,
'closed': self.loop_checkbox.isChecked(),
}
return dic
def set_args(self, x: tuple = None, y: tuple = None, closed: bool = True, color=None):
self.table_widget.clear()
self.table_widget.setRowCount(0)
for row, (x_i, y_i) in enumerate(zip(x, y)):
self.new_point()
self.table_widget.cellWidget(row, 0).setText(str(x_i))
self.table_widget.cellWidget(row, 1).setText(str(y_i))
self.loop_checkbox.setChecked(closed)
self.color_box.setCurrentIndex(self.color_box.findData(color))
class RectangleWidget(QtWidgets.QWidget, Ui_rectanglewidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.setupUi(self)
self.fill_box.insertItem(0, 'No fill', None)
self.fill_box.setCurrentIndex(0)
self.left_x.setValidator(QtGui.QDoubleValidator())
self.left_y.setValidator(QtGui.QDoubleValidator())
self.right_x.setValidator(QtGui.QDoubleValidator())
self.right_y.setValidator(QtGui.QDoubleValidator())
def set_args(self, left: tuple = (0, 0), right: tuple = (1, 1), color=None, fill=None):
self.left_x.setText(str(left[0]))
self.left_y.setText(str(left[1]))
self.right_x.setText(str(right[0]))
self.right_y.setText(str(right[1]))
self.color_box.setCurrentIndex(self.color_box.findData(color, QtCore.Qt.UserRole))
self.fill_box.setCurrentIndex(self.fill_box.findData(fill, QtCore.Qt.UserRole))
def collect_args(self) -> dict | None:
left = parse_point(self.left_x, self.left_y)
if left is None:
return
right = parse_point(self.right_x, self.right_y)
if right is None:
return
dic = {
'color': self.color_box.currentData(QtCore.Qt.UserRole),
'fill': self.fill_box.currentData(QtCore.Qt.UserRole),
'left': left,
'right': right,
}
return dic
class EllipseWidget(QtWidgets.QWidget, Ui_ellipsewidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.setupUi(self)
self.fill_box.insertItem(0, 'No fill', None)
self.fill_box.setCurrentIndex(0)
self.center_x.setValidator(QtGui.QDoubleValidator())
self.center_y.setValidator(QtGui.QDoubleValidator())
self.width_line.setValidator(QtGui.QDoubleValidator())
self.height_line.setValidator(QtGui.QDoubleValidator())
def set_args(self, center: tuple = (0, 0), axes: tuple = (1, 1), color=None, fill=None):
self.center_x.setText(str(center[0]))
self.center_y.setText(str(center[1]))
self.width_line.setText(str(axes[0]))
self.width_line.setText(str(axes[1]))
self.color_box.setCurrentIndex(self.color_box.findData(color, QtCore.Qt.UserRole))
self.fill_box.setCurrentIndex(self.fill_box.findData(fill, QtCore.Qt.UserRole))
def collect_args(self) -> dict | None:
centre = parse_point(self.center_x, self.center_y)
if centre is None:
return
axes = parse_point(self.width_line, self.height_line)
if axes is None:
return
dic = {
'color': self.color_box.currentData(QtCore.Qt.UserRole),
'fill': self.fill_box.currentData(QtCore.Qt.UserRole),
'center': centre,
'axes': axes,
}
return dic
class TextWidget(QtWidgets.QWidget, Ui_textwidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.setupUi(self)
self.center_x.setValidator(QtGui.QDoubleValidator())
self.center_y.setValidator(QtGui.QDoubleValidator())
def collect_args(self) -> dict | None:
centre = parse_point(self.center_x, self.center_y)
if centre is None:
return
dic = {
'color': self.color_box.currentData(QtCore.Qt.UserRole),
'pos': centre,
'text': self.text_lineedit.text(),
}
return dic

View File

@ -0,0 +1,333 @@
from __future__ import annotations
import uuid
from pyqtgraph import TextItem, mkPen, GraphicsObject, mkBrush
from numpy import log10
from gui_qt.Qt import QtCore, QtGui
from gui_qt.lib.pg_objects import LogInfiniteLine, PlotItem
__all__ = ['LineObject', 'MultipointObject', 'RectangleObject', 'TextObject', 'EllipseObject']
from nmreval.lib.colors import BaseColor
class BaseObject:
def __init__(self, color=None):
self.id = str(uuid.uuid4())
self.color = color
self.drawing = None
def __str__(self):
raise NotImplementedError
def get_values(self):
raise NotImplementedError
def set_values(self, *args, **kwargs):
raise NotImplementedError
class LineObject(BaseObject):
def __init__(self, pos: float, angle: float, **kwargs):
super().__init__(**kwargs)
self.pos = pos
self.angle = angle
self.drawing = LogInfiniteLine(pos=self.pos, angle=self.angle, pen=mkPen(color=self.color.rgb()))
def __str__(self):
return f'{"x" if self.angle==90 else "y"}={self.pos}'
def get_values(self):
return {'type': 'line', 'color': self.color, 'pos': self.pos, 'angle': self.angle}
def set_values(self, pos=None, angle=None, color=None):
if pos != self.pos:
self.drawing.setPos(pos)
if angle != self.angle:
self.drawing.setAngle(angle)
if color != self.color:
self.drawing.setPen(mkPen(color.rgb()))
class MultipointObject(BaseObject):
def __init__(self, pts: list, closed: bool = False, **kwargs):
super().__init__(**kwargs)
x, y = zip(*pts)
self.closed = closed
if self.closed:
x += (x[0],)
y += (y[0],)
self._x = x
self._y = y
self.drawing = PlotItem(x=self._x, y=self._y, pen=mkPen(color=self.color.rgb()))
def __str__(self):
return f'{len(self._y)-int(self.closed)}-pts'
def get_values(self):
dic = {'type': 'multipts', 'color': self.color, 'x': None, 'y': None, 'closed': self.closed}
if self.closed:
dic['x'] = self._x[:-1]
dic['y'] = self._y[:-1]
else:
dic['x'] = self._x
dic['y'] = self._y
return dic
def set_values(self, pts: list, closed: bool = None, color=None):
if color != self.color:
self.drawing.setPen(mkPen(color.rgb()))
x, y = zip(*pts)
self._x = x
self._y = y
if closed:
self._x += (x[0],)
self._y += (y[0],)
self.drawing.setData(self._x, self._y)
class Rectangle(GraphicsObject):
# adapted from pyqtgraph example on custom objects
def __init__(self, left: tuple, right: tuple, color: BaseColor, fill: BaseColor):
GraphicsObject.__init__(self)
self.log_mode = [False, False]
self.setData(left, right, color, fill)
def generatePicture(self):
## pre-computing a QPicture object allows paint() to run much more quickly,
## rather than re-drawing the shapes every time.
print(self.x_disp, self.y_disp, self.dx, self.dy, self.color, self.fill)
self.picture = QtGui.QPicture()
p = QtGui.QPainter(self.picture)
if self.fill is not None:
p.setBrush(mkBrush(self.fill.rgb()))
p.setPen(mkPen(self.color.rgb()))
p.drawRect(QtCore.QRectF(self.x_disp, self.y_disp, self.dx, self.dy))
p.end()
def paint(self, p, *_):
p.drawPicture(0, 0, self.picture)
def boundingRect(self):
## boundingRect _must_ indicate the entire area that will be drawn on
## or else we will get artifacts and possibly crashing.
## (in this case, QPicture does all the work of computing the bouning rect for us)
return QtCore.QRectF(self.picture.boundingRect())
def setLogMode(self, x_mode, y_mode):
if self.log_mode == [x_mode, y_mode]:
return
if self.log_mode[0] != x_mode:
if x_mode:
x0 = self.p0[0]
xmax = log10(x0+self.delta[0])
self.x_disp = log10(x0)
self.dx = xmax - self.x_disp
else:
self.x_disp = self.p0[0]
self.dx = self.delta[0]
if self.log_mode[1] != y_mode:
if y_mode:
y0 = self.p0[1]
ymax = log10(y0 + self.delta[1])
self.y_disp = log10(y0)
self.dy = ymax - self.y_disp
else:
self.y_disp = self.p0[1]
self.dy = self.delta[1]
self.generatePicture()
self.log_mode = [x_mode, y_mode]
self.informViewBoundsChanged()
def setData(self, left, right, color, fill):
self.p0 = left
self.delta = [right[0]-self.p0[0], right[1]-self.p0[1]]
self.x_disp = self.p0[0]
self.dx = self.delta[0]
self.y_disp = self.p0[1]
self.dy = self.delta[1]
self.color = color
self.fill = fill
l = [self.log_mode[0], self.log_mode[1]]
self.log_mode = [None, None]
self.setLogMode(*l)
class RectangleObject(BaseObject):
def __init__(self, left: tuple, right: tuple, fill: BaseColor, **kwargs):
super().__init__(**kwargs)
self.fill = fill
self.left = left
self.right = right
self.drawing = Rectangle(left, right, self.color, self.fill)
def __str__(self):
return f'Rectangle {self.left} to {self.right}'
def get_values(self):
return {'type': 'rectangle', 'color': self.color, 'left': self.left, 'right': self.right, 'fill': self.fill}
def set_values(self, left=None, right=None, color=None, fill=None):
if left is not None:
self.left = left
if right is not None:
self.right = right
if fill is not None:
self.fill = fill
if color is not None:
self.color = color
self.drawing.setData(self.left, self.right, self.color, self.fill)
class TextObject(BaseObject):
def __init__(self, text, pos, **kwargs):
super().__init__(**kwargs)
self.pos = pos
self.drawing = TextItem(text, anchor=(0.5, 0.5), color=self.color.rgb())
self.drawing.setPos(*pos)
def __str__(self):
return f'{self.drawing.toPlainText()} at {self.pos}'
class EllipseObject(BaseObject):
def __init__(self, center: tuple, axes: tuple, fill: BaseColor, **kwargs):
super().__init__(**kwargs)
self.center = center
self.axes = axes
self.fill = fill
self.drawing = Ellipse(self.center, self.axes, self.color, self.fill)
def __str__(self):
return f'Ellipse at {self.center}'
def get_values(self):
return {'type': 'ellipse', 'color': self.color, 'center': self.center, 'axes': self.axes, 'fill': self.fill}
def set_values(self, center=None, axes=None, color=None, fill=None):
if center is not None:
self.center = center
if axes is not None:
self.axes = axes
if fill is not None:
self.fill = fill
if color is not None:
self.color = color
self.drawing.setData(self.center, self.axes, self.color, self.fill)
class Ellipse(GraphicsObject):
# adapted from pyqtgraph example on custom objects
def __init__(self, center: tuple, axes: tuple, color: BaseColor, fill: BaseColor):
GraphicsObject.__init__(self)
self.log_mode = [False, False]
self.setData(center, axes, color, fill)
self.generatePicture()
def generatePicture(self):
## pre-computing a QPicture object allows paint() to run much more quickly,
## rather than re-drawing the shapes every time.
self.picture = QtGui.QPicture()
p = QtGui.QPainter(self.picture)
p.setPen(mkPen(self.color.rgb()))
if self.fill is not None:
p.setBrush(mkBrush(self.fill.rgb()))
p.drawEllipse(QtCore.QPointF(*self.center_disp), *self.ax_disp)
p.end()
def paint(self, p, *_):
p.drawPicture(0, 0, self.picture)
def boundingRect(self):
## boundingRect _must_ indicate the entire area that will be drawn on
## or else we will get artifacts and possibly crashing.
## (in this case, QPicture does all the work of computing the bouning rect for us)
return QtCore.QRectF(self.picture.boundingRect())
def setLogMode(self, x_mode, y_mode):
if self.log_mode == [x_mode, y_mode]:
return
if self.log_mode[0] != x_mode:
if x_mode:
x0 = self.center[0]
xmax = log10(x0+self.ax[0])
self.center_disp = (log10(x0), self.center_disp[1])
self.ax_disp = (xmax, self.ax_disp[1])
else:
self.center_disp = (self.center[0], self.center_disp[1])
self.ax_disp = (self.ax[0], self.ax_disp[1])
if self.log_mode[1] != y_mode:
if y_mode:
y0 = self.center[1]
ymax = log10(y0+self.ax[1])
self.center_disp = (self.center_disp[0], log10(y0))
self.ax_disp = (self.ax_disp[0], ymax)
else:
self.ax_disp = (self.ax_disp[0], self.ax[1])
self.center_disp = (self.center_disp[0], self.center[1])
self.generatePicture()
self.log_mode = [x_mode, y_mode]
self.informViewBoundsChanged()
def setData(self, center, axes, color, fill):
self.center = center
self.ax = axes
self.center_disp = self.center
self.ax_disp = self.ax
self.color = color
self.fill = fill
l = [self.log_mode[0], self.log_mode[1]]
self.log_mode = [None, None]
self.setLogMode(*l)

View File

@ -1,5 +1,9 @@
from __future__ import annotations
from ..Qt import QtWidgets, QtCore
from .._py.guidelinewidget import Ui_Form
from .draw_inputs import *
from .draw_objects import *
class DrawingsWidget(QtWidgets.QWidget, Ui_Form):
@ -7,155 +11,97 @@ class DrawingsWidget(QtWidgets.QWidget, Ui_Form):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.connected_figure=None
self.setupUi(self)
def __call__(self, graphs):
for gid, name in graphs:
self.graph_comboBox.addItem(name, userData=gid)
self.widgets = {
'line': LineWidget(self),
'multipts': MultiPointWidget(self),
'text': TextWidget(self),
'rectangle': RectangleWidget(self),
'ellipse': EllipseWidget(self),
}
for w in self.widgets.values():
self.stackedWidget.addWidget(w)
self.graphs = None
self._editmode = False
self.frame.setEnabled(False)
def update_tree(self):
for gid, windows in self.graphs.items():
self.graph_combobox.addItem(windows.title, userData=gid)
@QtCore.pyqtSlot(int, name='on_graph_combobox_currentIndexChanged')
def look_for_drawing(self, idx: int):
self.listWidget.clear()
graph_id = self.graph_combobox.itemData(idx)
for k, v in self.graphs[graph_id].drawings.items():
child = QtWidgets.QListWidgetItem(str(v))
child.setData(QtCore.Qt.UserRole, k)
self.listWidget.addItem(child)
@QtCore.pyqtSlot(name='on_newButton_clicked')
@QtCore.pyqtSlot(name='on_editButton_clicked')
def start_drawing(self):
self._editmode = self.sender() == self.editButton
if self._editmode:
graph_id, obj = self.get_item()
arguments = obj.get_values()
obj_type = arguments.pop('type')
self.widgets[obj_type].set_args(**arguments)
self.listWidget.setEnabled(False)
self.graph_combobox.setEnabled(False)
self.frame.setEnabled(True)
def clear(self):
self.graph_comboBox.clear()
self.graph_combobox.clear()
@QtCore.pyqtSlot(int, name='on_mode_comboBox_currentIndexChanged')
def change_draw_type(self, idx: int):
self.stackedWidget.setCurrentIndex(idx)
"""
self.lines = {}
self.comments = {}
self.vh_pos_lineEdit.setValidator(QtGui.QDoubleValidator())
self.tableWidget.installEventFilter(self)
@QtCore.pyqtSlot(name='on_pushButton_clicked')
def make_line(self):
invalid = True
idx = self.mode_comboBox.currentIndex()
try:
pos = float(self.vh_pos_lineEdit.text())
# Vertical: idx=0; horizontal: idx = 1
angle = 90*abs(1-idx)
invalid = False
except ValueError:
pos = None
angle = None
pass
if invalid:
QtWidgets.QMessageBox().information(self, 'Invalid input', 'Input is not a valid number')
@QtCore.pyqtSlot(name='on_createButton_clicked')
def make_drawing(self):
dic = self.stackedWidget.currentWidget().collect_args()
if dic is None:
QtWidgets.QMessageBox.information(self, 'Not working', 'Something is missing to create this object')
return
qcolor = QtGui.QColor.fromRgb(*self.color_comboBox.value.rgb())
comment = self.comment_lineEdit.text()
line = LogInfiniteLine(pos=pos, angle=angle, movable=self.drag_checkBox.isChecked(), pen=qcolor)
line.sigPositionChanged.connect(self.move_line)
graph_id, obj = self.get_item()
self.make_table_row(pos, angle, qcolor, comment)
graph_id = self.graph_comboBox.currentData()
try:
self.lines[graph_id].append(line)
self.comments[graph_id].append(comment)
except KeyError:
self.lines[graph_id] = [line]
self.comments[graph_id] = [comment]
self.line_created.emit(line, graph_id)
def set_graphs(self, graphs: list):
for graph_id, name in graphs:
self.graph_comboBox.addItem(name, userData=graph_id)
def remove_graph(self, graph_id: str):
idx = self.graph_comboBox.findData(graph_id)
if idx != -1:
self.graph_comboBox.removeItem(idx)
if graph_id in self.lines:
del self.lines[graph_id]
@QtCore.pyqtSlot(int, name='on_graph_comboBox_currentIndexChanged')
def change_graph(self, idx: int):
self.tableWidget.clear()
self.tableWidget.setRowCount(0)
graph_id = self.graph_comboBox.itemData(idx)
if graph_id in self.lines:
lines = self.lines[graph_id]
comments = self.comments[graph_id]
for i, line in enumerate(lines):
self.make_table_row(line.pos(), line.angle, line.pen.color(), comments[i])
def make_table_row(self, position, angle, color, comment):
if angle == 0:
try:
pos_label = 'x = ' + str(position.y())
except AttributeError:
pos_label = 'x = {position}'
elif angle == 90:
try:
pos_label = f'y = {position.x()}'
except AttributeError:
pos_label = f'y = {position}'
if self._editmode:
obj.set_values(**dic)
else:
raise ValueError('Only horizontal or vertical lines are supported')
new_obj = [LineObject, MultipointObject, TextObject, RectangleObject, EllipseObject][self.mode_comboBox.currentIndex()](**dic)
item = QtWidgets.QTableWidgetItem(pos_label)
item.setFlags(QtCore.Qt.ItemIsSelectable)
item.setForeground(QtGui.QBrush(QtGui.QColor('black')))
child = QtWidgets.QListWidgetItem(str(new_obj))
child.setData(QtCore.Qt.UserRole, new_obj.id)
self.listWidget.addItem(child)
row_count = self.tableWidget.rowCount()
self.tableWidget.setRowCount(row_count+1)
self.tableWidget.setItem(row_count, 0, item)
self.graphs[graph_id].addDrawing(new_obj)
item2 = QtWidgets.QTableWidgetItem(comment)
self.tableWidget.setItem(row_count, 1, item2)
self.graph_combobox.setEnabled(True)
self.listWidget.setEnabled(True)
self.frame.setEnabled(False)
colitem = QtWidgets.QTableWidgetItem(' ')
colitem.setBackground(QtGui.QBrush(color))
colitem.setFlags(QtCore.Qt.ItemIsSelectable)
self.tableWidget.setVerticalHeaderItem(row_count, colitem)
@QtCore.pyqtSlot(name='on_cancelbutton_clicked')
def cancel_edit(self):
self.graph_combobox.setEnabled(True)
self.listWidget.setEnabled(True)
self.frame.setEnabled(False)
def eventFilter(self, src: QtCore.QObject, evt: QtCore.QEvent) -> bool:
if evt.type() == QtCore.QEvent.KeyPress:
if evt.key() == QtCore.Qt.Key_Delete:
self.delete_line()
return True
def get_item(self):
edit_item = self.listWidget.currentItem()
graph_id = self.graph_combobox.currentData()
if edit_item is None:
return graph_id, None
return super().eventFilter(src, evt)
object_id = edit_item.data(QtCore.Qt.UserRole)
def delete_line(self):
remove_rows = sorted([item.row() for item in self.tableWidget.selectedItems()])
graph_id = self.graph_comboBox.currentData()
current_lines = self.lines[graph_id]
print(remove_rows)
for i in reversed(remove_rows):
print(i)
self.tableWidget.removeRow(i)
self.line_deleted.emit(current_lines[i], graph_id)
current_lines.pop(i)
self.comments[graph_id].pop(i)
@QtCore.pyqtSlot(object)
def move_line(self, line: InfiniteLine):
current_idx = self.graph_comboBox.currentData()
graphs = self.lines[current_idx]
i = -1
for i, line_i in enumerate(graphs):
if line == line_i:
break
pos = line.value()
text_item = self.tableWidget.item(i, 0)
text_item.setText(text_item.text()[:4]+f'{pos:.4g}')
"""
return graph_id, self.graphs[graph_id].drawings[object_id]

View File

@ -48,6 +48,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
self.real_plots = {}
self.imag_plots = {}
self.error_plots = {}
self.drawings = {}
self._special_needs = []
self._external_items = []
@ -130,6 +131,8 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
@title.setter
def title(self, value):
if self.graph_label.text() != '':
self.graph_label.setText(str(value))
self.setWindowTitle(str(value))
@property
@ -343,7 +346,12 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
return True
def addDrawing(self, obj):
self.drawings[obj.id] = obj
self.graphic.addItem(obj.drawing)
def closeEvent(self, evt: QtGui.QCloseEvent):
print(self.parent())
if not self.closable:
evt.ignore()
return
@ -629,6 +637,10 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
dic['in_legend'] = in_legend
dic['drawings'] = []
for d in self.drawings:
dic['drawings'].append(d.get_value())
return dic
def get_state(self) -> dict:
@ -741,3 +753,13 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
temp = self._fgcolor, self._bgcolor
self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])
self._prev_colors = temp
@QtCore.pyqtSlot(QtCore.Qt.WindowStates, QtCore.Qt.WindowStates)
def state_changed(self, old_state: QtCore.Qt.WindowStates, new_state: QtCore.Qt.WindowStates):
old_maximized = old_state & QtCore.Qt.WindowMaximized
new_maximized = new_state & QtCore.Qt.WindowMaximized
if old_maximized and not new_maximized:
self.graph_label.setText('')
elif not old_maximized and new_maximized:
self.graph_label.setText(self.title)

View File

@ -113,7 +113,7 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
@QtCore.pyqtSlot(int, name='on_line_spinBox_valueChanged')
def set_column_names(self, _):
self.ascii_table.setHorizontalHeaderLabels(map(str, range(1, self.ascii_table.columnCount() + 1)))
if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
if self.column_checkBox.isChecked():
header_line = self.reader.header[self.line_spinBox.value()-1]
self.ascii_table.setHorizontalHeaderLabels(header_line.split())

View File

@ -91,6 +91,10 @@ class GraceExporter:
else:
data.data = c_[item['x'], item['y']]
for item in self.__opts['drawings']:
print(item)
draw = self.__agr.new_drawing()
for c in new_colors:
self.__agr.set_color(c[1], c[2], idx=c[0])

View File

@ -1,5 +1,3 @@
import numpy as np
from nmreval.lib.lines import LineStyle
from nmreval.lib.symbols import SymbolStyle
from nmreval.data.points import Points
@ -92,7 +90,6 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog):
label = self._reader.get_property(*key, 'legend').replace('"', '')
# label = self._reader.graphs[key[0]].sets[key[1]]['legend'].replace('"', '')
sd = s.data
sd = np.atleast_2d(sd)
if s.type == 'xydy':
data.append(Points(x=sd[:, 0], y=sd[:, 1], y_err=sd[:, 2], name=label))
else:

View File

@ -233,10 +233,8 @@ class Updater:
response = requests.get(url_zsync)
if response.status_code == requests.codes['\o/']:
zsync_file = response.content
else:
logger.error(f'Request for zsync returned code {response.statuse_code}')
except Exception:
logger.exception('Download of zsync failed')
except Exception as e:
pass
if zsync_file is not None:
for line in zsync_file.split(b'\n'):

View File

@ -11,10 +11,10 @@ from pyqtgraph import ViewBox
from nmreval.configs import *
from .management import UpperManagement
from ..Qt import QtGui, QtPrintSupport
from ..Qt import QtCore, QtGui, QtPrintSupport, QtWidgets
from ..data.shift_graphs import QShift
from ..data.signaledit import QApodDialog, QBaselineDialog, QPhasedialog
from ..fit.result import FitExtension, QFitResult
from ..fit.result import QFitResult
from ..graphs.graphwindow import QGraphWindow
from ..graphs.movedialog import QMover
from ..io.fcbatchreader import QFCReader
@ -164,7 +164,6 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
self.datawidget.startShowProperty.connect(self.management.get_properties)
self.datawidget.propertyChanged.connect(self.management.update_property)
self.datawidget.tree.saveFits.connect(self.save_fit_parameter)
self.datawidget.tree.extendFits.connect(self.extend_fit)
self.management.newData.connect(self.show_new_data)
self.management.newGraph.connect(self.new_graph)
@ -342,6 +341,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
for w in self.area.subWindowList():
wdgt = w.widget()
if wdgt.id == gid:
w.disconnect()
wdgt.disconnect()
wdgt.scene.disconnect()
if wdgt == self.current_graph_widget:
@ -397,6 +397,8 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
subwindow.setOption(QtWidgets.QMdiSubWindow.RubberBandResize, True)
subwindow.setMinimumHeight(400)
subwindow.setMinimumWidth(600)
subwindow.windowStateChanged.connect(w.state_changed)
self.datawidget.blockSignals(True)
self.datawidget.tree.blockSignals(True)
@ -414,11 +416,12 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
self.ptsselectwidget.set_graphs(graph_list)
@QtCore.pyqtSlot(QtWidgets.QMdiSubWindow, name='on_area_subWindowActivated')
def change_window(self, wd):
def change_window(self, wd: QtWidgets.QMdiSubWindow | None):
""" Called every time focus moves from or to a subwindow. Returns None if current focus is not on a subwindow"""
if wd is not None:
if self.current_graph_widget is not None:
self.current_graph_widget.closable = True
self.current_graph_widget.graph_label.setText('')
if self.ptsselectwidget.isVisible():
self._select_ptswidget(False, False, False)
@ -432,6 +435,11 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
self.change_mouse_mode(self.actionMouse_behaviour.isChecked())
if wd.isMaximized():
self.current_graph_widget.graph_label.setText(self.current_graph_widget.title)
else:
self.current_graph_widget.graph_label.setText('')
pick = False
block = False
if self.ptsselectwidget.isVisible():
@ -908,10 +916,10 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
res_dialog.redoFit.connect(self.management.redo_fits)
res_dialog.show()
@QtCore.pyqtSlot(dict, list, str, bool, bool, list)
def accepts_fit(self, res: dict, opts: list, param_graph: str, show_fit: bool, parts: bool, extrapolate: list) -> None:
@QtCore.pyqtSlot(dict, list, str, bool, dict)
def accepts_fit(self, res: dict, opts: list, param_graph: str, show_fit: bool, parts: dict) -> None:
self.fit_dialog.set_parameter(res)
self.management.make_fits(res, opts, param_graph, show_fit, parts, extrapolate)
self.management.make_fits(res, opts, param_graph, show_fit, parts)
@QtCore.pyqtSlot(name='on_actionFunction_editor_triggered')
def edit_models(self):
@ -923,16 +931,6 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
self.editor.setWindowModality(QtCore.Qt.ApplicationModal)
self.editor.show()
@QtCore.pyqtSlot(list)
def extend_fit(self, sets: list):
w = FitExtension(self)
res = w.exec()
print(res)
if res:
p = w.values
x = linspace(p[0], p[1], num=p[2])
self.management.extend_fits(sets, x)
@QtCore.pyqtSlot(name='on_action_create_fit_function_triggered')
def open_fitmodel_wizard(self):
from ..fit.function_creation_dialog import QUserFitCreator
@ -942,6 +940,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
helper.show()
@QtCore.pyqtSlot(name='on_actionShift_triggered')
def shift_dialog(self):
s = QShift(self)

View File

@ -4,8 +4,6 @@ import pathlib
import re
import uuid
import numpy as np
from nmreval.fit import data as fit_d
from nmreval.fit.model import Model
from nmreval.fit.result import FitResult
@ -484,7 +482,7 @@ class UpperManagement(QtCore.QObject):
parameter[set_id] = (new_values, set_parameter[1])
self.start_fit(*self.__fit_options)
def make_fits(self, res: dict, opts: list, param_graph: str, show_fit: bool, parts: bool, extrapolate: list) -> None:
def make_fits(self, res: dict, opts: list, param_graph: str, show_fit: bool, parts: dict) -> None:
"""
Args:
@ -493,7 +491,6 @@ class UpperManagement(QtCore.QObject):
param_graph: None if no parameter to plot, '' for new graph, or id of existig graph
show_fit: plot fit curve?
parts: key is that of original data, value is list of subplots
extrapolate:
"""
f_id_list = []
@ -506,26 +503,6 @@ class UpperManagement(QtCore.QObject):
if reject:
continue
if not all(e is None for e in extrapolate):
spacefunc = np.geomspace if fit.islog else np.linspace
xmin = fit.x.min()
xmax = fit.x.max()
len_data = len(fit.x_data)
num_pts = 20*len_data-9 if len_data < 51 else 3*len_data
if extrapolate[0] is not None:
xmin = extrapolate[0]
if extrapolate[1] is not None:
xmax = extrapolate[1]
if extrapolate[2] is not None:
num_pts = extrapolate[2]
_x = spacefunc(xmin, xmax, num=num_pts)
fit = fit.with_new_x(_x)
data_k = self.data[k]
if delete_prev:
tobedeleted.extend([f.id for f in data_k.get_fits()])
@ -550,16 +527,18 @@ class UpperManagement(QtCore.QObject):
f_id_list.append(f_id)
data_k.set_fits(f_id)
if parts:
color_scheme = available_cycles['colorblind']
for subfunc, col in zip(fit.sub(fit.x), cycle(color_scheme)):
subfunc.value = data_k.value
subfunc.group = data_k.group
subfunc.name += data_name
sub_f_id = self.add(subfunc, color=col, linestyle=LineStyle.Dashed, symbol=SymbolStyle.No)
f_id_list.append(sub_f_id)
gid = data_k.graph
if k in parts and show_fit:
color_scheme = available_cycles['colorblind']
for subfunc, col in zip(parts[k], cycle(color_scheme)):
subfunc.value = data_k.value
subfunc.group = data_k.group
subfunc.name += data_name
sub_f_id = self.add(subfunc, color=col, linestyle=LineStyle.Dashed, symbol=SymbolStyle.No)
f_id_list.append(sub_f_id)
self.delete_sets(tobedeleted)
if accepted and (param_graph != '-1'):
@ -567,27 +546,6 @@ class UpperManagement(QtCore.QObject):
self.newData.emit(f_id_list, gid)
def extend_fits(self, set_id: list, x_range: np.ndarray):
graphs = {}
for sid in set_id:
data = self[sid]
fit = data.copy(full=True, keep_color=True)
fit.data = fit.data.with_new_x(x_range)
graph_id = data.graph
if graph_id not in graphs:
graphs[graph_id] = []
graphs[graph_id].append(self.add(fit))
color_scheme = available_cycles['colorblind']
for subfunc, col in zip(fit.data.sub(fit.x), cycle(color_scheme)):
subfunc.value = fit.value
subfunc.group = fit.group
graphs[graph_id].append(self.add(subfunc, color=col, linestyle=LineStyle.Dashed, symbol=SymbolStyle.No))
for k, v in graphs.items():
self.newData.emit(v, k)
def make_fit_parameter(self, fit_sets: list[str | FitResult], graph_id: str = None):
fit_dict = self._collect_fit_parameter(fit_sets)

View File

@ -29,7 +29,7 @@ class ModelFactory:
right_cnt = None
else:
right = func['func']
right_cnt = func['cnt']
right_cnt = func['pos']
if left is None:
left = right

View File

@ -126,12 +126,12 @@ class Model(object):
kwargs = self.fun_kwargs
if not self.is_multi:
return []
return [self.func(p, x, **kwargs)]
else:
return list(self._int_iter(x, *p, *self.fun_args, **kwargs))
def sub_name(self):
if not self.is_multi:
return []
return [self.name]
else:
return list(self._iter_name())

View File

@ -9,7 +9,6 @@ import numpy as np
from scipy.stats import f as fdist
from scipy.interpolate import interp1d
from ._meta import MultiModel
from .parameter import Parameter
from ..data.points import Points
from ..data.signals import Signal
@ -18,7 +17,7 @@ from ..utils.text import convert
class FitResultCreator:
@staticmethod
def make_from_session(x_orig: np.ndarray, y_orig: np.ndarray, idx: int, kwargs: dict[Any]) -> FitResult:
def make_from_session(x_orig: np.ndarray, y_orig: np.ndarray, idx: int, kwargs: dict[Any]) -> (dict, list):
params = OrderedDict()
for key, pbest, err in zip(kwargs['pnames'], kwargs['parameter'], kwargs['error']):
@ -38,10 +37,10 @@ class FitResultCreator:
stats = FitResultCreator.calc_statistics(resid, _y)
return FitResult(kwargs['x'], kwargs['y'], x_orig, y_orig, params, dict(kwargs['choice']), resid, 0, 0,
kwargs['name'], stats, idx)
kwargs['name'], stats, idx), []
@staticmethod
def make_with_model(model, x_orig, y_orig, p, fun_kwargs, idx, nobs, nvar, corr, pcorr) -> FitResult:
def make_with_model(model, x_orig, y_orig, p, fun_kwargs, idx, nobs, nvar, corr, pcorr) -> (dict, list):
if np.all(x_orig > 0) and (np.max(x_orig) > 100 * np.min(x_orig)):
islog = True
else:
@ -49,7 +48,7 @@ class FitResultCreator:
if len(x_orig) < 51:
if islog:
_x = np.geomspace(np.min(x_orig), np.max(x_orig), num=10*x_orig.size-9)
_x = np.logspace(np.log10(np.min(x_orig)), np.log10(np.max(x_orig)), num=10*x_orig.size-9)
else:
_x = np.linspace(np.min(x_orig), np.max(x_orig), num=10*x_orig.size-9)
else:
@ -63,6 +62,15 @@ class FitResultCreator:
parameters = OrderedDict([(k, v) for k, v in zip(pnames, p)])
p_final = [p.value for p in parameters.values()]
part_functions = []
if model.is_multi:
for sub_name, sub_y in zip(model.sub_name(), model.sub(p_final, _x, **fun_kwargs)):
if np.iscomplexobj(sub_y):
part_functions.append(Signal(_x, sub_y, name=sub_name))
else:
part_functions.append(Points(_x, sub_y, name=sub_name))
_y = model.func(p_final, _x, **fun_kwargs)
resid = model.func(p_final, x_orig, **fun_kwargs) - y_orig
@ -89,10 +97,13 @@ class FitResultCreator:
correlation = corr
partial_correlation = pcorr
return FitResult(_x, _y, x_orig, y_orig, parameters, fun_kwargs, resid,
nobs, nvar, model.name, stats,
idx=idx, corr=correlation, pcorr=partial_correlation,
islog=islog, func=model)
return (
FitResult(_x, _y, x_orig, y_orig, parameters, fun_kwargs, resid,
nobs, nvar, model.name, stats,
idx=idx, corr=correlation, pcorr=partial_correlation,
islog=islog),
part_functions,
)
@staticmethod
def calc_statistics(y, residual, nobs=None, nvar=None):
@ -130,11 +141,8 @@ class FitResultCreator:
class FitResult(Points):
def __init__(self, x: np.ndarray, y: np.ndarray,
x_data: np.ndarray, y_data: np.ndarray,
params: dict, fun_kwargs: dict,
resid: np.ndarray, nobs: int, nvar: int, name: str, stats: dict,
idx=None, corr=None, pcorr=None, islog=False, func=None,
def __init__(self, x, y, x_data, y_data, params, fun_kwargs, resid, nobs, nvar, name, stats,
idx=None, corr=None, pcorr=None, islog=False,
**kwargs):
self.parameter, name = self._prepare_names(params, name)
@ -154,7 +162,6 @@ class FitResult(Points):
self.x_data = x_data
self.y_data = y_data
self._model_name = name
self._func = func
@staticmethod
def _prepare_names(parameter: dict, modelname: str):
@ -193,13 +200,6 @@ class FitResult(Points):
except AttributeError:
return 'FitObject'
@property
def func(self):
if isinstance(self._func, MultiModel):
return self._func.func
else:
return self._func
@property
def p_final(self):
return [pp.value for pp in self.parameter.values()]
@ -215,7 +215,6 @@ class FitResult(Points):
print(' #var :', self.nvar)
print('\nParameter')
print(self._parameter_string())
if statistics:
print('Statistics')
for k, v in self.statistics.items():
@ -343,24 +342,3 @@ class FitResult(Points):
data = FitResult(**state)
return data
def with_new_x(self, x_values):
if self.func is None:
raise ValueError('no fit function available to calcualate new y values')
new_fit = self.copy()
y_values = self.func.func(self.p_final, x_values, **self.fun_kwargs)
new_fit.set_data(x_values, y_values)
return new_fit
def sub(self, x_values):
part_functions = []
for sub_name, sub_y in zip(self.func.sub_name(), self.func.sub(self.p_final, x_values, **self.fun_kwargs)):
if np.iscomplexobj(sub_y):
part_functions.append(Signal(x_values, sub_y, name=sub_name))
else:
part_functions.append(Points(x_values, sub_y, name=sub_name))
return part_functions

View File

@ -1,6 +1,5 @@
import pathlib
import re
from io import BytesIO
from itertools import islice
import numpy as np
@ -100,10 +99,7 @@ class AsciiReader:
y = list(range(1, max(self.width)))
cols = x + y + yerr
with self.fname.open('rb') as fh:
tmp_ = re.sub(b'[;,]', b' ', fh.read())
raw_data = np.genfromtxt(BytesIO(tmp_), usecols=cols, missing_values='--')
del tmp_
raw_data = np.genfromtxt(self.fname, usecols=cols, missing_values='--')
if raw_data.ndim == 1:
# only one row or column
if len(self.data) == 1:

View File

@ -1,6 +1,5 @@
from __future__ import annotations
import codecs
import pathlib
import re
import warnings
@ -81,6 +80,12 @@ class GraceEditor:
return self.graphs[-1]
def new_drawing(self, dtype: str = 'line'):
obj = GraceDrawing(dtype)
self.drawing_objects.append(obj)
return self.drawing_objects[-1]
def new_set(self, graph):
s = None
g_idx = -1
@ -105,8 +110,9 @@ class GraceEditor:
# we start always with the header
current_pos = 'header'
with self.file.open('r', errors='replace') as f:
with self.file.open('r') as f:
for line_nr, line in enumerate(f):
# lots of states to check
# agr file order: header, drawing object, region, graph, set
if current_pos == 'header':
@ -193,6 +199,8 @@ class GraceEditor:
self.graphs[-1].append(line)
print(self.drawing_objects)
def _make_graph(self, line: str):
m = self._RE_GRAPH_START.match(line)
g_idx = int(m.group(1))
@ -324,6 +332,86 @@ class GraceEditor:
class GraceDrawing(list):
type_map = {'text': 'string', 'rectangle': 'box'}
def __init__(self, draw_type: str):
super().__init__()
if draw_type not in ['rectangle', 'line', 'ellipse', 'multipts', 'text']:
raise ValueError(f'Unknown drawing object {draw_type}')
draw_type = GraceDrawing.type_map.get(draw_type, draw_type)
self._type = draw_type
def _create_box(self):
text = """\
@with box
@ box on
@ box loctype world
@ box 0.0, 0.0, 1.0, 1.0
@ box linestyle 1
@ box linewidth 1.0
@ box color 1
@ box fill color 1
@ box fill pattern 0'
@box def
"""
for line in text.split('\n'):
self.append(line + '\n')
def _create_ellipse(self):
text = """\
@with ellipse
@ ellipse on
@ ellipse loctype world
@ ellipse 0.0, 0.0, 1.0, 1.0
@ ellipse linestyle 1
@ ellipse linewidth 1.0
@ ellipse color 1
@ ellipse fill color 1
@ ellipse fill pattern 0
@ellipse def
"""
for line in text.split('\n'):
self.append(line + '\n')
def _create_line(self):
text = """\
@with string
@ string on
@ string loctype world
@ string 0.0, 0.0
@ string color 1
@ string rot 0
@ string font 0
@ string just 0
@ string char size 1.000000
@ string def ""
"""
def _create_line(self):
text = """\
@with line
@ line on
@ line loctype world
@ line g0
@ line 0.0, 0.0, 1.0, 1.0
@ line linewidth 1.0
@ line linestyle 1
@ line color 1
@ line arrow 0
@ line arrow type 0
@ line arrow length 1.000000
@ line arrow layout 1.000000, 1.000000
@line def
"""
for line in text.split('\n'):
self.append(line + '\n')
def __str__(self):
return ''.join(self)
@ -605,7 +693,6 @@ class GraceSetProps(GraceProperties):
self.set_property(**_kwargs)
def set_symbol(self, **kwargs):
_kwargs = {'symbol '+k: v for k, v in kwargs.items()}
if 'symbol' in kwargs:
_kwargs['symbol'] = kwargs['symbol']

Some files were not shown because too many files have changed in this diff Show More