schrodinger.application.models.gui.base_editor_dialog module

class schrodinger.application.models.gui.base_editor_dialog.Footer(*args, **kwargs)

Bases: BaseWidget

okButtonClicked

A pyqtSignal emitted by instances of the class.

cancelButtonClicked

A pyqtSignal emitted by instances of the class.

__init__(*args, **kwargs)
initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

setSaveMode(mode: SaveMode) None
Default = 'default'
FooterContrast = 'footer_contrast'
Panel = 'panel'
class schrodinger.application.models.gui.base_editor_dialog.BaseModelEditorDialog(*args, **kwargs)

Bases: BaseOptionsDialog

Base editor dialog for creating and editing models.

Note that model classes must have a overwrite_cur_version boolean param to support editing existing models.

PROPAGATE_PANELX_STYLES = True
SAVE_MODE_TO_TITLE = NotImplemented
initSetOptions()

Suggested subclass use: set instance variables, excluding layouts and subwidgets. Also use here to (optionally) apply the legacy stylesheet spacing settings (PANEL-19101).

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut()

@overrides: widgetmixins.InitMixin

defineMappings()

Override this in the subclass to define mappings. Should return a list of tuples [(<target>, <param>)]. Targets can be:

  1. a basic widget, like QLineEdit or QComboBox

  2. a custom object that inherits MapperMixin or TargetMixin

  3. a TargetSpec instance

  4. a slot

For common widgets, standard signals and getter/setter methods will be used, as defined in mappers._get_default_access_names().

For more fine-grained custom control, instantiate a TargetSpec object, which allows custom setters, getters, and signals to be specified.

Supplying a slot as the first element of the tuple is equivalent to providing TargetSpec(slot=my_slot).

Note that all target slots are triggered on setModel() as well as in response to the specified signal.

The param is an abstract param reference, e.g. MyModel.my_param.

Example:

def defineMappings(self):
    combo = self.style_combo
    return [(self.name_le, MyModel.name),
            (TargetSpec(combo,
                    getter=combo.currentText,
                    setter=combo.setCurrentText), MyModel.style),
            (self.coord_widget, MyModel.coord),
            (self._onASLTextChanged, MyModel.asl_text)]
setSaveMode(mode: SaveMode)
metadata() ModelMetadata
accept(self)
Default = 'default'
FooterContrast = 'footer_contrast'
Panel = 'panel'