QMarginsF Class

The QMarginsF class defines the four margins of a rectangle. 更多...

頭: #include <QMarginsF>
qmake: QT += core
Since: Qt 5.3

公共函數

QMarginsF ()
QMarginsF (qreal left , qreal top , qreal right , qreal bottom )
QMarginsF (const QMargins & margins )
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 )

詳細描述

The QMarginsF class defines the four margins of a rectangle.

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 僅當所有邊距被設為 0 時。

QMarginsF 對象可以被流化及比較。

成員函數文檔編製

QMarginsF:: QMarginsF ()

構造邊距對象,采用把所有邊距設為 0。

另請參閱 isNull ().

QMarginsF:: QMarginsF ( qreal left , qreal top , qreal right , qreal bottom )

構造邊距采用給定 left , top , right , bottom

另請參閱 setLeft (), setRight (), setTop (),和 setBottom ().

QMarginsF:: QMarginsF (const QMargins & margins )

Constructs margins copied from the given margins

qreal QMarginsF:: bottom () const

返迴下邊距。

另請參閱 setBottom ().

bool QMarginsF:: isNull () const

返迴 true if all margins are 0; otherwise returns false.

qreal QMarginsF:: left () const

返迴左邊距。

另請參閱 setLeft ().

返迴右邊距。

另請參閱 setRight ().

void QMarginsF:: setBottom ( qreal bottom )

將下邊距設為 bottom .

另請參閱 bottom ().

void QMarginsF:: setLeft ( qreal left )

將左邊距設為 left .

另請參閱 left ().

void QMarginsF:: setRight ( qreal right )

將右邊距設為 right .

另請參閱 right ().

void QMarginsF:: setTop ( qreal Top )

將上邊距設為 Top .

另請參閱 top ().

QMargins QMarginsF:: toMargins () const

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 ().

qreal QMarginsF:: top () const

返迴上邊距。

另請參閱 setTop ().

QMarginsF &QMarginsF:: operator*= ( qreal factor )

此對象的各分量乘以 factor 並返迴其引用。

另請參閱 operator/= ().

QMarginsF &QMarginsF:: operator+= (const QMarginsF & margins )

Add each component of margins to the respective component of this object and returns a reference to it.

另請參閱 operator-= ().

QMarginsF &QMarginsF:: operator+= ( qreal addend )

這是重載函數。

添加 addend to each component of this object and returns a reference to it.

另請參閱 operator-= ().

QMarginsF &QMarginsF:: operator-= (const QMarginsF & margins )

Subtract each component of margins from the respective component of this object and returns a reference to it.

另請參閱 operator+= ().

QMarginsF &QMarginsF:: operator-= ( qreal subtrahend )

這是重載函數。

減去 subtrahend from each component of this object and returns a reference to it.

另請參閱 operator+= ().

QMarginsF &QMarginsF:: operator/= ( qreal divisor )

此對象的各分量除以 divisor 並返迴其引用。

另請參閱 operator*= ().

相關非成員

bool operator!= (const QMarginsF & lhs , const QMarginsF & rhs )

返迴 true if lhs and rhs 不同;否則返迴 false .

QMarginsF operator* (const QMarginsF & lhs , qreal rhs )

這是重載函數。

返迴 QMarginsF object that is formed by multiplying each component of the given lhs margins by rhs factor.

另請參閱 QMarginsF::operator*= () 和 QMarginsF::operator/= ().

QMarginsF operator* ( qreal lhs , const QMarginsF & rhs )

這是重載函數。

返迴 QMarginsF object that is formed by multiplying each component of the given lhs margins by rhs factor.

另請參閱 QMarginsF::operator*= () 和 QMarginsF::operator/= ().

QMarginsF operator+ (const QMarginsF & lhs , const QMarginsF & rhs )

返迴 QMarginsF 對象是和對於給定邊距 lhs and rhs ;各分量分彆相加。

另請參閱 QMarginsF::operator+= () 和 QMarginsF::operator-= ().

QMarginsF operator+ (const QMarginsF & lhs , qreal rhs )

返迴 QMarginsF object that is formed by adding rhs to lhs .

另請參閱 QMarginsF::operator+= () 和 QMarginsF::operator-= ().

QMarginsF operator+ ( qreal lhs , const QMarginsF & rhs )

返迴 QMarginsF object that is formed by adding lhs to rhs .

另請參閱 QMarginsF::operator+= () 和 QMarginsF::operator-= ().

QMarginsF operator+ (const QMarginsF & margins )

Returns a QMargin object that is formed from all components of margins .

QMarginsF operator- (const QMarginsF & lhs , const QMarginsF & rhs )

返迴 QMarginsF 對象的形成是通過減去 rhs from lhs ;分彆減去各分量。

另請參閱 QMarginsF::operator+= () 和 QMarginsF::operator-= ().

QMarginsF operator- (const QMarginsF & lhs , qreal rhs )

返迴 QMarginsF 對象的形成是通過減去 rhs from lhs .

另請參閱 QMarginsF::operator+= () 和 QMarginsF::operator-= ().

QMarginsF operator- (const QMarginsF & margins )

Returns a QMargin object that is formed by negating all components of margins .

QMarginsF operator/ (const QMarginsF & lhs , qreal rhs )

這是重載函數。

返迴 QMarginsF object that is formed by dividing the components of the given lhs margins by the given rhs divisor.

另請參閱 QMarginsF::operator*= () 和 QMarginsF::operator/= ().

QDataStream & operator<< ( QDataStream & stream , const QMarginsF & m )

寫入邊距 m 到給定 stream 並返迴流引用。

另請參閱 序列化 Qt 數據類型 .

bool operator== (const QMarginsF & lhs , const QMarginsF & rhs )

返迴 true if lhs and rhs 相等;否則返迴 false .

QDataStream & operator>> ( QDataStream & stream , QMarginsF & m )

讀取邊距從給定 stream 進邊距 m 並返迴流引用。

另請參閱 序列化 Qt 數據類型 .