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/qline.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/qline.cpp')
-rw-r--r-- | src/corelib/tools/qline.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index bbedfa948e..72a926689b 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 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. @@ -263,6 +263,15 @@ QT_BEGIN_NAMESPACE \sa setP1(), setP2(), p1(), p2() */ +/*! + \fn QLine::toLineF() const + \since 6.4 + + Returns this line as a line with floating point accuracy. + + \sa QLineF::toLine() +*/ + #ifndef QT_NO_DEBUG_STREAM @@ -423,7 +432,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) Construct a QLineF object from the given integer-based \a line. - \sa toLine() + \sa toLine(), QLine::toLineF() */ /*! @@ -463,7 +472,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) Note that the returned line's start and end points are rounded to the nearest integer. - \sa QLineF() + \sa QLineF(), QLine::toLineF() */ /*! \fn qreal QLineF::x1() const |