|
QGIS API Documentation
2.12.0-Lyon
|
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. More... | |
| virtual | ~QgsComposerMapItem () |
| virtual const QgsComposerMap * | composerMap () const |
| Get composer map for the item. More... | |
| virtual void | draw (QPainter *painter)=0 |
| Draws the item on to a painter. More... | |
| virtual bool | enabled () const |
| Returns whether the item will be drawn. More... | |
| QString | id () const |
| Get the unique id for the map item. More... | |
| virtual QString | name () const |
| Get friendly display name for the item. More... | |
| virtual bool | readXML (const QDomElement &itemElem, const QDomDocument &doc) override |
| Sets map item state from a DOM document. More... | |
| virtual void | setComposerMap (QgsComposerMap *map) |
| Sets composer map for the item. More... | |
| virtual void | setEnabled (const bool enabled) |
| Controls whether the item will be drawn. More... | |
| virtual void | setName (const QString &name) |
| Sets the friendly display name for the item. More... | |
| virtual bool | usesAdvancedEffects () const |
| Returns true if the item is drawn using advanced effects, such as blend modes. More... | |
| virtual bool | writeXML (QDomElement &elem, QDomDocument &doc) const override |
| Stores map item state in DOM element. More... | |
Public Member Functions inherited from QgsComposerObject | |
| QgsComposerObject (QgsComposition *composition) | |
| Constructor. More... | |
| virtual | ~QgsComposerObject () |
| const QgsComposition * | composition () const |
| Returns the composition the item is attached to. More... | |
| QgsComposition * | composition () |
| virtual QgsExpressionContext * | createExpressionContext () const |
| Creates an expression context relating to the objects's current state. More... | |
| QStringList | customProperties () const |
| Return list of keys stored in custom properties for the object. More... | |
| QVariant | customProperty (const QString &key, const QVariant &defaultValue=QVariant()) const |
| Read a custom property from the object. More... | |
| QgsDataDefined * | dataDefinedProperty (const DataDefinedProperty property) const |
| Returns a reference to the data defined settings for one of the item's data defined properties. More... | |
| void | removeCustomProperty (const QString &key) |
| Remove a custom property from the object. More... | |
| void | setCustomProperty (const QString &key, const QVariant &value) |
| Set a custom property for the object. More... | |
| 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. More... | |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| QObject (QObject *parent, const char *name) | |
| virtual | ~QObject () |
| bool | blockSignals (bool block) |
| QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
| const QObjectList & | children () const |
| const char * | className () const |
| bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| bool | disconnect (const QObject *receiver, const char *method) |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
| void | dumpObjectInfo () |
| void | dumpObjectTree () |
| QList< QByteArray > | dynamicPropertyNames () const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | findChild (const QString &name) const |
| QList< T > | findChildren (const QRegExp ®Exp) const |
| QList< T > | findChildren (const QString &name) const |
| bool | inherits (const char *className) const |
| void | insertChild (QObject *object) |
| void | installEventFilter (QObject *filterObj) |
| bool | isA (const char *className) const |
| bool | isWidgetType () const |
| void | killTimer (int id) |
| virtual const QMetaObject * | metaObject () const |
| void | moveToThread (QThread *targetThread) |
| const char * | name () const |
| const char * | name (const char *defaultName) const |
| QString | objectName () const |
| QObject * | parent () const |
| QVariant | property (const char *name) const |
| void | removeChild (QObject *object) |
| void | removeEventFilter (QObject *obj) |
| void | setName (const char *name) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| bool | setProperty (const char *name, const QVariant &value) |
| bool | signalsBlocked () const |
| int | startTimer (int interval) |
| QThread * | thread () const |
Protected Attributes | |
| QgsComposerMap * | mComposerMap |
| Associated composer map. More... | |
| bool | mEnabled |
| True if item is to be displayed on map. More... | |
| QString | mName |
| Friendly display name. More... | |
| QString | mUuid |
| Unique id. More... | |
Protected Attributes inherited from QgsComposerObject | |
| QgsComposition * | mComposition |
| QgsObjectCustomProperties | mCustomProperties |
| Custom properties for object. More... | |
| QMap< QgsComposerObject::DataDefinedProperty, QString > | mDataDefinedNames |
| Map of data defined properties for the item to string name to use when exporting item to xml. More... | |
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, MapLayers, MapStylePreset, 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, const QgsExpressionContext *context=0) |
| Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value. More... | |
| virtual void | repaint () |
| Triggers a redraw for the item. More... | |
Signals inherited from QgsComposerObject | |
| void | itemChanged () |
| Emitted when the item changes. More... | |
Static Public Member Functions inherited from QObject | |
| bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QgsComposerObject | |
| bool | dataDefinedEvaluate (const QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue, const QgsExpressionContext &context=QgsExpressionContext()) const |
| Evaluate a data defined property and return the calculated value. More... | |
Protected Member Functions inherited from QObject | |
| bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const char *signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const char *signal) |
| int | receivers (const char *signal) const |
| QObject * | sender () const |
| int | senderSignalIndex () const |
| virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
| QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
| objectName | |
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.9.1