1 | // Copyright (C) 2018 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include <private/opcuanodeidtype_p.h> |
5 | |
6 | QT_BEGIN_NAMESPACE |
7 | |
8 | /*! |
9 | \qmltype OpcUaNodeIdType |
10 | \inqmlmodule QtOpcUa |
11 | \brief Common base class for all node IDs. |
12 | \internal |
13 | |
14 | This base class provides common functions for node ID related classes. |
15 | It is not supposed to be used from QML directly. |
16 | |
17 | \sa NodeId, RelativeNodeId |
18 | */ |
19 | |
20 | OpcUaNodeIdType::OpcUaNodeIdType(QObject *parent) : QObject(parent) |
21 | { |
22 | connect(sender: &m_universalNode, SIGNAL(namespaceNameChanged(const QString &)), receiver: this, SIGNAL(nodeNamespaceChanged(const QString &))); |
23 | connect(sender: &m_universalNode, SIGNAL(nodeIdentifierChanged(const QString &)), receiver: this, SIGNAL(identifierChanged(const QString &))); |
24 | connect(sender: &m_universalNode, SIGNAL(namespaceNameChanged(const QString &)), receiver: this, SIGNAL(nodeChanged())); |
25 | connect(sender: &m_universalNode, SIGNAL(nodeIdentifierChanged(const QString &)), receiver: this, SIGNAL(nodeChanged())); |
26 | } |
27 | |
28 | void OpcUaNodeIdType::setNodeNamespace(const QString &name) |
29 | { |
30 | m_universalNode.setNamespace(name); |
31 | } |
32 | |
33 | const QString &OpcUaNodeIdType::nodeNamespace() const |
34 | { |
35 | return m_universalNode.namespaceName(); |
36 | } |
37 | |
38 | void OpcUaNodeIdType::setIdentifier(const QString &name) |
39 | { |
40 | m_universalNode.setNodeIdentifier(name); |
41 | } |
42 | |
43 | void OpcUaNodeIdType::from(const OpcUaNodeIdType &other) |
44 | { |
45 | m_universalNode.from(other); |
46 | } |
47 | |
48 | void OpcUaNodeIdType::from(const UniversalNode &other) |
49 | { |
50 | m_universalNode.from(other); |
51 | } |
52 | |
53 | const QString &OpcUaNodeIdType::identifier() const |
54 | { |
55 | return m_universalNode.nodeIdentifier(); |
56 | } |
57 | |
58 | QString OpcUaNodeIdType::fullNodePath() const |
59 | { |
60 | return m_universalNode.fullNodeId(); |
61 | } |
62 | |
63 | QT_END_NAMESPACE |
64 | |