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#pragma once
5
6#include <private/universalnode_p.h>
7
8#include <QObject>
9#include <QtQml/qqml.h>
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the Qt API. It exists purely as an
16// implementation detail. This header file may change from version to
17// version without notice, or even be removed.
18//
19// We mean it.
20//
21
22QT_BEGIN_NAMESPACE
23
24class OpcUaNodeIdType : public QObject
25{
26 Q_OBJECT
27
28 QML_NAMED_ELEMENT(NodeIdType)
29 QML_ADDED_IN_VERSION(5, 12)
30 QML_UNCREATABLE("The type 'NodeIdType' is not creatable. "
31 "Use 'NodeId' or 'RelativeNodeId' instead.")
32public:
33 /* These functions are not exposed to QML intentionally.
34 The reason is that some derived QML types have to prohibit access to some of these functions.
35 Exposing is done selectively in the derived classes.
36 */
37 explicit OpcUaNodeIdType(QObject *parent = nullptr);
38 void setNodeNamespace(const QString &);
39 const QString &nodeNamespace() const;
40 void setIdentifier(const QString &);
41 const QString &identifier() const;
42 QString fullNodePath() const;
43 void from(const OpcUaNodeIdType &);
44 void from(const UniversalNode &);
45
46signals:
47 void nodeNamespaceChanged(const QString &);
48 void identifierChanged(const QString &);
49 void nodeChanged();
50
51private:
52 UniversalNode m_universalNode;
53
54 friend class UniversalNode;
55};
56
57QT_END_NAMESPACE
58

source code of qtopcua/src/declarative_opcua/opcuanodeidtype_p.h