PreviewInterface
- class scripts.train.PreviewInterface(use_preview: bool)
Bases:
objectRun the preview window in a thread and interface with it
- Parameters:
use_preview (bool) –
Trueif pop-up preview window has been requested otherwiseFalse
Attributes Summary
The thread save preview image object
Check whether an exit request has been made.
Check whether the preview should be updated and return the value.
Check whether a save request has been made.
Check whether the mask should be toggled and return the value.
Methods Summary
shutdown()Send a signal to shutdown the preview window.
Attributes Documentation
- buffer
The thread save preview image object
- should_quit
Check whether an exit request has been made.
Trueif an exit request has been made otherwiseFalse.- Raises:
Error – Re-raises any error within the preview thread
- should_refresh
Check whether the preview should be updated and return the value. If
Trueis returned then resets the refresh trigger back toFalse
- should_save
Check whether a save request has been made. If
Trueis returned then save trigger is set back toFalse
- should_toggle_mask
Check whether the mask should be toggled and return the value. If
Trueis returned then resets mask toggle back toFalse
Methods Documentation
- shutdown() None
Send a signal to shutdown the preview window.
- Return type:
None
- property buffer: PreviewBuffer
The thread save preview image object
- property should_quit: bool
Check whether an exit request has been made.
Trueif an exit request has been made otherwiseFalse.- Raises:
Error – Re-raises any error within the preview thread
- property should_refresh: bool
Check whether the preview should be updated and return the value. If
Trueis returned then resets the refresh trigger back toFalse
- property should_save: bool
Check whether a save request has been made. If
Trueis returned then save trigger is set back toFalse
- property should_toggle_mask: bool
Check whether the mask should be toggled and return the value. If
Trueis returned then resets mask toggle back toFalse
- shutdown() None
Send a signal to shutdown the preview window.
- Return type:
None