diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-03-18 08:16:20 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-03-19 12:02:24 +0100 |
commit | 5dc570f8b16debfda916b10bb1235aeea9650699 (patch) | |
tree | 3bfbd47a4b67f108fef975436d80341880488ccc /src/corelib/tools/qmargins.cpp | |
parent | 2fb0135efa97708025dab7654a8b2f1350dc30bf (diff) |
QLine/QMargins: add toLineF/toMarginsF()
For symmetry with QLineF::toLine().
[ChangeLog][QtCore][QLine] Added toLineF().
[ChangeLog][QtCore][QMargins] Added toMarginsF().
Task-number: QTBUG-73160
Change-Id: I69051cdd2fe4a3c0a000ab86e363a2918a7aea7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/tools/qmargins.cpp')
-rw-r--r-- | src/corelib/tools/qmargins.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index 5109cfddce..2276ffaf32 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -406,6 +406,15 @@ QT_BEGIN_NAMESPACE \since 5.1 */ +/*! + \fn QMargins::toMarginsF() const + \since 6.4 + + Returns these margins as margins with floating point accuracy. + + \sa QMarginsF::toMargins() +*/ + /***************************************************************************** QMargins stream functions *****************************************************************************/ @@ -501,6 +510,8 @@ QDebug operator<<(QDebug dbg, const QMargins &m) \fn QMarginsF::QMarginsF(const QMargins &margins) Constructs margins copied from the given \a margins. + + \sa QMargins::toMarginsF() */ /*! @@ -768,7 +779,7 @@ QDebug operator<<(QDebug dbg, const QMargins &m) Note that the components in the returned margins will be rounded to the nearest integer. - \sa QMarginsF() + \sa QMarginsF(), QMargins::toMarginsF() */ /***************************************************************************** |