QOpcUaDoubleComplexNumber Class | Qt OPC UA 6.4.1

- Qt 6.4
- Qt OPC UA
- C++ Classes
- QOpcUaDoubleComplexNumber
- Qt 6.4.1 Reference Documentation

# QOpcUaDoubleComplexNumber Class

The OPC UA DoubleComplexNumber type. More...

Header: | #include <QOpcUaDoubleComplexNumber>
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: | QT += opcua

- List of all members, including inherited members

## Public Functions

| QOpcUaDoubleComplexNumber(double real, double imaginary)
QOpcUaDoubleComplexNumber & | operator=(const QOpcUaDoubleComplexNumber &rhs)
double | imaginary() const
double | real() const
void | setImaginary(double imaginary)
void | setReal(double real)
QVariant | operator QVariant() const
bool | operator==(const QOpcUaDoubleComplexNumber &rhs) const

## Detailed Description

The DoubleComplexNumberType defined in OPC-UA part 8, 5.6.5. It stores a complex number with double precision.

## Member Function Documentation

### QOpcUaDoubleComplexNumber::QOpcUaDoubleComplexNumber(double real, double imaginary)

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

### QOpcUaDoubleComplexNumber &QOpcUaDoubleComplexNumber::operator=(const QOpcUaDoubleComplexNumber &rhs)

Sets the values from rhs in this double complex number.

### double QOpcUaDoubleComplexNumber::imaginary() const

Returns the imaginary part of the complex number.

See also setImaginary().

### double QOpcUaDoubleComplexNumber::real() const

Returns the real part of the complex number.

See also setReal().

### void QOpcUaDoubleComplexNumber::setImaginary(double imaginary)

Sets the imaginary part of the complex number to imaginary.

See also imaginary().

### void QOpcUaDoubleComplexNumber::setReal(double real)

Sets the real part of the complex number to real.

See also real().

### QVariant QOpcUaDoubleComplexNumber::operator QVariant() const

Converts this double complex number to QVariant.

### bool QOpcUaDoubleComplexNumber::operator==(const QOpcUaDoubleComplexNumber &rhs) const

Returns `true` if this double complex number has the same value as rhs.