schrodinger.application.job_monitor.job_monitor_progress_bar module

class schrodinger.application.job_monitor.job_monitor_progress_bar.ProgressBar(*args, **kwargs)

Bases: schrodinger.models.mappers.MapperMixin, schrodinger.ui.qt.widgetmixins.basicmixins.InitMixin, PyQt6.QtWidgets.QWidget

model_class

alias of schrodinger.application.job_monitor.job_monitor_models.JobModel

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)]
paintEvent(self, a0: QPaintEvent)
sizeHint(self) QSize
schrodinger.application.job_monitor.job_monitor_progress_bar.paint_progress(painter, target_rect, progress)

Paint the progress bar using the given painter.

Parameters
  • painter (QtGui.QPainter) – A QPainter that will be used to paint the progress bar

  • target_rect (QtCore.QRect) – A QRect defining the paint device’s target to paint on

  • progress (float) – The total progress given as a decimal number between 0 and 1

schrodinger.application.job_monitor.job_monitor_progress_bar.should_paint_progress(job_model)