summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qrect.cpp
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2014-02-07 11:47:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-21 20:33:10 +0100
commit3aae3e81ef55b4131eff0520d67f2594ee9e507c (patch)
treeee33784d65b3683aaf8aae17dda494560e3c8a24 /src/corelib/tools/qrect.cpp
parentc7aa3a69253c82b8ae814c88ebbdfad7e48d0b2d (diff)
QMarginsF - Add new QMarginsF class
Add a new QMarginsF class to complement QMargins in the style of QSize/QSizeF and QRect/QRectF. [ChangeLog][QtCore] Added class QMarginsF to support handling margins with floating-point values. Change-Id: Iaaa95ec85f5d126d9d864fc4b607241a8c8a8f3a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/corelib/tools/qrect.cpp')
-rw-r--r--src/corelib/tools/qrect.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index e3ecdbb2ca..33e8dd23fc 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -2379,6 +2379,71 @@ QRect QRectF::toAlignedRect() const
returns \c false.
*/
+/*!
+ \fn QRectF operator+(const QRectF &lhs, const QMarginsF &rhs)
+ \relates QRectF
+ \since 5.3
+
+ Returns the \a lhs rectangle grown by the \a rhs margins.
+*/
+
+/*!
+ \fn QRectF operator-(const QRectF &lhs, const QMarginsF &rhs)
+ \relates QRectF
+ \since 5.3
+
+ Returns the \a lhs rectangle grown by the \a rhs margins.
+*/
+
+/*!
+ \fn QRectF operator+(const QMarginsF &lhs, const QRectF &rhs)
+ \relates QRectF
+ \overload
+ \since 5.3
+
+ Returns the \a lhs rectangle grown by the \a rhs margins.
+*/
+
+/*!
+ \fn QRectF QRectF::marginsAdded(const QMarginsF &margins) const
+ \relates QRectF
+ \since 5.3
+
+ Returns a rectangle grown by the \a margins.
+
+ \sa operator+=(), marginsRemoved(), operator-=()
+*/
+
+/*!
+ \fn QRectF QRectF::marginsRemoved(const QMarginsF &margins) const
+ \relates QRectF
+ \since 5.3
+
+ Removes the \a margins from the rectangle, shrinking it.
+
+ \sa marginsAdded(), operator+=(), operator-=()
+*/
+
+/*!
+ \fn QRectF QRectF::operator+=(const QMarginsF &margins)
+ \relates QRectF
+ \since 5.3
+
+ Adds the \a margins to the rectangle, growing it.
+
+ \sa marginsAdded(), marginsRemoved(), operator-=()
+*/
+
+/*!
+ \fn QRectF QRectF::operator-=(const QMarginsF &margins)
+ \relates QRectF
+ \since 5.3
+
+ Returns a rectangle shrunk by the \a margins.
+
+ \sa marginsRemoved(), operator+=(), marginsAdded()
+*/
+
/*****************************************************************************
QRectF stream functions
*****************************************************************************/