1// Copyright (C) 2021 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 OPCUAREADITEM_P_H
5#define OPCUAREADITEM_P_H
6
7#include <QObject>
8#include <QtCore/qshareddata.h>
9#include "qopcuatype.h"
10
11#include <QtQml/qqml.h>
12#include <QtCore/private/qglobal_p.h>
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
25QT_BEGIN_NAMESPACE
26
27class OpcUaReadItemData;
28class OpcUaReadItem
29{
30 Q_GADGET
31 Q_PROPERTY(QOpcUa::NodeAttribute attribute READ attribute WRITE setAttribute)
32 Q_PROPERTY(QString indexRange READ indexRange WRITE setIndexRange)
33 Q_PROPERTY(QString nodeId READ nodeId WRITE setNodeId)
34 Q_PROPERTY(QVariant ns READ namespaceIdentifier WRITE setNamespaceIdentifier)
35
36public:
37 OpcUaReadItem();
38 OpcUaReadItem(const OpcUaReadItem &other);
39 OpcUaReadItem &operator=(const OpcUaReadItem &rhs);
40 ~OpcUaReadItem();
41
42 const QString &indexRange() const;
43 void setIndexRange(const QString &indexRange);
44
45 const QString &nodeId() const;
46 void setNodeId(const QString &nodeId);
47
48 QOpcUa::NodeAttribute attribute() const;
49 void setAttribute(QOpcUa::NodeAttribute attribute);
50
51 const QVariant &namespaceIdentifier() const;
52 void setNamespaceIdentifier(const QVariant &namespaceIdentifier);
53
54private:
55 QSharedDataPointer<OpcUaReadItemData> data;
56};
57
58class OpcUaReadItemFactory : public QObject
59{
60 Q_OBJECT
61 QML_NAMED_ELEMENT(ReadItem)
62 QML_SINGLETON
63 QML_ADDED_IN_VERSION(5, 13)
64
65public:
66 Q_INVOKABLE OpcUaReadItem create();
67};
68
69QT_END_NAMESPACE
70
71#endif // OPCUAREADITEM_P_H
72

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