"""
PySide stub files generated by **IceSpringPySideStubs**

Home: https://baijifeilong.github.io/2022/01/06/ice-spring-pyside-stubs/index.html

Github: https://github.com/baijifeilong/IceSpringPySideStubs

PyPI(PySide2): https://pypi.org/project/IceSpringPySideStubs-PySide2

PyPI(PySide6): https://pypi.org/project/IceSpringPySideStubs-PySide6

PyPI(PyQt5): https://pypi.org/project/IceSpringPySideStubs-PyQt5

Generated by BaiJiFeiLong@gmail.com

Licence: GPLv3
"""
"""
This file contains the exact signatures for all functions in module
PySide6.QtGui, except for defaults which are replaced by "...".
"""
from typing import Union, overload
import PySide6.QtCore
import PySide6.QtGui

bytes = str


class QPaintDeviceWindow(PySide6.QtGui.QWindow, PySide6.QtGui.QPaintDevice):
    """
    https://doc.qt.io/qt-6/qpaintdevicewindow.html

    **Detailed Description**

    QPaintDeviceWindow is like a regular **QWindow** , with the added
    functionality of being a paint device too. Whenever the content needs to be
    updated, the virtual **paintEvent** () function is called. Subclasses, that
    reimplement this function, can then simply open a **QPainter**  on the
    window.

    **Note:** This class cannot directly be used in applications. It rather
    serves as a base for subclasses like **QOpenGLWindow** .

    **See also** **QOpenGLWindow** .
    """

    def event(self, event: PySide6.QtCore.QEvent) -> bool:
        ...

    def exposeEvent(self, arg__1: PySide6.QtGui.QExposeEvent) -> None:
        ...

    def metric(self, metric: PySide6.QtGui.QPaintDevice.PaintDeviceMetric) -> int:
        ...

    def paintEngine(self) -> PySide6.QtGui.QPaintEngine:
        ...

    def paintEvent(self, event: PySide6.QtGui.QPaintEvent) -> None:
        """
        https://doc.qt.io/qt-6/qpaintdevicewindow.html#paintEvent

        **[override virtual protected] void
        QPaintDeviceWindow::paintEvent(QPaintEvent * event )**

        Reimplements: **QWindow::paintEvent** (QPaintEvent *ev).

        Handles paint events passed in the **event** parameter.

        The default implementation does nothing. Reimplement this function to
        perform painting. If necessary, the dirty area is retrievable from the
        **event**.
        """
        ...

    @overload
    def update(self) -> None:
        """
        https://doc.qt.io/qt-6/qpaintdevicewindow.html#update

        **void QPaintDeviceWindow::update(const QRect & rect )**

        Marks the **rect** of the window as dirty and schedules a repaint.

        **Note:** Subsequent calls to this function before the next paint event
        will get ignored, but **rect** is added to the region to update.

        **Note:** For non-exposed windows the update is deferred until the
        window becomes exposed again.
        """
        ...

    @overload
    def update(self, rect: PySide6.QtCore.QRect) -> None:
        """
        https://doc.qt.io/qt-6/qpaintdevicewindow.html#update-1

        **void QPaintDeviceWindow::update(const QRegion & region )**

        Marks the **region** of the window as dirty and schedules a repaint.

        **Note:** Subsequent calls to this function before the next paint event
        will get ignored, but **region** is added to the region to update.

        **Note:** For non-exposed windows the update is deferred until the
        window becomes exposed again.
        """
        ...

    @overload
    def update(
        self,
        region: Union[
            PySide6.QtGui.QRegion,
            PySide6.QtGui.QBitmap,
            PySide6.QtGui.QPolygon,
            PySide6.QtCore.QRect,
        ],
    ) -> None:
        """
        https://doc.qt.io/qt-6/qpaintdevicewindow.html#update-2

        **[slot] void QPaintDeviceWindow::update()**

        Marks the entire window as dirty and schedules a repaint.

        **Note:** Subsequent calls to this function before the next paint event
        will get ignored.

        **Note:** For non-exposed windows the update is deferred until the
        window becomes exposed again.
        """
        ...
