1 | // Copyright (C) 2019 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 OPCUALITERALOPERAND_P_H |
5 | #define OPCUALITERALOPERAND_P_H |
6 | |
7 | #include <private/opcuaoperandbase_p.h> |
8 | |
9 | #include <QOpcUaLiteralOperand> |
10 | #include <qopcuatype.h> |
11 | #include <QtQml/qqml.h> |
12 | |
13 | // |
14 | // W A R N I N G |
15 | // ------------- |
16 | // |
17 | // This file is not part of the Qt API. It exists purely as an |
18 | // implementation detail. This header file may change from version to |
19 | // version without notice, or even be removed. |
20 | // |
21 | // We mean it. |
22 | // |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | class OpcUaLiteralOperand : public OpcUaOperandBase { |
27 | Q_OBJECT |
28 | Q_PROPERTY(QVariant value READ value WRITE setValue) |
29 | Q_PROPERTY(QOpcUa::Types type READ type WRITE setType) |
30 | QML_NAMED_ELEMENT(LiteralOperand) |
31 | QML_ADDED_IN_VERSION(5, 13) |
32 | |
33 | public: |
34 | explicit OpcUaLiteralOperand(QObject *parent = nullptr); |
35 | ~OpcUaLiteralOperand(); |
36 | QVariant toCppVariant(QOpcUaClient *client) const override; |
37 | |
38 | QVariant value() const; |
39 | void setValue(const QVariant &value); |
40 | |
41 | QOpcUa::Types type() const; |
42 | void setType(QOpcUa::Types type); |
43 | |
44 | signals: |
45 | void dataChanged(); |
46 | |
47 | private: |
48 | QVariant m_value; |
49 | QOpcUa::Types m_type; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | #endif // OPCUALITERALOPERAND_P_H |
55 | |