QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
Public Member Functions | List of all members
QgsComposerMapOverviewStack Class Reference

A collection of overviews which are drawn above the map content in a QgsComposerMap. More...

#include <qgscomposermapoverview.h>

Inheritance diagram for QgsComposerMapOverviewStack:
Inheritance graph
[legend]

Public Member Functions

 QgsComposerMapOverviewStack (QgsComposerMap *map)
 Constructor for QgsComposerMapOverviewStack. More...
 
virtual ~QgsComposerMapOverviewStack ()
 
void addOverview (QgsComposerMapOverview *overview)
 Adds a new map overview to the stack and takes ownership of the overview. More...
 
QList< QgsComposerMapOverview * > asList () const
 Returns a list of QgsComposerMapOverviews contained by the stack. More...
 
const QgsComposerMapOverviewconstOverview (const QString &overviewId) const
 Returns a const reference to an overview within the stack. More...
 
void moveOverviewDown (const QString &overviewId)
 Moves an overview down the stack, causing it to be rendered below other overviews. More...
 
void moveOverviewUp (const QString &overviewId)
 Moves an overview up the stack, causing it to be rendered above other overviews. More...
 
QgsComposerMapOverviewoperator[] (int idx)
 Returns a reference to an overview within the stack. More...
 
QgsComposerMapOverviewoverview (const QString &overviewId) const
 Returns a reference to an overview within the stack. More...
 
QgsComposerMapOverviewoverview (const int index) const
 Returns a reference to an overview within the stack. More...
 
bool readXML (const QDomElement &elem, const QDomDocument &doc) override
 Sets the overview stack's state from a DOM document. More...
 
void removeOverview (const QString &overviewId)
 Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview. More...
 
- Public Member Functions inherited from QgsComposerMapItemStack
 QgsComposerMapItemStack (QgsComposerMap *map)
 Constructor for QgsComposerMapItemStack. More...
 
virtual ~QgsComposerMapItemStack ()
 
bool containsAdvancedEffects () const
 Returns whether any items within the stack contain advanced effects, such as blending modes. More...
 
void drawItems (QPainter *painter)
 Draws the items from the stack on a specified painter. More...
 
int size () const
 Returns the number of items in the stack. More...
 
virtual bool writeXML (QDomElement &elem, QDomDocument &doc) const
 Stores the state of the item stack in a DOM node. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QgsComposerMapItemStack
void addItem (QgsComposerMapItem *item)
 Adds a new map item to the stack and takes ownership of the item. More...
 
QList< QgsComposerMapItem * > asList () const
 Returns a list of QgsComposerMapItems contained by the stack. More...
 
const QgsComposerMapItemconstItem (const QString &itemId) const
 Returns a const reference to an item within the stack. More...
 
QgsComposerMapItemitem (const QString &itemId) const
 Returns a reference to an item within the stack. More...
 
QgsComposerMapItemitem (const int index) const
 Returns a reference to an item within the stack. More...
 
void moveItemDown (const QString &itemId)
 Moves an item up the stack, causing it to be rendered above other items. More...
 
void moveItemUp (const QString &itemId)
 Moves an item up the stack, causing it to be rendered above other items. More...
 
QgsComposerMapItemoperator[] (int idx)
 Returns a reference to an item within the stack. More...
 
void removeItem (const QString &itemId)
 Removes an item from the stack and deletes the corresponding QgsComposerMapItem. More...
 
void removeItems ()
 Clears the item stack and deletes all QgsComposerMapItems contained by the stack. More...
 
- Protected Attributes inherited from QgsComposerMapItemStack
QgsComposerMapmComposerMap
 
QList< QgsComposerMapItem * > mItems
 

Detailed Description

A collection of overviews which are drawn above the map content in a QgsComposerMap.

The overview stack controls which overviews are drawn and the order they are drawn in.

Note
added in QGIS 2.5
See also
QgsComposerMapOverview

Definition at line 39 of file qgscomposermapoverview.h.

Constructor & Destructor Documentation

QgsComposerMapOverviewStack::QgsComposerMapOverviewStack ( QgsComposerMap map)

