From d075b128a8e8d287a2c51a3eb5315124c01c569c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 2 Aug 2016 07:26:11 +1000 Subject: [PATCH] Add missing docs --- python/core/geometry/qgsgeometry.sip | 4 ++++ python/core/qgsvectorlayereditbuffer.sip | 6 ++++++ python/gui/qgshighlight.sip | 14 ++++++++++++++ src/core/geometry/qgsgeometry.h | 4 ++++ src/core/qgsvectorlayereditbuffer.h | 6 ++++++ src/gui/qgshighlight.h | 13 +++++++++++++ 6 files changed, 47 insertions(+) diff --git a/python/core/geometry/qgsgeometry.sip b/python/core/geometry/qgsgeometry.sip index 73251a8250b..10a4bf66761 100644 --- a/python/core/geometry/qgsgeometry.sip +++ b/python/core/geometry/qgsgeometry.sip @@ -794,6 +794,10 @@ class QgsGeometry //! Allows direct construction of QVariants from geometry. operator QVariant() const; + /** Returns true if the geometry is non empty (ie, isEmpty() returns false), + * or false if it is an empty, uninitialised geometry (ie, ieEmpty() returns true). + * @note added in QGIS 3.0 + */ operator bool() const; }; // class QgsGeometry diff --git a/python/core/qgsvectorlayereditbuffer.sip b/python/core/qgsvectorlayereditbuffer.sip index 2f08f7a2018..2d3efea8f65 100644 --- a/python/core/qgsvectorlayereditbuffer.sip +++ b/python/core/qgsvectorlayereditbuffer.sip @@ -145,7 +145,13 @@ class QgsVectorLayerEditBuffer : QObject void featureAdded( QgsFeatureId fid ); void featureDeleted( QgsFeatureId fid ); + + /** Emitted when a feature's geometry is changed. + * @param fid feature ID + * @param geom new feature geometry + */ void geometryChanged( QgsFeatureId fid, const QgsGeometry &geom ); + void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant & ); void attributeAdded( int idx ); void attributeDeleted( int idx ); diff --git a/python/gui/qgshighlight.sip b/python/gui/qgshighlight.sip index 1b7c479e8ce..2b7a2a3baa6 100644 --- a/python/gui/qgshighlight.sip +++ b/python/gui/qgshighlight.sip @@ -4,7 +4,21 @@ class QgsHighlight : QgsMapCanvasItem #include %End public: + + /** Constructor for QgsHighlight + * @param mapCanvas associated map canvas + * @param geom initial geometry of highlight + * @param layer associated map layer + */ + //QgsHighlight( QgsMapCanvas *mapCanvas, const QgsGeometry& geom, QgsMapLayer *layer ); + + /** Constructor for QgsHighlight + * @param mapCanvas associated map canvas + * @param geom initial geometry of highlight + * @param layer associated vector layer + */ QgsHighlight( QgsMapCanvas *mapCanvas, const QgsGeometry& geom, QgsVectorLayer *layer ); + ~QgsHighlight(); /** Set line/outline to color, polygon fill to color with alpha = 63. diff --git a/src/core/geometry/qgsgeometry.h b/src/core/geometry/qgsgeometry.h index e1cea16a71f..68e27745787 100644 --- a/src/core/geometry/qgsgeometry.h +++ b/src/core/geometry/qgsgeometry.h @@ -845,6 +845,10 @@ class CORE_EXPORT QgsGeometry return QVariant::fromValue( *this ); } + /** Returns true if the geometry is non empty (ie, isEmpty() returns false), + * or false if it is an empty, uninitialised geometry (ie, ieEmpty() returns true). + * @note added in QGIS 3.0 + */ operator bool() const; private: diff --git a/src/core/qgsvectorlayereditbuffer.h b/src/core/qgsvectorlayereditbuffer.h index 448ad17b59b..a7392025383 100644 --- a/src/core/qgsvectorlayereditbuffer.h +++ b/src/core/qgsvectorlayereditbuffer.h @@ -172,7 +172,13 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject void featureAdded( QgsFeatureId fid ); void featureDeleted( QgsFeatureId fid ); + + /** Emitted when a feature's geometry is changed. + * @param fid feature ID + * @param geom new feature geometry + */ void geometryChanged( QgsFeatureId fid, const QgsGeometry &geom ); + void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant & ); void attributeAdded( int idx ); void attributeDeleted( int idx ); diff --git a/src/gui/qgshighlight.h b/src/gui/qgshighlight.h index 84565c906e3..62eeb916e81 100644 --- a/src/gui/qgshighlight.h +++ b/src/gui/qgshighlight.h @@ -35,8 +35,21 @@ class QgsSymbolV2; class GUI_EXPORT QgsHighlight: public QgsMapCanvasItem { public: + + /** Constructor for QgsHighlight + * @param mapCanvas associated map canvas + * @param geom initial geometry of highlight + * @param layer associated map layer + */ QgsHighlight( QgsMapCanvas *mapCanvas, const QgsGeometry& geom, QgsMapLayer *layer ); + + /** Constructor for QgsHighlight + * @param mapCanvas associated map canvas + * @param geom initial geometry of highlight + * @param layer associated vector layer + */ QgsHighlight( QgsMapCanvas *mapCanvas, const QgsGeometry& geom, QgsVectorLayer *layer ); + /** Constructor for highlighting true feature shape using feature attributes * and renderer. * @param mapCanvas map canvas