diff options
author | John Layt <jlayt@kde.org> | 2014-02-14 01:45:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-21 20:33:10 +0100 |
commit | db352e1e97a0eb38cb5756f264b3162efeb86c02 (patch) | |
tree | 2d8242b8103619ed777cafd1b9f9c829d85c4e08 /src/corelib/tools/qrect.cpp | |
parent | b9feb884664aa8869ebfafbd8b3a8c65f668574e (diff) |
QRect - Move QMargins operators
Move QMargins operators to QRect file, change include sequence.
Change-Id: I0e2ad91859ae65eb67c6ece50f8e4037516b463e
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.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp index fcff8931e8..e67b74ea6c 100644 --- a/src/corelib/tools/qrect.cpp +++ b/src/corelib/tools/qrect.cpp @@ -1162,6 +1162,65 @@ bool QRect::intersects(const QRect &r) const returns \c false. */ +/*! + \fn QRect operator+(const QRect &rectangle, const QMargins &margins) + \relates QRect + + Returns the \a rectangle grown by the \a margins. + + \since 5.1 +*/ + +/*! + \fn QRect operator+(const QMargins &margins, const QRect &rectangle) + \relates QRect + \overload + + Returns the \a rectangle grown by the \a margins. + + \since 5.1 +*/ + +/*! + \fn QRect QRect::marginsAdded(const QMargins &margins) const + + Returns a rectangle grown by the \a margins. + + \sa operator+=(), marginsRemoved(), operator-=() + + \since 5.1 +*/ + +/*! + \fn QRect QRect::operator+=(const QMargins &margins) const + + Adds the \a margins to the rectangle, growing it. + + \sa marginsAdded(), marginsRemoved(), operator-=() + + \since 5.1 +*/ + +/*! + \fn QRect QRect::marginsRemoved(const QMargins &margins) const + + Removes the \a margins from the rectangle, shrinking it. + + \sa marginsAdded(), operator+=(), operator-=() + + \since 5.1 +*/ + +/*! + \fn QRect QRect::operator -=(const QMargins &margins) const + + Returns a rectangle shrunk by the \a margins. + + \sa marginsRemoved(), operator+=(), marginsAdded() + + \since 5.1 +*/ + /***************************************************************************** QRect stream functions |