QRemoteObjectHost 類

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:: QRemoteObjectHost ( QObject * parent = nullptr)

構造新的 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 , (), and setRegistryUrl ().

QRemoteObjectHost:: QRemoteObjectHost (const QUrl & address , const QUrl & registryAddress = QUrl(), QRemoteObjectHostBase::AllowedSchemas allowedSchemas = BuiltInSchemasOnly, QObject * parent = nullptr)

構造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing Source 對象在 QtRO 網絡) 采用地址 address 。若有設置, registryAddress 將用於連接到 QRemoteObjectRegistry 按提供的地址。 allowedSchemas 參數纔需要 (且應被設為 AllowExternalRegistration ) 若 URL 模式應該被用作 外部模式 通過注冊。

另請參閱 setHostUrl , (), and setRegistryUrl ().

QRemoteObjectHost:: QRemoteObjectHost (const QUrl & address , QObject * parent )

構造新的 QRemoteObjectHost Node (i.e., a Node that supports exposing Source 對象在 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 參數纔需要 (且應被設為 AllowExternalRegistration ) 若 URL 模式應該被用作 外部模式 通過注冊。

另請參閱 hostUrl ().