schrodinger.ui.qt.tasks.taskbar2 module

class schrodinger.ui.qt.tasks.taskbar2.JobMonitorType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

NEW = 1
LEGACY = 2
NONE = 3
class schrodinger.ui.qt.tasks.taskbar2.TaskBar2(*args, **kwargs)

Bases: schrodinger.ui.qt.tasks.taskwidgets.AbstractTaskBar

Variables
  • _TASK_MONITORING_DURATION (int) – time (in ms) to monitor jobs after launch

  • _HAS_JM_FAILURE_TEXT (str) – text to use as part of the icon failed tooltip if a job monitor is available

  • _NO_JM_FAILURE_TEXT (str) – text to use as part of the icon failed tooltip if a job monitor is not available

  • _FAILURE_TOOLTIP_TEMPLATE (str) – the template for the icon failed tooltip text

ui_module = <module 'schrodinger.ui.qt.tasks.taskbar_ui' from '/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/tasks/taskbar_ui.py'>
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.

initFinalize()

Suggested subclass use: perform any remaining initialization.

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)]
getSignalsAndSlots(model)

Override this method to specify signal and slot pairs that need to be connected/disconnected whenever the model instance is switched using setModel. The model instance is provided as an argument so that instance-specific signals can be used, but any pairs of signals and slots may be returned from this method.

Returns

a list of 2-tuples where each tuple is a signal, slot pair

setConfigDialog(config_dialog: PyQt6.QtWidgets.QDialog)

Assign a new config dialog.

showConfigDialog()
setModel(model)

Sets the model object for the mapper. Disconnects the old model, if one is set, and connects the new model. Pass in None to have no model set.

Parameters

model – the model instance or None

property start_btn
setSettingsMenuActions(text_to_slots)

Set the actions to show for the settings menu.

Parameters

text_to_slots (list[tuple(str, callable) or None]) – A list of tuples mapping the desired menu item text with the function that should be called when the item is selected. If the slot is None, then a separator will be added instead and the text will be ignored.

showSettingsMenu()

Show the settings menu after clicking the settings button.

Sets the position of the menu to be appear to the top left of the button.