QtCanvasLine Class Reference

The QtCanvasLine class provides a line on a QtCanvas. More...

#include <QtCanvasLine>

Inherits QtCanvasPolygonalItem.

Public Functions

Additional Inherited Members


Detailed Description

The QtCanvasLine class provides a line on a QtCanvas.

The line inherits functionality from QtCanvasPolygonalItem, for example the setPen() function. The start and end points of the line are set with setPoints().

Like any other canvas item lines can be moved with QtCanvasItem::move() and QtCanvasItem::moveBy(), or by setting coordinates with QtCanvasItem::setX(), QtCanvasItem::setY() and QtCanvasItem::setZ().


Member Function Documentation

QtCanvasLine::QtCanvasLine ( QtCanvas * canvas )

Constructs a line from (0, 0) to (0, 0) on canvas.

See also setPoints().

QtCanvasLine::~QtCanvasLine ()

Destroys the line.

QPoint QtCanvasLine::endPoint () const

Returns the end point of the line.

See also setPoints() and startPoint().

int QtCanvasLine::rtti () const   [virtual]

Returns 7 (QtCanvasItem::Rtti_Line).

Reimplemented from QtCanvasItem.

See also QtCanvasItem::rtti().

void QtCanvasLine::setPoints ( int xa, int ya, int xb, int yb )

Sets the line's start point to (xa, ya) and its end point to (xb, yb).

QPoint QtCanvasLine::startPoint () const

Returns the start point of the line.

See also setPoints() and endPoint().


Copyright © 2005 Trolltech Trademarks