15 Commits

Author SHA1 Message Date
35e89176be datawidget.py: raise AttributeError manually if item is graph, was not always raised; maybe problem of #52 2023-04-27 12:13:20 +02:00
4e0ff4eddd replace semicolon and commas with spaces in csv; closes #23 2023-03-24 11:03:50 +01:00
de9464ef9f Update 'src/gui_qt/lib/utils.py' 2023-03-17 13:16:24 +00:00
466a63990d Update 'src/gui_qt/lib/utils.py'
logger added to zsync download
2023-03-17 13:15:44 +00:00
8690cb222e ignore errors due to wrong encoding in agr files (#22)
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #22
2023-03-16 18:49:44 +00:00
28c15ff565 extrapolate_fit (#21)
New sets with arbitrary x range can be created from fit results

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #21
2023-03-12 19:37:10 +00:00
1601f1455c use same value in widget and multimodel to count parameter 2023-03-01 19:27:03 +01:00
b73d6f08b8 asciireader.py avoid IndexError if file has no header 2023-03-01 19:27:03 +01:00
5577adabec AppImage path was incorrect in upload script.
fixes #17
2023-02-07 07:57:56 +01:00
57ecff478b silence curl in upload script 2023-02-07 01:03:05 +01:00
2229b2905a fixes #16 2023-02-07 00:47:27 +01:00
60c93f6bc9 changed the repository path 2023-02-06 20:38:04 +01:00
626804783e Merge remote-tracking branch 'origin/master' 2023-02-06 20:20:09 +01:00
a182d55b98 Add 'LICE' 2023-02-06 20:19:41 +01:00
ee2a91813c Add 'LICE' 2023-02-06 19:13:45 +00:00
110 changed files with 1179 additions and 2194 deletions

View File

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

13
LICENSE Normal file
View File

@ -0,0 +1,13 @@
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 PYRCC = pyrcc5
#Directory with ui files #Directory with ui files
RESOURCE_DIR = src/resources/_ui RESOURCE_DIR = resources/_ui
#Directory for compiled ui #Directory for compiled resources
COMPILED_DIR = src/gui_qt/_py COMPILED_DIR = nmreval/gui_qt/_py
#UI files to compile, uses every *.ui found in RESOURCE_DIR #UI files to compile, uses every *.ui found in RESOURCE_DIR
UI_FILES = $(foreach dir, $(RESOURCE_DIR), $(notdir $(wildcard $(dir)/*.ui))) UI_FILES = $(foreach dir, $(RESOURCE_DIR), $(notdir $(wildcard $(dir)/*.ui)))

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/agroptiondialog.ui' # Form implementation generated from reading ui file '_ui/agroptiondialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -290,8 +289,8 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/apod_dialog.ui' # Form implementation generated from reading ui file '_ui/apod_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -64,8 +63,8 @@ class Ui_ApodEdit(object):
self.gridLayout.addWidget(self.eqn_label, 0, 1, 1, 1) self.gridLayout.addWidget(self.eqn_label, 0, 1, 1, 1)
self.retranslateUi(ApodEdit) self.retranslateUi(ApodEdit)
self.buttonBox.accepted.connect(ApodEdit.accept) # type: ignore self.buttonBox.accepted.connect(ApodEdit.accept)
self.buttonBox.rejected.connect(ApodEdit.close) # type: ignore self.buttonBox.rejected.connect(ApodEdit.close)
QtCore.QMetaObject.connectSlotsByName(ApodEdit) QtCore.QMetaObject.connectSlotsByName(ApodEdit)
def retranslateUi(self, ApodEdit): def retranslateUi(self, ApodEdit):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/axisConfigTemplate.ui' # Form implementation generated from reading ui file '_ui/axisConfigTemplate.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/baseline_dialog.ui' # Form implementation generated from reading ui file '_ui/baseline_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -55,8 +54,8 @@ class Ui_SignalEdit(object):
self.gridLayout.addWidget(self.graphicsView, 0, 2, 1, 1) self.gridLayout.addWidget(self.graphicsView, 0, 2, 1, 1)
self.retranslateUi(SignalEdit) self.retranslateUi(SignalEdit)
self.buttonBox.accepted.connect(SignalEdit.accept) # type: ignore self.buttonBox.accepted.connect(SignalEdit.accept)
self.buttonBox.rejected.connect(SignalEdit.close) # type: ignore self.buttonBox.rejected.connect(SignalEdit.close)
QtCore.QMetaObject.connectSlotsByName(SignalEdit) QtCore.QMetaObject.connectSlotsByName(SignalEdit)
def retranslateUi(self, SignalEdit): def retranslateUi(self, SignalEdit):

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/autohome/dominik/nmreval-gitea/src/resources/_ui/basewindow.ui' # Form implementation generated from reading ui file 'src/resources/_ui/basewindow.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.7
# #
@ -257,13 +257,13 @@ class Ui_BaseWindow(object):
self.actionGuide_lines.setObjectName("actionGuide_lines") self.actionGuide_lines.setObjectName("actionGuide_lines")
self.actionMaximize = QtWidgets.QAction(BaseWindow) self.actionMaximize = QtWidgets.QAction(BaseWindow)
self.actionMaximize.setCheckable(True) self.actionMaximize.setCheckable(True)
self.actionMaximize.setVisible(True) self.actionMaximize.setVisible(False)
self.actionMaximize.setObjectName("actionMaximize") self.actionMaximize.setObjectName("actionMaximize")
self.actionTile = QtWidgets.QAction(BaseWindow) self.actionTile = QtWidgets.QAction(BaseWindow)
self.actionTile.setObjectName("actionTile") self.actionTile.setObjectName("actionTile")
self.actionMinimize = QtWidgets.QAction(BaseWindow) self.actionMinimize = QtWidgets.QAction(BaseWindow)
self.actionMinimize.setCheckable(True) self.actionMinimize.setCheckable(True)
self.actionMinimize.setVisible(True) self.actionMinimize.setVisible(False)
self.actionMinimize.setObjectName("actionMinimize") self.actionMinimize.setObjectName("actionMinimize")
self.actionNew_window = QtWidgets.QAction(BaseWindow) self.actionNew_window = QtWidgets.QAction(BaseWindow)
self.actionNew_window.setObjectName("actionNew_window") self.actionNew_window.setObjectName("actionNew_window")
@ -506,7 +506,7 @@ class Ui_BaseWindow(object):
self.menuMethod.setTitle(_translate("BaseWindow", "Method")) self.menuMethod.setTitle(_translate("BaseWindow", "Method"))
self.menuLimits.setTitle(_translate("BaseWindow", "Limits")) self.menuLimits.setTitle(_translate("BaseWindow", "Limits"))
self.menuOptions.setTitle(_translate("BaseWindow", "Options")) 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.menuView.setTitle(_translate("BaseWindow", "View"))
self.menuNMR.setTitle(_translate("BaseWindow", "NMR")) self.menuNMR.setTitle(_translate("BaseWindow", "NMR"))
self.menuBDS.setTitle(_translate("BaseWindow", "BDS")) self.menuBDS.setTitle(_translate("BaseWindow", "BDS"))
@ -568,7 +568,6 @@ class Ui_BaseWindow(object):
self.actionTile.setText(_translate("BaseWindow", "Tile windows")) self.actionTile.setText(_translate("BaseWindow", "Tile windows"))
self.actionMinimize.setText(_translate("BaseWindow", "Minimize")) self.actionMinimize.setText(_translate("BaseWindow", "Minimize"))
self.actionNew_window.setText(_translate("BaseWindow", "New graph")) 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.actionDelete_window.setText(_translate("BaseWindow", "Delete graph"))
self.actionCascade_windows.setText(_translate("BaseWindow", "Cascade windows")) self.actionCascade_windows.setText(_translate("BaseWindow", "Cascade windows"))
self.actionNext_window.setText(_translate("BaseWindow", "Next")) self.actionNext_window.setText(_translate("BaseWindow", "Next"))
@ -583,7 +582,6 @@ class Ui_BaseWindow(object):
self.action_mean_t1.setText(_translate("BaseWindow", "Convert mean values...")) self.action_mean_t1.setText(_translate("BaseWindow", "Convert mean values..."))
self.actionFilon.setText(_translate("BaseWindow", "Log FT...")) self.actionFilon.setText(_translate("BaseWindow", "Log FT..."))
self.action_new_set.setText(_translate("BaseWindow", "New set")) 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.action_magnitude.setText(_translate("BaseWindow", "Calculate magnitude"))
self.actionCenterMax.setText(_translate("BaseWindow", "Center on max")) self.actionCenterMax.setText(_translate("BaseWindow", "Center on max"))
self.action_depake.setText(_translate("BaseWindow", "De-paked spectrum")) self.action_depake.setText(_translate("BaseWindow", "De-paked spectrum"))

View File

@ -1,16 +1,13 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/bdsdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/bdsdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.9.2
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object): class Ui_Dialog(object):
def setupUi(self, Dialog): def setupUi(self, Dialog):
Dialog.setObjectName("Dialog") Dialog.setObjectName("Dialog")
@ -96,8 +93,8 @@ class Ui_Dialog(object):
self.gridLayout.addWidget(self.label, 0, 0, 1, 2) self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
Dialog.setTabOrder(self.freq_button, self.temp_button) Dialog.setTabOrder(self.freq_button, self.temp_button)
Dialog.setTabOrder(self.temp_button, self.eps_checkBox) Dialog.setTabOrder(self.temp_button, self.eps_checkBox)
@ -120,3 +117,4 @@ class Ui_Dialog(object):
self.temp_checkBox.setText(_translate("Dialog", "Meas. temperature")) self.temp_checkBox.setText(_translate("Dialog", "Meas. temperature"))
self.time_checkBox.setText(_translate("Dialog", "Meas. time")) self.time_checkBox.setText(_translate("Dialog", "Meas. time"))
self.label.setText(_translate("Dialog", "Found entries")) self.label.setText(_translate("Dialog", "Found entries"))

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/color_palette.ui' # Form implementation generated from reading ui file 'resources/_ui/color_palette.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -89,8 +88,8 @@ class Ui_Dialog(object):
self.label_2.setBuddy(self.color_combobox) self.label_2.setBuddy(self.color_combobox)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/coupling_calculator.ui' # Form implementation generated from reading ui file 'resources/_ui/coupling_calculator.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -47,8 +46,8 @@ class Ui_coupling_calc_dialog(object):
self.verticalLayout.addWidget(self.buttonBox) self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(coupling_calc_dialog) self.retranslateUi(coupling_calc_dialog)
self.buttonBox.accepted.connect(coupling_calc_dialog.accept) # type: ignore self.buttonBox.accepted.connect(coupling_calc_dialog.accept)
self.buttonBox.rejected.connect(coupling_calc_dialog.reject) # type: ignore self.buttonBox.rejected.connect(coupling_calc_dialog.reject)
QtCore.QMetaObject.connectSlotsByName(coupling_calc_dialog) QtCore.QMetaObject.connectSlotsByName(coupling_calc_dialog)
def retranslateUi(self, coupling_calc_dialog): def retranslateUi(self, coupling_calc_dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/coupling_t1_from_tau.ui' # Form implementation generated from reading ui file 'resources/_ui/coupling_t1_from_tau.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/datawidget.ui' # Form implementation generated from reading ui file 'resources/_ui/datawidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,16 +1,13 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/dscfile_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/dscfile_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.9.2
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object): class Ui_Dialog(object):
def setupUi(self, Dialog): def setupUi(self, Dialog):
Dialog.setObjectName("Dialog") Dialog.setObjectName("Dialog")
@ -192,8 +189,8 @@ class Ui_Dialog(object):
self.gridLayout_2.addLayout(self.gridLayout, 0, 1, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 0, 1, 1, 1)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):
@ -212,4 +209,5 @@ class Ui_Dialog(object):
self.none_radioButton.setText(_translate("Dialog", "None")) self.none_radioButton.setText(_translate("Dialog", "None"))
self.ref_add_pushButton.setText(_translate("Dialog", "Add reference")) self.ref_add_pushButton.setText(_translate("Dialog", "Add reference"))
self.ref_remove_pushButton.setText(_translate("Dialog", "Remove reference")) self.ref_remove_pushButton.setText(_translate("Dialog", "Remove reference"))
from pyqtgraph import PlotWidget from pyqtgraph import PlotWidget

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'src/resources/_ui/editsignalwidget.ui' # Form implementation generated from reading ui file 'src/resources/_ui/editsignalwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.2
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # run again. Do not edit this file unless you know what you are doing.

View File

@ -1,67 +0,0 @@
# -*- 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,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/eval_expr_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/eval_expr_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/evalexpression.ui' # Form implementation generated from reading ui file 'resources/_ui/evalexpression.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -154,8 +153,8 @@ class Ui_CalcDialog(object):
self.retranslateUi(CalcDialog) self.retranslateUi(CalcDialog)
self.tabWidget.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(CalcDialog.accept) # type: ignore self.buttonBox.accepted.connect(CalcDialog.accept)
self.buttonBox.rejected.connect(CalcDialog.reject) # type: ignore self.buttonBox.rejected.connect(CalcDialog.reject)
QtCore.QMetaObject.connectSlotsByName(CalcDialog) QtCore.QMetaObject.connectSlotsByName(CalcDialog)
def retranslateUi(self, CalcDialog): def retranslateUi(self, CalcDialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/expandablewidget.ui' # Form implementation generated from reading ui file 'resources/_ui/expandablewidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/exportConfigTemplate.ui' # Form implementation generated from reading ui file 'resources/_ui/exportConfigTemplate.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fcreader.ui' # Form implementation generated from reading ui file 'resources/_ui/fcreader.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -168,8 +167,8 @@ class Ui_FCEval_dialog(object):
self.label_6.setBuddy(self.m0_cb) self.label_6.setBuddy(self.m0_cb)
self.retranslateUi(FCEval_dialog) self.retranslateUi(FCEval_dialog)
self.buttonBox.accepted.connect(FCEval_dialog.accept) # type: ignore self.buttonBox.accepted.connect(FCEval_dialog.accept)
self.buttonBox.rejected.connect(FCEval_dialog.reject) # type: ignore self.buttonBox.rejected.connect(FCEval_dialog.reject)
QtCore.QMetaObject.connectSlotsByName(FCEval_dialog) QtCore.QMetaObject.connectSlotsByName(FCEval_dialog)
def retranslateUi(self, FCEval_dialog): def retranslateUi(self, FCEval_dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/filedialog.ui' # Form implementation generated from reading ui file 'resources/_ui/filedialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitcreationdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/fitcreationdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.4
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # 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.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/fitdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitdialog_window.ui' # Form implementation generated from reading ui file 'resources/_ui/fitdialog_window.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitfunctionwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/fitfunctionwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitfuncwidget_old.ui' # Form implementation generated from reading ui file 'resources/_ui/fitfuncwidget_old.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitmodelfixwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/fitmodelfixwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitmodelwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/fitmodelwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitparametertable.ui' # Form implementation generated from reading ui file 'resources/_ui/fitparametertable.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -41,8 +40,8 @@ class Ui_FitParameterDialog(object):
self.verticalLayout.addLayout(self.horizontalLayout) self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(FitParameterDialog) self.retranslateUi(FitParameterDialog)
self.buttonBox.accepted.connect(FitParameterDialog.accept) # type: ignore self.buttonBox.accepted.connect(FitParameterDialog.accept)
self.buttonBox.rejected.connect(FitParameterDialog.reject) # type: ignore self.buttonBox.rejected.connect(FitParameterDialog.reject)
QtCore.QMetaObject.connectSlotsByName(FitParameterDialog) QtCore.QMetaObject.connectSlotsByName(FitParameterDialog)
def retranslateUi(self, FitParameterDialog): def retranslateUi(self, FitParameterDialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/fitparameterwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/fitparameterwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

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

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/ftdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/ftdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -46,8 +45,8 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.buttonBox) self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/function_tree_widget.ui' # Form implementation generated from reading ui file 'resources/_ui/function_tree_widget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/gol.ui' # Form implementation generated from reading ui file 'resources/_ui/gol.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/gracemsgdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/gracemsgdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/gracereader.ui' # Form implementation generated from reading ui file 'resources/_ui/gracereader.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -72,8 +71,8 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.buttonBox) self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

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

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/autohome/dominik/nmreval-gitea/src/resources/_ui/guidelinewidget.ui' # Form implementation generated from reading ui file '/autohome/dominik/nmreval/src/resources/_ui/guidelinewidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.4
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # run again. Do not edit this file unless you know what you are doing.
@ -14,77 +14,173 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object): class Ui_Form(object):
def setupUi(self, Form): def setupUi(self, Form):
Form.setObjectName("Form") Form.setObjectName("Form")
Form.resize(316, 678) Form.resize(459, 830)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form)
self.verticalLayout_2.setContentsMargins(3, 3, 3, 3)
self.verticalLayout_2.setObjectName("verticalLayout_2") self.verticalLayout_2.setObjectName("verticalLayout_2")
self.graph_combobox = QtWidgets.QComboBox(Form) self.graph_comboBox = QtWidgets.QComboBox(Form)
self.graph_combobox.setObjectName("graph_combobox") self.graph_comboBox.setObjectName("graph_comboBox")
self.verticalLayout_2.addWidget(self.graph_combobox) self.verticalLayout_2.addWidget(self.graph_comboBox)
self.listWidget = QtWidgets.QListWidget(Form) self.listWidget_2 = QtWidgets.QListWidget(Form)
self.listWidget.setObjectName("listWidget") self.listWidget_2.setObjectName("listWidget_2")
self.verticalLayout_2.addWidget(self.listWidget) self.verticalLayout_2.addWidget(self.listWidget_2)
self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout") self.horizontalLayout.setObjectName("horizontalLayout")
self.newButton = QtWidgets.QPushButton(Form) self.pushButton = QtWidgets.QPushButton(Form)
self.newButton.setObjectName("newButton") self.pushButton.setObjectName("pushButton")
self.horizontalLayout.addWidget(self.newButton) self.horizontalLayout.addWidget(self.pushButton)
self.editButton = QtWidgets.QPushButton(Form) self.pushButton_2 = QtWidgets.QPushButton(Form)
self.editButton.setObjectName("editButton") self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout.addWidget(self.editButton) self.horizontalLayout.addWidget(self.pushButton_2)
self.pushButton_3 = QtWidgets.QPushButton(Form)
self.pushButton_3.setObjectName("pushButton_3")
self.horizontalLayout.addWidget(self.pushButton_3)
self.verticalLayout_2.addLayout(self.horizontalLayout) self.verticalLayout_2.addLayout(self.horizontalLayout)
self.frame = QtWidgets.QFrame(Form) self.frame = QtWidgets.QFrame(Form)
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame") self.frame.setObjectName("frame")
self.formLayout = QtWidgets.QFormLayout(self.frame) self.formLayout = QtWidgets.QFormLayout(self.frame)
self.formLayout.setContentsMargins(-1, -1, -1, 6)
self.formLayout.setObjectName("formLayout") 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 = QtWidgets.QComboBox(self.frame)
self.mode_comboBox.setObjectName("mode_comboBox") 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.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.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 = QtWidgets.QStackedWidget(self.frame)
self.stackedWidget.setFrameShape(QtWidgets.QFrame.NoFrame)
self.stackedWidget.setObjectName("stackedWidget") self.stackedWidget.setObjectName("stackedWidget")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.stackedWidget) self.page = QtWidgets.QWidget()
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.page.setObjectName("page")
self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.formLayout_2 = QtWidgets.QFormLayout(self.page)
self.createButton = QtWidgets.QPushButton(self.frame) self.formLayout_2.setObjectName("formLayout_2")
self.createButton.setObjectName("createButton") self.label_13 = QtWidgets.QLabel(self.page)
self.horizontalLayout_2.addWidget(self.createButton) self.label_13.setObjectName("label_13")
self.cancelbutton = QtWidgets.QPushButton(self.frame) self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_13)
self.cancelbutton.setObjectName("cancelbutton") self.lineEdit_8 = QtWidgets.QLineEdit(self.page)
self.horizontalLayout_2.addWidget(self.cancelbutton) self.lineEdit_8.setObjectName("lineEdit_8")
self.formLayout.setLayout(2, QtWidgets.QFormLayout.SpanningRole, self.horizontalLayout_2) self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit_8)
self.label = QtWidgets.QLabel(self.page)
self.label.setObjectName("label")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
self.infiniteline_angle_spinbox = QtWidgets.QSpinBox(self.page)
self.infiniteline_angle_spinbox.setWrapping(True)
self.infiniteline_angle_spinbox.setMaximum(179)
self.infiniteline_angle_spinbox.setObjectName("infiniteline_angle_spinbox")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.infiniteline_angle_spinbox)
self.stackedWidget.addWidget(self.page)
self.page_2 = QtWidgets.QWidget()
self.page_2.setObjectName("page_2")
self.verticalLayout = QtWidgets.QVBoxLayout(self.page_2)
self.verticalLayout.setObjectName("verticalLayout")
self.listWidget = QtWidgets.QListWidget(self.page_2)
self.listWidget.setObjectName("listWidget")
self.verticalLayout.addWidget(self.listWidget)
self.stackedWidget.addWidget(self.page_2)
self.page_3 = QtWidgets.QWidget()
self.page_3.setObjectName("page_3")
self.formLayout_3 = QtWidgets.QFormLayout(self.page_3)
self.formLayout_3.setObjectName("formLayout_3")
self.label_5 = QtWidgets.QLabel(self.page_3)
self.label_5.setObjectName("label_5")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.lineEdit = QtWidgets.QLineEdit(self.page_3)
self.lineEdit.setObjectName("lineEdit")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit)
self.label_3 = QtWidgets.QLabel(self.page_3)
self.label_3.setObjectName("label_3")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.lineEdit_2 = QtWidgets.QLineEdit(self.page_3)
self.lineEdit_2.setObjectName("lineEdit_2")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lineEdit_2)
self.label_9 = QtWidgets.QLabel(self.page_3)
self.label_9.setObjectName("label_9")
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_9)
self.lineEdit_3 = QtWidgets.QLineEdit(self.page_3)
self.lineEdit_3.setObjectName("lineEdit_3")
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_3)
self.label_4 = QtWidgets.QLabel(self.page_3)
self.label_4.setObjectName("label_4")
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.spinBox = QtWidgets.QSpinBox(self.page_3)
self.spinBox.setObjectName("spinBox")
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.spinBox)
self.stackedWidget.addWidget(self.page_3)
self.page_4 = QtWidgets.QWidget()
self.page_4.setObjectName("page_4")
self.formLayout_4 = QtWidgets.QFormLayout(self.page_4)
self.formLayout_4.setObjectName("formLayout_4")
self.label_7 = QtWidgets.QLabel(self.page_4)
self.label_7.setObjectName("label_7")
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_7)
self.lineEdit_4 = QtWidgets.QLineEdit(self.page_4)
self.lineEdit_4.setObjectName("lineEdit_4")
self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit_4)
self.label_8 = QtWidgets.QLabel(self.page_4)
self.label_8.setObjectName("label_8")
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_8)
self.lineEdit_5 = QtWidgets.QLineEdit(self.page_4)
self.lineEdit_5.setObjectName("lineEdit_5")
self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lineEdit_5)
self.label_10 = QtWidgets.QLabel(self.page_4)
self.label_10.setObjectName("label_10")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_10)
self.lineEdit_6 = QtWidgets.QLineEdit(self.page_4)
self.lineEdit_6.setObjectName("lineEdit_6")
self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_6)
self.label_11 = QtWidgets.QLabel(self.page_4)
self.label_11.setObjectName("label_11")
self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_11)
self.lineEdit_7 = QtWidgets.QLineEdit(self.page_4)
self.lineEdit_7.setObjectName("lineEdit_7")
self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.lineEdit_7)
self.stackedWidget.addWidget(self.page_4)
self.formLayout.setWidget(3, QtWidgets.QFormLayout.SpanningRole, self.stackedWidget)
self.verticalLayout_2.addWidget(self.frame) self.verticalLayout_2.addWidget(self.frame)
self.label_6.setBuddy(self.comment_lineEdit)
self.label_2.setBuddy(self.color_comboBox)
self.retranslateUi(Form) self.retranslateUi(Form)
self.stackedWidget.setCurrentIndex(-1) self.stackedWidget.setCurrentIndex(3)
QtCore.QMetaObject.connectSlotsByName(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form): def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form")) Form.setWindowTitle(_translate("Form", "Form"))
self.newButton.setText(_translate("Form", "New object")) self.pushButton.setText(_translate("Form", "New object"))
self.editButton.setText(_translate("Form", "Edit")) self.pushButton_2.setText(_translate("Form", "Edit"))
self.type_label.setText(_translate("Form", "Type")) self.pushButton_3.setText(_translate("Form", "Delete"))
self.mode_comboBox.setItemText(0, _translate("Form", "Infinite Line")) self.mode_comboBox.setItemText(0, _translate("Form", "Infinite Line"))
self.mode_comboBox.setItemText(1, _translate("Form", "Multiple points")) self.mode_comboBox.setItemText(1, _translate("Form", "Multiple points"))
self.mode_comboBox.setItemText(2, _translate("Form", "Text")) self.mode_comboBox.setItemText(2, _translate("Form", "Rectangle"))
self.mode_comboBox.setItemText(3, _translate("Form", "Rectangle")) self.mode_comboBox.setItemText(3, _translate("Form", "Ellipse"))
self.mode_comboBox.setItemText(4, _translate("Form", "Ellipse")) self.label_12.setText(_translate("Form", "Type"))
self.createButton.setText(_translate("Form", "Apply")) self.label_6.setText(_translate("Form", "Comment"))
self.cancelbutton.setText(_translate("Form", "Cancel")) 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

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/hdftree.ui' # Form implementation generated from reading ui file 'resources/_ui/hdftree.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.4
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # 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.verticalLayout_2.addWidget(self.buttonBox)
self.retranslateUi(Hdf_Dialog) self.retranslateUi(Hdf_Dialog)
self.buttonBox.rejected.connect(Hdf_Dialog.close) # type: ignore self.buttonBox.rejected.connect(Hdf_Dialog.close)
self.buttonBox.accepted.connect(Hdf_Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Hdf_Dialog.accept)
QtCore.QMetaObject.connectSlotsByName(Hdf_Dialog) QtCore.QMetaObject.connectSlotsByName(Hdf_Dialog)
def retranslateUi(self, Hdf_Dialog): def retranslateUi(self, Hdf_Dialog):

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/integral_widget.ui' # Form implementation generated from reading ui file '/autohome/dominik/nmreval/src/resources/_ui/integral_widget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.4
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # run again. Do not edit this file unless you know what you are doing.

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/integratederive_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/integratederive_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -68,8 +67,8 @@ class Ui_Dialog(object):
self.verticalLayout.addWidget(self.buttonBox) self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/interpol_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/interpol_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -131,8 +130,8 @@ class Ui_Dialog(object):
self.label_8.setBuddy(self.dest_combobox) self.label_8.setBuddy(self.dest_combobox)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
Dialog.setTabOrder(self.listWidget, self.ylog_checkBox) Dialog.setTabOrder(self.listWidget, self.ylog_checkBox)
Dialog.setTabOrder(self.ylog_checkBox, self.interp_comboBox) Dialog.setTabOrder(self.ylog_checkBox, self.interp_comboBox)

View File

@ -1,54 +0,0 @@
# -*- 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,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/lineedit_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/lineedit_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -30,8 +29,8 @@ class Ui_LineEdit_Dialog(object):
self.formLayout.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.buttonBox) self.formLayout.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.buttonBox)
self.retranslateUi(LineEdit_Dialog) self.retranslateUi(LineEdit_Dialog)
self.buttonBox.accepted.connect(LineEdit_Dialog.accept) # type: ignore self.buttonBox.accepted.connect(LineEdit_Dialog.accept)
self.buttonBox.rejected.connect(LineEdit_Dialog.reject) # type: ignore self.buttonBox.rejected.connect(LineEdit_Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(LineEdit_Dialog) QtCore.QMetaObject.connectSlotsByName(LineEdit_Dialog)
def retranslateUi(self, LineEdit_Dialog): def retranslateUi(self, LineEdit_Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/mean_form.ui' # Form implementation generated from reading ui file 'resources/_ui/mean_form.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/meandialog.ui' # Form implementation generated from reading ui file 'resources/_ui/meandialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/modelwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/modelwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/move_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/move_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,62 +0,0 @@
# -*- 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,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/namespace_widget.ui' # Form implementation generated from reading ui file 'resources/_ui/namespace_widget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/option_selection.ui' # Form implementation generated from reading ui file 'resources/_ui/option_selection.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/parameterform.ui' # Form implementation generated from reading ui file 'resources/_ui/parameterform.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/phase_corr_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/phase_corr_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.4
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # 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.gridLayout.addItem(spacerItem1, 1, 5, 1, 1)
self.retranslateUi(SignalEdit) self.retranslateUi(SignalEdit)
self.buttonBox.accepted.connect(SignalEdit.accept) # type: ignore self.buttonBox.accepted.connect(SignalEdit.accept)
self.buttonBox.rejected.connect(SignalEdit.close) # type: ignore self.buttonBox.rejected.connect(SignalEdit.close)
QtCore.QMetaObject.connectSlotsByName(SignalEdit) QtCore.QMetaObject.connectSlotsByName(SignalEdit)
def retranslateUi(self, SignalEdit): def retranslateUi(self, SignalEdit):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/plotConfigTemplate.ui' # Form implementation generated from reading ui file 'resources/_ui/plotConfigTemplate.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/pokemon.ui' # Form implementation generated from reading ui file 'resources/_ui/pokemon.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -94,7 +93,7 @@ class Ui_Dialog(object):
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(-1) self.tabWidget.setCurrentIndex(-1)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/propwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/propwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/ptstab.ui' # Form implementation generated from reading ui file 'resources/_ui/ptstab.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/qfiledialog.ui' # Form implementation generated from reading ui file 'resources/_ui/qfiledialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,67 +0,0 @@
# -*- 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,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/save_fit_parameter.ui' # Form implementation generated from reading ui file 'resources/_ui/save_fit_parameter.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -106,8 +105,8 @@ class Ui_fitparameter_save_dialog(object):
self.label.setBuddy(self.missing_value_line) self.label.setBuddy(self.missing_value_line)
self.retranslateUi(fitparameter_save_dialog) self.retranslateUi(fitparameter_save_dialog)
self.buttonBox.accepted.connect(fitparameter_save_dialog.accept) # type: ignore self.buttonBox.accepted.connect(fitparameter_save_dialog.accept)
self.buttonBox.rejected.connect(fitparameter_save_dialog.reject) # type: ignore self.buttonBox.rejected.connect(fitparameter_save_dialog.reject)
QtCore.QMetaObject.connectSlotsByName(fitparameter_save_dialog) 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_button, self.save_path_line)
fitparameter_save_dialog.setTabOrder(self.save_path_line, self.tableWidget) fitparameter_save_dialog.setTabOrder(self.save_path_line, self.tableWidget)

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/save_fitmodel_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/save_fitmodel_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -53,8 +52,8 @@ class Ui_SaveDialog(object):
self.gridLayout.addWidget(self.frame, 2, 1, 1, 1) self.gridLayout.addWidget(self.frame, 2, 1, 1, 1)
self.retranslateUi(SaveDialog) self.retranslateUi(SaveDialog)
self.buttonBox.accepted.connect(SaveDialog.accept) # type: ignore self.buttonBox.accepted.connect(SaveDialog.accept)
self.buttonBox.rejected.connect(SaveDialog.reject) # type: ignore self.buttonBox.rejected.connect(SaveDialog.reject)
QtCore.QMetaObject.connectSlotsByName(SaveDialog) QtCore.QMetaObject.connectSlotsByName(SaveDialog)
def retranslateUi(self, SaveDialog): def retranslateUi(self, SaveDialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/save_options.ui' # Form implementation generated from reading ui file 'resources/_ui/save_options.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/saveoptions.ui' # Form implementation generated from reading ui file 'resources/_ui/saveoptions.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/sdmodelwidget.ui' # Form implementation generated from reading ui file 'resources/_ui/sdmodelwidget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/selection_widget.ui' # Form implementation generated from reading ui file 'resources/_ui/selection_widget.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/setbyfunction_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/setbyfunction_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -185,8 +184,8 @@ class Ui_NewCurveDialog(object):
self.retranslateUi(NewCurveDialog) self.retranslateUi(NewCurveDialog)
self.comboBox.setCurrentIndex(-1) self.comboBox.setCurrentIndex(-1)
self.comboBox_2.setCurrentIndex(-1) self.comboBox_2.setCurrentIndex(-1)
self.buttonBox.accepted.connect(NewCurveDialog.accept) # type: ignore self.buttonBox.accepted.connect(NewCurveDialog.accept)
self.buttonBox.rejected.connect(NewCurveDialog.reject) # type: ignore self.buttonBox.rejected.connect(NewCurveDialog.reject)
QtCore.QMetaObject.connectSlotsByName(NewCurveDialog) QtCore.QMetaObject.connectSlotsByName(NewCurveDialog)
NewCurveDialog.setTabOrder(self.lineEdit_3, self.lineEdit_4) NewCurveDialog.setTabOrder(self.lineEdit_3, self.lineEdit_4)
NewCurveDialog.setTabOrder(self.lineEdit_4, self.lineEdit_5) NewCurveDialog.setTabOrder(self.lineEdit_4, self.lineEdit_5)

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/shift_scale_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/shift_scale_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -268,8 +267,8 @@ class Ui_shift_dialog(object):
self.retranslateUi(shift_dialog) self.retranslateUi(shift_dialog)
self.tabWidget.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0)
self.buttonBox.accepted.connect(shift_dialog.accept) # type: ignore self.buttonBox.accepted.connect(shift_dialog.accept)
self.buttonBox.rejected.connect(shift_dialog.reject) # type: ignore self.buttonBox.rejected.connect(shift_dialog.reject)
QtCore.QMetaObject.connectSlotsByName(shift_dialog) QtCore.QMetaObject.connectSlotsByName(shift_dialog)
shift_dialog.setTabOrder(self.tabWidget, self.shift_table) shift_dialog.setTabOrder(self.tabWidget, self.shift_table)
shift_dialog.setTabOrder(self.shift_table, self.x_shift_spinbox) shift_dialog.setTabOrder(self.shift_table, self.x_shift_spinbox)

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/skipdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/skipdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -78,8 +77,8 @@ class Ui_SkipDialog(object):
self.label.setBuddy(self.offset_spinbox) self.label.setBuddy(self.offset_spinbox)
self.retranslateUi(SkipDialog) self.retranslateUi(SkipDialog)
self.buttonBox.accepted.connect(SkipDialog.accept) # type: ignore self.buttonBox.accepted.connect(SkipDialog.accept)
self.buttonBox.rejected.connect(SkipDialog.reject) # type: ignore self.buttonBox.rejected.connect(SkipDialog.reject)
QtCore.QMetaObject.connectSlotsByName(SkipDialog) QtCore.QMetaObject.connectSlotsByName(SkipDialog)
SkipDialog.setTabOrder(self.step_spinbox, self.offset_spinbox) SkipDialog.setTabOrder(self.step_spinbox, self.offset_spinbox)
SkipDialog.setTabOrder(self.offset_spinbox, self.invert_check) SkipDialog.setTabOrder(self.offset_spinbox, self.invert_check)

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/smoothdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/smoothdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -92,8 +91,8 @@ class Ui_SmoothDialog(object):
self.label.setBuddy(self.polynom_spinBox) self.label.setBuddy(self.polynom_spinBox)
self.retranslateUi(SmoothDialog) self.retranslateUi(SmoothDialog)
self.buttonBox.accepted.connect(SmoothDialog.accept) # type: ignore self.buttonBox.accepted.connect(SmoothDialog.accept)
self.buttonBox.rejected.connect(SmoothDialog.reject) # type: ignore self.buttonBox.rejected.connect(SmoothDialog.reject)
QtCore.QMetaObject.connectSlotsByName(SmoothDialog) QtCore.QMetaObject.connectSlotsByName(SmoothDialog)
SmoothDialog.setTabOrder(self.comboBox, self.frac_spinBox) SmoothDialog.setTabOrder(self.comboBox, self.frac_spinBox)
SmoothDialog.setTabOrder(self.frac_spinBox, self.polynom_spinBox) SmoothDialog.setTabOrder(self.frac_spinBox, self.polynom_spinBox)

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/t1_calc_dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/t1_calc_dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -272,8 +271,8 @@ class Ui_Dialog(object):
self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 1) self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 1)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/t1_dock.ui' # Form implementation generated from reading ui file 'resources/_ui/t1_dock.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/t1_tau_calculation.ui' # Form implementation generated from reading ui file 'resources/_ui/t1_tau_calculation.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/t1dialog.ui' # Form implementation generated from reading ui file 'resources/_ui/t1dialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,55 +0,0 @@
# -*- 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,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/tntdialog.ui' # Form implementation generated from reading ui file 'resources/_ui/tntdialog.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -116,8 +115,8 @@ class Ui_tntdialog(object):
self.gridLayout.addWidget(self.frame_2, 4, 1, 1, 2) self.gridLayout.addWidget(self.frame_2, 4, 1, 1, 2)
self.retranslateUi(tntdialog) self.retranslateUi(tntdialog)
self.buttonBox.accepted.connect(tntdialog.accept) # type: ignore self.buttonBox.accepted.connect(tntdialog.accept)
self.buttonBox.rejected.connect(tntdialog.reject) # type: ignore self.buttonBox.rejected.connect(tntdialog.reject)
QtCore.QMetaObject.connectSlotsByName(tntdialog) QtCore.QMetaObject.connectSlotsByName(tntdialog)
def retranslateUi(self, tntdialog): def retranslateUi(self, tntdialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/typeconversion.ui' # Form implementation generated from reading ui file 'resources/_ui/typeconversion.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/untitled.ui' # Form implementation generated from reading ui file 'resources/_ui/untitled.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/userfitassist.ui' # Form implementation generated from reading ui file 'resources/_ui/userfitassist.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -78,8 +77,8 @@ class Ui_Dialog(object):
self.parameterLabel.setBuddy(self.parameterLineEdit) self.parameterLabel.setBuddy(self.parameterLineEdit)
self.retranslateUi(Dialog) self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore self.buttonBox.accepted.connect(Dialog.accept)
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog): def retranslateUi(self, Dialog):

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/usermodeleditor.ui' # Form implementation generated from reading ui file 'resources/_ui/usermodeleditor.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.12.3
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING! All changes made in this file will be lost!
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/resources/_ui/valueeditor.ui' # Form implementation generated from reading ui file 'resources/_ui/valueeditor.ui'
# #
# Created by: PyQt5 UI code generator 5.15.7 # Created by: PyQt5 UI code generator 5.15.4
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # 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. # run again. Do not edit this file unless you know what you are doing.

View File

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

View File

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

View File

@ -4,7 +4,6 @@ from functools import reduce
from itertools import count, cycle from itertools import count, cycle
from operator import add from operator import add
from string import ascii_letters from string import ascii_letters
from typing import Dict, List, Tuple
import numpy as np import numpy as np
from pyqtgraph import mkPen from pyqtgraph import mkPen
@ -144,7 +143,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
self._complex[self._current_model] = self.functionwidget.get_complex_state() self._complex[self._current_model] = self.functionwidget.get_complex_state()
self._func_list[self._current_model] = self.functionwidget.get_parameter_list() 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. Add name and id of dataset to list.
""" """
@ -216,7 +215,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
self.model_frame.hide() self.model_frame.hide()
def _prepare(self, model: list, function_use: list = None, 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: if parameter is None:
parameter = {'parameter': {}, 'lb': (), 'ub': (), 'var': [], parameter = {'parameter': {}, 'lb': (), 'ub': (), 'var': [],
'glob': {'idx': [], 'p': [], 'var': [], 'lb': [], 'ub': []}, 'glob': {'idx': [], 'p': [], 'var': [], 'lb': [], 'ub': []},
@ -241,6 +240,8 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
parameter['links'] += links parameter['links'] += links
parameter['color'] += [f['color']] parameter['color'] += [f['color']]
cnt = f['cnt']
for p_k, v_k in p.items(): for p_k, v_k in p.items():
if add_idx: if add_idx:
kw_k = {f'{k}_{cnt}': v for k, v in v_k[1].items()} kw_k = {f'{k}_{cnt}': v for k, v in v_k[1].items()}
@ -450,7 +451,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
return self.preview_lines 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 # which data uses which model
data = self.data_table.collect_data(default=self.default_combobox.currentData()) data = self.data_table.collect_data(default=self.default_combobox.currentData())
@ -468,7 +469,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
self.set_parameter_iter(None, mean_parameter, self.models[fitted_model]) 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: for model_p in functions:
if model_p['active']: if model_p['active']:
cnt += self.param_widgets[model_p['cnt']].set_parameter(fit_id, param[cnt:]) 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): class QFitResult(QtWidgets.QDialog, Ui_Dialog):
closed = QtCore.pyqtSignal(dict, list, str, bool, dict) closed = QtCore.pyqtSignal(dict, list, str, bool, bool, list)
redoFit = QtCore.pyqtSignal(dict) redoFit = QtCore.pyqtSignal(dict)
def __init__(self, results: list, management, parent=None): def __init__(self, results: list, management, parent=None):
@ -20,10 +20,17 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
self._management = management 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._prevs = {}
self._models = {} self._models = {}
for (res, parts) in results: for res in results:
idx = res.idx idx = res.idx
data_k = management.data[idx] data_k = management.data[idx]
@ -36,8 +43,7 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
for fit in data_k.get_fits(): for fit in data_k.get_fits():
self._prevs[idx].append((fit.name, fit.statistics, fit.nobs-fit.nvar)) 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._opts = [(False, False) for _ in range(len(self._results))]
self.residplot = self.graphicsView.addPlot(row=0, col=0) self.residplot = self.graphicsView.addPlot(row=0, col=0)
@ -273,12 +279,75 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
plot_fits = self.curve_checkbox.isChecked() 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() self.accept()
else: else:
self.reject() 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

@ -1,217 +0,0 @@
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

@ -1,333 +0,0 @@
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,9 +1,5 @@
from __future__ import annotations
from ..Qt import QtWidgets, QtCore from ..Qt import QtWidgets, QtCore
from .._py.guidelinewidget import Ui_Form from .._py.guidelinewidget import Ui_Form
from .draw_inputs import *
from .draw_objects import *
class DrawingsWidget(QtWidgets.QWidget, Ui_Form): class DrawingsWidget(QtWidgets.QWidget, Ui_Form):
@ -11,97 +7,155 @@ class DrawingsWidget(QtWidgets.QWidget, Ui_Form):
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent=parent) super().__init__(parent=parent)
self.connected_figure=None
self.setupUi(self) self.setupUi(self)
self.widgets = { def __call__(self, graphs):
'line': LineWidget(self), for gid, name in graphs:
'multipts': MultiPointWidget(self), self.graph_comboBox.addItem(name, userData=gid)
'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): def clear(self):
self.graph_combobox.clear() self.graph_comboBox.clear()
@QtCore.pyqtSlot(int, name='on_mode_comboBox_currentIndexChanged') @QtCore.pyqtSlot(int, name='on_mode_comboBox_currentIndexChanged')
def change_draw_type(self, idx: int): def change_draw_type(self, idx: int):
self.stackedWidget.setCurrentIndex(idx) self.stackedWidget.setCurrentIndex(idx)
@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') 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')
return return
graph_id, obj = self.get_item() 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)
if self._editmode: self.make_table_row(pos, angle, qcolor, comment)
obj.set_values(**dic)
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}'
else: else:
new_obj = [LineObject, MultipointObject, TextObject, RectangleObject, EllipseObject][self.mode_comboBox.currentIndex()](**dic) raise ValueError('Only horizontal or vertical lines are supported')
child = QtWidgets.QListWidgetItem(str(new_obj)) item = QtWidgets.QTableWidgetItem(pos_label)
child.setData(QtCore.Qt.UserRole, new_obj.id) item.setFlags(QtCore.Qt.ItemIsSelectable)
self.listWidget.addItem(child) item.setForeground(QtGui.QBrush(QtGui.QColor('black')))
self.graphs[graph_id].addDrawing(new_obj) row_count = self.tableWidget.rowCount()
self.tableWidget.setRowCount(row_count+1)
self.tableWidget.setItem(row_count, 0, item)
self.graph_combobox.setEnabled(True) item2 = QtWidgets.QTableWidgetItem(comment)
self.listWidget.setEnabled(True) self.tableWidget.setItem(row_count, 1, item2)
self.frame.setEnabled(False)
@QtCore.pyqtSlot(name='on_cancelbutton_clicked') colitem = QtWidgets.QTableWidgetItem(' ')
def cancel_edit(self): colitem.setBackground(QtGui.QBrush(color))
self.graph_combobox.setEnabled(True) colitem.setFlags(QtCore.Qt.ItemIsSelectable)
self.listWidget.setEnabled(True) self.tableWidget.setVerticalHeaderItem(row_count, colitem)
self.frame.setEnabled(False)
def get_item(self): def eventFilter(self, src: QtCore.QObject, evt: QtCore.QEvent) -> bool:
edit_item = self.listWidget.currentItem() if evt.type() == QtCore.QEvent.KeyPress:
graph_id = self.graph_combobox.currentData() if evt.key() == QtCore.Qt.Key_Delete:
if edit_item is None: self.delete_line()
return graph_id, None return True
object_id = edit_item.data(QtCore.Qt.UserRole) return super().eventFilter(src, evt)
return graph_id, self.graphs[graph_id].drawings[object_id] 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}')
"""

View File

@ -48,7 +48,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
self.real_plots = {} self.real_plots = {}
self.imag_plots = {} self.imag_plots = {}
self.error_plots = {} self.error_plots = {}
self.drawings = {}
self._special_needs = [] self._special_needs = []
self._external_items = [] self._external_items = []
@ -131,8 +130,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
@title.setter @title.setter
def title(self, value): def title(self, value):
if self.graph_label.text() != '':
self.graph_label.setText(str(value))
self.setWindowTitle(str(value)) self.setWindowTitle(str(value))
@property @property
@ -346,12 +343,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
return True return True
def addDrawing(self, obj):
self.drawings[obj.id] = obj
self.graphic.addItem(obj.drawing)
def closeEvent(self, evt: QtGui.QCloseEvent): def closeEvent(self, evt: QtGui.QCloseEvent):
print(self.parent())
if not self.closable: if not self.closable:
evt.ignore() evt.ignore()
return return
@ -637,10 +629,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
dic['in_legend'] = in_legend dic['in_legend'] = in_legend
dic['drawings'] = []
for d in self.drawings:
dic['drawings'].append(d.get_value())
return dic return dic
def get_state(self) -> dict: def get_state(self) -> dict:
@ -753,13 +741,3 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
temp = self._fgcolor, self._bgcolor temp = self._fgcolor, self._bgcolor
self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1]) self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])
self._prev_colors = temp 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') @QtCore.pyqtSlot(int, name='on_line_spinBox_valueChanged')
def set_column_names(self, _): def set_column_names(self, _):
self.ascii_table.setHorizontalHeaderLabels(map(str, range(1, self.ascii_table.columnCount() + 1))) self.ascii_table.setHorizontalHeaderLabels(map(str, range(1, self.ascii_table.columnCount() + 1)))
if self.column_checkBox.isChecked(): if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
header_line = self.reader.header[self.line_spinBox.value()-1] header_line = self.reader.header[self.line_spinBox.value()-1]
self.ascii_table.setHorizontalHeaderLabels(header_line.split()) self.ascii_table.setHorizontalHeaderLabels(header_line.split())

View File

@ -91,10 +91,6 @@ class GraceExporter:
else: else:
data.data = c_[item['x'], item['y']] 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: for c in new_colors:
self.__agr.set_color(c[1], c[2], idx=c[0]) self.__agr.set_color(c[1], c[2], idx=c[0])

View File

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

View File

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

View File

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

View File

@ -4,6 +4,8 @@ import pathlib
import re import re
import uuid import uuid
import numpy as np
from nmreval.fit import data as fit_d from nmreval.fit import data as fit_d
from nmreval.fit.model import Model from nmreval.fit.model import Model
from nmreval.fit.result import FitResult from nmreval.fit.result import FitResult
@ -482,7 +484,7 @@ class UpperManagement(QtCore.QObject):
parameter[set_id] = (new_values, set_parameter[1]) parameter[set_id] = (new_values, set_parameter[1])
self.start_fit(*self.__fit_options) self.start_fit(*self.__fit_options)
def make_fits(self, res: dict, opts: list, param_graph: str, show_fit: bool, parts: dict) -> None: def make_fits(self, res: dict, opts: list, param_graph: str, show_fit: bool, parts: bool, extrapolate: list) -> None:
""" """
Args: Args:
@ -491,6 +493,7 @@ class UpperManagement(QtCore.QObject):
param_graph: None if no parameter to plot, '' for new graph, or id of existig graph param_graph: None if no parameter to plot, '' for new graph, or id of existig graph
show_fit: plot fit curve? show_fit: plot fit curve?
parts: key is that of original data, value is list of subplots parts: key is that of original data, value is list of subplots
extrapolate:
""" """
f_id_list = [] f_id_list = []
@ -503,6 +506,26 @@ class UpperManagement(QtCore.QObject):
if reject: if reject:
continue 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] data_k = self.data[k]
if delete_prev: if delete_prev:
tobedeleted.extend([f.id for f in data_k.get_fits()]) tobedeleted.extend([f.id for f in data_k.get_fits()])
@ -527,18 +550,16 @@ class UpperManagement(QtCore.QObject):
f_id_list.append(f_id) f_id_list.append(f_id)
data_k.set_fits(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 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) self.delete_sets(tobedeleted)
if accepted and (param_graph != '-1'): if accepted and (param_graph != '-1'):
@ -546,6 +567,27 @@ class UpperManagement(QtCore.QObject):
self.newData.emit(f_id_list, gid) 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): def make_fit_parameter(self, fit_sets: list[str | FitResult], graph_id: str = None):
fit_dict = self._collect_fit_parameter(fit_sets) fit_dict = self._collect_fit_parameter(fit_sets)

View File

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

View File

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

View File

@ -9,6 +9,7 @@ import numpy as np
from scipy.stats import f as fdist from scipy.stats import f as fdist
from scipy.interpolate import interp1d from scipy.interpolate import interp1d
from ._meta import MultiModel
from .parameter import Parameter from .parameter import Parameter
from ..data.points import Points from ..data.points import Points
from ..data.signals import Signal from ..data.signals import Signal
@ -17,7 +18,7 @@ from ..utils.text import convert
class FitResultCreator: class FitResultCreator:
@staticmethod @staticmethod
def make_from_session(x_orig: np.ndarray, y_orig: np.ndarray, idx: int, kwargs: dict[Any]) -> (dict, list): def make_from_session(x_orig: np.ndarray, y_orig: np.ndarray, idx: int, kwargs: dict[Any]) -> FitResult:
params = OrderedDict() params = OrderedDict()
for key, pbest, err in zip(kwargs['pnames'], kwargs['parameter'], kwargs['error']): for key, pbest, err in zip(kwargs['pnames'], kwargs['parameter'], kwargs['error']):
@ -37,10 +38,10 @@ class FitResultCreator:
stats = FitResultCreator.calc_statistics(resid, _y) stats = FitResultCreator.calc_statistics(resid, _y)
return FitResult(kwargs['x'], kwargs['y'], x_orig, y_orig, params, dict(kwargs['choice']), resid, 0, 0, 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 @staticmethod
def make_with_model(model, x_orig, y_orig, p, fun_kwargs, idx, nobs, nvar, corr, pcorr) -> (dict, list): def make_with_model(model, x_orig, y_orig, p, fun_kwargs, idx, nobs, nvar, corr, pcorr) -> FitResult:
if np.all(x_orig > 0) and (np.max(x_orig) > 100 * np.min(x_orig)): if np.all(x_orig > 0) and (np.max(x_orig) > 100 * np.min(x_orig)):
islog = True islog = True
else: else:
@ -48,7 +49,7 @@ class FitResultCreator:
if len(x_orig) < 51: if len(x_orig) < 51:
if islog: if islog:
_x = np.logspace(np.log10(np.min(x_orig)), np.log10(np.max(x_orig)), num=10*x_orig.size-9) _x = np.geomspace(np.min(x_orig), np.max(x_orig), num=10*x_orig.size-9)
else: else:
_x = np.linspace(np.min(x_orig), np.max(x_orig), num=10*x_orig.size-9) _x = np.linspace(np.min(x_orig), np.max(x_orig), num=10*x_orig.size-9)
else: else:
@ -62,15 +63,6 @@ class FitResultCreator:
parameters = OrderedDict([(k, v) for k, v in zip(pnames, p)]) parameters = OrderedDict([(k, v) for k, v in zip(pnames, p)])
p_final = [p.value for p in parameters.values()] 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) _y = model.func(p_final, _x, **fun_kwargs)
resid = model.func(p_final, x_orig, **fun_kwargs) - y_orig resid = model.func(p_final, x_orig, **fun_kwargs) - y_orig
@ -97,13 +89,10 @@ class FitResultCreator:
correlation = corr correlation = corr
partial_correlation = pcorr partial_correlation = pcorr
return ( return FitResult(_x, _y, x_orig, y_orig, parameters, fun_kwargs, resid,
FitResult(_x, _y, x_orig, y_orig, parameters, fun_kwargs, resid, nobs, nvar, model.name, stats,
nobs, nvar, model.name, stats, idx=idx, corr=correlation, pcorr=partial_correlation,
idx=idx, corr=correlation, pcorr=partial_correlation, islog=islog, func=model)
islog=islog),
part_functions,
)
@staticmethod @staticmethod
def calc_statistics(y, residual, nobs=None, nvar=None): def calc_statistics(y, residual, nobs=None, nvar=None):
@ -141,8 +130,11 @@ class FitResultCreator:
class FitResult(Points): class FitResult(Points):
def __init__(self, x, y, x_data, y_data, params, fun_kwargs, resid, nobs, nvar, name, stats, def __init__(self, x: np.ndarray, y: np.ndarray,
idx=None, corr=None, pcorr=None, islog=False, 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,
**kwargs): **kwargs):
self.parameter, name = self._prepare_names(params, name) self.parameter, name = self._prepare_names(params, name)
@ -162,6 +154,7 @@ class FitResult(Points):
self.x_data = x_data self.x_data = x_data
self.y_data = y_data self.y_data = y_data
self._model_name = name self._model_name = name
self._func = func
@staticmethod @staticmethod
def _prepare_names(parameter: dict, modelname: str): def _prepare_names(parameter: dict, modelname: str):
@ -200,6 +193,13 @@ class FitResult(Points):
except AttributeError: except AttributeError:
return 'FitObject' return 'FitObject'
@property
def func(self):
if isinstance(self._func, MultiModel):
return self._func.func
else:
return self._func
@property @property
def p_final(self): def p_final(self):
return [pp.value for pp in self.parameter.values()] return [pp.value for pp in self.parameter.values()]
@ -215,6 +215,7 @@ class FitResult(Points):
print(' #var :', self.nvar) print(' #var :', self.nvar)
print('\nParameter') print('\nParameter')
print(self._parameter_string()) print(self._parameter_string())
if statistics: if statistics:
print('Statistics') print('Statistics')
for k, v in self.statistics.items(): for k, v in self.statistics.items():
@ -342,3 +343,24 @@ class FitResult(Points):
data = FitResult(**state) data = FitResult(**state)
return data 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,5 +1,6 @@
import pathlib import pathlib
import re import re
from io import BytesIO
from itertools import islice from itertools import islice
import numpy as np import numpy as np
@ -99,7 +100,10 @@ class AsciiReader:
y = list(range(1, max(self.width))) y = list(range(1, max(self.width)))
cols = x + y + yerr cols = x + y + yerr
raw_data = np.genfromtxt(self.fname, usecols=cols, missing_values='--') 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_
if raw_data.ndim == 1: if raw_data.ndim == 1:
# only one row or column # only one row or column
if len(self.data) == 1: if len(self.data) == 1:

View File

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import codecs
import pathlib import pathlib
import re import re
import warnings import warnings
@ -80,12 +81,6 @@ class GraceEditor:
return self.graphs[-1] 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): def new_set(self, graph):
s = None s = None
g_idx = -1 g_idx = -1
@ -110,9 +105,8 @@ class GraceEditor:
# we start always with the header # we start always with the header
current_pos = 'header' current_pos = 'header'
with self.file.open('r') as f: with self.file.open('r', errors='replace') as f:
for line_nr, line in enumerate(f): for line_nr, line in enumerate(f):
# lots of states to check # lots of states to check
# agr file order: header, drawing object, region, graph, set # agr file order: header, drawing object, region, graph, set
if current_pos == 'header': if current_pos == 'header':
@ -199,8 +193,6 @@ class GraceEditor:
self.graphs[-1].append(line) self.graphs[-1].append(line)
print(self.drawing_objects)
def _make_graph(self, line: str): def _make_graph(self, line: str):
m = self._RE_GRAPH_START.match(line) m = self._RE_GRAPH_START.match(line)
g_idx = int(m.group(1)) g_idx = int(m.group(1))
@ -332,86 +324,6 @@ class GraceEditor:
class GraceDrawing(list): 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): def __str__(self):
return ''.join(self) return ''.join(self)
@ -693,6 +605,7 @@ class GraceSetProps(GraceProperties):
self.set_property(**_kwargs) self.set_property(**_kwargs)
def set_symbol(self, **kwargs): def set_symbol(self, **kwargs):
_kwargs = {'symbol '+k: v for k, v in kwargs.items()} _kwargs = {'symbol '+k: v for k, v in kwargs.items()}
if 'symbol' in kwargs: if 'symbol' in kwargs:
_kwargs['symbol'] = kwargs['symbol'] _kwargs['symbol'] = kwargs['symbol']

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