QCanvasRectangle(3qt)

NAME
QCanvasRectangle - A rectangle with a movable top-left point

#include <qcanvas.h>

Inherits QCanvasPolygonalItem.

  Public Members
QCanvasRectangle ( QCanvas * canvas )
QCanvasRectangle ( const QRect &, QCanvas * canvas )
QCanvasRectangle ( int x, int y, int width, int height, QCanvas * canvas )
~QCanvasRectangle ()
int width () const
int height () const
void setSize ( int w, int h )
QSize size () const
QRect rect () const
virtual int rtti () const

  Protected Members
virtual void drawShape ( QPainter & )
QPointArray chunks () const

DESCRIPTION
A rectangle with a movable top-left point.

Paints a rectangle in a QBrush and QPen.

MEMBER FUNCTION DOCUMENTATION

QCanvasRectangle::QCanvasRectangle ( QCanvas * canvas )
Constructs a rectangle (0,0,32,32) on canvas.

QCanvasRectangle::QCanvasRectangle ( const QRect & r, QCanvas * canvas )
Constructs a rectangle positioned and sized by r on canvas.

QCanvasRectangle::QCanvasRectangle ( int x, int y, int width, int height, QCanvas * canvas )
Constructs a rectangle with position x, y and size width by height, on canvas.

QCanvasRectangle::~QCanvasRectangle ()
Destructs the rectangle.

QPointArray QCanvasRectangle::areaPoints () const [virtual]
Reimplemented for internal reasons; the API is not affected.

Reimplemented from QCanvasPolygonalItem.

bool QCanvasRectangle::collidesWith ( const QCanvasItem * i ) const [virtual]
Reimplemented for internal reasons; the API is not affected.

Reimplemented from QCanvasItem.

void QCanvasRectangle::drawShape ( QPainter & p ) [virtual protected]
Draws the rectangle on p.

Reimplemented from QCanvasPolygonalItem.

int QCanvasRectangle::height () const
Returns the height of the rectangle.

QRect QCanvasRectangle::rect () const
Returns the integer-converted x(), y() position and size() of the rectangle as a QRect.

int QCanvasRectangle::rtti () const [virtual]
Returns 5.

See also QCanvasItem::rtti().

Reimplemented from QCanvasItem.

void QCanvasRectangle::setSize ( int width, int height )
Sets the width and height of the rectangle.

QSize QCanvasRectangle::size () const
Returns the width() and height() of the rectangle.

See also rect() and setSize().

int QCanvasRectangle::width () const
Returns the width of the rectangle.

SEE ALSO
http://doc.trolltech.com/qcanvasrectangle.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qcanvasrectangle.3qt) and the Qt version (2.3.1).