diff options
Diffstat (limited to 'src/corelib/tools/qpoint.cpp')
-rw-r--r-- | src/corelib/tools/qpoint.cpp | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp index d1f3b12a68..775a354469 100644 --- a/src/corelib/tools/qpoint.cpp +++ b/src/corelib/tools/qpoint.cpp @@ -15,6 +15,10 @@ QT_BEGIN_NAMESPACE \ingroup painting \reentrant + \compares equality + \compareswith equality QPointF + \endcompareswith + \brief The QPoint class defines a point in the plane using integer precision. @@ -208,16 +212,17 @@ QT_BEGIN_NAMESPACE */ /*! - \fn bool QPoint::operator==(const QPoint &p1, const QPoint &p2) + \fn bool QPoint::operator==(const QPoint &lhs, const QPoint &rhs) - Returns \c true if \a p1 and \a p2 are equal; otherwise returns - false. + Returns \c true if \a lhs and \a rhs are equal; otherwise returns + \c false. */ /*! - \fn bool QPoint::operator!=(const QPoint &p1, const QPoint &p2) + \fn bool QPoint::operator!=(const QPoint &lhs, const QPoint &rhs) - Returns \c true if \a p1 and \a p2 are not equal; otherwise returns \c false. + Returns \c true if \a lhs and \a rhs are not equal; otherwise returns + \c false. */ /*! @@ -463,6 +468,10 @@ size_t qHash(QPoint key, size_t seed) noexcept \ingroup painting \reentrant + \compares equality + \compareswith equality QPoint + \endcompareswith + \brief The QPointF class defines a point in the plane using floating point precision. @@ -730,9 +739,9 @@ size_t qHash(QPoint key, size_t seed) noexcept */ /*! - \fn bool QPointF::operator==(const QPointF &p1, const QPointF &p2) + \fn bool QPointF::operator==(const QPointF &lhs, const QPointF &rhs) - Returns \c true if \a p1 is approximately equal to \a p2; otherwise + Returns \c true if \a lhs is approximately equal to \a rhs; otherwise returns \c false. \warning This function does not check for strict equality; instead, @@ -742,9 +751,9 @@ size_t qHash(QPoint key, size_t seed) noexcept */ /*! - \fn bool QPointF::operator!=(const QPointF &p1, const QPointF &p2); + \fn bool QPointF::operator!=(const QPointF &lhs, const QPointF &rhs) - Returns \c true if \a p1 is sufficiently different from \a p2; + Returns \c true if \a lhs is sufficiently different from \a rhs; otherwise returns \c false. \warning This function does not check for strict inequality; instead, @@ -753,6 +762,26 @@ size_t qHash(QPoint key, size_t seed) noexcept \sa qFuzzyCompare */ +/*! + \fn bool QPointF::qFuzzyCompare(const QPointF &p1, const QPointF &p2) + \since 6.8 + + Returns \c true if \a p1 is approximately equal to \a p2; otherwise + returns \c false. + + \sa qFuzzyIsNull +*/ + +/*! + \fn bool QPointF::qFuzzyIsNull(const QPointF &point) + \since 6.8 + + Returns \c true if \a point is approximately equal to a point + \c {(0.0, 0.0)}. + + \sa qFuzzyCompare +*/ + #ifndef QT_NO_DATASTREAM /*! \fn QDataStream &operator<<(QDataStream &stream, const QPointF &point) |