sas.qtgui.Utilities.ModelEditors.AddMultEditor package

Subpackages

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_AddMultEditorUI

Dialog 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.

__doc__ = '\n       Dialog for easy custom composite models.  Provides a Dialog panel\n       to choose two existing models (including pre-existing Plugin Models which\n       may 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\n       background parameter.\n       The user can also give a brief help for the model in the description box and\n       must provide a unique name which is verified before the new model is saved.\n    '
__init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags), *, sizeGripEnabled: bool | None = None, modal: bool | None = None) None

Initialize self. See help(type(self)) for accurate signature.

__module__ = 'sas.qtgui.Utilities.ModelEditors.AddMultEditor.AddMultEditor'
_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

Module contents