The QMarginsF class defines the four margins of a rectangle. 更多...
| 头: | #include <QMarginsF> |
| qmake: | QT += core |
| Since: | Qt 5.3 |
该类在 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
() 函数返回
true
only if all margins are very close to zero.
QMarginsF objects can be streamed as well as compared.
Constructs margins copied from the given margins .
构造边距采用给定 left , top , right , bottom
另请参阅 setLeft (), setRight (), setTop (),和 setBottom ().
构造边距对象,采用把所有边距设为 0。
另请参阅 isNull ().
返回下边距。
另请参阅 setBottom ().
返回
true
if all margins are very close to 0; otherwise returns false.
另请参阅 qFuzzyIsNull .
返回左边距。
另请参阅 setLeft ().
返回右边距。
另请参阅 setRight ().
将下边距设为 bottom .
另请参阅 bottom ().
将左边距设为 left .
另请参阅 left ().
将右边距设为 right .
另请参阅 right ().
将上边距设为 Top .
另请参阅 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.
另请参阅 QMarginsF ().
返回上边距。
另请参阅 setTop ().
此对象的各分量乘以 factor 并返回其引用。
另请参阅 operator/= ().
Add each component of margins to the respective component of this object and returns a reference to it.
另请参阅 operator-= ().
这是重载函数。
添加 addend to each component of this object and returns a reference to it.
另请参阅 operator-= ().
Subtract each component of margins from the respective component of this object and returns a reference to it.
另请参阅 operator+= ().
这是重载函数。
减去 subtrahend from each component of this object and returns a reference to it.
另请参阅 operator+= ().
此对象的各分量除以 divisor 并返回其引用。
另请参阅 operator*= ().
返回
true
if
lhs
and
rhs
are sufficiently different; otherwise returns
false
.
警告: This function does not check for strict inequality; instead, it uses a fuzzy comparison to compare the margins.
另请参阅 qFuzzyCompare .
这是重载函数。
返回 QMarginsF object that is formed by multiplying each component of the given lhs margins by rhs factor.
另请参阅 QMarginsF::operator*= () 和 QMarginsF::operator/= ().
这是重载函数。
返回 QMarginsF object that is formed by multiplying each component of the given lhs margins by rhs factor.
另请参阅 QMarginsF::operator*= () 和 QMarginsF::operator/= ().
返回 QMarginsF 对象是和对于给定边距 lhs and rhs ;各分量分别相加。
另请参阅 QMarginsF::operator+= () 和 QMarginsF::operator-= ().
返回 QMarginsF object that is formed by adding rhs to lhs .
另请参阅 QMarginsF::operator+= () 和 QMarginsF::operator-= ().
返回 QMarginsF object that is formed by adding lhs to rhs .
另请参阅 QMarginsF::operator+= () 和 QMarginsF::operator-= ().
Returns a QMargin object that is formed from all components of margins .
返回 QMarginsF 对象的形成是通过减去 rhs from lhs ;分别减去各分量。
另请参阅 QMarginsF::operator+= () 和 QMarginsF::operator-= ().
返回 QMarginsF 对象的形成是通过减去 rhs from lhs .
另请参阅 QMarginsF::operator+= () 和 QMarginsF::operator-= ().
Returns a QMargin object that is formed by negating all components of margins .
这是重载函数。
返回 QMarginsF object that is formed by dividing the components of the given lhs margins by the given rhs divisor.
另请参阅 QMarginsF::operator*= () 和 QMarginsF::operator/= ().
写入边距 m 到给定 stream 并返回流引用。
另请参阅 序列化 Qt 数据类型 .
返回
true
if
lhs
and
rhs
are approximately equal; otherwise returns false.
警告: This function does not check for strict equality; instead, it uses a fuzzy comparison to compare the margins.
另请参阅 qFuzzyCompare .
读取边距从给定 stream 进边距 m 并返回流引用。
另请参阅 序列化 Qt 数据类型 .