18 #ifndef QGSCOMPOSERSHAPE_H 19 #define QGSCOMPOSERSHAPE_H 48 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget )
override;
54 bool writeXML( QDomElement& elem, QDomDocument & doc )
const override;
60 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc )
override;
67 void setCornerRadius(
double radius );
81 void setUseSymbolV2(
bool useSymbolV2 );
85 QRectF boundingRect()
const override;
97 virtual void drawFrame( QPainter* p )
override;
108 void refreshSymbol();
114 double mCornerRadius;
119 double mMaxSymbolBleed;
121 QRectF mCurrentRectangle;
124 void drawShape( QPainter* p );
127 void drawShapeUsingSymbol( QPainter* p );
130 void createDefaultShapeStyleSymbol();
133 QPointF pointOnLineWithDistance(
const QPointF& startPoint,
const QPointF& directionPoint,
double distance )
const;
136 void updateBoundingRect();
139 #endif // QGSCOMPOSERSHAPEITEM_H virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
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 * shapeStyleSymbol()
Returns the QgsFillSymbolV2 used to draw the shape.
Graphics scene for map printing.
virtual QString displayName() const
Get item display name.
A composer items that draws common shapes (ellipse, triangle, rectangle)
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Sets item state from DOM element.
virtual int type() const override
return correct graphics item type.
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.