@@ -493,11 +493,11 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
493
493
private:
494
494
495
495
// ! Unique identifier
496
- int mId ;
496
+ int mId = 0 ;
497
497
498
- QgsComposerMapGridStack* mGridStack ;
498
+ QgsComposerMapGridStack* mGridStack = nullptr ;
499
499
500
- QgsComposerMapOverviewStack* mOverviewStack ;
500
+ QgsComposerMapOverviewStack* mOverviewStack = nullptr ;
501
501
502
502
// Map region in map units really used for rendering
503
503
// It can be the same as mUserExtent, but it can be bigger in on dimension if mCalculate==Scale,
@@ -516,50 +516,50 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
516
516
QImage mCacheImage ;
517
517
518
518
// Is cache up to date
519
- bool mCacheUpdated ;
519
+ bool mCacheUpdated = false ;
520
520
521
521
// ! \brief Preview style
522
- PreviewMode mPreviewMode ;
522
+ PreviewMode mPreviewMode = QgsComposerMap::Rectangle ;
523
523
524
524
// ! \brief Number of layers when cache was created
525
525
int mNumCachedLayers ;
526
526
527
527
// ! \brief set to true if in state of drawing. Concurrent requests to draw method are returned if set to true
528
- bool mDrawing ;
528
+ bool mDrawing = false ;
529
529
530
530
// ! Offset in x direction for showing map cache image
531
- double mXOffset ;
531
+ double mXOffset = 0.0 ;
532
532
// ! Offset in y direction for showing map cache image
533
- double mYOffset ;
533
+ double mYOffset = 0.0 ;
534
534
535
535
// ! Map rotation
536
- double mMapRotation ;
536
+ double mMapRotation = 0 ;
537
537
538
538
/* * Temporary evaluated map rotation. Data defined rotation may mean this value
539
539
* differs from mMapRotation*/
540
- double mEvaluatedMapRotation ;
540
+ double mEvaluatedMapRotation = 0 ;
541
541
542
542
// ! Flag if layers to be displayed should be read from qgis canvas (true) or from stored list in mLayerSet (false)
543
- bool mKeepLayerSet ;
543
+ bool mKeepLayerSet = false ;
544
544
545
545
// ! Stored layer list (used if layer live-link mKeepLayerSet is disabled)
546
546
QgsWeakMapLayerPointerList mLayers ;
547
547
548
- bool mKeepLayerStyles ;
548
+ bool mKeepLayerStyles = false ;
549
549
// ! Stored style names (value) to be used with particular layer IDs (key) instead of default style
550
550
QMap<QString, QString> mLayerStyleOverrides ;
551
551
552
552
/* * Whether layers and styles should be used from a preset (preset name is stored
553
553
* in mVisibilityPresetName and may be overridden by data-defined expression).
554
554
* This flag has higher priority than mKeepLayerSet. */
555
- bool mFollowVisibilityPreset ;
555
+ bool mFollowVisibilityPreset = false ;
556
556
557
557
/* * Map theme name to be used for map's layers and styles in case mFollowVisibilityPreset
558
558
* is true. May be overridden by data-defined expression. */
559
559
QString mFollowVisibilityPresetName ;
560
560
561
561
// ! Whether updates to the map are enabled
562
- bool mUpdatesEnabled ;
562
+ bool mUpdatesEnabled = true ;
563
563
564
564
// ! Establishes signal/slot connection for update in case of layer change
565
565
void connectUpdateSlot ();
@@ -576,18 +576,18 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
576
576
// ! Current bounding rectangle. This is used to check if notification to the graphics scene is necessary
577
577
QRectF mCurrentRectangle ;
578
578
// ! True if annotation items, rubber band, etc. from the main canvas should be displayed
579
- bool mDrawAnnotations ;
579
+ bool mDrawAnnotations = true ;
580
580
581
581
/* * Adjusts an extent rectangle to match the provided item width and height, so that extent
582
582
* center of extent remains the same */
583
583
void adjustExtentToItemShape ( double itemWidth, double itemHeight, QgsRectangle& extent ) const ;
584
584
585
585
// ! True if map is being controlled by an atlas
586
- bool mAtlasDriven ;
586
+ bool mAtlasDriven = false ;
587
587
// ! Current atlas scaling mode
588
- AtlasScalingMode mAtlasScalingMode ;
588
+ AtlasScalingMode mAtlasScalingMode = Auto ;
589
589
// ! Margin size for atlas driven extents (percentage of feature size) - when in auto scaling mode
590
- double mAtlasMargin ;
590
+ double mAtlasMargin = 0.10 ;
591
591
592
592
void init ();
593
593
0 commit comments