![]() |
Home · All Classes · Main Classes · Grouped Classes · Modules · Functions | ![]() |
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene. More...
#include <QGraphicsLineItem>
Inherits QGraphicsItem.
This class was introduced in Qt 4.2.
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.
To set the item's line, pass a QLineF to QGraphicsLineItem's constructor, or call setLine(). line() returns the current line.
QGraphicsLineItem uses the line and the pen width to provide a reasonable implementation of boundingRect(), shape(), and contains(). The paint() function draws the line using the item's associated pen, which you can set by calling setPen().
See also QGraphicsPathItem, QGraphicsRectItem, QGraphicsEllipseItem, QGraphicsTextItem, QGraphicsPolygonItem, QGraphicsPixmapItem, and The Graphics View Framework.
Constructs a QGraphicsLineItem. parent and scene are passed to QGraphicsItem's constructor.
Constructs a QGraphicsLineItem, using line as the default line. parent and scene are passed to QGraphicsItem's constructor.
Destroys the QGraphicsLineItem.
Returns the item's line, or QLineF() if no line has been set.
See also setLine().
Returns the item's pen, or QPen() if no pen has been set.
See also setPen().
Sets the item's line to line.
See also line().
This is an overloaded member function, provided for convenience.
Sets the item's pen to pen. If no pen is set, the line will be painted using a black solid 0-width line.
See also pen().
Copyright © 2006 Trolltech | Trademarks | Qt 4.2.0-tp1 |