From 0576c83b9114b6608dd6fbbdf7326dc8080eaeb9 Mon Sep 17 00:00:00 2001 From: tsole0 Date: Thu, 12 Sep 2024 11:07:15 -0400 Subject: [PATCH] Refactor model and custom GUI files into subpackages for neatness CustomGUI for custom or modified qtgui elements like CodeEditor. ModelEditors and its subpackages for model editors ModelEditors.Dialogs for dialogs called by model editors --- .../GenericScatteringCalculator.py | 2 +- src/sas/qtgui/MainWindow/GuiManager.py | 6 +- .../Utilities/{ => CustomGUI}/CodeEditor.py | 0 .../{ => CustomGUI}/ParameterTree.py | 0 src/sas/qtgui/Utilities/DocViewWidget.py | 2 +- .../AddMultEditor}/AddMultEditor.py | 2 +- .../AddMultEditor}/UI/AddMultEditorUI.ui | 374 +++++++++--------- .../Dialogs}/ModelSelector.py | 2 +- .../Dialogs}/ParameterEditDialog.py | 2 +- .../Dialogs}/UI/ModelSelectorUI.ui | 0 .../Dialogs}/UI/ParameterEditDialogUI.ui | 0 .../ReparameterizationEditor.py | 6 +- .../UI/ReparameterizationEditorUI.ui | 50 +-- .../TabbedEditor}/ModelEditor.py | 2 +- .../TabbedEditor}/PluginDefinition.py | 2 +- .../TabbedEditor}/TabbedModelEditor.py | 6 +- .../TabbedEditor}/UI/ModelEditor.ui | 80 ++-- .../TabbedEditor}/UI/PluginDefinitionUI.ui | 316 +++++++-------- .../TabbedEditor}/UI/TabbedModelEditor.ui | 132 +++---- src/sas/qtgui/Utilities/PluginManager.py | 2 +- .../UnitTesting/AddMultEditorTest.py | 2 +- .../Utilities/UnitTesting/ModelEditorTest.py | 2 +- .../UnitTesting/PluginDefinitionTest.py | 2 +- .../UnitTesting/TabbedModelEditorTest.py | 6 +- 24 files changed, 486 insertions(+), 512 deletions(-) rename src/sas/qtgui/Utilities/{ => CustomGUI}/CodeEditor.py (100%) rename src/sas/qtgui/Utilities/{ => CustomGUI}/ParameterTree.py (100%) rename src/sas/qtgui/Utilities/{ => ModelEditors/AddMultEditor}/AddMultEditor.py (99%) rename src/sas/qtgui/Utilities/{ => ModelEditors/AddMultEditor}/UI/AddMultEditorUI.ui (96%) rename src/sas/qtgui/Utilities/{ => ModelEditors/Dialogs}/ModelSelector.py (98%) rename src/sas/qtgui/Utilities/{ => ModelEditors/Dialogs}/ParameterEditDialog.py (98%) rename src/sas/qtgui/Utilities/{ => ModelEditors/Dialogs}/UI/ModelSelectorUI.ui (100%) rename src/sas/qtgui/Utilities/{ => ModelEditors/Dialogs}/UI/ParameterEditDialogUI.ui (100%) rename src/sas/qtgui/Utilities/{ => ModelEditors/ReparamEditor}/ReparameterizationEditor.py (99%) rename src/sas/qtgui/Utilities/{ => ModelEditors/ReparamEditor}/UI/ReparameterizationEditorUI.ui (89%) rename src/sas/qtgui/Utilities/{ => ModelEditors/TabbedEditor}/ModelEditor.py (95%) rename src/sas/qtgui/Utilities/{ => ModelEditors/TabbedEditor}/PluginDefinition.py (98%) rename src/sas/qtgui/Utilities/{ => ModelEditors/TabbedEditor}/TabbedModelEditor.py (98%) rename src/sas/qtgui/Utilities/{ => ModelEditors/TabbedEditor}/UI/ModelEditor.ui (89%) mode change 100755 => 100644 rename src/sas/qtgui/Utilities/{ => ModelEditors/TabbedEditor}/UI/PluginDefinitionUI.ui (96%) mode change 100755 => 100644 rename src/sas/qtgui/Utilities/{ => ModelEditors/TabbedEditor}/UI/TabbedModelEditor.ui (96%) mode change 100755 => 100644 diff --git a/src/sas/qtgui/Calculators/GenericScatteringCalculator.py b/src/sas/qtgui/Calculators/GenericScatteringCalculator.py index d93c50f218..7cbb99f2a5 100644 --- a/src/sas/qtgui/Calculators/GenericScatteringCalculator.py +++ b/src/sas/qtgui/Calculators/GenericScatteringCalculator.py @@ -25,7 +25,7 @@ import periodictable import sas.qtgui.Utilities.GuiUtils as GuiUtils -from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.TabbedModelEditor import TabbedModelEditor from sas.qtgui.Utilities.GenericReader import GenReader from sasdata.dataloader.data_info import Detector, Source from sas.system.version import __version__ diff --git a/src/sas/qtgui/MainWindow/GuiManager.py b/src/sas/qtgui/MainWindow/GuiManager.py index bbd7e8ca0a..77c45db56e 100644 --- a/src/sas/qtgui/MainWindow/GuiManager.py +++ b/src/sas/qtgui/MainWindow/GuiManager.py @@ -28,9 +28,9 @@ import sas.qtgui.Utilities.GuiUtils as GuiUtils import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary -from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.TabbedModelEditor import TabbedModelEditor from sas.qtgui.Utilities.PluginManager import PluginManager -from sas.qtgui.Utilities.ReparameterizationEditor import ReparameterizationEditor +from sas.qtgui.Utilities.ModelEditors.ReparamEditor.ReparameterizationEditor import ReparameterizationEditor from sas.qtgui.Utilities.GridPanel import BatchOutputPanel from sas.qtgui.Utilities.ResultPanel import ResultPanel from sas.qtgui.Utilities.OrientationViewer.OrientationViewer import show_orientation_viewer @@ -69,7 +69,7 @@ from sas.qtgui.MainWindow.DataExplorer import DataExplorerWindow -from sas.qtgui.Utilities.AddMultEditor import AddMultEditor +from sas.qtgui.Utilities.ModelEditors.AddMultEditor.AddMultEditor import AddMultEditor from sas.qtgui.Utilities.ImageViewer import ImageViewer from sas.qtgui.Utilities.FileConverter import FileConverterWidget from sas.qtgui.Utilities.WhatsNew.WhatsNew import WhatsNew diff --git a/src/sas/qtgui/Utilities/CodeEditor.py b/src/sas/qtgui/Utilities/CustomGUI/CodeEditor.py similarity index 100% rename from src/sas/qtgui/Utilities/CodeEditor.py rename to src/sas/qtgui/Utilities/CustomGUI/CodeEditor.py diff --git a/src/sas/qtgui/Utilities/ParameterTree.py b/src/sas/qtgui/Utilities/CustomGUI/ParameterTree.py similarity index 100% rename from src/sas/qtgui/Utilities/ParameterTree.py rename to src/sas/qtgui/Utilities/CustomGUI/ParameterTree.py diff --git a/src/sas/qtgui/Utilities/DocViewWidget.py b/src/sas/qtgui/Utilities/DocViewWidget.py index 7b6e84e8bc..d59900b7c1 100644 --- a/src/sas/qtgui/Utilities/DocViewWidget.py +++ b/src/sas/qtgui/Utilities/DocViewWidget.py @@ -8,7 +8,7 @@ from twisted.internet import threads from .UI.DocViewWidgetUI import Ui_DocViewerWindow -from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.TabbedModelEditor import TabbedModelEditor from sas.sascalc.fit import models from sas.sascalc.data_util.calcthread import CalcThread from sas.sascalc.doc_regen.makedocumentation import (make_documentation, create_user_files_if_needed, diff --git a/src/sas/qtgui/Utilities/AddMultEditor.py b/src/sas/qtgui/Utilities/ModelEditors/AddMultEditor/AddMultEditor.py similarity index 99% rename from src/sas/qtgui/Utilities/AddMultEditor.py rename to src/sas/qtgui/Utilities/ModelEditors/AddMultEditor/AddMultEditor.py index 8ba56c3d0e..83af7bd136 100644 --- a/src/sas/qtgui/Utilities/AddMultEditor.py +++ b/src/sas/qtgui/Utilities/ModelEditors/AddMultEditor/AddMultEditor.py @@ -23,7 +23,7 @@ from sas.qtgui.Perspectives.Fitting.FittingWidget import SUPPRESSED_MODELS # Local UI -from sas.qtgui.Utilities.UI.AddMultEditorUI import Ui_AddMultEditorUI +from sas.qtgui.Utilities.ModelEditors.AddMultEditor.UI.AddMultEditorUI import Ui_AddMultEditorUI # Template for the output plugin file SUM_TEMPLATE = """ diff --git a/src/sas/qtgui/Utilities/UI/AddMultEditorUI.ui b/src/sas/qtgui/Utilities/ModelEditors/AddMultEditor/UI/AddMultEditorUI.ui similarity index 96% rename from src/sas/qtgui/Utilities/UI/AddMultEditorUI.ui rename to src/sas/qtgui/Utilities/ModelEditors/AddMultEditor/UI/AddMultEditorUI.ui index bc1a331fdb..19c09d47fe 100644 --- a/src/sas/qtgui/Utilities/UI/AddMultEditorUI.ui +++ b/src/sas/qtgui/Utilities/ModelEditors/AddMultEditor/UI/AddMultEditorUI.ui @@ -1,187 +1,187 @@ - - - AddMultEditorUI - - - - 0 - 0 - 527 - 331 - - - - - 0 - 0 - - - - - 527 - 331 - - - - Easy Add/Multiply Editor - - - - - - Description - - - - - - Enter a description of the model (optional) - - - - - - - - - - Plugin model - - - - - - Sum / Multiply model function name. - - - Enter a plugin name - - - - - - - Check to overwrite the existing model with the same name. - - - Overwrite existing model - - - - - - - - - - Model selection - - - - - - - - model_1 - - - - - - - model_2 - - - - - - - true - - - - - - - - 0 - 0 - - - - Add: + -Multiply: * - - - - + - - - - - * - - - - - @ - - - - - - - - true - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::Help - - - - - - - - - <html><head/><body><p><span style=" font-weight:600;">Plugin_model = scale_factor * (model_1 + model_2) + background</span></p><p>To add/multiply plugin models, or combine more than two models, please click Help below.<br/></p></body></html> - - - - - - - txtName - chkOverwrite - txtDescription - cbModel1 - cbOperator - cbModel2 - - - - + + + AddMultEditorUI + + + + 0 + 0 + 527 + 331 + + + + + 0 + 0 + + + + + 527 + 331 + + + + Easy Add/Multiply Editor + + + + + + Description + + + + + + Enter a description of the model (optional) + + + + + + + + + + Plugin model + + + + + + Sum / Multiply model function name. + + + Enter a plugin name + + + + + + + Check to overwrite the existing model with the same name. + + + Overwrite existing model + + + + + + + + + + Model selection + + + + + + + + model_1 + + + + + + + model_2 + + + + + + + true + + + + + + + + 0 + 0 + + + + Add: + +Multiply: * + + + + + + + + + + * + + + + + @ + + + + + + + + true + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::Help + + + + + + + + + <html><head/><body><p><span style=" font-weight:600;">Plugin_model = scale_factor * (model_1 + model_2) + background</span></p><p>To add/multiply plugin models, or combine more than two models, please click Help below.<br/></p></body></html> + + + + + + + txtName + chkOverwrite + txtDescription + cbModel1 + cbOperator + cbModel2 + + + + diff --git a/src/sas/qtgui/Utilities/ModelSelector.py b/src/sas/qtgui/Utilities/ModelEditors/Dialogs/ModelSelector.py similarity index 98% rename from src/sas/qtgui/Utilities/ModelSelector.py rename to src/sas/qtgui/Utilities/ModelEditors/Dialogs/ModelSelector.py index 55f6c43472..12bd7d1414 100644 --- a/src/sas/qtgui/Utilities/ModelSelector.py +++ b/src/sas/qtgui/Utilities/ModelEditors/Dialogs/ModelSelector.py @@ -10,7 +10,7 @@ from sasmodels.sasview_model import load_standard_models from sas.qtgui.Utilities.CategoryInstaller import CategoryInstaller -from sas.qtgui.Utilities.UI.ModelSelectorUI import Ui_ModelSelector +from sas.qtgui.Utilities.ModelEditors.Dialogs.UI.ModelSelectorUI import Ui_ModelSelector from sas.sascalc.fit import models diff --git a/src/sas/qtgui/Utilities/ParameterEditDialog.py b/src/sas/qtgui/Utilities/ModelEditors/Dialogs/ParameterEditDialog.py similarity index 98% rename from src/sas/qtgui/Utilities/ParameterEditDialog.py rename to src/sas/qtgui/Utilities/ModelEditors/Dialogs/ParameterEditDialog.py index e62b90ad40..627f0def3e 100644 --- a/src/sas/qtgui/Utilities/ParameterEditDialog.py +++ b/src/sas/qtgui/Utilities/ModelEditors/Dialogs/ParameterEditDialog.py @@ -3,7 +3,7 @@ from PySide6 import QtWidgets, QtCore, QtGui -from sas.qtgui.Utilities.UI.ParameterEditDialogUI import Ui_ParameterEditDialog +from sas.qtgui.Utilities.ModelEditors.Dialogs.UI.ParameterEditDialogUI import Ui_ParameterEditDialog from sasmodels.modelinfo import Parameter diff --git a/src/sas/qtgui/Utilities/UI/ModelSelectorUI.ui b/src/sas/qtgui/Utilities/ModelEditors/Dialogs/UI/ModelSelectorUI.ui similarity index 100% rename from src/sas/qtgui/Utilities/UI/ModelSelectorUI.ui rename to src/sas/qtgui/Utilities/ModelEditors/Dialogs/UI/ModelSelectorUI.ui diff --git a/src/sas/qtgui/Utilities/UI/ParameterEditDialogUI.ui b/src/sas/qtgui/Utilities/ModelEditors/Dialogs/UI/ParameterEditDialogUI.ui similarity index 100% rename from src/sas/qtgui/Utilities/UI/ParameterEditDialogUI.ui rename to src/sas/qtgui/Utilities/ModelEditors/Dialogs/UI/ParameterEditDialogUI.ui diff --git a/src/sas/qtgui/Utilities/ReparameterizationEditor.py b/src/sas/qtgui/Utilities/ModelEditors/ReparamEditor/ReparameterizationEditor.py similarity index 99% rename from src/sas/qtgui/Utilities/ReparameterizationEditor.py rename to src/sas/qtgui/Utilities/ModelEditors/ReparamEditor/ReparameterizationEditor.py index 751e2da70a..1f42a7933f 100644 --- a/src/sas/qtgui/Utilities/ReparameterizationEditor.py +++ b/src/sas/qtgui/Utilities/ModelEditors/ReparamEditor/ReparameterizationEditor.py @@ -11,9 +11,9 @@ from sas.sascalc.fit.models import find_plugins_dir from sas.qtgui.Utilities import GuiUtils -from sas.qtgui.Utilities.UI.ReparameterizationEditorUI import Ui_ReparameterizationEditor -from sas.qtgui.Utilities.ModelSelector import ModelSelector -from sas.qtgui.Utilities.ParameterEditDialog import ParameterEditDialog +from sas.qtgui.Utilities.ModelEditors.ReparamEditor.UI.ReparameterizationEditorUI import Ui_ReparameterizationEditor +from sas.qtgui.Utilities.ModelEditors.Dialogs.ModelSelector import ModelSelector +from sas.qtgui.Utilities.ModelEditors.Dialogs.ParameterEditDialog import ParameterEditDialog from sasmodels.modelinfo import Parameter diff --git a/src/sas/qtgui/Utilities/UI/ReparameterizationEditorUI.ui b/src/sas/qtgui/Utilities/ModelEditors/ReparamEditor/UI/ReparameterizationEditorUI.ui similarity index 89% rename from src/sas/qtgui/Utilities/UI/ReparameterizationEditorUI.ui rename to src/sas/qtgui/Utilities/ModelEditors/ReparamEditor/UI/ReparameterizationEditorUI.ui index 10f935097d..e383f38d02 100644 --- a/src/sas/qtgui/Utilities/UI/ReparameterizationEditorUI.ui +++ b/src/sas/qtgui/Utilities/ModelEditors/ReparamEditor/UI/ReparameterizationEditorUI.ui @@ -158,32 +158,19 @@ li.checked::marker { content: "\2612"; } - + true - + true - - Qt::ElideNone - - + true - + 2 - - - 1 - - - - - 2 - - @@ -192,7 +179,7 @@ li.checked::marker { content: "\2612"; } - + 0 @@ -340,35 +327,22 @@ li.checked::marker { content: "\2612"; } - + true false - + true - - Qt::ElideNone - - + true - + 2 - - - 1 - - - - - 2 - - @@ -385,9 +359,9 @@ li.checked::marker { content: "\2612"; } - QParameterTreeWidget - QWidget -
sas.qtgui.Utilities.ParameterTree.h
+ QParameterTreeWidget + QWidget +
sas.qtgui.Utilities.CustomGUI.ParameterTree.h
diff --git a/src/sas/qtgui/Utilities/ModelEditor.py b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/ModelEditor.py similarity index 95% rename from src/sas/qtgui/Utilities/ModelEditor.py rename to src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/ModelEditor.py index 0f2c102c7b..255c602630 100644 --- a/src/sas/qtgui/Utilities/ModelEditor.py +++ b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/ModelEditor.py @@ -1,7 +1,7 @@ from PySide6 import QtCore from PySide6 import QtWidgets -from sas.qtgui.Utilities.UI.ModelEditor import Ui_ModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.UI.ModelEditor import Ui_ModelEditor from sas.qtgui.Utilities import GuiUtils class ModelEditor(QtWidgets.QDialog, Ui_ModelEditor): diff --git a/src/sas/qtgui/Utilities/PluginDefinition.py b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/PluginDefinition.py similarity index 98% rename from src/sas/qtgui/Utilities/PluginDefinition.py rename to src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/PluginDefinition.py index fb52ff3432..6974e58f1f 100644 --- a/src/sas/qtgui/Utilities/PluginDefinition.py +++ b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/PluginDefinition.py @@ -2,7 +2,7 @@ from PySide6 import QtGui from PySide6 import QtWidgets -from sas.qtgui.Utilities.UI.PluginDefinitionUI import Ui_PluginDefinition +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.UI.PluginDefinitionUI import Ui_PluginDefinition from sas.qtgui.Utilities import GuiUtils # txtName diff --git a/src/sas/qtgui/Utilities/TabbedModelEditor.py b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/TabbedModelEditor.py similarity index 98% rename from src/sas/qtgui/Utilities/TabbedModelEditor.py rename to src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/TabbedModelEditor.py index 88328a8c2f..60c35b972c 100644 --- a/src/sas/qtgui/Utilities/TabbedModelEditor.py +++ b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/TabbedModelEditor.py @@ -14,9 +14,9 @@ from sas.sascalc.fit.models import find_plugins_dir import sas.qtgui.Utilities.GuiUtils as GuiUtils -from sas.qtgui.Utilities.UI.TabbedModelEditor import Ui_TabbedModelEditor -from sas.qtgui.Utilities.PluginDefinition import PluginDefinition -from sas.qtgui.Utilities.ModelEditor import ModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.UI.TabbedModelEditor import Ui_TabbedModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.PluginDefinition import PluginDefinition +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.ModelEditor import ModelEditor class TabbedModelEditor(QtWidgets.QDialog, Ui_TabbedModelEditor): """ diff --git a/src/sas/qtgui/Utilities/UI/ModelEditor.ui b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/ModelEditor.ui old mode 100755 new mode 100644 similarity index 89% rename from src/sas/qtgui/Utilities/UI/ModelEditor.ui rename to src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/ModelEditor.ui index 4570aa287c..8b07e35177 --- a/src/sas/qtgui/Utilities/UI/ModelEditor.ui +++ b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/ModelEditor.ui @@ -1,40 +1,40 @@ - - - ModelEditor - - - - 0 - 0 - 549 - 632 - - - - Model Editor - - - - - - Model - - - - - - - - - - - - - QCodeEditor - QWidget -
sas.qtgui.Utilities.CodeEditor.h
-
-
- - -
+ + + ModelEditor + + + + 0 + 0 + 549 + 632 + + + + Model Editor + + + + + + Model + + + + + + + + + + + + + QCodeEditor + QWidget +
sas.qtgui.Utilities.CustomGUI.CodeEditor.h
+
+
+ + +
diff --git a/src/sas/qtgui/Utilities/UI/PluginDefinitionUI.ui b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/PluginDefinitionUI.ui old mode 100755 new mode 100644 similarity index 96% rename from src/sas/qtgui/Utilities/UI/PluginDefinitionUI.ui rename to src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/PluginDefinitionUI.ui index 00b365b52b..3e08e2a509 --- a/src/sas/qtgui/Utilities/UI/PluginDefinitionUI.ui +++ b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/PluginDefinitionUI.ui @@ -1,158 +1,158 @@ - - - PluginDefinition - - - - 0 - 0 - 723 - 784 - - - - Plugin Definition - - - - - - Plugin name - - - - - - Enter a plugin name - - - - - - - Overwrite existing plugin model of this name - - - - - - - - - - Description - - - - - - Enter a description of the model - - - - - - - - - - Fit parameters - - - - - - Non-polydisperse - - - - - - - - - - - - Parameters - - - - - Initial -value - - - - - - - - - - - Polydisperse - - - - - - - - - - - - Parameters - - - - - Initial -value - - - - - - - - - - - - - - Function(x) - - - - - - false - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:6.6pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:7.8pt;"><br /></p></body></html> - - - - - - - - - - txtName - chkOverwrite - txtDescription - tblParams - tblParamsPD - txtFunction - - - - + + + PluginDefinition + + + + 0 + 0 + 723 + 784 + + + + Plugin Definition + + + + + + Plugin name + + + + + + Enter a plugin name + + + + + + + Overwrite existing plugin model of this name + + + + + + + + + + Description + + + + + + Enter a description of the model + + + + + + + + + + Fit parameters + + + + + + Non-polydisperse + + + + + + + + + + + + Parameters + + + + + Initial +value + + + + + + + + + + + Polydisperse + + + + + + + + + + + + Parameters + + + + + Initial +value + + + + + + + + + + + + + + Function(x) + + + + + + false + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:6.6pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:7.8pt;"><br /></p></body></html> + + + + + + + + + + txtName + chkOverwrite + txtDescription + tblParams + tblParamsPD + txtFunction + + + + diff --git a/src/sas/qtgui/Utilities/UI/TabbedModelEditor.ui b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/TabbedModelEditor.ui old mode 100755 new mode 100644 similarity index 96% rename from src/sas/qtgui/Utilities/UI/TabbedModelEditor.ui rename to src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/TabbedModelEditor.ui index 3c50a083d3..9ef6e27601 --- a/src/sas/qtgui/Utilities/UI/TabbedModelEditor.ui +++ b/src/sas/qtgui/Utilities/ModelEditors/TabbedEditor/UI/TabbedModelEditor.ui @@ -1,66 +1,66 @@ - - - TabbedModelEditor - - - - 0 - 0 - 688 - 697 - - - - Model Editor - - - - :/res/ball.ico:/res/ball.ico - - - - - - -1 - - - - - - - - - Load plugin... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help - - - - - - - - - - + + + TabbedModelEditor + + + + 0 + 0 + 688 + 697 + + + + Model Editor + + + + :/res/ball.ico:/res/ball.ico + + + + + + -1 + + + + + + + + + Load plugin... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help + + + + + + + + + + diff --git a/src/sas/qtgui/Utilities/PluginManager.py b/src/sas/qtgui/Utilities/PluginManager.py index c1880d37dd..2e56bf76c4 100644 --- a/src/sas/qtgui/Utilities/PluginManager.py +++ b/src/sas/qtgui/Utilities/PluginManager.py @@ -6,7 +6,7 @@ from PySide6 import QtWidgets, QtCore from sas.sascalc.fit import models -from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.TabbedModelEditor import TabbedModelEditor import sas.qtgui.Utilities.GuiUtils as GuiUtils from sas.qtgui.Utilities.UI.PluginManagerUI import Ui_PluginManagerUI diff --git a/src/sas/qtgui/Utilities/UnitTesting/AddMultEditorTest.py b/src/sas/qtgui/Utilities/UnitTesting/AddMultEditorTest.py index 9f5d89921b..fc72b2fe98 100644 --- a/src/sas/qtgui/Utilities/UnitTesting/AddMultEditorTest.py +++ b/src/sas/qtgui/Utilities/UnitTesting/AddMultEditorTest.py @@ -12,7 +12,7 @@ from sas.qtgui.Utilities.GuiUtils import Communicate # Local -from sas.qtgui.Utilities.AddMultEditor import AddMultEditor +from sas.qtgui.Utilities.ModelEditors.AddMultEditor.AddMultEditor import AddMultEditor diff --git a/src/sas/qtgui/Utilities/UnitTesting/ModelEditorTest.py b/src/sas/qtgui/Utilities/UnitTesting/ModelEditorTest.py index 062aa8ee29..0dc3ecb035 100755 --- a/src/sas/qtgui/Utilities/UnitTesting/ModelEditorTest.py +++ b/src/sas/qtgui/Utilities/UnitTesting/ModelEditorTest.py @@ -9,7 +9,7 @@ from sas.qtgui.UnitTesting.TestUtils import QtSignalSpy # Local -from sas.qtgui.Utilities.ModelEditor import ModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.ModelEditor import ModelEditor from sas.qtgui.Utilities.PythonSyntax import PythonHighlighter diff --git a/src/sas/qtgui/Utilities/UnitTesting/PluginDefinitionTest.py b/src/sas/qtgui/Utilities/UnitTesting/PluginDefinitionTest.py index 0f3ec7a226..b615f20f1a 100644 --- a/src/sas/qtgui/Utilities/UnitTesting/PluginDefinitionTest.py +++ b/src/sas/qtgui/Utilities/UnitTesting/PluginDefinitionTest.py @@ -9,7 +9,7 @@ from sas.qtgui.UnitTesting.TestUtils import QtSignalSpy # Local -from sas.qtgui.Utilities.PluginDefinition import PluginDefinition +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.PluginDefinition import PluginDefinition from sas.qtgui.Utilities.PythonSyntax import PythonHighlighter diff --git a/src/sas/qtgui/Utilities/UnitTesting/TabbedModelEditorTest.py b/src/sas/qtgui/Utilities/UnitTesting/TabbedModelEditorTest.py index 5c2bee2deb..0b8bde7b68 100644 --- a/src/sas/qtgui/Utilities/UnitTesting/TabbedModelEditorTest.py +++ b/src/sas/qtgui/Utilities/UnitTesting/TabbedModelEditorTest.py @@ -12,9 +12,9 @@ # Local import sas.qtgui.Utilities.GuiUtils as GuiUtils -from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor -from sas.qtgui.Utilities.PluginDefinition import PluginDefinition -from sas.qtgui.Utilities.ModelEditor import ModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.TabbedModelEditor import TabbedModelEditor +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.PluginDefinition import PluginDefinition +from sas.qtgui.Utilities.ModelEditors.TabbedEditor.ModelEditor import ModelEditor