このページでは

QOpcUaLocalizedText Class

OPC UAのLocalizedText型。詳細はこちら...

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

詳細な説明

これは、OPC UA 1.05 第3部 8.5で定義されているOPC UAのLocalizedText型に対するQt OPC UA での表現です。LocalizedTextの値には、テキスト文字列と、それに関連付けられたロケール情報(2番目の文字列、例:「en」または「en-US」)が含まれます。 ロケール情報文字列の形式は、<言語>[-<国/地域>] です。言語は通常 ISO 639 の 2 文字コードで、国/地域は ISO 3166 の 2 文字コードで指定されます。 カスタムコードも使用可能です(OPC UA 1.05 第3部 8.4を参照)。LocalizedText要素の配列を使用することで、1つの値に対して異なる言語の複数のテキスト文字列を提供することができます。

プロパティのドキュメント

locale : QString

含まれるテキストのロケール。これは、修正されたISO標準表記法で指定する必要があります(例:en-US )。詳細については、OPC UA仕様1.05パート3の8.4を参照してください。

アクセス関数:

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

text : QString

テキストコンテンツ。

アクセス関数:

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

メンバ関数のドキュメント

QOpcUaLocalizedText::QOpcUaLocalizedText()

デフォルトでは、パラメータが設定されていないローカライズされたテキストが生成されます。

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

ロケール「locale 」とテキスト「text 」を用いて、ローカライズされたテキストを生成します。

QOpcUaLocalizedText::QOpcUaLocalizedText(const QOpcUaLocalizedText &rhs)

rhs からローカライズされたテキストを作成します。

QString QOpcUaLocalizedText::locale() const

ロケールを返します。

注: プロパティ `locale`のゲッター 関数です。

関連項目: setLocale()。

void QOpcUaLocalizedText::setLocale(const QString &locale)

ロケールを「locale 」に設定します。

注: プロパティ `locale`のセッター 関数です。

locale()も参照してください 。

void QOpcUaLocalizedText::setText(const QString &text)

テキストを「text 」に設定します。

注: プロパティ `text`のセッター 関数です。

text()も参照してください 。

QString QOpcUaLocalizedText::text() const

テキストを返します。

注: プロパティ textのゲッター 関数です。

関連項目: setText()。

QOpcUaLocalizedText::operator QVariant() const

このローカライズされたテキストを「QVariant 」に変換します。

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

rhs の値を、このローカライズされたテキストに設定します。

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

このローカライズされたテキストの値が `rhs` と同じ場合、true を返します。

関連する非メンバー

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

ローカライズされたtext をdebug の出力に書き込みます。

この関数は Qt 6.3 で導入されました。

「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.