Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgscomposeritemgroup.h 00003 ---------------------- 00004 begin : 2nd June 2008 00005 copyright : (C) 2008 by Marco Hugentobler 00006 email : marco dot hugentobler at karto dot baug dot ethz dot ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "qgscomposeritem.h" 00019 #include <QSet> 00020 00024 class CORE_EXPORT QgsComposerItemGroup: public QgsComposerItem 00025 { 00026 Q_OBJECT 00027 public: 00028 QgsComposerItemGroup( QgsComposition* c ); 00029 ~QgsComposerItemGroup(); 00030 00032 virtual int type() const { return ComposerItemGroup; } 00033 00036 void addItem( QgsComposerItem* item ); 00038 void removeItems(); 00040 void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 ); 00043 void setSceneRect( const QRectF& rectangle ); 00045 void resize( double dx, double dy ); 00046 00051 bool writeXML( QDomElement& elem, QDomDocument & doc ) const 00052 { Q_UNUSED( elem ); Q_UNUSED( doc ); return true; } 00053 00058 bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) 00059 { Q_UNUSED( itemElem ); Q_UNUSED( doc ); return true; } 00060 00061 QSet<QgsComposerItem*> items() { return mItems; } 00062 00063 signals: 00064 void childItemDeleted( QgsComposerItem* item ); 00065 00066 protected: 00067 void drawFrame( QPainter* p ); 00068 00069 private: 00070 QSet<QgsComposerItem*> mItems; 00071 QRectF mSceneBoundingRectangle; 00072 }; 00073 00074