QOpcUaComplexNumber Class

The OPC UA ComplexNumber type. 更多...

头: #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 )
QVariant operator QVariant () const
QOpcUaComplexNumber & operator= (const QOpcUaComplexNumber & rhs )
bool operator== (const QOpcUaComplexNumber & rhs ) const

详细描述

The ComplexNumberType defined in OPC UA 1.05 part 8, 5.6.4. It stores a complex number with float precision.

成员函数文档编制

QOpcUaComplexNumber:: QOpcUaComplexNumber ()

Default constructs a complex number with no parameters set.

QOpcUaComplexNumber:: QOpcUaComplexNumber ( float real , float imaginary )

Constructs a complex number with real part real and imaginary part imaginary .

float QOpcUaComplexNumber:: imaginary () const

Returns the imaginary part of the complex number.

另请参阅 setImaginary ().

float QOpcUaComplexNumber:: real () const

Returns the real part of the complex number.

另请参阅 setReal ().

void QOpcUaComplexNumber:: setImaginary ( float imaginary )

Sets the imaginary part of the complex number to imaginary .

另请参阅 imaginary ().

void QOpcUaComplexNumber:: setReal ( float real )

Sets the real part of the complex number to real .

另请参阅 real ().

QVariant QOpcUaComplexNumber:: operator QVariant () const

Converts this complex number to QVariant .

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

设置值从 rhs in this complex number.

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

返回 true if this complex number has the same value as rhs .