@@ -36,7 +36,8 @@ class QgsComposerMap : QgsComposerItem
36
36
enum GridAnnotationPosition
37
37
{
38
38
InsideMapFrame = 0,
39
- OutsideMapFrame
39
+ OutsideMapFrame,
40
+ Disabled
40
41
};
41
42
42
43
enum GridAnnotationDirection
@@ -47,6 +48,21 @@ class QgsComposerMap : QgsComposerItem
47
48
BoundaryDirection
48
49
};
49
50
51
+ /**Enum for different frame borders*/
52
+ enum Border
53
+ {
54
+ Left,
55
+ Right,
56
+ Bottom,
57
+ Top
58
+ };
59
+
60
+ enum GridFrameStyle
61
+ {
62
+ NoGridFrame = 0,
63
+ Zebra //black / white pattern
64
+ };
65
+
50
66
/**@deprecated*/
51
67
void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi );
52
68
@@ -195,20 +211,32 @@ class QgsComposerMap : QgsComposerItem
195
211
void setShowGridAnnotation( bool show );
196
212
bool showGridAnnotation() const;
197
213
198
- /**Sets position of grid annotations. Possibilities are inside or outside of the map frame
199
- @note this function was added in version 1.4*/
200
- void setGridAnnotationPosition( GridAnnotationPosition p );
201
- GridAnnotationPosition gridAnnotationPosition() const;
214
+ /**Sets position of grid annotations. Possibilities are inside / outside of the map frame or disabled
215
+ @note this function was added in version 1.9*/
216
+ void setGridAnnotationPosition( GridAnnotationPosition p, QgsComposerMap::Border border );
217
+ /**@note: this function was added in version 1.9*/
218
+ GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const;
202
219
203
220
/**Sets distance between map frame and annotations
204
221
@note this function was added in version 1.4*/
205
222
void setAnnotationFrameDistance( double d );
206
223
double annotationFrameDistance() const;
207
224
208
- /**Sets grid annotation direction. Can be horizontal, vertical, direction of axis and horizontal and vertical
209
- @note this function was added in version 1.4*/
210
- void setGridAnnotationDirection( GridAnnotationDirection d );
211
- GridAnnotationDirection gridAnnotationDirection() const;
225
+ /**Sets grid annotation direction. Can be horizontal or vertical
226
+ @note this function was added in version 1.9*/
227
+ void setGridAnnotationDirection( GridAnnotationDirection d, QgsComposerMap::Border border );
228
+ /**@note: this function was added in version 1.9*/
229
+ GridAnnotationDirection gridAnnotationDirection( QgsComposerMap::Border border ) const;
230
+
231
+ /**Set grid frame style (NoGridFrame or Zebra)
232
+ @note: this function was added in version 1.9*/
233
+ void setGridFrameStyle( GridFrameStyle style );
234
+ GridFrameStyle gridFrameStyle() const;
235
+
236
+ /**Set grid frame width
237
+ @note: this function was added in version 1.9*/
238
+ void setGridFrameWidth( double w );
239
+ double gridFrameWidth() const;
212
240
213
241
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
214
242
@note this function was added in version 1.4*/
0 commit comments