mobase.widgets

Attributes

__version__

Classes

TaskDialog

Customizable choice dialog.

TaskDialogButton

Special button to be used inside TaskDialog widgets.

Package Contents

class mobase.widgets.TaskDialog(parent: PyQt6.QtWidgets.QWidget | None = None, title: str = '', main: str = '', content: str = '', details: str = '', icon: PyQt6.QtWidgets.QMessageBox.Icon = PyQt6.QtWidgets.QMessageBox.Icon.NoIcon, buttons: list[TaskDialogButton] = [], remember: str | tuple[str, str] = '')

Customizable choice dialog.

addButton(button: TaskDialogButton) TaskDialog

Add a custom button to this TaskDialog.

Parameters:

button – Button to add to the dialog.

addContent(widget: PyQt6.QtWidgets.QWidget) None

Add a custom widget content to this TaskDialog. Widget content are put between content and buttons (above buttons).

Parameters:

widget – Widget to add.

exec() PyQt6.QtWidgets.QMessageBox.StandardButton

Display this dialog and wait for user-interaction to return. This is a blocking function.

Returns:

The button clicked by the user. Without custom buttons, this return Ok,

otherwise it returns the button set in the TaskDialogButton.

setContent(content: str) TaskDialog

Set the top-level message of this dialog.

Parameters:

content – Top-level message to set.

setDetails(details: str) TaskDialog

Set the details for this TaskDialog.

The details are hidden by default and the user can display them by clicking the “Details” button at the bottom of the TaskDialog.

Parameters:

details – Details content to display. Can be a multi-line string.

setIcon(icon: PyQt6.QtWidgets.QMessageBox.Icon) TaskDialog

Set the icon of the dialog.

Parameters:

icon – Icon of the dialog.

setMain(main: str) TaskDialog

Set the main message of the dialog. The main message is displayed at the top of the dialog in large font.

Parameters:

main – Main message of the dialog.

setRemember(action: str, file: str = '') TaskDialog

Configure the dialog to remember user-choice.

setTitle(title: str) TaskDialog

Set the title of the dialog.

Parameters:

title – Title of the dialog.

setWidth(width: int) None

Set the width of the dialog.

Parameters:

width – Width of the dialog.

class mobase.widgets.TaskDialogButton(text: str, description: str, button: PyQt6.QtWidgets.QMessageBox.StandardButton)
class mobase.widgets.TaskDialogButton(text: str, button: PyQt6.QtWidgets.QMessageBox.StandardButton)

Special button to be used inside TaskDialog widgets.

property button: PyQt6.QtWidgets.QMessageBox.StandardButton
property description: str
property text: str
mobase.widgets.__version__ = '2.5.2'