GUIBRUSHR.GUI.WIDGET.MyPlot module¶
- class GUIBRUSHR.GUI.WIDGET.MyPlot.MyPlot(parent: Any, row: int, column: int, width: int, height: int, path_default: Path, columnspan: int = 2, rowspan: int = 1, **kwargs: Dict[str, Any])[source]¶
Bases:
FrameA custom plot widget that displays images in a Frame with blinking capability.
This class creates a plot display widget that can show images and supports blinking between two different images. It uses a Canvas widget for image display and can load additional data from pickle files for blinking functionality.
- width¶
Width of the plot display area
- Type:
int
- height¶
Height of the plot display area
- Type:
int
- image¶
The current image being displayed
- Type:
Optional[PhotoImage]
- image1¶
First image for blinking
- Type:
Optional[PhotoImage]
- image2¶
Second image for blinking
- Type:
Optional[PhotoImage]
- canvas¶
The Canvas widget for image display
- Type:
Canvas
- string1¶
Additional data loaded from first pickle file
- Type:
Optional[Any]
- string2¶
Additional data loaded from second pickle file
- Type:
Optional[Any]
- __init__(parent: Any, row: int, column: int, width: int, height: int, path_default: Path, columnspan: int = 2, rowspan: int = 1, **kwargs: Dict[str, Any]) None[source]¶
Initialize the MyPlot widget.
- Parameters:
parent – The parent widget
row – Row position in the parent’s grid
column – Column position in the parent’s grid
width – Width of the plot display area
height – Height of the plot display area
path_default – Base path for finding the test image file
columnspan – Number of columns the widget should span
rowspan – Number of rows the widget should span
**kwargs – Additional keyword arguments passed to the Frame widget
- blink_preparation(path1: str, path2: str, path_pkl1: str, path_pkl2: str) None[source]¶
Prepare images and data for blinking functionality.
- Parameters:
path1 – Path to the first image file
path2 – Path to the second image file
path_pkl1 – Path to the first pickle file containing additional data
path_pkl2 – Path to the second pickle file containing additional data