QGIS/python/core/layout/qgslayoutitemshape.sip

97 lines
2.7 KiB
Plaintext
Raw Normal View History

2017-07-17 17:11:44 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemshape.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutItemShape : QgsLayoutItem
{
%Docstring
Layout item for basic filled shapes (e.g. rectangles, ellipses).
2017-07-17 17:11:44 +10:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutitemshape.h"
%End
public:
enum Shape
{
Ellipse,
Rectangle,
Triangle
};
2017-10-16 16:05:03 +10:00
2017-07-17 17:11:44 +10:00
explicit QgsLayoutItemShape( QgsLayout *layout );
%Docstring
Constructor for QgsLayoutItemShape, with the specified parent ``layout``.
%End
virtual int type() const;
virtual QString stringType() const;
2017-07-17 17:11:44 +10:00
QgsLayoutItemShape::Shape shapeType() const;
2017-07-17 17:11:44 +10:00
%Docstring
Returns the type of shape (e.g. rectangle, ellipse, etc).
.. seealso:: setShapeType()
:rtype: QgsLayoutItemShape.Shape
2017-07-17 17:11:44 +10:00
%End
void setShapeType( QgsLayoutItemShape::Shape type );
%Docstring
Sets the ``type`` of shape (e.g. rectangle, ellipse, etc).
.. seealso:: shapeType()
2017-07-17 17:11:44 +10:00
%End
void setSymbol( QgsFillSymbol *symbol );
2017-07-17 17:11:44 +10:00
%Docstring
Sets the fill ``symbol`` used to draw the shape. Ownership is not transferred
and a clone of the symbol is made.
.. seealso:: symbol()
2017-07-17 17:11:44 +10:00
%End
QgsFillSymbol *symbol();
2017-07-17 17:11:44 +10:00
%Docstring
Returns the fill symbol used to draw the shape.
.. seealso:: setSymbol()
:rtype: QgsFillSymbol
2017-07-17 17:11:44 +10:00
%End
void setCornerRadius( QgsLayoutMeasurement radius );
%Docstring
Sets the corner ``radius`` for rounded rectangle corners.
.. seealso:: cornerRadius()
%End
QgsLayoutMeasurement cornerRadius() const;
%Docstring
Returns the corner radius for rounded rectangle corners.
.. seealso:: setCornerRadius()
:rtype: QgsLayoutMeasurement
%End
virtual QRectF boundingRect() const;
2017-07-18 13:04:03 +10:00
2017-07-17 17:11:44 +10:00
protected:
virtual void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemshape.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/