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 QOPCUA_OPCUAMETHODARGUMENT_P_H |
5 | #define QOPCUA_OPCUAMETHODARGUMENT_P_H |
6 | |
7 | #include "qopcuatype.h" |
8 | #include <QObject> |
9 | #include <QtQml/qqml.h> |
10 | #include <QtCore/private/qglobal_p.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 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class OpcUaMethodArgument : public QObject |
26 | { |
27 | Q_OBJECT |
28 | Q_PROPERTY(QVariant value READ value WRITE setValue) |
29 | Q_PROPERTY(QOpcUa::Types type READ type WRITE setType) |
30 | |
31 | QML_NAMED_ELEMENT(MethodArgument) |
32 | QML_ADDED_IN_VERSION(5, 13) |
33 | |
34 | public: |
35 | explicit OpcUaMethodArgument(QObject *parent = nullptr); |
36 | QVariant value() const; |
37 | QOpcUa::Types type() const; |
38 | |
39 | public slots: |
40 | void setValue(QVariant value); |
41 | void setType(QOpcUa::Types type); |
42 | |
43 | private: |
44 | QVariant m_value; |
45 | QOpcUa::Types m_type; |
46 | }; |
47 | |
48 | QT_END_NAMESPACE |
49 | |
50 | #endif // QOPCUA_OPCUAMETHODARGUMENT_P_H |
51 |