QRemoteObjectHost Class
A (Host) Node on a Qt Remote Objects network. 更多...
头文件: | #include <QRemoteObjectHost> |
qmake: | QT += remoteobjects |
基类: | QRemoteObjectHostBase |
公有函数
QRemoteObjectHost(QObject *parent = nullptr) | |
QRemoteObjectHost(const QUrl &address, const QUrl ®istryAddress = QUrl(), QObject *parent = nullptr) | |
QRemoteObjectHost(const QUrl &address, QObject *parent) | |
virtual | ~QRemoteObjectHost() |
重新实现的公有函数
virtual QUrl | hostUrl() const override |
virtual bool | setHostUrl(const QUrl &hostAddress) override |
- 5 个公有函数继承自 QRemoteObjectHostBase
- 14 个公有函数继承自 QRemoteObjectNode
- 32 个公有函数继承自 QObject
其他继承的成员
- 1 个属性继承自 QRemoteObjectNode
- 1 个属性继承自 QObject
- 1 个公有槽函数继承自 QObject
- 3 个信号继承自 QRemoteObjectNode
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
A (Host) Node on a Qt Remote Objects network.
The QRemoteObjectHost class provides an entry point to a QtRemoteObjects network. A network can be as simple as two nodes, or an arbitrarily complex set of processes and devices.
QRemoteObjectHosts have the same capabilities as QRemoteObjectNodes, but they can also be connected to and can share source objects on the network.
Nodes may connect to each other directly using connectToNode, or they can use the QRemoteObjectRegistry to simplify connections.
The QRemoteObjectRegistry is a special replica available to every node that connects to the uegistry Url. It knows how to connect to every QRemoteObjectSource object on the network.
参见 QRemoteObjectNode and QRemoteObjectRegistryHost.
成员函数
QRemoteObjectHost::QRemoteObjectHost(QObject *parent = nullptr)
Constructs a new QRemoteObjectHost Node (i.e., a Node that supports exposing Source objects on the QtRO network) with the given parent. This constructor is meant specific to support QML in the future as it will not be available to connect to until setHostUrl() is called.
参见 setHostUrl() and setRegistryUrl().
QRemoteObjectHost::QRemoteObjectHost(const QUrl &address, const QUrl ®istryAddress = QUrl(), QObject *parent = nullptr)
Constructs a new QRemoteObjectHost Node (i.e., a Node that supports exposing Source objects on the QtRO network) with address address. If set, registryAddress will be used to connect to the QRemoteObjectRegistry at the provided address.
参见 setHostUrl() and setRegistryUrl().
QRemoteObjectHost::QRemoteObjectHost(const QUrl &address, QObject *parent)
Constructs a new QRemoteObjectHost Node (i.e., a Node that supports exposing Source objects on the QtRO network) with a url of address and the given parent. This overload is provided as a convenience for specifying a QObject parent without providing a registry address.
参见 setHostUrl() and setRegistryUrl().
[virtual]
QRemoteObjectHost::~QRemoteObjectHost()
Destroys the instance of QRemoteObjectHost. The destructor is virtual.
[override virtual]
QUrl QRemoteObjectHost::hostUrl() const
Returns the host address for the QRemoteObjectNode as a QUrl. If the Node is not a Host node, it return an empty QUrl.
参见 setHostUrl().
[override virtual]
bool QRemoteObjectHost::setHostUrl(const QUrl &hostAddress)
Sets the hostAddress for a host QRemoteObjectNode.
Returns true
if the Host address is set, otherwise false
.
参见 hostUrl().