"""
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.QtRemoteObjects, except for defaults which are replaced by "...".
"""
from typing import Any, Dict, List, Union, overload
import PySide6.QtCore
import PySide6.QtRemoteObjects

bytes = str


class QAbstractItemModelReplica(PySide6.QtCore.QAbstractItemModel):
    """
    https://doc.qt.io/qt-6/qabstractitemmodelreplica.html

    **Detailed Description**

    QAbstractItemModelReplica makes replicating QAbstractItemModels more
    efficient by employing caching and pre-fetching.

    **See also** **QAbstractItemModel** .
    """

    def availableRoles(self) -> List[int]:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#availableRoles

        **QList<int> QAbstractItemModelReplica::availableRoles() const**

        Returns a list of available roles.

        **See also** **QAbstractItemModel** .
        """
        ...

    def columnCount(
        self,
        parent: Union[
            PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex
        ] = ...,
    ) -> int:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#columnCount

        **[override virtual] int QAbstractItemModelReplica::columnCount(const
        QModelIndex & parent = QModelIndex()) const**

        Reimplements: **QAbstractItemModel::columnCount(const QModelIndex
        &parent) const** .
        """
        ...

    def data(
        self,
        index: Union[PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex],
        role: int = ...,
    ) -> Any:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#data

        **[override virtual] QVariant QAbstractItemModelReplica::data(const
        QModelIndex & index , int role = Qt::DisplayRole) const**

        Reimplements: **QAbstractItemModel::data(const QModelIndex &index, int
        role) const** .

        Returns the **role** data for the item at **index** if available in
        cache. A default-constructed **QVariant**  is returned if the index is
        invalid, the role is not one of the available roles, the **Replica**  is
        uninitialized or the data was not available. If the data was not
        available in cache it will be requested from the **Source** .

        **See also** **QAbstractItemModel::data** (), **hasData** (),
        **setData** (), and **isInitialized** ().
        """
        ...

    def flags(
        self,
        index: Union[PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex],
    ) -> PySide6.QtCore.Qt.ItemFlags:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#flags

        **[override virtual] Qt::ItemFlags
        QAbstractItemModelReplica::flags(const QModelIndex & index ) const**

        Reimplements: **QAbstractItemModel::flags(const QModelIndex &index)
        const** .
        """
        ...

    def hasChildren(
        self,
        parent: Union[
            PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex
        ] = ...,
    ) -> bool:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#hasChildren

        **[override virtual] bool QAbstractItemModelReplica::hasChildren(const
        QModelIndex & parent = QModelIndex()) const**

        Reimplements: **QAbstractItemModel::hasChildren(const QModelIndex
        &parent) const** .
        """
        ...

    def hasData(
        self,
        index: Union[PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex],
        role: int,
    ) -> bool:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#hasData

        **bool QAbstractItemModelReplica::hasData(const QModelIndex & index ,
        int role ) const**

        Returns `true` if there exists **role** data for the item at **index**.
        Returns `false` in any other case.
        """
        ...

    def headerData(
        self, section: int, orientation: PySide6.QtCore.Qt.Orientation, role: int
    ) -> Any:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#headerData

        **[override virtual] QVariant QAbstractItemModelReplica::headerData(int
        section , Qt::Orientation orientation , int role ) const**

        Reimplements: **QAbstractItemModel::headerData(int section,
        Qt::Orientation orientation, int role) const** .

        Returns the data for the given **role** and **section** in the header
        with the specified **orientation**.

        If the data is not available it will be requested from the **Source** .

        **See also** **QAbstractItemModel::headerData** ().
        """
        ...

    def index(
        self,
        row: int,
        column: int,
        parent: Union[
            PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex
        ] = ...,
    ) -> PySide6.QtCore.QModelIndex:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#index

        **[override virtual] QModelIndex QAbstractItemModelReplica::index(int
        row , int column , const QModelIndex & parent = QModelIndex()) const**

        Reimplements: **QAbstractItemModel::index(int row, int column, const
        QModelIndex &parent) const** .
        """
        ...

    def isInitialized(self) -> bool:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#isInitialized

        **bool QAbstractItemModelReplica::isInitialized() const**

        Returns `true` if this replica has been initialized with data from the
        **Source**  object. Returns `false` otherwise.

        **See also** **initialized** ().
        """
        ...

    @overload
    def parent(self) -> PySide6.QtCore.QObject:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#parent

        **[override virtual] QModelIndex QAbstractItemModelReplica::parent(const
        QModelIndex & index ) const**

        Reimplements: **QAbstractItemModel::parent(const QModelIndex &index)
        const** .
        """
        ...

    @overload
    def parent(
        self,
        index: Union[PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex],
    ) -> PySide6.QtCore.QModelIndex:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#parent

        **[override virtual] QModelIndex QAbstractItemModelReplica::parent(const
        QModelIndex & index ) const**

        Reimplements: **QAbstractItemModel::parent(const QModelIndex &index)
        const** .
        """
        ...

    def roleNames(self) -> Dict[int, PySide6.QtCore.QByteArray]:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#roleNames

        **[override virtual] QHash<int, QByteArray>
        QAbstractItemModelReplica::roleNames() const**

        Reimplements: **QAbstractItemModel::roleNames() const** .
        """
        ...

    def rootCacheSize(self) -> int:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#rootCacheSize

        **size_t QAbstractItemModelReplica::rootCacheSize() const**

        Returns the current size of the internal cache. By default this is set
        to the value of the `QTRO_NODES_CACHE_SIZE` environment variable, or a
        default of `1000` if it is invalid or doesn't exist.

        **See also** **setRootCacheSize** ().
        """
        ...

    def rowCount(
        self,
        parent: Union[
            PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex
        ] = ...,
    ) -> int:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#rowCount

        **[override virtual] int QAbstractItemModelReplica::rowCount(const
        QModelIndex & parent = QModelIndex()) const**

        Reimplements: **QAbstractItemModel::rowCount(const QModelIndex &parent)
        const** .
        """
        ...

    def selectionModel(self) -> PySide6.QtCore.QItemSelectionModel:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#selectionModel

        **QItemSelectionModel *QAbstractItemModelReplica::selectionModel()
        const**

        Returns a pointer to the **QItemSelectionModel**  for the current
        **QAbstractItemModelReplica** .
        """
        ...

    def setData(
        self,
        index: Union[PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex],
        value: Any,
        role: int = ...,
    ) -> bool:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#setData

        **[override virtual] bool QAbstractItemModelReplica::setData(const
        QModelIndex & index , const QVariant & value , int role =
        Qt::EditRole)**

        Reimplements: **QAbstractItemModel::setData** (const QModelIndex &index,
        const QVariant &value, int role).

        **See also** **data** ().
        """
        ...

    def setRootCacheSize(self, rootCacheSize: int) -> None:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#setRootCacheSize

        **void QAbstractItemModelReplica::setRootCacheSize(size_t rootCacheSize
        )**

        Sets the size of the internal cache to **rootCacheSize**.

        **See also** **rootCacheSize** ().
        """
        ...

    @property
    def initialized(self) -> PySide6.QtCore.SignalInstance:
        """
        https://doc.qt.io/qt-6/qabstractitemmodelreplica.html#initialized

        **[signal] void QAbstractItemModelReplica::initialized()**

        The initialized signal is emitted the first time we receive data from
        the **Source** .

        **See also** **isInitialized** ().
        """
        ...
