2012-09-24 02:28:15 +02:00
|
|
|
class QgsComposerItemGroup: QgsComposerItem
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgscomposeritemgroup.h>
|
|
|
|
%End
|
|
|
|
public:
|
2014-10-19 10:54:50 +11:00
|
|
|
QgsComposerItemGroup( QgsComposition* c /TransferThis/ );
|
2012-09-24 02:28:15 +02:00
|
|
|
~QgsComposerItemGroup();
|
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Return correct graphics item type. */
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int type() const;
|
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Adds an item to the group. All the group members are deleted
|
2012-09-24 02:28:15 +02:00
|
|
|
if the group is deleted*/
|
|
|
|
void addItem( QgsComposerItem* item );
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Removes the items but does not delete them*/
|
2012-09-24 02:28:15 +02:00
|
|
|
void removeItems();
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Draw outline and ev. selection handles*/
|
2012-09-24 02:28:15 +02:00
|
|
|
void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Sets this items bound in scene coordinates such that 1 item size units
|
2012-09-24 02:28:15 +02:00
|
|
|
corresponds to 1 scene size unit*/
|
|
|
|
void setSceneRect( const QRectF& rectangle );
|
2014-08-17 13:37:26 +02:00
|
|
|
|
2014-07-28 20:05:47 +10:00
|
|
|
//overridden to also hide grouped items
|
|
|
|
virtual void setVisibility( const bool visible );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Stores state in Dom node
|
2012-09-24 02:28:15 +02:00
|
|
|
* @param elem is Dom element corresponding to 'Composer' tag
|
|
|
|
* @param doc is the Dom document
|
|
|
|
*/
|
|
|
|
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
|
|
|
|
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Sets state from Dom document
|
2012-09-24 02:28:15 +02:00
|
|
|
* @param itemElem is Dom node corresponding to item tag
|
|
|
|
* @param doc is the Dom document
|
|
|
|
*/
|
|
|
|
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
|
|
|
|
|
|
|
QSet<QgsComposerItem*> items();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void childItemDeleted( QgsComposerItem* item );
|
|
|
|
|
2014-01-26 18:35:21 +01:00
|
|
|
public slots:
|
|
|
|
void itemDestroyed();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
protected:
|
|
|
|
void drawFrame( QPainter* p );
|
|
|
|
};
|