QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Slots | Public Member Functions | List of all members
QgsComposerMapOverview Class Reference

An individual overview which is drawn above the map content in a QgsComposerMap, and shows the extent of another QgsComposerMap. More...

#include <qgscomposermapoverview.h>

Inheritance diagram for QgsComposerMapOverview:
Inheritance graph
[legend]

Public Slots

void overviewExtentChanged ()
 Handles recentering of the map and redrawing of the map's overview. More...
 
- Public Slots inherited from QgsComposerObject
virtual void refreshDataDefinedProperty (const DataDefinedProperty property=AllProperties, const QgsExpressionContext *context=nullptr)
 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...
 

Public Member Functions

 QgsComposerMapOverview (const QString &name, QgsComposerMap *map)
 Constructor for QgsComposerMapOverview. More...
 
virtual ~QgsComposerMapOverview ()
 
QPainter::CompositionMode blendMode () const
 Retrieves the blending mode used for drawing the overview. More...
 
bool centered () const
 Returns whether the extent of the map is forced to center on the overview. More...
 
void connectSignals ()
 Reconnects signals for overview map, so that overview correctly follows changes to source map's extent. More...
 
void draw (QPainter *painter) override
 Draws an overview. More...
 
int frameMapId () const
 Returns id of source map. More...
 
QgsFillSymbolV2frameSymbol ()
 Gets the fill symbol used for drawing the overview extent. More...
 
const QgsFillSymbolV2frameSymbol () const
 Gets the fill symbol used for drawing the overview extent. More...
 
bool inverted () const
 Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. More...
 
bool readXML (const QDomElement &itemElem, const QDomDocument &doc) override
 Sets overview state from a DOM document. More...
 
void setBlendMode (const QPainter::CompositionMode blendMode)
 Sets the blending mode used for drawing the overview. More...
 
void setCentered (const bool centered)
 Sets whether the extent of the map is forced to center on the overview. More...
 
void setFrameMap (const int mapId)
 Sets overview frame map. More...
 
void setFrameSymbol (QgsFillSymbolV2 *symbol)
 Sets the fill symbol used for drawing the overview extent. More...
 
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. More...
 
bool usesAdvancedEffects () const override
 Returns true if the item is drawn using advanced effects, such as blend modes. More...
 
bool writeXML (QDomElement &elem, QDomDocument &doc) const override
 Stores overview state in DOM element. More...
 
- Public Member Functions inherited from QgsComposerMapItem
 QgsComposerMapItem (const QString &name, QgsComposerMap *map)
 Constructor for QgsComposerMapItem. More...
 
virtual ~QgsComposerMapItem ()
 
virtual const QgsComposerMapcomposerMap () const
 Get composer map for the item. 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 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...
 
- Public Member Functions inherited from QgsComposerObject
 QgsComposerObject (QgsComposition *composition)
 Constructor. More...
 
virtual ~QgsComposerObject ()
 
const QgsCompositioncomposition () const
 Returns the composition the item is attached to. More...
 
QgsCompositioncomposition ()
 
virtual QgsExpressionContextcreateExpressionContext () const
 Creates an expression context relating to the objects' 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...
 
QgsDataDefineddataDefinedProperty (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)
 
QObjectchild (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< QByteArraydynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) 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 QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () 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)
 
QThreadthread () const
 

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...
 
- 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
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Protected Attributes inherited from QgsComposerMapItem
QgsComposerMapmComposerMap
 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
QgsCompositionmComposition
 
QgsObjectCustomProperties mCustomProperties
 Custom properties for object. More...
 
QMap< QgsComposerObject::DataDefinedProperty, QStringmDataDefinedNames
 Map of data defined properties for the item to string name to use when exporting item to xml. More...
 
- Properties inherited from QObject
 objectName
 

Detailed Description

An individual overview which is drawn above the map content in a QgsComposerMap, and shows the extent of another QgsComposerMap.

Note
added in QGIS 2.5
See also
QgsComposerMapOverviewStack

Definition at line 135 of file qgscomposermapoverview.h.

Constructor & Destructor Documentation

◆ QgsComposerMapOverview()

QgsComposerMapOverview::QgsComposerMapOverview ( const QString name,
QgsComposerMap map 
)

Constructor for QgsComposerMapOverview.

Parameters
namefriendly display name for overview
mapQgsComposerMap the overview is attached to

Definition at line 26 of file qgscomposermapoverview.cpp.

◆ ~QgsComposerMapOverview()

QgsComposerMapOverview::~QgsComposerMapOverview ( )
virtual

Definition at line 58 of file qgscomposermapoverview.cpp.

Member Function Documentation

◆ blendMode()

QPainter::CompositionMode QgsComposerMapOverview::blendMode ( ) const
inline

