- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Classes | Functions

# qvector2d.h File Reference

`#include <QtCore/qpoint.h>`
`#include <QtCore/qmetatype.h>`

Go to the source code of this file.

## Classes
class | QVector2D
## Functions
| Q_DECLARE_TYPEINFO (QVector2D, Q_MOVABLE_TYPE)
bool | operator== (const QVector2D &v1, const QVector2D &v2)
bool | operator!= (const QVector2D &v1, const QVector2D &v2)
const QVector2D | operator+ (const QVector2D &v1, const QVector2D &v2)
const QVector2D | operator- (const QVector2D &v1, const QVector2D &v2)
const QVector2D | operator* (qreal factor, const QVector2D &vector)
const QVector2D | operator* (const QVector2D &vector, qreal factor)
const QVector2D | operator* (const QVector2D &v1, const QVector2D &v2)
const QVector2D | operator- (const QVector2D &vector)
const QVector2D | operator/ (const QVector2D &vector, qreal divisor)
bool | qFuzzyCompare (const QVector2D &v1, const QVector2D &v2)
Q_GUI_EXPORT QDebug | operator<< (QDebug dbg, const QVector2D &vector)
Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &, const QVector2D &)
Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &, QVector2D &)

## Function Documentation

Q_DECLARE_TYPEINFO | ( | QVector2D | ,
|  | Q_MOVABLE_TYPE |
| ) |  |

Search for all occurrences

bool operator== | ( | const QVector2D & | v1,
|  | const QVector2D & | v2
| ) |  | `[inline]`

Definition at line 187 of file qvector2d.h.

    {
        return v1.xp == v2.xp && v1.yp == v2.yp;
    }

bool operator!= | ( | const QVector2D & | v1,
|  | const QVector2D & | v2
| ) |  | `[inline]`

Definition at line 192 of file qvector2d.h.

    {
        return v1.xp != v2.xp || v1.yp != v2.yp;
    }

const QVector2D operator+ | ( | const QVector2D & | v1,
|  | const QVector2D & | v2
| ) |  | `[inline]`

Definition at line 197 of file qvector2d.h.

    {
        return QVector2D(v1.xp + v2.xp, v1.yp + v2.yp, 1);
    }

const QVector2D operator- | ( | const QVector2D & | v1,
|  | const QVector2D & | v2
| ) |  | `[inline]`

Definition at line 202 of file qvector2d.h.

    {
        return QVector2D(v1.xp - v2.xp, v1.yp - v2.yp, 1);
    }

const QVector2D operator* | ( | qreal | factor,
|  | const QVector2D & | vector
| ) |  | `[inline]`

Definition at line 207 of file qvector2d.h.

    {
        return QVector2D(vector.xp * factor, vector.yp * factor, 1);
    }

const QVector2D operator* | ( | const QVector2D & | vector,
|  | qreal | factor
| ) |  | `[inline]`

Definition at line 212 of file qvector2d.h.

    {
        return QVector2D(vector.xp * factor, vector.yp * factor, 1);
    }

const QVector2D operator* | ( | const QVector2D & | v1,
|  | const QVector2D & | v2
| ) |  | `[inline]`

Definition at line 217 of file qvector2d.h.

    {
        return QVector2D(v1.xp * v2.xp, v1.yp * v2.yp, 1);
    }

const QVector2D operator- | ( | const QVector2D & | vector | ) | `[inline]`

Definition at line 222 of file qvector2d.h.

    {
        return QVector2D(-vector.xp, -vector.yp, 1);
    }

const QVector2D operator/ | ( | const QVector2D & | vector,
|  | qreal | divisor
| ) |  | `[inline]`

Definition at line 227 of file qvector2d.h.

    {
        return QVector2D(vector.xp / divisor, vector.yp / divisor, 1);
    }

bool qFuzzyCompare | ( | const QVector2D & | v1,
|  | const QVector2D & | v2
| ) |  | `[inline]`

Search for all occurrences

Definition at line 232 of file qvector2d.h.

    {
        return qFuzzyCompare(v1.xp, v2.xp) && qFuzzyCompare(v1.yp, v2.yp);
    }

Q_GUI_EXPORT QDebug operator<< | ( | QDebug | dbg,
|  | const QVector2D & | vector
| ) |  |

Q_GUI_EXPORT QDataStream& operator<< | ( | QDataStream & | ,
|  | const QVector2D & |
| ) |  |

Q_GUI_EXPORT QDataStream& operator>> | ( | QDataStream & | ,
|  | QVector2D & |
| ) |  |