A collection of map items which are drawn above the map content in a QgsComposerMap.
More...
#include <qgscomposermapitem.h>
A collection of map items which are drawn above the map content in a QgsComposerMap.
The item stack controls which items are drawn and the order they are drawn in.
- Note
- added in QGIS 2.5
- See also
- QgsComposerMapItem
Definition at line 133 of file qgscomposermapitem.h.
◆ QgsComposerMapItemStack()
QgsComposerMapItemStack::QgsComposerMapItemStack |
( |
QgsComposerMap * |
map | ) |
|
◆ ~QgsComposerMapItemStack()
QgsComposerMapItemStack::~QgsComposerMapItemStack |
( |
| ) |
|
|
virtual |
◆ addItem()
Adds a new map item to the stack and takes ownership of the item.
The item will be added to the end of the stack, and rendered above any existing map items already present in the stack.
- Parameters
-
- Note
- after adding an item to the stack update() should be called for the QgsComposerMap to prevent rendering artifacts
- See also
- removeItem
Definition at line 75 of file qgscomposermapitem.cpp.
◆ asList()
Returns a list of QgsComposerMapItems contained by the stack.
- Returns
- list of items
Definition at line 167 of file qgscomposermapitem.cpp.
◆ constItem()
Returns a const reference to an item within the stack.
- Parameters
-
- Returns
- const reference to item, if found
- See also
- item
Definition at line 124 of file qgscomposermapitem.cpp.
◆ containsAdvancedEffects()
bool QgsComposerMapItemStack::containsAdvancedEffects |
( |
| ) |
const |
Returns whether any items within the stack contain advanced effects, such as blending modes.
- Returns
- true if item stack contains advanced effects
Definition at line 204 of file qgscomposermapitem.cpp.
◆ drawItems()
void QgsComposerMapItemStack::drawItems |
( |
QPainter * |
painter | ) |
|
◆ item() [1/2]
◆ item() [2/2]
Returns a reference to an item within the stack.
- Parameters
-
index | item position in the stack |
- Returns
- reference to item if found
- See also
- constItem
Definition at line 152 of file qgscomposermapitem.cpp.
◆ moveItemDown()
void QgsComposerMapItemStack::moveItemDown |
( |
const QString & |
itemId | ) |
|
|
protected |
Moves an item up the stack, causing it to be rendered above other items.
- Parameters
-
- Note
- after moving an item within the stack, update() should be called for the QgsComposerMap to redraw the map with the new item stack order
- See also
- moveItemUp
Definition at line 108 of file qgscomposermapitem.cpp.
◆ moveItemUp()
void QgsComposerMapItemStack::moveItemUp |
( |
const QString & |
itemId | ) |
|
|
protected |
Moves an item up the stack, causing it to be rendered above other items.
- Parameters
-
- Note
- after moving an item within the stack, update() should be called for the QgsComposerMap to redraw the map with the new item stack order
- See also
- moveItemDown
Definition at line 92 of file qgscomposermapitem.cpp.
◆ operator[]()
Returns a reference to an item within the stack.
- Parameters
-
idx | item position in the stack |
- Returns
- reference to item if found
- See also
- constItem
-
item
- Note
- not available in python bindings
Definition at line 162 of file qgscomposermapitem.cpp.
◆ readXML()
◆ removeItem()
void QgsComposerMapItemStack::removeItem |
( |
const QString & |
itemId | ) |
|
|
protected |
◆ removeItems()
void QgsComposerMapItemStack::removeItems |
( |
| ) |
|
|
protected |
Clears the item stack and deletes all QgsComposerMapItems contained by the stack.
Definition at line 217 of file qgscomposermapitem.cpp.
◆ size()
int QgsComposerMapItemStack::size |
( |
| ) |
const |
|
inline |
Returns the number of items in the stack.
- Returns
- number of items in the stack
Definition at line 147 of file qgscomposermapitem.h.
◆ writeXML()
Stores the state of the item stack in a DOM node.
- Parameters
-
elem | is DOM element corresponding to a 'ComposerMap' tag |
doc | DOM document |
- Returns
- true if write was successful
- See also
- readXML
Definition at line 178 of file qgscomposermapitem.cpp.
◆ mComposerMap
◆ mItems
The documentation for this class was generated from the following files: