Qt Remote Objects 网络 (主机) 节点。 更多...
| 头: | #include <QRemoteObjectHost> | 
| qmake: | QT += remoteobjects | 
| 继承: | QRemoteObjectHostBase | 
| QRemoteObjectHost (QObject * parent = nullptr) | |
| QRemoteObjectHost (const QUrl & address , const QUrl & registryAddress = QUrl(), QRemoteObjectHostBase::AllowedSchemas allowedSchemas = BuiltInSchemasOnly, QObject * parent = nullptr) | |
| QRemoteObjectHost (const QUrl & address , QObject * parent ) | |
| virtual | ~QRemoteObjectHost () override | 
| virtual QUrl | hostUrl () const override | 
| virtual bool | setHostUrl (const QUrl & hostAddress , QRemoteObjectHostBase::AllowedSchemas allowedSchemas = BuiltInSchemasOnly) override | 
| const QMetaObject | staticMetaObject | 
Qt Remote Objects 网络 (主机) 节点。
The QRemoteObjectHost class provides an entry point to a QtRemoteObjects 网络。网络可以简单到 2 节点 (或任意复杂的一组进程和设备)。
QRemoteObjectHosts 拥有如 QRemoteObjectNodes 的相同能力,但它们还可以连接到网络源对象并共享网络源对象。
节点可以相互直接连接使用 connectToNode ,或者它们可以使用 QRemoteObjectRegistry 以简化连接。
The QRemoteObjectRegistry 是可用于连接到注册 URL (统一资源定位符) 的各节点的特殊 Replica (复本)。它知道如何连接到网络中的各 QRemoteObjectSource 对象。
另请参阅 QRemoteObjectNode and QRemoteObjectRegistryHost .
构造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing 源 对象在 QtRO 网络) 采用给定 parent . This constructor is meant specific to support QML in the future as it will not be available to connect to until setHostUrl () 被调用。
另请参阅 setHostUrl , (), and setRegistryUrl ().
构造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing 源 对象在 QtRO 网络) 采用地址 address 。若设置, registryAddress 将用于连接到 QRemoteObjectRegistry at the provided address. The allowedSchemas parameter is only needed (and should be set to AllowExternalRegistration ) 若 URL 模式应该被用作 外部模式 by the registry.
另请参阅 setHostUrl , (), and setRegistryUrl ().
构造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing 源 对象在 QtRO 网络) 采用 URL address 和给定 parent 。提供此重载是为方便指定 QObject 父级不用提供注册地址。
另请参阅 setHostUrl () 和 setRegistryUrl ().
[override virtual]
						
						QRemoteObjectHost::
						
							~QRemoteObjectHost
						
						()
						
					Destroys the instance of QRemoteObjectHost. The destructor is virtual.
[override virtual]
						
						
							
								QUrl
							
						
						QRemoteObjectHost::
						
							hostUrl
						
						() const
						
					返回主机地址为 QRemoteObjectNode 作为 QUrl . If the Node is not a Host node, it return an empty QUrl .
另请参阅 setHostUrl and ().
[override virtual]
						
						
							bool
						
						QRemoteObjectHost::
						
							setHostUrl
						
						(const
						
							
								QUrl
							
						
						&
						
							hostAddress
						
						,
						
							
								QRemoteObjectHostBase::AllowedSchemas
							
						
						
							allowedSchemas
						
						= BuiltInSchemasOnly)
						
					设置 hostAddress 为主机 QRemoteObjectNode .
						返回
						
true
						
						若有设置 Host (主机) 地址,否则
						
false
						
						.
					
The allowedSchemas parameter is only needed (and should be set to AllowExternalRegistration ) 若 URL 模式应该被用作 外部模式 by the registry.
另请参阅 hostUrl ().