tik_manager4.ui.widgets.screenshot

Classes

ScreenShot

This module captures a selected area of the screen.

Functions

take_screen_area(file_path)

Initiates the screen capture process and returns the saved file path.

Module Contents

class ScreenShot(file_path)

Bases: tik_manager4.ui.Qt.QtWidgets.QDialog

This module captures a selected area of the screen.

Attributes:

file_path (str): The path where the screenshot will be saved. image_map (QPixmap): Stores the captured image. origin (QPoint): The starting point of the selection rectangle.

mouseMoveEvent(event)

Handles mouse movement to resize the selection area.

Args:

event (QMouseEvent): The mouse move event.

mousePressEvent(event)

Handles mouse press events to start the selection.

Args:

event (QMouseEvent): The mouse press event.

mouseReleaseEvent(event)

Handles mouse release events to finalize the screenshot.

Args:

event (QMouseEvent): The mouse release event.

paintEvent(event)

Handles painting the semi-transparent overlay and selection area.

Args:

event (QPaintEvent): The paint event.

take_screen_area(file_path)

Initiates the screen capture process and returns the saved file path.

Args:

file_path (str): The path where the screenshot will be saved.

Returns:

str or None: The file path if the screenshot is successfully taken, otherwise None.