Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent 49c41d3 commit ce0ac40
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
15 changes: 13 additions & 2 deletions python/core/layout/qgslayoutitemmap.sip
Expand Up @@ -87,6 +87,7 @@ class QgsLayoutItemMap : QgsLayoutItem
item to ensure that the extent exactly matches the specified extent, with no
overlap or margin. This method implicitly alters the map scale.
.. seealso:: zoomToExtent()
.. seealso:: extentChanged()
%End

void zoomToExtent( const QgsRectangle &extent );
Expand All @@ -102,6 +103,7 @@ class QgsLayoutItemMap : QgsLayoutItem
%Docstring
Returns the current map extent.
.. seealso:: visibleExtentPolygon()
.. seealso:: extentChanged()
:rtype: QgsRectangle
%End

Expand Down Expand Up @@ -274,6 +276,7 @@ Returns true if the map contains layers with blend modes or flattened layers for
Sets the ``rotation`` for the map - this does not affect the composer item shape, only the
way the map is drawn within the item. Rotation is in degrees, clockwise.
.. seealso:: mapRotation()
.. seealso:: mapRotationChanged()
%End

double mapRotation( QgsLayoutObject::PropertyValueType valueType = QgsLayoutObject::EvaluatedValue ) const;
Expand All @@ -283,6 +286,7 @@ Returns true if the map contains layers with blend modes or flattened layers for
or the current evaluated rotation (which may be affected by data driven rotation
settings).
.. seealso:: setMapRotation()
.. seealso:: mapRotationChanged()
:rtype: float
%End

Expand Down Expand Up @@ -457,11 +461,19 @@ Transforms map coordinates to item coordinates (considering rotation and move of
%End

signals:

void extentChanged();
%Docstring
Is emitted when the map's extent changes.
.. seealso:: setExtent()
.. seealso:: extent()
%End

void mapRotationChanged( double newRotation );
%Docstring
Is emitted on rotation change to notify north arrow pictures
Is emitted when the map's rotation changes.
.. seealso:: setMapRotation()
.. seealso:: mapRotation()
%End

void preparedForAtlas();
Expand All @@ -475,7 +487,6 @@ Is emitted when the map has been prepared for atlas rendering, just before actua
associated legend items know they should update
%End


public slots:

virtual void invalidateCache();
Expand Down
17 changes: 15 additions & 2 deletions src/core/layout/qgslayoutitemmap.h
Expand Up @@ -114,6 +114,7 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
* item to ensure that the extent exactly matches the specified extent, with no
* overlap or margin. This method implicitly alters the map scale.
* \see zoomToExtent()
* \see extentChanged()
*/
void setExtent( const QgsRectangle &extent );

Expand All @@ -129,6 +130,7 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
/**
* Returns the current map extent.
* \see visibleExtentPolygon()
* \see extentChanged()
*/
QgsRectangle extent() const;

Expand Down Expand Up @@ -282,6 +284,7 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
* Sets the \a rotation for the map - this does not affect the composer item shape, only the
* way the map is drawn within the item. Rotation is in degrees, clockwise.
* \see mapRotation()
* \see mapRotationChanged()
*/
void setMapRotation( double rotation );

Expand All @@ -291,6 +294,7 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
* or the current evaluated rotation (which may be affected by data driven rotation
* settings).
* \see setMapRotation()
* \see mapRotationChanged()
*/
double mapRotation( QgsLayoutObject::PropertyValueType valueType = QgsLayoutObject::EvaluatedValue ) const;

Expand Down Expand Up @@ -441,9 +445,19 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
QgsRectangle requestedExtent() const;

signals:

/**
* Is emitted when the map's extent changes.
* \see setExtent()
* \see extent()
*/
void extentChanged();

//! Is emitted on rotation change to notify north arrow pictures
/**
* Is emitted when the map's rotation changes.
* \see setMapRotation()
* \see mapRotation()
*/
void mapRotationChanged( double newRotation );

//! Is emitted when the map has been prepared for atlas rendering, just before actual rendering
Expand All @@ -455,7 +469,6 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem
*/
void layerStyleOverridesChanged();


public slots:

void invalidateCache() override;
Expand Down

0 comments on commit ce0ac40

Please sign in to comment.