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 );

/** Constructor
* \param startPoint start point for line
* \param stopPoint end point for line
* \param c parent composition
*/
QgsComposerArrow( QPointF startPoint, QPointF stopPoint, QgsComposition *c );
QgsComposerArrow( QPointF startPoint, QPointF stopPoint, QgsComposition *c SIP_TRANSFERTHIS );

~QgsComposerArrow();

Expand Down Expand Up @@ -158,7 +159,7 @@ class CORE_EXPORT QgsComposerArrow: public QgsComposerItem
* \see lineSymbol
* \since QGIS 2.5
*/
void setLineSymbol( QgsLineSymbol *symbol );
void setLineSymbol( QgsLineSymbol *symbol SIP_TRANSFER );

/** Returns the line symbol used for drawing the line portion of the arrow
* \returns line symbol
Expand Down
5 changes: 3 additions & 2 deletions src/core/composer/qgscomposerattributetablemodelv2.h
Expand Up @@ -19,6 +19,7 @@
#define QGSCOMPOSERATTRIBUTETABLEMODELV2_H

#include <QAbstractTableModel>
#include "qgis.h"
#include <QSortFilterProxyModel>

#include "qgis_core.h"
Expand Down Expand Up @@ -49,7 +50,7 @@ class CORE_EXPORT QgsComposerAttributeTableColumnModelV2: public QAbstractTableM
* \param composerTable QgsComposerAttributeTable the model is attached to
* \param parent optional parent
*/
QgsComposerAttributeTableColumnModelV2( QgsComposerAttributeTableV2 *composerTable, QObject *parent = nullptr );
QgsComposerAttributeTableColumnModelV2( QgsComposerAttributeTableV2 *composerTable, QObject *parent SIP_TRANSFERTHIS = 0 );

virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
Expand Down Expand Up @@ -149,7 +150,7 @@ class CORE_EXPORT QgsComposerTableSortColumnsProxyModelV2: public QSortFilterPro
* \param filterType filter for columns, controls whether sorted or unsorted columns are shown
* \param parent optional parent
*/
QgsComposerTableSortColumnsProxyModelV2( QgsComposerAttributeTableV2 *composerTable, ColumnFilterType filterType, QObject *parent = nullptr );
QgsComposerTableSortColumnsProxyModelV2( QgsComposerAttributeTableV2 *composerTable, ColumnFilterType filterType, QObject *parent SIP_TRANSFERTHIS = 0 );

bool lessThan( const QModelIndex &left, const QModelIndex &right ) const override;
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerattributetablev2.h
Expand Up @@ -19,6 +19,7 @@
#define QGSCOMPOSERATTRIBUTETABLEV2_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposertablev2.h"
#include "qgsvectorlayerref.h"

Expand Down Expand Up @@ -68,7 +69,7 @@ class CORE_EXPORT QgsComposerAttributeTableV2: public QgsComposerTableV2
RelationChildren //!< Table shows attributes from related child features
};

QgsComposerAttributeTableV2( QgsComposition *composition, bool createUndoCommands );
QgsComposerAttributeTableV2( QgsComposition *composition SIP_TRANSFERTHIS, bool createUndoCommands );

virtual QString displayName() const override;

Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerframe.h
Expand Up @@ -17,6 +17,7 @@
#define QGSCOMPOSERFRAME_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposeritem.h"

class QgsComposition;
Expand All @@ -30,7 +31,7 @@ class CORE_EXPORT QgsComposerFrame: public QgsComposerItem
Q_OBJECT

public:
QgsComposerFrame( QgsComposition *c, QgsComposerMultiFrame *mf, qreal x, qreal y, qreal width, qreal height );
QgsComposerFrame( QgsComposition *c SIP_TRANSFERTHIS, QgsComposerMultiFrame *mf, qreal x, qreal y, qreal width, qreal height );

/** Sets the visible part of the multiframe's content which is visible within
* this frame (relative to the total multiframe extent in mm).
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerhtml.h
Expand Up @@ -17,6 +17,7 @@
#define QGSCOMPOSERHTML_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposermultiframe.h"
#include "qgsfeature.h"
#include <QUrl>
Expand All @@ -43,7 +44,7 @@ class CORE_EXPORT QgsComposerHtml: public QgsComposerMultiFrame
ManualHtml //!< HTML content is manually set for the item
};

QgsComposerHtml( QgsComposition *c, bool createUndoCommands );
QgsComposerHtml( QgsComposition *c SIP_TRANSFERTHIS, bool createUndoCommands );

~QgsComposerHtml();

Expand Down
5 changes: 3 additions & 2 deletions src/core/composer/qgscomposeritem.h
Expand Up @@ -18,6 +18,7 @@
#define QGSCOMPOSERITEM_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposeritemcommand.h"
#include "qgscomposerobject.h"
#include <QGraphicsRectItem>
Expand Down Expand Up @@ -108,7 +109,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
/** Constructor
\param composition parent composition
\param manageZValue true if the z-Value of this object should be managed by mComposition*/
QgsComposerItem( QgsComposition *composition, bool manageZValue = true );
QgsComposerItem( QgsComposition *composition SIP_TRANSFERTHIS, bool manageZValue = true );

