diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-12-10 12:00:53 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-07 16:11:19 +0100 |
commit | 6ecc3e76e822b1545bcbfa78f5caf94156a026d2 (patch) | |
tree | bf846c3cb7a790e2cdff4b832866604437e1f3fe /src/corelib/tools/qmargins.cpp | |
parent | 41ec7c32ace8ba89605e7923fe699de1998afbd6 (diff) |
Add API dealing with QMargins to QRect.
- Addition of a QMargin to a QRect.
- Removal of a QMargin from a QRect.
- Remove implementation from Windows platform plugin.
Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src/corelib/tools/qmargins.cpp')
-rw-r--r-- | src/corelib/tools/qmargins.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index 6929433bb5..214466194a 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -157,6 +157,65 @@ QT_BEGIN_NAMESPACE Returns true if \a m1 and \a m2 are different; otherwise returns 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 +*/ + /***************************************************************************** QMargins stream functions *****************************************************************************/ |