Skip to content

Commit

Permalink
fix constructor and skip method with same python signature
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Sep 6, 2017
1 parent 1a961e8 commit 8053b96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
14 changes: 3 additions & 11 deletions python/core/geometry/qgsreferencedgeometry.sip
Expand Up @@ -36,11 +36,6 @@ class QgsReferencedGeometryPrimitive
Constructor for QgsReferencedGeometryPrimitive, for the specified ``primitive`` and ``crs``.
%End

T primitive() const;
%Docstring
Returns the geometry primitive.
:rtype: T
%End

T &primitive();
%Docstring
Expand All @@ -66,6 +61,7 @@ class QgsReferencedGeometryPrimitive
};



typedef QgsReferencedGeometryPrimitive<QgsRectangle> QgsReferencedGeometryPrimitiveQgsRectangleBase;

class QgsReferencedRectangle : QgsReferencedGeometryPrimitiveQgsRectangleBase
Expand All @@ -81,24 +77,20 @@ typedef QgsReferencedGeometryPrimitive<QgsRectangle> QgsReferencedGeometryPrimit
%End
public:

QgsReferencedRectangle();
QgsReferencedRectangle( const QgsRectangle &rect );
%Docstring
Construct a default optional expression.
It will be disabled and with an empty expression.
%End

QgsRectangle &rect();
%Docstring
Returns the rectangles
:rtype: QgsRectangle
%End


};





/************************************************************************
* This file has been generated automatically from *
* *
Expand Down
15 changes: 8 additions & 7 deletions src/core/geometry/qgsreferencedgeometry.h
Expand Up @@ -53,7 +53,7 @@ class CORE_EXPORT QgsReferencedGeometryPrimitive
/**
* Returns the geometry primitive.
*/
T primitive() const { return mPrimitive; }
T primitive() const { return mPrimitive; } SIP_SKIP

/**
* Returns the geometry primitive.
Expand Down Expand Up @@ -81,7 +81,10 @@ class CORE_EXPORT QgsReferencedGeometryPrimitive

};

//template class QgsReferencedGeometryPrimitive< QgsRectangle > QgsReferencedRectangle;

/**
* \ingroup core
* A QgsRectangle with associated coordinate reference system.
* \since QGIS 3.0
*/
Expand All @@ -93,15 +96,13 @@ class CORE_EXPORT QgsReferencedRectangle : public QgsReferencedGeometryPrimitive
* Construct a default optional expression.
* It will be disabled and with an empty expression.
*/
QgsReferencedRectangle();
QgsReferencedRectangle( const QgsRectangle &rect ) : QgsReferencedGeometryPrimitive( rect ) {}

/**
* Returns the rectangles
*/
QgsRectangle &rect() { return primitive(); }


};

#endif // QGSREFERENCEDGEOMETRY_H




0 comments on commit 8053b96

Please sign in to comment.