17 #ifndef QGSCOMPOSERMAPITEM_H 18 #define QGSCOMPOSERMAPITEM_H 46 virtual void draw( QPainter* painter ) = 0;
53 virtual bool writeXML( QDomElement& elem, QDomDocument & doc )
const override;
60 virtual bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc )
override;
77 QString
id()
const {
return mUuid; }
83 virtual void setName(
const QString& name ) { mName = name; }
89 virtual QString
name()
const {
return mName; }
95 virtual void setEnabled(
const bool enabled ) { mEnabled = enabled; }
101 virtual bool enabled()
const {
return mEnabled; }
148 int size()
const {
return mItems.size(); }
156 virtual bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
164 virtual bool readXML(
const QDomElement& elem,
const QDomDocument& doc ) = 0;
169 void drawItems( QPainter* painter );
175 bool containsAdvancedEffects()
const;
195 void removeItem(
const QString& itemId );
203 void moveItemUp(
const QString& itemId );
211 void moveItemDown(
const QString& itemId );
246 QList< QgsComposerMapItem* > asList()
const;
260 #endif //QGSCOMPOSERMAPITEM_H
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
A base class for objects which belong to a map composition.
int size() const
Returns the number of items in the stack.
virtual const QgsComposerMap * composerMap() const
Get composer map for the item.
QString mName
Friendly display name.
An item which is drawn inside a QgsComposerMap, eg a grid or map overview.
bool mEnabled
True if item is to be displayed on map.
virtual void setEnabled(const bool enabled)
Controls whether the item will be drawn.
QgsComposerMap * mComposerMap
Associated composer map.
QString id() const
Get the unique id for the map item.
Object representing map window.
virtual QString name() const
Get friendly display name for the item.
QList< QgsComposerMapItem * > mItems
virtual bool enabled() const
Returns whether the item will be drawn.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Sets item state from DOM element.
A collection of map items which are drawn above the map content in a QgsComposerMap.
virtual bool usesAdvancedEffects() const
Returns true if the item is drawn using advanced effects, such as blend modes.
virtual void setName(const QString &name)
Sets the friendly display name for the item.
QgsComposerMap * mComposerMap