2009-02-27 13:57:26 +00:00
|
|
|
/**Item representing the paper. May draw the snapping grid lines if composition is in
|
|
|
|
preview mode*/
|
|
|
|
class QgsPaperItem: QgsComposerItem
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgspaperitem.h>
|
|
|
|
%End
|
|
|
|
public:
|
2010-11-25 21:45:52 +00:00
|
|
|
QgsPaperItem( QgsComposition* c /TransferThis/ );
|
|
|
|
QgsPaperItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/ );
|
2009-02-27 13:57:26 +00:00
|
|
|
~QgsPaperItem();
|
|
|
|
|
2010-11-25 21:45:52 +00:00
|
|
|
/** return correct graphics item type. Added in v1.7 */
|
|
|
|
virtual int type() const;
|
|
|
|
|
2009-02-27 13:57:26 +00:00
|
|
|
/** \brief Reimplementation of QCanvasItem::paint*/
|
|
|
|
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
|
|
|
|
|
|
|
|
/** stores state in Dom node
|
|
|
|
* @param node is Dom node corresponding to 'Composer' tag
|
|
|
|
* @param temp write template file
|
|
|
|
*/
|
|
|
|
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
|
|
|
|
|
|
|
|
/** sets state from Dom document
|
|
|
|
* @param itemElem is Dom node corresponding to item tag
|
|
|
|
*/
|
|
|
|
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
|
|
|
|
|
|
|
private:
|
|
|
|
QgsPaperItem();
|
2010-11-25 21:45:52 +00:00
|
|
|
};
|