Skip to content

Commit

Permalink
[sip] mass introduction of annotations into headers
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 2, 2017
1 parent b249d48 commit d3bc0e3
Show file tree
Hide file tree
Showing 243 changed files with 724 additions and 505 deletions.
3 changes: 2 additions & 1 deletion src/analysis/interpolation/NormVecDecorator.h
Expand Up @@ -18,6 +18,7 @@
#define NORMVECDECORATOR_H

#include "TriDecorator.h"
#include "qgis.h"
#include <TriangleInterpolator.h>
#include <MathUtils.h>
#include "qgslogger.h"
Expand Down Expand Up @@ -52,7 +53,7 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator
//! Returns a pointer to the normal vector for the point with the number n
Vector3D *getNormal( int n ) const;
//! Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normally taken from 'mNormVec', except if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise
bool getTriangle( double x, double y, Point3D *p1, Vector3D *v1, Point3D *p2, Vector3D *v2, Point3D *p3, Vector3D *v3 );
bool getTriangle( double x, double y, Point3D *p1 SIP_OUT, Vector3D *v1 SIP_OUT, Point3D *p2 SIP_OUT, Vector3D *v2 SIP_OUT, Point3D *p3 SIP_OUT, Vector3D *v3 SIP_OUT );

/** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3)
* \note not available in Python bindings
Expand Down
7 changes: 4 additions & 3 deletions src/analysis/interpolation/Triangulation.h
Expand Up @@ -18,6 +18,7 @@
#define TRIANGULATION_H

#include <QList>
#include "qgis.h"
#include <qpainter.h>
#include <TriangleInterpolator.h>
#include "qgis_analysis.h"
Expand All @@ -42,7 +43,7 @@ class ANALYSIS_EXPORT Triangulation
* Adds a line (e.g. a break-, structure- or an isoline) to the triangulation.
* The class takes ownership of the line object and its points
*/
virtual void addLine( Line3D *line, bool breakline ) = 0;
virtual void addLine( Line3D *line SIP_TRANSFER, bool breakline ) = 0;

/**
* Adds a point to the triangulation
Expand Down Expand Up @@ -71,10 +72,10 @@ class ANALYSIS_EXPORT Triangulation
/** Finds out in which triangle the point with coordinates x and y is and
* assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'
*/
virtual bool getTriangle( double x, double y, Point3D *p1, int *n1, Point3D *p2, int *n2, Point3D *p3, int *n3 ) = 0;
virtual bool getTriangle( double x, double y, Point3D *p1, int *n1 SIP_OUT, Point3D *p2 SIP_OUT, int *n2 SIP_OUT, Point3D *p3 SIP_OUT, int *n3 SIP_OUT ) = 0;

//! Finds out, in which triangle the point with coordinates x and y is and assigns the points at the vertices to 'p1', 'p2' and 'p3
virtual bool getTriangle( double x, double y, Point3D *p1, Point3D *p2, Point3D *p3 ) = 0;
virtual bool getTriangle( double x, double y, Point3D *p1 SIP_OUT, Point3D *p2 SIP_OUT, Point3D *p3 SIP_OUT ) = 0;

//! Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge)
virtual int getOppositePoint( int p1, int p2 ) = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/network/qgsgraphbuilder.h
Expand Up @@ -17,6 +17,7 @@
#define QGSGRAPHBUILDER_H

#include "qgsgraphbuilderinterface.h"
#include "qgis.h"

#include <qgsspatialindex.h>
#include "qgis_analysis.h"
Expand Down Expand Up @@ -52,7 +53,7 @@ class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
/**
* Returns generated QgsGraph
*/
QgsGraph *graph();
QgsGraph *graph() SIP_FACTORY;

private:

Expand Down
3 changes: 2 additions & 1 deletion src/analysis/raster/qgsrastercalcnode.h
Expand Up @@ -20,6 +20,7 @@
#define QGSRASTERCALCNODE_H

#include <QMap>
#include "qgis.h"
#include <QString>
#include "qgis_analysis.h"

