Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgscomposeritemgroup.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscomposeritemgroup.h
3  ----------------------
4  begin : 2nd June 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 #include "qgscomposeritem.h"
19 #include <QSet>
20 
24 class CORE_EXPORT QgsComposerItemGroup: public QgsComposerItem
25 {
26  Q_OBJECT
27  public:
30 
32  virtual int type() const { return ComposerItemGroup; }
33 
36  void addItem( QgsComposerItem* item );
38  void removeItems();
40  void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
43  void setSceneRect( const QRectF& rectangle );
45  void resize( double dx, double dy );
46 
51  bool writeXML( QDomElement& elem, QDomDocument & doc ) const { return true; }
52 
57  bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) { return true; }
58 
59  QSet<QgsComposerItem*> items() { return mItems; }
60 
61  signals:
62  void childItemDeleted( QgsComposerItem* item );
63 
64  protected:
65  void drawFrame( QPainter* p );
66 
67  private:
68  QSet<QgsComposerItem*> mItems;
70 };
71 
72