schrodinger.trajectory.trajectory_gui_dir.export_movie module

class schrodinger.trajectory.trajectory_gui_dir.export_movie.TrajectoryMovieDoubleValidator

Bases: QDoubleValidator

Override base class because QtGui.QDoubleValidator returns Intermediate if input contains a double that is outside of the range or in the wrong format.

validate(in_str, pos)

Provides a range checking of floating point numbers.

Parameters:
  • in_str (str) – Input string entered by user.

  • pos (int) – Cursor position in the input editor.

Return type:

enum(QtGui.QValidator.State)

Returns:

State defined by QtGui.QValidator.State enum.

class schrodinger.trajectory.trajectory_gui_dir.export_movie.Quality

Bases: Enum

Enums for quality options.

LOW = 0
MEDIUM = 1
HIGH = 2
class schrodinger.trajectory.trajectory_gui_dir.export_movie.Resolution

Bases: Enum

Enums for resolution options.

R_1280X720 = 0
R_1920X1080 = 1
R_3840X2160 = 2
R_CUSTOM = 3
class schrodinger.trajectory.trajectory_gui_dir.export_movie.DurationType

Bases: Enum

Enums for movie options.

PER_FRAME = 0
FULL_MOVIE = 1
class schrodinger.trajectory.trajectory_gui_dir.export_movie.ExportMovieDialog(parent=None)

Bases: QDialog

Export Movie dialog class for exporting movies from trajectory viewer gui.

Variables:
  • CUSTOM_RESOLUTION_INDEX (int) – Index of custom resolution option in the resolution option menu.

  • CUSTOM_WIDGET_INDEX (int) – Index of custom resolution widget in the resolution-dependent widget.

  • PREDEFINED_WIDGET_INDEX (int) – Index of predefined resolution widget in the resolution-dependent widget.

PER_FRAME_MIN_VALUE = 0.04
PER_FRAME_MAX_VALUE = 5.0
PER_FRAME_ALLOWED_DECIMALS = 2
FULL_MOVIE_MIN_VALUE = 1
FULL_MOVIE_MAX_VALUE = 300
WORKSPACE_RESOLUTION_INDEX = 0
CUSTOM_RESOLUTION_INDEX = 4
CUSTOM_WIDGET_INDEX = 1
PREDEFINED_WIDGET_INDEX = 0
WORKSPACE_DISPLAY_TEXT = 'Workspace'
__init__(parent=None)

Construct export movie dialog.

Parameters:

parent (QtWidgets.QWidget) – Parent widget.

showHelp()

Shows ‘Export Movie’ dialog help

setDurationTextEditBox(value)

Set given value in the duration text edit box.

setDurationValidator(duration_type)

Set duration text edit box validator based on duration type.

Parameters:

duration_type (enum(DurationType)) – One of the value specified in the DurationType enum.

frameOptionChanged(state)

Slot which gets called whenever user changes frame option.

It updates movie total time label and edit box.

durationEdited()

Slot which gets called whenever use edits duration in the duration text edit box.

Type:

text: str

Param:

text: Text value entered in the text edit box.

startRangeModified()

This signal is emitted whenever start frame edit box value changes.

If the value differs from the default, Reset button is displayed. Frames label is updated accordingly.

endRangeModified()

This signal is emitted whenever end frame edit box value changes.

If the value differs from the default, Reset button is displayed. Frames label is updated accordingly.

updateGUI()

Update all relevant gui component of dialog.

updateFramesOptionAndResetButton()

Update frames label based on start, end and step size and update Reset button visibility.

updateLimitFrame()

Update limit frames gui components based on start, end, and total frames.

updateStartAndEndFrames(enable)

Enable or disable start and end range text boxes.

Parameters:

enable (bool) – Enable start and end frame label and tex box.

showDlg(start_frame, end_frame, step_size, total_frame)

Update dialog gui components based on given frame values.

Parameters:
  • start_frame (int) – Default start frame.

  • end_frame (int) – Default end frame.

  • step_size (int) – Default step size

  • total_frame (int) – Total frames

Return type:

str

Returns:

Return a path to a file to be used to export movie

getStartFrameValue()

Return start frame value from line edit text box.

Return type:

int

Returns:

Start frame value.

getEndFrameValue()

Return end frame value from line edit text box.

Return type:

int

Returns:

End frame value.

setStartFrameValue(start_frame)

Set start frame value in the start line edit text box.

Parameters:

start_frame (int) – Frame value to be set in the start range field.

setEndFrameValue(end_frame)

Set end frame value in the end line edit text box.

Parameters:

end_frame (int) – Frame value to be set in the end range field.

isRangeModifiedByUser()

Check if start or end range were modified by user.

rtype: bool return: True if range is modified by user in the session.

isFullRange(start_frame, end_frame)

Return true if entire range is included.

Parameters:
  • start_frame (int) – Starting frame number in the range.

  • end_frame (int) – End frame number in the range.

Return type:

bool

Returns:

True if entire range is included, otherwise False.

resetLimitRange()

Reset start and end frame values using default start and end.

updateRecommendationLabel(index)

Update recommendation label based on current selected quality.

Parameters:

index (int) – Selected option index in the quality option menu.

durationOptionChanged(index)

Slot which is called whenever duration option changes. Update movie total time label, movie duration text box and duration text box validator.

Parameters:

index (int) – Selected option index int the duration option menu.

getDuration()

Return duration value set in the duration edit box.

getTotalMovieFrames()

Returns total movie frames based on user selection in the frames radio group box.

getFrameTotal(step_size)

Return total frames in the range based on given step size.

Parameters:

step_size (int) – Step to be used to calculate frame count.

Return type:

int

Returns:

Frame count in the given range based on given step size.

updateMovieDurationTime()

Update movie total time label. Label is visible only if duration option is per frame.

updateRangeLineEditStyle()

Update range edit boxes style sheet.

updateExportButton()

Enable/disable Export button.

isValidFrameRange() bool

Check if start and end range are specified in correctly.

Returns:

True if end_frame > start_frame

isWorkspaceResolution() bool

Check if workspace resolution is selected.

Returns:

True if workspace resolution is selected.

getResolution()

Return resolution of image.

Return type:

QtCore.QSize

Returns:

Image resolution (w,h).

getMovieData()
Return type:

maestro_ui.MovieData

Returns:

Movie data according to user choice.