Skip to content

Commit

Permalink
Some doxymentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 9, 2016
1 parent 9631688 commit 9d9ce20
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/core/composer/qgsscalebarstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/core/diagram/qgsdiagram.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/core/geometry/qgsabstractgeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions src/core/geometry/qgssurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion src/core/raster/qgsrasterresampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions src/core/symbology-ng/qgssymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions src/gui/qgsannotationitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qgsdatadefinedbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/qgsapplydialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit 9d9ce20

Please sign in to comment.