QGIS/python/core/layout/qgslayoutitemshape.sip

114 lines
3.0 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-12-15 10:36:55 -04:00
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
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutItemShape, with the specified parent ``layout``.
2017-07-17 17:11:44 +10:00
%End
virtual int type() const;
virtual QIcon icon() const;
2017-07-17 17:11:44 +10:00
2017-10-16 20:35:34 +10:00
virtual QString displayName() const;
QgsLayoutItemShape::Shape shapeType() const;
2017-07-17 17:11:44 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the type of shape (e.g. rectangle, ellipse, etc).
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setShapeType()`
2017-07-17 17:11:44 +10:00
%End
void setShapeType( QgsLayoutItemShape::Shape type );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``type`` of shape (e.g. rectangle, ellipse, etc).
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`shapeType()`
2017-07-17 17:11:44 +10:00
%End
void setSymbol( QgsFillSymbol *symbol );
2017-07-17 17:11:44 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the fill ``symbol`` used to draw the shape. Ownership is not transferred
and a clone of the symbol is made.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`symbol()`
2017-07-17 17:11:44 +10:00
%End
QgsFillSymbol *symbol();
2017-07-17 17:11:44 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the fill symbol used to draw the shape.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSymbol()`
2017-07-17 17:11:44 +10:00
%End
void setCornerRadius( QgsLayoutMeasurement radius );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the corner ``radius`` for rounded rectangle corners.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`cornerRadius()`
2017-07-17 17:11:44 +10:00
%End
QgsLayoutMeasurement cornerRadius() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the corner radius for rounded rectangle corners.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setCornerRadius()`
2017-07-17 17:11:44 +10:00
%End
virtual QRectF boundingRect() const;
2017-07-18 13:04:03 +10:00
2017-07-17 17:11:44 +10:00
virtual double estimatedFrameBleed() const;
2017-07-17 17:11:44 +10:00
protected:
virtual void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 );
virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const;
virtual bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context );
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 *
************************************************************************/