PreviewWindow

class tat.preview_window.PreviewWindow(parent: Optional[PySide6.QtWidgets.QWidget])
__init__(self, parent: Optional[PySide6.QtWidgets.QWidget] = None, flags: PySide6.QtCore.Qt.WindowFlags = Default(Qt.WindowFlags)) None

Initialize self. See help(type(self)) for accurate signature.

add_source_image_entry(ime: tat.checkable_image_entry.CheckableImageEntry, index: Optional[int] = None) None

Add an image entry in the source area and _source_image_entries.

Parameters

index (int, optional) – if set, insert the image entry in _source_image_entries at the given index, otherwise append at the end.

change_all_entries_check_state(checked: bool) None

Set all image entries to the given check state.

Parameters

checked (bool) – Change all to this state.

clear_image_entries() None

Remove all the image entries in the source area. Clear _source_image_entries.

clear_preview_image() None

Replace the preview image with the text Preview and deselect image entry if any.

draw_preview_image(image: PySide6.QtGui.QImage) None

Draw the given image in the preview area.

get_selected_entries() List[tat.checkable_image_entry.CheckableImageEntry]

Return a list of checked image entries.

Return type

list of CheckableImageEntry

abstract image_preview() PySide6.QtWidgets.QLabel

Override this method to return the image preview QLabel.

Return type

QLabel

resizeEvent(self, event: PySide6.QtGui.QResizeEvent) None
select_deselect() None

If all images are not checked, check them all, otherwise uncheck all.

set_preview_image(image: PySide6.QtGui.QImage, image_entry: tat.image_entry.ImageEntry) None

Set the given image entry as selected and draw the corresponding image.

Return type

object

abstract source_layout() PySide6.QtWidgets.QLayout

Override this method to return the source area container layout.

Return type

QLayout