Expand Down Expand Up @@ -98,7 +99,7 @@ class ANALYSIS_EXPORT QgsRasterCalcNode
*/
bool calculate( QMap<QString, QgsRasterBlock * > &rasterData, QgsRasterMatrix &result, int row = -1 ) const;

static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg );
static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) SIP_FACTORY;

private:
Type mType;
Expand Down
9 changes: 5 additions & 4 deletions src/core/annotations/qgsannotation.h
Expand Up @@ -19,6 +19,7 @@
#define QGSANNOTATION_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgspoint.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsrendercontext.h"
Expand Down Expand Up @@ -55,13 +56,13 @@ class CORE_EXPORT QgsAnnotation : public QObject
/**
* Constructor for QgsAnnotation.
*/
QgsAnnotation( QObject *parent = nullptr );
QgsAnnotation( QObject *parent SIP_TRANSFERTHIS = 0 );

/**
* Clones the annotation, returning a new copy of the annotation
* reflecting the annotation's current state.
*/
virtual QgsAnnotation *clone() const = 0;
virtual QgsAnnotation *clone() const = 0 SIP_FACTORY;

/**
* Returns true if the annotation is visible and should be rendered.
Expand Down Expand Up @@ -182,7 +183,7 @@ class CORE_EXPORT QgsAnnotation : public QObject
* of the symbol is transferred to the annotation.
* \see fillSymbol()
*/
void setFillSymbol( QgsFillSymbol *symbol );
void setFillSymbol( QgsFillSymbol *symbol SIP_TRANSFER );

/**
* Returns the symbol that is used for rendering the annotation frame.
Expand Down Expand Up @@ -216,7 +217,7 @@ class CORE_EXPORT QgsAnnotation : public QObject
* of the symbol is transferred to the annotation.
* \see markerSymbol()
*/
void setMarkerSymbol( QgsMarkerSymbol *symbol );
void setMarkerSymbol( QgsMarkerSymbol *symbol SIP_TRANSFER );

/**
* Returns the symbol that is drawn at the annotation's map position.
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgsaddremoveitemcommand.h
Expand Up @@ -19,6 +19,7 @@
#define QGSADDREMOVEITEMCOMMAND_H

#include <QUndoCommand>
#include "qgis.h"

#include "qgis_core.h"

Expand All @@ -40,7 +41,7 @@ class CORE_EXPORT QgsAddRemoveItemCommand: public QObject, public QUndoCommand
Removed
};

QgsAddRemoveItemCommand( State s, QgsComposerItem *item, QgsComposition *c, const QString &text, QUndoCommand *parent = nullptr );
QgsAddRemoveItemCommand( State s, QgsComposerItem *item, QgsComposition *c, const QString &text, QUndoCommand *parent SIP_TRANSFERTHIS = 0 );
~QgsAddRemoveItemCommand();

void redo() override;
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgsaddremovemultiframecommand.h
Expand Up @@ -19,6 +19,7 @@
#define QGSADDREMOVEMULTIFRAMECOMMAND_H

#include <QUndoCommand>
#include "qgis.h"

#include "qgis_core.h"

Expand All @@ -38,7 +39,7 @@ class CORE_EXPORT QgsAddRemoveMultiFrameCommand: public QUndoCommand
Removed
};

QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame *multiFrame, QgsComposition *c, const QString &text, QUndoCommand *parent = nullptr );
QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame *multiFrame, QgsComposition *c, const QString &text, QUndoCommand *parent SIP_TRANSFERTHIS = 0 );
~QgsAddRemoveMultiFrameCommand();
void redo() override;
void undo() override;
Expand Down
7 changes: 4 additions & 3 deletions src/core/composer/qgscomposerarrow.h
Expand Up @@ -19,6 +19,7 @@
#define QGSCOMPOSERARROW_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposeritem.h"
#include <QBrush>
#include <QPen>
Expand All @@ -44,14 +45,14 @@ class CORE_EXPORT QgsComposerArrow: public QgsComposerItem
/** Constructor
* \param c parent composition
*/
QgsComposerArrow( QgsComposition *c );
QgsComposerArrow( QgsComposition *c SIP_TRANSFERTHIS );