QComplexNumber Class

(QOpcUa::QComplexNumber)

The OPC UA ComplexNumber type. More...

Header: #include <QtOpcUa/qopcuatype.h>
qmake: QT += opcua

Public Functions

QComplexNumber()
QComplexNumber(const QOpcUa::QComplexNumber &)
QComplexNumber(float real, float imaginary)
~QComplexNumber()
float imaginary() const
float real() const
void setImaginary(float imaginary)
void setReal(float real)
QVariant operator QVariant() const
QOpcUa::QComplexNumber &operator=(const QOpcUa::QComplexNumber &rhs)
bool operator==(const QOpcUa::QComplexNumber &rhs) const

Detailed Description

The OPC UA ComplexNumber type.

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

Member Function Documentation

QComplexNumber::QComplexNumber()

Default constructs an instance of QComplexNumber.

QComplexNumber::QComplexNumber(const QOpcUa::QComplexNumber &)

Default constructs an instance of QComplexNumber.

QComplexNumber::QComplexNumber(float real, float imaginary)

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

QComplexNumber::~QComplexNumber()

Destroys the instance of QComplexNumber.

float QComplexNumber::imaginary() const

Returns the imaginary part of the complex number.

See also setImaginary().

float QComplexNumber::real() const

Returns the real part of the complex number.

See also setReal().

void QComplexNumber::setImaginary(float imaginary)

Sets the imaginary part of the complex number to imaginary.

See also imaginary().

void QComplexNumber::setReal(float real)

Sets the real part of the complex number to real.

See also real().

QVariant QComplexNumber::operator QVariant() const

Converts this complex number to QVariant.

QOpcUa::QComplexNumber &QComplexNumber::operator=(const QOpcUa::QComplexNumber &rhs)

Sets the values from rhs in this complex number.

bool QComplexNumber::operator==(const QOpcUa::QComplexNumber &rhs) const

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

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