schrodinger.ui.qt.fp_selector_widget module¶
Widget for selecting fingerprint types.
Copyright Schrodinger LLC, All Rights Reserved.
- class schrodinger.ui.qt.fp_selector_widget.FingerprintsModel(*args, _param_type=<object object>, **kwargs)¶
Bases:
CompoundParamModel used by fingerprints selector widget.
- use_fp: bool¶
A parameter of the class.
- fp_type: str¶
A parameter of the class.
- fp_typeChanged¶
A
pyqtSignalemitted by instances of the class.
- fp_typeReplaced¶
A
pyqtSignalemitted by instances of the class.
- use_fpChanged¶
A
pyqtSignalemitted by instances of the class.
- use_fpReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.ui.qt.fp_selector_widget.FingerprintsPopUp(parent)¶
Bases:
PopUpThe pop up window that shows available fingerprint types.
- fingerprintChanged¶
A
pyqtSignalemitted by instances of the class.
- setup()¶
Subclass-specific initialization. Subclasses can re-implement this function with custom set up code.
- getFingerprint()¶
Returns selected fingerprint type or None if no type is selected.
- Returns:
FP type
- Return type:
str or None
- setFingerprint(fp_type)¶
Sets fingerprint type to be selected.
- Parameters:
fp_type (str) – FP type
- class schrodinger.ui.qt.fp_selector_widget.FingerprintsSelectorWidget(*args, **kwargs)¶
Bases:
MapperMixin,BaseWidgetA widget for selecting fingerprint types.
- model_class¶
alias of
FingerprintsModel
- ui_module = <module 'schrodinger.ui.qt.fp_selector_widget_ui' from '/scr/buildbot/builds/build/internal/lib/python3.11/site-packages/schrodinger/ui/qt/fp_selector_widget_ui.py'>¶
- initSetUp()¶
Creates widget from
uiand stores itui_widget.Suggested subclass use: create and initialize subwidgets, and connect signals.
- defineMappings()¶
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)]