summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qpoint.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-24 23:54:54 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-24 23:54:54 (GMT)
commit9bd3e7677fff694068052295449a6869e2faf722 (patch)
treeb26f675a8a0e5667a63183955d25f3fccffea141 /src/corelib/tools/qpoint.cpp
parenta50402893bd2d8bda37fc3ef2da3d8326445010a (diff)
parente475d3e7fc023109478726555b676203cf8c4c5c (diff)
downloadQt-9bd3e7677fff694068052295449a6869e2faf722.zip
Qt-9bd3e7677fff694068052295449a6869e2faf722.tar.gz
Qt-9bd3e7677fff694068052295449a6869e2faf722.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Prevented infinite loop in QMoviePrivate::next(). Added int overloads to QPoint operator* and operator*=. tst_qmessagebox: add debug to know why it fails QMessageBox wrong Show/Hide Details button label
Diffstat (limited to 'src/corelib/tools/qpoint.cpp')
-rw-r--r--src/corelib/tools/qpoint.cpp63
1 files changed, 60 insertions, 3 deletions
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index c297709..592a83d 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -187,7 +187,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QPoint &QPoint::operator*=(qreal factor)
+ \fn QPoint &QPoint::operator*=(float factor)
+
+ Multiplies this point's coordinates by the given \a factor, and
+ returns a reference to this point.
+
+ Note that the result is rounded to the nearest integer as points are held as
+ integers. Use QPointF for floating point accuracy.
+
+ \sa operator/=()
+*/
+
+/*!
+ \fn QPoint &QPoint::operator*=(double factor)
Multiplies this point's coordinates by the given \a factor, and
returns a reference to this point. For example:
@@ -200,6 +212,14 @@ QT_BEGIN_NAMESPACE
\sa operator/=()
*/
+/*!
+ \fn QPoint &QPoint::operator*=(int factor)
+
+ Multiplies this point's coordinates by the given \a factor, and
+ returns a reference to this point.
+
+ \sa operator/=()
+*/
/*!
\fn bool operator==(const QPoint &p1, const QPoint &p2)
@@ -237,7 +257,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(const QPoint &point, qreal factor)
+ \fn const QPoint operator*(const QPoint &point, float factor)
\relates QPoint
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -249,7 +269,44 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn const QPoint operator*(qreal factor, const QPoint &point)
+ \fn const QPoint operator*(const QPoint &point, double factor)
+ \relates QPoint
+
+ Returns a copy of the given \a point multiplied by the given \a factor.
+
+ Note that the result is rounded to the nearest integer as points
+ are held as integers. Use QPointF for floating point accuracy.
+
+ \sa QPoint::operator*=()
+*/
+
+/*!
+ \fn const QPoint operator*(const QPoint &point, int factor)
+ \relates QPoint
+
+ Returns a copy of the given \a point multiplied by the given \a factor.
+
+ \sa QPoint::operator*=()
+*/
+
+/*!
+ \fn const QPoint operator*(float factor, const QPoint &point)
+ \overload
+ \relates QPoint
+
+ Returns a copy of the given \a point multiplied by the given \a factor.
+*/
+
+/*!
+ \fn const QPoint operator*(double factor, const QPoint &point)
+ \overload
+ \relates QPoint
+
+ Returns a copy of the given \a point multiplied by the given \a factor.
+*/
+
+/*!
+ \fn const QPoint operator*(int factor, const QPoint &point)
\overload
\relates QPoint