schrodinger.ui.qt.tooltips module¶
- schrodinger.ui.qt.tooltips.tooltip_for_aa(aa)¶
Generate a tooltip for non-standard residue amino acid.
- Parameters:
aa (AminoAcid) – non-standard residue amino acid
- Returns:
html string to be used as tooltip
- Return type:
str
- schrodinger.ui.qt.tooltips.format_tooltip(tip, min_width=None)¶
Return a formatted tooltip.
- Parameters:
tip (str) – the tip text
min_width (int or None) – the minimum tip width, if None a default is used
- Return type:
str
- Returns:
the formatted tool tip
- class schrodinger.ui.qt.tooltips.TooltipMixin(*args, offset=None, **kwargs)¶
Bases:
objectMixin for converting widgets to tooltips. Contains basic functionality for showing the tooltip near the mouse cursor (plus an offset).
Concrete subclasses must also inherit from
QWidgetor a subclass.- __init__(*args, offset=None, **kwargs)¶
- Parameters:
offset (tuple[int, int] or NoneType) – offset coordinates (in pixels) from the mouse pointer position to draw the upper left corner of the tooltip window. If not supplied, will default to
DEFAULT_OFFSET.
- show()¶
Show this widget at the cursor location plus an offset.
- class schrodinger.ui.qt.tooltips.LabelTooltip(*args, offset=None, **kwargs)¶
Bases:
TooltipMixin,QLabel- setText(text: str)¶
Set the text of the tooltip and adjust the size of the tooltip to fit the text.