QGIS API Documentation
2.10.1-Pisa
|
A collection of grids which is drawn above the map content in a QgsComposerMap. More...
#include <qgscomposermapgrid.h>
Public Member Functions | |
QgsComposerMapGridStack (QgsComposerMap *map) | |
Constructor for QgsComposerMapGridStack. More... | |
virtual | ~QgsComposerMapGridStack () |
void | addGrid (QgsComposerMapGrid *grid) |
Adds a new map grid to the stack and takes ownership of the grid. More... | |
QList< QgsComposerMapGrid * > | asList () const |
Returns a list of QgsComposerMapGrids contained by the stack. More... | |
const QgsComposerMapGrid * | constGrid (const QString &gridId) const |
Returns a const reference to a grid within the stack. More... | |
QgsComposerMapGrid * | grid (const QString &gridId) const |
Returns a reference to a grid within the stack. More... | |
QgsComposerMapGrid * | grid (const int index) const |
Returns a reference to a grid within the stack. More... | |
double | maxGridExtension () const |
Calculates the maximum distance grids within the stack extend beyond the QgsComposerMap's item rect. More... | |
void | moveGridDown (const QString &gridId) |
Moves a grid down the stack, causing it to be rendered below other grids. More... | |
void | moveGridUp (const QString &gridId) |
Moves a grid up the stack, causing it to be rendered above other grids. More... | |
QgsComposerMapGrid & | operator[] (int idx) |
Returns a reference to a grid within the stack. More... | |
bool | readXML (const QDomElement &elem, const QDomDocument &doc) override |
Sets the grid stack's state from a DOM document. More... | |
void | removeGrid (const QString &gridId) |
Removes a grid from the stack and deletes the corresponding QgsComposerMapGrid. 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 QgsComposerMapItem * | constItem (const QString &itemId) const |
Returns a const reference to an item within the stack. More... | |
QgsComposerMapItem * | item (const QString &itemId) const |
Returns a reference to an item within the stack. More... | |
QgsComposerMapItem * | item (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... | |
QgsComposerMapItem & | operator[] (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 | |
QgsComposerMap * | mComposerMap |
QList< QgsComposerMapItem * > | mItems |
A collection of grids which is drawn above the map content in a QgsComposerMap.
The grid stack controls which grids are drawn and the order they are drawn in.
Definition at line 45 of file qgscomposermapgrid.h.
QgsComposerMapGridStack::QgsComposerMapGridStack | ( | QgsComposerMap * | map | ) |
Constructor for QgsComposerMapGridStack.
map | QgsComposerMap the grid stack is attached to |
Definition at line 37 of file qgscomposermapgrid.cpp.
|
virtual |
Definition at line 43 of file qgscomposermapgrid.cpp.
void QgsComposerMapGridStack::addGrid | ( | QgsComposerMapGrid * | grid | ) |
Adds a new map grid to the stack and takes ownership of the grid.
The grid will be added to the end of the stack, and rendered above any existing map grids already present in the stack.
grid | QgsComposerMapGrid to add to the stack |
Definition at line 47 of file qgscomposermapgrid.cpp.
QList< QgsComposerMapGrid * > QgsComposerMapGridStack::asList | ( | ) | const |
Returns a list of QgsComposerMapGrids contained by the stack.
Definition at line 85 of file qgscomposermapgrid.cpp.
const QgsComposerMapGrid * QgsComposerMapGridStack::constGrid | ( | const QString & | gridId | ) | const |
Returns a const reference to a grid within the stack.
gridId | id for the QgsComposerMapGrid to find |
Definition at line 67 of file qgscomposermapgrid.cpp.
QgsComposerMapGrid * QgsComposerMapGridStack::grid | ( | const QString & | gridId | ) | const |
Returns a reference to a grid within the stack.
gridId | id for the QgsComposerMapGrid to find |
Definition at line 73 of file qgscomposermapgrid.cpp.
QgsComposerMapGrid * QgsComposerMapGridStack::grid | ( | const int | index | ) | const |
Returns a reference to a grid within the stack.
index | grid position in the stack |
Definition at line 79 of file qgscomposermapgrid.cpp.
double QgsComposerMapGridStack::maxGridExtension | ( | ) | const |
Calculates the maximum distance grids within the stack extend beyond the QgsComposerMap's item rect.
Definition at line 124 of file qgscomposermapgrid.cpp.
void QgsComposerMapGridStack::moveGridDown | ( | const QString & | gridId | ) |
Moves a grid down the stack, causing it to be rendered below other grids.
gridId | id for the QgsComposerMapGrid to move down |
Definition at line 62 of file qgscomposermapgrid.cpp.
void QgsComposerMapGridStack::moveGridUp | ( | const QString & | gridId | ) |
Moves a grid up the stack, causing it to be rendered above other grids.
gridId | id for the QgsComposerMapGrid to move up |
Definition at line 57 of file qgscomposermapgrid.cpp.
QgsComposerMapGrid & QgsComposerMapGridStack::operator[] | ( | int | idx | ) |
Returns a reference to a grid within the stack.
idx | grid position in the stack |
Definition at line 100 of file qgscomposermapgrid.cpp.
|
overridevirtual |
Sets the grid stack's state from a DOM document.
elem | is DOM node corresponding to 'a ComposerMap' tag |
doc | DOM document |
Implements QgsComposerMapItemStack.
Definition at line 107 of file qgscomposermapgrid.cpp.
void QgsComposerMapGridStack::removeGrid | ( | const QString & | gridId | ) |
Removes a grid from the stack and deletes the corresponding QgsComposerMapGrid.
gridId | id for the QgsComposerMapGrid to remove |
Definition at line 52 of file qgscomposermapgrid.cpp.