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

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

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