26 , mUuid(
QUuid::createUuid().toString() )
84 if (
mItems.
at( i )->id() == itemId )
129 if (( *it )->id() == itemId )
143 if (( *it )->id() == itemId )
184 ( *itemIt )->writeXML( elem, doc );
200 ( *itemIt )->draw( painter );
209 if (( *it )->enabled() && ( *it )->usesAdvancedEffects() )
QgsComposerMapItem * item(const QString &itemId) const
Returns a reference to an item within the stack.
A base class for objects which belong to a map composition.
void addItem(QgsComposerMapItem *item)
Adds a new map item to the stack and takes ownership of the item.
QString attribute(const QString &name, const QString &defValue) const
QgsComposerMapItem(const QString &name, QgsComposerMap *map)
Constructor for QgsComposerMapItem.
QString mName
Friendly display name.
const T & at(int i) const
void drawItems(QPainter *painter)
Draws the items from the stack on a specified painter.
An item which is drawn inside a QgsComposerMap, eg a grid or map overview.
int indexOf(const T &value, int from) const
bool containsAdvancedEffects() const
Returns whether any items within the stack contain advanced effects, such as blending modes...
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores the state of the item stack in a DOM node.
virtual ~QgsComposerMapItem()
void append(const T &value)
bool mEnabled
True if item is to be displayed on map.
QgsComposerMapItemStack(QgsComposerMap *map)
Constructor for QgsComposerMapItemStack.
void setAttribute(const QString &name, const QString &value)
void removeItem(const QString &itemId)
Removes an item from the stack and deletes the corresponding QgsComposerMapItem.
const QgsComposerMapItem * constItem(const QString &itemId) const
Returns a const reference to an item within the stack.
void moveItemUp(const QString &itemId)
Moves an item up the stack, causing it to be rendered above other items.
QgsComposerMapItem & operator[](int idx)
Returns a reference to an item within the stack.
QgsComposerMap * mComposerMap
Associated composer map.
Object representing map window.
void moveItemDown(const QString &itemId)
Moves an item up the stack, causing it to be rendered above other items.
QList< QgsComposerMapItem *> asList() const
Returns a list of QgsComposerMapItems contained by the stack.
QList< QgsComposerMapItem *> mItems
virtual ~QgsComposerMapItemStack()
void swap(QList< T > &other)
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc) override
Sets map item state from a DOM document.
virtual void setComposerMap(QgsComposerMap *map)
Sets composer map for the item.
const_iterator constEnd() const
const_iterator constBegin() const
void removeItems()
Clears the item stack and deletes all QgsComposerMapItems contained by the stack. ...
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const override
Stores map item state in DOM element.