QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgscomposermap.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscomposermap.h
3  -------------------
4  begin : January 2005
5  copyright : (C) 2005 by Radim Blazek
6  email : [email protected]
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef QGSCOMPOSERMAP_H
18 #define QGSCOMPOSERMAP_H
19 
20 //#include "ui_qgscomposermapbase.h"
21 #include "qgscomposeritem.h"
22 #include "qgsrectangle.h"
23 #include <QFont>
24 #include <QGraphicsRectItem>
25 
26 class QgsComposition;
27 class QgsMapRenderer;
28 class QgsMapToPixel;
29 class QDomNode;
30 class QDomDocument;
31 class QGraphicsView;
32 class QPainter;
33 class QgsFillSymbolV2;
34 class QgsLineSymbolV2;
35 class QgsVectorLayer;
36 
41 // NOTE: QgsComposerMapBase must be first, otherwise does not compile
42 class CORE_EXPORT QgsComposerMap : public QgsComposerItem
43 {
44  Q_OBJECT
45 
46  public:
48  QgsComposerMap( QgsComposition *composition, int x, int y, int width, int height );
50  QgsComposerMap( QgsComposition *composition );
51  virtual ~QgsComposerMap();
52 
54  virtual int type() const { return ComposerMap; }
55 
58  {
59  Cache = 0, // Use raster cache
60  Render, // Render the map
61  Rectangle // Display only rectangle
62  };
63 
64  enum GridStyle
65  {
66  Solid = 0, //solid lines
67  Cross //only draw line crossings
68  };
69 
71  {
72  InsideMapFrame = 0,
74  Disabled
75  };
76 
78  {
79  Horizontal = 0,
82  BoundaryDirection
83  };
84 
86  {
87  Decimal = 0,
89  DegreeMinuteSecond
90  };
91 
93  {
94  NoGridFrame = 0,
95  Zebra // black/white pattern
96  };
97 
99  enum Border
100  {
104  Top
105  };
106 
110  {
111  Fixed, /*< The current scale of the map is used for each feature of the atlas */
112  Predefined, /*< A scale is chosen from the predefined scales. The smallest scale from
113  the list of scales where the atlas feature is fully visible is chosen.
114  @see QgsAtlasComposition::setPredefinedScales.
115  @note This mode is only valid for polygon or line atlas coverage layers
116  */
117  Auto /*< The extent is adjusted so that each feature is fully visible.
118  A margin is applied around the center @see setAtlasMargin
119  @note This mode is only valid for polygon or line atlas coverage layers*/
120  };
121 
129  void draw( QPainter *painter, const QgsRectangle& extent, const QSizeF& size, double dpi, double* forceWidthScale = 0 );
130 
132  void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
133 
135  void cache();
136 
138  int id() const {return mId;}
139 
141  bool isDrawing() const {return mDrawing;}
142 
144  void resize( double dx, double dy );
145 
149  void moveContent( double dx, double dy );
150 
155  void zoomContent( int delta, double x, double y );
156 
158  void setSceneRect( const QRectF& rectangle );
159 
161  double scale() const;
162 
164  void setNewScale( double scaleDenominator );
165 
167  void setNewExtent( const QgsRectangle& extent );
168 
172  void setNewAtlasFeatureExtent( const QgsRectangle& extent );
173 
175  void toggleAtlasPreview();
176 
183  QgsRectangle* currentMapExtent();
184  const QgsRectangle* currentMapExtent() const;
185 
186  PreviewMode previewMode() const {return mPreviewMode;}
187  void setPreviewMode( PreviewMode m );
188 
191  bool keepLayerSet() const {return mKeepLayerSet;}
194  void setKeepLayerSet( bool enabled ) {mKeepLayerSet = enabled;}
195 
198  QStringList layerSet() const {return mLayerSet;}
201  void setLayerSet( const QStringList& layerSet ) {mLayerSet = layerSet;}
203  void storeCurrentLayerSet();
204 
205  // Set cache outdated
206  void setCacheUpdated( bool u = false );
207 
208  QgsRectangle extent() const {return mExtent;}
209 
211  Q_DECL_DEPRECATED const QgsMapRenderer* mapRenderer() const;
212 
214  void setOffset( double xOffset, double yOffset );
215 
217  bool containsWMSLayer() const;
218 
220  bool containsAdvancedEffects() const;
221 
226  bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
227 
232  bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
233 
236  void setGridEnabled( bool enabled ) {mGridEnabled = enabled;}
237  bool gridEnabled() const { return mGridEnabled; }
238 
241  void setGridStyle( GridStyle style ) {mGridStyle = style;}
242  GridStyle gridStyle() const { return mGridStyle; }
243 
246  void setGridIntervalX( double interval ) { mGridIntervalX = interval;}
247  double gridIntervalX() const { return mGridIntervalX; }
248 
251  void setGridIntervalY( double interval ) { mGridIntervalY = interval;}
252  double gridIntervalY() const { return mGridIntervalY; }
253 
256  void setGridOffsetX( double offset ) { mGridOffsetX = offset; }
257  double gridOffsetX() const { return mGridOffsetX; }
258 
261  void setGridOffsetY( double offset ) { mGridOffsetY = offset; }
262  double gridOffsetY() const { return mGridOffsetY; }
263 
266  void setGridPen( const QPen& p );
267  QPen gridPen() const;
268 
271  void setGridPenWidth( double w );
272 
275  void setGridPenColor( const QColor& c );
276 
279  void setGridAnnotationFont( const QFont& f ) { mGridAnnotationFont = f; }
280  QFont gridAnnotationFont() const { return mGridAnnotationFont; }
281 
284  void setAnnotationFontColor( const QColor& c ) {mGridAnnotationFontColor = c;}
287  QColor annotationFontColor() const {return mGridAnnotationFontColor;}
288 
291  void setGridAnnotationPrecision( int p ) {mGridAnnotationPrecision = p;}
292  int gridAnnotationPrecision() const {return mGridAnnotationPrecision;}
293 
296  void setShowGridAnnotation( bool show ) {mShowGridAnnotation = show;}
297  bool showGridAnnotation() const {return mShowGridAnnotation;}
298 
299  void setGridAnnotationPosition( GridAnnotationPosition p, QgsComposerMap::Border border );
300  GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const;
301 
304  void setAnnotationFrameDistance( double d ) {mAnnotationFrameDistance = d;}
305  double annotationFrameDistance() const {return mAnnotationFrameDistance;}
306 
307  void setGridAnnotationDirection( GridAnnotationDirection d, QgsComposerMap::Border border );
308  GridAnnotationDirection gridAnnotationDirection( QgsComposerMap::Border border ) const;
309 
310  void setGridAnnotationFormat( GridAnnotationFormat f ) { mGridAnnotationFormat = f; }
311  GridAnnotationFormat gridAnnotationFormat() const { return mGridAnnotationFormat; }
312 
315  void setGridFrameStyle( GridFrameStyle style ) { mGridFrameStyle = style; }
316  GridFrameStyle gridFrameStyle() const { return mGridFrameStyle; }
317 
320  void setGridFrameWidth( double w ) { mGridFrameWidth = w; }
321  double gridFrameWidth() const { return mGridFrameWidth; }
322 
325  void setGridFramePenSize( double w ) { mGridFramePenThickness = w; }
326  double gridFramePenSize() const { return mGridFramePenThickness; }
327 
330  void setGridFramePenColor( const QColor& c ) { mGridFramePenColor = c;}
333  QColor gridFramePenColor() const {return mGridFramePenColor;}
334 
337  void setGridFrameFillColor1( const QColor& c ) { mGridFrameFillColor1 = c;}
340  QColor gridFrameFillColor1() const {return mGridFrameFillColor1;}
341 
344  void setGridFrameFillColor2( const QColor& c ) { mGridFrameFillColor2 = c;}
347  QColor gridFrameFillColor2() const {return mGridFrameFillColor2;}
348 
351  QRectF boundingRect() const;
354  void updateBoundingRect();
355 
356  /* reimplement setFrameOutlineWidth, so that updateBoundingRect() is called after setting the frame width */
357  virtual void setFrameOutlineWidth( double outlineWidth );
358 
361  void setCrossLength( double l ) {mCrossLength = l;}
362  double crossLength() {return mCrossLength;}
363 
368  Q_DECL_DEPRECATED void setRotation( double r );
369 
373  Q_DECL_DEPRECATED double rotation() const { return mMapRotation;};
374 
378  void setMapRotation( double r );
380  double mapRotation() const { return mMapRotation;};
381 
382  void updateItem();
383 
385  void setMapCanvas( QGraphicsView* canvas ) { mMapCanvas = canvas; }
386 
387  void setDrawCanvasItems( bool b ) { mDrawCanvasItems = b; }
388  bool drawCanvasItems() const { return mDrawCanvasItems; }
389 
391  double mapUnitsToMM() const;
392 
395  void setOverviewFrameMap( int mapId );
398  int overviewFrameMapId() const { return mOverviewFrameMapId; }
399 
400  void setOverviewFrameMapSymbol( QgsFillSymbolV2* symbol );
401  QgsFillSymbolV2* overviewFrameMapSymbol() { return mOverviewFrameMapSymbol; }
402 
404  QPainter::CompositionMode overviewBlendMode() const {return mOverviewBlendMode;}
406  void setOverviewBlendMode( QPainter::CompositionMode blendMode );
407 
409  bool overviewInverted() const {return mOverviewInverted;}
411  void setOverviewInverted( bool inverted );
412 
414  bool overviewCentered() const { return mOverviewCentered; }
416  void setOverviewCentered( bool centered );
417 
418  void setGridLineSymbol( QgsLineSymbolV2* symbol );
419  QgsLineSymbolV2* gridLineSymbol() { return mGridLineSymbol; }
420 
422  QPainter::CompositionMode gridBlendMode() const {return mGridBlendMode;}
424  void setGridBlendMode( QPainter::CompositionMode blendMode );
425 
428  void assignFreeId();
429 
434  Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const;
439  Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
444  Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height );
445 
451  bool atlasDriven() const { return mAtlasDriven; }
452 
458  void setAtlasDriven( bool enabled ) { mAtlasDriven = enabled; }
459 
463  Q_DECL_DEPRECATED bool atlasFixedScale() const;
464 
468  Q_DECL_DEPRECATED void setAtlasFixedScale( bool fixed );
469 
478  AtlasScalingMode atlasScalingMode() const { return mAtlasScalingMode; }
479 
488  void setAtlasScalingMode( AtlasScalingMode mode ) { mAtlasScalingMode = mode; }
489 
496  double atlasMargin() const { return mAtlasMargin; }
497 
504  void setAtlasMargin( double margin ) { mAtlasMargin = margin; }
505 
507  void setUpdatesEnabled( bool enabled ) { mUpdatesEnabled = enabled; }
508 
510  bool updatesEnabled() const { return mUpdatesEnabled; }
511 
517  int numberExportLayers() const;
518 
525  QPolygonF visibleExtentPolygon() const;
526 
527  signals:
528  void extentChanged();
529 
531  void mapRotationChanged( double newRotation );
532 
534  void preparedForAtlas();
535 
536  public slots:
537 
539  void updateCachedImage( );
541  void renderModeUpdateCachedImage();
542 
543  void overviewExtentChanged();
544 
545  private:
546 
548  {
549  Longitude = 0,
550  Latitude
551  };
552 
554  int mId;
555 
556  // Map region in map units realy used for rendering
557  // It can be the same as mUserExtent, but it can be bigger in on dimension if mCalculate==Scale,
558  // so that full rectangle in paper is used.
560 
561  // Current temporary map region in map units. This is overwritten when atlas feature changes. It's also
562  // used when the user changes the map extent and an atlas preview is enabled. This allows the user
563  // to manually tweak each atlas preview page without affecting the actual original map extent.
565 
566  // Cache used in composer preview
567  QImage mCacheImage;
568 
569  // Is cache up to date
571 
574 
577 
579  bool mDrawing;
580 
582  double mXOffset;
584  double mYOffset;
585 
587  double mMapRotation;
588 
591 
593  QStringList mLayerSet;
594 
601  QPainter::CompositionMode mOverviewBlendMode;
605 
608 
610  void connectUpdateSlot();
611 
613  void syncLayerSet();
614 
624  double mGridOffsetX;
626  double mGridOffsetY;
636  QPainter::CompositionMode mGridBlendMode;
637 
646 
649 
658 
660 
667 
671  double mCrossLength;
672  QGraphicsView* mMapCanvas;
675 
678  void adjustExtentToItemShape( double itemWidth, double itemHeight, QgsRectangle& extent ) const;
679 
685  double mAtlasMargin;
686 
688  QStringList layersToRender() const;
689 
691  void drawGrid( QPainter* p );
692  void drawGridFrame( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines );
697  void drawCoordinateAnnotations( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines );
698  void drawCoordinateAnnotation( QPainter* p, const QPointF& pos, QString annotationString );
704  void drawAnnotation( QPainter* p, const QPointF& pos, int rotation, const QString& annotationText );
705  QString gridAnnotationString( double value, AnnotationCoordinate coord ) const;
708  int xGridLines( QList< QPair< double, QLineF > >& lines ) const;
711  int yGridLines( QList< QPair< double, QLineF > >& lines ) const;
713  QgsRectangle transformedExtent() const;
715  QPolygonF transformedMapPolygon() const;
716  double maxExtension() const;
717 
719  void mapPolygon( const QgsRectangle& extent, QPolygonF& poly ) const;
720 
722  void requestedExtent( QgsRectangle& extent ) const;
726  void transformShift( double& xShift, double& yShift ) const;
728  QPointF mapToItemCoords( const QPointF& mapCoords ) const;
730  Border borderForLineCoord( const QPointF& p ) const;
731 
732  void drawCanvasItems( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle );
733  void drawCanvasItem( QGraphicsItem* item, QPainter* painter, const QStyleOptionGraphicsItem* itemStyle );
734  QPointF composerMapPosForItem( const QGraphicsItem* item ) const;
735  void sortGridLinesOnBorders( const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines, QMap< double, double >& leftFrameEntries,
736  QMap< double, double >& rightFrameEntries, QMap< double, double >& topFrameEntries, QMap< double, double >& bottomFrameEntries ) const;
737  void drawGridFrameBorder( QPainter* p, const QMap< double, double >& borderPos, Border border );
738  void drawGridLine( const QLineF& line, QgsRenderContext& context );
739  void drawOverviewMapExtent( QPainter* p );
740  void createDefaultOverviewFrameSymbol();
741  void createDefaultGridLineSymbol();
742  void initGridAnnotationFormatFromProject();
743 
744  enum PartType
745  {
751  SelectionBoxes
752  };
753 
755  bool shouldDrawPart( PartType part ) const;
756 };
757 
758 #endif
759 
void setGridFrameWidth(double w)
Set grid frame width.
int mOverviewFrameMapId
Id of map which displays its extent rectangle into this composer map (overview map functionality)...
double mGridFrameWidth
double mXOffset
Offset in x direction for showing map cache image.
AtlasScalingMode
Scaling modes used for the serial rendering (atlas)
bool mGridEnabled
True if coordinate grid has to be displayed.
bool imageSizeConsideringRotation(double &width, double &height, double rotation) const
Calculates width and hight of the picture (in mm) such that it fits into the item frame with the give...
double outlineWidth
Definition: qgssvgcache.cpp:78
A rectangle specified with double values.
Definition: qgsrectangle.h:35
bool mDrawing
set to true if in state of drawing.
bool updatesEnabled() const
Returns whether updates to the composer map are enabled.
double mGridIntervalY
Grid line interval in y-direction (map units)
double mMapRotation
Map rotation.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)=0
sets state from Dom document
void setGridIntervalY(double interval)
Sets coordinate interval in y-direction for composergrid.
QgsLineSymbolV2 * gridLineSymbol()
void setGridAnnotationFormat(GridAnnotationFormat f)
void setGridFrameFillColor1(const QColor &c)
Sets first fill color for grid zebra frame.
double gridIntervalX() const
virtual void setRotation(double r)
Sets the item rotation.
void setGridEnabled(bool enabled)
Enables a coordinate grid that is shown on top of this composermap.
double gridFramePenSize() const
QStringList mLayerSet
Stored layer list (used if layer live-link mKeepLayerSet is disabled)
QFont mGridAnnotationFont
Font for grid line annotation.
double atlasMargin() const
Returns the margin size (percentage) used when the map is in atlas mode.
QColor gridFrameFillColor1() const
Get first fill color for grid zebra frame.
bool mDrawCanvasItems
True if annotation items, rubber band, etc.
QStringList layerSet() const
Getter for stored layer set that is used if mKeepLayerSet is true.
void setAnnotationFontColor(const QColor &c)
Sets font color for grid annotations.
bool showGridAnnotation() const
void setGridStyle(GridStyle style)
Sets coordinate grid style to solid or cross.
A item that forms part of a map composition.
Border
Enum for different frame borders.
QPainter::CompositionMode mOverviewBlendMode
Blend mode for overview.
AtlasScalingMode mAtlasScalingMode
Current atlas scaling mode.
QGraphicsView * mMapCanvas
void setMapCanvas(QGraphicsView *canvas)
Sets canvas pointer (necessary to query and draw map canvas items)
double annotationFrameDistance() const
A non GUI class for rendering a map layer set onto a QPainter.
bool mShowGridAnnotation
True if coordinate values should be drawn.
double gridOffsetX() const
double mapRotation() const
Returns the rotation used for drawing the map within the composer item.
bool mOverviewCentered
Centering mode for overview.
GridFrameStyle mGridFrameStyle
QColor mGridFrameFillColor1
QColor mGridFramePenColor
void setGridAnnotationPrecision(int p)
Sets coordinate precision for grid annotations.
bool isDrawing() const
True if a draw is already in progress.
int mGridAnnotationPrecision
Digits after the dot.
QFont gridAnnotationFont() const
void setAtlasMargin(double margin)
Sets the margin size (percentage) used when the map is in atlas mode.
bool overviewInverted() const
Returns true if the overview frame is inverted.
virtual int type() const
return correct graphics item type.
QPainter::CompositionMode gridBlendMode() const
Returns the grid's blending mode.
QgsRectangle mExtent
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:33
QgsLineSymbolV2 * mGridLineSymbol
GridAnnotationDirection mLeftGridAnnotationDirection
Annotation direction on left side ( horizontal or vertical )
virtual void moveContent(double dx, double dy)
Move Content of item.
QColor gridFrameFillColor2() const
Get second fill color for grid zebra frame.
double mAnnotationFrameDistance
Distance between map frame and annotation.
void setAtlasScalingMode(AtlasScalingMode mode)
Sets the current atlas scaling mode.
int overviewFrameMapId() const
Returns id of overview frame (or -1 if no overfiew frame)
double gridFrameWidth() const
GridAnnotationDirection mRightGridAnnotationDirection
Annotation direction on right side ( horizontal or vertical )
QRectF mCurrentRectangle
Current bounding rectangle.
double mCrossLength
The length of the cross sides for mGridStyle Cross.
double mGridFramePenThickness
void setGridAnnotationFont(const QFont &f)
Sets font for grid annotations.
double mGridOffsetY
Grid line offset in y-direction.
QColor annotationFontColor() const
Get font color for grid annotations.
virtual void updateItem()
Updates item, with the possibility to do custom update for subclasses.
QPainter::CompositionMode overviewBlendMode() const
Returns the overview's blending mode.
bool drawCanvasItems() const
void setAnnotationFrameDistance(double d)
Sets distance between map frame and annotations.
double mYOffset
Offset in y direction for showing map cache image.
virtual void setFrameOutlineWidth(double outlineWidth)
Sets frame outline width.
QColor mGridFrameFillColor2
void setGridFrameFillColor2(const QColor &c)
Sets second fill color for grid zebra frame.
void setGridIntervalX(double interval)
Sets coordinate interval in x-direction for composergrid.
GridFrameStyle gridFrameStyle() const
virtual int numberExportLayers() const
Get the number of layers that this item requires for exporting as layers.
double mGridIntervalX
Grid line interval in x-direction (map units)
GridAnnotationPosition mTopGridAnnotationPosition
Annotation position for top map side (inside / outside / not shown)
void setGridFramePenSize(double w)
Set grid frame pen thickness.
bool mAtlasDriven
True if map is being controlled by an atlas.
PreviewMode
Preview style.
GridAnnotationPosition mLeftGridAnnotationPosition
Annotation position for left map side (inside / outside / not shown)
GridAnnotationFormat mGridAnnotationFormat
Graphics scene for map printing.
QColor gridFramePenColor() const
Get pen color for grid frame.
GridAnnotationFormat gridAnnotationFormat() const
Object representing map window.
GridStyle mGridStyle
Solid or crosses.
GridStyle gridStyle() const
QgsFillSymbolV2 * mOverviewFrameMapSymbol
Drawing style for overview farme.
void setUpdatesEnabled(bool enabled)
Sets whether updates to the composer map are enabled.
GridAnnotationPosition mRightGridAnnotationPosition
Annotation position for right map side (inside / outside / not shown)
GridAnnotationDirection mTopGridAnnotationDirection
Annotation direction on top side ( horizontal or vertical )
PreviewMode previewMode() const
int gridAnnotationPrecision() const
void setCrossLength(double l)
Sets length of the cros segments (if grid style is cross)
bool gridEnabled() const
virtual void zoomContent(int delta, double x, double y)
Zoom content of item.
int id() const
Get identification number.
double mAtlasMargin
Margin size for atlas driven extents (percentage of feature size) - when in auto scaling mode...
Contains information about the context of a rendering operation.
bool mKeepLayerSet
Flag if layers to be displayed should be read from qgis canvas (true) or from stored list in mLayerSe...
bool cornerPointOnRotatedAndScaledRect(double &x, double &y, double width, double height, double rotation) const
Calculates corner point after rotation and scaling.
double mGridOffsetX
Grid line offset in x-direction.
Q_DECL_DEPRECATED double rotation() const
Returns the rotation used for drawing the map within the composer item.
QgsFillSymbolV2 * overviewFrameMapSymbol()
QgsRectangle extent() const
GridAnnotationDirection mBottomGridAnnotationDirection
Annotation direction on bottom side ( horizontal or vertical )
int mId
Unique identifier.
void setLayerSet(const QStringList &layerSet)
Setter for stored layer set that is used if mKeepLayerSet is true.
bool mUpdatesEnabled
Whether updates to the map are enabled.
void setShowGridAnnotation(bool show)
Sets flag if grid annotation should be shown.
AtlasScalingMode atlasScalingMode() const
Returns the current atlas scaling mode.
void setDrawCanvasItems(bool b)
virtual void setSceneRect(const QRectF &rectangle)
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size un...
double gridIntervalY() const
QgsRectangle mAtlasFeatureExtent
void setKeepLayerSet(bool enabled)
Setter for flag that determines if the stored layer set should be used or the current layer set of th...
double crossLength()
double gridOffsetY() const
void setGridOffsetX(double offset)
Sets x-coordinate offset for composer grid.
bool atlasDriven() const
Returns whether the map extent is set to follow the current atlas feature.
GridAnnotationPosition mBottomGridAnnotationPosition
Annotation position for bottom map side (inside / outside / not shown)
void setAtlasDriven(bool enabled)
Sets whether the map extent will follow the current atlas feature.
QColor mGridAnnotationFontColor
Font color for grid line annotation.
void setGridOffsetY(double offset)
Sets y-coordinate offset for composer grid.
bool keepLayerSet() const
Getter for flag that determines if the stored layer set should be used or the current layer set of th...
Represents a vector layer which manages a vector based data sets.
double size
Definition: qgssvgcache.cpp:77
void setGridFrameStyle(GridFrameStyle style)
Set grid frame style (NoGridFrame or Zebra)
PreviewMode mPreviewMode
Preview style.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const =0
stores state in Dom element
QPainter::CompositionMode mGridBlendMode
Blend mode for grid.
int mNumCachedLayers
Number of layers when cache was created.
void setGridFramePenColor(const QColor &c)
Sets pen color for grid frame.
void sizeChangedByRotation(double &width, double &height, double rotation)
Calculates width / height of the bounding box of a rotated rectangle.
bool overviewCentered() const
Returns true if the extent is forced to center on the overview.