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