| 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 QOPCUALOCALIZEDTEXT_H |
| 5 | #define QOPCUALOCALIZEDTEXT_H |
| 6 | |
| 7 | #include <QtOpcUa/qopcuaglobal.h> |
| 8 | #include <QtCore/qobject.h> |
| 9 | #include <QtCore/qshareddata.h> |
| 10 | #include <QtCore/qvariant.h> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | class QOpcUaLocalizedTextData; |
| 15 | class Q_OPCUA_EXPORT QOpcUaLocalizedText |
| 16 | { |
| 17 | Q_GADGET |
| 18 | Q_PROPERTY(QString locale READ locale WRITE setLocale) |
| 19 | Q_PROPERTY(QString text READ text WRITE setText) |
| 20 | |
| 21 | public: |
| 22 | QOpcUaLocalizedText(); |
| 23 | QOpcUaLocalizedText(const QOpcUaLocalizedText &); |
| 24 | QOpcUaLocalizedText(const QString &locale, const QString &text); |
| 25 | QOpcUaLocalizedText &operator=(const QOpcUaLocalizedText &); |
| 26 | bool operator==(const QOpcUaLocalizedText &rhs) const; |
| 27 | operator QVariant() const; |
| 28 | ~QOpcUaLocalizedText(); |
| 29 | |
| 30 | QString locale() const; |
| 31 | void setLocale(const QString &locale); |
| 32 | |
| 33 | QString text() const; |
| 34 | void setText(const QString &text); |
| 35 | |
| 36 | private: |
| 37 | QSharedDataPointer<QOpcUaLocalizedTextData> data; |
| 38 | |
| 39 | #ifndef QT_NO_DEBUG_STREAM |
| 40 | friend Q_OPCUA_EXPORT QDebug operator<<(QDebug debug, const QOpcUaLocalizedText <); |
| 41 | #endif |
| 42 | }; |
| 43 | |
| 44 | QT_END_NAMESPACE |
| 45 | |
| 46 | Q_DECLARE_METATYPE(QOpcUaLocalizedText) |
| 47 | |
| 48 | #endif // QOPCUALOCALIZEDTEXT_H |
| 49 |
