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 );
85 QRectF boundingRect()
const;
105 void refreshSymbol();
121 void drawShape( QPainter* p );
124 void drawShapeUsingSymbol( QPainter* p );
127 void createDefaultShapeStyleSymbol();
130 QPointF pointOnLineWithDistance(
const QPointF& startPoint,
const QPointF& directionPoint,
double distance )
const;
133 void updateBoundingRect();
136 #endif // QGSCOMPOSERSHAPEITEM_H
QRectF mCurrentRectangle
Current bounding rectangle of shape.
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.
virtual void setSceneRect(const QRectF &rectangle)
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size un...
double cornerRadius() const
Returns the radius for rounded rectangle corners.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const =0
stores state in Dom element