QGIS/python/core/composer/qgspaperitem.sip

53 lines
1.7 KiB
Plaintext
Raw Normal View History

2015-07-29 11:52:14 +02:00
/** Item representing a grid. This is drawn separately to the underlying paper item since the grid needs to be
2014-01-27 09:22:24 +01:00
* drawn above all other composer items, while the paper item is drawn below all others.*/
class QgsPaperGrid : QGraphicsRectItem
{
%TypeHeaderCode
#include <qgspaperitem.h>
%End
2014-01-27 09:22:24 +01:00
public:
QgsPaperGrid( double x, double y, double width, double height, QgsComposition* composition );
~QgsPaperGrid();
/** \brief Reimplementation of QCanvasItem::paint*/
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
};
2015-07-29 11:52:14 +02:00
/** Item representing the paper.*/
2014-01-27 09:22:24 +01:00
class QgsPaperItem : QgsComposerItem
{
%TypeHeaderCode
#include <qgspaperitem.h>
%End
public:
QgsPaperItem( QgsComposition* c /TransferThis/ );
QgsPaperItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/ );
~QgsPaperItem();
2015-07-29 11:52:14 +02:00
/** Return correct graphics item type. */
virtual int type() const;
/** \brief Reimplementation of QCanvasItem::paint*/
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
2015-07-29 11:52:14 +02:00
/** Stores state in Dom element
* @param elem is Dom element corresponding to 'Composer' tag
* @param doc Dom document
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
2015-07-29 11:52:14 +02:00
/** Sets state from Dom document
* @param itemElem is Dom node corresponding to item tag
* @param doc is the Dom document
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
2014-01-26 18:35:21 +01:00
virtual void setSceneRect( const QRectF& rectangle );
private:
QgsPaperItem();
2015-07-29 11:52:14 +02:00
/** Set flags and z-value*/
void initialize();
};