Quantum GIS API Documentation
1.8
|
A container for grouping several QgsComposerItems. More...
#include <qgscomposeritemgroup.h>
Signals | |
void | childItemDeleted (QgsComposerItem *item) |
Public Member Functions | |
QgsComposerItemGroup (QgsComposition *c) | |
~QgsComposerItemGroup () | |
virtual int | type () const |
return correct graphics item type. | |
void | addItem (QgsComposerItem *item) |
Adds an item to the group. | |
void | removeItems () |
Removes the items but does not delete them. | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
Draw outline and ev. | |
void | setSceneRect (const QRectF &rectangle) |
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size unit. | |
void | resize (double dx, double dy) |
resizes an item in x- and y direction (scene coordinates) | |
bool | writeXML (QDomElement &elem, QDomDocument &doc) const |
stores state in Dom node | |
bool | readXML (const QDomElement &itemElem, const QDomDocument &doc) |
sets state from Dom document | |
QSet< QgsComposerItem * > | items () |
Protected Member Functions | |
void | drawFrame (QPainter *p) |
Draw black frame around item. | |
Private Attributes | |
QSet< QgsComposerItem * > | mItems |
QRectF | mSceneBoundingRectangle |
A container for grouping several QgsComposerItems.
Definition at line 24 of file qgscomposeritemgroup.h.
Definition at line 23 of file qgscomposeritemgroup.cpp.
Definition at line 29 of file qgscomposeritemgroup.cpp.
References QgsComposerItem::mComposition, and mItems.
void QgsComposerItemGroup::addItem | ( | QgsComposerItem * | item | ) | [virtual] |
Adds an item to the group.
All the group members are deleted if the group is deleted
Reimplemented from QgsComposerItem.
Definition at line 42 of file qgscomposeritemgroup.cpp.
References mItems, mSceneBoundingRectangle, setSceneRect(), and QgsComposerItem::setSelected().
Referenced by QgsComposerView::groupItems().
void QgsComposerItemGroup::childItemDeleted | ( | QgsComposerItem * | item | ) | [signal] |
void QgsComposerItemGroup::drawFrame | ( | QPainter * | p | ) | [protected, virtual] |
Draw black frame around item.
Reimplemented from QgsComposerItem.
Definition at line 154 of file qgscomposeritemgroup.cpp.
References QgsComposerItem::mComposition, QgsComposerItem::mFrame, QgsComposition::plotStyle(), and QgsComposition::Preview.
Referenced by paint().
QSet<QgsComposerItem*> QgsComposerItemGroup::items | ( | ) | [inline] |
Definition at line 61 of file qgscomposeritemgroup.h.
Referenced by QgsComposerView::keyPressEvent(), and QgsComposition::removeComposerItem().
void QgsComposerItemGroup::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget = 0 |
||
) |
Draw outline and ev.
selection handles
Definition at line 106 of file qgscomposeritemgroup.cpp.
References drawFrame(), and QgsComposerItem::drawSelectionBoxes().
bool QgsComposerItemGroup::readXML | ( | const QDomElement & | itemElem, |
const QDomDocument & | doc | ||
) | [inline, virtual] |
sets state from Dom document
itemElem | is Dom node corresponding to item tag |
doc | is the Dom document |
Implements QgsComposerItem.
Definition at line 58 of file qgscomposeritemgroup.h.
void QgsComposerItemGroup::removeItems | ( | ) | [virtual] |
Removes the items but does not delete them.
Reimplemented from QgsComposerItem.
Definition at line 95 of file qgscomposeritemgroup.cpp.
References mItems.
Referenced by QgsComposerView::ungroupItems().
void QgsComposerItemGroup::resize | ( | double | dx, |
double | dy | ||
) |
resizes an item in x- and y direction (scene coordinates)
void QgsComposerItemGroup::setSceneRect | ( | const QRectF & | rectangle | ) | [virtual] |
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size unit.
Reimplemented from QgsComposerItem.
Definition at line 117 of file qgscomposeritemgroup.cpp.
References mItems.
Referenced by addItem().
virtual int QgsComposerItemGroup::type | ( | ) | const [inline, virtual] |
return correct graphics item type.
Added in v1.7
Reimplemented from QgsComposerItem.
Definition at line 32 of file qgscomposeritemgroup.h.
References QgsComposerItem::ComposerItemGroup.
bool QgsComposerItemGroup::writeXML | ( | QDomElement & | elem, |
QDomDocument & | doc | ||
) | const [inline, virtual] |
stores state in Dom node
elem | is Dom element corresponding to 'Composer' tag |
doc | is the Dom document |
Implements QgsComposerItem.
Definition at line 51 of file qgscomposeritemgroup.h.
QSet<QgsComposerItem*> QgsComposerItemGroup::mItems [private] |
Definition at line 70 of file qgscomposeritemgroup.h.
Referenced by addItem(), removeItems(), setSceneRect(), and ~QgsComposerItemGroup().
QRectF QgsComposerItemGroup::mSceneBoundingRectangle [private] |
Definition at line 71 of file qgscomposeritemgroup.h.
Referenced by addItem().