"""
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

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

Generated by BaiJiFeiLong@gmail.com

License: MIT
"""
import PyQt6.sip
from PyQt6 import QtCore
from PyQt6.QtQuick import *


class QQuickImageResponse(QtCore.QObject):
    """
    https://doc.qt.io/qt-6/qquickimageresponse.html

    **Detailed Description**

    The purpose of an image response is to provide a way for image provider jobs
    to be executed in an asynchronous way.

    Responses are deleted via **deleteLater**  once the **finished** () signal
    has been emitted. If you are using **QRunnable**  as base for your
    QQuickImageResponse ensure automatic deletion is disabled.

    See the **Image Response Provider Example**  for a complete implementation.

    **See also** **QQuickImageProvider** .
    """

    def __init__(self) -> None:
        """
        https://doc.qt.io/qt-6/qquickimageresponse.html#QQuickImageResponse

        **QQuickImageResponse::QQuickImageResponse()**

        Constructs the image response
        """
        ...

    def cancel(self) -> None:
        """
        https://doc.qt.io/qt-6/qquickimageresponse.html#cancel

        **[virtual slot] void QQuickImageResponse::cancel()**

        This method is used to communicate that the response is no longer
        required by the engine.

        It may be reimplemented to cancel a request in the provider side,
        however, it is not mandatory.

        A cancelled **QQuickImageResponse**  still needs to emit **finished** ()
        so that the engine may clean up the **QQuickImageResponse** .

        **Note:****finished** () should not be emitted until the response is
        complete, regardless of whether or not cancel() was called. If it is
        called prematurely, the engine may destroy the response while it is
        still active, leading to a crash.
        """
        ...

    def errorString(self) -> str:
        """
        https://doc.qt.io/qt-6/qquickimageresponse.html#errorString

        **[virtual] QString QQuickImageResponse::errorString() const**

        Returns the error string for the job execution. An empty string means no
        error.
        """
        ...

    def textureFactory(self) -> QQuickTextureFactory:
        """
        https://doc.qt.io/qt-6/qquickimageresponse.html#textureFactory

        **[pure virtual] QQuickTextureFactory
        *QQuickImageResponse::textureFactory() const**

        Returns the texture factory for the job. You can use
        **QQuickTextureFactory::textureFactoryForImage**  if your provider works
        with **QImage** . The engine takes ownership of the returned
        **QQuickTextureFactory** .

        **Note:** This method will be called only when needed. For example, it
        may not be called if there is an error or the job is cancelled.
        Therefore, allocate the **QQuickTextureFactory**  instance only in this
        method or otherwise ensure its deletion.
        """
        ...

    @property
    def finished(self) -> PyQt6.QtCore.pyqtBoundSignal:
        """
        https://doc.qt.io/qt-6/qquickimageresponse.html#finished

        **[signal] void QQuickImageResponse::finished()**

        Signals that the job execution has finished (be it successfully, because
        an error happened or because it was cancelled).

        **Note:** Emission of this signal must be the final action the response
        performs: once the signal is received, the response will subsequently be
        destroyed by the engine.
        """
        ...
