sas.qtgui.Utilities.ModelEditors.AddMultEditor package¶
Subpackages¶
- sas.qtgui.Utilities.ModelEditors.AddMultEditor.UI package
- Submodules
- sas.qtgui.Utilities.ModelEditors.AddMultEditor.UI.AddMultEditorUI module
Ui_AddMultEditorUIUi_AddMultEditorUI.__annotate_func__Ui_AddMultEditorUI.__annotations_cache__Ui_AddMultEditorUI.__dict__Ui_AddMultEditorUI.__doc__Ui_AddMultEditorUI.__firstlineno__Ui_AddMultEditorUI.__module__Ui_AddMultEditorUI.__static_attributes__Ui_AddMultEditorUI.__weakref__Ui_AddMultEditorUI.retranslateUi()Ui_AddMultEditorUI.setupUi()
- Module contents
Submodules¶
sas.qtgui.Utilities.ModelEditors.AddMultEditor.AddMultEditor module¶
Widget for simple add / multiply editor.
- class sas.qtgui.Utilities.ModelEditors.AddMultEditor.AddMultEditor.AddMultEditor(parent=None)¶
Bases:
QDialog,Ui_AddMultEditorUIDialog for easy custom composite models. Provides a Dialog panel to choose two existing models (including pre-existing Plugin Models which may themselves be composite models) as well as an operation on those models (add or multiply) the resulting model will add a scale parameter and a background parameter. The user can also give a brief help for the model in the description box and must provide a unique name which is verified before the new model is saved.
- __annotate_func__ = None¶
- __annotations_cache__ = {}¶
- __doc__ = '\nDialog for easy custom composite models. Provides a Dialog panel\nto choose two existing models (including pre-existing Plugin Models which\nmay themselves be composite models) as well as an operation on those models\n(add or multiply) the resulting model will add a scale parameter and a\nbackground parameter.\nThe user can also give a brief help for the model in the description box and\nmust provide a unique name which is verified before the new model is saved.\n'¶
- __firstlineno__ = 44¶
- __init__(parent=None)¶
- __module__ = 'sas.qtgui.Utilities.ModelEditors.AddMultEditor.AddMultEditor'¶
- __static_attributes__ = ('canOverwriteName', 'good_name', 'layered_models', 'list_models', 'list_standard_models', 'parent', 'plugin_dir', 'plugin_filename')¶
- _checkIfLayered(model)¶
Check models for layered or conditional parameters. Add them to self.layered_models if criteria is met.
- _updateModelLists()¶
Update the combo boxes for both lists of models. The models in layered_models can only be included a single time in a plugin model. The two combo boxes could be different if a layered model is selected.
- onApply()¶
Validity check, save model to file
- onHelp()¶
Display related help section
- onNameCheck()¶
Check if proposed new model name does not already exists (if the overwriting is not allowed). If not an error message not show error message is displayed
- onOperatorChange(index)¶
Respond to operator combo box changes
- onOverwrite()¶
Modify state on checkbox change
- readModels(std_only=False)¶
Generate list of all models
- setupModels()¶
Add list of models to ‘Model1’ and ‘Model2’ comboboxes
- setupSignals()¶
Signals from various elements
- staticMetaObject = PySide6.QtCore.QMetaObject("AddMultEditor" inherits "QDialog": )¶
- updateModels()¶
Update contents of combo boxes with new plugin models
- write_new_model_to_file(fname, model1_name, model2_name, operator)¶
Write and Save file