Compatibility Members for QRect

以下成員源於類 QRect are part of the Qt compatibility layer. We advise against using them in new code.

公共函數

void addCoords (int dx1 , int dy1 , int dx2 , int dy2 )
void coords (int * x1 , int * y1 , int * x2 , int * y2 ) const
void moveBy (int dx , int dy )
void moveBy (const QPoint & p )
QRect normalize () const
int & rBottom ()
int & rLeft ()
int & rRight ()
int & rTop ()
void rect (int * x , int * y , int * width , int * height ) const

成員函數文檔編製

void QRect:: addCoords ( int dx1 , int dy1 , int dx2 , int dy2 )

添加 dx1 , dy1 , dx2 and dy2 to the existing coordinates of the rectangle respectively.

使用 adjust () 函數代替。

void QRect:: coords ( int * x1 , int * y1 , int * x2 , int * y2 ) const

將矩形左上角位置提取到 * x1 和 * y1 ,和右下角位置到 * x2 和 * y2 .

使用 getCoords () 函數代替。

另請參閱 setCoords ().

void QRect:: moveBy ( int dx , int dy )

移動矩形 dx 沿 X 軸和 dy 沿 Y 軸,相對當前位置。

使用 translate () 函數代替。

void QRect:: moveBy (const QPoint & p )

使用 translate () 函數代替。

QRect QRect:: normalize () const

返迴規範化矩形;即:矩形擁有非負值寬度和高度。

使用 normalized () function instead

int & QRect:: rBottom ()

Returns a reference to the bottom coordinate of the rectangle.

使用 bottom () 函數代替。

int & QRect:: rLeft ()

Returns a reference to the left coordinate of the rectangle.

使用 left () 函數代替。

int & QRect:: rRight ()

Returns a reference to the right coordinate of the rectangle.

使用 right () 函數代替。

int & QRect:: rTop ()

Returns a reference to the top coordinate of the rectangle.

使用 top () 函數代替。

void QRect:: rect ( int * x , int * y , int * width , int * height ) const

將矩形左上角位置提取到 * x 和 * y ,和其尺度到 * width 和 * height .

使用 getRect () 函數代替。

另請參閱 setRect ().