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
|
2017-10-16 17:34:19 +10:00
|
|
|
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:
|
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
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
|
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
virtual int type() const;
|
|
|
|
virtual QString stringType() const;
|
2017-07-17 17:11:44 +10:00
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
QgsLayoutItemShape::Shape shapeType() const;
|
2017-07-17 17:11:44 +10:00
|
|
|
%Docstring
|
2017-10-16 17:34:19 +10:00
|
|
|
Returns the type of shape (e.g. rectangle, ellipse, etc).
|
|
|
|
.. seealso:: setShapeType()
|
|
|
|
:rtype: QgsLayoutItemShape.Shape
|
2017-07-17 17:11:44 +10:00
|
|
|
%End
|
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
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
|
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
void setSymbol( QgsFillSymbol *symbol );
|
2017-07-17 17:11:44 +10:00
|
|
|
%Docstring
|
2017-10-16 17:34:19 +10:00
|
|
|
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
|
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
QgsFillSymbol *symbol();
|
2017-07-17 17:11:44 +10:00
|
|
|
%Docstring
|
2017-10-16 17:34:19 +10:00
|
|
|
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
|
|
|
|
|
2017-10-16 17:34:19 +10:00
|
|
|
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 *
|
|
|
|
************************************************************************/
|