QLocalizedText Class

(QOpcUa::QLocalizedText)

The OPC UA LocalizedText type. More...

Header: #include <QtOpcUa/qopcuatype.h>
qmake: QT += opcua

Properties

Public Functions

QLocalizedText()
QLocalizedText(const QOpcUa::QLocalizedText &rhs)
QLocalizedText(const QString &locale, const QString &text)
~QLocalizedText()
QString locale() const
void setLocale(const QString &locale)
void setText(const QString &text)
QString text() const
QVariant operator QVariant() const
QOpcUa::QLocalizedText &operator=(const QOpcUa::QLocalizedText &rhs)
bool operator==(const QOpcUa::QLocalizedText &rhs) const

Detailed Description

The OPC UA LocalizedText type.

This is the Qt OPC UA representation for the OPC UA LocalizedText type defined in OPC-UA part 3, 8.5. A LocalizedText value contains a text string with associated locale information in a second string (e. g. "en" or "en-US"). The format of the locale information string is <language>[-<country/region>]. Language is usually given as ISO 639 two letter code, country/region as ISO 3166 two letter code. Custom codes are also allowed (see OPC-UA part 3, 8.4). It can be used to provide multiple text strings in different languages for a value using an array of LocalizedText elements.

Property Documentation

locale : QString

Access functions:

QString locale() const
void setLocale(const QString &locale)

text : QString

Access functions:

QString text() const
void setText(const QString &text)

Member Function Documentation

QLocalizedText::QLocalizedText()

Default constructs an instance of QLocalizedText.

QLocalizedText::QLocalizedText(const QOpcUa::QLocalizedText &rhs)

Constructs a localized text from rhs.

QLocalizedText::QLocalizedText(const QString &locale, const QString &text)

Constructs a localized text with the locale locale and the text text.

QLocalizedText::~QLocalizedText()

Destroys the instance of QLocalizedText.

QString QLocalizedText::locale() const

Returns the locale.

Note: Getter function for property locale.

See also setLocale().

void QLocalizedText::setLocale(const QString &locale)

Sets the locale to locale.

Note: Setter function for property locale.

See also locale().

void QLocalizedText::setText(const QString &text)

Sets the text to text.

Note: Setter function for property text.

See also text().

QString QLocalizedText::text() const

Returns the text.

Note: Getter function for property text.

See also setText().

QVariant QLocalizedText::operator QVariant() const

Converts this localized text to QVariant.

QOpcUa::QLocalizedText &QLocalizedText::operator=(const QOpcUa::QLocalizedText &rhs)

Sets the values from rhs in this localized text.

bool QLocalizedText::operator==(const QOpcUa::QLocalizedText &rhs) const

Returns true if this localized text has the same value as rhs.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.