QOpcUaEnumField Class

OPC UA StructureDefinition 类型。更多

头文件: #include <QOpcUaEnumField>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Qt 6.7

公共函数

QOpcUaEnumField()
QOpcUaEnumField(const QOpcUaEnumField &other)
QOpcUaEnumField(QOpcUaEnumField &&other)
~QOpcUaEnumField()
QOpcUaLocalizedText description() const
QOpcUaLocalizedText displayName() const
QString name() const
void setDescription(const QOpcUaLocalizedText &description)
void setDisplayName(const QOpcUaLocalizedText &displayName)
void setName(const QString &name)
void setValue(qint64 value)
void swap(QOpcUaEnumField &other)
qint64 value() const
QVariant operator QVariant() const
QOpcUaEnumField &operator=(QOpcUaEnumField &&other)
QOpcUaEnumField &operator=(const QOpcUaEnumField &rhs)
bool operator!=(const QOpcUaEnumField &lhs, const QOpcUaEnumField &rhs)
bool operator==(const QOpcUaEnumField &lhs, const QOpcUaEnumField &rhs)

详细说明

Qt OPC UA 表示 OPC UA 第 3 部分中定义的 OPC UA EnumField 类型。它描述了一个枚举类型的字段。

成员函数文档

QOpcUaEnumField::QOpcUaEnumField()

默认构造一个未设置参数的枚举字段。

QOpcUaEnumField::QOpcUaEnumField(const QOpcUaEnumField &other)

other 中构造一个枚举字段。

[noexcept] QOpcUaEnumField::QOpcUaEnumField(QOpcUaEnumField &&other)

移动-从other 构建一个新的枚举字段。

注意: other 移动来的对象处于部分形成状态,其中唯一有效的操作是销毁和赋新值。

[noexcept] QOpcUaEnumField::~QOpcUaEnumField()

销毁此枚举定义对象。

QOpcUaLocalizedText QOpcUaEnumField::description() const

返回枚举字段的描述。

另请参阅 setDescription()。

QOpcUaLocalizedText QOpcUaEnumField::displayName() const

返回枚举字段的显示名称。

另请参阅 setDisplayName()。

QString QOpcUaEnumField::name() const

返回枚举字段的名称。

另请参阅 setName()。

void QOpcUaEnumField::setDescription(const QOpcUaLocalizedText &description)

将枚举字段的描述设置为description

另请参阅 description() 。

void QOpcUaEnumField::setDisplayName(const QOpcUaLocalizedText &displayName)

将枚举字段的显示名称设置为displayName

另请参阅 displayName() 。

void QOpcUaEnumField::setName(const QString &name)

将枚举字段的名称设置为name

另请参阅 name() 。

void QOpcUaEnumField::setValue(qint64 value)

将枚举字段的枚举值设置为value

另请参阅 value() 。

[noexcept] void QOpcUaEnumField::swap(QOpcUaEnumField &other)

将枚举字段对象other 与此枚举字段对象互换。该操作速度非常快,而且从不出错。

qint64 QOpcUaEnumField::value() const

返回枚举字段的枚举值。

另请参阅 setValue()。

QVariant QOpcUaEnumField::operator QVariant() const

将此枚举字段转换为QVariant

[noexcept] QOpcUaEnumField &QOpcUaEnumField::operator=(QOpcUaEnumField &&other)

移动--将other 赋值给此QOpcUaEnumField 实例。

注意: 从移动对象other 将处于部分形成状态,其中唯一有效的操作是销毁和赋新值。

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

在此枚举字段中设置rhs 的值。

相关非成员

[noexcept] bool operator!=(const QOpcUaEnumField &lhs, const QOpcUaEnumField &rhs)

如果lhs 不等于rhs ,则返回true

[noexcept] bool operator==(const QOpcUaEnumField &lhs, const QOpcUaEnumField &rhs)

如果lhs 等于rhs ,则返回true

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