| 1 | // Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com |
| 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 QOPCUACOMPLEXNUMBER_H |
| 5 | #define QOPCUACOMPLEXNUMBER_H |
| 6 | |
| 7 | #include <QtOpcUa/qopcuaglobal.h> |
| 8 | |
| 9 | #include <QtCore/qshareddata.h> |
| 10 | #include <QtCore/qvariant.h> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | class QOpcUaComplexNumberData; |
| 15 | class Q_OPCUA_EXPORT QOpcUaComplexNumber |
| 16 | { |
| 17 | public: |
| 18 | QOpcUaComplexNumber(); |
| 19 | QOpcUaComplexNumber(const QOpcUaComplexNumber &); |
| 20 | QOpcUaComplexNumber(float real, float imaginary); |
| 21 | QOpcUaComplexNumber &operator=(const QOpcUaComplexNumber &); |
| 22 | bool operator==(const QOpcUaComplexNumber &rhs) const; |
| 23 | operator QVariant() const; |
| 24 | ~QOpcUaComplexNumber(); |
| 25 | |
| 26 | float real() const; |
| 27 | void setReal(float real); |
| 28 | |
| 29 | float imaginary() const; |
| 30 | void setImaginary(float imaginary); |
| 31 | |
| 32 | private: |
| 33 | QSharedDataPointer<QOpcUaComplexNumberData> data; |
| 34 | }; |
| 35 | |
| 36 | QT_END_NAMESPACE |
| 37 | |
| 38 | Q_DECLARE_METATYPE(QOpcUaComplexNumber) |
| 39 | |
| 40 | #endif // QOPCUACOMPLEXNUMBER_H |
| 41 | |