Retrieves the blending mode used for drawing the overview.

Returns
blending mode for overview
See also
setBlendMode

Definition at line 204 of file qgscomposermapoverview.h.

◆ centered()

bool QgsComposerMapOverview::centered ( ) const
inline

Returns whether the extent of the map is forced to center on the overview.

Returns
true if map will be centered on overview
See also
setCentered

Definition at line 230 of file qgscomposermapoverview.h.

◆ connectSignals()

void QgsComposerMapOverview::connectSignals ( )

Reconnects signals for overview map, so that overview correctly follows changes to source map's extent.

Definition at line 226 of file qgscomposermapoverview.cpp.

◆ draw()

void QgsComposerMapOverview::draw ( QPainter painter)
overridevirtual

Draws an overview.

Parameters
painterdestination QPainter

Implements QgsComposerMapItem.

Definition at line 63 of file qgscomposermapoverview.cpp.

◆ frameMapId()

int QgsComposerMapOverview::frameMapId ( ) const
inline

Returns id of source map.

Returns
source map id, or -1 if no source map set

Definition at line 179 of file qgscomposermapoverview.h.

◆ frameSymbol() [1/2]

QgsFillSymbolV2* QgsComposerMapOverview::frameSymbol ( )
inline

Gets the fill symbol used for drawing the overview extent.

Returns
fill symbol for overview
See also
setFrameSymbol

Definition at line 191 of file qgscomposermapoverview.h.

◆ frameSymbol() [2/2]

const QgsFillSymbolV2* QgsComposerMapOverview::frameSymbol ( ) const
inline

Gets the fill symbol used for drawing the overview extent.

Returns
fill symbol for overview
See also
setFrameSymbol
Note
not available in python bindings

Definition at line 198 of file qgscomposermapoverview.h.

◆ inverted()

bool QgsComposerMapOverview::inverted ( ) const
inline

Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map.

Returns
true if overview frame is inverted
See also
setInverted

Definition at line 217 of file qgscomposermapoverview.h.

◆ overviewExtentChanged

void QgsComposerMapOverview::overviewExtentChanged ( )
slot

Handles recentering of the map and redrawing of the map's overview.

Definition at line 265 of file qgscomposermapoverview.cpp.

◆ readXML()

bool QgsComposerMapOverview::readXML ( const QDomElement itemElem,
const QDomDocument doc 
)
overridevirtual

Sets overview state from a DOM document.

Parameters
itemElemis DOM node corresponding to a 'ComposerMapOverview' tag
docis DOM document
See also
writeXML

Reimplemented from QgsComposerMapItem.

Definition at line 175 of file qgscomposermapoverview.cpp.

◆ setBlendMode()

void QgsComposerMapOverview::setBlendMode ( const QPainter::CompositionMode  blendMode)

Sets the blending mode used for drawing the overview.

Parameters
blendModeblending mode for overview
See also
blendMode

Definition at line 249 of file qgscomposermapoverview.cpp.

◆ setCentered()

void QgsComposerMapOverview::setCentered ( const bool  centered)

Sets whether the extent of the map is forced to center on the overview.

Parameters
centeredset to true if map will be centered on overview
See also
centered

Definition at line 259 of file qgscomposermapoverview.cpp.

◆ setFrameMap()

void QgsComposerMapOverview::setFrameMap ( const int  mapId)

Sets overview frame map.

Parameters
mapIdsource map id. -1 disables the overview frame
See also
frameMapId

Definition at line 204 of file qgscomposermapoverview.cpp.

◆ setFrameSymbol()

void QgsComposerMapOverview::setFrameSymbol ( QgsFillSymbolV2 symbol)

Sets the fill symbol used for drawing the overview extent.

Parameters
symbolfill symbol for overview
See also
frameSymbol

Definition at line 243 of file qgscomposermapoverview.cpp.

◆ setInverted()

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.

Parameters
invertedset to true if overview frame is to be inverted
See also
inverted

Definition at line 254 of file qgscomposermapoverview.cpp.

◆ usesAdvancedEffects()

bool QgsComposerMapOverview::usesAdvancedEffects ( ) const
overridevirtual

Returns true if the item is drawn using advanced effects, such as blend modes.

Returns
true if item uses advanced effects

Reimplemented from QgsComposerMapItem.

Definition at line 199 of file qgscomposermapoverview.cpp.

◆ writeXML()

bool QgsComposerMapOverview::writeXML ( QDomElement elem,
QDomDocument doc 
) const
overridevirtual

Stores overview state in DOM element.

Parameters
elemis DOM element corresponding to a 'ComposerMap' tag
docDOM document
See also
readXML

Reimplemented from QgsComposerMapItem.

Definition at line 152 of file qgscomposermapoverview.cpp.


The documentation for this class was generated from the following files: