mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
- update methods of existing classes - add comment to methods missing in the sip bindings - split up collective sip files into single files and use same directory structure in python/ as in src/ - add a lot of missing classes (some might not make sense because of missing python methods in those classes) - remove some non-existing methods from the header files - add scripts/sipdiff - replace some usages of std::vector and std::set with QVector/QSet
58 lines
1.9 KiB
Plaintext
58 lines
1.9 KiB
Plaintext
/**A composer items that draws common shapes (ellipse, triangle, rectangle)*/
|
|
class QgsComposerShape: QgsComposerItem
|
|
{
|
|
%TypeHeaderCode
|
|
#include "qgscomposershape.h"
|
|
%End
|
|
public:
|
|
|
|
enum Shape
|
|
{
|
|
Ellipse,
|
|
Rectangle,
|
|
Triangle
|
|
};
|
|
|
|
QgsComposerShape( QgsComposition* composition /TransferThis/);
|
|
QgsComposerShape( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/);
|
|
~QgsComposerShape();
|
|
|
|
/** return correct graphics item type. Added in v1.7 */
|
|
virtual int type() const;
|
|
|
|
/** \brief Reimplementation of QCanvasItem::paint - draw on canvas */
|
|
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
|
|
|
|
/** stores state in Dom element
|
|
* @param elem is Dom element corresponding to 'Composer' tag
|
|
* @param doc write template file
|
|
*/
|
|
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
|
|
|
|
/** sets state from Dom document
|
|
* @param itemElem is Dom node corresponding to item tag
|
|
* @param doc is Dom document
|
|
*/
|
|
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
|
|
|
//setters and getters
|
|
void setLineWidth( double width );
|
|
double lineWidth() const;
|
|
void setOutlineColor( const QColor& color );
|
|
QColor outlineColor() const;
|
|
void setFillColor( const QColor& color );
|
|
QColor fillColor() const;
|
|
QgsComposerShape::Shape shapeType() const;
|
|
void setShapeType( QgsComposerShape::Shape s );
|
|
bool transparentFill() const;
|
|
void setTransparentFill( bool transparent );
|
|
|
|
/**Sets this items bound in scene coordinates such that 1 item size units
|
|
corresponds to 1 scene size unit. Also, the shape is scaled*/
|
|
void setSceneRect( const QRectF& rectangle );
|
|
|
|
public slots:
|
|
/**Sets item rotation and resizes item bounds such that the shape always has the same size*/
|
|
virtual void setRotation( double r );
|
|
};
|