QOpcUaLocalizedText Class

The OPC UA LocalizedText type. 更多...

頭: #include <QOpcUaLocalizedText>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

特性

公共函數

QOpcUaLocalizedText ()
QOpcUaLocalizedText (const QString & locale , const QString & text )
QOpcUaLocalizedText (const QOpcUaLocalizedText & rhs )
QString locale () const
void setLocale (const QString & locale )
void setText (const QString & text )
QString text () const
QVariant operator QVariant () const
QOpcUaLocalizedText & operator= (const QOpcUaLocalizedText & rhs )
bool operator== (const QOpcUaLocalizedText & rhs ) const
(從 6.3 起) QDebug operator<< (QDebug debug , const QOpcUaLocalizedText & text )

詳細描述

This is the Qt OPC UA representation for the OPC UA LocalizedText type defined in OPC UA 1.05 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 1.05 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.

特性文檔編製

locale : QString

Locale of the contained text. This has to be in a modified ISO standard notation, for example en-US . See OPC UA specification 1.05 part 3, 8.4 for details.

訪問函數:

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

text : QString

Textual content.

訪問函數:

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

成員函數文檔編製

QOpcUaLocalizedText:: QOpcUaLocalizedText ()

Default constructs a localized text with no parameters set.

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

Constructs a localized text with the locale locale 和文本 text .

QOpcUaLocalizedText:: QOpcUaLocalizedText (const QOpcUaLocalizedText & rhs )

Constructs a localized text from rhs .

QString QOpcUaLocalizedText:: locale () const

Returns the locale.

注意: Getter function for property locale.

另請參閱 setLocale ().

void QOpcUaLocalizedText:: setLocale (const QString & locale )

Sets the locale to locale .

注意: setter 函數對於特性 locale .

另請參閱 locale ().

void QOpcUaLocalizedText:: setText (const QString & text )

Sets the text to text .

注意: setter 函數對於特性 text .

另請參閱 text ().

QString QOpcUaLocalizedText:: text () const

Returns the text.

注意: Getter function for property text.

另請參閱 setText ().

QVariant QOpcUaLocalizedText:: operator QVariant () const

Converts this localized text to QVariant .

QOpcUaLocalizedText &QOpcUaLocalizedText:: operator= (const QOpcUaLocalizedText & rhs )

設置值從 rhs in this localized text.

bool QOpcUaLocalizedText:: operator== (const QOpcUaLocalizedText & rhs ) const

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

相關非成員

[since 6.3] QDebug operator<< ( QDebug debug , const QOpcUaLocalizedText & text )

Writes the localized textdebug output.

該函數在 Qt 6.3 引入。

另請參閱 QDebug .