schrodinger.application.models.gui.experimental_px.messagebox module

class schrodinger.application.models.gui.experimental_px.messagebox.MessageBox(parent=None, text: str = '', title: str = '', icon: Optional[Icon] = None, icon_color: Optional[QColor] = None)

Bases: BaseDialog

A panelx-styled message box dialog with an optional icon, message, detailed text, and OK/Cancel buttons.

__init__(parent=None, text: str = '', title: str = '', icon: Optional[Icon] = None, icon_color: Optional[QColor] = None)
initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

text() str

Return the current message text.

setText(text: str) None

Set the message text.

detailedText() str

Return the current detailed text.

setDetailedText(text: str) None

Set the detailed text shown in a scrollable read-only area below the main message. Useful for tracebacks or other long-form content.

class schrodinger.application.models.gui.experimental_px.messagebox.QuestionDialog(parent=None, text: str = '', title: str = 'Question')

Bases: MessageBox

A panelx-styled question dialog with a help icon, message, and OK/Cancel buttons.

__init__(parent=None, text: str = '', title: str = 'Question')
initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

schrodinger.application.models.gui.experimental_px.messagebox.show_message_box(parent: QWidget, text: str, title: str, icon: Optional[Icon] = None, icon_color: Optional[QColor] = None, detailed_text: str = '')

Show a panelx-styled message box dialog.

Parameters:
  • parent – The parent widget.

  • text – The message to display.

  • title – The dialog window title.

  • icon – Optional icon to display.

  • icon_color – Optional color for the icon.

  • detailed_text – Optional detailed text shown in a scrollable read-only area below the main message.

schrodinger.application.models.gui.experimental_px.messagebox.show_error(parent: QWidget, text: str, title: str = 'Error', detailed_text: str = '') None

Show a panelx-styled error dialog.

Parameters:
  • parent – The parent widget.

  • text – The error message to display.

  • title – The dialog window title.

  • detailed_text – Optional detailed text (e.g. a traceback) shown in a scrollable read-only area below the main message.

schrodinger.application.models.gui.experimental_px.messagebox.show_info(parent: QWidget, text: str, title: str = 'Info', detailed_text: str = '') None

Show a panelx-styled info dialog.

Parameters:
  • parent – The parent widget.

  • text – The info message to display.

  • title – The dialog window title.

  • detailed_text – Optional detailed text shown in a scrollable read-only area below the main message.

schrodinger.application.models.gui.experimental_px.messagebox.show_warning(parent: QWidget, text: str, title: str = 'Warning', detailed_text: str = '') None

Show a panelx-styled warning dialog.

Parameters:
  • parent – The parent widget.

  • text – The warning message to display.

  • title – The dialog window title.

  • detailed_text – Optional detailed text shown in a scrollable read-only area below the main message.

schrodinger.application.models.gui.experimental_px.messagebox.show_question(parent: QWidget, text: str, title: str = 'Question', detailed_text: str = '') bool

Show a panelx-styled question dialog and return the user’s choice.

Parameters:
  • parent – The parent widget.

  • text – The question to display.

  • title – The dialog window title.

  • detailed_text – Optional detailed text shown in a scrollable read-only area below the main message.

Returns:

True if the user accepted, False otherwise.