|
QGIS API Documentation
2.8.2-Wien
|
An item which is drawn inside a QgsComposerMap, eg a grid or map overview. More...
#include <qgscomposermapitem.h>

Public Member Functions | |
| QgsComposerMapItem (const QString &name, QgsComposerMap *map) | |
| Constructor for QgsComposerMapItem. | |
| virtual | ~QgsComposerMapItem () |
| virtual const QgsComposerMap * | composerMap () const |
| Get composer map for the item. | |
| virtual void | draw (QPainter *painter)=0 |
| Draws the item on to a painter. | |
| virtual bool | enabled () const |
| Returns whether the item will be drawn. | |
| QString | id () const |
| Get the unique id for the map item. | |
| virtual QString | name () const |
| Get friendly display name for the item. | |
| 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. | |
| virtual void | setEnabled (const bool enabled) |
| Controls whether the item will be drawn. | |
| virtual void | setName (const QString &name) |
| Sets the friendly display name for the item. | |
| virtual bool | usesAdvancedEffects () const |
| Returns true if the item is drawn using advanced effects, such as blend modes. | |
| virtual bool | writeXML (QDomElement &elem, QDomDocument &doc) const override |
| Stores map item state in DOM element. | |
Public Member Functions inherited from QgsComposerObject | |
| QgsComposerObject (QgsComposition *composition) | |
| Constructor. | |
| virtual | ~QgsComposerObject () |
| const QgsComposition * | composition () const |
| Returns the composition the item is attached to. | |
| QgsComposition * | composition () |
| QgsDataDefined * | dataDefinedProperty (const DataDefinedProperty property) const |
| Returns a reference to the data defined settings for one of the item's data defined properties. | |
| void | setDataDefinedProperty (const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field) |
| Sets parameters for a data defined property for the item. | |
Protected Attributes | |
| QgsComposerMap * | mComposerMap |
| Associated composer map. | |
| bool | mEnabled |
| True if item is to be displayed on map. | |
| QString | mName |
| Friendly display name. | |
| QString | mUuid |
| Unique id. | |
Protected Attributes inherited from QgsComposerObject | |
| QgsComposition * | mComposition |
| QMap < QgsComposerObject::DataDefinedProperty, QString > | mDataDefinedNames |
| Map of data defined properties for the item to string name to use when exporting item to xml. | |
Additional Inherited Members | |
Public Types inherited from QgsComposerObject | |
| enum | DataDefinedProperty { NoProperty = 0, AllProperties, TestProperty, PresetPaperSize, PaperWidth, PaperHeight, NumPages, PaperOrientation, PageNumber, PositionX, PositionY, ItemWidth, ItemHeight, ItemRotation, Transparency, BlendMode, ExcludeFromExports, MapRotation, MapScale, MapXMin, MapYMin, MapXMax, MapYMax, MapAtlasMargin, PictureSource, SourceUrl } |
| Data defined properties for different item types. More... | |
| enum | PropertyValueType { EvaluatedValue = 0, OriginalValue } |
| Specifies whether the value returned by a function should be the original, user set value, or the current evaluated value for the property. More... | |
Public Slots inherited from QgsComposerObject | |
| virtual void | refreshDataDefinedProperty (const DataDefinedProperty property=AllProperties) |
| Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value. | |
| virtual void | repaint () |
| Triggers a redraw for the item. | |
Signals inherited from QgsComposerObject | |
| void | itemChanged () |
| Emitted when the item changes. | |
Protected Member Functions inherited from QgsComposerObject | |
| bool | dataDefinedEvaluate (const QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue) |
| Evaluate a data defined property and return the calculated value. | |
An item which is drawn inside a QgsComposerMap, eg a grid or map overview.
Definition at line 29 of file qgscomposermapitem.h.
| QgsComposerMapItem::QgsComposerMapItem | ( | const QString & | name, |
| QgsComposerMap * | map | ||
| ) |
Constructor for QgsComposerMapItem.
| name | friendly display name for item |
| map | QgsComposerMap the item is attached to |
Definition at line 22 of file qgscomposermapitem.cpp.
|
virtual |
Definition at line 32 of file qgscomposermapitem.cpp.
|
inlinevirtual |
Get composer map for the item.
Definition at line 72 of file qgscomposermapitem.h.
|
pure virtual |
Draws the item on to a painter.
| painter | destination QPainter |
Implemented in QgsComposerMapGrid, and QgsComposerMapOverview.
|
inlinevirtual |
Returns whether the item will be drawn.
Definition at line 101 of file qgscomposermapitem.h.
|
inline |
Get the unique id for the map item.
Definition at line 77 of file qgscomposermapitem.h.
|
inlinevirtual |
Get friendly display name for the item.
Definition at line 89 of file qgscomposermapitem.h.
|
overridevirtual |
Sets map item state from a DOM document.
| itemElem | is DOM node corresponding to a 'ComposerMapGrid' tag |
| doc | is DOM document |
Reimplemented from QgsComposerObject.
Reimplemented in QgsComposerMapGrid, and QgsComposerMapOverview.
Definition at line 46 of file qgscomposermapitem.cpp.
|
virtual |
Sets composer map for the item.
| map | composer map |
Definition at line 55 of file qgscomposermapitem.cpp.
|
inlinevirtual |
Controls whether the item will be drawn.
| enabled | set to true to enable drawing of the item |
Definition at line 95 of file qgscomposermapitem.h.
|
inlinevirtual |
Sets the friendly display name for the item.
| name | display name |
Definition at line 83 of file qgscomposermapitem.h.
|
inlinevirtual |
Returns true if the item is drawn using advanced effects, such as blend modes.
Reimplemented in QgsComposerMapGrid, and QgsComposerMapOverview.
Definition at line 106 of file qgscomposermapitem.h.
|
overridevirtual |
Stores map item state in DOM element.
| elem | is DOM element corresponding to a 'ComposerMap' tag |
| doc | DOM document |
Reimplemented from QgsComposerObject.
Reimplemented in QgsComposerMapGrid, and QgsComposerMapOverview.
Definition at line 37 of file qgscomposermapitem.cpp.
|
protected |
Associated composer map.
Definition at line 114 of file qgscomposermapitem.h.
|
protected |
True if item is to be displayed on map.
Definition at line 120 of file qgscomposermapitem.h.
|
protected |
Friendly display name.
Definition at line 111 of file qgscomposermapitem.h.
|
protected |
Unique id.
Definition at line 117 of file qgscomposermapitem.h.
1.8.1.2