-
Notifications
You must be signed in to change notification settings - Fork 0
progress_dialog
version: v1.0.3
A cancellable, optionally nested progress dialog, reporting on a compatible process ran by a QObject-subclass on a separate thread.
class _Threaded(QObject) [src]
An example, progress dialog compatible class. Worker objects of simple (not nested) PDs do not need sub-signals.
Signals:
- sig_new_process_unit: A signal carrying a string identifier of the new main process unit.
- sig_new_subprocess_unit: A signal carrying a string identifier of the new subprocess unit.
- sig_main_progress: A signal carrying the progress (integer percentage) of the main process.
- sig_sub_progress: A signal carrying the progress (integer percentage) of the subprocess.
- sig_finished: The signal emitted when the process finishes.
- sig_start: The signal that starts the process execution.
- sig_cancel: A signal for external cancellation of the process execution.
[src]
def __init__(self, nested=False) -> NoneInitializer for the class.
Parameters:
- nested: A flag marking whether the progress dialog should be nested. The default is False.
[src]
@property
def nested(self) -> boolReturns whether the associated progress dialog is nested.
[src]
@Slot()
def _process(self) -> NoneThe slot connected to the start signal. Emits sig_finished when the process finishes.
[src]
@Slot()
def _cancel_process(self) -> NoneThe slot connected to the cancel signal. Needs the button press event to be processed beforehand.
class _ProgressMixin [src]
A window reporting on the progress of a process running on a separate thread.
[src]
def __init__(self, worker, title, widget_theme=None) -> NoneInitializer for the class.
Parameters:
- worker: A worker subclassing QObject, handling a process.
- title: The title to set for the window.
- widget_theme: A widget theme from the 'theme' module. The default is None, for the Qt-default theme.
[src]
def _setup_ui(self) -> NoneSets up the user interface: GUI objects and layouts.
[src]
def _setup_connections(self) -> NoneSets up the connections of the GUI objects.
[src]
@property
def theme(self) -> ThemeParametersReturns the parameters of the theme set for this object.
[src]
@theme.setter
def theme(self, new_theme: ThemeParameters) -> NoneSets a new set of parameters defining a theme to this object.
[src]
def _create_worker_thread(self) -> NoneCreates a new thread and moves the worker there.
[src]
def _quit_thread(self) -> NoneCloses the thread after the worker has finished.
[src]
def _cancel_process(self) -> NoneAsks for confirmation to cancel the process.
class ProgressDialog(_ProgressMixin, QDialog) [src]
A dialog reporting on the progress of a process running on a separate thread.
[src]
def __init__(self, worker: QObject, title="Progress report", widget_theme=None) -> NoneInitializer for the class.
Parameters:
- worker: A worker subclassing QObject, handling a process.
- title: The title to set for the dialog. The default is "Progress report".
- widget_theme: A widget theme from the 'theme' module. The default is None, for the Qt-default theme.
class ProgressDW(_ProgressMixin, QDockWidget) [src]
A dock widget reporting on the progress of a process running on a separate thread.
[src]
def __init__(self, worker: QObject, title="Progress report", widget_theme=None) -> NoneInitializer for the class.
Parameters:
- worker: A worker subclassing QObject, handling a process.
- title: The title to set for the dialog. The default is "Progress report".
- widget_theme: A widget theme from the 'theme' module. The default is None, for the Qt-default theme.