schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog module¶
2D Viewer rendering settings dialog.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog.CarbonLabels¶
Bases:
JsonableEnum- NONE = 1¶
- TERMINAL = 2¶
- ALL = 3¶
- class schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog.ColorScheme¶
Bases:
JsonableEnum- DEFAULT = 1¶
- AVALON = 2¶
- CDK = 3¶
- DARK_MODE = 4¶
- BLACK_WHITE = 5¶
- WHITE_BLACK = 6¶
- class schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog.TwoDViewer2DSettingsDialogModel(*args, _param_type=<object object>, **kwargs)¶
Bases:
CompoundParamModel for the 2D Viewer rendering settings dialog.
- atom_font_size: int¶
A parameter of the class.
- bond_line_width: float¶
A parameter of the class.
- carbon_labels: CarbonLabels¶
A parameter of the class.
- color_scheme: ColorScheme¶
A parameter of the class.
- show_stereo_annotations: bool¶
A parameter of the class.
- show_unknown_stereo_annotations: bool¶
A parameter of the class.
- explicit_abs_labels_shown: bool¶
A parameter of the class.
- saveToPrefs() None¶
Persist the model settings to the user’s preferences file.
- loadFromPrefs() None¶
Restore saved settings from the user’s preferences file into the model.
- getRenderOptions() RenderOptions¶
Create Sketcher render options from this model.
- atom_font_sizeChanged¶
A
pyqtSignalemitted by instances of the class.
- atom_font_sizeReplaced¶
A
pyqtSignalemitted by instances of the class.
- bond_line_widthChanged¶
A
pyqtSignalemitted by instances of the class.
- bond_line_widthReplaced¶
A
pyqtSignalemitted by instances of the class.
- carbon_labelsChanged¶
A
pyqtSignalemitted by instances of the class.
- carbon_labelsReplaced¶
A
pyqtSignalemitted by instances of the class.
- color_schemeChanged¶
A
pyqtSignalemitted by instances of the class.
- color_schemeReplaced¶
A
pyqtSignalemitted by instances of the class.
- explicit_abs_labels_shownChanged¶
A
pyqtSignalemitted by instances of the class.
- explicit_abs_labels_shownReplaced¶
A
pyqtSignalemitted by instances of the class.
- show_stereo_annotationsChanged¶
A
pyqtSignalemitted by instances of the class.
- show_stereo_annotationsReplaced¶
A
pyqtSignalemitted by instances of the class.
- show_unknown_stereo_annotationsChanged¶
A
pyqtSignalemitted by instances of the class.
- show_unknown_stereo_annotationsReplaced¶
A
pyqtSignalemitted by instances of the class.
- schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog.open_dialog(parent, model: TwoDViewer2DSettingsDialogModel)¶
Open the settings dialog and persist the dismissed model.
- class schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog.TwoDViewer2DSettingsDialog(*args, **kwargs)¶
Bases:
BaseOptionsDialogDialog for editing 2D Viewer rendering settings.
This dialog is based on the 2D Sketcher RenderingSettingsDialog defined in src/schrodinger/sketcher/dialog/rendering_settings_dialog.h and src/schrodinger/sketcher/dialog/rendering_settings_dialog.cpp. Its Qt layout comes from src/schrodinger/sketcher/ui/rendering_settings_dialog.ui.
- ui_module = <module 'schrodinger.ui.two_d_viewer.two_d_viewer_2d_settings_dialog_ui' from '/scr/buildbot/builds/build/internal/lib/python3.11/site-packages/schrodinger/ui/two_d_viewer/two_d_viewer_2d_settings_dialog_ui.py'>¶
- model_class¶
alias of
TwoDViewer2DSettingsDialogModel
- initSetOptions() None¶
Suggested subclass use: set instance variables, excluding layouts and subwidgets. Also use here to (optionally) apply the legacy stylesheet spacing settings (PANEL-19101).
- initSetUp() None¶
Creates widget from
uiand stores itui_widget.Suggested subclass use: create and initialize subwidgets, and connect signals.
- openMaestro2DPreferences(_link=None) None¶
Open Maestro’s 2D structure preference panel.
- defineMappings() list[tuple]¶
Override this in the subclass to define mappings. Should return a list of tuples [(<target>, <param>)]. Targets can be:
a basic widget, like
QLineEditorQComboBoxa custom object that inherits
MapperMixinorTargetMixina
TargetSpecinstancea 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
TargetSpecobject, 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)]
- updateWidgets() None¶
Update dependent control visibility and enabled state.