Qt Remote Objects 網絡 (主機) 節點。 更多...
| 頭: | #include <QRemoteObjectHost> |
| qmake: | QT += remoteobjects |
| 繼承: | QRemoteObjectHostBase |
| QRemoteObjectHost (QObject * parent = nullptr) | |
| QRemoteObjectHost (const QUrl & address , const QUrl & registryAddress = QUrl(), QObject * parent = nullptr) | |
| QRemoteObjectHost (const QUrl & address , QObject * parent ) | |
| virtual | ~QRemoteObjectHost () |
| virtual QUrl | hostUrl () const override |
| virtual bool | setHostUrl (const QUrl & hostAddress ) override |
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 Source 對象在 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 () 和 setRegistryUrl ().
構造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing Source 對象在 QtRO 網絡) 采用地址 address 。若有設置, registryAddress 將用於連接到 QRemoteObjectRegistry at the provided address.
另請參閱 setHostUrl () 和 setRegistryUrl ().
構造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing Source 對象在 QtRO 網絡) 采用 URL address 和給定 parent 。提供此重載是為方便指定 QObject 父級不用提供注冊地址。
另請參閱 setHostUrl () 和 setRegistryUrl ().
[虛擬]
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 ().
[override virtual]
bool
QRemoteObjectHost::
setHostUrl
(const
QUrl
&
hostAddress
)
設置 hostAddress 為主機 QRemoteObjectNode .
返迴
true
若有設置 Host (主機) 地址,否則
false
.
另請參閱 hostUrl ().