QGIS API Documentation
2.8.2-Wien
|
An individual overview which is drawn above the map content in a QgsComposerMap, and shows the extent of another QgsComposerMap. More...
#include <qgscomposermapoverview.h>
Public Slots | |
void | overviewExtentChanged () |
Handles recentering of the map and redrawing of the map's overview. |
Public Member Functions | |
QgsComposerMapOverview (const QString &name, QgsComposerMap *map) | |
Constructor for QgsComposerMapOverview. | |
virtual | ~QgsComposerMapOverview () |
QPainter::CompositionMode | blendMode () const |
Retrieves the blending mode used for drawing the overview. | |
bool | centered () const |
Returns whether the extent of the map is forced to center on the overview. | |
void | connectSignals () |
Reconnects signals for overview map, so that overview correctly follows changes to source map's extent. | |
void | draw (QPainter *painter) override |
Draws an overview. | |
int | frameMapId () const |
Returns id of source map. | |
QgsFillSymbolV2 * | frameSymbol () |
Gets the fill symbol used for drawing the overview extent. | |
const QgsFillSymbolV2 * | frameSymbol () const |
Gets the fill symbol used for drawing the overview extent. | |
bool | inverted () const |
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. | |
bool | readXML (const QDomElement &itemElem, const QDomDocument &doc) override |
Sets overview state from a DOM document. | |
void | setBlendMode (const QPainter::CompositionMode blendMode) |
Sets the blending mode used for drawing the overview. | |
void | setCentered (const bool centered) |
Sets whether the extent of the map is forced to center on the overview. | |
void | setFrameMap (const int mapId) |
Sets overview frame map. | |
void | setFrameSymbol (QgsFillSymbolV2 *symbol) |
Sets the fill symbol used for drawing the overview extent. | |
void | setInverted (const bool inverted) |
Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. | |
bool | usesAdvancedEffects () const override |
Returns true if the item is drawn using advanced effects, such as blend modes. | |
bool | writeXML (QDomElement &elem, QDomDocument &doc) const override |
Stores overview state in DOM element. | |
Public Member Functions inherited from QgsComposerMapItem | |
QgsComposerMapItem (const QString &name, QgsComposerMap *map) | |
Constructor for QgsComposerMapItem. | |
virtual | ~QgsComposerMapItem () |
virtual const QgsComposerMap * | composerMap () const |
Get composer map for the item. | |
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 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. | |
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. |
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... | |
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. | |
Protected Attributes inherited from QgsComposerMapItem | |
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. |
An individual overview which is drawn above the map content in a QgsComposerMap, and shows the extent of another QgsComposerMap.
Definition at line 135 of file qgscomposermapoverview.h.
QgsComposerMapOverview::QgsComposerMapOverview | ( | const QString & | name, |
QgsComposerMap * | map | ||
) |
Constructor for QgsComposerMapOverview.
name | friendly display name for overview |
map | QgsComposerMap the overview is attached to |
Definition at line 26 of file qgscomposermapoverview.cpp.
|
virtual |
Definition at line 58 of file qgscomposermapoverview.cpp.
|
inline |
Retrieves the blending mode used for drawing the overview.
Definition at line 203 of file qgscomposermapoverview.h.
|
inline |
Returns whether the extent of the map is forced to center on the overview.
Definition at line 229 of file qgscomposermapoverview.h.
void QgsComposerMapOverview::connectSignals | ( | ) |
Reconnects signals for overview map, so that overview correctly follows changes to source map's extent.
Definition at line 223 of file qgscomposermapoverview.cpp.
|
overridevirtual |
Draws an overview.
painter | destination QPainter |
Implements QgsComposerMapItem.
Definition at line 63 of file qgscomposermapoverview.cpp.
|
inline |
Returns id of source map.
Definition at line 179 of file qgscomposermapoverview.h.
|
inline |
Gets the fill symbol used for drawing the overview extent.
Definition at line 191 of file qgscomposermapoverview.h.
|
inline |
Gets the fill symbol used for drawing the overview extent.
Definition at line 197 of file qgscomposermapoverview.h.
|
inline |
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map.
Definition at line 216 of file qgscomposermapoverview.h.
|
slot |
Handles recentering of the map and redrawing of the map's overview.
Definition at line 262 of file qgscomposermapoverview.cpp.
|
overridevirtual |
Sets overview state from a DOM document.
itemElem | is DOM node corresponding to a 'ComposerMapOverview' tag |
doc | is DOM document |
Reimplemented from QgsComposerMapItem.
Definition at line 172 of file qgscomposermapoverview.cpp.
void QgsComposerMapOverview::setBlendMode | ( | const QPainter::CompositionMode | blendMode | ) |
Sets the blending mode used for drawing the overview.
blendMode | blending mode for overview |
Definition at line 246 of file qgscomposermapoverview.cpp.
void QgsComposerMapOverview::setCentered | ( | const bool | centered | ) |
Sets whether the extent of the map is forced to center on the overview.
centered | set to true if map will be centered on overview |
Definition at line 256 of file qgscomposermapoverview.cpp.
void QgsComposerMapOverview::setFrameMap | ( | const int | mapId | ) |
Sets overview frame map.
mapId | source map id. -1 disables the overview frame |
Definition at line 201 of file qgscomposermapoverview.cpp.
void QgsComposerMapOverview::setFrameSymbol | ( | QgsFillSymbolV2 * | symbol | ) |
Sets the fill symbol used for drawing the overview extent.
symbol | fill symbol for overview |
Definition at line 240 of file qgscomposermapoverview.cpp.
void QgsComposerMapOverview::setInverted | ( | const bool | inverted | ) |
Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map.
inverted | set to true if overview frame is to be inverted |
Definition at line 251 of file qgscomposermapoverview.cpp.
|
overridevirtual |
Returns true if the item is drawn using advanced effects, such as blend modes.
Reimplemented from QgsComposerMapItem.
Definition at line 196 of file qgscomposermapoverview.cpp.
|
overridevirtual |
Stores overview state in DOM element.
elem | is DOM element corresponding to a 'ComposerMap' tag |
doc | DOM document |
Reimplemented from QgsComposerMapItem.
Definition at line 149 of file qgscomposermapoverview.cpp.