QtRemoteObjects.pyi 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. # The PEP 484 type hints stub file for the QtRemoteObjects module.
  2. #
  3. # Generated by SIP 6.15.3
  4. #
  5. # Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. #
  7. # This file is part of PyQt6.
  8. #
  9. # This file may be used under the terms of the GNU General Public License
  10. # version 3.0 as published by the Free Software Foundation and appearing in
  11. # the file LICENSE included in the packaging of this file. Please review the
  12. # following information to ensure the GNU General Public License version 3.0
  13. # requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. #
  15. # If you do not wish to use this file under the terms of the GPL version 3.0
  16. # then you may purchase a commercial license. For more information contact
  17. # info@riverbankcomputing.com.
  18. #
  19. # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. import collections, re, typing, enum
  22. try:
  23. from warnings import deprecated
  24. except ImportError:
  25. pass
  26. import PyQt6.sip
  27. from PyQt6 import QtCore
  28. from PyQt6 import QtNetwork
  29. # Support for QDate, QDateTime and QTime.
  30. import datetime
  31. # Convenient type aliases.
  32. PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
  33. PYQT_SLOT = typing.Union[collections.abc.Callable[..., Any], QtCore.pyqtBoundSignal]
  34. class QRemoteObjectSourceLocationInfo(PyQt6.sip.simplewrapper):
  35. hostUrl = ... # type: QtCore.QUrl
  36. typeName = ... # type: str|None
  37. @typing.overload
  38. def __init__(self) -> None: ...
  39. @typing.overload
  40. def __init__(self, typeName_: str|None, hostUrl_: QtCore.QUrl) -> None: ...
  41. @typing.overload
  42. def __init__(self, a0: 'QRemoteObjectSourceLocationInfo') -> None: ...
  43. def __ne__(self, other: object): ...
  44. def __eq__(self, other: object): ...
  45. class QtRemoteObjects(PyQt6.sip.simplewrapper):
  46. class InitialAction(enum.Enum):
  47. FetchRootSize = ... # type: QtRemoteObjects.InitialAction
  48. PrefetchData = ... # type: QtRemoteObjects.InitialAction
  49. class QAbstractItemModelReplica(QtCore.QAbstractItemModel):
  50. initialized: typing.ClassVar[QtCore.pyqtSignal]
  51. def setRootCacheSize(self, rootCacheSize: int) -> None: ...
  52. def rootCacheSize(self) -> int: ...
  53. def hasData(self, index: QtCore.QModelIndex, role: int) -> bool: ...
  54. def isInitialized(self) -> bool: ...
  55. def roleNames(self) -> dict[int, QtCore.QByteArray]: ...
  56. def availableRoles(self) -> list[int]: ...
  57. def flags(self, index: QtCore.QModelIndex) -> QtCore.Qt.ItemFlag: ...
  58. def headerData(self, section: int, orientation: QtCore.Qt.Orientation, role: int) -> typing.Any: ...
  59. def columnCount(self, parent: QtCore.QModelIndex = ...) -> int: ...
  60. def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ...
  61. def hasChildren(self, parent: QtCore.QModelIndex = ...) -> bool: ...
  62. def index(self, row: int, column: int, parent: QtCore.QModelIndex = ...) -> QtCore.QModelIndex: ...
  63. def parent(self, index: QtCore.QModelIndex) -> QtCore.QModelIndex: ...
  64. def setData(self, index: QtCore.QModelIndex, value: typing.Any, role: int = ...) -> bool: ...
  65. def data(self, index: QtCore.QModelIndex, role: int = ...) -> typing.Any: ...
  66. def selectionModel(self) -> QtCore.QItemSelectionModel|None: ...
  67. class QRemoteObjectReplica(QtCore.QObject):
  68. class State(enum.Enum):
  69. Uninitialized = ... # type: QRemoteObjectReplica.State
  70. Default = ... # type: QRemoteObjectReplica.State
  71. Valid = ... # type: QRemoteObjectReplica.State
  72. Suspect = ... # type: QRemoteObjectReplica.State
  73. SignatureMismatch = ... # type: QRemoteObjectReplica.State
  74. notified: typing.ClassVar[QtCore.pyqtSignal]
  75. stateChanged: typing.ClassVar[QtCore.pyqtSignal]
  76. initialized: typing.ClassVar[QtCore.pyqtSignal]
  77. def setNode(self, node: 'QRemoteObjectNode|None') -> None: ...
  78. def node(self) -> 'QRemoteObjectNode|None': ...
  79. def state(self) -> 'QRemoteObjectReplica.State': ...
  80. def isInitialized(self) -> bool: ...
  81. def waitForSource(self, timeout: int = ...) -> bool: ...
  82. def isReplicaValid(self) -> bool: ...
  83. class QRemoteObjectDynamicReplica(QRemoteObjectReplica): ...
  84. class QRemoteObjectAbstractPersistedStore(QtCore.QObject):
  85. def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
  86. def restoreProperties(self, repName: str|None, repSig: QtCore.QByteArray|bytes|bytearray|memoryview) -> list[typing.Any]: ...
  87. def saveProperties(self, repName: str|None, repSig: QtCore.QByteArray|bytes|bytearray|memoryview, values: collections.abc.Iterable[typing.Any]) -> None: ...
  88. class QRemoteObjectNode(QtCore.QObject):
  89. class ErrorCode(enum.Enum):
  90. NoError = ... # type: QRemoteObjectNode.ErrorCode
  91. RegistryNotAcquired = ... # type: QRemoteObjectNode.ErrorCode
  92. RegistryAlreadyHosted = ... # type: QRemoteObjectNode.ErrorCode
  93. NodeIsNoServer = ... # type: QRemoteObjectNode.ErrorCode
  94. ServerAlreadyCreated = ... # type: QRemoteObjectNode.ErrorCode
  95. UnintendedRegistryHosting = ... # type: QRemoteObjectNode.ErrorCode
  96. OperationNotValidOnClientNode = ... # type: QRemoteObjectNode.ErrorCode
  97. SourceNotRegistered = ... # type: QRemoteObjectNode.ErrorCode
  98. MissingObjectName = ... # type: QRemoteObjectNode.ErrorCode
  99. HostUrlInvalid = ... # type: QRemoteObjectNode.ErrorCode
  100. ProtocolMismatch = ... # type: QRemoteObjectNode.ErrorCode
  101. ListenFailed = ... # type: QRemoteObjectNode.ErrorCode
  102. SocketAccessError = ... # type: QRemoteObjectNode.ErrorCode
  103. @typing.overload
  104. def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
  105. @typing.overload
  106. def __init__(self, registryAddress: QtCore.QUrl, parent: QtCore.QObject|None = ...) -> None: ...
  107. def timerEvent(self, a0: QtCore.QTimerEvent|None) -> None: ...
  108. heartbeatIntervalChanged: typing.ClassVar[QtCore.pyqtSignal]
  109. error: typing.ClassVar[QtCore.pyqtSignal]
  110. remoteObjectRemoved: typing.ClassVar[QtCore.pyqtSignal]
  111. remoteObjectAdded: typing.ClassVar[QtCore.pyqtSignal]
  112. def setHeartbeatInterval(self, interval: int) -> None: ...
  113. def heartbeatInterval(self) -> int: ...
  114. def lastError(self) -> 'QRemoteObjectNode.ErrorCode': ...
  115. def setPersistedStore(self, persistedStore: QRemoteObjectAbstractPersistedStore|None) -> None: ...
  116. def persistedStore(self) -> QRemoteObjectAbstractPersistedStore|None: ...
  117. def registry(self) -> 'QRemoteObjectRegistry|None': ...
  118. def waitForRegistry(self, timeout: int = ...) -> bool: ...
  119. def setRegistryUrl(self, registryAddress: QtCore.QUrl) -> bool: ...
  120. def registryUrl(self) -> QtCore.QUrl: ...
  121. def acquireModel(self, name: str|None, action: QtRemoteObjects.InitialAction = ..., rolesHint: collections.abc.Iterable[int] = ...) -> QAbstractItemModelReplica|None: ...
  122. def acquireDynamic(self, name: str|None) -> QRemoteObjectDynamicReplica|None: ...
  123. def instances(self, typeName: str) -> list[str]: ...
  124. def setName(self, name: str|None) -> None: ...
  125. def addClientSideConnection(self, ioDevice: QtCore.QIODevice|None) -> None: ...
  126. def connectToNode(self, address: QtCore.QUrl) -> bool: ...
  127. class QRemoteObjectHostBase(QRemoteObjectNode):
  128. class AllowedSchemas(enum.Enum):
  129. BuiltInSchemasOnly = ... # type: QRemoteObjectHostBase.AllowedSchemas
  130. AllowExternalRegistration = ... # type: QRemoteObjectHostBase.AllowedSchemas
  131. def reverseProxy(self) -> bool: ...
  132. def proxy(self, registryUrl: QtCore.QUrl, hostUrl: QtCore.QUrl = ...) -> bool: ...
  133. def addHostSideConnection(self, ioDevice: QtCore.QIODevice|None) -> None: ...
  134. def disableRemoting(self, remoteObject: QtCore.QObject|None) -> bool: ...
  135. @typing.overload
  136. def enableRemoting(self, object: QtCore.QObject|None, name: str|None = ...) -> bool: ...
  137. @typing.overload
  138. def enableRemoting(self, model: QtCore.QAbstractItemModel|None, name: str|None, roles: collections.abc.Iterable[int], selectionModel: QtCore.QItemSelectionModel|None = ...) -> bool: ...
  139. def setName(self, name: str|None) -> None: ...
  140. class QRemoteObjectHost(QRemoteObjectHostBase):
  141. @typing.overload
  142. def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
  143. @typing.overload
  144. def __init__(self, address: QtCore.QUrl, registryAddress: QtCore.QUrl = ..., allowedSchemas: QRemoteObjectHostBase.AllowedSchemas = ..., parent: QtCore.QObject|None = ...) -> None: ...
  145. @typing.overload
  146. def __init__(self, address: QtCore.QUrl, parent: QtCore.QObject|None) -> None: ...
  147. @staticmethod
  148. def setLocalServerOptions(options: QtNetwork.QLocalServer.SocketOption) -> None: ...
  149. hostUrlChanged: typing.ClassVar[QtCore.pyqtSignal]
  150. def setHostUrl(self, hostAddress: QtCore.QUrl, allowedSchemas: QRemoteObjectHostBase.AllowedSchemas = ...) -> bool: ...
  151. def hostUrl(self) -> QtCore.QUrl: ...
  152. class QRemoteObjectRegistryHost(QRemoteObjectHostBase):
  153. def __init__(self, registryAddress: QtCore.QUrl = ..., parent: QtCore.QObject|None = ...) -> None: ...
  154. def setRegistryUrl(self, registryUrl: QtCore.QUrl) -> bool: ...
  155. class QRemoteObjectRegistry(QRemoteObjectReplica):
  156. remoteObjectRemoved: typing.ClassVar[QtCore.pyqtSignal]
  157. remoteObjectAdded: typing.ClassVar[QtCore.pyqtSignal]
  158. def sourceLocations(self) -> dict[str, QRemoteObjectSourceLocationInfo]: ...