66 * \note added in QGIS 2.5
77 * \see QgsComposerMapGrid
88 */
9- class QgsComposerMapGridStack
9+ class QgsComposerMapGridStack : QgsComposerMapItemStack
1010{
1111%TypeHeaderCode
1212#include <qgscomposermapgrid.h>
@@ -47,11 +47,11 @@ class QgsComposerMapGridStack
4747 */
4848 void moveGridUp( const QString& gridId );
4949
50- /**Moves a grid up the stack, causing it to be rendered above other grids
51- * @param gridId id for the QgsComposerMapGrid to move up
50+ /**Moves a grid down the stack, causing it to be rendered below other grids
51+ * @param gridId id for the QgsComposerMapGrid to move down
5252 * @note after moving a grid within the stack, update() should be
5353 * called for the QgsComposerMap to redraw the map with the new grid stack order
54- * @see moveGridDown
54+ * @see moveGridUp
5555 */
5656 void moveGridDown( const QString& gridId );
5757
@@ -89,20 +89,6 @@ class QgsComposerMapGridStack
8989 */
9090 QList< QgsComposerMapGrid* > asList() const;
9191
92-
93- /**Returns the number of grids in the stack
94- * @returns number of grids in the stack
95- */
96- int size() const;
97-
98- /**Stores the state of the grid stack in a DOM node
99- * @param elem is DOM element corresponding to a 'ComposerMap' tag
100- * @param doc DOM document
101- * @returns true if write was successful
102- * @see readXML
103- */
104- bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
105-
10692 /**Sets the grid stack's state from a DOM document
10793 * @param elem is DOM node corresponding to 'a ComposerMap' tag
10894 * @param doc DOM document
@@ -111,23 +97,12 @@ class QgsComposerMapGridStack
11197 */
11298 bool readXML( const QDomElement& elem, const QDomDocument& doc );
11399
114- /**Draws the grids from the stack on a specified painter
115- * @param painter destination QPainter
116- */
117- void drawGrids( QPainter* painter );
118-
119100 /**Calculates the maximum distance grids within the stack extend
120101 * beyond the QgsComposerMap's item rect
121102 * @returns maximum grid extension
122103 */
123104 double maxGridExtension() const;
124105
125- /**Returns whether any grids within the stack contain advanced effects,
126- * such as blending modes
127- * @returns true if grid stack contains advanced effects
128- */
129- bool containsAdvancedEffects() const;
130-
131106};
132107
133108/**\ingroup MapComposer
@@ -137,7 +112,7 @@ class QgsComposerMapGridStack
137112 * \note added in QGIS 2.5
138113 * \see QgsComposerMapGridStack
139114 */
140- class QgsComposerMapGrid
115+ class QgsComposerMapGrid : QgsComposerMapItem
141116{
142117%TypeHeaderCode
143118#include <qgscomposermapgrid.h>
@@ -248,7 +223,7 @@ class QgsComposerMapGrid
248223 /**Draws a grid
249224 * @param painter destination QPainter
250225 */
251- void drawGrid ( QPainter* painter ) const;
226+ void draw ( QPainter* painter ) const;
252227
253228 /**Stores grid state in DOM element
254229 * @param elem is DOM element corresponding to a 'ComposerMap' tag
@@ -264,48 +239,6 @@ class QgsComposerMapGrid
264239 */
265240 bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
266241
267- /**Sets composer map for the grid
268- * @param map composer map
269- * @see composerMap
270- */
271- void setComposerMap( QgsComposerMap* map );
272-
273- /**Get composer map for the grid
274- * @returns composer map
275- * @see setComposerMap
276- */
277- const QgsComposerMap* composerMap() const;
278-
279- /**Sets the friendly display name for the grid
280- * @param name display name
281- * @see name
282- */
283- void setName( const QString& name );
284-
285- /**Get friendly display name for the grid
286- * @returns display name
287- * @see setName
288- */
289- QString name() const;
290-
291- /**Get the unique id for the grid
292- * @returns unique id
293- * @see name
294- */
295- QString id() const;
296-
297- /**Controls whether the grid will be drawn
298- * @param enabled set to true to enable drawing of the grid
299- * @see enabled
300- */
301- void setEnabled( const bool enabled );
302-
303- /**Returns whether the grid will be drawn
304- * @returns true if grid will be drawn on the map
305- * @see setEnabled
306- */
307- bool enabled() const;
308-
309242 /**Sets the CRS for the grid.
310243 * @param crs coordinate reference system for grid
311244 * @see crs
0 commit comments