|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# Qt 3 Support Members for QRect

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

- QRect class reference

### Public Functions

- void addCoords ( int xp1, int yp1, int xp2, int yp2 )
- void coords ( int * xp1, int * yp1, int * xp2, int * yp2 ) 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 * w, int * h ) const

## Member Function Documentation

### void QRect::addCoords ( int xp1, int yp1, int xp2, int yp2 )

Adds xp1, yp1, xp2 and yp2 respectively to the existing coordinates of the rectangle.

See also adjust().

### void QRect::coords ( int * xp1, int * yp1, int * xp2, int * yp2 ) const

Use getCoords() instead.

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

Use translate() instead.

### void QRect::moveBy ( const QPoint & p )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use translate() instead.

### QRect QRect::normalize () const

Use QRect::normalized() instead

Returns a normalized rectangle, i.e. a rectangle that has a non-negative width and height.

It swaps left and right if left() > right(), and swaps top and bottom if top() > bottom().

See also isValid().

### int & QRect::rBottom ()

Returns a reference to the bottom coordinate of the rectangle.

See also rLeft(), rTop(), and rRight().

### int & QRect::rLeft ()

Returns a reference to the left coordinate of the rectangle.

See also rTop(), rRight(), and rBottom().

### int & QRect::rRight ()

Returns a reference to the right coordinate of the rectangle.

See also rLeft(), rTop(), and rBottom().

### int & QRect::rTop ()

Returns a reference to the top coordinate of the rectangle.

See also rLeft(), rRight(), and rBottom().

### void QRect::rect ( int * x, int * y, int * w, int * h ) const

Use getRect() instead.