mvp for script runner

This commit is contained in:
Dominik Demuth
2024-09-26 18:39:55 +02:00
parent 7ad1e4b843
commit d07b85ae27
10 changed files with 188 additions and 13 deletions

View File

@@ -985,13 +985,21 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
@QtCore.pyqtSlot(name='on_actionFunction_editor_triggered')
def edit_models(self):
if self.editor is None:
from ..lib.usermodeleditor import QUsermodelEditor
from ..editors.usermodeleditor import QUsermodelEditor
self.editor = QUsermodelEditor(config_paths() / 'usermodels.py', parent=self)
self.editor.modelsChanged.connect(lambda: self.fit_dialog.read_and_load_functions())
self.editor.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
self.editor.show()
@QtCore.pyqtSlot(name='on_actionUse_script_triggered')
def open_editor(self):
from ..editors.script_editor import QEditor
editor = QEditor(self.path, parent=self)
editor.runSignal.connect(self.management.run_script)
editor.show()
@QtCore.pyqtSlot(list, bool)
def extend_fit(self, sets: list, only_subplots: bool):
if only_subplots: