Frapper  1.0a
Public Member Functions | List of all members
PainterPanel::ClosedCurveItem Class Reference

CloseCurveItem class. More...

#include <PainterGraphicsItems.h>

Inheritance diagram for PainterPanel::ClosedCurveItem:
Inheritance graph
[legend]
Collaboration diagram for PainterPanel::ClosedCurveItem:
Collaboration graph
[legend]

Public Member Functions

 ClosedCurveItem (QPointF startPos, QPen pen, QBrush brush)
 Constructor of the CurveItem class.
 
virtual void updatePosition (QPointF pos)
 Updates the last added position of the curve.
 
virtual void addPosition (QPointF pos)
 Adds a new position to the curve.
 
virtual void skipLastPosition (bool &emptyItem)
 Skip the last position of the curve.
 
virtual void updateShape ()
 Call this function to update the shape of the item.
 
virtual ItemType GetItemType ()
 Get the type of this item.
 
- Public Member Functions inherited from PainterPanel::CurveItem
 CurveItem (QPointF startPos, QPen pen, QBrush brush)
 Constructor of the CurveItem class.
 
virtual ~CurveItem ()
 Destructor of the CurveItem class.
 
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.
 
- Public Member Functions inherited from PainterPanel::BaseShapeItem
 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 ()
 

Additional Inherited Members

- Public Types inherited from PainterPanel::BaseShapeItem
enum  ItemType {
  BASE =0, PAINT, LINE, RECT,
  CIRCLE, ELLIPSE, POLYGON, POLYLINE,
  CURVE, CLOSEDCURVE, NUM_ITEMTYPES
}
 
enum  { Type = UserType + 1 }
 
- Protected Attributes inherited from PainterPanel::CurveItem
QList< PointHandle * > m_cpoints
 The control points of the curve.
 
QPainterPath m_controlShape
 The polygon defined by the control points of the curve.
 

Detailed Description

CloseCurveItem class.

This class implements an item which represents a closed curve of degree 3 by several positions and 2 additional control points per position

Constructor & Destructor Documentation

PainterPanel::ClosedCurveItem::ClosedCurveItem ( QPointF  startPos,
QPen  pen,
QBrush  brush 
)
inline

Constructor of the CurveItem class.

Member Function Documentation

virtual void PainterPanel::ClosedCurveItem::updatePosition ( QPointF  pos)
inlinevirtual

Updates the last added position of the curve.

Parameters
posThe new position of the last position of the curve

Reimplemented from PainterPanel::CurveItem.

virtual void PainterPanel::ClosedCurveItem::addPosition ( QPointF  pos)
inlinevirtual

Adds a new position to the curve.

Parameters
posThe new position to append to the curve

Reimplemented from PainterPanel::CurveItem.

virtual void PainterPanel::ClosedCurveItem::skipLastPosition ( bool &  emptyItem)
inlinevirtual

Skip the last position of the curve.

Parameters
emptyItemSet to true, if this operation creates an empty item, otherwise false

Reimplemented from PainterPanel::CurveItem.

virtual void PainterPanel::ClosedCurveItem::updateShape ( )
inlinevirtual

Call this function to update the shape of the item.

Reimplemented from PainterPanel::CurveItem.

virtual ItemType PainterPanel::ClosedCurveItem::GetItemType ( )
inlinevirtual

Get the type of this item.

Reimplemented from PainterPanel::CurveItem.


The documentation for this class was generated from the following file: