"""
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 enum
import typing
import PyQt6.sip
from PyQt6 import QtQml
from PyQt6 import QtGui
from PyQt6 import QtCore
from PyQt6.QtQuick import *
import enum


class QQuickView(QQuickWindow):
    """
    https://doc.qt.io/qt-6/qquickview.html

    **Detailed Description**

    This is a convenience subclass of **QQuickWindow**  which will automatically
    load and display a QML scene when given the URL of the main source file.
    Alternatively, you can instantiate your own objects using **QQmlComponent**
    and place them in a manually setup **QQuickWindow** .

    Typical usage:

    int main(int argc, char *argv[])
        {
            **QGuiApplication**
    app(argc, argv);

            **QQuickView**  *view = new **QQuickView** ;
    view->setSource(**QUrl** ::fromLocalFile("myqmlfile.qml"));
    view->show();
            return app.exec();
        }

    To receive errors related to loading and executing QML with QQuickView, you
    can connect to the **statusChanged** () signal and monitor for
    **QQuickView::Error** . The errors are available via **QQuickView::errors**
    ().

    QQuickView also manages sizing of the view and root object. By default, the
    **resizeMode**  is **SizeViewToRootObject** , which will load the component
    and resize it to the size of the view. Alternatively the **resizeMode**  may
    be set to **SizeRootObjectToView**  which will resize the view to the size
    of the root object.

    **See also** **Exposing Attributes of C++ Types to QML**  and
    **QQuickWidget** .
    """

    class Status(enum.Enum):
        Null: QQuickView = ...
        Ready: QQuickView = ...
        Loading: QQuickView = ...
        Error: QQuickView = ...

    class ResizeMode(enum.Enum):
        SizeViewToRootObject: QQuickView = ...
        SizeRootObjectToView: QQuickView = ...

    @typing.overload
    def __init__(self, parent: typing.Optional[QtGui.QWindow] = ...) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#QQuickView

        **QQuickView::QQuickView(QWindow * parent = nullptr)**

        Constructs a QQuickView with the given **parent**. The default value of
        **parent** is 0.
        """
        ...

    @typing.overload
    def __init__(self, engine: QtQml.QQmlEngine, parent: QtGui.QWindow) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#QQuickView-1

        **QQuickView::QQuickView(QQmlEngine * engine , QWindow * parent )**

        Constructs a QQuickView with the given QML **engine** and **parent**.

        Note: In this case, the QQuickView does not own the given **engine**
        object; it is the caller's responsibility to destroy the engine. If the
        **engine** is deleted before the view, **status** () will return
        **QQuickView::Error** .

        **See also** **Status** , **status** (), and **errors** ().
        """
        ...

    @typing.overload
    def __init__(
        self, source: QtCore.QUrl, parent: typing.Optional[QtGui.QWindow] = ...
    ) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#QQuickView-2

        **QQuickView::QQuickView(const QUrl & source , QWindow * parent =
        nullptr)**

        Constructs a QQuickView with the given QML **source** and **parent**.
        The default value of **parent** is 0.
        """
        ...

    def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#mouseMoveEvent

        **[override virtual protected] void
        QQuickView::mouseMoveEvent(QMouseEvent * e )**

        Reimplements: **QQuickWindow::mouseMoveEvent** (QMouseEvent *event).
        """
        ...

    def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#mouseReleaseEvent

        **[override virtual protected] void
        QQuickView::mouseReleaseEvent(QMouseEvent * e )**

        Reimplements: **QQuickWindow::mouseReleaseEvent** (QMouseEvent *event).
        """
        ...

    def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#mousePressEvent

        **[override virtual protected] void
        QQuickView::mousePressEvent(QMouseEvent * e )**

        Reimplements: **QQuickWindow::mousePressEvent** (QMouseEvent *event).
        """
        ...

    def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#keyReleaseEvent

        **[override virtual protected] void
        QQuickView::keyReleaseEvent(QKeyEvent * e )**

        Reimplements: **QQuickWindow::keyReleaseEvent** (QKeyEvent *e).
        """
        ...

    def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#keyPressEvent

        **[override virtual protected] void QQuickView::keyPressEvent(QKeyEvent
        * e )**

        Reimplements: **QQuickWindow::keyPressEvent** (QKeyEvent *e).
        """
        ...

    def timerEvent(self, a0: QtCore.QTimerEvent) -> None:
        ...

    def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:
        ...

    def setInitialProperties(
        self, initialProperties: typing.Dict[str, typing.Any]
    ) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#setInitialProperties

        **[slot, since 5.14] void QQuickView::setInitialProperties(const
        QVariantMap & initialProperties )**

        Sets the initial properties **initialProperties** with which the QML
        component gets initialized after calling **QQuickView::setSource** ().

        **QScopedPointer** <**QQuickView** > view { new **QQuickView**  };
        view->setInitialProperties({"x, 100"}, {"width", 50});
        view->setSource(**QUrl** ::fromLocalFile("myqmlfile.qml"));
        view->show();

        **Note:** You can only use this function to initialize top-level
        properties.

        **Note:** This function should always be called before **setSource** ,
        as it has no effect once the component has become `Ready`.

        This function was introduced in Qt 5.14.

        **See also** **QQmlComponent::createWithInitialProperties** ().
        """
        ...

    def setSource(self, a0: QtCore.QUrl) -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#setSource

        **[slot] void QQuickView::setSource(const QUrl & url )**

        Sets the source to the **url** , loads the QML component and
        instantiates it.

        Ensure that the URL provided is full and correct, in particular, use
        **QUrl::fromLocalFile** () when loading a file from the local
        filesystem.

        Calling this method multiple times with the same url will result in the
        QML component being reinstantiated.

        **Note:** Setter function for property **source** .

        **See also** **source** ().
        """
        ...

    def initialSize(self) -> QtCore.QSize:
        """
        https://doc.qt.io/qt-6/qquickview.html#initialSize

        **QSize QQuickView::initialSize() const**

        Returns the initial size of the root object.

        If **resizeMode**  is QQuickItem::SizeRootObjectToView the root object
        will be resized to the size of the view. initialSize contains the size
        of the root object before it was resized.
        """
        ...

    def errors(self) -> typing.List[QtQml.QQmlError]:
        """
        https://doc.qt.io/qt-6/qquickview.html#errors

        **QList<QQmlError> QQuickView::errors() const**

        Return the list of errors that occurred during the last compile or
        create operation. When the status is not Error, an empty list is
        returned.
        """
        ...

    def status(self) -> "QQuickView.Status":
        """
        https://doc.qt.io/qt-6/qquickview.html#status-prop

        **[read-only] status : const Status**

        The component's current **status** .

        **Access functions:**

        QQuickView::Status **status** () const

        **Notifier signal:**

        void ****statusChanged** ** (QQuickView::Status **status** )

        **Member Function Documentation**
        """
        ...

    def setResizeMode(self, a0: "QQuickView.ResizeMode") -> None:
        """
        https://doc.qt.io/qt-6/qquickview.html#resizeMode-prop

        **resizeMode : ResizeMode**

        This property holds whether the view should resize the window contents

        If this property is set to **SizeViewToRootObject**  (the default), the
        view resizes to the size of the root item in the QML.

        If this property is set to **SizeRootObjectToView** , the view will
        automatically resize the root item to the size of the view.

        **Access functions:**

        QQuickView::ResizeMode **resizeMode** () const
        void **setResizeMode**
        (QQuickView::ResizeMode)

        **See also** **initialSize** ().
        """
        ...

    def resizeMode(self) -> "QQuickView.ResizeMode":
        """
        https://doc.qt.io/qt-6/qquickview.html#resizeMode-prop

        **resizeMode : ResizeMode**

        This property holds whether the view should resize the window contents

        If this property is set to **SizeViewToRootObject**  (the default), the
        view resizes to the size of the root item in the QML.

        If this property is set to **SizeRootObjectToView** , the view will
        automatically resize the root item to the size of the view.

        **Access functions:**

        QQuickView::ResizeMode **resizeMode** () const
        void **setResizeMode**
        (QQuickView::ResizeMode)

        **See also** **initialSize** ().
        """
        ...

    def rootObject(self) -> QQuickItem:
        """
        https://doc.qt.io/qt-6/qquickview.html#rootObject

        **QQuickItem *QQuickView::rootObject() const**

        Returns the view's root **item** .
        """
        ...

    def rootContext(self) -> QtQml.QQmlContext:
        """
        https://doc.qt.io/qt-6/qquickview.html#rootContext

        **QQmlContext *QQuickView::rootContext() const**

        This function returns the root of the context hierarchy. Each QML
        component is instantiated in a **QQmlContext** . **QQmlContext** 's are
        essential for passing data to QML components. In QML, contexts are
        arranged hierarchically and this hierarchy is managed by the
        **QQmlEngine** .
        """
        ...

    def engine(self) -> QtQml.QQmlEngine:
        """
        https://doc.qt.io/qt-6/qquickview.html#engine

        **QQmlEngine *QQuickView::engine() const**

        Returns a pointer to the **QQmlEngine**  used for instantiating QML
        Components.
        """
        ...

    def source(self) -> QtCore.QUrl:
        """
        https://doc.qt.io/qt-6/qquickview.html#source

        **QUrl QQuickView::source() const**

        Returns the source URL, if set.

        **Note:** Getter function for property source.

        **See also** **setSource** ().
        """
        ...

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

        **[signal] void QQuickView::statusChanged(QQuickView::Status status )**

        This signal is emitted when the component's current **status** changes.

        **Note:** Notifier signal for property **status** .
        """
        ...