/** Constructor with box position and composer object
\param x x coordinate of item
Expand All @@ -117,7 +118,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
\param height height of item
\param composition parent composition
\param manageZValue true if the z-Value of this object should be managed by mComposition*/
QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition *composition, bool manageZValue = true );
QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition *composition SIP_TRANSFERTHIS, bool manageZValue = true );
virtual ~QgsComposerItem();

//! Return correct graphics item type.
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposeritemcommand.h
Expand Up @@ -19,6 +19,7 @@
#define QGSCOMPOSERITEMCOMMAND_H

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

#include "qgis_core.h"
Expand All @@ -32,7 +33,7 @@ class QgsComposerMultiFrame;
class CORE_EXPORT QgsComposerItemCommand: public QUndoCommand
{
public:
QgsComposerItemCommand( QgsComposerItem *item, const QString &text, QUndoCommand *parent = nullptr );
QgsComposerItemCommand( QgsComposerItem *item, const QString &text, QUndoCommand *parent SIP_TRANSFERTHIS = 0 );

//! Reverses the command
void undo() override;
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposeritemgroup.h
Expand Up @@ -18,6 +18,7 @@
#define QGSCOMPOSERITEMGROUP_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposeritem.h"
#include <QSet>

Expand All @@ -28,7 +29,7 @@ class CORE_EXPORT QgsComposerItemGroup: public QgsComposerItem
{
Q_OBJECT
public:
QgsComposerItemGroup( QgsComposition *c );
QgsComposerItemGroup( QgsComposition *c SIP_TRANSFERTHIS );
~QgsComposerItemGroup();

//! Return correct graphics item type.
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerlegend.h
Expand Up @@ -19,6 +19,7 @@
#define QGSCOMPOSERLEGEND_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposeritem.h"
#include "qgslayertreemodel.h"
#include "qgslegendsettings.h"
Expand All @@ -42,7 +43,7 @@ class CORE_EXPORT QgsLegendModel : public QgsLayerTreeModel

public:
//! Construct the model based on the given layer tree
QgsLegendModel( QgsLayerTree *rootNode, QObject *parent = nullptr );
QgsLegendModel( QgsLayerTree *rootNode, QObject *parent SIP_TRANSFERTHIS = 0 );

QVariant data( const QModelIndex &index, int role ) const override;

Expand Down
5 changes: 3 additions & 2 deletions src/core/composer/qgscomposermap.h
Expand Up @@ -19,6 +19,7 @@

//#include "ui_qgscomposermapbase.h"
#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposeritem.h"
#include "qgsrectangle.h"
#include "qgscoordinatereferencesystem.h"
Expand Down Expand Up @@ -53,9 +54,9 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem

public:
//! Constructor.
QgsComposerMap( QgsComposition *composition, int x, int y, int width, int height );
QgsComposerMap( QgsComposition *composition SIP_TRANSFERTHIS, int x, int y, int width, int height );
//! Constructor. Settings are read from project.
QgsComposerMap( QgsComposition *composition );
QgsComposerMap( QgsComposition *composition SIP_TRANSFERTHIS );
virtual ~QgsComposerMap();

//! Return correct graphics item type.
Expand Down
5 changes: 3 additions & 2 deletions src/core/composer/qgscomposermapgrid.h
Expand Up @@ -19,6 +19,7 @@
#define QGSCOMPOSERMAPGRID_H

#include "qgis_core.h"
#include "qgis.h"
#include "qgscomposermapitem.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsrectangle.h"
Expand Down Expand Up @@ -60,7 +61,7 @@ class CORE_EXPORT QgsComposerMapGridStack : public QgsComposerMapItemStack
* should be called for the QgsComposerMap to prevent rendering artifacts
* \see removeGrid
*/
void addGrid( QgsComposerMapGrid *grid );
void addGrid( QgsComposerMapGrid *grid SIP_TRANSFER );

/** Removes a grid from the stack and deletes the corresponding QgsComposerMapGrid
* \param gridId id for the QgsComposerMapGrid to remove
Expand Down Expand Up @@ -479,7 +480,7 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
* \see setMarkerSymbol
* \see setStyle
*/
void setLineSymbol( QgsLineSymbol *symbol );
void setLineSymbol( QgsLineSymbol *symbol SIP_TRANSFER );

/** Gets the line symbol used for drawing grid lines. This is only used for grids with
* QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles.
Expand Down

0 comments on commit d3bc0e3

Please sign in to comment.