Frapper
1.0a
|
#include <PainterGraphicsItems.h>
Public Member Functions | |
CurveItem (QPointF startPos, QPen pen, QBrush brush) | |
Constructor of the CurveItem class. | |
virtual | ~CurveItem () |
Destructor of the CurveItem class. | |
virtual void | updatePosition (QPointF pos) |
Updates the last added position of the curve. | |
virtual void | skipLastPosition (bool &emptyItem) |
Skip the last position of the curve. | |
virtual void | addPosition (QPointF pos) |
Adds a new position to the curve. | |
virtual void | updateShape () |
Call this function to update the shape of the item. | |
virtual ItemType | GetItemType () |
Get the type of this item. | |
virtual QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
React on changes of the item. | |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
Paint the curveItem with the given pen and brush If selected, also the control polygon will be drawn. | |
![]() | |
BaseShapeItem (QPen pen=QPen(), QBrush brush=QBrush()) | |
Constructor of the BaseShapeItem class. | |
virtual | ~BaseShapeItem () |
Destructor of the PainterPanel class. | |
virtual int | type () const |
Enable the use of qgraphicsitem_cast with this item. | |
virtual QRectF | boundingRect () const |
Get the bounding-rect of the shape. | |
QString | getDescriptionText () |
Protected Attributes | |
QList< PointHandle * > | m_cpoints |
The control points of the curve. | |
QPainterPath | m_controlShape |
The polygon defined by the control points of the curve. | |
![]() | |
QPainterPath | m_shape |
The shape of the item to draw. | |
QList< PointHandle * > | m_points |
The list of point handles. | |
RotationHandle * | m_rotateHandle |
The handle to rotate this shape item. | |
TranslationHandle * | m_translateHandle |
The handle to translate this shape item. | |
Private Member Functions | |
void | showControlHandles (bool show=true) |
Show/Hide handles for the control points of the curve. | |
Additional Inherited Members | |
![]() | |
enum | ItemType { BASE =0, PAINT, LINE, RECT, CIRCLE, ELLIPSE, POLYGON, POLYLINE, CURVE, CLOSEDCURVE, NUM_ITEMTYPES } |
enum | { Type = UserType + 1 } |
CurveItem class.
This class implements an item which represents a curve of degree 3 by several positions and 2 additional control points per position
|
inline |
Constructor of the CurveItem class.
|
inlinevirtual |
Destructor of the CurveItem class.
|
inlinevirtual |
Updates the last added position of the curve.
pos | The new position of the last position of the curve |
Implements PainterPanel::BaseShapeItem.
Reimplemented in PainterPanel::ClosedCurveItem.
|
inlinevirtual |
Skip the last position of the curve.
emptyItem | Set to true, if this operation creates an empty item, otherwise false |
Reimplemented from PainterPanel::BaseShapeItem.
Reimplemented in PainterPanel::ClosedCurveItem.
|
inlinevirtual |
Adds a new position to the curve.
pos | The new position to append to the curve |
Implements PainterPanel::BaseShapeItem.
Reimplemented in PainterPanel::ClosedCurveItem.
|
inlinevirtual |
Call this function to update the shape of the item.
Reimplemented from PainterPanel::BaseShapeItem.
Reimplemented in PainterPanel::ClosedCurveItem.
|
inlinevirtual |
Get the type of this item.
Reimplemented from PainterPanel::BaseShapeItem.
Reimplemented in PainterPanel::ClosedCurveItem.
|
inlinevirtual |
React on changes of the item.
Reimplemented from PainterPanel::BaseShapeItem.
|
inlinevirtual |
Paint the curveItem with the given pen and brush If selected, also the control polygon will be drawn.
Reimplemented from PainterPanel::BaseShapeItem.
|
inlineprivate |
Show/Hide handles for the control points of the curve.
|
protected |
The control points of the curve.
|
protected |
The polygon defined by the control points of the curve.