QOpcUaComplexNumber Class
OPC UA 的 ComplexNumber 类型。更多内容...
| 头文件: | #include <QOpcUaComplexNumber> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
公共函数
| QOpcUaComplexNumber() | |
| QOpcUaComplexNumber(float real, float imaginary) | |
| float | imaginary() const |
| float | real() const |
| void | setImaginary(float imaginary) |
| void | setReal(float real) |
| operator QVariant() const | |
| QOpcUaComplexNumber & | operator=(const QOpcUaComplexNumber &rhs) |
| bool | operator==(const QOpcUaComplexNumber &rhs) const |
成员函数文档
QOpcUaComplexNumber::QOpcUaComplexNumber()
默认情况下会构建一个未设置任何参数的复数。
QOpcUaComplexNumber::QOpcUaComplexNumber(float real, float imaginary)
构造一个实部为real 、虚部为imaginary 的复数。
float QOpcUaComplexNumber::imaginary() const
返回复数的虚部。
另请参阅 setImaginary()。
float QOpcUaComplexNumber::real() const
返回复数的实部。
另请参阅 ` setReal()`。
void QOpcUaComplexNumber::setImaginary(float imaginary)
将复数的虚部设置为imaginary 。
另请参阅 imaginary()。
void QOpcUaComplexNumber::setReal(float real)
将复数的实部设置为real 。
另请参阅 real()。
QOpcUaComplexNumber::operator QVariant() const
将该复数转换为QVariant 。
QOpcUaComplexNumber &QOpcUaComplexNumber::operator=(const QOpcUaComplexNumber &rhs)
将rhs 中的值设置为该复数的数值。
bool QOpcUaComplexNumber::operator==(const QOpcUaComplexNumber &rhs) const
如果该复数的值与rhs 相同,则返回true 。
© 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.