The QMarginsF class defines the four margins of a rectangle. More...
Header: | #include <QMarginsF> |
qmake: | QT += core |
Since: | Qt 5.3 |
This class was introduced in Qt 5.3.
QMarginsF(const QMargins &margins) | |
QMarginsF(qreal left, qreal top, qreal right, qreal bottom) | |
QMarginsF() | |
qreal | bottom() const |
bool | isNull() const |
qreal | left() const |
qreal | right() const |
void | setBottom(qreal bottom) |
void | setLeft(qreal left) |
void | setRight(qreal right) |
void | setTop(qreal Top) |
QMargins | toMargins() const |
qreal | top() const |
QMarginsF & | operator*=(qreal factor) |
QMarginsF & | operator+=(const QMarginsF &margins) |
QMarginsF & | operator+=(qreal addend) |
QMarginsF & | operator-=(const QMarginsF &margins) |
QMarginsF & | operator-=(qreal subtrahend) |
QMarginsF & | operator/=(qreal divisor) |
bool | operator!=(const QMarginsF &lhs, const QMarginsF &rhs) |
QMarginsF | operator*(const QMarginsF &lhs, qreal rhs) |
QMarginsF | operator*(qreal lhs, const QMarginsF &rhs) |
QMarginsF | operator+(const QMarginsF &lhs, const QMarginsF &rhs) |
QMarginsF | operator+(const QMarginsF &lhs, qreal rhs) |
QMarginsF | operator+(qreal lhs, const QMarginsF &rhs) |
QMarginsF | operator+(const QMarginsF &margins) |
QMarginsF | operator-(const QMarginsF &lhs, const QMarginsF &rhs) |
QMarginsF | operator-(const QMarginsF &lhs, qreal rhs) |
QMarginsF | operator-(const QMarginsF &margins) |
QMarginsF | operator/(const QMarginsF &lhs, qreal rhs) |
QDataStream & | operator<<(QDataStream &stream, const QMarginsF &m) |
bool | operator==(const QMarginsF &lhs, const QMarginsF &rhs) |
QDataStream & | operator>>(QDataStream &stream, QMarginsF &m) |
QMarginsF defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.
The isNull() function returns true
only if all margins are set to zero.
QMarginsF objects can be streamed as well as compared.
Constructs margins copied from the given margins
Constructs margins with the given left, top, right, bottom
See also setLeft(), setRight(), setTop(), and setBottom().
Constructs a margins object with all margins set to 0.
See also isNull().
Returns the bottom margin.
See also setBottom().
Returns true
if all margins are 0; otherwise returns false.
Returns the left margin.
See also setLeft().
Returns the right margin.
See also setRight().
Sets the bottom margin to bottom.
See also bottom().
Sets the left margin to left.
See also left().
Sets the right margin to right.
See also right().
Sets the Top margin to Top.
See also top().
Returns an integer based copy of this margins object.
Note that the components in the returned margins will be rounded to the nearest integer.
See also QMarginsF().
Returns the top margin.
See also setTop().
Multiplies each component of this object by factor and returns a reference to it.
See also operator/=().
Add each component of margins to the respective component of this object and returns a reference to it.
See also operator-=().
This is an overloaded function.
Adds the addend to each component of this object and returns a reference to it.
See also operator-=().
Subtract each component of margins from the respective component of this object and returns a reference to it.
See also operator+=().
This is an overloaded function.
Subtracts the subtrahend from each component of this object and returns a reference to it.
See also operator+=().
Divides each component of this object by divisor and returns a reference to it.
See also operator*=().
Returns true
if lhs and rhs are different; otherwise returns false
.
This is an overloaded function.
Returns a QMarginsF object that is formed by multiplying each component of the given lhs margins by rhs factor.
See also QMarginsF::operator*=() and QMarginsF::operator/=().
This is an overloaded function.
Returns a QMarginsF object that is formed by multiplying each component of the given lhs margins by rhs factor.
See also QMarginsF::operator*=() and QMarginsF::operator/=().
Returns a QMarginsF object that is the sum of the given margins, lhs and rhs; each component is added separately.
See also QMarginsF::operator+=() and QMarginsF::operator-=().
Returns a QMarginsF object that is formed by adding rhs to lhs.
See also QMarginsF::operator+=() and QMarginsF::operator-=().
Returns a QMarginsF object that is formed by adding lhs to rhs.
See also QMarginsF::operator+=() and QMarginsF::operator-=().
Returns a QMargin object that is formed from all components of margins.
Returns a QMarginsF object that is formed by subtracting rhs from lhs; each component is subtracted separately.
See also QMarginsF::operator+=() and QMarginsF::operator-=().
Returns a QMarginsF object that is formed by subtracting rhs from lhs.
See also QMarginsF::operator+=() and QMarginsF::operator-=().
Returns a QMargin object that is formed by negating all components of margins.
This is an overloaded function.
Returns a QMarginsF object that is formed by dividing the components of the given lhs margins by the given rhs divisor.
See also QMarginsF::operator*=() and QMarginsF::operator/=().
Writes margin m to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
Returns true
if lhs and rhs are equal; otherwise returns false
.
Reads a margin from the given stream into margin m and returns a reference to the stream.
See also Serializing Qt Data Types.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/qmarginsf.html