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
6QT_BEGIN_NAMESPACE
7
8/*!
9 \qmltype OpcUaNodeIdType
10 \inqmlmodule QtOpcUa
11 \brief Common base class for all node IDs.
12 \deprecated [6.9]
13 \internal
14
15 This base class provides common functions for node ID related classes.
16 It is not supposed to be used from QML directly.
17
18 \sa NodeId, RelativeNodeId
19*/
20
21OpcUaNodeIdType::OpcUaNodeIdType(QObject *parent) : QObject(parent)
22{
23 connect(sender: &m_universalNode, SIGNAL(namespaceNameChanged(QString)),
24 receiver: this, SIGNAL(nodeNamespaceChanged(QString)));
25 connect(sender: &m_universalNode, SIGNAL(nodeIdentifierChanged(QString)),
26 receiver: this, SIGNAL(identifierChanged(QString)));
27 connect(sender: &m_universalNode, SIGNAL(namespaceNameChanged(QString)),
28 receiver: this, SIGNAL(nodeChanged()));
29 connect(sender: &m_universalNode, SIGNAL(nodeIdentifierChanged(QString)),
30 receiver: this, SIGNAL(nodeChanged()));
31}
32
33void OpcUaNodeIdType::setNodeNamespace(const QString &name)
34{
35 m_universalNode.setNamespace(name);
36}
37
38const QString &OpcUaNodeIdType::nodeNamespace() const
39{
40 return m_universalNode.namespaceName();
41}
42
43void OpcUaNodeIdType::setIdentifier(const QString &name)
44{
45 m_universalNode.setNodeIdentifier(name);
46}
47
48void OpcUaNodeIdType::from(const OpcUaNodeIdType &other)
49{
50 m_universalNode.from(other);
51}
52
53void OpcUaNodeIdType::from(const UniversalNode &other)
54{
55 m_universalNode.from(other);
56}
57
58const QString &OpcUaNodeIdType::identifier() const
59{
60 return m_universalNode.nodeIdentifier();
61}
62
63QString OpcUaNodeIdType::fullNodePath() const
64{
65 return m_universalNode.fullNodeId();
66}
67
68QT_END_NAMESPACE
69

source code of qtopcua/src/declarative_opcua/opcuanodeidtype.cpp