schrodinger.ui.qt.appframework2.baseapp module

class schrodinger.ui.qt.appframework2.baseapp.DockWidget(object_name, dockarea)

Bases: schrodinger.ui._maestro_ui.MM_QDockWidget

This class propagates closeEvents to the App so that panel knows that it is closed. Otherwise maestro callbacks will not get removed.

__init__(object_name, dockarea)
closeEvent(event)

Do not close the floating python panel and instead emit a SIGNAL to Maestro which redocks the panel back into main window. This is a temporary workaround for Qt5 redock issues

class schrodinger.ui.qt.appframework2.baseapp.BasePanel(stop_before=None, parent=None, in_knime=False, workspace_st_file=None)

Bases: PyQt6.QtWidgets.QWidget

gui_closed

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(stop_before=None, parent=None, in_knime=False, workspace_st_file=None)
Parameters
  • stop_before (int) – Exit the constructor before specified step.

  • parent (QWidget) – Parent widget, if any.

  • in_knime (bool) – Whether we are currently running under KNIME - a mode in which input selector is hidden, optionally a custom Workspace Structure is specified, and buttom bar has OK & Cancel buttons.

  • workspace_st_file (bool) – Structure to be returned by getWorkspaceStructure() when in_knime is True.

startUp()
setPanelOptions()
setup()
setDefaults()
setStyleSheet(self, styleSheet: str)
layOut()
showEvent(show_event)

Override the normal processing when the panel is shown.

setVisible(self, visible: bool)
runMode()
run()
cleanup()
closeEvent(event)

Close panel and quit application if this is a top level standalone window. Otherwise, hide the panel.

runSubpanel()
runMaestro()

This can be extended in derived classes to perform maestro-only tasks such as setting up the mini-monitor or connecting maestro callbacks

runCanvas()

This handles Canvas-specific logic

runStandalone()
show(self)
parent(self) QObject
property title
warning(text, preferences=None, key='')

Display a warning dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

info(text, preferences=None, key='')

Display an information dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

error(text, preferences=None, key='', detailed_text=None)

Display an error dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

  • detailed_text (str) – Detailed (selectable) error text if any.

Return type

None

question(msg, button1='OK', button2='Cancel', title='Question')

Display a prompt dialog window with specified text. Returns True if first button (default OK) is pressed, False otherwise.

setWaitCursor(app_wide=True)

Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor.

Parameters

app_wide (bool) – If True then this will apply to the entire application (including Maestro if running there). If False then this will apply only to this panel.

restoreCursor(app_wide=True)

Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.

Parameters

app_wide (bool) – If True then this will restore the cursor for the entire application (including Maestro if running there). If False then this will apply only to this panel.

keyPressEvent(self, a0: QKeyEvent)
class schrodinger.ui.qt.appframework2.baseapp.ValidatedPanel(*args, **kwargs)

Bases: schrodinger.ui.qt.appframework2.baseapp.BasePanel, schrodinger.ui.qt.appframework2.validation.ValidationMixin

__init__(*args, **kwargs)
Parameters
  • stop_before (int) – Exit the constructor before specified step.

  • parent (QWidget) – Parent widget, if any.

  • in_knime (bool) – Whether we are currently running under KNIME - a mode in which input selector is hidden, optionally a custom Workspace Structure is specified, and buttom bar has OK & Cancel buttons.

  • workspace_st_file (bool) – Structure to be returned by getWorkspaceStructure() when in_knime is True.