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¶
A
pyqtSignal
emitted by instances of the class.
- __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: Optional[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) Optional[QObject] ¶
- property title¶
- warning(text, preferences=None, key='', detailed_text=None)¶
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.
detailed_text (str) – Detailed (selectable) error text if any.
- 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: Optional[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.