diff --git a/src/core/composer/qgsscalebarstyle.h b/src/core/composer/qgsscalebarstyle.h index 9f2a69f2052..56ea11a57ef 100644 --- a/src/core/composer/qgsscalebarstyle.h +++ b/src/core/composer/qgsscalebarstyle.h @@ -39,7 +39,11 @@ class CORE_EXPORT QgsScaleBarStyle virtual void draw( QPainter* p, double xOffset = 0 ) const = 0; //to do by every subclass virtual void drawLabels( QPainter* p ) const; //default implementation provided virtual QRectF calculateBoxSize() const; //default implementation provided - virtual QString name() const = 0; //return name of the style + /** + * Get a name for this style. + * Needs to be remiplmeented by subclasses. + */ + virtual QString name() const = 0; private: QgsScaleBarStyle(); //default constructor forbidden diff --git a/src/core/diagram/qgsdiagram.h b/src/core/diagram/qgsdiagram.h index aeef499282f..c53394101e0 100644 --- a/src/core/diagram/qgsdiagram.h +++ b/src/core/diagram/qgsdiagram.h @@ -51,6 +51,10 @@ class CORE_EXPORT QgsDiagram /** Draws the diagram at the given position (in pixel coordinates)*/ virtual void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, const QgsDiagramSettings& s, QPointF position ) = 0; + + /** + * Get a descriptive name for this diagram type. + */ virtual QString diagramName() const = 0; /** Returns the size in map units the diagram will use to render.*/ virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ) = 0; diff --git a/src/core/geometry/qgsabstractgeometry.h b/src/core/geometry/qgsabstractgeometry.h index 5c2eea0b1ac..9db4b2f440d 100644 --- a/src/core/geometry/qgsabstractgeometry.h +++ b/src/core/geometry/qgsabstractgeometry.h @@ -328,7 +328,14 @@ class CORE_EXPORT QgsAbstractGeometry */ virtual double vertexAngle( QgsVertexId vertex ) const = 0; + /** + * Returns the number of vertexes of which this geometry is built. + */ virtual int vertexCount( int part = 0, int ring = 0 ) const = 0; + + /** + * Returns the number of rings of which this geometry is built. + */ virtual int ringCount( int part = 0 ) const = 0; /** Returns count of parts contained in the geometry. diff --git a/src/core/geometry/qgssurface.h b/src/core/geometry/qgssurface.h index c115745a64c..54f2e113f1e 100644 --- a/src/core/geometry/qgssurface.h +++ b/src/core/geometry/qgssurface.h @@ -30,6 +30,10 @@ class CORE_EXPORT QgsSurface: public QgsAbstractGeometry { public: + /** + * Get a polygon representation of this surface. + * Ownership is transferred to the caller. + */ virtual QgsPolygonV2* surfaceToPolygon() const = 0; /** Returns the minimal bounding box for the geometry diff --git a/src/core/raster/qgsrasterresampler.h b/src/core/raster/qgsrasterresampler.h index 0991edebaea..52963ec2d3b 100644 --- a/src/core/raster/qgsrasterresampler.h +++ b/src/core/raster/qgsrasterresampler.h @@ -30,8 +30,18 @@ class QgsRasterResampler public: virtual ~QgsRasterResampler() {} virtual void resample( const QImage& srcImage, QImage& dstImage ) = 0; + + /** + * Get a descriptive type identifier for this raster resampler. + * Needs to be implemented by subclasses. + */ virtual QString type() const = 0; - virtual QgsRasterResampler * clone() const = 0; + /** + * Get a deep copy of this object. + * Needs to be reimplemented by subclasses. + * Ownership is transferred to the caller. + */ + virtual QgsRasterResampler* clone() const = 0; }; #endif // QGSRASTERRESAMPLER_H diff --git a/src/core/symbology-ng/qgssymbol.h b/src/core/symbology-ng/qgssymbol.h index 49a055d9684..792e65a6697 100644 --- a/src/core/symbology-ng/qgssymbol.h +++ b/src/core/symbology-ng/qgssymbol.h @@ -190,6 +190,11 @@ class CORE_EXPORT QgsSymbol QString dump() const; + /** + * Get a deep copy of this symbol. + * Needs to be reimplemented by subclasses. + * Ownership is transferred to the caller. + */ virtual QgsSymbol* clone() const = 0; void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; diff --git a/src/gui/qgsannotationitem.h b/src/gui/qgsannotationitem.h index 534b25edb87..921932d71b0 100644 --- a/src/gui/qgsannotationitem.h +++ b/src/gui/qgsannotationitem.h @@ -103,10 +103,28 @@ class GUI_EXPORT QgsAnnotationItem: public QgsMapCanvasItem, public QgsAnnotatio void setFrameBackgroundColor( const QColor& c ) { mFrameBackgroundColor = c; } QColor frameBackgroundColor() const { return mFrameBackgroundColor; } + /** + * Serialize to XML. The doc is used to generate new nodes. + * Needs to be reimplemented by subclasses. + */ virtual void writeXml( QDomDocument& doc ) const = 0; + + /** + * Deserialize from XML. The itemElem is used as source for the information. + * Needs to be reimplemented by subclasses + */ virtual void readXml( const QDomDocument& doc, const QDomElement& itemElem ) = 0; + /** + * Serialize to XML. The doc is used to generate new nodes. + * Should be called by subclasses in their writeXml method. + */ void _writeXml( QDomDocument& doc, QDomElement& itemElem ) const; + + /** + * Deserialize from XML. The itemElem is used as source for the information. + * Should be called from subclasses in their readXml method. + */ void _readXml( const QDomDocument& doc, const QDomElement& annotationElem ); virtual void setItemData( int role, const QVariant& value ) override; diff --git a/src/gui/qgsdatadefinedbutton.h b/src/gui/qgsdatadefinedbutton.h index 1b7df5d6747..8d29471a1bf 100644 --- a/src/gui/qgsdatadefinedbutton.h +++ b/src/gui/qgsdatadefinedbutton.h @@ -41,6 +41,10 @@ class GUI_EXPORT QgsDataDefinedAssistant: public QDialog public: QgsDataDefinedAssistant() : mMapCanvas( nullptr ) {} + /** + * Get the data defined which was defined by this assistant. + * Needs to be reimplemented by subclasses. + */ virtual QgsDataDefined dataDefined() const = 0; /** Sets the map canvas associated with the widget. This allows the widget to retrieve the current diff --git a/src/plugins/qgsapplydialog.h b/src/plugins/qgsapplydialog.h index 05e1942a9d1..5ff55f1e468 100644 --- a/src/plugins/qgsapplydialog.h +++ b/src/plugins/qgsapplydialog.h @@ -30,6 +30,11 @@ class QgsApplyDialog: public QDialog public: QgsApplyDialog(): QDialog() {} ~QgsApplyDialog() {} + + /** + * This method is called when changes should be applied. + * It needs to be implemented by subclasses. + */ virtual void apply() const = 0; };