Skip to content

Commit b2e102d

Browse files
committed
Improve API docs
1 parent b0c35ab commit b2e102d

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎python/core/composer/qgscomposermap.sip‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,17 @@ Sets new scene rectangle bounds and recalculates hight and extent
107107

108108
double scale() const;
109109
%Docstring
110-
Scale
110+
Returns the map scale.
111+
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
112+
.. seealso:: setNewScale()
111113
:rtype: float
112114
%End
113115

114116
void setNewScale( double scaleDenominator, bool forceUpdate = true );
115117
%Docstring
116-
Sets new scale and changes only mExtent
118+
Sets new map ``scale`` and changes only the map extent.
119+
The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
120+
.. seealso:: scale()
117121
%End
118122

119123
void setNewExtent( const QgsRectangle &extent );

‎src/core/composer/qgscomposermap.h‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,18 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
126126
//! Sets new scene rectangle bounds and recalculates hight and extent
127127
void setSceneRect( const QRectF &rectangle ) override;
128128

129-
//! \brief Scale
129+
/**
130+
* Returns the map scale.
131+
* The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
132+
* \see setNewScale()
133+
*/
130134
double scale() const;
131135

132-
//! Sets new scale and changes only mExtent
136+
/**
137+
* Sets new map \a scale and changes only the map extent.
138+
* The \a scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
139+
* \see scale()
140+
*/
133141
void setNewScale( double scaleDenominator, bool forceUpdate = true );
134142

135143
/** Sets new extent for the map. This method may change the width or height of the map

0 commit comments

Comments
 (0)