QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgspaperitem.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgspaperitem.h
3  -------------------
4  begin : September 2008
5  copyright : (C) 2008 by Marco Hugentobler
6  email : marco dot hugentobler at karto dot baug dot ethz dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPAPERITEM_H
19 #define QGSPAPERITEM_H
20 
21 #include "qgscomposeritem.h"
22 
25 class CORE_EXPORT QgsPaperItem: public QgsComposerItem
26 {
27  public:
29  QgsPaperItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition );
30  ~QgsPaperItem();
31 
33  virtual int type() const { return ComposerPaper; }
34 
36  void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
37 
42  bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
43 
48  bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
49 
50  private:
51  QgsPaperItem();
53  void initialize();
54 };
55 
56 #endif