Skip to content

Commit 37fd5b7

Browse files
committedJun 21, 2014
More doxygen docs for QgsMapSettings
1 parent 12628c5 commit 37fd5b7

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed
 

‎python/core/qgsmapsettings.sip

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,19 @@ class QgsMapSettings
4747
//! returns CRS of destination coordinate reference system
4848
const QgsCoordinateReferenceSystem& destinationCrs() const;
4949

50+
//! Get units of map's geographical coordinates - used for scale calculation
5051
QGis::UnitType mapUnits() const;
52+
//! Set units of map's geographical coordinates - used for scale calculation
5153
void setMapUnits( QGis::UnitType u );
5254

55+
//! Set the background color of the map
5356
void setBackgroundColor( const QColor& color );
57+
//! Get the background color of the map
5458
QColor backgroundColor() const;
5559

60+
//! Set color that is used for drawing of selected vector features
5661
void setSelectionColor( const QColor& color );
62+
//! Get color that is used for drawing of selected vector features
5763
QColor selectionColor() const;
5864

5965
/**Sets whether vector selections should be shown in the rendered map
@@ -72,31 +78,40 @@ class QgsMapSettings
7278
*/
7379
bool showSelection() const;
7480

81+
//! Enumeration of flags that adjust the way how map is rendered
7582
enum Flag
7683
{
77-
Antialiasing,
78-
DrawEditingInfo,
79-
ForceVectorOutput,
80-
UseAdvancedEffects,
81-
DrawLabeling,
82-
UseRenderingOptimization,
84+
Antialiasing, //!< Enable anti-aliasin for map rendering
85+
DrawEditingInfo, //!< Enable drawing of vertex markers for layers in editing mode
86+
ForceVectorOutput, //!< Vector graphics should not be cached and drawn as raster images
87+
UseAdvancedEffects, //!< Enable layer transparency and blending effects
88+
DrawLabeling, //!< Enable drawing of labels on top of the map
89+
UseRenderingOptimization, //!< Enable vector simplification and other rendering optimizations
8390
// TODO: ignore scale-based visibility (overview)
8491
};
8592
typedef QFlags<QgsMapSettings::Flag> Flags;
8693

94+
//! Set combination of flags that will be used for rendering
8795
void setFlags( Flags flags );
96+
//! Enable or disable a particular flag (other flags are not affected)
8897
void setFlag( Flag flag, bool on = true );
98+
//! Return combination of flags used for rendering
8999
Flags flags() const;
100+
//! Check whether a particular flag is enabled
90101
bool testFlag( Flag flag ) const;
91102

92103
//! sets format of internal QImage
93104
void setOutputImageFormat( QImage::Format format );
94105
//! format of internal QImage, default QImage::Format_ARGB32_Premultiplied
95106
QImage::Format outputImageFormat() const;
96107

108+
//! Check whether the map settings are valid and can be used for rendering
97109
bool hasValidSettings() const;
110+
//! Return the actual extent derived from requested extent that takes takes output image size into account
98111
QgsRectangle visibleExtent() const;
112+
//! Return the distance in geographical coordinates that equals to one pixel in the map
99113
double mapUnitsPerPixel() const;
114+
//! Return the calculated scale of the map
100115
double scale() const;
101116

102117

‎src/core/qgsmapsettings.h

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,19 @@ class CORE_EXPORT QgsMapSettings
9393
//! returns CRS of destination coordinate reference system
9494
const QgsCoordinateReferenceSystem& destinationCrs() const;
9595

96+
//! Get units of map's geographical coordinates - used for scale calculation
9697
QGis::UnitType mapUnits() const;
98+
//! Set units of map's geographical coordinates - used for scale calculation
9799
void setMapUnits( QGis::UnitType u );
98100

101+
//! Set the background color of the map
99102
void setBackgroundColor( const QColor& color ) { mBackgroundColor = color; }
103+
//! Get the background color of the map
100104
QColor backgroundColor() const { return mBackgroundColor; }
101105

106+
//! Set color that is used for drawing of selected vector features
102107
void setSelectionColor( const QColor& color ) { mSelectionColor = color; }
108+
//! Get color that is used for drawing of selected vector features
103109
QColor selectionColor() const { return mSelectionColor; }
104110

105111
/**Sets whether vector selections should be shown in the rendered map
@@ -118,31 +124,40 @@ class CORE_EXPORT QgsMapSettings
118124
*/
119125
bool showSelection() const { return mShowSelection; }
120126

127+
//! Enumeration of flags that adjust the way how map is rendered
121128
enum Flag
122129
{
123-
Antialiasing = 0x01,
124-
DrawEditingInfo = 0x02,
125-
ForceVectorOutput = 0x04,
126-
UseAdvancedEffects = 0x08,
127-
DrawLabeling = 0x10,
128-
UseRenderingOptimization = 0x20,
130+
Antialiasing = 0x01, //!< Enable anti-aliasin for map rendering
131+
DrawEditingInfo = 0x02, //!< Enable drawing of vertex markers for layers in editing mode
132+
ForceVectorOutput = 0x04, //!< Vector graphics should not be cached and drawn as raster images
133+
UseAdvancedEffects = 0x08, //!< Enable layer transparency and blending effects
134+
DrawLabeling = 0x10, //!< Enable drawing of labels on top of the map
135+
UseRenderingOptimization = 0x20, //!< Enable vector simplification and other rendering optimizations
129136
// TODO: ignore scale-based visibility (overview)
130137
};
131138
Q_DECLARE_FLAGS( Flags, Flag )
132139

140+
//! Set combination of flags that will be used for rendering
133141
void setFlags( Flags flags );
142+
//! Enable or disable a particular flag (other flags are not affected)
134143
void setFlag( Flag flag, bool on = true );
144+
//! Return combination of flags used for rendering
135145
Flags flags() const;
146+
//! Check whether a particular flag is enabled
136147
bool testFlag( Flag flag ) const;
137148

138149
//! sets format of internal QImage
139150
void setOutputImageFormat( QImage::Format format ) { mImageFormat = format; }
140151
//! format of internal QImage, default QImage::Format_ARGB32_Premultiplied
141152
QImage::Format outputImageFormat() const { return mImageFormat; }
142153

154+
//! Check whether the map settings are valid and can be used for rendering
143155
bool hasValidSettings() const;
156+
//! Return the actual extent derived from requested extent that takes takes output image size into account
144157
QgsRectangle visibleExtent() const;
158+
//! Return the distance in geographical coordinates that equals to one pixel in the map
145159
double mapUnitsPerPixel() const;
160+
//! Return the calculated scale of the map
146161
double scale() const;
147162

148163

0 commit comments

Comments
 (0)
Please sign in to comment.