QOpcUaLocalizedText Class

OPC UALocalizedText タイプ。詳細...

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

詳細説明

OPC UA 1.05 part 3 8.5 で定義されている OPC UALocalizedText 型のQt OPC UA 表現。LocalizedText の値には、テキスト文字列と、それに関連するロケール情報(例えば、"en "や "en-US")が第二の文字列として含まれる。ロケール情報文字列の形式は、<language>[-<country/region>]である。言語は通常ISO 639の2文字コード、国/地域はISO 3166の2文字コードで指定します。カスタムコードも許される(OPC UA 1.05 part 3, 8.4参照)。これは、LocalizedText 要素の配列を使用して、値に対して異なる言語の複数のテキスト文字列を提供するために使用することができる。

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

locale : QString

含まれるテキストのロケール。これは、例えばen-US のような、修正された ISO 標準記法でなければならない。詳細は OPC UA 仕様書 1.05 part 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()も参照してください

QVariant 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)

ローカライズされたtextdebug 出力に書き込みます。

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

QDebugも参照してください

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