68 if ( mBoundingRectangle.
isEmpty() )
95 mBoundingRectangle =
QRectF( 0, 0, mBoundingRectangle.width(), mBoundingRectangle.height() );
114 mItems.
remove( static_cast<QgsComposerItem*>(
sender() ) );
182 for ( ; itemIt != mItems.
end(); ++itemIt )
198 if ( !composerItemList.
isEmpty() )
207 for (
int i = 0; i < elementNodes.
count(); ++i )
218 if ( item && ( item->mUuid == uuid || item->mTemplateUuid == uuid ) )
QRectF mapRectFromItem(const QGraphicsItem *item, const QRectF &rect) const
static void relativeResizeRect(QRectF &rectToResize, const QRectF &boundsBefore, const QRectF &boundsAfter)
Resizes a QRectF relative to a resized bounding rectangle.
QDomNodeList elementsByTagName(const QString &tagname) const
void setStyle(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
QDomNode appendChild(const QDomNode &newChild)
QString attribute(const QString &name, const QString &defValue) const
QgsComposerModel * itemsModel()
Returns the items model attached to the composition.
QList< QGraphicsItem * > items() const
void removeItems() override
Removes the items but does not delete them.
A item that forms part of a map composition.
void drawFrame(QPainter *p) override
Draw black frame around item.
virtual void setSelected(bool s)
Set selected, selected item should be highlighted.
double itemRotation(const QgsComposerObject::PropertyValueType valueType=QgsComposerObject::EvaluatedValue) const
Returns the current rotation for the composer item.
const_iterator insert(const T &value)
QRectF mapRectToScene(const QRectF &rect) const
bool _writeXML(QDomElement &itemElem, QDomDocument &doc) const
Writes parameter that are not subclass specific in document.
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
QgsComposition::PlotStyle plotStyle() const
QSet< QgsComposerItem * > items()
bool _readXML(const QDomElement &itemElem, const QDomDocument &doc)
Reads parameter that are not subclass specific in document.
QgsComposerItemGroup(QgsComposition *c)
QDomElement toElement() const
void drawRect(const QRectF &rectangle)
QGraphicsItemGroup * group() const
virtual void setVisibility(const bool visible) override
Sets visibility for item.
void removeItem(QGraphicsItem *item)
virtual void drawSelectionBoxes(QPainter *p)
Draws additional graphics on selected items.
void setPen(const QColor &color)
bool mFrame
True if item fram needs to be painted.
void setAttribute(const QString &name, const QString &value)
void addItem(QgsComposerItem *item) override
Adds an item to the group.
QPointF mapFromScene(const QPointF &point) const
QString uuid() const
Get item identification name.
QRectF united(const QRectF &rectangle) const
void setColor(const QColor &color)
Graphics scene for map printing.
virtual bool isRemoved() const
Returns whether this item has been removed from the composition.
bool contains(const T &value) const
QgsComposition * mComposition
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
Draw outline and ev.
QPointF mapToScene(const QPointF &point) const
bool remove(const T &value)
bool readXML(const QDomElement &itemElem, const QDomDocument &doc) override
Sets state from Dom document.
virtual void setItemRotation(const double r, const bool adjustPosition=false)
Sets the item rotation.
void setSceneRect(const QRectF &rectangle) override
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size un...
virtual void setSceneRect(const QRectF &rectangle)
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size un...
bool writeXML(QDomElement &elem, QDomDocument &doc) const override
Stores state in Dom node.
void setIsGroupMember(const bool isGroupMember)
Sets whether this item is part of a group.
void setItemRemoved(QgsComposerItem *item)
Marks an item as removed from the composition.
QDomElement createElement(const QString &tagName)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void setVisibility(const bool visible)
Sets visibility for item.
void destroyed(QObject *obj)
QDomNode at(int index) const