18 #ifndef QGSCOMPOSERSHAPE_H
19 #define QGSCOMPOSERSHAPE_H
48 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
54 bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
60 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc );
67 void setCornerRadius(
double radius );
81 void setUseSymbolV2(
bool useSymbolV2 );
109 void drawShape( QPainter* p );
112 void drawShapeUsingSymbol( QPainter* p );
115 void createDefaultShapeStyleSymbol();
118 QPointF pointOnLineWithDistance(
const QPointF& startPoint,
const QPointF& directionPoint,
double distance )
const;
121 #endif // QGSCOMPOSERSHAPEITEM_H
void setShapeType(QgsComposerShape::Shape s)
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)=0
sets state from Dom document
Shape mShape
Ellipse, rectangle or triangle.
virtual double estimatedFrameBleed() const
Returns the estimated amount the item's frame bleeds outside the item's actual rectangle.
A item that forms part of a map composition.
QgsComposerShape::Shape shapeType() const
virtual void drawFrame(QPainter *p)
Draw black frame around item.
QgsFillSymbolV2 * mShapeStyleSymbol
QgsFillSymbolV2 * shapeStyleSymbol()
Returns the QgsFillSymbolV2 used to draw the shape.
Graphics scene for map printing.
virtual int type() const
return correct graphics item type.
A composer items that draws common shapes (ellipse, triangle, rectangle)
virtual void drawBackground(QPainter *p)
Draw background.
double cornerRadius() const
Returns the radius for rounded rectangle corners.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const =0
stores state in Dom element