Sur cette page

QOpcUaLocalizedText Class

Type de texte localisé OPC UA. Plus...

En-tête : #include <QOpcUaLocalizedText>
CMake : find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake : QT += opcua

Propriétés

Fonctions publiques

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
operator QVariant() const
QOpcUaLocalizedText &operator=(const QOpcUaLocalizedText &rhs)
bool operator==(const QOpcUaLocalizedText &rhs) const
(since 6.3) QDebug operator<<(QDebug debug, const QOpcUaLocalizedText &text)

Description détaillée

Il s'agit de la représentation Qt OPC UA du type OPC UA LocalizedText défini dans OPC UA 1.05 partie 3, 8.5. Une valeur LocalizedText contient une chaîne de texte avec des informations locales associées dans une deuxième chaîne (par exemple, "en" ou "en-US"). Le format de la chaîne d'informations locales est <langue>[-<pays/région>]. La langue est généralement indiquée sous la forme d'un code ISO 639 à deux lettres, le pays/la région sous la forme d'un code ISO 3166 à deux lettres. Les codes personnalisés sont également autorisés (voir OPC UA 1.05 partie 3, 8.4). Il peut être utilisé pour fournir plusieurs chaînes de texte dans différentes langues pour une valeur en utilisant un tableau d'éléments LocalizedText.

Documentation de la propriété

locale : QString

Locale du texte contenu. Il doit s'agir d'une notation modifiée de la norme ISO, par exemple en-US. Voir la spécification OPC UA 1.05 partie 3, 8.4 pour plus de détails.

Fonctions d'accès :

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

text : QString

Contenu textuel.

Fonctions d'accès :

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

Documentation sur les fonctions des membres

QOpcUaLocalizedText::QOpcUaLocalizedText()

Par défaut, un texte localisé est construit sans aucun paramètre.

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

Construit un texte localisé avec la locale locale et le texte text.

QOpcUaLocalizedText::QOpcUaLocalizedText(const QOpcUaLocalizedText &rhs)

Construit un texte localisé à partir de rhs.

QString QOpcUaLocalizedText::locale() const

Renvoie la locale.

Note : Fonction Getter pour la propriété locale.

Voir aussi setLocale().

void QOpcUaLocalizedText::setLocale(const QString &locale)

Fixe la locale à locale.

Note : Fonction de définition de la propriété locale.

Voir également locale().

void QOpcUaLocalizedText::setText(const QString &text)

Fixe le texte à text.

Remarque : fonction de définition de la propriété text.

Voir également text().

QString QOpcUaLocalizedText::text() const

Renvoie le texte.

Note : Fonction Getter pour la propriété text.

Voir aussi setText().

QOpcUaLocalizedText::operator QVariant() const

Convertit ce texte localisé en QVariant.

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

Définit les valeurs de rhs dans ce texte localisé.

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

Renvoie true si ce texte localisé a la même valeur que rhs.

Non-membres apparentés

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

Écrit la version localisée de text sur la sortie debug.

Cette fonction a été introduite dans Qt 6.3.

Voir aussi QDebug.

© 2026 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.