Sur cette page

QOpcUaLocalizedText Class

Le type « LocalizedText » d'OPC UA. En savoir 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 LocalizedText d'OPC UA défini dans la norme OPC UA 1.05, partie 3, section 8.5. Une valeur LocalizedText contient une chaîne de texte accompagnée d'informations de paramètres régionaux associées dans une deuxième chaîne (par exemple « en » ou « en-US »). Le format de la chaîne d’informations de paramètres régionaux est <langue>[-<pays/région>]. La langue est généralement indiquée sous la forme d’un code à deux lettres ISO 639, et le pays/la région sous la forme d’un code à deux lettres ISO 3166. Des codes personnalisés sont également autorisés (voir OPC UA 1.05, partie 3, section 8.4). Ce type permet de fournir plusieurs chaînes de texte dans différentes langues pour une même valeur à l’aide d’un tableau d’éléments LocalizedText.

Documentation des propriétés

locale : QString

Paramètre de localisation du texte contenu. Il doit être exprimé selon une notation ISO standard modifiée, par exemple en-US. Pour plus de détails, voir la spécification OPC UA 1.05, partie 3, section 8.4.

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 membres

QOpcUaLocalizedText::QOpcUaLocalizedText()

La fonction « default » génère un texte localisé sans aucun paramètre défini.

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

Crée un texte localisé avec les paramètres régionaux locale et le texte text.

QOpcUaLocalizedText::QOpcUaLocalizedText(const QOpcUaLocalizedText &rhs)

Génère un texte localisé à partir de rhs.

QString QOpcUaLocalizedText::locale() const

Renvoie les paramètres régionaux.

Remarque : fonctionde lecture pour la propriété locale.

Voir aussi setLocale().

void QOpcUaLocalizedText::setLocale(const QString &locale)

Définit les paramètres régionaux sur locale.

Remarque : fonctionde définition de la propriété locale.

Voir aussi locale().

void QOpcUaLocalizedText::setText(const QString &text)

Définit le texte sur « text ».

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

Voir également text().

QString QOpcUaLocalizedText::text() const

Renvoie le texte.

Remarque : fonction de lecture (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 ».

Éléments associés non membres

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

Écrit l'text ion localisée dans le flux de 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.