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

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