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/opcuanodeid_p.h>
5
6QT_BEGIN_NAMESPACE
7
8/*!
9 \qmltype NodeId
10 \inqmlmodule QtOpcUa
11 \brief Specifies a node by an identifier.
12 \since QtOpcUa 5.12
13
14 \code
15 import QtOpcUa as QtOpcUa
16
17 QtOpcUa.NodeId {
18 identifier: "s=Example.Node"
19 ns: "Example Namespace"
20 }
21 \endcode
22*/
23
24/*!
25 \qmlproperty string NodeId::ns
26
27 Namespace of the node identifier.
28 The identifier can be the index as a number or the name as string.
29 A string which can be converted to an integer is considered a namespace index.
30*/
31
32/*!
33 \qmlproperty string NodeId::identifier
34
35 Identifier of the node.
36 The identifier has to be given in one of the following types.
37
38 \table
39 \header
40 \li Type
41 \li Example
42 \row
43 \li Numeric
44 \li \c i=23
45 \row
46 \li String
47 \li \c s=MyStringIdentifier
48 \row
49 \li GUID
50 \li \c g=08081e75-8e5e-319b-954f-f3a7613dc29b
51 \row
52 \li Opaque (base64)
53 \li \c b=UXQgZnR3IQ==
54 \endtable
55
56 It is possible but not recommended to include the namespace index \c {ns=X;s=...}.
57 In this case the given namespace index is internally stripped off the identifier and set
58 to the namespace property.
59*/
60
61/*!
62 \qmlsignal NodeId::nodeChanged()
63
64 Emitted when the underlying node has changed.
65 This happens when the namespace or identifier has changed.
66*/
67
68OpcUaNodeId::OpcUaNodeId(QObject *parent)
69 : OpcUaNodeIdType(parent)
70{
71 connect(sender: this, signal: &OpcUaNodeIdType::nodeNamespaceChanged, context: this, slot: &OpcUaNodeId::nodeNamespaceChanged);
72 connect(sender: this, signal: &OpcUaNodeIdType::identifierChanged, context: this, slot: &OpcUaNodeId::identifierChanged);
73 connect(sender: this, signal: &OpcUaNodeIdType::nodeNamespaceChanged, context: this, slot: &OpcUaNodeId::nodeChanged);
74 connect(sender: this, signal: &OpcUaNodeIdType::identifierChanged, context: this, slot: &OpcUaNodeId::nodeChanged);
75}
76
77QT_END_NAMESPACE
78

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