Line item.
More...
#include <bpsgraphicsitem.h>
List of all members.
Public Member Functions |
| | BpsGraphicsLineItem (QGraphicsItem *aParent=0) |
| | Constructor for the class.
|
| QLineF | line () const |
| QPointF | p1 () const |
| QPointF | p2 () const |
| QPen | pen () const |
| void | setLine (const QLineF &aLine) |
| | Set new line parameters for the item.
|
| void | setP1 (const QPointF &aPoint) |
| | Set point 1.
|
| void | setP2 (const QPointF &aPoint) |
| | Set point 2.
|
| void | setPen (const QPen &aPen) |
| | Set a new pen value.
|
Detailed Description
Line item.
Compared to QGraphicsLineItem, this class has following improvements:
- Selection is drawn as a line instead as a bounding rectangle.
- The shape is created with a line width of 1 in stead of 0 when the pen size is 0, otherwise single selection would not work.
- Additional methods p1(), p2(), setP1() and setP2() to directly access the two points.
Constructor & Destructor Documentation
| BpsGraphicsLineItem::BpsGraphicsLineItem |
( |
QGraphicsItem * |
aParent = 0 | ) |
|
Constructor for the class.
- Parameters:
-
Member Function Documentation
| QLineF BpsGraphicsLineItem::line |
( |
| ) |
const |
- Returns:
- The QLineF value of the item.
| QPointF BpsGraphicsLineItem::p1 |
( |
| ) |
const |
- Returns:
- The first point of the line.
| QPointF BpsGraphicsLineItem::p2 |
( |
| ) |
const |
- Returns:
- The second point of the line.
| QPen BpsGraphicsLineItem::pen |
( |
| ) |
const |
- Returns:
- The current pen value.
| void BpsGraphicsLineItem::setLine |
( |
const QLineF & |
aLine | ) |
|
Set new line parameters for the item.
- Parameters:
-
| [in] | aLine | The new line parameters. |
| void BpsGraphicsLineItem::setP1 |
( |
const QPointF & |
aPoint | ) |
|
Set point 1.
- Parameters:
-
| [in] | aPoint | The new position to set. |
| void BpsGraphicsLineItem::setP2 |
( |
const QPointF & |
aPoint | ) |
|
Set point 2.
- Parameters:
-
| [in] | aPoint | The new position to set. |
| void BpsGraphicsLineItem::setPen |
( |
const QPen & |
aPen | ) |
|
Set a new pen value.
- Parameters:
-
| [in] | aPen | The new pen value. |
The documentation for this class was generated from the following file: