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