Constructor for QgsComposerMapOverviewStack.

Parameters
mapQgsComposerMap the overview stack is attached to

Definition at line 310 of file qgscomposermapoverview.cpp.

QgsComposerMapOverviewStack::~QgsComposerMapOverviewStack ( )
virtual

Definition at line 316 of file qgscomposermapoverview.cpp.

Member Function Documentation

void QgsComposerMapOverviewStack::addOverview ( QgsComposerMapOverview overview)

Adds a new map overview to the stack and takes ownership of the overview.

The overview will be added to the end of the stack, and rendered above any existing map overviews already present in the stack.

Parameters
overviewQgsComposerMapOverview to add to the stack
Note
after adding a overview to the stack, update() should be called for the QgsComposerMap to prevent rendering artifacts
See also
removeOverview

Definition at line 321 of file qgscomposermapoverview.cpp.

QList< QgsComposerMapOverview * > QgsComposerMapOverviewStack::asList ( ) const

Returns a list of QgsComposerMapOverviews contained by the stack.

Returns
list of overviews

Definition at line 366 of file qgscomposermapoverview.cpp.

const QgsComposerMapOverview * QgsComposerMapOverviewStack::constOverview ( const QString overviewId) const

Returns a const reference to an overview within the stack.

Parameters
overviewIdid for the QgsComposerMapOverview to find
Returns
const reference to overview, if found
See also
overview

Definition at line 341 of file qgscomposermapoverview.cpp.

void QgsComposerMapOverviewStack::moveOverviewDown ( const QString overviewId)

Moves an overview down the stack, causing it to be rendered below other overviews.

Parameters
overviewIdid for the QgsComposerMapOverview to move down
Note
after moving an overview within the stack, update() should be called for the QgsComposerMap to redraw the map with the new overview stack order
See also
moveOverviewUp

Definition at line 336 of file qgscomposermapoverview.cpp.

void QgsComposerMapOverviewStack::moveOverviewUp ( const QString overviewId)

Moves an overview up the stack, causing it to be rendered above other overviews.

Parameters
overviewIdid for the QgsComposerMapOverview to move up
Note
after moving an overview within the stack, update() should be called for the QgsComposerMap to redraw the map with the new overview stack order
See also
moveOverviewDown

Definition at line 331 of file qgscomposermapoverview.cpp.

QgsComposerMapOverview & QgsComposerMapOverviewStack::operator[] ( int  idx)

Returns a reference to an overview within the stack.

Parameters
idxoverview position in the stack
Returns
reference to overview if found
See also
constOverview
overview

Definition at line 359 of file qgscomposermapoverview.cpp.

QgsComposerMapOverview * QgsComposerMapOverviewStack::overview ( const QString overviewId) const

Returns a reference to an overview within the stack.

Parameters
overviewIdid for the QgsComposerMapOverview to find
Returns
reference to overview if found
See also
constOverview

Definition at line 347 of file qgscomposermapoverview.cpp.

QgsComposerMapOverview * QgsComposerMapOverviewStack::overview ( const int  index) const

Returns a reference to an overview within the stack.

Parameters
indexoverview position in the stack
Returns
reference to overview if found
See also
constOverview

Definition at line 353 of file qgscomposermapoverview.cpp.

bool QgsComposerMapOverviewStack::readXML ( const QDomElement elem,
const QDomDocument doc 
)
overridevirtual

Sets the overview stack's state from a DOM document.

Parameters
elemis DOM node corresponding to a 'ComposerMap' tag
docDOM document
Returns
true if read was successful
See also
writeXML

Implements QgsComposerMapItemStack.

Definition at line 381 of file qgscomposermapoverview.cpp.

void QgsComposerMapOverviewStack::removeOverview ( const QString overviewId)

Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview.

Parameters
overviewIdid for the QgsComposerMapOverview to remove
Note
after removing an overview from the stack, update() should be called for the QgsComposerMap to prevent rendering artifacts
See also
addOverview

Definition at line 326 of file qgscomposermapoverview.cpp.


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