diff --git a/src/analysis/interpolation/NormVecDecorator.h b/src/analysis/interpolation/NormVecDecorator.h index 72386d613b3..4bb6b2e92b0 100644 --- a/src/analysis/interpolation/NormVecDecorator.h +++ b/src/analysis/interpolation/NormVecDecorator.h @@ -18,6 +18,7 @@ #define NORMVECDECORATOR_H #include "TriDecorator.h" +#include "qgis.h" #include #include #include "qgslogger.h" @@ -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 diff --git a/src/analysis/interpolation/Triangulation.h b/src/analysis/interpolation/Triangulation.h index dc048839b3c..cac8c2b5e57 100644 --- a/src/analysis/interpolation/Triangulation.h +++ b/src/analysis/interpolation/Triangulation.h @@ -18,6 +18,7 @@ #define TRIANGULATION_H #include +#include "qgis.h" #include #include #include "qgis_analysis.h" @@ -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 @@ -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; diff --git a/src/analysis/network/qgsgraphbuilder.h b/src/analysis/network/qgsgraphbuilder.h index 1b36b247539..b1fbd9ffe01 100644 --- a/src/analysis/network/qgsgraphbuilder.h +++ b/src/analysis/network/qgsgraphbuilder.h @@ -17,6 +17,7 @@ #define QGSGRAPHBUILDER_H #include "qgsgraphbuilderinterface.h" +#include "qgis.h" #include #include "qgis_analysis.h" @@ -52,7 +53,7 @@ class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface /** * Returns generated QgsGraph */ - QgsGraph *graph(); + QgsGraph *graph() SIP_FACTORY; private: diff --git a/src/analysis/raster/qgsrastercalcnode.h b/src/analysis/raster/qgsrastercalcnode.h index 62179d8ca5a..c32e9cd80af 100644 --- a/src/analysis/raster/qgsrastercalcnode.h +++ b/src/analysis/raster/qgsrastercalcnode.h @@ -20,6 +20,7 @@ #define QGSRASTERCALCNODE_H #include +#include "qgis.h" #include #include "qgis_analysis.h" @@ -98,7 +99,7 @@ class ANALYSIS_EXPORT QgsRasterCalcNode */ bool calculate( QMap &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; diff --git a/src/core/annotations/qgsannotation.h b/src/core/annotations/qgsannotation.h index 98235cb88a3..4e2eb56b929 100644 --- a/src/core/annotations/qgsannotation.h +++ b/src/core/annotations/qgsannotation.h @@ -19,6 +19,7 @@ #define QGSANNOTATION_H #include "qgis_core.h" +#include "qgis.h" #include "qgspoint.h" #include "qgscoordinatereferencesystem.h" #include "qgsrendercontext.h" @@ -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. @@ -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. @@ -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. diff --git a/src/core/composer/qgsaddremoveitemcommand.h b/src/core/composer/qgsaddremoveitemcommand.h index f51eb471ace..d952885cb6b 100644 --- a/src/core/composer/qgsaddremoveitemcommand.h +++ b/src/core/composer/qgsaddremoveitemcommand.h @@ -19,6 +19,7 @@ #define QGSADDREMOVEITEMCOMMAND_H #include +#include "qgis.h" #include "qgis_core.h" @@ -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; diff --git a/src/core/composer/qgsaddremovemultiframecommand.h b/src/core/composer/qgsaddremovemultiframecommand.h index 7fc179ee100..f5e5ccefe08 100644 --- a/src/core/composer/qgsaddremovemultiframecommand.h +++ b/src/core/composer/qgsaddremovemultiframecommand.h @@ -19,6 +19,7 @@ #define QGSADDREMOVEMULTIFRAMECOMMAND_H #include +#include "qgis.h" #include "qgis_core.h" @@ -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; diff --git a/src/core/composer/qgscomposerarrow.h b/src/core/composer/qgscomposerarrow.h index 8bff70af36b..2629dc90a72 100644 --- a/src/core/composer/qgscomposerarrow.h +++ b/src/core/composer/qgscomposerarrow.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERARROW_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include #include @@ -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(); @@ -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 diff --git a/src/core/composer/qgscomposerattributetablemodelv2.h b/src/core/composer/qgscomposerattributetablemodelv2.h index f57522862ee..5d8821f4a7c 100644 --- a/src/core/composer/qgscomposerattributetablemodelv2.h +++ b/src/core/composer/qgscomposerattributetablemodelv2.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERATTRIBUTETABLEMODELV2_H #include +#include "qgis.h" #include #include "qgis_core.h" @@ -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; @@ -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; diff --git a/src/core/composer/qgscomposerattributetablev2.h b/src/core/composer/qgscomposerattributetablev2.h index 3dc56f46f35..9f69e4fb4e9 100644 --- a/src/core/composer/qgscomposerattributetablev2.h +++ b/src/core/composer/qgscomposerattributetablev2.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERATTRIBUTETABLEV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposertablev2.h" #include "qgsvectorlayerref.h" @@ -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; diff --git a/src/core/composer/qgscomposerframe.h b/src/core/composer/qgscomposerframe.h index e3b285c793b..feaa4d28312 100644 --- a/src/core/composer/qgscomposerframe.h +++ b/src/core/composer/qgscomposerframe.h @@ -17,6 +17,7 @@ #define QGSCOMPOSERFRAME_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" class QgsComposition; @@ -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). diff --git a/src/core/composer/qgscomposerhtml.h b/src/core/composer/qgscomposerhtml.h index 06ea185344b..440376b7ae7 100644 --- a/src/core/composer/qgscomposerhtml.h +++ b/src/core/composer/qgscomposerhtml.h @@ -17,6 +17,7 @@ #define QGSCOMPOSERHTML_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposermultiframe.h" #include "qgsfeature.h" #include @@ -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(); diff --git a/src/core/composer/qgscomposeritem.h b/src/core/composer/qgscomposeritem.h index 8172ec37b43..b5cbd5218d4 100644 --- a/src/core/composer/qgscomposeritem.h +++ b/src/core/composer/qgscomposeritem.h @@ -18,6 +18,7 @@ #define QGSCOMPOSERITEM_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritemcommand.h" #include "qgscomposerobject.h" #include @@ -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 @@ -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. diff --git a/src/core/composer/qgscomposeritemcommand.h b/src/core/composer/qgscomposeritemcommand.h index 1193e1eb96b..833eb88710b 100644 --- a/src/core/composer/qgscomposeritemcommand.h +++ b/src/core/composer/qgscomposeritemcommand.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERITEMCOMMAND_H #include +#include "qgis.h" #include #include "qgis_core.h" @@ -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; diff --git a/src/core/composer/qgscomposeritemgroup.h b/src/core/composer/qgscomposeritemgroup.h index 14895905817..7a0fe09d9b4 100644 --- a/src/core/composer/qgscomposeritemgroup.h +++ b/src/core/composer/qgscomposeritemgroup.h @@ -18,6 +18,7 @@ #define QGSCOMPOSERITEMGROUP_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include @@ -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. diff --git a/src/core/composer/qgscomposerlegend.h b/src/core/composer/qgscomposerlegend.h index 377f04d92e1..d64959c5da8 100644 --- a/src/core/composer/qgscomposerlegend.h +++ b/src/core/composer/qgscomposerlegend.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERLEGEND_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include "qgslayertreemodel.h" #include "qgslegendsettings.h" @@ -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; diff --git a/src/core/composer/qgscomposermap.h b/src/core/composer/qgscomposermap.h index 58d0c929067..2f8bfd18d81 100644 --- a/src/core/composer/qgscomposermap.h +++ b/src/core/composer/qgscomposermap.h @@ -19,6 +19,7 @@ //#include "ui_qgscomposermapbase.h" #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include "qgsrectangle.h" #include "qgscoordinatereferencesystem.h" @@ -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. diff --git a/src/core/composer/qgscomposermapgrid.h b/src/core/composer/qgscomposermapgrid.h index 1a3701856b1..7030a420147 100644 --- a/src/core/composer/qgscomposermapgrid.h +++ b/src/core/composer/qgscomposermapgrid.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERMAPGRID_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposermapitem.h" #include "qgscoordinatereferencesystem.h" #include "qgsrectangle.h" @@ -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 @@ -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. diff --git a/src/core/composer/qgscomposermapoverview.h b/src/core/composer/qgscomposermapoverview.h index 81e656c0fd5..44563a40ed5 100644 --- a/src/core/composer/qgscomposermapoverview.h +++ b/src/core/composer/qgscomposermapoverview.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERMAPOVERVIEW_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposermapitem.h" #include #include @@ -54,7 +55,7 @@ class CORE_EXPORT QgsComposerMapOverviewStack : public QgsComposerMapItemStack * should be called for the QgsComposerMap to prevent rendering artifacts * \see removeOverview */ - void addOverview( QgsComposerMapOverview *overview ); + void addOverview( QgsComposerMapOverview *overview SIP_TRANSFER ); /** Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview * \param overviewId id for the QgsComposerMapOverview to remove @@ -181,7 +182,7 @@ class CORE_EXPORT QgsComposerMapOverview : public QgsComposerMapItem * \param symbol fill symbol for overview * \see frameSymbol */ - void setFrameSymbol( QgsFillSymbol *symbol ); + void setFrameSymbol( QgsFillSymbol *symbol SIP_TRANSFER ); /** Gets the fill symbol used for drawing the overview extent. * \returns fill symbol for overview diff --git a/src/core/composer/qgscomposermodel.h b/src/core/composer/qgscomposermodel.h index 0297a2cb58f..2221171c0b0 100644 --- a/src/core/composer/qgscomposermodel.h +++ b/src/core/composer/qgscomposermodel.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERMODEL_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -64,7 +65,7 @@ class CORE_EXPORT QgsComposerModel: public QAbstractItemModel * \param composition composition to attach to * \param parent parent object */ - explicit QgsComposerModel( QgsComposition *composition, QObject *parent = nullptr ); + explicit QgsComposerModel( QgsComposition *composition, QObject *parent SIP_TRANSFERTHIS = 0 ); //reimplemented QAbstractItemModel methods QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override; @@ -307,7 +308,7 @@ class CORE_EXPORT QgsComposerProxyModel: public QSortFilterProxyModel * \param composition composition to attach model to * \param parent optional parent */ - QgsComposerProxyModel( QgsComposition *composition, QObject *parent = nullptr ); + QgsComposerProxyModel( QgsComposition *composition, QObject *parent SIP_TRANSFERTHIS = 0 ); /** Returns the current item type filter, or QgsComposerItem::ComposerItem if no * item type filter is set. diff --git a/src/core/composer/qgscomposermultiframe.h b/src/core/composer/qgscomposermultiframe.h index 75fa7ee25e7..bc3d228c9ec 100644 --- a/src/core/composer/qgscomposermultiframe.h +++ b/src/core/composer/qgscomposermultiframe.h @@ -17,6 +17,7 @@ #define QGSCOMPOSERMULTIFRAME_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposerobject.h" #include #include @@ -58,7 +59,7 @@ class CORE_EXPORT QgsComposerMultiFrame: public QgsComposerObject * \param c parent composition * \param createUndoCommands */ - QgsComposerMultiFrame( QgsComposition *c, bool createUndoCommands ); + QgsComposerMultiFrame( QgsComposition *c SIP_TRANSFERTHIS, bool createUndoCommands ); virtual ~QgsComposerMultiFrame(); @@ -104,7 +105,7 @@ class CORE_EXPORT QgsComposerMultiFrame: public QgsComposerObject * \param recalcFrameSizes set to true to force recalculation of all existing frame sizes * \see removeFrame */ - virtual void addFrame( QgsComposerFrame *frame, bool recalcFrameSizes = true ) = 0; + virtual void addFrame( QgsComposerFrame *frame SIP_TRANSFER, bool recalcFrameSizes = true ) = 0; /** Finds the optimal position to break a frame at. * \param yPos maximum vertical position for break diff --git a/src/core/composer/qgscomposermultiframecommand.h b/src/core/composer/qgscomposermultiframecommand.h index 6236cc2b184..697c77dcd3e 100644 --- a/src/core/composer/qgscomposermultiframecommand.h +++ b/src/core/composer/qgscomposermultiframecommand.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERMULTIFRAMECOMMAND_H #include +#include "qgis.h" #include #include "qgis_core.h" @@ -31,7 +32,7 @@ class QgsComposerMultiFrame; class CORE_EXPORT QgsComposerMultiFrameCommand: public QUndoCommand { public: - QgsComposerMultiFrameCommand( QgsComposerMultiFrame *multiFrame, const QString &text, QUndoCommand *parent = nullptr ); + QgsComposerMultiFrameCommand( QgsComposerMultiFrame *multiFrame, const QString &text, QUndoCommand *parent SIP_TRANSFERTHIS = 0 ); void undo() override; void redo() override; diff --git a/src/core/composer/qgscomposerscalebar.h b/src/core/composer/qgscomposerscalebar.h index 2b595a8c435..f3268e64b2e 100644 --- a/src/core/composer/qgscomposerscalebar.h +++ b/src/core/composer/qgscomposerscalebar.h @@ -17,6 +17,7 @@ #define QGSCOMPOSERSCALEBAR_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include "scalebar/qgsscalebarsettings.h" #include "scalebar/qgsscalebarrenderer.h" @@ -36,7 +37,7 @@ class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem public: - QgsComposerScaleBar( QgsComposition *composition ); + QgsComposerScaleBar( QgsComposition *composition SIP_TRANSFERTHIS ); ~QgsComposerScaleBar(); //! Return correct graphics item type. diff --git a/src/core/composer/qgscomposershape.h b/src/core/composer/qgscomposershape.h index 0cd9d31ee82..cfc115ba53a 100644 --- a/src/core/composer/qgscomposershape.h +++ b/src/core/composer/qgscomposershape.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERSHAPE_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include #include @@ -39,7 +40,7 @@ class CORE_EXPORT QgsComposerShape: public QgsComposerItem Triangle }; - QgsComposerShape( QgsComposition *composition ); + QgsComposerShape( QgsComposition *composition SIP_TRANSFERTHIS ); QgsComposerShape( qreal x, qreal y, qreal width, qreal height, QgsComposition *composition ); ~QgsComposerShape(); diff --git a/src/core/composer/qgscomposertablev2.h b/src/core/composer/qgscomposertablev2.h index 8e8740a9645..a34747ab92b 100644 --- a/src/core/composer/qgscomposertablev2.h +++ b/src/core/composer/qgscomposertablev2.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERTABLEV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposermultiframe.h" #include #include @@ -145,7 +146,7 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame LastRow //!< Style last row only }; - QgsComposerTableV2( QgsComposition *composition, bool createUndoCommands ); + QgsComposerTableV2( QgsComposition *composition SIP_TRANSFERTHIS, bool createUndoCommands ); QgsComposerTableV2(); virtual ~QgsComposerTableV2(); @@ -420,7 +421,7 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame * is transferred to the table. * \see columns */ - void setColumns( const QgsComposerTableColumns &columns ); + void setColumns( const QgsComposerTableColumns &columns SIP_TRANSFER ); /** Sets the cell style for a cell group. * \param group group to set style for diff --git a/src/core/composer/qgscomposertexttable.h b/src/core/composer/qgscomposertexttable.h index ad7235f11ce..9db1542798f 100644 --- a/src/core/composer/qgscomposertexttable.h +++ b/src/core/composer/qgscomposertexttable.h @@ -19,6 +19,7 @@ #define QGSCOMPOSERTEXTTABLE_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposertablev2.h" /** \ingroup core @@ -31,7 +32,7 @@ class CORE_EXPORT QgsComposerTextTableV2 : public QgsComposerTableV2 Q_OBJECT public: - QgsComposerTextTableV2( QgsComposition *c, bool createUndoCommands ); + QgsComposerTextTableV2( QgsComposition *c SIP_TRANSFERTHIS, bool createUndoCommands ); /** Adds a row to the table * \param row list of strings to use for each cell's value in the newly added row diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index f03b952956b..07970cd7561 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -17,6 +17,7 @@ #define QGSCOMPOSITION_H #include "qgis_core.h" +#include "qgis.h" #include #include @@ -207,8 +208,8 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo * \see resizePageToContents() * \see setResizeToContentsMargins() */ - void resizeToContentsMargins( double &marginTop, double &marginRight, - double &marginBottom, double &marginLeft ) const; + void resizeToContentsMargins( double &marginTop SIP_OUT, double &marginRight SIP_OUT, + double &marginBottom SIP_OUT, double &marginLeft SIP_OUT ) const; /** Returns the vertical space between pages in a composer view * \returns space between pages in mm diff --git a/src/core/composer/qgslayoutmanager.h b/src/core/composer/qgslayoutmanager.h index f5c25f72b7f..b035127ee7e 100644 --- a/src/core/composer/qgslayoutmanager.h +++ b/src/core/composer/qgslayoutmanager.h @@ -17,6 +17,7 @@ #define QGSLAYOUTMANAGER_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposition.h" #include @@ -46,7 +47,7 @@ class CORE_EXPORT QgsLayoutManager : public QObject * Constructor for QgsLayoutManager. The project will become the parent object for this * manager. */ - explicit QgsLayoutManager( QgsProject *project = nullptr ); + explicit QgsLayoutManager( QgsProject *project SIP_TRANSFERTHIS = 0 ); ~QgsLayoutManager(); @@ -57,7 +58,7 @@ class CORE_EXPORT QgsLayoutManager : public QObject * \see removeComposition() * \see compositionAdded() */ - bool addComposition( QgsComposition *composition ); + bool addComposition( QgsComposition *composition SIP_TRANSFER ); /** * Removes a composition from the manager. The composition is deleted. diff --git a/src/core/composer/qgspaperitem.h b/src/core/composer/qgspaperitem.h index 558e85669cf..f3a701dccb8 100644 --- a/src/core/composer/qgspaperitem.h +++ b/src/core/composer/qgspaperitem.h @@ -19,6 +19,7 @@ #define QGSPAPERITEM_H #include "qgis_core.h" +#include "qgis.h" #include "qgscomposeritem.h" #include @@ -44,8 +45,8 @@ class CORE_EXPORT QgsPaperItem : public QgsComposerItem Q_OBJECT public: - QgsPaperItem( QgsComposition *c ); - QgsPaperItem( qreal x, qreal y, qreal width, qreal height, QgsComposition *composition ); + QgsPaperItem( QgsComposition *c SIP_TRANSFERTHIS ); + QgsPaperItem( qreal x, qreal y, qreal width, qreal height, QgsComposition *composition SIP_TRANSFERTHIS ); ~QgsPaperItem(); //! Return correct graphics item type. diff --git a/src/core/diagram/qgsdiagram.h b/src/core/diagram/qgsdiagram.h index 14a4a7a89f1..afce3152a4e 100644 --- a/src/core/diagram/qgsdiagram.h +++ b/src/core/diagram/qgsdiagram.h @@ -16,6 +16,7 @@ #define QGSDIAGRAM_H #include "qgis_core.h" +#include "qgis.h" #include #include #include "qgsexpression.h" //for QMap with QgsExpression @@ -40,7 +41,7 @@ class CORE_EXPORT QgsDiagram /** Returns an instance that is equivalent to this one * \since QGIS 2.4 */ - virtual QgsDiagram *clone() const = 0; + virtual QgsDiagram *clone() const = 0 SIP_FACTORY; void clearCache(); diff --git a/src/core/dxf/qgsdxfexport.h b/src/core/dxf/qgsdxfexport.h index 090cdb8d9be..d97ec4e8725 100644 --- a/src/core/dxf/qgsdxfexport.h +++ b/src/core/dxf/qgsdxfexport.h @@ -19,6 +19,7 @@ #define QGSDXFEXPORT_H #include "qgis_core.h" +#include "qgis.h" #include "qgsgeometry.h" #include "qgssymbol.h" // for OutputUnit enum #include "qgsmapsettings.h" @@ -178,7 +179,7 @@ class CORE_EXPORT QgsDxfExport * \param i integer value * \note available in Python bindings as writeGroupInt */ - void writeGroup( int code, int i ); + void writeGroup( int code, int i ) SIP_PYNAME( writeGroupInt ); /** * Write a group code with a floating point value @@ -186,7 +187,7 @@ class CORE_EXPORT QgsDxfExport * \param d floating point value * \note available in Python bindings as writeGroupDouble */ - void writeGroup( int code, double d ); + void writeGroup( int code, double d ) SIP_PYNAME( writeGroupDouble ); /** * Write a group code with a string value @@ -202,7 +203,7 @@ class CORE_EXPORT QgsDxfExport * \note available in Python bindings as writeGroupPointV2 * \since QGIS 2.15 */ - void writeGroup( int code, const QgsPointV2 &p ); + void writeGroup( int code, const QgsPointV2 &p ) SIP_PYNAME( writeGroupPointV2 ); /** * Write a group code with color value @@ -276,22 +277,22 @@ class CORE_EXPORT QgsDxfExport //! Write point //! \note available in Python bindings as writePointV2 //! \since QGIS 2.15 - void writePoint( const QString &layer, const QColor &color, const QgsPointV2 &pt ); + void writePoint( const QString &layer, const QColor &color, const QgsPointV2 &pt ) SIP_PYNAME( writePointV2 ); //! Write filled circle (as hatch) //! \note available in Python bindings as writePointV2 //! \since QGIS 2.15 - void writeFilledCircle( const QString &layer, const QColor &color, const QgsPointV2 &pt, double radius ); + void writeFilledCircle( const QString &layer, const QColor &color, const QgsPointV2 &pt, double radius ) SIP_PYNAME( writeFillCircleV2 ); //! Write circle (as polyline) //! \note available in Python bindings as writeCircleV2 //! \since QGIS 2.15 - void writeCircle( const QString &layer, const QColor &color, const QgsPointV2 &pt, double radius, const QString &lineStyleName, double width ); + void writeCircle( const QString &layer, const QColor &color, const QgsPointV2 &pt, double radius, const QString &lineStyleName, double width ) SIP_PYNAME( writeCircleV2 ); //! Write text (TEXT) //! \note available in Python bindings as writeTextV2 //! \since QGIS 2.15 - void writeText( const QString &layer, const QString &text, const QgsPointV2 &pt, double size, double angle, const QColor &color ); + void writeText( const QString &layer, const QString &text, const QgsPointV2 &pt, double size, double angle, const QColor &color ) SIP_PYNAME( writeTextV2 ); //! Write mtext (MTEXT) //! \note available in Python bindings as writeMTextV2 diff --git a/src/core/effects/qgsblureffect.h b/src/core/effects/qgsblureffect.h index 351d63e9ee2..f1840181266 100644 --- a/src/core/effects/qgsblureffect.h +++ b/src/core/effects/qgsblureffect.h @@ -46,7 +46,7 @@ class CORE_EXPORT QgsBlurEffect : public QgsPaintEffect * \param map encoded properties string map * \returns new QgsBlurEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsBlurEffect(); diff --git a/src/core/effects/qgscoloreffect.h b/src/core/effects/qgscoloreffect.h index 133f4dca58c..2776c177393 100644 --- a/src/core/effects/qgscoloreffect.h +++ b/src/core/effects/qgscoloreffect.h @@ -40,7 +40,7 @@ class CORE_EXPORT QgsColorEffect : public QgsPaintEffect * \param map encoded properties string map * \returns new QgsColorEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsColorEffect(); diff --git a/src/core/effects/qgseffectstack.h b/src/core/effects/qgseffectstack.h index ca170c53cbe..59fa1f2d733 100644 --- a/src/core/effects/qgseffectstack.h +++ b/src/core/effects/qgseffectstack.h @@ -18,6 +18,7 @@ #define QGSEFFECTSTACK_H #include "qgis_core.h" +#include "qgis.h" #include "qgspainteffect.h" /** \ingroup core @@ -49,7 +50,7 @@ class CORE_EXPORT QgsEffectStack : public QgsPaintEffect * \param map unused encoded properties string map * \returns new QgsEffectStack */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsEffectStack(); QgsEffectStack( const QgsEffectStack &other ); diff --git a/src/core/effects/qgsgloweffect.h b/src/core/effects/qgsgloweffect.h index 612e105402b..5317935b46e 100644 --- a/src/core/effects/qgsgloweffect.h +++ b/src/core/effects/qgsgloweffect.h @@ -18,6 +18,7 @@ #define QGSGLOWEFFECT_H #include "qgis_core.h" +#include "qgis.h" #include "qgspainteffect.h" #include "qgssymbol.h" #include "qgscolorramp.h" @@ -153,7 +154,7 @@ class CORE_EXPORT QgsGlowEffect : public QgsPaintEffect * \see ramp * \see setColorType */ - void setRamp( QgsColorRamp *ramp ); + void setRamp( QgsColorRamp *ramp SIP_TRANSFER ); /** Returns the color ramp used for the glow. This only applies if the colorType() * is set to ColorRamp. The glow will utilize colors from the ramp. @@ -239,7 +240,7 @@ class CORE_EXPORT QgsOuterGlowEffect : public QgsGlowEffect * \param map encoded properties string map * \returns new QgsOuterGlowEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsOuterGlowEffect(); @@ -269,7 +270,7 @@ class CORE_EXPORT QgsInnerGlowEffect : public QgsGlowEffect * \param map encoded properties string map * \returns new QgsInnerGlowEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsInnerGlowEffect(); diff --git a/src/core/effects/qgsimageoperation.h b/src/core/effects/qgsimageoperation.h index bdc5b084da3..b1d1e251f69 100644 --- a/src/core/effects/qgsimageoperation.h +++ b/src/core/effects/qgsimageoperation.h @@ -19,6 +19,7 @@ #define QGSIMAGEOPERATION_H #include +#include "qgis.h" #include #include @@ -159,7 +160,7 @@ class CORE_EXPORT QgsImageOperation * \returns blurred image * \note for fastest operation, ensure the source image is ARGB32_Premultiplied */ - static QImage *gaussianBlur( QImage &image, const int radius ); + static QImage *gaussianBlur( QImage &image, const int radius ) SIP_FACTORY; /** Flips an image horizontally or vertically * \param image QImage to flip diff --git a/src/core/effects/qgspainteffect.h b/src/core/effects/qgspainteffect.h index aee3732a6b1..1672b171c13 100644 --- a/src/core/effects/qgspainteffect.h +++ b/src/core/effects/qgspainteffect.h @@ -76,7 +76,7 @@ class CORE_EXPORT QgsPaintEffect /** Duplicates an effect by creating a deep copy of the effect * \returns clone of paint effect */ - virtual QgsPaintEffect *clone() const = 0; + virtual QgsPaintEffect *clone() const = 0 SIP_FACTORY; /** Returns the properties describing the paint effect encoded in a * string format. @@ -264,7 +264,7 @@ class CORE_EXPORT QgsDrawSourceEffect : public QgsPaintEffect * \param map encoded properties string map * \returns new QgsDrawSourceEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; virtual QString type() const override { return QStringLiteral( "drawSource" ); } virtual QgsDrawSourceEffect *clone() const override; diff --git a/src/core/effects/qgspainteffectregistry.h b/src/core/effects/qgspainteffectregistry.h index 268fa76b009..38097b27c95 100644 --- a/src/core/effects/qgspainteffectregistry.h +++ b/src/core/effects/qgspainteffectregistry.h @@ -62,7 +62,7 @@ class CORE_EXPORT QgsPaintEffectAbstractMetadata * \param map properties string map * \returns new paint effect */ - virtual QgsPaintEffect *createPaintEffect( const QgsStringMap &map ) = 0; + virtual QgsPaintEffect *createPaintEffect( const QgsStringMap &map ) = 0 SIP_FACTORY; /** Create configuration widget for paint effect of this class. Can return nullptr * if there's no GUI for the paint effect class. @@ -177,7 +177,7 @@ class CORE_EXPORT QgsPaintEffectRegistry * \param metadata effect metadata. Ownership is transferred to the registry. * \returns true if add was successful. */ - bool addEffectType( QgsPaintEffectAbstractMetadata *metadata ); + bool addEffectType( QgsPaintEffectAbstractMetadata *metadata SIP_TRANSFER ); /** Creates a new paint effect given the effect name and properties map. * \param name unique name representing paint effect class @@ -185,7 +185,7 @@ class CORE_EXPORT QgsPaintEffectRegistry * \returns new paint effect of specified class, or nullptr if matching * paint effect could not be created */ - QgsPaintEffect *createEffect( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const; + QgsPaintEffect *createEffect( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const SIP_FACTORY; /** Creates a new paint effect given a DOM element storing paint effect * properties. @@ -193,7 +193,7 @@ class CORE_EXPORT QgsPaintEffectRegistry * \returns new paint effect, or nullptr if matching * paint effect could not be created */ - QgsPaintEffect *createEffect( const QDomElement &element ) const; + QgsPaintEffect *createEffect( const QDomElement &element ) const SIP_FACTORY; /** Returns a list of known paint effects. * \returns list of paint effect names @@ -206,7 +206,7 @@ class CORE_EXPORT QgsPaintEffectRegistry * \returns default effects stack * \see isDefaultStack() */ - static QgsPaintEffect *defaultStack(); + static QgsPaintEffect *defaultStack() SIP_FACTORY; /** Tests whether a paint effect matches the default effects stack. * \param effect paint effect to test diff --git a/src/core/effects/qgsshadoweffect.h b/src/core/effects/qgsshadoweffect.h index 95a8e964a44..429015bef83 100644 --- a/src/core/effects/qgsshadoweffect.h +++ b/src/core/effects/qgsshadoweffect.h @@ -195,7 +195,7 @@ class CORE_EXPORT QgsDropShadowEffect : public QgsShadowEffect * \param map encoded properties string map * \returns new QgsDropShadowEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsDropShadowEffect(); @@ -224,7 +224,7 @@ class CORE_EXPORT QgsInnerShadowEffect : public QgsShadowEffect * \param map encoded properties string map * \returns new QgsInnerShadowEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsInnerShadowEffect(); diff --git a/src/core/effects/qgstransformeffect.h b/src/core/effects/qgstransformeffect.h index 1fed60c86da..41b018270ff 100644 --- a/src/core/effects/qgstransformeffect.h +++ b/src/core/effects/qgstransformeffect.h @@ -41,7 +41,7 @@ class CORE_EXPORT QgsTransformEffect : public QgsPaintEffect * \param map encoded properties string map * \returns new QgsTransformEffect */ - static QgsPaintEffect *create( const QgsStringMap &map ); + static QgsPaintEffect *create( const QgsStringMap &map ) SIP_FACTORY; QgsTransformEffect(); diff --git a/src/core/gps/qgsgpsconnection.h b/src/core/gps/qgsgpsconnection.h index e8e5b7c9341..45b1c034b1d 100644 --- a/src/core/gps/qgsgpsconnection.h +++ b/src/core/gps/qgsgpsconnection.h @@ -19,6 +19,7 @@ #define QGSGPSCONNECTION_H #include +#include "qgis.h" #include #include @@ -76,7 +77,7 @@ class CORE_EXPORT QgsGPSConnection : public QObject /** Constructor \param dev input device for the connection (e.g. serial device). The class takes ownership of the object */ - QgsGPSConnection( QIODevice *dev ); + QgsGPSConnection( QIODevice *dev SIP_TRANSFER ); virtual ~QgsGPSConnection(); //! Opens connection to device bool connect(); @@ -84,7 +85,7 @@ class CORE_EXPORT QgsGPSConnection : public QObject bool close(); //! Sets the GPS source. The class takes ownership of the device class - void setSource( QIODevice *source ); + void setSource( QIODevice *source SIP_TRANSFER ); //! Returns the status. Possible state are not connected, connected, data received Status status() const { return mStatus; } diff --git a/src/core/qgsdataitemprovider.h b/src/core/qgsdataitemprovider.h index 06dc905d99d..9f2ddc1da24 100644 --- a/src/core/qgsdataitemprovider.h +++ b/src/core/qgsdataitemprovider.h @@ -17,6 +17,7 @@ #define QGSDATAITEMPROVIDER_H #include "qgis_core.h" +#include "qgis.h" class QgsDataItem; @@ -47,7 +48,7 @@ class CORE_EXPORT QgsDataItemProvider //! Create a new instance of QgsDataItem (or null) for given path and parent item. //! Caller takes responsibility of deleting created items. - virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0; + virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0 SIP_FACTORY; }; diff --git a/src/core/qgsdataitemproviderregistry.h b/src/core/qgsdataitemproviderregistry.h index 6998069d1a2..2635b15b271 100644 --- a/src/core/qgsdataitemproviderregistry.h +++ b/src/core/qgsdataitemproviderregistry.h @@ -17,6 +17,7 @@ #define QGSDATAITEMPROVIDERREGISTRY_H #include +#include "qgis.h" #include "qgis_core.h" @@ -48,7 +49,7 @@ class CORE_EXPORT QgsDataItemProviderRegistry QList providers() const { return mProviders; } //! Add a provider implementation. Takes ownership of the object. - void addProvider( QgsDataItemProvider *provider ); + void addProvider( QgsDataItemProvider *provider SIP_TRANSFER ); //! Remove provider implementation from the list (provider object is deleted) void removeProvider( QgsDataItemProvider *provider ); diff --git a/src/core/qgsdbfilterproxymodel.h b/src/core/qgsdbfilterproxymodel.h index fa3bb3bf590..57c178b5b9d 100644 --- a/src/core/qgsdbfilterproxymodel.h +++ b/src/core/qgsdbfilterproxymodel.h @@ -19,6 +19,7 @@ #define QGSDBFILTERPROXYMODEL_H #include +#include "qgis.h" #include "qgis_core.h" @@ -38,7 +39,7 @@ class CORE_EXPORT QgsDatabaseFilterProxyModel: public QSortFilterProxyModel /** * Constructor for QgsDatabaseFilterProxyModel. */ - QgsDatabaseFilterProxyModel( QObject *parent = nullptr ); + QgsDatabaseFilterProxyModel( QObject *parent SIP_TRANSFERTHIS = 0 ); //! Calls QSortFilterProxyModel::setFilterWildcard and triggers update void _setFilterWildcard( const QString &pattern ); diff --git a/src/core/qgsdiagramrenderer.h b/src/core/qgsdiagramrenderer.h index 0b96208c4d2..8b353106804 100644 --- a/src/core/qgsdiagramrenderer.h +++ b/src/core/qgsdiagramrenderer.h @@ -16,6 +16,7 @@ #define QGSDIAGRAMRENDERERV2_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -218,7 +219,7 @@ class CORE_EXPORT QgsDiagramLayerSettings * \see renderer() * \since QGIS 2.16 */ - void setRenderer( QgsDiagramRenderer *diagramRenderer ); + void setRenderer( QgsDiagramRenderer *diagramRenderer SIP_TRANSFER ); /** Returns the coordinate transform associated with the layer, or an * invalid transform if no transformation is required. @@ -428,7 +429,7 @@ class CORE_EXPORT QgsDiagramSettings * \note caller is responsible for deletion of QgsLayerTreeModelLegendNodes * \since QGIS 2.10 */ - QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const; + QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const SIP_FACTORY; }; @@ -466,7 +467,7 @@ class CORE_EXPORT QgsDiagramRenderer /** Returns new instance that is equivalent to this one * \since QGIS 2.4 */ - virtual QgsDiagramRenderer *clone() const = 0; + virtual QgsDiagramRenderer *clone() const = 0 SIP_FACTORY; //! Returns size of the diagram for a feature in map units. Returns an invalid QSizeF in case of error virtual QSizeF sizeMapUnits( const QgsFeature &feature, const QgsRenderContext &c ) const; @@ -487,7 +488,7 @@ class CORE_EXPORT QgsDiagramRenderer */ void renderDiagram( const QgsFeature &feature, QgsRenderContext &c, QPointF pos, const QgsPropertyCollection &properties = QgsPropertyCollection() ) const; - void setDiagram( QgsDiagram *d ); + void setDiagram( QgsDiagram *d SIP_TRANSFER ); QgsDiagram *diagram() const { return mDiagram; } //! Returns list with all diagram settings in the renderer @@ -511,7 +512,7 @@ class CORE_EXPORT QgsDiagramRenderer * \note caller is responsible for deletion of QgsLayerTreeModelLegendNodes * \since QGIS 2.10 */ - virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const; + virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const SIP_FACTORY; /** Returns true if renderer will show legend items for diagram attributes. * \since QGIS 2.16 diff --git a/src/core/qgseditformconfig.h b/src/core/qgseditformconfig.h index 8414d353551..7ce3156542d 100644 --- a/src/core/qgseditformconfig.h +++ b/src/core/qgseditformconfig.h @@ -19,6 +19,7 @@ #define QGSEDITFORMCONFIG_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -105,7 +106,7 @@ class CORE_EXPORT QgsEditFormConfig * * This is only useful in combination with EditorLayout::TabLayout. */ - void addTab( QgsAttributeEditorElement *data ); + void addTab( QgsAttributeEditorElement *data SIP_TRANSFER ); /** * Returns a list of tabs for EditorLayout::TabLayout obtained from the invisible root container. diff --git a/src/core/qgsexpressioncontext.h b/src/core/qgsexpressioncontext.h index 8c5920610d3..0f310b1b6e1 100644 --- a/src/core/qgsexpressioncontext.h +++ b/src/core/qgsexpressioncontext.h @@ -16,6 +16,7 @@ #define QGSEXPRESSIONCONTEXT_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -87,7 +88,7 @@ class CORE_EXPORT QgsScopedExpressionFunction : public QgsExpression::Function /** Returns a clone of the function. */ - virtual QgsScopedExpressionFunction *clone() const = 0; + virtual QgsScopedExpressionFunction *clone() const = 0 SIP_FACTORY; virtual bool usesGeometry( const QgsExpression::NodeFunction *node ) const override; @@ -249,7 +250,7 @@ class CORE_EXPORT QgsExpressionContextScope * \param function function to insert. Ownership is transferred to the scope. * \see addVariable() */ - void addFunction( const QString &name, QgsScopedExpressionFunction *function ); + void addFunction( const QString &name, QgsScopedExpressionFunction *function SIP_TRANSFER ); /** * Returns true if the scope has a feature associated with it. @@ -473,7 +474,7 @@ class CORE_EXPORT QgsExpressionContext * context. Ownership of the scope is transferred to the stack. * \param scope expression context to append to context */ - void appendScope( QgsExpressionContextScope *scope ); + void appendScope( QgsExpressionContextScope *scope SIP_TRANSFER ); /** Appends a list of scopes to the end of the context. This scopes will override * any matching variables or functions provided by existing scopes within the @@ -492,7 +493,7 @@ class CORE_EXPORT QgsExpressionContext * any matching variables or functions provided by existing scopes within the * context. Ownership of the scope is transferred to the stack. */ - QgsExpressionContext &operator<< ( QgsExpressionContextScope *scope ); + QgsExpressionContext &operator<< ( QgsExpressionContextScope *scope SIP_TRANSFER ); /** Convenience function for setting a feature for the context. The feature * will be set within the last scope of the context, so will override any @@ -620,7 +621,7 @@ class CORE_EXPORT QgsExpressionContextUtils * For instance, QGIS version numbers and variables specified through QGIS options. * \see setGlobalVariable() */ - static QgsExpressionContextScope *globalScope(); + static QgsExpressionContextScope *globalScope() SIP_FACTORY; /** Sets a global context variable. This variable will be contained within scopes retrieved via * globalScope(). @@ -644,7 +645,7 @@ class CORE_EXPORT QgsExpressionContextUtils * \param project What project to use * \see setProjectVariable() */ - static QgsExpressionContextScope *projectScope( const QgsProject *project ); + static QgsExpressionContextScope *projectScope( const QgsProject *project ) SIP_FACTORY; /** Sets a project context variable. This variable will be contained within scopes retrieved via * projectScope(). @@ -668,7 +669,7 @@ class CORE_EXPORT QgsExpressionContextUtils /** Creates a new scope which contains variables and functions relating to a QgsMapLayer. * For instance, layer name, id and fields. */ - static QgsExpressionContextScope *layerScope( const QgsMapLayer *layer ); + static QgsExpressionContextScope *layerScope( const QgsMapLayer *layer ) SIP_FACTORY; /** Creates a list of three scopes: global, layer's project and layer. * \since QGIS 3.0 @@ -697,7 +698,7 @@ class CORE_EXPORT QgsExpressionContextUtils /** Creates a new scope which contains variables and functions relating to a QgsMapSettings object. * For instance, map scale and rotation. */ - static QgsExpressionContextScope *mapSettingsScope( const QgsMapSettings &mapSettings ); + static QgsExpressionContextScope *mapSettingsScope( const QgsMapSettings &mapSettings ) SIP_FACTORY; /** * Updates a symbol scope related to a QgsSymbol to an expression context. @@ -711,7 +712,7 @@ class CORE_EXPORT QgsExpressionContextUtils * For instance, number of pages and page sizes. * \param composition source composition */ - static QgsExpressionContextScope *compositionScope( const QgsComposition *composition ); + static QgsExpressionContextScope *compositionScope( const QgsComposition *composition ) SIP_FACTORY; /** Sets a composition context variable. This variable will be contained within scopes retrieved via * compositionScope(). @@ -736,13 +737,13 @@ class CORE_EXPORT QgsExpressionContextUtils * For instance, current page name and number. * \param atlas source atlas. If null, a set of default atlas variables will be added to the scope. */ - static QgsExpressionContextScope *atlasScope( const QgsAtlasComposition *atlas ); + static QgsExpressionContextScope *atlasScope( const QgsAtlasComposition *atlas ) SIP_FACTORY; /** Creates a new scope which contains variables and functions relating to a QgsComposerItem. * For instance, item size and position. * \param composerItem source composer item */ - static QgsExpressionContextScope *composerItemScope( const QgsComposerItem *composerItem ); + static QgsExpressionContextScope *composerItemScope( const QgsComposerItem *composerItem ) SIP_FACTORY; /** Sets a composer item context variable. This variable will be contained within scopes retrieved via * composerItemScope(). diff --git a/src/core/qgsfeaturefilterprovider.h b/src/core/qgsfeaturefilterprovider.h index 23c98977b5c..00e45806fa4 100644 --- a/src/core/qgsfeaturefilterprovider.h +++ b/src/core/qgsfeaturefilterprovider.h @@ -19,6 +19,7 @@ #define QGSFEATUREFILTERPROVIDER_H #include +#include "qgis.h" #include "qgis_core.h" @@ -54,7 +55,7 @@ class CORE_EXPORT QgsFeatureFilterProvider /** Create a clone of the feature filter provider * \returns a new clone */ - virtual QgsFeatureFilterProvider *clone() const = 0; + virtual QgsFeatureFilterProvider *clone() const = 0 SIP_FACTORY; }; #endif diff --git a/src/core/qgsgeometryvalidator.h b/src/core/qgsgeometryvalidator.h index 29d96851311..b0e1d1219e1 100644 --- a/src/core/qgsgeometryvalidator.h +++ b/src/core/qgsgeometryvalidator.h @@ -17,6 +17,7 @@ email : jef at norbit dot de #define QGSGEOMETRYVALIDATOR_H #include "qgis_core.h" +#include "qgis.h" #include #include "qgsgeometry.h" @@ -36,7 +37,7 @@ class CORE_EXPORT QgsGeometryValidator : public QThread void stop(); //! Validate geometry and produce a list of geometry errors - static void validateGeometry( const QgsGeometry *g, QList &errors ); + static void validateGeometry( const QgsGeometry *g, QList &errors SIP_OUT ); signals: void errorFound( const QgsGeometry::Error & ); diff --git a/src/core/qgsgml.h b/src/core/qgsgml.h index 73d44ae3dea..f6e67a6c1d3 100644 --- a/src/core/qgsgml.h +++ b/src/core/qgsgml.h @@ -356,7 +356,7 @@ class CORE_EXPORT QgsGml : public QObject QgsRectangle *extent = nullptr, const QString &userName = QString(), const QString &password = QString(), - const QString &authcfg = QString() ); + const QString &authcfg = QString() ) SIP_PYNAME( getFeaturesUri ); /** Read from GML data. Constructor uri param is ignored * Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. diff --git a/src/core/qgslayerdefinition.h b/src/core/qgslayerdefinition.h index dc6fed2a7bb..67ffd38243b 100644 --- a/src/core/qgslayerdefinition.h +++ b/src/core/qgslayerdefinition.h @@ -17,6 +17,7 @@ #include "qgis_core.h" +#include "qgis.h" #include #include @@ -41,7 +42,7 @@ class CORE_EXPORT QgsLayerDefinition { public: //! Loads the QLR at path into QGIS. New layers are added to given project into layer tree specified by rootGroup - static bool loadLayerDefinition( const QString &path, QgsProject *project, QgsLayerTreeGroup *rootGroup, QString &errorMessage ); + static bool loadLayerDefinition( const QString &path, QgsProject *project, QgsLayerTreeGroup *rootGroup, QString &errorMessage SIP_OUT ); //! Loads the QLR from the XML document. New layers are added to given project into layer tree specified by rootGroup static bool loadLayerDefinition( QDomDocument doc, QgsProject *project, QgsLayerTreeGroup *rootGroup, QString &errorMessage, const QgsPathResolver &pathResolver ); //! Export the selected layer tree nodes to a QLR file diff --git a/src/core/qgsmaplayerlegend.h b/src/core/qgsmaplayerlegend.h index 1263f070aa6..be3a80c5bfc 100644 --- a/src/core/qgsmaplayerlegend.h +++ b/src/core/qgsmaplayerlegend.h @@ -17,6 +17,7 @@ #define QGSMAPLAYERLEGEND_H #include +#include "qgis.h" class QgsLayerTreeLayer; class QgsLayerTreeModelLegendNode; @@ -37,7 +38,7 @@ class CORE_EXPORT QgsMapLayerLegend : public QObject { Q_OBJECT public: - explicit QgsMapLayerLegend( QObject *parent = nullptr ); + explicit QgsMapLayerLegend( QObject *parent SIP_TRANSFERTHIS = 0 ); // TODO: type, load/save settings @@ -50,13 +51,13 @@ class CORE_EXPORT QgsMapLayerLegend : public QObject // TODO: support for layer tree view delegates //! Create new legend implementation for vector layer - static QgsMapLayerLegend *defaultVectorLegend( QgsVectorLayer *vl ); + static QgsMapLayerLegend *defaultVectorLegend( QgsVectorLayer *vl ) SIP_FACTORY; //! Create new legend implementation for raster layer - static QgsMapLayerLegend *defaultRasterLegend( QgsRasterLayer *rl ); + static QgsMapLayerLegend *defaultRasterLegend( QgsRasterLayer *rl ) SIP_FACTORY; //! Create new legend implementation for raster layer - static QgsMapLayerLegend *defaultPluginLegend( QgsPluginLayer *pl ); + static QgsMapLayerLegend *defaultPluginLegend( QgsPluginLayer *pl ) SIP_FACTORY; signals: //! Emitted when existing items/nodes got invalid and should be replaced by new ones diff --git a/src/core/qgsmaprendererjob.h b/src/core/qgsmaprendererjob.h index fa3db0f1e0b..925fbcf5a74 100644 --- a/src/core/qgsmaprendererjob.h +++ b/src/core/qgsmaprendererjob.h @@ -17,6 +17,7 @@ #define QGSMAPRENDERERJOB_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -149,7 +150,7 @@ class CORE_EXPORT QgsMapRendererJob : public QObject * This should not be used if cached labeling was redrawn - see usedCachedLabels(). * \see usedCachedLabels() */ - virtual QgsLabelingResults *takeLabelingResults() = 0; + virtual QgsLabelingResults *takeLabelingResults() = 0 SIP_TRANSFER; //! \since QGIS 3.0 //! Set the feature filter provider used by the QgsRenderContext of diff --git a/src/core/qgsnetworkaccessmanager.h b/src/core/qgsnetworkaccessmanager.h index b34b4025e23..ef1b13f22f1 100644 --- a/src/core/qgsnetworkaccessmanager.h +++ b/src/core/qgsnetworkaccessmanager.h @@ -19,6 +19,7 @@ #define QGSNETWORKACCESSMANAGER_H #include +#include "qgis.h" #include #include #include @@ -55,10 +56,10 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager QgsNetworkAccessManager( QObject *parent = nullptr ); //! insert a factory into the proxy factories list - void insertProxyFactory( QNetworkProxyFactory *factory ); + void insertProxyFactory( QNetworkProxyFactory *factory SIP_TRANSFER ); //! remove a factory from the proxy factories list - void removeProxyFactory( QNetworkProxyFactory *factory ); + void removeProxyFactory( QNetworkProxyFactory *factory SIP_TRANSFERBACK ); //! retrieve proxy factory list const QList proxyFactories() const; diff --git a/src/core/qgsogcutils.h b/src/core/qgsogcutils.h index f9f0758eeef..5798ae3a221 100644 --- a/src/core/qgsogcutils.h +++ b/src/core/qgsogcutils.h @@ -22,6 +22,7 @@ class QDomDocument; class QString; #include "qgis_core.h" +#include "qgis.h" #include #include @@ -126,7 +127,7 @@ class CORE_EXPORT QgsOgcUtils static QColor colorFromOgcFill( const QDomElement &fillElement ); //! Parse XML with OGC filter into QGIS expression - static QgsExpression *expressionFromOgcFilter( const QDomElement &element ); + static QgsExpression *expressionFromOgcFilter( const QDomElement &element ) SIP_FACTORY; /** Creates OGC filter XML element. Supports minimum standard filter * according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT) diff --git a/src/core/qgspallabeling.h b/src/core/qgspallabeling.h index f94e8bf8492..7cfc980ccb6 100644 --- a/src/core/qgspallabeling.h +++ b/src/core/qgspallabeling.h @@ -22,6 +22,7 @@ #define QGSPALLABELING_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -721,7 +722,7 @@ class CORE_EXPORT QgsPalLabeling * \returns prepared geometry * \since QGIS 2.9 */ - static QgsGeometry prepareGeometry( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, QgsGeometry *clipGeometry = nullptr ); + static QgsGeometry prepareGeometry( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, QgsGeometry *clipGeometry = nullptr ) SIP_FACTORY; /** Checks whether a geometry requires preparation before registration with PAL * \param geometry geometry to prepare diff --git a/src/core/qgspluginlayerregistry.h b/src/core/qgspluginlayerregistry.h index 9426b6db3a9..ff5b2b37ded 100644 --- a/src/core/qgspluginlayerregistry.h +++ b/src/core/qgspluginlayerregistry.h @@ -20,6 +20,7 @@ #define QGSPLUGINLAYERREGSITRY_H #include +#include "qgis.h" #include #include "qgis_core.h" @@ -39,12 +40,12 @@ class CORE_EXPORT QgsPluginLayerType QString name(); //! Return new layer of this type. Return NULL on error - virtual QgsPluginLayer *createLayer(); + virtual QgsPluginLayer *createLayer() SIP_FACTORY; /** Return new layer of this type, using layer URI (specific to this plugin layer type). Return NULL on error. * \since QGIS 2.10 */ - virtual QgsPluginLayer *createLayer( const QString &uri ); + virtual QgsPluginLayer *createLayer( const QString &uri ) SIP_FACTORY; //! Show plugin layer properties dialog. Return false if the dialog cannot be shown. virtual bool showLayerProperties( QgsPluginLayer *layer ); @@ -78,7 +79,7 @@ class CORE_EXPORT QgsPluginLayerRegistry QStringList pluginLayerTypes(); //! Add plugin layer type (take ownership) and return true on success - bool addPluginLayerType( QgsPluginLayerType *pluginLayerType ); + bool addPluginLayerType( QgsPluginLayerType *pluginLayerType SIP_TRANSFER ); //! Remove plugin layer type and return true on success bool removePluginLayerType( const QString &typeName ); @@ -89,7 +90,7 @@ class CORE_EXPORT QgsPluginLayerRegistry /** Returns new layer if corresponding plugin has been found else returns a nullptr. * \note parameter uri has been added in QGIS 2.10 */ - QgsPluginLayer *createLayer( const QString &typeName, const QString &uri = QString() ); + QgsPluginLayer *createLayer( const QString &typeName, const QString &uri = QString() ) SIP_FACTORY; private: diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index e163a3070af..2a41ff401eb 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -22,6 +22,7 @@ #define QGSPROJECT_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -94,7 +95,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * * Most of the time you want to use QgsProject::instance() instead as many components of QGIS work with the singleton. */ - explicit QgsProject( QObject *parent = nullptr ); + explicit QgsProject( QObject *parent SIP_TRANSFERTHIS = 0 ); ~QgsProject(); @@ -219,7 +220,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * \note The key string must be valid xml tag names in order to be saved to the file. * \note available in Python bindings as writeEntryBool */ - bool writeEntry( const QString &scope, const QString &key, bool value ); + bool writeEntry( const QString &scope, const QString &key, bool value ) SIP_PYNAME( writeEntryBool ); /** * Write a double entry to the project file. @@ -230,7 +231,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * \note The key string must be valid xml tag names in order to be saved to the file. * \note available in Python bindings as writeEntryDouble */ - bool writeEntry( const QString &scope, const QString &key, double value ); + bool writeEntry( const QString &scope, const QString &key, double value ) SIP_PYNAME( writeEntryDouble ); /** * Write an integer entry to the project file. @@ -321,7 +322,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera /** Change handler for missing layers. * Deletes old handler and takes ownership of the new one. */ - void setBadLayerHandler( QgsProjectBadLayerHandler *handler ); + void setBadLayerHandler( QgsProjectBadLayerHandler *handler SIP_TRANSFER ); //! Returns project file path if layer is embedded from other project file. Returns empty string if layer is not embedded QString layerIsEmbedded( const QString &id ) const; @@ -706,7 +707,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * \see removeMapLayer() * \since QGIS 3.0 */ - QgsMapLayer *takeMapLayer( QgsMapLayer *layer ); + QgsMapLayer *takeMapLayer( QgsMapLayer *layer ) SIP_TRANSFERBACK; /** * Removes all registered layers. If the registry has ownership diff --git a/src/core/qgsproperty.h b/src/core/qgsproperty.h index c357a8139f1..d79ee13658f 100644 --- a/src/core/qgsproperty.h +++ b/src/core/qgsproperty.h @@ -16,6 +16,7 @@ #define QGSPROPERTY_H #include "qgis_core.h" +#include "qgis.h" #include "qgsproperty_p.h" #include "qgsexpression.h" #include "qgsexpressioncontext.h" @@ -323,7 +324,7 @@ class CORE_EXPORT QgsProperty * \see valueAsInt() * \see valueAsBool() */ - QVariant value( const QgsExpressionContext &context, const QVariant &defaultValue = QVariant(), bool *ok = nullptr ) const; + QVariant value( const QgsExpressionContext &context, const QVariant &defaultValue = QVariant(), bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property and interprets it as a string. @@ -337,7 +338,7 @@ class CORE_EXPORT QgsProperty * \see valueAsInt() * \see valueAsBool() */ - QString valueAsString( const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok = nullptr ) const; + QString valueAsString( const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property and interprets it as a color. @@ -351,7 +352,7 @@ class CORE_EXPORT QgsProperty * \see valueAsInt() * \see valueAsBool() */ - QColor valueAsColor( const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok = nullptr ) const; + QColor valueAsColor( const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property and interprets it as a double. @@ -365,7 +366,7 @@ class CORE_EXPORT QgsProperty * \see valueAsInt() * \see valueAsBool() */ - double valueAsDouble( const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok = nullptr ) const; + double valueAsDouble( const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property and interprets it as an integer. @@ -379,7 +380,7 @@ class CORE_EXPORT QgsProperty * \see valueAsDouble() * \see valueAsBool() */ - int valueAsInt( const QgsExpressionContext &context, int defaultValue = 0, bool *ok = nullptr ) const; + int valueAsInt( const QgsExpressionContext &context, int defaultValue = 0, bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property and interprets it as an boolean. @@ -393,7 +394,7 @@ class CORE_EXPORT QgsProperty * \see valueAsDouble() * \see valueAsInt() */ - bool valueAsBool( const QgsExpressionContext &context, bool defaultValue = false, bool *ok = nullptr ) const; + bool valueAsBool( const QgsExpressionContext &context, bool defaultValue = false, bool *ok SIP_OUT = 0 ) const; /** * Saves this property to a QVariantMap, wrapped in a QVariant. @@ -417,7 +418,7 @@ class CORE_EXPORT QgsProperty * existing transformer will be deleted. Set to null to remove an existing transformer. * \see transformer() */ - void setTransformer( QgsPropertyTransformer *transformer ); + void setTransformer( QgsPropertyTransformer *transformer SIP_TRANSFER ); /** * Returns the existing transformer used for manipulating the calculated values for the property, if set. diff --git a/src/core/qgspropertycollection.h b/src/core/qgspropertycollection.h index 7444a6a25fb..d0358af898d 100644 --- a/src/core/qgspropertycollection.h +++ b/src/core/qgspropertycollection.h @@ -16,6 +16,7 @@ #define QGSPROPERTYCOLLECTION_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -116,7 +117,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection * \see valueAsInt() * \see valueAsBool() */ - QString valueAsString( int key, const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok = nullptr ) const; + QString valueAsString( int key, const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property with the specified key and interprets it as a color. @@ -132,7 +133,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection * \see valueAsInt() * \see valueAsBool() */ - QColor valueAsColor( int key, const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok = nullptr ) const; + QColor valueAsColor( int key, const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property with the specified key and interprets it as a double. @@ -148,7 +149,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection * \see valueAsInt() * \see valueAsBool() */ - double valueAsDouble( int key, const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok = nullptr ) const; + double valueAsDouble( int key, const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property with the specified key and interprets it as an integer. @@ -164,7 +165,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection * \see valueAsDouble() * \see valueAsBool() */ - int valueAsInt( int key, const QgsExpressionContext &context, int defaultValue = 0, bool *ok = nullptr ) const; + int valueAsInt( int key, const QgsExpressionContext &context, int defaultValue = 0, bool *ok SIP_OUT = 0 ) const; /** * Calculates the current value of the property with the specified key and interprets it as an boolean. @@ -180,7 +181,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection * \see valueAsDouble() * \see valueAsInt() */ - bool valueAsBool( int key, const QgsExpressionContext &context, bool defaultValue = false, bool *ok = nullptr ) const; + bool valueAsBool( int key, const QgsExpressionContext &context, bool defaultValue = false, bool *ok SIP_OUT = 0 ) const; /** * Prepares the collection against a specified expression context. Calling prepare before evaluating the @@ -379,7 +380,7 @@ class CORE_EXPORT QgsPropertyCollectionStack : public QgsAbstractPropertyCollect * from the newly added collection will take priority over any existing properties with the same name. * \param collection collection to append. Ownership is transferred to the stack. */ - void appendCollection( QgsPropertyCollection *collection ); + void appendCollection( QgsPropertyCollection *collection SIP_TRANSFER ); /** * Returns the collection at the corresponding index from the stack. diff --git a/src/core/qgspythonrunner.h b/src/core/qgspythonrunner.h index 9bdc8837957..5d7658cc65d 100644 --- a/src/core/qgspythonrunner.h +++ b/src/core/qgspythonrunner.h @@ -16,6 +16,7 @@ #define QGSPYTHONRUNNER_H #include +#include "qgis.h" #include "qgis_core.h" @@ -40,12 +41,12 @@ class CORE_EXPORT QgsPythonRunner static bool run( const QString &command, const QString &messageOnError = QString() ); //! Eval a Python statement - static bool eval( const QString &command, QString &result ); + static bool eval( const QString &command, QString &result SIP_OUT ); /** Assign an instance of Python runner so that run() can be used. This method should be called during app initialization. Takes ownership of the object, deletes previous instance. */ - static void setInstance( QgsPythonRunner *runner ); + static void setInstance( QgsPythonRunner *runner SIP_TRANSFER ); protected: //! Protected constructor: can be instantiated only from children diff --git a/src/core/qgssnappingutils.h b/src/core/qgssnappingutils.h index f59ff31cf2d..88f45e95b7d 100644 --- a/src/core/qgssnappingutils.h +++ b/src/core/qgssnappingutils.h @@ -18,6 +18,7 @@ #include "qgis_core.h" +#include "qgis.h" #include "qgsmapsettings.h" #include "qgstolerance.h" #include "qgspointlocator.h" @@ -49,7 +50,7 @@ class CORE_EXPORT QgsSnappingUtils : public QObject Q_PROPERTY( QgsSnappingConfig config READ config WRITE setConfig NOTIFY configChanged ) public: - QgsSnappingUtils( QObject *parent = nullptr ); + QgsSnappingUtils( QObject *parent SIP_TRANSFERTHIS = 0 ); ~QgsSnappingUtils(); // main actions diff --git a/src/core/qgssqlstatement.h b/src/core/qgssqlstatement.h index c5c6ee36d50..299a0882099 100644 --- a/src/core/qgssqlstatement.h +++ b/src/core/qgssqlstatement.h @@ -18,6 +18,7 @@ #define QGSSQLSTATEMENT_H #include +#include "qgis.h" #include #include #include @@ -60,7 +61,7 @@ class CORE_EXPORT QgsSQLStatement /** Performs basic validity checks. Basically checking that columns referencing * a table, references a specified table. Returns true if the validation is * successful */ - bool doBasicValidationChecks( QString &errorMsgOut ) const; + bool doBasicValidationChecks( QString &errorMsgOut SIP_OUT ) const; class Node; diff --git a/src/core/qgstaskmanager.h b/src/core/qgstaskmanager.h index 1c71d5a05e4..201f91d8e80 100644 --- a/src/core/qgstaskmanager.h +++ b/src/core/qgstaskmanager.h @@ -19,6 +19,7 @@ #define QGSTASKMANAGER_H #include +#include "qgis.h" #include #include #include @@ -345,7 +346,7 @@ class CORE_EXPORT QgsTaskManager : public QObject /** Constructor for QgsTaskManager. * \param parent parent QObject */ - QgsTaskManager( QObject *parent = nullptr ); + QgsTaskManager( QObject *parent SIP_TRANSFERTHIS = 0 ); virtual ~QgsTaskManager(); @@ -383,7 +384,7 @@ class CORE_EXPORT QgsTaskManager : public QObject * taking precedence over lower priority numbers. * \returns unique task ID */ - long addTask( QgsTask *task, int priority = 0 ); + long addTask( QgsTask *task SIP_TRANSFER, int priority = 0 ); /** * Adds a task to the manager, using a full task definition (including dependency @@ -393,7 +394,7 @@ class CORE_EXPORT QgsTaskManager : public QObject * taking precedence over lower priority numbers. * \returns unique task ID */ - long addTask( const TaskDefinition &task, int priority = 0 ); + long addTask( const TaskDefinition &task SIP_TRANSFER, int priority = 0 ); /** Returns the task with matching ID. * \param id task ID diff --git a/src/core/qgstransaction.h b/src/core/qgstransaction.h index df5f172795c..556f217a591 100644 --- a/src/core/qgstransaction.h +++ b/src/core/qgstransaction.h @@ -19,6 +19,7 @@ #define QGSTRANSACTION_H #include +#include "qgis.h" #include #include @@ -60,11 +61,11 @@ class CORE_EXPORT QgsTransaction : public QObject const QgsTransaction &operator=( const QgsTransaction &other ) = delete; //! Creates a transaction for the specified connection string and provider - static QgsTransaction *create( const QString &connString, const QString &providerKey ); + static QgsTransaction *create( const QString &connString, const QString &providerKey ) SIP_FACTORY; /** Creates a transaction which includes the specified layers. Connection string * and data provider are taken from the first layer */ - static QgsTransaction *create( const QStringList &layerIds ); + static QgsTransaction *create( const QStringList &layerIds ) SIP_FACTORY; virtual ~QgsTransaction(); @@ -82,16 +83,16 @@ class CORE_EXPORT QgsTransaction : public QObject * statements block until the conflicting transaction is committed or * rolled back. * Some providers might not honour the statement timeout. */ - bool begin( QString &errorMsg, int statementTimeout = 20 ); + bool begin( QString &errorMsg SIP_OUT, int statementTimeout = 20 ); //! Commit transaction. - bool commit( QString &errorMsg ); + bool commit( QString &errorMsg SIP_OUT ); //! Roll back transaction. - bool rollback( QString &errorMsg ); + bool rollback( QString &errorMsg SIP_OUT ); //! Executes sql - virtual bool executeSql( const QString &sql, QString &error ) = 0; + virtual bool executeSql( const QString &sql, QString &error SIP_OUT ) = 0; /** * Checks if a the provider of a give layer supports transactions. diff --git a/src/core/qgsunittypes.h b/src/core/qgsunittypes.h index 2b95041116c..dce9514eef0 100644 --- a/src/core/qgsunittypes.h +++ b/src/core/qgsunittypes.h @@ -163,7 +163,7 @@ class CORE_EXPORT QgsUnitTypes * \returns decoded units * \see encodeUnit() */ - Q_INVOKABLE static QgsUnitTypes::DistanceUnit decodeDistanceUnit( const QString &string, bool *ok = 0 ); + Q_INVOKABLE static QgsUnitTypes::DistanceUnit decodeDistanceUnit( const QString &string, bool *ok SIP_OUT = 0 ); /** Returns a translated string representing a distance unit. * \param unit unit to convert to string @@ -184,7 +184,7 @@ class CORE_EXPORT QgsUnitTypes * \param ok optional boolean, will be set to true if string was converted successfully * \see toString() */ - Q_INVOKABLE static QgsUnitTypes::DistanceUnit stringToDistanceUnit( const QString &string, bool *ok = 0 ); + Q_INVOKABLE static QgsUnitTypes::DistanceUnit stringToDistanceUnit( const QString &string, bool *ok SIP_OUT = 0 ); /** Returns the conversion factor between the specified distance units. * \param fromUnit distance unit to convert from @@ -212,7 +212,7 @@ class CORE_EXPORT QgsUnitTypes * \returns decoded units * \see encodeUnit() */ - Q_INVOKABLE static AreaUnit decodeAreaUnit( const QString &string, bool *ok = 0 ); + Q_INVOKABLE static AreaUnit decodeAreaUnit( const QString &string, bool *ok SIP_OUT = 0 ); /** Returns a translated string representing an areal unit. * \param unit unit to convert to string @@ -233,7 +233,7 @@ class CORE_EXPORT QgsUnitTypes * \param ok optional boolean, will be set to true if string was converted successfully * \see toString() */ - Q_INVOKABLE static AreaUnit stringToAreaUnit( const QString &string, bool *ok = 0 ); + Q_INVOKABLE static AreaUnit stringToAreaUnit( const QString &string, bool *ok SIP_OUT = 0 ); /** Returns the conversion factor between the specified areal units. * \param fromUnit area unit to convert from @@ -263,7 +263,7 @@ class CORE_EXPORT QgsUnitTypes * \returns decoded units * \see encodeUnit() */ - Q_INVOKABLE static AngleUnit decodeAngleUnit( const QString &string, bool *ok = 0 ); + Q_INVOKABLE static AngleUnit decodeAngleUnit( const QString &string, bool *ok SIP_OUT = 0 ); /** Returns a translated string representing an angular unit. * \param unit unit to convert to string @@ -347,7 +347,7 @@ class CORE_EXPORT QgsUnitTypes * \returns decoded units * \see encodeUnit() */ - Q_INVOKABLE static RenderUnit decodeRenderUnit( const QString &string, bool *ok = 0 ); + Q_INVOKABLE static RenderUnit decodeRenderUnit( const QString &string, bool *ok SIP_OUT = 0 ); }; diff --git a/src/core/qgsvectordataprovider.h b/src/core/qgsvectordataprovider.h index d4043684a7d..2e006b75e11 100644 --- a/src/core/qgsvectordataprovider.h +++ b/src/core/qgsvectordataprovider.h @@ -146,7 +146,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider, public QgsFeat * \since QGIS 2.4 * \returns new instance of QgsAbstractFeatureSource (caller is responsible for deleting it) */ - virtual QgsAbstractFeatureSource *featureSource() const = 0; + virtual QgsAbstractFeatureSource *featureSource() const = 0 SIP_FACTORY; /** * Returns the permanent storage type for this layer as a friendly name. @@ -210,7 +210,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider, public QgsFeat * * Default implementation simply iterates the features */ - virtual void uniqueValues( int index, QList &uniqueValues, int limit = -1 ) const; + virtual void uniqueValues( int index, QList &uniqueValues SIP_OUT, int limit = -1 ) const; /** * Returns unique string values of an attribute which contain a specified subset string. Subset @@ -576,7 +576,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider, public QgsFeat * Converts the geometry to the provider type if possible / necessary * \returns the converted geometry or nullptr if no conversion was necessary or possible */ - QgsGeometry *convertToProviderType( const QgsGeometry &geom ) const; + QgsGeometry *convertToProviderType( const QgsGeometry &geom ) const SIP_FACTORY; /** * Set the list of native types supported by this provider. diff --git a/src/core/qgsvectorlayercache.h b/src/core/qgsvectorlayercache.h index 0eaf9512e9c..601c588f2f2 100644 --- a/src/core/qgsvectorlayercache.h +++ b/src/core/qgsvectorlayercache.h @@ -20,6 +20,7 @@ #define QgsVectorLayerCache_H #include "qgis_core.h" +#include "qgis.h" #include #include "qgsvectorlayer.h" @@ -163,7 +164,7 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject * * \param cacheIndex The cache index to add. */ - void addCacheIndex( QgsAbstractCacheIndex *cacheIndex ); + void addCacheIndex( QgsAbstractCacheIndex *cacheIndex SIP_TRANSFER ); /** * Query this VectorLayerCache for features. diff --git a/src/core/qgsvectorlayereditutils.h b/src/core/qgsvectorlayereditutils.h index 22785e263e4..c5906f56d83 100644 --- a/src/core/qgsvectorlayereditutils.h +++ b/src/core/qgsvectorlayereditutils.h @@ -17,6 +17,7 @@ #include "qgis_core.h" +#include "qgis.h" #include "qgsfeature.h" #include "qgsvectorlayer.h" @@ -59,7 +60,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils * to the given coordinates * \note available in Python bindings as moveVertexV2 */ - bool moveVertex( const QgsPointV2 &p, QgsFeatureId atFeatureId, int atVertex ); + bool moveVertex( const QgsPointV2 &p, QgsFeatureId atFeatureId, int atVertex ) SIP_PYNAME( moveVertexV2 ); /** Deletes a vertex from a feature. * \param featureId ID of feature to remove vertex from @@ -99,7 +100,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils * \note available in Python bindings as addCurvedRing */ // TODO QGIS 3.0 returns an enum instead of a magic constant - int addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = nullptr ); + int addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = nullptr ) SIP_PYNAME( addCurvedRing ); /** Adds a new part polygon to a multipart feature * \returns @@ -130,7 +131,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils //! \note available in Python bindings as addCurvedPart // TODO QGIS 3.0 returns an enum instead of a magic constant - int addPart( QgsCurve *ring, QgsFeatureId featureId ); + int addPart( QgsCurve *ring, QgsFeatureId featureId ) SIP_PYNAME( addCurvedPart ); /** Translates feature by dx, dy * \param featureId id of the feature to translate diff --git a/src/core/qgsvectorlayerimport.h b/src/core/qgsvectorlayerimport.h index 9f94fe63fc6..6b342731b65 100644 --- a/src/core/qgsvectorlayerimport.h +++ b/src/core/qgsvectorlayerimport.h @@ -20,6 +20,7 @@ #define QGSVECTORLAYERIMPORT_H #include "qgis_core.h" +#include "qgis.h" #include "qgsfeature.h" class QProgressDialog; @@ -73,7 +74,7 @@ class CORE_EXPORT QgsVectorLayerImport const QString &providerKey, const QgsCoordinateReferenceSystem &destCRS, bool onlySelected = false, - QString *errorMessage = nullptr, + QString *errorMessage SIP_OUT = 0, bool skipAttributeCreation = false, QMap *options = nullptr, QProgressDialog *progress = nullptr diff --git a/src/core/qgsvectorlayerjoinbuffer.h b/src/core/qgsvectorlayerjoinbuffer.h index 6fe54fde305..ce5f389c68e 100644 --- a/src/core/qgsvectorlayerjoinbuffer.h +++ b/src/core/qgsvectorlayerjoinbuffer.h @@ -19,6 +19,7 @@ #define QGSVECTORLAYERJOINBUFFER_H #include "qgis_core.h" +#include "qgis.h" #include "qgsvectorlayerjoininfo.h" #include @@ -73,7 +74,7 @@ class CORE_EXPORT QgsVectorLayerJoinBuffer : public QObject \param index this layers attribute index \param fields fields of the vector layer (including joined fields) \param sourceFieldIndex Output: field's index in source layer */ - const QgsVectorLayerJoinInfo *joinForFieldIndex( int index, const QgsFields &fields, int &sourceFieldIndex ) const; + const QgsVectorLayerJoinInfo *joinForFieldIndex( int index, const QgsFields &fields, int &sourceFieldIndex SIP_OUT ) const; //! Find out what is the first index of the join within fields. Returns -1 if join is not present //! \since QGIS 2.6 @@ -85,7 +86,7 @@ class CORE_EXPORT QgsVectorLayerJoinBuffer : public QObject //! Create a copy of the join buffer //! \since QGIS 2.6 - QgsVectorLayerJoinBuffer *clone() const; + QgsVectorLayerJoinBuffer *clone() const SIP_FACTORY; signals: //! Emitted whenever the list of joined fields changes (e.g. added join or joined layer's fields change) diff --git a/src/core/qgsvectorlayertools.h b/src/core/qgsvectorlayertools.h index 6dafd237e25..33ef6e1a7c7 100644 --- a/src/core/qgsvectorlayertools.h +++ b/src/core/qgsvectorlayertools.h @@ -17,6 +17,7 @@ #define QGSVECTORLAYERTOOLS_H #include "qgis_core.h" +#include "qgis.h" #include #include "qgsfeature.h" @@ -52,7 +53,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject * * TODO QGIS 3: remove const qualifier */ - virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature = nullptr ) const = 0; + virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature SIP_OUT = 0 ) const = 0; /** * This will be called, whenever a vector layer should be switched to edit mode. Check the providers diff --git a/src/core/qgsvectorlayerundocommand.h b/src/core/qgsvectorlayerundocommand.h index b9afc7d339b..fb4f1de20d6 100644 --- a/src/core/qgsvectorlayerundocommand.h +++ b/src/core/qgsvectorlayerundocommand.h @@ -17,6 +17,7 @@ #define QGSVECTORLAYERUNDOCOMMAND_H #include "qgis_core.h" +#include "qgis.h" #include #include @@ -75,7 +76,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandAddFeature : public QgsVectorLayerUnd * \param buffer associated edit buffer * \param f feature to add to layer */ - QgsVectorLayerUndoCommandAddFeature( QgsVectorLayerEditBuffer *buffer, QgsFeature &f ); + QgsVectorLayerUndoCommandAddFeature( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, QgsFeature &f ); virtual void undo() override; virtual void redo() override; @@ -98,7 +99,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandDeleteFeature : public QgsVectorLayer * \param buffer associated edit buffer * \param fid feature ID of feature to delete from layer */ - QgsVectorLayerUndoCommandDeleteFeature( QgsVectorLayerEditBuffer *buffer, QgsFeatureId fid ); + QgsVectorLayerUndoCommandDeleteFeature( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, QgsFeatureId fid ); virtual void undo() override; virtual void redo() override; @@ -122,7 +123,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandChangeGeometry : public QgsVectorLaye * \param fid feature ID of feature to modify geometry of * \param newGeom new geometry for feature */ - QgsVectorLayerUndoCommandChangeGeometry( QgsVectorLayerEditBuffer *buffer, QgsFeatureId fid, const QgsGeometry &newGeom ); + QgsVectorLayerUndoCommandChangeGeometry( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, QgsFeatureId fid, const QgsGeometry &newGeom ); virtual void undo() override; virtual void redo() override; @@ -152,7 +153,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandChangeAttribute : public QgsVectorLay * \param newValue new value of attribute * \param oldValue previous value of attribute */ - QgsVectorLayerUndoCommandChangeAttribute( QgsVectorLayerEditBuffer *buffer, QgsFeatureId fid, int fieldIndex, const QVariant &newValue, const QVariant &oldValue ); + QgsVectorLayerUndoCommandChangeAttribute( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, QgsFeatureId fid, int fieldIndex, const QVariant &newValue, const QVariant &oldValue ); virtual void undo() override; virtual void redo() override; @@ -177,7 +178,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandAddAttribute : public QgsVectorLayerU * \param buffer associated edit buffer * \param field definition of new field to add */ - QgsVectorLayerUndoCommandAddAttribute( QgsVectorLayerEditBuffer *buffer, const QgsField &field ); + QgsVectorLayerUndoCommandAddAttribute( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, const QgsField &field ); virtual void undo() override; virtual void redo() override; @@ -200,7 +201,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandDeleteAttribute : public QgsVectorLay * \param buffer associated edit buffer * \param fieldIndex index of field to delete */ - QgsVectorLayerUndoCommandDeleteAttribute( QgsVectorLayerEditBuffer *buffer, int fieldIndex ); + QgsVectorLayerUndoCommandDeleteAttribute( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, int fieldIndex ); virtual void undo() override; virtual void redo() override; @@ -233,7 +234,7 @@ class CORE_EXPORT QgsVectorLayerUndoCommandRenameAttribute : public QgsVectorLay * \param fieldIndex index of field to rename * \param newName new name for field */ - QgsVectorLayerUndoCommandRenameAttribute( QgsVectorLayerEditBuffer *buffer, int fieldIndex, const QString &newName ); + QgsVectorLayerUndoCommandRenameAttribute( QgsVectorLayerEditBuffer *buffer SIP_TRANSFER, int fieldIndex, const QString &newName ); virtual void undo() override; virtual void redo() override; diff --git a/src/core/raster/qgscolorrampshader.h b/src/core/raster/qgscolorrampshader.h index c011f77ecdf..f80f6711cd8 100644 --- a/src/core/raster/qgscolorrampshader.h +++ b/src/core/raster/qgscolorrampshader.h @@ -22,6 +22,7 @@ originally part of the larger QgsRasterLayer class #define QGSCOLORRAMPSHADER_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -115,13 +116,13 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction * \since QGIS 3.0 * \see setSourceColorRamp() */ - QgsColorRamp *sourceColorRamp() const; + QgsColorRamp *sourceColorRamp() const SIP_FACTORY; /** Set the source color ramp. Ownership is transferred to the renderer. * \since QGIS 3.0 * \see sourceColorRamp() */ - void setSourceColorRamp( QgsColorRamp *colorramp ); + void setSourceColorRamp( QgsColorRamp *colorramp SIP_TRANSFER ); //! \brief Set the color ramp type void setColorRampType( const QString &type ); @@ -139,7 +140,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction * \param extent extent used in classification (quantile mode only) * \param input raster input used in classification (quantile mode only) */ - void classifyColorRamp( const int band = -1, const QgsRectangle &extent = QgsRectangle(), QgsRasterInterface *input = nullptr ); + void classifyColorRamp( const int band = -1, const QgsRectangle &extent = QgsRectangle(), QgsRasterInterface *input = nullptr ) SIP_PYNAME( classifyColorRampV2 ); //! \brief Generates and new RGB value based on one input value bool shade( double, int *, int *, int *, int * ) override; diff --git a/src/core/raster/qgshillshaderenderer.h b/src/core/raster/qgshillshaderenderer.h index 58011e7a79b..6ef12a191b6 100644 --- a/src/core/raster/qgshillshaderenderer.h +++ b/src/core/raster/qgshillshaderenderer.h @@ -20,6 +20,7 @@ #include "qgis_core.h" +#include "qgis.h" #include "qgsrasterrenderer.h" class QgsRasterBlock; @@ -53,7 +54,7 @@ class CORE_EXPORT QgsHillshadeRenderer : public QgsRasterRenderer * \param input The raster input interface. * \returns A new QgsHillshadeRenderer. */ - static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ); + static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) SIP_FACTORY; void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override; diff --git a/src/core/raster/qgsmultibandcolorrenderer.h b/src/core/raster/qgsmultibandcolorrenderer.h index 5553d586a91..7dae7078c3c 100644 --- a/src/core/raster/qgsmultibandcolorrenderer.h +++ b/src/core/raster/qgsmultibandcolorrenderer.h @@ -19,6 +19,7 @@ #define QGSMULTIBANDCOLORRENDERER_H #include "qgis_core.h" +#include "qgis.h" #include "qgsrasterrenderer.h" class QgsContrastEnhancement; @@ -55,15 +56,15 @@ class CORE_EXPORT QgsMultiBandColorRenderer: public QgsRasterRenderer const QgsContrastEnhancement *redContrastEnhancement() const { return mRedContrastEnhancement; } //! Takes ownership - void setRedContrastEnhancement( QgsContrastEnhancement *ce ); + void setRedContrastEnhancement( QgsContrastEnhancement *ce SIP_TRANSFER ); const QgsContrastEnhancement *greenContrastEnhancement() const { return mGreenContrastEnhancement; } //! Takes ownership - void setGreenContrastEnhancement( QgsContrastEnhancement *ce ); + void setGreenContrastEnhancement( QgsContrastEnhancement *ce SIP_TRANSFER ); const QgsContrastEnhancement *blueContrastEnhancement() const { return mBlueContrastEnhancement; } //! Takes ownership - void setBlueContrastEnhancement( QgsContrastEnhancement *ce ); + void setBlueContrastEnhancement( QgsContrastEnhancement *ce SIP_TRANSFER ); void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override; diff --git a/src/core/raster/qgspalettedrasterrenderer.h b/src/core/raster/qgspalettedrasterrenderer.h index 3094a2bc189..1d273fae611 100644 --- a/src/core/raster/qgspalettedrasterrenderer.h +++ b/src/core/raster/qgspalettedrasterrenderer.h @@ -19,6 +19,7 @@ #define QGSPALETTEDRASTERRENDERER_H #include "qgis_core.h" +#include "qgis.h" #include #include "qgsrasterrenderer.h" @@ -67,7 +68,7 @@ class CORE_EXPORT QgsPalettedRasterRenderer: public QgsRasterRenderer const QgsPalettedRasterRenderer &operator=( const QgsPalettedRasterRenderer & ) = delete; QgsPalettedRasterRenderer *clone() const override; - static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ); + static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) SIP_FACTORY; QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override; @@ -98,7 +99,7 @@ class CORE_EXPORT QgsPalettedRasterRenderer: public QgsRasterRenderer * \since QGIS 3.0 * \see sourceColorRamp() */ - void setSourceColorRamp( QgsColorRamp *ramp ); + void setSourceColorRamp( QgsColorRamp *ramp SIP_TRANSFER ); /** Get the source color ramp * \since QGIS 3.0 diff --git a/src/core/raster/qgsrasterinterface.h b/src/core/raster/qgsrasterinterface.h index eb82edd9b2f..5d5d773f41d 100644 --- a/src/core/raster/qgsrasterinterface.h +++ b/src/core/raster/qgsrasterinterface.h @@ -19,6 +19,7 @@ #define QGSRASTERINTERFACE_H #include "qgis_core.h" +#include "qgis.h" #include #include // for tr() @@ -98,7 +99,7 @@ class CORE_EXPORT QgsRasterInterface virtual ~QgsRasterInterface() = default; //! Clone itself, create deep copy - virtual QgsRasterInterface *clone() const = 0; + virtual QgsRasterInterface *clone() const = 0 SIP_FACTORY; //! Returns a bitmask containing the supported capabilities virtual int capabilities() const @@ -152,7 +153,7 @@ class CORE_EXPORT QgsRasterInterface * \param height pixel height of block * \param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0. */ - virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) = 0; + virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) = 0 SIP_FACTORY; /** Set input. * Returns true if set correctly, false if cannot use that input */ diff --git a/src/core/raster/qgsrasterlayer.h b/src/core/raster/qgsrasterlayer.h index 4279fe60d10..97832f5e524 100644 --- a/src/core/raster/qgsrasterlayer.h +++ b/src/core/raster/qgsrasterlayer.h @@ -224,7 +224,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer LayerType rasterType() { return mRasterType; } //! Set raster renderer. Takes ownership of the renderer object - void setRenderer( QgsRasterRenderer *renderer ); + void setRenderer( QgsRasterRenderer *renderer SIP_TRANSFER ); QgsRasterRenderer *renderer() const { return mPipe.renderer(); } //! Set raster resample filter. Takes ownership of the resample filter object diff --git a/src/core/raster/qgsrasterminmaxorigin.h b/src/core/raster/qgsrasterminmaxorigin.h index 2b3ec77e145..15cf537b1fd 100644 --- a/src/core/raster/qgsrasterminmaxorigin.h +++ b/src/core/raster/qgsrasterminmaxorigin.h @@ -19,6 +19,7 @@ #define QGSRASTERMINMAXORIGIN_H #include +#include "qgis.h" #include #include "qgis_core.h" @@ -45,7 +46,7 @@ class CORE_EXPORT QgsRasterMinMaxOrigin enum Limits { //! User defined. - None, + None SIP_PYNAME( None_ ), //! Real min-max values MinMax, //! Range is [ mean - stdDevFactor() * stddev, mean + stdDevFactor() * stddev ] diff --git a/src/core/raster/qgsrasterpipe.h b/src/core/raster/qgsrasterpipe.h index de5ed78a912..c8c61a1dad0 100644 --- a/src/core/raster/qgsrasterpipe.h +++ b/src/core/raster/qgsrasterpipe.h @@ -19,6 +19,7 @@ #define QGSRASTERPIPE_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -66,11 +67,11 @@ class CORE_EXPORT QgsRasterPipe /** Try to insert interface at specified index and connect * if connection would fail, the interface is not inserted and false is returned */ - bool insert( int idx, QgsRasterInterface *interface ); + bool insert( int idx, QgsRasterInterface *interface SIP_TRANSFER ); /** Try to replace interface at specified index and connect * if connection would fail, the interface is not inserted and false is returned */ - bool replace( int idx, QgsRasterInterface *interface ); + bool replace( int idx, QgsRasterInterface *interface SIP_TRANSFER ); /** Insert a new known interface in default place or replace interface of the same * role if it already exists. Known interfaces are: QgsRasterDataProvider, @@ -78,7 +79,7 @@ class CORE_EXPORT QgsRasterPipe * subclasses. For unknown interfaces it mus be explicitly specified position * where it should be inserted using insert() method. */ - bool set( QgsRasterInterface *interface ); + bool set( QgsRasterInterface *interface SIP_TRANSFER ); //! Remove and delete interface at given index if possible bool remove( int idx ); diff --git a/src/core/raster/qgsrasterresamplefilter.h b/src/core/raster/qgsrasterresamplefilter.h index 3e437c4cbec..cd9b0c3664b 100644 --- a/src/core/raster/qgsrasterresamplefilter.h +++ b/src/core/raster/qgsrasterresamplefilter.h @@ -19,6 +19,7 @@ #define QGSRASTERRESAMPLEFILTER_H #include "qgis_core.h" +#include "qgis.h" #include "qgsrasterinterface.h" #include "qgsrasterresampler.h" @@ -43,11 +44,11 @@ class CORE_EXPORT QgsRasterResampleFilter : public QgsRasterInterface QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override; //! Set resampler for zoomed in scales. Takes ownership of the object - void setZoomedInResampler( QgsRasterResampler *r ); + void setZoomedInResampler( QgsRasterResampler *r SIP_TRANSFER ); const QgsRasterResampler *zoomedInResampler() const { return mZoomedInResampler.get(); } //! Set resampler for zoomed out scales. Takes ownership of the object - void setZoomedOutResampler( QgsRasterResampler *r ); + void setZoomedOutResampler( QgsRasterResampler *r SIP_TRANSFER ); const QgsRasterResampler *zoomedOutResampler() const { return mZoomedOutResampler.get(); } void setMaxOversampling( double os ) { mMaxOversampling = os; } diff --git a/src/core/raster/qgsrasterresampler.h b/src/core/raster/qgsrasterresampler.h index 851e2f00d70..e8805372d34 100644 --- a/src/core/raster/qgsrasterresampler.h +++ b/src/core/raster/qgsrasterresampler.h @@ -19,6 +19,7 @@ #define QGSRASTERRESAMPLER_H #include +#include "qgis.h" class QImage; @@ -42,7 +43,7 @@ class QgsRasterResampler * Needs to be reimplemented by subclasses. * Ownership is transferred to the caller. */ - virtual QgsRasterResampler *clone() const = 0; + virtual QgsRasterResampler *clone() const = 0 SIP_FACTORY; }; #endif // QGSRASTERRESAMPLER_H diff --git a/src/core/raster/qgssinglebandgrayrenderer.h b/src/core/raster/qgssinglebandgrayrenderer.h index 6484039dabd..f9c6897dbd3 100644 --- a/src/core/raster/qgssinglebandgrayrenderer.h +++ b/src/core/raster/qgssinglebandgrayrenderer.h @@ -19,6 +19,7 @@ #define QGSSINGLEBANDGRAYRENDERER_H #include "qgis_core.h" +#include "qgis.h" #include "qgsrasterrenderer.h" #include @@ -54,7 +55,7 @@ class CORE_EXPORT QgsSingleBandGrayRenderer: public QgsRasterRenderer void setGrayBand( int band ) { mGrayBand = band; } const QgsContrastEnhancement *contrastEnhancement() const { return mContrastEnhancement.get(); } //! Takes ownership - void setContrastEnhancement( QgsContrastEnhancement *ce ); + void setContrastEnhancement( QgsContrastEnhancement *ce SIP_TRANSFER ); void setGradient( Gradient gradient ) { mGradient = gradient; } Gradient gradient() const { return mGradient; } diff --git a/src/core/raster/qgssinglebandpseudocolorrenderer.h b/src/core/raster/qgssinglebandpseudocolorrenderer.h index 2220900ef46..6632da53c47 100644 --- a/src/core/raster/qgssinglebandpseudocolorrenderer.h +++ b/src/core/raster/qgssinglebandpseudocolorrenderer.h @@ -19,6 +19,7 @@ #define QGSSINGLEBANDPSEUDOCOLORRENDERER_H #include "qgis_core.h" +#include "qgis.h" #include "qgscolorramp.h" #include "qgscolorrampshader.h" #include "qgsrasterrenderer.h" @@ -50,7 +51,7 @@ class CORE_EXPORT QgsSingleBandPseudoColorRenderer: public QgsRasterRenderer QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override; //! Takes ownership of the shader - void setShader( QgsRasterShader *shader ); + void setShader( QgsRasterShader *shader SIP_TRANSFER ); //! Returns the raster shader QgsRasterShader *shader() { return mShader.get(); } diff --git a/src/core/symbology-ng/qgsarrowsymbollayer.h b/src/core/symbology-ng/qgsarrowsymbollayer.h index 306bf0e4e30..097f4f431a9 100644 --- a/src/core/symbology-ng/qgsarrowsymbollayer.h +++ b/src/core/symbology-ng/qgsarrowsymbollayer.h @@ -17,6 +17,7 @@ #define QGSARROWSYMBOLLAYERV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbollayer.h" @@ -39,7 +40,7 @@ class CORE_EXPORT QgsArrowSymbolLayer : public QgsLineSymbolLayer * * \returns A new QgsArrowSymbolLayer */ - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; virtual QgsArrowSymbolLayer *clone() const override; virtual QgsSymbol *subSymbol() override { return mSymbol.get(); } diff --git a/src/core/symbology-ng/qgscategorizedsymbolrenderer.h b/src/core/symbology-ng/qgscategorizedsymbolrenderer.h index 80a29fa46a9..62edd073576 100644 --- a/src/core/symbology-ng/qgscategorizedsymbolrenderer.h +++ b/src/core/symbology-ng/qgscategorizedsymbolrenderer.h @@ -16,6 +16,7 @@ #define QGSCATEGORIZEDSYMBOLRENDERERV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbol.h" #include "qgsrenderer.h" #include "qgsexpression.h" @@ -34,7 +35,7 @@ class CORE_EXPORT QgsRendererCategory QgsRendererCategory(); //! takes ownership of symbol - QgsRendererCategory( const QVariant &value, QgsSymbol *symbol, const QString &label, bool render = true ); + QgsRendererCategory( const QVariant &value, QgsSymbol *symbol SIP_TRANSFER, const QString &label, bool render = true ); //! copy constructor QgsRendererCategory( const QgsRendererCategory &cat ); @@ -46,7 +47,7 @@ class CORE_EXPORT QgsRendererCategory QString label() const; void setValue( const QVariant &value ); - void setSymbol( QgsSymbol *s ); + void setSymbol( QgsSymbol *s SIP_TRANSFER ); void setLabel( const QString &label ); // \since QGIS 2.5 @@ -107,7 +108,7 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer int categoryIndexForLabel( const QString &val ); bool updateCategoryValue( int catIndex, const QVariant &value ); - bool updateCategorySymbol( int catIndex, QgsSymbol *symbol ); + bool updateCategorySymbol( int catIndex, QgsSymbol *symbol SIP_TRANSFER ); bool updateCategoryLabel( int catIndex, const QString &label ); //! \since QGIS 2.5 @@ -127,7 +128,7 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer void setClassAttribute( const QString &attr ) { mAttrName = attr; } //! create renderer from XML element - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; virtual QDomElement save( QDomDocument &doc ) override; virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize ) override; @@ -148,7 +149,7 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer * \see sourceSymbol() * \see setSourceColorRamp() */ - void setSourceSymbol( QgsSymbol *sym ); + void setSourceSymbol( QgsSymbol *sym SIP_TRANSFER ); /** Returns the source color ramp, from which each categories' color is derived. * \see setSourceColorRamp() @@ -161,13 +162,13 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer * \see sourceColorRamp() * \see setSourceSymbol() */ - void setSourceColorRamp( QgsColorRamp *ramp ); + void setSourceColorRamp( QgsColorRamp *ramp SIP_TRANSFER ); /** Update the color ramp used and all symbols colors. * \param ramp color ramp. Ownership is transferred to the renderer * \since QGIS 2.5 */ - void updateColorRamp( QgsColorRamp *ramp ); + void updateColorRamp( QgsColorRamp *ramp SIP_TRANSFER ); virtual bool legendSymbolItemsCheckable() const override; virtual bool legendSymbolItemChecked( const QString &key ) override; @@ -178,7 +179,7 @@ class CORE_EXPORT QgsCategorizedSymbolRenderer : public QgsFeatureRenderer //! creates a QgsCategorizedSymbolRenderer from an existing renderer. //! \since QGIS 2.5 //! \returns a new renderer if the conversion was possible, otherwise 0. - static QgsCategorizedSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsCategorizedSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; protected: QString mAttrName; diff --git a/src/core/symbology-ng/qgscptcityarchive.h b/src/core/symbology-ng/qgscptcityarchive.h index 6e68142adbd..175b4355731 100644 --- a/src/core/symbology-ng/qgscptcityarchive.h +++ b/src/core/symbology-ng/qgscptcityarchive.h @@ -18,6 +18,7 @@ #define QGSCPTCITYARCHIVE_H #include "qgis_core.h" +#include "qgis.h" #include "qgscolorramp.h" #include @@ -128,14 +129,14 @@ class CORE_EXPORT QgsCptCityDataItem : public QObject // Insert new child using alphabetical order based on mName, emits necessary signal to model before and after, sets parent and connects signals // refresh - refresh populated item, emit signals to model - virtual void addChildItem( QgsCptCityDataItem *child, bool refresh = false ); + virtual void addChildItem( QgsCptCityDataItem *child SIP_TRANSFER, bool refresh = false ); // remove and delete child item, signals to browser are emitted virtual void deleteChildItem( QgsCptCityDataItem *child ); // remove child item but don't delete it, signals to browser are emitted // returns pointer to the removed item or null if no such item was found - virtual QgsCptCityDataItem *removeChildItem( QgsCptCityDataItem *child ); + virtual QgsCptCityDataItem *removeChildItem( QgsCptCityDataItem *child ) SIP_TRANSFERBACK; virtual bool equal( const QgsCptCityDataItem *other ); diff --git a/src/core/symbology-ng/qgsellipsesymbollayer.h b/src/core/symbology-ng/qgsellipsesymbollayer.h index 88e2a4b1029..f9334d05304 100644 --- a/src/core/symbology-ng/qgsellipsesymbollayer.h +++ b/src/core/symbology-ng/qgsellipsesymbollayer.h @@ -18,6 +18,7 @@ #define DEFAULT_ELLIPSE_JOINSTYLE Qt::MiterJoin #include "qgis_core.h" +#include "qgis.h" #include "qgsmarkersymbollayer.h" #include @@ -30,8 +31,8 @@ class CORE_EXPORT QgsEllipseSymbolLayer: public QgsMarkerSymbolLayer public: QgsEllipseSymbolLayer(); - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; void renderPoint( QPointF point, QgsSymbolRenderContext &context ) override; QString layerType() const override; diff --git a/src/core/symbology-ng/qgsfillsymbollayer.h b/src/core/symbology-ng/qgsfillsymbollayer.h index 4dc281fb547..5ffda6ab945 100644 --- a/src/core/symbology-ng/qgsfillsymbollayer.h +++ b/src/core/symbology-ng/qgsfillsymbollayer.h @@ -17,6 +17,7 @@ #define QGSFILLSYMBOLLAYERV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbollayer.h" #define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255) @@ -47,8 +48,8 @@ class CORE_EXPORT QgsSimpleFillSymbolLayer : public QgsFillSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes @@ -202,7 +203,7 @@ class CORE_EXPORT QgsGradientFillSymbolLayer : public QgsFillSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; // implemented from base classes @@ -344,7 +345,7 @@ class CORE_EXPORT QgsShapeburstFillSymbolLayer : public QgsFillSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; // implemented from base classes @@ -652,7 +653,7 @@ class CORE_EXPORT QgsRasterFillSymbolLayer: public QgsImageFillSymbolLayer QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() ); - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; // implemented from base classes QString layerType() const override; @@ -837,8 +838,8 @@ class CORE_EXPORT QgsSVGFillSymbolLayer: public QgsImageFillSymbolLayer QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 ); ~QgsSVGFillSymbolLayer(); - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes @@ -944,8 +945,8 @@ class CORE_EXPORT QgsLinePatternFillSymbolLayer: public QgsImageFillSymbolLayer QgsLinePatternFillSymbolLayer(); ~QgsLinePatternFillSymbolLayer(); - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; QString layerType() const override; @@ -1078,8 +1079,8 @@ class CORE_EXPORT QgsPointPatternFillSymbolLayer: public QgsImageFillSymbolLayer QgsPointPatternFillSymbolLayer(); ~QgsPointPatternFillSymbolLayer(); - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; QString layerType() const override; @@ -1217,8 +1218,8 @@ class CORE_EXPORT QgsCentroidFillSymbolLayer : public QgsFillSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes diff --git a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h index 264a7e7f0d9..e06535dcfa5 100644 --- a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h +++ b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h @@ -16,6 +16,7 @@ #define QGSGRADUATEDSYMBOLRENDERERV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbol.h" #include "qgsrenderer.h" #include "qgsexpression.h" @@ -28,7 +29,7 @@ class CORE_EXPORT QgsRendererRange { public: QgsRendererRange(); - QgsRendererRange( double lowerValue, double upperValue, QgsSymbol *symbol, const QString &label, bool render = true ); + QgsRendererRange( double lowerValue, double upperValue, QgsSymbol *symbol SIP_TRANSFER, const QString &label, bool render = true ); QgsRendererRange( const QgsRendererRange &range ); // default dtor is ok @@ -42,7 +43,7 @@ class CORE_EXPORT QgsRendererRange QgsSymbol *symbol() const; QString label() const; - void setSymbol( QgsSymbol *s ); + void setSymbol( QgsSymbol *s SIP_TRANSFER ); void setLabel( const QString &label ); void setLowerValue( double lowerValue ); void setUpperValue( double upperValue ); @@ -99,7 +100,7 @@ class CORE_EXPORT QgsRendererRangeLabelFormat void setTrimTrailingZeroes( bool trimTrailingZeroes ) { mTrimTrailingZeroes = trimTrailingZeroes; } //! \note labelForLowerUpper in Python bindings - QString labelForRange( double lower, double upper ) const; + QString labelForRange( double lower, double upper ) const SIP_PYNAME( labelForLowerUpper ); QString labelForRange( const QgsRendererRange &range ) const; QString formatNumber( double value ) const; @@ -150,7 +151,7 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer const QgsRangeList &ranges() const { return mRanges; } - bool updateRangeSymbol( int rangeIndex, QgsSymbol *symbol ); + bool updateRangeSymbol( int rangeIndex, QgsSymbol *symbol SIP_TRANSFER ); bool updateRangeLabel( int rangeIndex, const QString &label ); bool updateRangeUpperValue( int rangeIndex, double value ); bool updateRangeLowerValue( int rangeIndex, double value ); @@ -159,9 +160,9 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer void addClass( QgsSymbol *symbol ); //! \note available in Python bindings as addClassRange - void addClass( const QgsRendererRange &range ); + void addClass( const QgsRendererRange &range ) SIP_PYNAME( addClassRange ); //! \note available in Python bindings as addClassLowerUpper - void addClass( double lower, double upper ); + void addClass( double lower, double upper ) SIP_PYNAME( addClassLowerUpper ); /** Add a breakpoint by splitting existing classes so that the specified * value becomes a break between two classes. @@ -247,7 +248,7 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer ); //! create renderer from XML element - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; virtual QDomElement save( QDomDocument &doc ) override; virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize ) override; @@ -268,7 +269,7 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer * \see sourceSymbol() * \see setSourceColorRamp() */ - void setSourceSymbol( QgsSymbol *sym ); + void setSourceSymbol( QgsSymbol *sym SIP_TRANSFER ); /** Returns the source color ramp, from which each classes' color is derived. * \see setSourceColorRamp() @@ -279,13 +280,13 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer /** Sets the source color ramp. * \param ramp color ramp. Ownership is transferred to the renderer */ - void setSourceColorRamp( QgsColorRamp *ramp ); + void setSourceColorRamp( QgsColorRamp *ramp SIP_TRANSFER ); /** Update the color ramp used. Also updates all symbols colors. * Doesn't alter current breaks. * \param ramp color ramp. Ownership is transferred to the renderer */ - void updateColorRamp( QgsColorRamp *ramp = nullptr ); + void updateColorRamp( QgsColorRamp *ramp SIP_TRANSFER = 0 ); /** Update all the symbols but leave breaks and colors. This method also sets the source * symbol for the renderer. @@ -326,7 +327,7 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer //! creates a QgsGraduatedSymbolRenderer from an existing renderer. //! \since QGIS 2.6 //! \returns a new renderer if the conversion was possible, otherwise 0. - static QgsGraduatedSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsGraduatedSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; protected: QString mAttrName; diff --git a/src/core/symbology-ng/qgsheatmaprenderer.h b/src/core/symbology-ng/qgsheatmaprenderer.h index 9ba211019fb..4660478ac0d 100644 --- a/src/core/symbology-ng/qgsheatmaprenderer.h +++ b/src/core/symbology-ng/qgsheatmaprenderer.h @@ -52,9 +52,9 @@ class CORE_EXPORT QgsHeatmapRenderer : public QgsFeatureRenderer virtual QgsSymbolList symbols( QgsRenderContext &context ) override; virtual QString dump() const override; virtual QSet usedAttributes( const QgsRenderContext &context ) const override; - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; virtual QDomElement save( QDomDocument &doc ) override; - static QgsHeatmapRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsHeatmapRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; //reimplemented to extent the request so that points up to heatmap's radius distance outside //visible area are included @@ -72,7 +72,7 @@ class CORE_EXPORT QgsHeatmapRenderer : public QgsFeatureRenderer * \param ramp color ramp for heatmap. Ownership of ramp is transferred to the renderer. * \see colorRamp */ - void setColorRamp( QgsColorRamp *ramp ); + void setColorRamp( QgsColorRamp *ramp SIP_TRANSFER ); /** Returns the radius for the heatmap * \returns heatmap radius diff --git a/src/core/symbology-ng/qgsinvertedpolygonrenderer.h b/src/core/symbology-ng/qgsinvertedpolygonrenderer.h index 892eec8f1a9..8605b2876f6 100644 --- a/src/core/symbology-ng/qgsinvertedpolygonrenderer.h +++ b/src/core/symbology-ng/qgsinvertedpolygonrenderer.h @@ -44,7 +44,7 @@ class CORE_EXPORT QgsInvertedPolygonRenderer : public QgsFeatureRenderer * \param embeddedRenderer optional embeddedRenderer. If null, a default one will be assigned. * Ownership will be transferred. */ - QgsInvertedPolygonRenderer( QgsFeatureRenderer *embeddedRenderer = nullptr ); + QgsInvertedPolygonRenderer( QgsFeatureRenderer *embeddedRenderer SIP_TRANSFER = 0 ); //! Direct copies are forbidden. Use clone() instead. QgsInvertedPolygonRenderer( const QgsInvertedPolygonRenderer & ) = delete; @@ -110,7 +110,7 @@ class CORE_EXPORT QgsInvertedPolygonRenderer : public QgsFeatureRenderer virtual bool willRenderFeature( QgsFeature &feat, QgsRenderContext &context ) override; //! Creates a renderer out of an XML, for loading - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; virtual QDomElement save( QDomDocument &doc ) override; @@ -138,7 +138,7 @@ class CORE_EXPORT QgsInvertedPolygonRenderer : public QgsFeatureRenderer * \since QGIS 2.5 * \returns a new renderer if the conversion was possible, otherwise 0. */ - static QgsInvertedPolygonRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsInvertedPolygonRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; private: diff --git a/src/core/symbology-ng/qgslegendsymbolitem.h b/src/core/symbology-ng/qgslegendsymbolitem.h index 006e0190bfa..a13a1a011c2 100644 --- a/src/core/symbology-ng/qgslegendsymbolitem.h +++ b/src/core/symbology-ng/qgslegendsymbolitem.h @@ -17,6 +17,7 @@ #define QGSLEGENDSYMBOLITEMV2_H #include +#include "qgis.h" #include "qgis_core.h" @@ -69,7 +70,7 @@ class CORE_EXPORT QgsLegendSymbolItem QString parentRuleKey() const { return mParentKey; } //! Set symbol of the item. Takes ownership of symbol. - void setSymbol( QgsSymbol *s ); + void setSymbol( QgsSymbol *s SIP_TRANSFER ); private: //! symbol. owned by the struct. can be null. diff --git a/src/core/symbology-ng/qgslinesymbollayer.h b/src/core/symbology-ng/qgslinesymbollayer.h index e65023f0ff6..5609a3760d1 100644 --- a/src/core/symbology-ng/qgslinesymbollayer.h +++ b/src/core/symbology-ng/qgslinesymbollayer.h @@ -17,6 +17,7 @@ #define QGSLINESYMBOLLAYERV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbollayer.h" #include @@ -42,8 +43,8 @@ class CORE_EXPORT QgsSimpleLineSymbolLayer : public QgsLineSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes @@ -175,7 +176,7 @@ class CORE_EXPORT QgsMarkerLineSymbolLayer : public QgsLineSymbolLayer * * \returns A new MarkerLineSymbolLayerV2 */ - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; /** * Create a new MarkerLineSymbolLayerV2 from SLD @@ -184,7 +185,7 @@ class CORE_EXPORT QgsMarkerLineSymbolLayer : public QgsLineSymbolLayer * * \returns A new MarkerLineSymbolLayerV2 */ - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes diff --git a/src/core/symbology-ng/qgsmarkersymbollayer.h b/src/core/symbology-ng/qgsmarkersymbollayer.h index 804ba30ca7e..3c422256825 100644 --- a/src/core/symbology-ng/qgsmarkersymbollayer.h +++ b/src/core/symbology-ng/qgsmarkersymbollayer.h @@ -17,6 +17,7 @@ #define QGSMARKERSYMBOLLAYERV2_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbollayer.h" #define DEFAULT_SIMPLEMARKER_NAME "circle" @@ -210,13 +211,13 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayer : public QgsSimpleMarkerSymbolLayer * \param properties a property map containing symbol properties (see properties()) * \returns new QgsSimpleMarkerSymbolLayer */ - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; /** Creates a new QgsSimpleMarkerSymbolLayer from an SLD XML element. * \param element XML element containing SLD definition of symbol * \returns new QgsSimpleMarkerSymbolLayer */ - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // reimplemented from base classes @@ -409,7 +410,7 @@ class CORE_EXPORT QgsFilledMarkerSymbolLayer : public QgsSimpleMarkerSymbolLayer * \param properties a property map containing symbol properties (see properties()) * \returns new QgsFilledMarkerSymbolLayer */ - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; QString layerType() const override; void startRender( QgsSymbolRenderContext &context ) override; @@ -450,8 +451,8 @@ class CORE_EXPORT QgsSvgMarkerSymbolLayer : public QgsMarkerSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes @@ -551,8 +552,8 @@ class CORE_EXPORT QgsFontMarkerSymbolLayer : public QgsMarkerSymbolLayer // static stuff - static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); - static QgsSymbolLayer *createFromSld( QDomElement &element ); + static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) SIP_FACTORY; + static QgsSymbolLayer *createFromSld( QDomElement &element ) SIP_FACTORY; // implemented from base classes diff --git a/src/core/symbology-ng/qgsnullsymbolrenderer.h b/src/core/symbology-ng/qgsnullsymbolrenderer.h index 0779d61bb28..5f1d2a7a131 100644 --- a/src/core/symbology-ng/qgsnullsymbolrenderer.h +++ b/src/core/symbology-ng/qgsnullsymbolrenderer.h @@ -50,7 +50,7 @@ class CORE_EXPORT QgsNullSymbolRenderer : public QgsFeatureRenderer * \param element DOM element * \returns new null symbol renderer */ - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; virtual QDomElement save( QDomDocument &doc ) override; @@ -58,7 +58,7 @@ class CORE_EXPORT QgsNullSymbolRenderer : public QgsFeatureRenderer * \param renderer renderer to convert from * \returns a new renderer if the conversion was possible, otherwise nullptr. */ - static QgsNullSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsNullSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; private: diff --git a/src/core/symbology-ng/qgspointclusterrenderer.h b/src/core/symbology-ng/qgspointclusterrenderer.h index c1920ee2a53..99a93a406ac 100644 --- a/src/core/symbology-ng/qgspointclusterrenderer.h +++ b/src/core/symbology-ng/qgspointclusterrenderer.h @@ -19,6 +19,7 @@ #define QGSPOINTCLUSTERRENDERER_H #include "qgis_core.h" +#include "qgis.h" #include "qgspointdistancerenderer.h" /** \class QgsPointClusterRenderer @@ -39,7 +40,7 @@ class CORE_EXPORT QgsPointClusterRenderer: public QgsPointDistanceRenderer virtual QSet usedAttributes( const QgsRenderContext &context ) const override; //! Creates a renderer from XML element - static QgsFeatureRenderer *create( QDomElement &symbologyElem ); + static QgsFeatureRenderer *create( QDomElement &symbologyElem ) SIP_FACTORY; /** Returns the symbol used for rendering clustered groups (but not ownership of the symbol). * \see setClusterSymbol() @@ -50,12 +51,12 @@ class CORE_EXPORT QgsPointClusterRenderer: public QgsPointDistanceRenderer * \param symbol new cluster symbol. Ownership is transferred to the renderer. * \see clusterSymbol() */ - void setClusterSymbol( QgsMarkerSymbol *symbol ); + void setClusterSymbol( QgsMarkerSymbol *symbol SIP_TRANSFER ); /** Creates a QgsPointClusterRenderer from an existing renderer. * \returns a new renderer if the conversion was possible, otherwise nullptr. */ - static QgsPointClusterRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsPointClusterRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; private: diff --git a/src/core/symbology-ng/qgspointdisplacementrenderer.h b/src/core/symbology-ng/qgspointdisplacementrenderer.h index 0de65b7379c..e8fb26aebe6 100644 --- a/src/core/symbology-ng/qgspointdisplacementrenderer.h +++ b/src/core/symbology-ng/qgspointdisplacementrenderer.h @@ -19,6 +19,7 @@ #define QGSPOINTDISPLACEMENTRENDERER_H #include "qgis_core.h" +#include "qgis.h" #include "qgspointdistancerenderer.h" /** \class QgsPointDisplacementRenderer @@ -49,7 +50,7 @@ class CORE_EXPORT QgsPointDisplacementRenderer: public QgsPointDistanceRenderer virtual QSet usedAttributes( const QgsRenderContext &context ) const override; //! Create a renderer from XML element - static QgsFeatureRenderer *create( QDomElement &symbologyElem ); + static QgsFeatureRenderer *create( QDomElement &symbologyElem ) SIP_FACTORY; /** Sets the line width for the displacement group circle. * \param width line width in mm @@ -110,13 +111,13 @@ class CORE_EXPORT QgsPointDisplacementRenderer: public QgsPointDistanceRenderer * \param symbol new center symbol. Ownership is transferred to the renderer. * \see centerSymbol() */ - void setCenterSymbol( QgsMarkerSymbol *symbol ); + void setCenterSymbol( QgsMarkerSymbol *symbol SIP_TRANSFER ); /** Creates a QgsPointDisplacementRenderer from an existing renderer. * \since QGIS 2.5 * \returns a new renderer if the conversion was possible, otherwise nullptr. */ - static QgsPointDisplacementRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsPointDisplacementRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; private: diff --git a/src/core/symbology-ng/qgsrenderer.h b/src/core/symbology-ng/qgsrenderer.h index fa025fef4b9..74f83aabff5 100644 --- a/src/core/symbology-ng/qgsrenderer.h +++ b/src/core/symbology-ng/qgsrenderer.h @@ -88,7 +88,7 @@ class CORE_EXPORT QgsFeatureRenderer // renderer takes ownership of its symbols! //! return a new renderer - used by default in vector layers - static QgsFeatureRenderer *defaultRenderer( QgsWkbTypes::GeometryType geomType ); + static QgsFeatureRenderer *defaultRenderer( QgsWkbTypes::GeometryType geomType ) SIP_FACTORY; QString type() const { return mType; } @@ -164,7 +164,7 @@ class CORE_EXPORT QgsFeatureRenderer * * \returns A copy of this renderer */ - virtual QgsFeatureRenderer *clone() const = 0; + virtual QgsFeatureRenderer *clone() const = 0 SIP_FACTORY; /** * Render a feature using this renderer in the given context. @@ -219,7 +219,7 @@ class CORE_EXPORT QgsFeatureRenderer void setUsingSymbolLevels( bool usingSymbolLevels ) { mUsingSymbolLevels = usingSymbolLevels; } //! create a renderer from XML element - static QgsFeatureRenderer *load( QDomElement &symbologyElem ); + static QgsFeatureRenderer *load( QDomElement &symbologyElem ) SIP_FACTORY; //! store renderer info to XML element virtual QDomElement save( QDomDocument &doc ); @@ -238,7 +238,7 @@ class CORE_EXPORT QgsFeatureRenderer * went wrong * \returns the renderer */ - static QgsFeatureRenderer *loadSld( const QDomNode &node, QgsWkbTypes::GeometryType geomType, QString &errorMessage ); + static QgsFeatureRenderer *loadSld( const QDomNode &node, QgsWkbTypes::GeometryType geomType, QString &errorMessage ) SIP_FACTORY; //! used from subclasses to create SLD Rule elements following SLD v1.1 specs virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const @@ -267,7 +267,7 @@ class CORE_EXPORT QgsFeatureRenderer * \param symbol new symbol for legend item. Ownership is transferred to renderer. * \since QGIS 2.14 */ - virtual void setLegendSymbolItem( const QString &key, QgsSymbol *symbol ); + virtual void setLegendSymbolItem( const QString &key, QgsSymbol *symbol SIP_TRANSFER ); //! return a list of item text / symbol //! \note not available in Python bindings diff --git a/src/core/symbology-ng/qgsrendererregistry.h b/src/core/symbology-ng/qgsrendererregistry.h index bb30572be37..29245074a3e 100644 --- a/src/core/symbology-ng/qgsrendererregistry.h +++ b/src/core/symbology-ng/qgsrendererregistry.h @@ -69,7 +69,7 @@ class CORE_EXPORT QgsRendererAbstractMetadata /** Return new instance of the renderer given the DOM element. Returns NULL on error. * Pure virtual function: must be implemented in derived classes. */ - virtual QgsFeatureRenderer *createRenderer( QDomElement &elem ) = 0; + virtual QgsFeatureRenderer *createRenderer( QDomElement &elem ) = 0 SIP_FACTORY; /** Return new instance of settings widget for the renderer. Returns NULL on error. * @@ -197,7 +197,7 @@ class CORE_EXPORT QgsRendererRegistry //! \param metadata renderer metadata //! \returns true if renderer was added successfully, or false if renderer could not //! be added (e.g., a renderer with a duplicate name already exists) - bool addRenderer( QgsRendererAbstractMetadata *metadata ); + bool addRenderer( QgsRendererAbstractMetadata *metadata SIP_TRANSFER ); //! Removes a renderer from registry. //! \param rendererName name of renderer to remove from registry diff --git a/src/core/symbology-ng/qgsrulebasedrenderer.h b/src/core/symbology-ng/qgsrulebasedrenderer.h index 3cddf0f7bdb..bdd9c230ba1 100644 --- a/src/core/symbology-ng/qgsrulebasedrenderer.h +++ b/src/core/symbology-ng/qgsrulebasedrenderer.h @@ -213,7 +213,7 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer void setRuleKey( const QString &key ) { mRuleKey = key; } //! set a new symbol (or NULL). Deletes old symbol. - void setSymbol( QgsSymbol *sym ); + void setSymbol( QgsSymbol *sym SIP_TRANSFER ); void setLabel( const QString &label ) { mLabel = label; } /** @@ -404,12 +404,12 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer ///// - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; //! Constructs the renderer from given tree of rules (takes ownership) - QgsRuleBasedRenderer( QgsRuleBasedRenderer::Rule *root ); + QgsRuleBasedRenderer( QgsRuleBasedRenderer::Rule *root SIP_TRANSFER ); //! Constructor for convenience. Creates a root rule and adds a default rule with symbol (takes ownership) - QgsRuleBasedRenderer( QgsSymbol *defaultSymbol ); + QgsRuleBasedRenderer( QgsSymbol *defaultSymbol SIP_TRANSFER ); ~QgsRuleBasedRenderer(); @@ -432,7 +432,7 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const override; - static QgsFeatureRenderer *createFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType ); + static QgsFeatureRenderer *createFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType ) SIP_FACTORY; virtual QgsSymbolList symbols( QgsRenderContext &context ) override; @@ -468,7 +468,7 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer //! creates a QgsRuleBasedRenderer from an existing renderer. //! \since QGIS 2.5 //! \returns a new renderer if the conversion was possible, otherwise 0. - static QgsRuleBasedRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsRuleBasedRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; //! helper function to convert the size scale and rotation fields present in some other renderers to data defined symbology static void convertToDataDefinedSymbology( QgsSymbol *symbol, const QString &sizeScaleField, const QString &rotationField = QString() ); diff --git a/src/core/symbology-ng/qgssinglesymbolrenderer.h b/src/core/symbology-ng/qgssinglesymbolrenderer.h index 9626920f8b2..ea6f62055e6 100644 --- a/src/core/symbology-ng/qgssinglesymbolrenderer.h +++ b/src/core/symbology-ng/qgssinglesymbolrenderer.h @@ -28,7 +28,7 @@ class CORE_EXPORT QgsSingleSymbolRenderer : public QgsFeatureRenderer { public: - QgsSingleSymbolRenderer( QgsSymbol *symbol ); + QgsSingleSymbolRenderer( QgsSymbol *symbol SIP_TRANSFER ); virtual QgsSymbol *symbolForFeature( QgsFeature &feature, QgsRenderContext &context ) override; virtual QgsSymbol *originalSymbolForFeature( QgsFeature &feature, QgsRenderContext &context ) override; @@ -37,7 +37,7 @@ class CORE_EXPORT QgsSingleSymbolRenderer : public QgsFeatureRenderer virtual QSet usedAttributes( const QgsRenderContext &context ) const override; QgsSymbol *symbol() const; - void setSymbol( QgsSymbol *s ); + void setSymbol( QgsSymbol *s SIP_TRANSFER ); virtual QString dump() const override; @@ -50,7 +50,7 @@ class CORE_EXPORT QgsSingleSymbolRenderer : public QgsFeatureRenderer virtual QgsSymbolList symbols( QgsRenderContext &context ) override; //! create renderer from XML element - static QgsFeatureRenderer *create( QDomElement &element ); + static QgsFeatureRenderer *create( QDomElement &element ) SIP_FACTORY; virtual QDomElement save( QDomDocument &doc ) override; virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize ) override; virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, const QString &rule = QString() ) override; @@ -61,7 +61,7 @@ class CORE_EXPORT QgsSingleSymbolRenderer : public QgsFeatureRenderer //! creates a QgsSingleSymbolRenderer from an existing renderer. //! \since QGIS 2.5 //! \returns a new renderer if the conversion was possible, otherwise 0. - static QgsSingleSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ); + static QgsSingleSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) SIP_FACTORY; protected: std::unique_ptr mSymbol; diff --git a/src/core/symbology-ng/qgsstyle.h b/src/core/symbology-ng/qgsstyle.h index 750c3613aef..b4035a488ef 100644 --- a/src/core/symbology-ng/qgsstyle.h +++ b/src/core/symbology-ng/qgsstyle.h @@ -17,6 +17,7 @@ #define QGSSTYLEV2_H #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -88,7 +89,7 @@ class CORE_EXPORT QgsStyle : public QObject * \param update set to true when the style DB has to be updated, by default it is false * \returns success status of the operation */ - bool addSymbol( const QString &name, QgsSymbol *symbol, bool update = false ); + bool addSymbol( const QString &name, QgsSymbol *symbol SIP_TRANSFER, bool update = false ); /** Adds a color ramp to the style. Calling this method takes the ramp's ownership. * \note Adding a color ramp with the name of existing one replaces it. @@ -97,7 +98,7 @@ class CORE_EXPORT QgsStyle : public QObject * \param update set to true when the style DB has to be updated, by default it is false * \returns success status of the operation */ - bool addColorRamp( const QString &name, QgsColorRamp *colorRamp, bool update = false ); + bool addColorRamp( const QString &name, QgsColorRamp *colorRamp SIP_TRANSFER, bool update = false ); /** Adds a new tag and returns the tag's id * @@ -127,7 +128,7 @@ class CORE_EXPORT QgsStyle : public QObject /** Returns a new copy of the specified color ramp. The caller * takes responsibility for deleting the returned object. */ - QgsColorRamp *colorRamp( const QString &name ) const; + QgsColorRamp *colorRamp( const QString &name ) const SIP_FACTORY; //! Returns count of color ramps int colorRampCount(); @@ -182,7 +183,7 @@ class CORE_EXPORT QgsStyle : public QObject bool renameSymbol( const QString &oldName, const QString &newName ); //! Returns a NEW copy of symbol - QgsSymbol *symbol( const QString &name ); + QgsSymbol *symbol( const QString &name ) SIP_FACTORY; //! Returns a const pointer to a symbol (doesn't create new instance) const QgsSymbol *symbolRef( const QString &name ) const; diff --git a/src/core/symbology-ng/qgssvgcache.h b/src/core/symbology-ng/qgssvgcache.h index 638e3426f07..343e84605c3 100644 --- a/src/core/symbology-ng/qgssvgcache.h +++ b/src/core/symbology-ng/qgssvgcache.h @@ -19,6 +19,7 @@ #define QGSSVGCACHE_H #include +#include "qgis.h" #include #include #include @@ -106,7 +107,7 @@ class CORE_EXPORT QgsSvgCache : public QObject /** * Constructor for QgsSvgCache. */ - QgsSvgCache( QObject *parent = nullptr ); + QgsSvgCache( QObject *parent SIP_TRANSFERTHIS = 0 ); ~QgsSvgCache(); @@ -177,7 +178,7 @@ class CORE_EXPORT QgsSvgCache : public QObject bool &hasFillOpacityParam, bool &hasDefaultFillOpacity, double &defaultFillOpacity, bool &hasStrokeParam, bool &hasDefaultStrokeColor, QColor &defaultStrokeColor, bool &hasStrokeWidthParam, bool &hasDefaultStrokeWidth, double &defaultStrokeWidth, - bool &hasStrokeOpacityParam, bool &hasDefaultStrokeOpacity, double &defaultStrokeOpacity ) const; + bool &hasStrokeOpacityParam, bool &hasDefaultStrokeOpacity, double &defaultStrokeOpacity ) const SIP_PYNAME( containsParamsV3 ); //! Get image data QByteArray getImageData( const QString &path ) const; @@ -242,7 +243,7 @@ class CORE_EXPORT QgsSvgCache : public QObject bool &hasFillOpacityParam, bool &hasDefaultFillOpacity, double &defaultFillOpacity, bool &hasStrokeParam, bool &hasDefaultStroke, QColor &defaultStroke, bool &hasStrokeWidthParam, bool &hasDefaultStrokeWidth, double &defaultStrokeWidth, - bool &hasStrokeOpacityParam, bool &hasDefaultStrokeOpacity, double &defaultStrokeOpacity ) const; + bool &hasStrokeOpacityParam, bool &hasDefaultStrokeOpacity, double &defaultStrokeOpacity ) const SIP_PYNAME( containsParamsV3 ); //! Calculates scaling for rendered image sizes to SVG logical sizes double calcSizeScaleFactor( QgsSvgCacheEntry *entry, const QDomElement &docElem, QSizeF &viewboxSize ) const; diff --git a/src/core/symbology-ng/qgssymbol.h b/src/core/symbology-ng/qgssymbol.h index 53dfbfb8654..ac32ee3420b 100644 --- a/src/core/symbology-ng/qgssymbol.h +++ b/src/core/symbology-ng/qgssymbol.h @@ -94,7 +94,7 @@ class CORE_EXPORT QgsSymbol virtual ~QgsSymbol(); //! return new default symbol for specified geometry type - static QgsSymbol *defaultSymbol( QgsWkbTypes::GeometryType geomType ); + static QgsSymbol *defaultSymbol( QgsWkbTypes::GeometryType geomType ) SIP_FACTORY; SymbolType type() const { return mType; } @@ -132,7 +132,7 @@ class CORE_EXPORT QgsSymbol * \param layer The symbol layer to add * \returns True if the layer is added, False if the index or the layer is bad */ - bool insertSymbolLayer( int index, QgsSymbolLayer *layer ); + bool insertSymbolLayer( int index, QgsSymbolLayer *layer SIP_TRANSFER ); /** * Append symbol layer at the end of the list @@ -140,7 +140,7 @@ class CORE_EXPORT QgsSymbol * \param layer The layer to add * \returns True if the layer is added, False if the layer is bad */ - bool appendSymbolLayer( QgsSymbolLayer *layer ); + bool appendSymbolLayer( QgsSymbolLayer *layer SIP_TRANSFER ); //! delete symbol layer at specified index bool deleteSymbolLayer( int index ); @@ -151,10 +151,10 @@ class CORE_EXPORT QgsSymbol * \param index The index of the layer to remove * \returns A pointer to the removed layer */ - QgsSymbolLayer *takeSymbolLayer( int index ); + QgsSymbolLayer *takeSymbolLayer( int index ) SIP_TRANSFERBACK; //! delete layer at specified index and set a new one - bool changeSymbolLayer( int index, QgsSymbolLayer *layer ); + bool changeSymbolLayer( int index, QgsSymbolLayer *layer SIP_TRANSFER ); /** Begins the rendering process for the symbol. This must be called before renderFeature(), * and should be followed by a call to stopRender(). @@ -200,7 +200,7 @@ class CORE_EXPORT QgsSymbol * Needs to be reimplemented by subclasses. * Ownership is transferred to the caller. */ - virtual QgsSymbol *clone() const = 0; + virtual QgsSymbol *clone() const = 0 SIP_FACTORY; void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; @@ -290,7 +290,7 @@ class CORE_EXPORT QgsSymbol QgsSymbolRenderContext *symbolRenderContext(); protected: - QgsSymbol( SymbolType type, const QgsSymbolLayerList &layers ); // can't be instantiated + QgsSymbol( SymbolType type, const QgsSymbolLayerList &layers SIP_TRANSFER ); // can't be instantiated /** * Creates a point in screen coordinates from a QgsPointV2 in map coordinates @@ -333,7 +333,7 @@ class CORE_EXPORT QgsSymbol * Retrieve a cloned list of all layers that make up this symbol. * Ownership is transferred to the caller. */ - QgsSymbolLayerList cloneLayers() const; + QgsSymbolLayerList cloneLayers() const SIP_FACTORY; /** * Renders a context using a particular symbol layer without passing in a @@ -532,9 +532,9 @@ class CORE_EXPORT QgsMarkerSymbol : public QgsSymbol /** Create a marker symbol with one symbol layer: SimpleMarker with specified properties. * This is a convenience method for easier creation of marker symbols. */ - static QgsMarkerSymbol *createSimple( const QgsStringMap &properties ); + static QgsMarkerSymbol *createSimple( const QgsStringMap &properties ) SIP_FACTORY; - QgsMarkerSymbol( const QgsSymbolLayerList &layers = QgsSymbolLayerList() ); + QgsMarkerSymbol( const QgsSymbolLayerList &layers SIP_TRANSFER = QgsSymbolLayerList() ); /** Sets the angle for the whole symbol. Individual symbol layer sizes * will be rotated to maintain their current relative angle to the whole symbol angle. @@ -677,9 +677,9 @@ class CORE_EXPORT QgsLineSymbol : public QgsSymbol /** Create a line symbol with one symbol layer: SimpleLine with specified properties. * This is a convenience method for easier creation of line symbols. */ - static QgsLineSymbol *createSimple( const QgsStringMap &properties ); + static QgsLineSymbol *createSimple( const QgsStringMap &properties ) SIP_FACTORY; - QgsLineSymbol( const QgsSymbolLayerList &layers = QgsSymbolLayerList() ); + QgsLineSymbol( const QgsSymbolLayerList &layers SIP_TRANSFER = QgsSymbolLayerList() ); void setWidth( double width ); double width() const; @@ -719,9 +719,9 @@ class CORE_EXPORT QgsFillSymbol : public QgsSymbol /** Create a fill symbol with one symbol layer: SimpleFill with specified properties. * This is a convenience method for easier creation of fill symbols. */ - static QgsFillSymbol *createSimple( const QgsStringMap &properties ); + static QgsFillSymbol *createSimple( const QgsStringMap &properties ) SIP_FACTORY; - QgsFillSymbol( const QgsSymbolLayerList &layers = QgsSymbolLayerList() ); + QgsFillSymbol( const QgsSymbolLayerList &layers SIP_TRANSFER = QgsSymbolLayerList() ); void setAngle( double angle ); void renderPolygon( const QPolygonF &points, QList *rings, const QgsFeature *f, QgsRenderContext &context, int layer = -1, bool selected = false ); diff --git a/src/core/symbology-ng/qgssymbollayer.h b/src/core/symbology-ng/qgssymbollayer.h index 9c02b783a49..470f9710164 100644 --- a/src/core/symbology-ng/qgssymbollayer.h +++ b/src/core/symbology-ng/qgssymbollayer.h @@ -24,6 +24,7 @@ #define DEFAULT_SCALE_METHOD QgsSymbol::ScaleDiameter #include "qgis_core.h" +#include "qgis.h" #include #include #include @@ -171,7 +172,7 @@ class CORE_EXPORT QgsSymbolLayer /** * Shall be reimplemented by subclasses to create a deep copy of the instance. */ - virtual QgsSymbolLayer *clone() const = 0; + virtual QgsSymbolLayer *clone() const = 0 SIP_FACTORY; virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const { Q_UNUSED( props ); element.appendChild( doc.createComment( QStringLiteral( "SymbolLayerV2 %1 not implemented yet" ).arg( layerType() ) ) ); } @@ -599,13 +600,13 @@ class CORE_EXPORT QgsMarkerSymbolLayer : public QgsSymbolLayer * \param offsetY will be set to required vertical offset (in painter units) * \note available in Python as markerOffsetWithWidthAndHeight */ - void markerOffset( QgsSymbolRenderContext &context, double width, double height, double &offsetX, double &offsetY ) const; + void markerOffset( QgsSymbolRenderContext &context, double width, double height, double &offsetX, double &offsetY ) const SIP_PYNAME( markerOffsetWithWidthAndHeight ); //! \note available in Python bindings as markerOffset2 void markerOffset( QgsSymbolRenderContext &context, double width, double height, QgsUnitTypes::RenderUnit widthUnit, QgsUnitTypes::RenderUnit heightUnit, double &offsetX, double &offsetY, - const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale ) const; + const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale ) const SIP_PYNAME( markerOffset2 ); /** Adjusts a marker offset to account for rotation. * \param offset offset prior to rotation diff --git a/src/core/symbology-ng/qgssymbollayerregistry.h b/src/core/symbology-ng/qgssymbollayerregistry.h index 6bc3b5e3ad6..6e5c5e08b63 100644 --- a/src/core/symbology-ng/qgssymbollayerregistry.h +++ b/src/core/symbology-ng/qgssymbollayerregistry.h @@ -17,6 +17,7 @@ #define QGSSYMBOLLAYERREGISTRY_H #include "qgis_core.h" +#include "qgis.h" #include "qgssymbol.h" class QgsVectorLayer; @@ -44,7 +45,7 @@ class CORE_EXPORT QgsSymbolLayerAbstractMetadata QgsSymbol::SymbolType type() const { return mType; } //! Create a symbol layer of this type given the map of properties. - virtual QgsSymbolLayer *createSymbolLayer( const QgsStringMap &map ) = 0; + virtual QgsSymbolLayer *createSymbolLayer( const QgsStringMap &map ) = 0 SIP_FACTORY; //! Create widget for symbol layer of this type. Can return NULL if there's no GUI virtual QgsSymbolLayerWidget *createSymbolLayerWidget( const QgsVectorLayer * ) { return nullptr; } //! Create a symbol layer of this type given the map of properties. @@ -133,10 +134,10 @@ class CORE_EXPORT QgsSymbolLayerRegistry QgsSymbolLayerAbstractMetadata *symbolLayerMetadata( const QString &name ) const; //! register a new symbol layer type. Takes ownership of the metadata instance. - bool addSymbolLayerType( QgsSymbolLayerAbstractMetadata *metadata ); + bool addSymbolLayerType( QgsSymbolLayerAbstractMetadata *metadata SIP_TRANSFER ); //! create a new instance of symbol layer given symbol layer name and properties - QgsSymbolLayer *createSymbolLayer( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const; + QgsSymbolLayer *createSymbolLayer( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const SIP_FACTORY; //! create a new instance of symbol layer given symbol layer name and SLD QgsSymbolLayer *createSymbolLayerFromSld( const QString &name, QDomElement &element ) const; @@ -145,7 +146,7 @@ class CORE_EXPORT QgsSymbolLayerRegistry QStringList symbolLayersForType( QgsSymbol::SymbolType type ); //! create a new instance of symbol layer for specified symbol type with default settings - static QgsSymbolLayer *defaultSymbolLayer( QgsSymbol::SymbolType type ); + static QgsSymbolLayer *defaultSymbolLayer( QgsSymbol::SymbolType type ) SIP_FACTORY; private: diff --git a/src/core/symbology-ng/qgssymbollayerutils.h b/src/core/symbology-ng/qgssymbollayerutils.h index 45aac651b99..6f3da861e7b 100644 --- a/src/core/symbology-ng/qgssymbollayerutils.h +++ b/src/core/symbology-ng/qgssymbollayerutils.h @@ -203,7 +203,7 @@ class CORE_EXPORT QgsSymbolLayerUtils * \param element DOM element representing symbol * \returns decoded symbol, if possible */ - static QgsSymbol *loadSymbol( const QDomElement &element ); + static QgsSymbol *loadSymbol( const QDomElement &element ) SIP_FACTORY; /** Attempts to load a symbol from a DOM element and cast it to a particular symbol * type. @@ -228,7 +228,7 @@ class CORE_EXPORT QgsSymbolLayerUtils } } - static QgsSymbolLayer *loadSymbolLayer( QDomElement &element ); + static QgsSymbolLayer *loadSymbolLayer( QDomElement &element ) SIP_FACTORY; static QDomElement saveSymbol( const QString &symbolName, QgsSymbol *symbol, QDomDocument &doc ); /** Returns a string representing the symbol. Can be used to test for equality @@ -284,7 +284,7 @@ class CORE_EXPORT QgsSymbolLayerUtils //! \note available in Python as wellKnownMarkerFromSld2 static bool wellKnownMarkerFromSld( QDomElement &element, QString &name, QColor &color, QColor &strokeColor, Qt::PenStyle &strokeStyle, - double &strokeWidth, double &size ); + double &strokeWidth, double &size ) SIP_PYNAME( wellKnownMarkerFromSld2 ); static void externalMarkerToSld( QDomDocument &doc, QDomElement &element, const QString &path, const QString &format, int *markIndex = nullptr, @@ -343,7 +343,7 @@ class CORE_EXPORT QgsSymbolLayerUtils static QgsStringMap parseProperties( QDomElement &element ); static void saveProperties( QgsStringMap props, QDomDocument &doc, QDomElement &element ); - static QgsSymbolMap loadSymbols( QDomElement &element ); + static QgsSymbolMap loadSymbols( QDomElement &element ) SIP_FACTORY; static QDomElement saveSymbols( QgsSymbolMap &symbols, const QString &tagName, QDomDocument &doc ); static void clearSymbolMap( QgsSymbolMap &symbols ); @@ -353,7 +353,7 @@ class CORE_EXPORT QgsSymbolLayerUtils * \returns new color ramp. Caller takes responsibility for deleting the returned value. * \see saveColorRamp() */ - static QgsColorRamp *loadColorRamp( QDomElement &element ); + static QgsColorRamp *loadColorRamp( QDomElement &element ) SIP_FACTORY; /** Encodes a color ramp's settings to an XML element * \param name name of ramp @@ -521,7 +521,7 @@ class CORE_EXPORT QgsSymbolLayerUtils * This is useful when accepting input which could be either a non-quoted field name or expression. * \since QGIS 2.2 */ - static QgsExpression *fieldOrExpressionToExpression( const QString &fieldOrExpression ); + static QgsExpression *fieldOrExpressionToExpression( const QString &fieldOrExpression ) SIP_FACTORY; /** Return a field name if the whole expression is just a name of the field . * Returns full expression string if the expression is more complex than just one field. @@ -548,13 +548,13 @@ class CORE_EXPORT QgsSymbolLayerUtils * returns a copy of the original point * \since QGIS 3.0 */ - static QPointF rescaleUom( QPointF point, QgsUnitTypes::RenderUnit unit, const QgsStringMap &props ); + static QPointF rescaleUom( QPointF point, QgsUnitTypes::RenderUnit unit, const QgsStringMap &props ) SIP_PYNAME( rescalePointUom ); /** Rescales the given array based on the uomScale found in the props, if any is found, otherwise * returns a copy of the original point * \since QGIS 3.0 */ - static QVector rescaleUom( const QVector &array, QgsUnitTypes::RenderUnit unit, const QgsStringMap &props ); + static QVector rescaleUom( const QVector &array, QgsUnitTypes::RenderUnit unit, const QgsStringMap &props ) SIP_PYNAME( rescaleArrayUom ); /** * Checks if the properties contain scaleMinDenom and scaleMaxDenom, if available, they are added into the SE Rule element diff --git a/src/gui/attributetable/qgsattributetablefiltermodel.h b/src/gui/attributetable/qgsattributetablefiltermodel.h index ddab3c85184..83aa619ec75 100644 --- a/src/gui/attributetable/qgsattributetablefiltermodel.h +++ b/src/gui/attributetable/qgsattributetablefiltermodel.h @@ -18,6 +18,7 @@ #define QGSATTRIBUTETABLEFILTERMODEL_H #include +#include "qgis.h" #include #include "qgsattributetablemodel.h" @@ -76,7 +77,7 @@ class GUI_EXPORT QgsAttributeTableFilterModel: public QSortFilterProxyModel, pub * \param sourceModel The QgsAttributeTableModel to use as source (mostly referred to as master model) * \param canvas The mapCanvas. Used to identify the currently visible features. */ - QgsAttributeTableFilterModel( QgsMapCanvas *canvas, QgsAttributeTableModel *sourceModel, QObject *parent = nullptr ); + QgsAttributeTableFilterModel( QgsMapCanvas *canvas, QgsAttributeTableModel *sourceModel, QObject *parent SIP_TRANSFERTHIS = 0 ); /** * Set the attribute table model that backs this model diff --git a/src/gui/attributetable/qgsattributetableview.h b/src/gui/attributetable/qgsattributetableview.h index 5c056ff95ef..d7b5b4d6c34 100644 --- a/src/gui/attributetable/qgsattributetableview.h +++ b/src/gui/attributetable/qgsattributetableview.h @@ -17,6 +17,7 @@ #define QGSATTRIBUTETABLEVIEW_H #include +#include "qgis.h" #include #include "qgsfeature.h" // For QgsFeatureIds @@ -47,7 +48,7 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView Q_OBJECT public: - QgsAttributeTableView( QWidget *parent = nullptr ); + QgsAttributeTableView( QWidget *parent SIP_TRANSFERTHIS = 0 ); virtual void setModel( QgsAttributeTableFilterModel *filterModel ); @@ -55,7 +56,7 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView * \brief setFeatureSelectionManager * \param featureSelectionManager We will take ownership */ - void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager ); + void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager SIP_TRANSFER ); /** * This event filter is installed on the verticalHeader to intercept mouse press and release diff --git a/src/gui/attributetable/qgsdualview.h b/src/gui/attributetable/qgsdualview.h index 59b33676b10..52a54cbbca9 100644 --- a/src/gui/attributetable/qgsdualview.h +++ b/src/gui/attributetable/qgsdualview.h @@ -17,6 +17,7 @@ #define QGSDUALVIEW_H #include +#include "qgis.h" #include "ui_qgsdualviewbase.h" @@ -70,7 +71,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas * \brief Constructor * \param parent The parent widget */ - explicit QgsDualView( QWidget *parent = nullptr ); + explicit QgsDualView( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Has to be called to initialize the dual view. diff --git a/src/gui/attributetable/qgsfeaturelistmodel.h b/src/gui/attributetable/qgsfeaturelistmodel.h index a8f24cf58f7..2da2e42f0e1 100644 --- a/src/gui/attributetable/qgsfeaturelistmodel.h +++ b/src/gui/attributetable/qgsfeaturelistmodel.h @@ -16,6 +16,7 @@ #define QGSATTRIBUTEEDITORMODEL_H #include +#include "qgis.h" #include #include @@ -58,7 +59,7 @@ class GUI_EXPORT QgsFeatureListModel : public QAbstractProxyModel, public QgsFea }; public: - explicit QgsFeatureListModel( QgsAttributeTableFilterModel *sourceModel, QObject *parent = nullptr ); + explicit QgsFeatureListModel( QgsAttributeTableFilterModel *sourceModel, QObject *parent SIP_TRANSFERTHIS = 0 ); virtual ~QgsFeatureListModel(); virtual void setSourceModel( QgsAttributeTableFilterModel *sourceModel ); diff --git a/src/gui/attributetable/qgsfeaturelistview.h b/src/gui/attributetable/qgsfeaturelistview.h index 7f24eb0f19e..18af6bd93b1 100644 --- a/src/gui/attributetable/qgsfeaturelistview.h +++ b/src/gui/attributetable/qgsfeaturelistview.h @@ -17,6 +17,7 @@ #define QGSFEATURELISTVIEW_H #include +#include "qgis.h" #include #include "qgsfeature.h" // For QgsFeatureIds @@ -50,7 +51,7 @@ class GUI_EXPORT QgsFeatureListView : public QListView * * \param parent owner */ - explicit QgsFeatureListView( QWidget *parent = nullptr ); + explicit QgsFeatureListView( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Returns the layer cache @@ -116,7 +117,7 @@ class GUI_EXPORT QgsFeatureListView : public QListView * \brief setFeatureSelectionManager * \param featureSelectionManager We will take ownership */ - void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager ); + void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager SIP_TRANSFER ); protected: virtual void mouseMoveEvent( QMouseEvent *event ) override; virtual void mousePressEvent( QMouseEvent *event ) override; diff --git a/src/gui/attributetable/qgsfeatureselectionmodel.h b/src/gui/attributetable/qgsfeatureselectionmodel.h index 23215909c5a..91b762b7e5d 100644 --- a/src/gui/attributetable/qgsfeatureselectionmodel.h +++ b/src/gui/attributetable/qgsfeatureselectionmodel.h @@ -16,6 +16,7 @@ #define QGSFEATURESELECTIONMODEL_H #include +#include "qgis.h" #include "qgsfeature.h" #include "qgis_gui.h" @@ -31,7 +32,7 @@ class GUI_EXPORT QgsFeatureSelectionModel : public QItemSelectionModel { Q_OBJECT public: - explicit QgsFeatureSelectionModel( QAbstractItemModel *model, QgsFeatureModel *featureModel, QgsIFeatureSelectionManager *featureSelectionHandler, QObject *parent ); + explicit QgsFeatureSelectionModel( QAbstractItemModel *model, QgsFeatureModel *featureModel, QgsIFeatureSelectionManager *featureSelectionHandler, QObject *parent SIP_TRANSFERTHIS ); /** * Enables or disables synchronisation to the QgsVectorLayer diff --git a/src/gui/attributetable/qgsfieldconditionalformatwidget.h b/src/gui/attributetable/qgsfieldconditionalformatwidget.h index f7cff5de3d1..b839df14308 100644 --- a/src/gui/attributetable/qgsfieldconditionalformatwidget.h +++ b/src/gui/attributetable/qgsfieldconditionalformatwidget.h @@ -19,6 +19,7 @@ #define QGSFIELDCONDITIONALFORMATWIDGET_H #include +#include "qgis.h" #include #include @@ -39,7 +40,7 @@ class GUI_EXPORT QgsFieldConditionalFormatWidget : public QWidget, private Ui::Q /** Constructor for QgsFieldConditionalFormatWidget. * \param parent parent widget */ - explicit QgsFieldConditionalFormatWidget( QWidget *parent = nullptr ); + explicit QgsFieldConditionalFormatWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsFieldConditionalFormatWidget(); diff --git a/src/gui/auth/qgsauthauthoritieseditor.h b/src/gui/auth/qgsauthauthoritieseditor.h index c8c7fb6f963..c5e673d5690 100644 --- a/src/gui/auth/qgsauthauthoritieseditor.h +++ b/src/gui/auth/qgsauthauthoritieseditor.h @@ -18,6 +18,7 @@ #define QGSAUTHAUTHORITIESEDITOR_H #include +#include "qgis.h" #include #include "ui_qgsauthauthoritieseditor.h" @@ -42,7 +43,7 @@ class GUI_EXPORT QgsAuthAuthoritiesEditor : public QWidget, private Ui::QgsAuthA * Widget for viewing and editing certificate authorities directly in database * \param parent Parent widget */ - explicit QgsAuthAuthoritiesEditor( QWidget *parent = nullptr ); + explicit QgsAuthAuthoritiesEditor( QWidget *parent SIP_TRANSFERTHIS = 0 ); private slots: void populateCaCertsView(); diff --git a/src/gui/auth/qgsauthcertificateinfo.h b/src/gui/auth/qgsauthcertificateinfo.h index e5fb1969c5e..3977c8c1258 100644 --- a/src/gui/auth/qgsauthcertificateinfo.h +++ b/src/gui/auth/qgsauthcertificateinfo.h @@ -19,6 +19,7 @@ #define QGSAUTHCERTIFICATEINFO_H #include +#include "qgis.h" #ifndef QT_NO_SSL #include @@ -41,7 +42,7 @@ class GUI_EXPORT QgsAuthCertInfo : public QWidget, private Ui::QgsAuthCertInfo public: explicit QgsAuthCertInfo( const QSslCertificate &cert, bool manageCertTrust = false, - QWidget *parent = nullptr, + QWidget *parent SIP_TRANSFERTHIS = 0, const QList &connectionCAs = QList() ); bool trustCacheRebuilt() { return mTrustCacheRebuilt; } @@ -152,7 +153,7 @@ class GUI_EXPORT QgsAuthCertInfoDialog : public QDialog */ explicit QgsAuthCertInfoDialog( const QSslCertificate &cert, bool manageCertTrust, - QWidget *parent = nullptr, + QWidget *parent SIP_TRANSFERTHIS = 0, const QList &connectionCAs = QList() ); //! Get access to embedded info widget diff --git a/src/gui/auth/qgsauthcertificatemanager.h b/src/gui/auth/qgsauthcertificatemanager.h index 04ae5858160..2a04942b204 100644 --- a/src/gui/auth/qgsauthcertificatemanager.h +++ b/src/gui/auth/qgsauthcertificatemanager.h @@ -18,6 +18,7 @@ #define QGSAUTHCERTIFICATEMANAGER_H #include "ui_qgsauthcertificatemanager.h" +#include "qgis.h" #include #include @@ -37,7 +38,7 @@ class GUI_EXPORT QgsAuthCertEditors : public QWidget, private Ui::QgsAuthCertMan * Construct a widget to contain various certificate editors * \param parent Parent widget */ - explicit QgsAuthCertEditors( QWidget *parent = nullptr ); + explicit QgsAuthCertEditors( QWidget *parent SIP_TRANSFERTHIS = 0 ); }; @@ -57,7 +58,7 @@ class GUI_EXPORT QgsAuthCertManager : public QDialog * Construct a dialog wrapper for widget to manage available certificate editors * \param parent Parent widget */ - explicit QgsAuthCertManager( QWidget *parent = nullptr ); + explicit QgsAuthCertManager( QWidget *parent SIP_TRANSFERTHIS = 0 ); //! Get access to embedded editors widget QgsAuthCertEditors *certEditorsWidget() { return mCertEditors; } diff --git a/src/gui/auth/qgsauthcerttrustpolicycombobox.h b/src/gui/auth/qgsauthcerttrustpolicycombobox.h index bffc529a4f6..3668c86faae 100644 --- a/src/gui/auth/qgsauthcerttrustpolicycombobox.h +++ b/src/gui/auth/qgsauthcerttrustpolicycombobox.h @@ -18,6 +18,7 @@ #define QGSAUTHCERTTRUSTPOLICYCOMBOBOX_H #include +#include "qgis.h" #include "qgsauthcertutils.h" #include "qgis_gui.h" @@ -37,7 +38,7 @@ class GUI_EXPORT QgsAuthCertTrustPolicyComboBox : public QComboBox * \param defaultpolicy Default trust policy */ explicit QgsAuthCertTrustPolicyComboBox( - QWidget *parent = nullptr, + QWidget *parent SIP_TRANSFERTHIS = 0, QgsAuthCertUtils::CertTrustPolicy policy = QgsAuthCertUtils::DefaultTrust, QgsAuthCertUtils::CertTrustPolicy defaultpolicy = QgsAuthCertUtils::DefaultTrust ); diff --git a/src/gui/auth/qgsauthconfigeditor.h b/src/gui/auth/qgsauthconfigeditor.h index d9e5290f072..a50123a30b5 100644 --- a/src/gui/auth/qgsauthconfigeditor.h +++ b/src/gui/auth/qgsauthconfigeditor.h @@ -18,6 +18,7 @@ #define QGSAUTHCONFIGEDITOR_H #include +#include "qgis.h" #include #include "ui_qgsauthconfigeditor.h" @@ -41,7 +42,7 @@ class GUI_EXPORT QgsAuthConfigEditor : public QWidget, private Ui::QgsAuthConfig * \param showUtilities Whether to show the widget's utilities button * \param relayMessages Whether to relay auth manager messages to internal message bar */ - explicit QgsAuthConfigEditor( QWidget *parent = nullptr, bool showUtilities = true, bool relayMessages = true ); + explicit QgsAuthConfigEditor( QWidget *parent SIP_TRANSFERTHIS = 0, bool showUtilities = true, bool relayMessages = true ); //! Hide the widget's title, e.g. when embedding void toggleTitleVisibility( bool visible ); diff --git a/src/gui/auth/qgsauthconfigselect.h b/src/gui/auth/qgsauthconfigselect.h index 06f19fbfb25..392825f90ef 100644 --- a/src/gui/auth/qgsauthconfigselect.h +++ b/src/gui/auth/qgsauthconfigselect.h @@ -18,6 +18,7 @@ #define QGSAUTHCONFIGSELECT_H #include +#include "qgis.h" #include "ui_qgsauthconfigselect.h" #include "qgsauthconfig.h" @@ -39,7 +40,7 @@ class GUI_EXPORT QgsAuthConfigSelect : public QWidget, private Ui::QgsAuthConfig * \param parent Parent widget * \param dataprovider The key of the calling layer provider, if applicable */ - explicit QgsAuthConfigSelect( QWidget *parent = nullptr, const QString &dataprovider = QString() ); + explicit QgsAuthConfigSelect( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &dataprovider = QString() ); //! Set the authentication config id for the resource void setConfigId( const QString &authcfg ); @@ -114,7 +115,7 @@ class GUI_EXPORT QgsAuthConfigUriEdit : public QDialog, private Ui::QgsAuthConfi * \param datauri URI QString with of without an authcfg=ID string * \param dataprovider The key of the calling layer provider, if applicable */ - explicit QgsAuthConfigUriEdit( QWidget *parent = nullptr, + explicit QgsAuthConfigUriEdit( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &datauri = QString(), const QString &dataprovider = QString() ); diff --git a/src/gui/auth/qgsautheditorwidgets.h b/src/gui/auth/qgsautheditorwidgets.h index e2ac4daa1a7..91cb97bbdb6 100644 --- a/src/gui/auth/qgsautheditorwidgets.h +++ b/src/gui/auth/qgsautheditorwidgets.h @@ -18,6 +18,7 @@ #define QGSAUTHEDITORWIDGETS_H #include +#include "qgis.h" #include "ui_qgsautheditorwidgets.h" #include "ui_qgsauthmethodplugins.h" #include "qgis_gui.h" @@ -35,7 +36,7 @@ class GUI_EXPORT QgsAuthMethodPlugins : public QDialog, private Ui::QgsAuthMetho * Construct a dialog for viewing available authentication method plugins * \param parent Parent widget */ - explicit QgsAuthMethodPlugins( QWidget *parent = nullptr ); + explicit QgsAuthMethodPlugins( QWidget *parent SIP_TRANSFERTHIS = 0 ); private slots: void populateTable(); @@ -61,7 +62,7 @@ class GUI_EXPORT QgsAuthEditorWidgets : public QWidget, private Ui::QgsAuthEdito * Construct a widget to contain various authentication editors * \param parent Parent widget */ - explicit QgsAuthEditorWidgets( QWidget *parent = nullptr ); + explicit QgsAuthEditorWidgets( QWidget *parent SIP_TRANSFERTHIS = 0 ); private slots: void on_btnCertManager_clicked(); diff --git a/src/gui/auth/qgsauthidentitieseditor.h b/src/gui/auth/qgsauthidentitieseditor.h index 66d96305f71..1990ae4d175 100644 --- a/src/gui/auth/qgsauthidentitieseditor.h +++ b/src/gui/auth/qgsauthidentitieseditor.h @@ -18,6 +18,7 @@ #define QGSAUTHIDENTITIESEDITOR_H #include +#include "qgis.h" #include #include "ui_qgsauthidentitieseditor.h" @@ -39,7 +40,7 @@ class GUI_EXPORT QgsAuthIdentitiesEditor : public QWidget, private Ui::QgsAuthId * Widget for editing authentication configurations directly in database * \param parent Parent widget */ - explicit QgsAuthIdentitiesEditor( QWidget *parent = nullptr ); + explicit QgsAuthIdentitiesEditor( QWidget *parent SIP_TRANSFERTHIS = 0 ); private slots: void populateIdentitiesView(); diff --git a/src/gui/auth/qgsauthimportcertdialog.h b/src/gui/auth/qgsauthimportcertdialog.h index 42cd328e570..4cbfbc27492 100644 --- a/src/gui/auth/qgsauthimportcertdialog.h +++ b/src/gui/auth/qgsauthimportcertdialog.h @@ -18,6 +18,7 @@ #define QGSAUTHIMPORTCERTDIALOG_H #include +#include "qgis.h" #include "ui_qgsauthimportcertdialog.h" #include @@ -54,7 +55,7 @@ class GUI_EXPORT QgsAuthImportCertDialog : public QDialog, private Ui::QgsAuthIm * \param filter Certificate type filter to apply to dialog * \param input Type of input(s) for certificates */ - explicit QgsAuthImportCertDialog( QWidget *parent = nullptr, + explicit QgsAuthImportCertDialog( QWidget *parent SIP_TRANSFERTHIS = 0, QgsAuthImportCertDialog::CertFilter filter = NoFilter, QgsAuthImportCertDialog::CertInput input = AllInputs ); diff --git a/src/gui/auth/qgsauthimportidentitydialog.h b/src/gui/auth/qgsauthimportidentitydialog.h index aa3efb78b20..7d43fe1b956 100644 --- a/src/gui/auth/qgsauthimportidentitydialog.h +++ b/src/gui/auth/qgsauthimportidentitydialog.h @@ -18,6 +18,7 @@ #define QGSAUTHIMPORTIDENTITYDIALOG_H #include +#include "qgis.h" #include "ui_qgsauthimportidentitydialog.h" #include @@ -61,7 +62,7 @@ class GUI_EXPORT QgsAuthImportIdentityDialog : public QDialog, private Ui::QgsAu * \param parent Parent widget */ explicit QgsAuthImportIdentityDialog( QgsAuthImportIdentityDialog::IdentityType identitytype, - QWidget *parent = nullptr ); + QWidget *parent SIP_TRANSFERTHIS = 0 ); //! Get identity type QgsAuthImportIdentityDialog::IdentityType identityType(); diff --git a/src/gui/auth/qgsauthserverseditor.h b/src/gui/auth/qgsauthserverseditor.h index f932dfee88a..9078814a3d7 100644 --- a/src/gui/auth/qgsauthserverseditor.h +++ b/src/gui/auth/qgsauthserverseditor.h @@ -18,6 +18,7 @@ #define QGSAUTHSERVERSEDITOR_H #include +#include "qgis.h" #include "ui_qgsauthserverseditor.h" #include "qgsauthmanager.h" @@ -38,7 +39,7 @@ class GUI_EXPORT QgsAuthServersEditor : public QWidget, private Ui::QgsAuthServe * Widget for editing authentication configurations directly in database * \param parent Parent Widget */ - explicit QgsAuthServersEditor( QWidget *parent = nullptr ); + explicit QgsAuthServersEditor( QWidget *parent SIP_TRANSFERTHIS = 0 ); private slots: void populateSslConfigsView(); diff --git a/src/gui/auth/qgsauthsslconfigwidget.h b/src/gui/auth/qgsauthsslconfigwidget.h index 7af08254035..d354df3a3d2 100644 --- a/src/gui/auth/qgsauthsslconfigwidget.h +++ b/src/gui/auth/qgsauthsslconfigwidget.h @@ -18,6 +18,7 @@ #define QGSAUTHSSLCONFIGWIDGET_H #include +#include "qgis.h" #include #include "ui_qgsauthsslconfigwidget.h" @@ -47,7 +48,7 @@ class GUI_EXPORT QgsAuthSslConfigWidget : public QWidget, private Ui::QgsAuthSsl * \param hostport Unique host:port to associate with the server certificate * \param connectionCAs List of trusted Certificate Authorities objects */ - explicit QgsAuthSslConfigWidget( QWidget *parent = nullptr, + explicit QgsAuthSslConfigWidget( QWidget *parent SIP_TRANSFERTHIS = 0, const QSslCertificate &cert = QSslCertificate(), const QString &hostport = QString(), const QList &connectionCAs = QList() ); diff --git a/src/gui/auth/qgsauthsslimportdialog.h b/src/gui/auth/qgsauthsslimportdialog.h index 9a90bb779b8..ff483ab0ff2 100644 --- a/src/gui/auth/qgsauthsslimportdialog.h +++ b/src/gui/auth/qgsauthsslimportdialog.h @@ -63,6 +63,7 @@ #define QGSAUTHSSLIMPORTDIALOG_H #include "ui_qgsauthsslimportdialog.h" +#include "qgis.h" #include #include @@ -86,7 +87,7 @@ class GUI_EXPORT QgsAuthSslImportDialog : public QDialog, private Ui::QgsAuthSsl * Construct dialog for importing certificates * \param parent */ - QgsAuthSslImportDialog( QWidget *parent = nullptr ); + QgsAuthSslImportDialog( QWidget *parent SIP_TRANSFERTHIS = 0 ); public slots: void accept() override; diff --git a/src/gui/auth/qgsauthtrustedcasdialog.h b/src/gui/auth/qgsauthtrustedcasdialog.h index c814744dab5..a33b873109c 100644 --- a/src/gui/auth/qgsauthtrustedcasdialog.h +++ b/src/gui/auth/qgsauthtrustedcasdialog.h @@ -18,6 +18,7 @@ #define QGSAUTHTRUSTEDCASDIALOG_H #include +#include "qgis.h" #include "ui_qgsauthtrustedcasdialog.h" #include @@ -41,7 +42,7 @@ class GUI_EXPORT QgsAuthTrustedCAsDialog : public QDialog, private Ui::QgsAuthTr * \param parent Parent widget * \param trustedCAs List of trusted Certificate Authorities objects */ - explicit QgsAuthTrustedCAsDialog( QWidget *parent = nullptr, + explicit QgsAuthTrustedCAsDialog( QWidget *parent SIP_TRANSFERTHIS = 0, const QList &trustedCAs = QList() ); private slots: diff --git a/src/gui/editorwidgets/core/qgseditorconfigwidget.h b/src/gui/editorwidgets/core/qgseditorconfigwidget.h index 73efaf24e93..0082ede2c5e 100644 --- a/src/gui/editorwidgets/core/qgseditorconfigwidget.h +++ b/src/gui/editorwidgets/core/qgseditorconfigwidget.h @@ -17,6 +17,7 @@ #define QGSEDITORCONFIGWIDGET_H #include +#include "qgis.h" #include "qgis_gui.h" #include "qgseditorwidgetwrapper.h" #include "qgsexpressioncontextgenerator.h" @@ -44,7 +45,7 @@ class GUI_EXPORT QgsEditorConfigWidget : public QWidget, public QgsExpressionCon * \param fieldIdx The index of the field on the layer for which this dialog will be created * \param parent A parent widget */ - explicit QgsEditorConfigWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ); + explicit QgsEditorConfigWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS ); /** * \brief Create a configuration from the current GUI state diff --git a/src/gui/editorwidgets/core/qgseditorwidgetautoconf.h b/src/gui/editorwidgets/core/qgseditorwidgetautoconf.h index 940c425db97..4a0a2177f42 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetautoconf.h +++ b/src/gui/editorwidgets/core/qgseditorwidgetautoconf.h @@ -16,6 +16,7 @@ #define QGSEDITORWIDGETAUTOCONF_H #include +#include "qgis.h" #include "qgis_gui.h" #include @@ -43,7 +44,7 @@ class GUI_EXPORT QgsEditorWidgetAutoConfPlugin * * \returns and integer value rating how good is the setup provided by this plugin. */ - virtual QgsEditorWidgetSetup editorWidgetSetup( const QgsVectorLayer *vl, const QString &fieldName, int &score ) const = 0; + virtual QgsEditorWidgetSetup editorWidgetSetup( const QgsVectorLayer *vl, const QString &fieldName, int &score SIP_OUT ) const = 0; }; diff --git a/src/gui/editorwidgets/core/qgseditorwidgetfactory.h b/src/gui/editorwidgets/core/qgseditorwidgetfactory.h index 4382df86c6c..107dd079694 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetfactory.h +++ b/src/gui/editorwidgets/core/qgseditorwidgetfactory.h @@ -17,6 +17,7 @@ #define QGSEDITORWIDGETFACTORY_H #include +#include "qgis.h" #include #include #include @@ -62,9 +63,9 @@ class GUI_EXPORT QgsEditorWidgetFactory * * \returns A new widget wrapper */ - virtual QgsEditorWidgetWrapper *create( QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QWidget *parent ) const = 0; + virtual QgsEditorWidgetWrapper *create( QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QWidget *parent ) const = 0 SIP_FACTORY; - virtual QgsSearchWidgetWrapper *createSearchWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const; + virtual QgsSearchWidgetWrapper *createSearchWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const SIP_FACTORY; /** * Return The human readable identifier name of this widget type @@ -83,7 +84,7 @@ class GUI_EXPORT QgsEditorWidgetFactory * * \returns A configuration widget */ - virtual QgsEditorConfigWidget *configWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const = 0; + virtual QgsEditorConfigWidget *configWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const = 0 SIP_FACTORY; /** * Check if this editor widget type supports a certain field. diff --git a/src/gui/editorwidgets/core/qgseditorwidgetregistry.h b/src/gui/editorwidgets/core/qgseditorwidgetregistry.h index 26d500e38d1..a0d4a2e1c08 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetregistry.h +++ b/src/gui/editorwidgets/core/qgseditorwidgetregistry.h @@ -17,6 +17,7 @@ #define QGSEDITORWIDGETREGISTRY_H #include +#include "qgis.h" #include #include "qgseditorwidgetfactory.h" #include "qgsattributeeditorcontext.h" @@ -99,7 +100,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject const QVariantMap &config, QWidget *editor, QWidget *parent, - const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); + const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ) SIP_FACTORY; /** * Create an attribute editor widget wrapper of the best type for a given field. @@ -117,14 +118,14 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject int fieldIdx, QWidget *editor, QWidget *parent, - const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); + const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ) SIP_FACTORY; QgsSearchWidgetWrapper *createSearchWidget( const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, const QVariantMap &config, QWidget *parent, - const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); + const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ) SIP_FACTORY; /** * Creates a configuration widget @@ -136,7 +137,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject * * \returns A new configuration widget */ - QgsEditorConfigWidget *createConfigWidget( const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, QWidget *parent ); + QgsEditorConfigWidget *createConfigWidget( const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) SIP_FACTORY; /** * Get the human readable name for a widget type @@ -169,7 +170,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject * * \returns true, if successful, false, if the widgetId is already in use or widgetFactory is NULL */ - bool registerWidget( const QString &widgetId, QgsEditorWidgetFactory *widgetFactory ); + bool registerWidget( const QString &widgetId, QgsEditorWidgetFactory *widgetFactory SIP_TRANSFER ); /** * Register a new auto-conf plugin. diff --git a/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h b/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h index c9d8bcdec6e..cb915034e19 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h +++ b/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSEDITORWIDGETWRAPPER_H #include +#include "qgis.h" #include #include @@ -61,7 +62,7 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper * \param editor An editor widget. Can be NULL if one should be autogenerated. * \param parent A parent widget for this widget wrapper and the created widget. */ - explicit QgsEditorWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *editor = nullptr, QWidget *parent = nullptr ); + explicit QgsEditorWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *editor = nullptr, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Will be used to access the widget's value. Read the value from the widget and @@ -216,7 +217,7 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper * \param value The value * \note Python name valueChangedInt */ - void valueChanged( int value ); + void valueChanged( int value ) SIP_PYNAME( valueChangedInt ); /** * If you emit to this slot in your implementation, an appropriate change notification @@ -225,7 +226,7 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper * \param value The value * \note Python name valueChangedDouble */ - void valueChanged( double value ); + void valueChanged( double value ) SIP_PYNAME( valueChangedDouble ); /** * If you emit to this slot in your implementation, an appropriate change notification @@ -234,7 +235,7 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper * \param value The value * \note Python name valueChangedBool */ - void valueChanged( bool value ); + void valueChanged( bool value ) SIP_PYNAME( valueChangedBool ); /** * If you emit to this slot in your implementation, an appropriate change notification diff --git a/src/gui/editorwidgets/core/qgssearchwidgetwrapper.h b/src/gui/editorwidgets/core/qgssearchwidgetwrapper.h index 332b28ef732..0d5fcb1878b 100644 --- a/src/gui/editorwidgets/core/qgssearchwidgetwrapper.h +++ b/src/gui/editorwidgets/core/qgssearchwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSSEARCHWIDGETWRAPPER_H #include +#include "qgis.h" #include #include @@ -87,7 +88,7 @@ class GUI_EXPORT QgsSearchWidgetWrapper : public QgsWidgetWrapper * \param fieldIdx The field which will be controlled * \param parent A parent widget for this widget wrapper and the created widget. */ - explicit QgsSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent = nullptr ); + explicit QgsSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns filter flags supported by the search widget. * \since QGIS 2.16 diff --git a/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h b/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h index eefb5317918..6dad5ffbac2 100644 --- a/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSCHECKBOXSEARCHWIDGETWRAPPER_H #include "qgssearchwidgetwrapper.h" +#include "qgis.h" #include #include @@ -43,7 +44,7 @@ class GUI_EXPORT QgsCheckboxSearchWidgetWrapper : public QgsSearchWidgetWrapper * \param fieldIdx index of associated field * \param parent parent widget */ - explicit QgsCheckboxSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent = nullptr ); + explicit QgsCheckboxSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a variant representing the current state of the widget. * \note this will not be a boolean true or false value, it will instead diff --git a/src/gui/editorwidgets/qgsdatetimeedit.h b/src/gui/editorwidgets/qgsdatetimeedit.h index 72c0580ce3e..308bb71db68 100644 --- a/src/gui/editorwidgets/qgsdatetimeedit.h +++ b/src/gui/editorwidgets/qgsdatetimeedit.h @@ -17,6 +17,7 @@ #define QGSDATETIMEEDIT_H #include +#include "qgis.h" #include "qgis_gui.h" class QToolButton; @@ -31,7 +32,7 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit Q_PROPERTY( bool allowNull READ allowNull WRITE setAllowNull ) public: - explicit QgsDateTimeEdit( QWidget *parent = nullptr ); + explicit QgsDateTimeEdit( QWidget *parent SIP_TRANSFERTHIS = 0 ); //! Determines if the widget allows setting null date/time. void setAllowNull( bool allowNull ); diff --git a/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h b/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h index f2528271309..f0ed3b5ddb6 100644 --- a/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSDATETIMESEARCHWIDGETWRAPPER_H #include "qgssearchwidgetwrapper.h" +#include "qgis.h" #include #include @@ -43,7 +44,7 @@ class GUI_EXPORT QgsDateTimeSearchWidgetWrapper : public QgsSearchWidgetWrapper * \param fieldIdx index of associated field * \param parent parent widget */ - explicit QgsDateTimeSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent = nullptr ); + explicit QgsDateTimeSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a variant representing the current state of the widget, respecting * the editor widget's configured field format for date/time values. diff --git a/src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.h b/src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.h index 4462e05b233..ee42b7ea9c8 100644 --- a/src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSDEFAULTSEARCHWIDGETWRAPPER_H #include "qgssearchwidgetwrapper.h" +#include "qgis.h" #include "qgsfilterlineedit.h" #include @@ -30,7 +31,7 @@ class GUI_EXPORT QgsDefaultSearchWidgetWrapper : public QgsSearchWidgetWrapper { Q_OBJECT public: - explicit QgsDefaultSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent = nullptr ); + explicit QgsDefaultSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS = 0 ); // QgsSearchWidgetWrapper interface public: diff --git a/src/gui/editorwidgets/qgsdoublespinbox.h b/src/gui/editorwidgets/qgsdoublespinbox.h index 26a43a9529f..12719251993 100644 --- a/src/gui/editorwidgets/qgsdoublespinbox.h +++ b/src/gui/editorwidgets/qgsdoublespinbox.h @@ -17,6 +17,7 @@ #define QGSDOUBLESPINBOX_H #include +#include "qgis.h" #include "qgis_gui.h" class QgsSpinBoxLineEdit; @@ -46,7 +47,7 @@ class GUI_EXPORT QgsDoubleSpinBox : public QDoubleSpinBox /** Constructor for QgsDoubleSpinBox. * \param parent parent widget */ - explicit QgsDoubleSpinBox( QWidget *parent = nullptr ); + explicit QgsDoubleSpinBox( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets whether the widget will show a clear button. The clear button * allows users to reset the widget to a default or empty state. diff --git a/src/gui/editorwidgets/qgsmultiedittoolbutton.h b/src/gui/editorwidgets/qgsmultiedittoolbutton.h index 8d158746ca2..e65acf57df6 100644 --- a/src/gui/editorwidgets/qgsmultiedittoolbutton.h +++ b/src/gui/editorwidgets/qgsmultiedittoolbutton.h @@ -17,6 +17,7 @@ #define QGSMULTIEDITTOOLBUTTON_H #include "qgsfields.h" +#include "qgis.h" #include #include "qgis_gui.h" @@ -44,7 +45,7 @@ class GUI_EXPORT QgsMultiEditToolButton : public QToolButton /** Constructor for QgsMultiEditToolButton. * \param parent parent object */ - explicit QgsMultiEditToolButton( QWidget *parent = nullptr ); + explicit QgsMultiEditToolButton( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns the current displayed state of the button. */ diff --git a/src/gui/editorwidgets/qgsrelationreferencewidget.h b/src/gui/editorwidgets/qgsrelationreferencewidget.h index 5d847661307..8e59b0f293b 100644 --- a/src/gui/editorwidgets/qgsrelationreferencewidget.h +++ b/src/gui/editorwidgets/qgsrelationreferencewidget.h @@ -17,6 +17,7 @@ #define QGSRELATIONREFERENCEWIDGET_H #include "qgsattributeeditorcontext.h" +#include "qgis.h" #include "qgsfeature.h" #include @@ -58,7 +59,7 @@ class GUI_EXPORT QgsRelationReferenceWidget : public QWidget Scale }; - explicit QgsRelationReferenceWidget( QWidget *parent ); + explicit QgsRelationReferenceWidget( QWidget *parent SIP_TRANSFERTHIS ); ~QgsRelationReferenceWidget(); diff --git a/src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.h b/src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.h index b95a9f11016..c31744dd7f7 100644 --- a/src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.h +++ b/src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSRELATIONREFERENCEWIDGETWRAPPER_H #include "qgseditorwidgetwrapper.h" +#include "qgis.h" #include "qgis_gui.h" class QgsRelationReferenceWidget; @@ -47,7 +48,7 @@ class GUI_EXPORT QgsRelationReferenceWidgetWrapper : public QgsEditorWidgetWrapp QWidget *editor, QgsMapCanvas *canvas, QgsMessageBar *messageBar, - QWidget *parent = nullptr ); + QWidget *parent SIP_TRANSFERTHIS = 0 ); virtual QWidget *createWidget( QWidget *parent ) override; virtual void initWidget( QWidget *editor ) override; diff --git a/src/gui/editorwidgets/qgsrelationwidgetwrapper.h b/src/gui/editorwidgets/qgsrelationwidgetwrapper.h index b59ccaf4be3..3c82254a09a 100644 --- a/src/gui/editorwidgets/qgsrelationwidgetwrapper.h +++ b/src/gui/editorwidgets/qgsrelationwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSRELATIONWIDGETWRAPPER_H #include "qgswidgetwrapper.h" +#include "qgis.h" #include "qgis_gui.h" class QgsRelationEditorWidget; @@ -31,7 +32,7 @@ class GUI_EXPORT QgsRelationWidgetWrapper : public QgsWidgetWrapper Q_OBJECT public: - explicit QgsRelationWidgetWrapper( QgsVectorLayer *vl, const QgsRelation &relation, QWidget *editor = nullptr, QWidget *parent = nullptr ); + explicit QgsRelationWidgetWrapper( QgsVectorLayer *vl, const QgsRelation &relation, QWidget *editor = nullptr, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Defines if a title lable should be shown for this widget. diff --git a/src/gui/editorwidgets/qgssearchwidgettoolbutton.h b/src/gui/editorwidgets/qgssearchwidgettoolbutton.h index f41d308c89a..77033ccdbbf 100644 --- a/src/gui/editorwidgets/qgssearchwidgettoolbutton.h +++ b/src/gui/editorwidgets/qgssearchwidgettoolbutton.h @@ -17,6 +17,7 @@ #define QGSSEARCHWIDGETTOOLBUTTON_H #include "editorwidgets/core/qgssearchwidgetwrapper.h" +#include "qgis.h" #include #include "qgis_gui.h" @@ -36,7 +37,7 @@ class GUI_EXPORT QgsSearchWidgetToolButton : public QToolButton /** Constructor for QgsSearchWidgetToolButton. * \param parent parent object */ - explicit QgsSearchWidgetToolButton( QWidget *parent = nullptr ); + explicit QgsSearchWidgetToolButton( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the available filter flags to show in the widget. Any active flags * (see activeFlags()) which are not present in the new available filter diff --git a/src/gui/editorwidgets/qgsspinbox.h b/src/gui/editorwidgets/qgsspinbox.h index 44aea63b7a5..0a75890df93 100644 --- a/src/gui/editorwidgets/qgsspinbox.h +++ b/src/gui/editorwidgets/qgsspinbox.h @@ -17,6 +17,7 @@ #define QGSSPINBOX_H #include +#include "qgis.h" #include "qgis_gui.h" class QgsSpinBoxLineEdit; @@ -46,7 +47,7 @@ class GUI_EXPORT QgsSpinBox : public QSpinBox /** Constructor for QgsSpinBox. * \param parent parent widget */ - explicit QgsSpinBox( QWidget *parent = nullptr ); + explicit QgsSpinBox( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets whether the widget will show a clear button. The clear button * allows users to reset the widget to a default or empty state. diff --git a/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.h b/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.h index b562444740e..bbacc4f1a61 100644 --- a/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSVALUEMAPSEARCHWIDGETWRAPPER_H #include "qgssearchwidgetwrapper.h" +#include "qgis.h" #include #include "qgis_gui.h" @@ -30,7 +31,7 @@ class GUI_EXPORT QgsValueMapSearchWidgetWrapper : public QgsSearchWidgetWrapper { Q_OBJECT public: - explicit QgsValueMapSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent = nullptr ); + explicit QgsValueMapSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS = 0 ); bool applyDirectly() override; QString expression() override; bool valid() const override; diff --git a/src/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.h b/src/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.h index bc082fc055b..6c91a7b84d2 100644 --- a/src/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.h @@ -17,6 +17,7 @@ #define QGSVALUERELATIONSEARCHWIDGETWRAPPER_H #include "qgssearchwidgetwrapper.h" +#include "qgis.h" #include "qgsvaluerelationfieldformatter.h" #include @@ -36,7 +37,7 @@ class GUI_EXPORT QgsValueRelationSearchWidgetWrapper : public QgsSearchWidgetWra { Q_OBJECT public: - explicit QgsValueRelationSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent = nullptr ); + explicit QgsValueRelationSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent SIP_TRANSFERTHIS = 0 ); bool applyDirectly() override; QString expression() override; bool valid() const override; diff --git a/src/gui/effects/qgseffectstackpropertieswidget.h b/src/gui/effects/qgseffectstackpropertieswidget.h index 52d83ad0d55..1caa7846d34 100644 --- a/src/gui/effects/qgseffectstackpropertieswidget.h +++ b/src/gui/effects/qgseffectstackpropertieswidget.h @@ -17,6 +17,7 @@ #define QGSEFFECTSTACKPROPERTIESWIDGET_H #include "qgsdialog.h" +#include "qgis.h" #include #include #include @@ -53,7 +54,7 @@ class GUI_EXPORT QgsEffectStackPropertiesWidget : public QgsPanelWidget, private * \param stack QgsEffectStack to modify in the widget * \param parent parent widget */ - QgsEffectStackPropertiesWidget( QgsEffectStack *stack, QWidget *parent = nullptr ); + QgsEffectStackPropertiesWidget( QgsEffectStack *stack, QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsEffectStackPropertiesWidget(); @@ -198,7 +199,7 @@ class GUI_EXPORT QgsEffectStackCompactWidget: public QgsPanelWidget * is not a QgsEffectStack, it will be automatically converted to an effect * stack consisting of the original effect */ - QgsEffectStackCompactWidget( QWidget *parent = nullptr, QgsPaintEffect *effect = nullptr ); + QgsEffectStackCompactWidget( QWidget *parent SIP_TRANSFERTHIS = 0, QgsPaintEffect *effect = nullptr ); ~QgsEffectStackCompactWidget(); /** Sets paint effect attached to the widget, diff --git a/src/gui/layertree/qgscustomlayerorderwidget.h b/src/gui/layertree/qgscustomlayerorderwidget.h index d444b298fb9..79c31c3a9e6 100644 --- a/src/gui/layertree/qgscustomlayerorderwidget.h +++ b/src/gui/layertree/qgscustomlayerorderwidget.h @@ -17,6 +17,7 @@ #define QGSCUSTOMLAYERORDERWIDGET_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -43,7 +44,7 @@ class GUI_EXPORT QgsCustomLayerOrderWidget : public QWidget { Q_OBJECT public: - explicit QgsCustomLayerOrderWidget( QgsLayerTreeMapCanvasBridge *bridge, QWidget *parent = nullptr ); + explicit QgsCustomLayerOrderWidget( QgsLayerTreeMapCanvasBridge *bridge, QWidget *parent SIP_TRANSFERTHIS = 0 ); signals: diff --git a/src/gui/layertree/qgslayertreeembeddedconfigwidget.h b/src/gui/layertree/qgslayertreeembeddedconfigwidget.h index 8afb7dcc352..e54da2e00b0 100644 --- a/src/gui/layertree/qgslayertreeembeddedconfigwidget.h +++ b/src/gui/layertree/qgslayertreeembeddedconfigwidget.h @@ -17,6 +17,7 @@ #define QGSLAYERTREEEMBEDDEDCONFIGWIDGET_H #include "ui_qgslayertreeembeddedconfigwidget.h" +#include "qgis.h" #include "qgis_gui.h" class QgsMapLayer; @@ -35,7 +36,7 @@ class GUI_EXPORT QgsLayerTreeEmbeddedConfigWidget : public QWidget, protected Ui * A widget to configure layer tree embedded widgets for a particular map layer. * \param parent The parent of the widget. */ - QgsLayerTreeEmbeddedConfigWidget( QWidget *parent = nullptr ); + QgsLayerTreeEmbeddedConfigWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); //! Initialize widget with a map layer void setLayer( QgsMapLayer *layer ); diff --git a/src/gui/layertree/qgslayertreeembeddedwidgetregistry.h b/src/gui/layertree/qgslayertreeembeddedwidgetregistry.h index a28d6a7f3bf..3a7d0bc151e 100644 --- a/src/gui/layertree/qgslayertreeembeddedwidgetregistry.h +++ b/src/gui/layertree/qgslayertreeembeddedwidgetregistry.h @@ -17,6 +17,7 @@ #define QGSLAYERTREEEMBEDDEDWIDGETREGISTRY_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -44,7 +45,7 @@ class GUI_EXPORT QgsLayerTreeEmbeddedWidgetProvider //! Factory to create widgets. The returned widget is owned by the caller. //! The widgetIndex argument may be used to identify which widget is being //! created (useful when using multiple widgets from the same provider for one layer). - virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0; + virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0 SIP_FACTORY; //! Whether it makes sense to use this widget for a particular layer virtual bool supportsLayer( QgsMapLayer *layer ) = 0; @@ -81,7 +82,7 @@ class GUI_EXPORT QgsLayerTreeEmbeddedWidgetRegistry /** Register a provider, takes ownership of the object. * Returns true on success, false if the provider is already registered. */ - bool addProvider( QgsLayerTreeEmbeddedWidgetProvider *provider ); + bool addProvider( QgsLayerTreeEmbeddedWidgetProvider *provider SIP_TRANSFER ); /** Unregister a provider, the provider object is deleted. * Returns true on success, false if the provider was not registered. */ diff --git a/src/gui/layertree/qgslayertreemapcanvasbridge.h b/src/gui/layertree/qgslayertreemapcanvasbridge.h index e74b7b4a264..5e819eb9331 100644 --- a/src/gui/layertree/qgslayertreemapcanvasbridge.h +++ b/src/gui/layertree/qgslayertreemapcanvasbridge.h @@ -17,6 +17,7 @@ #define QGSLAYERTREEMAPCANVASBRIDGE_H #include +#include "qgis.h" #include #include "qgscoordinatereferencesystem.h" @@ -50,7 +51,7 @@ class GUI_EXPORT QgsLayerTreeMapCanvasBridge : public QObject Q_OBJECT public: //! Constructor: does not take ownership of the layer tree nor canvas - QgsLayerTreeMapCanvasBridge( QgsLayerTree *root, QgsMapCanvas *canvas, QObject *parent = nullptr ); + QgsLayerTreeMapCanvasBridge( QgsLayerTree *root, QgsMapCanvas *canvas, QObject *parent SIP_TRANSFERTHIS = 0 ); QgsLayerTree *rootGroup() const { return mRoot; } QgsMapCanvas *mapCanvas() const { return mCanvas; } diff --git a/src/gui/layertree/qgslayertreeview.h b/src/gui/layertree/qgslayertreeview.h index 1e17ee28cbd..be593c8ce0b 100644 --- a/src/gui/layertree/qgslayertreeview.h +++ b/src/gui/layertree/qgslayertreeview.h @@ -17,6 +17,7 @@ #define QGSLAYERTREEVIEW_H #include +#include "qgis.h" #include "qgis_gui.h" class QgsLayerTreeGroup; @@ -48,7 +49,7 @@ class GUI_EXPORT QgsLayerTreeView : public QTreeView { Q_OBJECT public: - explicit QgsLayerTreeView( QWidget *parent = nullptr ); + explicit QgsLayerTreeView( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsLayerTreeView(); //! Overridden setModel() from base class. Only QgsLayerTreeModel is an acceptable model. @@ -61,7 +62,7 @@ class GUI_EXPORT QgsLayerTreeView : public QTreeView QgsLayerTreeViewDefaultActions *defaultActions(); //! Set provider for context menu. Takes ownership of the instance - void setMenuProvider( QgsLayerTreeViewMenuProvider *menuProvider ); + void setMenuProvider( QgsLayerTreeViewMenuProvider *menuProvider SIP_TRANSFER ); //! Return pointer to the context menu provider. May be null QgsLayerTreeViewMenuProvider *menuProvider() const { return mMenuProvider; } @@ -149,7 +150,7 @@ class GUI_EXPORT QgsLayerTreeViewMenuProvider virtual ~QgsLayerTreeViewMenuProvider() = default; //! Return a newly created menu instance (or null pointer on error) - virtual QMenu *createContextMenu() = 0; + virtual QMenu *createContextMenu() = 0 SIP_FACTORY; }; diff --git a/src/gui/layertree/qgslayertreeviewdefaultactions.h b/src/gui/layertree/qgslayertreeviewdefaultactions.h index acfc3374d12..b736ba44c0c 100644 --- a/src/gui/layertree/qgslayertreeviewdefaultactions.h +++ b/src/gui/layertree/qgslayertreeviewdefaultactions.h @@ -17,6 +17,7 @@ #define QGSLAYERTREEVIEWDEFAULTACTIONS_H #include +#include "qgis.h" #include "qgis_gui.h" class QAction; @@ -41,11 +42,11 @@ class GUI_EXPORT QgsLayerTreeViewDefaultActions : public QObject public: QgsLayerTreeViewDefaultActions( QgsLayerTreeView *view ); - QAction *actionAddGroup( QObject *parent = nullptr ); - QAction *actionRemoveGroupOrLayer( QObject *parent = nullptr ); - QAction *actionShowInOverview( QObject *parent = nullptr ); - QAction *actionRenameGroupOrLayer( QObject *parent = nullptr ); - QAction *actionShowFeatureCount( QObject *parent = nullptr ); + QAction *actionAddGroup( QObject *parent = nullptr ) SIP_FACTORY; + QAction *actionRemoveGroupOrLayer( QObject *parent = nullptr ) SIP_FACTORY; + QAction *actionShowInOverview( QObject *parent = nullptr ) SIP_FACTORY; + QAction *actionRenameGroupOrLayer( QObject *parent = nullptr ) SIP_FACTORY; + QAction *actionShowFeatureCount( QObject *parent = nullptr ) SIP_FACTORY; //! Action to check a group and all its children QAction *actionCheckAndAllChildren( QObject *parent = nullptr ); @@ -56,15 +57,15 @@ class GUI_EXPORT QgsLayerTreeViewDefaultActions : public QObject //! Action to check a group and all its parents QAction *actionCheckAndAllParents( QObject *parent = nullptr ); - QAction *actionZoomToLayer( QgsMapCanvas *canvas, QObject *parent = nullptr ); - QAction *actionZoomToGroup( QgsMapCanvas *canvas, QObject *parent = nullptr ); + QAction *actionZoomToLayer( QgsMapCanvas *canvas, QObject *parent = nullptr ) SIP_FACTORY; + QAction *actionZoomToGroup( QgsMapCanvas *canvas, QObject *parent = nullptr ) SIP_FACTORY; // TODO: zoom to selected - QAction *actionMakeTopLevel( QObject *parent = nullptr ); - QAction *actionGroupSelected( QObject *parent = nullptr ); + QAction *actionMakeTopLevel( QObject *parent = nullptr ) SIP_FACTORY; + QAction *actionGroupSelected( QObject *parent = nullptr ) SIP_FACTORY; //! Action to enable/disable mutually exclusive flag of a group (only one child node may be checked) //! \since QGIS 2.12 - QAction *actionMutuallyExclusiveGroup( QObject *parent = nullptr ); + QAction *actionMutuallyExclusiveGroup( QObject *parent = nullptr ) SIP_FACTORY; void zoomToLayer( QgsMapCanvas *canvas ); void zoomToGroup( QgsMapCanvas *canvas ); diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 6284d826020..653f3b2769d 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -172,7 +172,7 @@ class GUI_EXPORT QgisInterface : public QObject * \param widget widget to add. The toolbar will take ownership of this widget * \returns the QAction you can use to remove this widget from the toolbar */ - virtual QAction *addToolBarWidget( QWidget *widget ) = 0; + virtual QAction *addToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0; //! Remove an action (icon) from the plugin toolbar virtual void removeToolBarIcon( QAction *qAction ) = 0; @@ -185,7 +185,7 @@ class GUI_EXPORT QgisInterface : public QObject * \param widget widget to add. The toolbar will take ownership of this widget * \returns the QAction you can use to remove this widget from the toolbar */ - virtual QAction *addRasterToolBarWidget( QWidget *widget ) = 0; + virtual QAction *addRasterToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0; //! Add an icon to the Raster toolbar virtual int addRasterToolBarIcon( QAction *qAction ) = 0; @@ -204,7 +204,7 @@ class GUI_EXPORT QgisInterface : public QObject * \param widget widget to add. The toolbar will take ownership of this widget * \returns the QAction you can use to remove this widget from the toolbar */ - virtual QAction *addVectorToolBarWidget( QWidget *widget ) = 0; + virtual QAction *addVectorToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0; //! Remove an action (icon) from the Vector toolbar virtual void removeVectorToolBarIcon( QAction *qAction ) = 0; @@ -220,7 +220,7 @@ class GUI_EXPORT QgisInterface : public QObject * \param widget widget to add. The toolbar will take ownership of this widget * \returns the QAction you can use to remove this widget from the toolbar */ - virtual QAction *addDatabaseToolBarWidget( QWidget *widget ) = 0; + virtual QAction *addDatabaseToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0; //! Remove an action (icon) from the Database toolbar virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0; @@ -236,17 +236,17 @@ class GUI_EXPORT QgisInterface : public QObject * \param widget widget to add. The toolbar will take ownership of this widget * \returns the QAction you can use to remove this widget from the toolbar */ - virtual QAction *addWebToolBarWidget( QWidget *widget ) = 0; + virtual QAction *addWebToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0; //! Remove an action (icon) from the Web toolbar virtual void removeWebToolBarIcon( QAction *qAction ) = 0; //! Add toolbar with specified name - virtual QToolBar *addToolBar( const QString &name ) = 0; + virtual QToolBar *addToolBar( const QString &name ) = 0 SIP_FACTORY; //! Add a toolbar //! \since QGIS 2.3 - virtual void addToolBar( QToolBar *toolbar, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0; + virtual void addToolBar( QToolBar *toolbar SIP_TRANSFER, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0; //! Return a pointer to the map canvas virtual QgsMapCanvas *mapCanvas() = 0; diff --git a/src/gui/qgsactionmenu.h b/src/gui/qgsactionmenu.h index 8365a17600b..607698aeafe 100644 --- a/src/gui/qgsactionmenu.h +++ b/src/gui/qgsactionmenu.h @@ -17,6 +17,7 @@ #define QGSACTIONMENU_H #include +#include "qgis.h" #include #include "qgsfeature.h" @@ -65,7 +66,7 @@ class GUI_EXPORT QgsActionMenu : public QMenu * \param parent The usual QWidget parent. * \param actionScope The action scope this menu will run in */ - explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent = nullptr ); + explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Constructs a new QgsActionMenu @@ -75,7 +76,7 @@ class GUI_EXPORT QgsActionMenu : public QMenu * \param parent The usual QWidget parent. * \param actionScope The action scope this menu will run in */ - explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeatureId fid, const QString &actionScope, QWidget *parent = nullptr ); + explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeatureId fid, const QString &actionScope, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Change the feature on which actions are performed diff --git a/src/gui/qgsattributedialog.h b/src/gui/qgsattributedialog.h index 8f2489426a6..96ebd355f4c 100644 --- a/src/gui/qgsattributedialog.h +++ b/src/gui/qgsattributedialog.h @@ -18,6 +18,7 @@ #define QGSATTRIBUTEDIALOG_H #include "qgsattributeeditorcontext.h" +#include "qgis.h" #include "qgsattributeform.h" #include "qgstrackedvectorlayertools.h" @@ -49,7 +50,7 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog * \param context The context in which this dialog is created * */ - QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent = nullptr, bool showDialogButtons = true, const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); + QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent SIP_TRANSFERTHIS = 0, bool showDialogButtons = true, const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); ~QgsAttributeDialog(); diff --git a/src/gui/qgsattributeform.h b/src/gui/qgsattributeform.h index c699de7a6ac..34c274a7959 100644 --- a/src/gui/qgsattributeform.h +++ b/src/gui/qgsattributeform.h @@ -17,6 +17,7 @@ #define QGSATTRIBUTEFORM_H #include "qgsfeature.h" +#include "qgis.h" #include "qgsattributeeditorcontext.h" #include "qgseditorwidgetwrapper.h" @@ -91,7 +92,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget * Takes ownership * \param iface */ - void addInterface( QgsAttributeFormInterface *iface ); + void addInterface( QgsAttributeFormInterface *iface SIP_TRANSFER ); /** * Returns the layer for which this form is shown diff --git a/src/gui/qgsattributeformeditorwidget.h b/src/gui/qgsattributeformeditorwidget.h index 8cb785fc0f6..eab90e65a8e 100644 --- a/src/gui/qgsattributeformeditorwidget.h +++ b/src/gui/qgsattributeformeditorwidget.h @@ -17,6 +17,7 @@ #define QGSATTRIBUTEFORMEDITORWIDGET_H #include +#include "qgis.h" #include #include "qgsattributeeditorcontext.h" #include "qgssearchwidgetwrapper.h" @@ -57,7 +58,7 @@ class GUI_EXPORT QgsAttributeFormEditorWidget : public QWidget * \param form parent attribute form */ explicit QgsAttributeFormEditorWidget( QgsEditorWidgetWrapper *editorWidget, - QgsAttributeForm *form ); + QgsAttributeForm *form SIP_TRANSFERTHIS ); ~QgsAttributeFormEditorWidget(); diff --git a/src/gui/qgsblendmodecombobox.h b/src/gui/qgsblendmodecombobox.h index 753929deb4f..2684d0411bb 100644 --- a/src/gui/qgsblendmodecombobox.h +++ b/src/gui/qgsblendmodecombobox.h @@ -19,6 +19,7 @@ #define QGSBLENDMODECOMBOBOX_H #include +#include "qgis.h" #include // For QPainter::CompositionMode enum #include "qgis_gui.h" @@ -29,7 +30,7 @@ class GUI_EXPORT QgsBlendModeComboBox : public QComboBox { Q_OBJECT public: - QgsBlendModeComboBox( QWidget *parent = nullptr ); + QgsBlendModeComboBox( QWidget *parent SIP_TRANSFERTHIS = 0 ); //! Function to read the selected blend mode as QPainter::CompositionMode QPainter::CompositionMode blendMode(); diff --git a/src/gui/qgsbrowsertreeview.h b/src/gui/qgsbrowsertreeview.h index 91974b282bc..fdf63ebf828 100644 --- a/src/gui/qgsbrowsertreeview.h +++ b/src/gui/qgsbrowsertreeview.h @@ -17,6 +17,7 @@ #define QGSBROWSERTREEVIEW_H #include +#include "qgis.h" #include "qgis_gui.h" //class QgsBrowserModel; @@ -31,7 +32,7 @@ class GUI_EXPORT QgsBrowserTreeView : public QTreeView { Q_OBJECT public: - QgsBrowserTreeView( QWidget *parent = nullptr ); + QgsBrowserTreeView( QWidget *parent SIP_TRANSFERTHIS = 0 ); virtual void setModel( QAbstractItemModel *model ) override; virtual void showEvent( QShowEvent *e ) override; diff --git a/src/gui/qgscodeeditorcss.h b/src/gui/qgscodeeditorcss.h index cadfd74b99e..ecb1c543c53 100644 --- a/src/gui/qgscodeeditorcss.h +++ b/src/gui/qgscodeeditorcss.h @@ -17,6 +17,7 @@ #define QGSCODEEDITORCSS_H #include "qgscodeeditor.h" +#include "qgis.h" #include "qgis_gui.h" @@ -30,7 +31,7 @@ class GUI_EXPORT QgsCodeEditorCSS : public QgsCodeEditor Q_OBJECT public: - QgsCodeEditorCSS( QWidget *parent = nullptr ); + QgsCodeEditorCSS( QWidget *parent SIP_TRANSFERTHIS = 0 ); private: void setSciLexerCSS(); diff --git a/src/gui/qgscodeeditorhtml.h b/src/gui/qgscodeeditorhtml.h index 19d22f02ff5..680012cb928 100644 --- a/src/gui/qgscodeeditorhtml.h +++ b/src/gui/qgscodeeditorhtml.h @@ -17,6 +17,7 @@ #define QGSCODEEDITORHTML_H #include "qgscodeeditor.h" +#include "qgis.h" #include "qgis_gui.h" @@ -31,7 +32,7 @@ class GUI_EXPORT QgsCodeEditorHTML : public QgsCodeEditor Q_OBJECT public: - QgsCodeEditorHTML( QWidget *parent = nullptr ); + QgsCodeEditorHTML( QWidget *parent SIP_TRANSFERTHIS = 0 ); private: void setSciLexerHTML(); diff --git a/src/gui/qgscodeeditorpython.h b/src/gui/qgscodeeditorpython.h index 2b5ecc2aaa4..b611f770adb 100644 --- a/src/gui/qgscodeeditorpython.h +++ b/src/gui/qgscodeeditorpython.h @@ -17,6 +17,7 @@ #define QGSCODEEDITORPYTHON_H #include "qgscodeeditor.h" +#include "qgis.h" #include "qgis_gui.h" @@ -39,7 +40,7 @@ class GUI_EXPORT QgsCodeEditorPython : public QgsCodeEditor * \param filenames The list of apis files to load for the Python lexer * \since QGIS 2.6 */ - QgsCodeEditorPython( QWidget *parent = nullptr, const QList &filenames = QList() ); + QgsCodeEditorPython( QWidget *parent SIP_TRANSFERTHIS = 0, const QList &filenames = QList() ); /** Load APIs from one or more files * \param filenames The list of apis files to load for the Python lexer diff --git a/src/gui/qgscodeeditorsql.h b/src/gui/qgscodeeditorsql.h index a2ce3fbcf81..7b4992785c3 100644 --- a/src/gui/qgscodeeditorsql.h +++ b/src/gui/qgscodeeditorsql.h @@ -17,6 +17,7 @@ #define QGSCODEEDITORSQL_H #include "qgscodeeditor.h" +#include "qgis.h" #include "qgis_gui.h" @@ -31,7 +32,7 @@ class GUI_EXPORT QgsCodeEditorSQL : public QgsCodeEditor Q_OBJECT public: - QgsCodeEditorSQL( QWidget *parent = nullptr ); + QgsCodeEditorSQL( QWidget *parent SIP_TRANSFERTHIS = 0 ); private: //QgsCodeEditor *mSciWidget; diff --git a/src/gui/qgscomposeritemcombobox.h b/src/gui/qgscomposeritemcombobox.h index 89ffbd2df0e..f09344c0531 100644 --- a/src/gui/qgscomposeritemcombobox.h +++ b/src/gui/qgscomposeritemcombobox.h @@ -17,6 +17,7 @@ #define QGSCOMPOSERITEMCOMBOBOX_H #include +#include "qgis.h" #include "qgscomposeritem.h" #include "qgis_gui.h" @@ -42,7 +43,7 @@ class GUI_EXPORT QgsComposerItemComboBox : public QComboBox * \param composition composition to show items from. If not set, no items will be shown * until setComposition() is called */ - explicit QgsComposerItemComboBox( QWidget *parent = nullptr, QgsComposition *composition = nullptr ); + explicit QgsComposerItemComboBox( QWidget *parent SIP_TRANSFERTHIS = 0, QgsComposition *composition = nullptr ); /** Sets the composition containing the items to list in the combo box. */ diff --git a/src/gui/qgscomposerview.h b/src/gui/qgscomposerview.h index 36ca0acfe63..ce323646169 100644 --- a/src/gui/qgscomposerview.h +++ b/src/gui/qgscomposerview.h @@ -18,6 +18,7 @@ #define QGSCOMPOSERVIEW_H #include +#include "qgis.h" #include "qgsprevieweffect.h" // for QgsPreviewEffect::PreviewMode #include #include "qgis_gui.h" @@ -130,7 +131,7 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView /** Sets the composition for the view. If the composition is being set manually and not by a QgsComposer, then this must * be set BEFORE adding any items to the composition. */ - void setComposition( QgsComposition *c ); + void setComposition( QgsComposition *c SIP_KEEPREFERENCE ); //! Returns the composition or 0 in case of error QgsComposition *composition(); diff --git a/src/gui/qgscompoundcolorwidget.h b/src/gui/qgscompoundcolorwidget.h index f277a287f81..4e8f20cbcde 100644 --- a/src/gui/qgscompoundcolorwidget.h +++ b/src/gui/qgscompoundcolorwidget.h @@ -17,6 +17,7 @@ #define QGSCOMPOUNDCOLORWIDGET_H #include "qgisgui.h" +#include "qgis.h" #include "qgspanelwidget.h" #include "ui_qgscompoundcolorwidget.h" #include "qgis_gui.h" @@ -47,7 +48,7 @@ class GUI_EXPORT QgsCompoundColorWidget : public QgsPanelWidget, private Ui::Qgs * \param color initial color for dialog * \param layout widget layout to use */ - QgsCompoundColorWidget( QWidget *parent = nullptr, const QColor &color = QColor(), Layout layout = LayoutDefault ); + QgsCompoundColorWidget( QWidget *parent SIP_TRANSFERTHIS = 0, const QColor &color = QColor(), Layout layout = LayoutDefault ); ~QgsCompoundColorWidget(); diff --git a/src/gui/qgsconfigureshortcutsdialog.h b/src/gui/qgsconfigureshortcutsdialog.h index d1096c26a09..351c6bbd7c6 100644 --- a/src/gui/qgsconfigureshortcutsdialog.h +++ b/src/gui/qgsconfigureshortcutsdialog.h @@ -17,6 +17,7 @@ #define QGSCONFIGURESHORTCUTSDIALOG_H #include +#include "qgis.h" #include "ui_qgsconfigureshortcutsdialog.h" #include "qgis_gui.h" @@ -41,7 +42,7 @@ class GUI_EXPORT QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsCo * \param manager associated QgsShortcutsManager, or leave as null to use the default * singleton QgsShortcutsManager instance. */ - QgsConfigureShortcutsDialog( QWidget *parent = nullptr, QgsShortcutsManager *manager = nullptr ); + QgsConfigureShortcutsDialog( QWidget *parent SIP_TRANSFERTHIS = 0, QgsShortcutsManager *manager = nullptr ); ~QgsConfigureShortcutsDialog(); diff --git a/src/gui/qgscurveeditorwidget.h b/src/gui/qgscurveeditorwidget.h index 23022265717..40c00c60cba 100644 --- a/src/gui/qgscurveeditorwidget.h +++ b/src/gui/qgscurveeditorwidget.h @@ -17,6 +17,7 @@ #define QGSCURVEEDITORWIDGET_H #include +#include "qgis.h" #include #include #include @@ -141,7 +142,7 @@ class GUI_EXPORT QgsCurveEditorWidget : public QWidget /** * Constructor for QgsCurveEditorWidget. */ - QgsCurveEditorWidget( QWidget *parent = nullptr, const QgsCurveTransform &curve = QgsCurveTransform() ); + QgsCurveEditorWidget( QWidget *parent SIP_TRANSFERTHIS = 0, const QgsCurveTransform &curve = QgsCurveTransform() ); ~QgsCurveEditorWidget(); diff --git a/src/gui/qgsdetaileditemdelegate.h b/src/gui/qgsdetaileditemdelegate.h index a0ea8ecbd64..800ad3fd68b 100644 --- a/src/gui/qgsdetaileditemdelegate.h +++ b/src/gui/qgsdetaileditemdelegate.h @@ -18,6 +18,7 @@ #define QGSDETAILEDITEMDELEGATE_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -36,7 +37,7 @@ class GUI_EXPORT QgsDetailedItemDelegate : public QAbstractItemDelegate { Q_OBJECT public: - QgsDetailedItemDelegate( QObject *parent = nullptr ); + QgsDetailedItemDelegate( QObject *parent SIP_TRANSFERTHIS = 0 ); ~QgsDetailedItemDelegate(); //! Reimplement for parent class void paint( QPainter *painter, diff --git a/src/gui/qgsdetaileditemwidget.h b/src/gui/qgsdetaileditemwidget.h index 497cf254b60..3686c621a49 100644 --- a/src/gui/qgsdetaileditemwidget.h +++ b/src/gui/qgsdetaileditemwidget.h @@ -18,6 +18,7 @@ #define QGSDETAILEDITEMWIDGET_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -30,7 +31,7 @@ class GUI_EXPORT QgsDetailedItemWidget : { Q_OBJECT public: - QgsDetailedItemWidget( QWidget *parent = nullptr ); + QgsDetailedItemWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); void setData( const QgsDetailedItemData &data ); void setChecked( bool flag ); private: diff --git a/src/gui/qgsexpressionbuilderwidget.h b/src/gui/qgsexpressionbuilderwidget.h index 3b546aa25f0..610740f50a9 100644 --- a/src/gui/qgsexpressionbuilderwidget.h +++ b/src/gui/qgsexpressionbuilderwidget.h @@ -17,6 +17,7 @@ #define QGSEXPRESSIONBUILDER_H #include +#include "qgis.h" #include "ui_qgsexpressionbuilder.h" #include "qgsdistancearea.h" #include "qgsexpressioncontext.h" @@ -130,7 +131,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp /** * Create a new expression builder widget with an optional parent. */ - QgsExpressionBuilderWidget( QWidget *parent = nullptr ); + QgsExpressionBuilderWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsExpressionBuilderWidget(); /** Sets layer in order to get the fields and values diff --git a/src/gui/qgsexpressionlineedit.h b/src/gui/qgsexpressionlineedit.h index 9a03d20d276..30fcf741ab8 100644 --- a/src/gui/qgsexpressionlineedit.h +++ b/src/gui/qgsexpressionlineedit.h @@ -17,6 +17,7 @@ #define QGSEXPRESSIONLINEEDIT_H #include +#include "qgis.h" #include "qgsexpressioncontext.h" #include "qgsdistancearea.h" #include "qgis_gui.h" @@ -54,7 +55,7 @@ class GUI_EXPORT QgsExpressionLineEdit : public QWidget * Constructor for QgsExpressionLineEdit. * \param parent parent widget */ - explicit QgsExpressionLineEdit( QWidget *parent = nullptr ); + explicit QgsExpressionLineEdit( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Sets the title used in the expression builder dialog @@ -102,7 +103,7 @@ class GUI_EXPORT QgsExpressionLineEdit : public QWidget * Returns true if the current expression is valid. * \param expressionError will be set to any generated error message if specified */ - bool isValidExpression( QString *expressionError = nullptr ) const; + bool isValidExpression( QString *expressionError SIP_OUT = 0 ) const; /** * Register an expression context generator class that will be used to retrieve diff --git a/src/gui/qgsexpressionselectiondialog.h b/src/gui/qgsexpressionselectiondialog.h index ee3a8e6e328..62cf9575b74 100644 --- a/src/gui/qgsexpressionselectiondialog.h +++ b/src/gui/qgsexpressionselectiondialog.h @@ -17,6 +17,7 @@ #define QGSEXPRESSIONSELECTIONDIALOG_H #include "ui_qgsexpressionselectiondialogbase.h" +#include "qgis.h" #include "qgsmapcanvas.h" #include "qgsmessagebar.h" @@ -42,7 +43,7 @@ class GUI_EXPORT QgsExpressionSelectionDialog : public QDialog, private Ui::QgsE * \param startText A default expression text to be applied (Defaults to empty) * \param parent parent object (owner) */ - QgsExpressionSelectionDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent = nullptr ); + QgsExpressionSelectionDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * The builder widget that is used by the dialog diff --git a/src/gui/qgsextentgroupbox.h b/src/gui/qgsextentgroupbox.h index 4a338745401..06cfe08df34 100644 --- a/src/gui/qgsextentgroupbox.h +++ b/src/gui/qgsextentgroupbox.h @@ -16,6 +16,7 @@ #define QGSEXTENTGROUPBOX_H #include "qgscollapsiblegroupbox.h" +#include "qgis.h" #include "ui_qgsextentgroupboxwidget.h" @@ -41,7 +42,7 @@ class GUI_EXPORT QgsExtentGroupBox : public QgsCollapsibleGroupBox, private Ui:: Q_PROPERTY( QString titleBase READ titleBase WRITE setTitleBase ) public: - explicit QgsExtentGroupBox( QWidget *parent = nullptr ); + explicit QgsExtentGroupBox( QWidget *parent SIP_TRANSFERTHIS = 0 ); enum ExtentState { diff --git a/src/gui/qgsfeatureselectiondlg.h b/src/gui/qgsfeatureselectiondlg.h index 22f02e1872d..46ff89d32ae 100644 --- a/src/gui/qgsfeatureselectiondlg.h +++ b/src/gui/qgsfeatureselectiondlg.h @@ -19,6 +19,7 @@ class QgsGenericFeatureSelectionManager; #include "ui_qgsfeatureselectiondlg.h" +#include "qgis.h" #include "qgis_gui.h" /** \ingroup gui @@ -29,7 +30,7 @@ class GUI_EXPORT QgsFeatureSelectionDlg : public QDialog, private Ui::QgsFeature Q_OBJECT public: - explicit QgsFeatureSelectionDlg( QgsVectorLayer *vl, QgsAttributeEditorContext &context, QWidget *parent = nullptr ); + explicit QgsFeatureSelectionDlg( QgsVectorLayer *vl, QgsAttributeEditorContext &context, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Get the selected features diff --git a/src/gui/qgsfieldvalueslineedit.h b/src/gui/qgsfieldvalueslineedit.h index a6ffd09393d..3afbd6e2458 100644 --- a/src/gui/qgsfieldvalueslineedit.h +++ b/src/gui/qgsfieldvalueslineedit.h @@ -16,6 +16,7 @@ #define QGSFIELDVALUESLINEEDIT_H #include "qgsfilterlineedit.h" +#include "qgis.h" #include "qgsfeedback.h" #include "qgsvectorlayer.h" #include @@ -127,7 +128,7 @@ class GUI_EXPORT QgsFieldValuesLineEdit: public QgsFilterLineEdit /** Constructor for QgsFieldValuesLineEdit * \param parent parent widget */ - QgsFieldValuesLineEdit( QWidget *parent = nullptr ); + QgsFieldValuesLineEdit( QWidget *parent SIP_TRANSFERTHIS = 0 ); virtual ~QgsFieldValuesLineEdit(); diff --git a/src/gui/qgsfiledropedit.h b/src/gui/qgsfiledropedit.h index d6f6ea02d52..4dde2bcb915 100644 --- a/src/gui/qgsfiledropedit.h +++ b/src/gui/qgsfiledropedit.h @@ -16,6 +16,7 @@ #define QGSFILEDROPEDIT_H #include +#include "qgis.h" #include "qgis_gui.h" /** \ingroup gui @@ -30,7 +31,7 @@ class GUI_EXPORT QgsFileDropEdit: public QLineEdit Q_OBJECT public: - QgsFileDropEdit( QWidget *parent = nullptr ); + QgsFileDropEdit( QWidget *parent SIP_TRANSFERTHIS = 0 ); bool isDirOnly() const { return mDirOnly; } diff --git a/src/gui/qgsfilterlineedit.h b/src/gui/qgsfilterlineedit.h index 4fd17722c4f..9ab80645f00 100644 --- a/src/gui/qgsfilterlineedit.h +++ b/src/gui/qgsfilterlineedit.h @@ -19,6 +19,7 @@ #define QGSFILTERLINEEDIT_H #include +#include "qgis.h" #include "qgis_gui.h" class QToolButton; @@ -56,7 +57,7 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit * \param parent parent widget * \param nullValue string for representing null values */ - QgsFilterLineEdit( QWidget *parent = nullptr, const QString &nullValue = QString::null ); + QgsFilterLineEdit( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &nullValue = QString::null ); /** Returns true if the widget's clear button is visible. * \see setShowClearButton() diff --git a/src/gui/qgsfloatingwidget.h b/src/gui/qgsfloatingwidget.h index 610295999ad..3e3a56d27a1 100644 --- a/src/gui/qgsfloatingwidget.h +++ b/src/gui/qgsfloatingwidget.h @@ -16,6 +16,7 @@ #define QGSFLOATINGWIDGET_H #include +#include "qgis.h" #include "qgis_gui.h" class QgsFloatingWidgetEventFilter; @@ -55,7 +56,7 @@ class GUI_EXPORT QgsFloatingWidget: public QWidget /** Constructor for QgsFloatingWidget. * \param parent parent widget */ - QgsFloatingWidget( QWidget *parent = nullptr ); + QgsFloatingWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the widget to "anchor" the floating widget to. The floating widget will be repositioned whenever the * anchor widget moves or is resized so that it maintains the same relative position to the anchor widget. diff --git a/src/gui/qgsfocuswatcher.h b/src/gui/qgsfocuswatcher.h index 55e9341da31..dcd21972d3e 100644 --- a/src/gui/qgsfocuswatcher.h +++ b/src/gui/qgsfocuswatcher.h @@ -17,6 +17,7 @@ #define QGSFOCUSWATCHER_H #include +#include "qgis.h" #include "qgis_gui.h" /** \ingroup gui @@ -38,7 +39,7 @@ class GUI_EXPORT QgsFocusWatcher : public QObject * \param parent parent widget to catch focus events for. This class will automatically be * installed as an event filter for parent. */ - explicit QgsFocusWatcher( QObject *parent ); + explicit QgsFocusWatcher( QObject *parent SIP_TRANSFERTHIS ); virtual bool eventFilter( QObject *obj, QEvent *event ) override; diff --git a/src/gui/qgsformannotation.h b/src/gui/qgsformannotation.h index 88cf23de6fc..e2242a62ddf 100644 --- a/src/gui/qgsformannotation.h +++ b/src/gui/qgsformannotation.h @@ -19,6 +19,7 @@ #define QGSFORMANNOTATION_H #include "qgsannotation.h" +#include "qgis.h" #include "qgsfeature.h" #include #include "qgis_gui.h" @@ -37,7 +38,7 @@ class GUI_EXPORT QgsFormAnnotation: public QgsAnnotation /** * Constructor for QgsFormAnnotation. */ - QgsFormAnnotation( QObject *parent = nullptr ); + QgsFormAnnotation( QObject *parent SIP_TRANSFERTHIS = 0 ); QgsFormAnnotation *clone() const override SIP_FACTORY; diff --git a/src/gui/qgsgeometryrubberband.h b/src/gui/qgsgeometryrubberband.h index f9e33fa6138..38252242c2b 100644 --- a/src/gui/qgsgeometryrubberband.h +++ b/src/gui/qgsgeometryrubberband.h @@ -19,6 +19,7 @@ #define QGSGEOMETRYRUBBERBAND_H #include "qgsmapcanvasitem.h" +#include "qgis.h" #include #include #include "qgis_gui.h" @@ -71,7 +72,7 @@ class GUI_EXPORT QgsGeometryRubberBand: public QgsMapCanvasItem ~QgsGeometryRubberBand(); //! Sets geometry (takes ownership). Geometry is expected to be in map coordinates - void setGeometry( QgsAbstractGeometry *geom ); + void setGeometry( QgsAbstractGeometry *geom SIP_TRANSFER ); //! Returns a pointer to the geometry const QgsAbstractGeometry *geometry() { return mGeometry; } //! Moves vertex to new position (in map coordinates) diff --git a/src/gui/qgsgradientcolorrampdialog.h b/src/gui/qgsgradientcolorrampdialog.h index 5a0c1a1ae55..3919dd8e117 100644 --- a/src/gui/qgsgradientcolorrampdialog.h +++ b/src/gui/qgsgradientcolorrampdialog.h @@ -17,6 +17,7 @@ #define QGSGRADIENTCOLORRAMPDIALOG_H #include +#include "qgis.h" #include "ui_qgsgradientcolorrampdialogbase.h" #include "qgis_gui.h" @@ -43,7 +44,7 @@ class GUI_EXPORT QgsGradientColorRampDialog : public QDialog, private Ui::QgsGra * \param ramp initial ramp to show in dialog * \param parent parent widget */ - QgsGradientColorRampDialog( const QgsGradientColorRamp &ramp, QWidget *parent = nullptr ); + QgsGradientColorRampDialog( const QgsGradientColorRamp &ramp, QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsGradientColorRampDialog(); /** Returns a color ramp representing the current settings from the dialog. diff --git a/src/gui/qgsgradientstopeditor.h b/src/gui/qgsgradientstopeditor.h index 8761b96cbae..f275e049103 100644 --- a/src/gui/qgsgradientstopeditor.h +++ b/src/gui/qgsgradientstopeditor.h @@ -17,6 +17,7 @@ #define QGSGRADIENTSTOPEDITOR_H #include "qgscolorramp.h" +#include "qgis.h" #include #include "qgis_gui.h" @@ -38,7 +39,7 @@ class GUI_EXPORT QgsGradientStopEditor : public QWidget * \param parent parent widget * \param ramp optional initial gradient ramp */ - QgsGradientStopEditor( QWidget *parent = nullptr, QgsGradientColorRamp *ramp = nullptr ); + QgsGradientStopEditor( QWidget *parent SIP_TRANSFERTHIS = 0, QgsGradientColorRamp *ramp = nullptr ); /** Sets the current ramp shown in the editor. * \param ramp color ramp diff --git a/src/gui/qgshistogramwidget.h b/src/gui/qgshistogramwidget.h index af70db2c9f2..f14eaeda214 100644 --- a/src/gui/qgshistogramwidget.h +++ b/src/gui/qgshistogramwidget.h @@ -18,6 +18,7 @@ #define QGSHISTOGRAMWIDGET_H #include "ui_qgshistogramwidgetbase.h" +#include "qgis.h" #include "qgshistogram.h" #include "qgsstatisticalsummary.h" @@ -56,7 +57,7 @@ class GUI_EXPORT QgsHistogramWidget : public QWidget, private Ui::QgsHistogramWi * \param layer source vector layer * \param fieldOrExp field name or expression string */ - QgsHistogramWidget( QWidget *parent = nullptr, QgsVectorLayer *layer = nullptr, const QString &fieldOrExp = QString() ); + QgsHistogramWidget( QWidget *parent SIP_TRANSFERTHIS = 0, QgsVectorLayer *layer = nullptr, const QString &fieldOrExp = QString() ); ~QgsHistogramWidget(); diff --git a/src/gui/qgskeyvaluewidget.h b/src/gui/qgskeyvaluewidget.h index 881f4a3693a..664e3d2df59 100644 --- a/src/gui/qgskeyvaluewidget.h +++ b/src/gui/qgskeyvaluewidget.h @@ -17,6 +17,7 @@ #define QGSKEYVALUEWIDGET_H #include "qgstablewidgetbase.h" +#include "qgis.h" #include #include #include "qgis_gui.h" @@ -67,7 +68,7 @@ class GUI_EXPORT QgsKeyValueWidget: public QgsTableWidgetBase /** * Constructor. */ - explicit QgsKeyValueWidget( QWidget *parent = nullptr ); + explicit QgsKeyValueWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Set the initial value of the widget. diff --git a/src/gui/qgslimitedrandomcolorrampdialog.h b/src/gui/qgslimitedrandomcolorrampdialog.h index aabde4667ba..c687a31537c 100644 --- a/src/gui/qgslimitedrandomcolorrampdialog.h +++ b/src/gui/qgslimitedrandomcolorrampdialog.h @@ -17,6 +17,7 @@ #define QGsLIMITEDRANDOMCOLORRAMPDIALOG_H #include +#include "qgis.h" #include "qgspanelwidget.h" #include "qgscolorramp.h" #include "ui_qgslimitedrandomcolorrampwidgetbase.h" @@ -38,7 +39,7 @@ class GUI_EXPORT QgsLimitedRandomColorRampWidget : public QgsPanelWidget, privat * \param ramp initial ramp to show in dialog * \param parent parent widget */ - QgsLimitedRandomColorRampWidget( const QgsLimitedRandomColorRamp &ramp, QWidget *parent = nullptr ); + QgsLimitedRandomColorRampWidget( const QgsLimitedRandomColorRamp &ramp, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a color ramp representing the current settings from the dialog. * \see setRamp() @@ -98,7 +99,7 @@ class GUI_EXPORT QgsLimitedRandomColorRampDialog : public QDialog * \param ramp initial ramp to show in dialog * \param parent parent widget */ - QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp &ramp, QWidget *parent = nullptr ); + QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp &ramp, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a color ramp representing the current settings from the dialog. * \see setRamp() diff --git a/src/gui/qgsmapcanvas.h b/src/gui/qgsmapcanvas.h index 1201c2f08a9..0f6e22458e6 100644 --- a/src/gui/qgsmapcanvas.h +++ b/src/gui/qgsmapcanvas.h @@ -77,7 +77,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView public: //! Constructor - QgsMapCanvas( QWidget *parent = nullptr ); + QgsMapCanvas( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsMapCanvas(); @@ -102,7 +102,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView //! Get access to properties used for map rendering //! \since QGIS 2.4 - const QgsMapSettings &mapSettings() const; + const QgsMapSettings &mapSettings() const SIP_KEEPREFERENCE; //! sets destination coordinate reference system //! \since QGIS 2.4 diff --git a/src/gui/qgsmapcanvasitem.h b/src/gui/qgsmapcanvasitem.h index 82093b2eac3..9a956c7de0e 100644 --- a/src/gui/qgsmapcanvasitem.h +++ b/src/gui/qgsmapcanvasitem.h @@ -17,6 +17,7 @@ #define QGSMAPCANVASITEM_H #include +#include "qgis.h" #include "qgsrectangle.h" #include "qgis_gui.h" @@ -33,7 +34,7 @@ class GUI_EXPORT QgsMapCanvasItem : public QGraphicsItem protected: //! protected constructor: cannot be constructed directly - QgsMapCanvasItem( QgsMapCanvas *mapCanvas ); + QgsMapCanvasItem( QgsMapCanvas *mapCanvas SIP_TRANSFERTHIS ); virtual ~QgsMapCanvasItem(); diff --git a/src/gui/qgsmaplayeractionregistry.h b/src/gui/qgsmaplayeractionregistry.h index 2873e9587fa..5f8cace3b7f 100644 --- a/src/gui/qgsmaplayeractionregistry.h +++ b/src/gui/qgsmaplayeractionregistry.h @@ -17,6 +17,7 @@ #define QGSMAPLAYERACTIONREGISTRY_H #include +#include "qgis.h" #include #include #include @@ -46,13 +47,13 @@ class GUI_EXPORT QgsMapLayerAction : public QAction //! Creates a map layer action which can run on any layer //! \note using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatibility reasons. - QgsMapLayerAction( const QString &name, QObject *parent, Targets targets = AllActions, const QIcon &icon = QIcon() ); + QgsMapLayerAction( const QString &name, QObject *parent SIP_TRANSFERTHIS, Targets targets = AllActions, const QIcon &icon = QIcon() ); //! Creates a map layer action which can run only on a specific layer - QgsMapLayerAction( const QString &name, QObject *parent, QgsMapLayer *layer, Targets targets = AllActions, const QIcon &icon = QIcon() ); + QgsMapLayerAction( const QString &name, QObject *parent SIP_TRANSFERTHIS, QgsMapLayer *layer, Targets targets = AllActions, const QIcon &icon = QIcon() ); //! Creates a map layer action which can run on a specific type of layer - QgsMapLayerAction( const QString &name, QObject *parent, QgsMapLayer::LayerType layerType, Targets targets = AllActions, const QIcon &icon = QIcon() ); + QgsMapLayerAction( const QString &name, QObject *parent SIP_TRANSFERTHIS, QgsMapLayer::LayerType layerType, Targets targets = AllActions, const QIcon &icon = QIcon() ); ~QgsMapLayerAction(); diff --git a/src/gui/qgsmaptool.h b/src/gui/qgsmaptool.h index eeba1c6f076..a34adde40c9 100644 --- a/src/gui/qgsmaptool.h +++ b/src/gui/qgsmaptool.h @@ -17,6 +17,7 @@ #define QGSMAPTOOL_H #include "qgsconfig.h" +#include "qgis.h" #include "qgsmessagebar.h" #include "qgspointv2.h" #include "qgsmapmouseevent.h" @@ -164,7 +165,7 @@ class GUI_EXPORT QgsMapTool : public QObject protected: //! constructor takes map canvas as a parameter - QgsMapTool( QgsMapCanvas *canvas ); + QgsMapTool( QgsMapCanvas *canvas SIP_TRANSFERTHIS ); //! transformation from screen coordinates to map coordinates QgsPoint toMapCoordinates( QPoint point ); @@ -180,7 +181,7 @@ class GUI_EXPORT QgsMapTool : public QObject //!transformation from layer's coordinates to map coordinates (which is different in case reprojection is used) //! \note available in Python bindings as toMapCoordinatesV2 - QgsPointV2 toMapCoordinates( const QgsMapLayer *layer, const QgsPointV2 &point ); + QgsPointV2 toMapCoordinates( const QgsMapLayer *layer, const QgsPointV2 &point ) SIP_PYNAME( toMapCoordinatesV2 ); //! trnasformation of the rect from map coordinates to layer's coordinates QgsRectangle toLayerCoordinates( const QgsMapLayer *layer, const QgsRectangle &rect ); diff --git a/src/gui/qgsmaptooledit.h b/src/gui/qgsmaptooledit.h index 72204d536e1..0ad0e40bd0a 100644 --- a/src/gui/qgsmaptooledit.h +++ b/src/gui/qgsmaptooledit.h @@ -58,9 +58,9 @@ class GUI_EXPORT QgsMapToolEdit: public QgsMapTool * \param geometryType * \param alternativeBand if true, rubber band will be set with more transparency and a dash pattern. defaut is false. */ - QgsRubberBand *createRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ); + QgsRubberBand *createRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) SIP_FACTORY; - QgsGeometryRubberBand *createGeometryRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) const; + QgsGeometryRubberBand *createGeometryRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) const SIP_FACTORY; //! Returns the current vector layer of the map canvas or 0 QgsVectorLayer *currentVectorLayer(); diff --git a/src/gui/qgsmessagebar.h b/src/gui/qgsmessagebar.h index cd0a51a1bad..c9b11f461d4 100644 --- a/src/gui/qgsmessagebar.h +++ b/src/gui/qgsmessagebar.h @@ -18,6 +18,7 @@ #define QGSMESSAGEBAR_H #include +#include "qgis.h" #include #include @@ -53,7 +54,7 @@ class GUI_EXPORT QgsMessageBar: public QFrame SUCCESS = 3 }; - QgsMessageBar( QWidget *parent = nullptr ); + QgsMessageBar( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Display a message item on the bar after hiding the currently visible one @@ -70,7 +71,7 @@ class GUI_EXPORT QgsMessageBar: public QFrame * \param level is QgsMessageBar::INFO, WARNING, CRITICAL or SUCCESS * \param duration timeout duration of message in seconds, 0 value indicates no timeout */ - QgsMessageBarItem *pushWidget( QWidget *widget, MessageLevel level = INFO, int duration = 0 ); + QgsMessageBarItem *pushWidget( QWidget *widget SIP_TRANSFER, MessageLevel level = INFO, int duration = 0 ); /** Remove the passed widget from the bar (if previously added), * then display the next one in the stack if any or hide the bar @@ -80,11 +81,11 @@ class GUI_EXPORT QgsMessageBar: public QFrame bool popWidget( QgsMessageBarItem *item ); //! make out a widget containing a message to be displayed on the bar - static QgsMessageBarItem *createMessage( const QString &text, QWidget *parent = nullptr ); + static QgsMessageBarItem *createMessage( const QString &text, QWidget *parent = nullptr ) SIP_FACTORY; //! make out a widget containing title and message to be displayed on the bar - static QgsMessageBarItem *createMessage( const QString &title, const QString &text, QWidget *parent = nullptr ); + static QgsMessageBarItem *createMessage( const QString &title, const QString &text, QWidget *parent = nullptr ) SIP_FACTORY; //! make out a widget containing title and message to be displayed on the bar - static QgsMessageBarItem *createMessage( QWidget *widget, QWidget *parent = nullptr ); + static QgsMessageBarItem *createMessage( QWidget *widget, QWidget *parent = nullptr ) SIP_FACTORY; //! convenience method for pushing a message to the bar void pushMessage( const QString &text, MessageLevel level = INFO, int duration = 5 ) { return pushMessage( QString::null, text, level, duration ); } diff --git a/src/gui/qgsmessagebaritem.h b/src/gui/qgsmessagebaritem.h index 15eed0fb74e..f5b05c65579 100644 --- a/src/gui/qgsmessagebaritem.h +++ b/src/gui/qgsmessagebaritem.h @@ -18,6 +18,7 @@ #define qgsmessagebaritem_H #include +#include "qgis.h" #include #include @@ -34,16 +35,16 @@ class GUI_EXPORT QgsMessageBarItem : public QWidget Q_OBJECT public: //! make out a widget containing a message to be displayed on the bar - QgsMessageBarItem( const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = nullptr ); + QgsMessageBarItem( const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent SIP_TRANSFERTHIS = 0 ); //! make out a widget containing title and message to be displayed on the bar - QgsMessageBarItem( const QString &title, const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = nullptr ); + QgsMessageBarItem( const QString &title, const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent SIP_TRANSFERTHIS = 0 ); //! make out a widget containing title, message and widget to be displayed on the bar - QgsMessageBarItem( const QString &title, const QString &text, QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = nullptr ); + QgsMessageBarItem( const QString &title, const QString &text, QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent SIP_TRANSFERTHIS = 0 ); //! make out a widget containing a widget to be displayed on the bar - QgsMessageBarItem( QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = nullptr ); + QgsMessageBarItem( QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent SIP_TRANSFERTHIS = 0 ); QgsMessageBarItem *setText( const QString &text ); diff --git a/src/gui/qgsorderbydialog.h b/src/gui/qgsorderbydialog.h index 51e510bb873..e5b11b81b94 100644 --- a/src/gui/qgsorderbydialog.h +++ b/src/gui/qgsorderbydialog.h @@ -18,6 +18,7 @@ #define QGSORDERBYDIALOG_H #include +#include "qgis.h" #include "ui_qgsorderbydialogbase.h" #include "qgsfeaturerequest.h" @@ -43,7 +44,7 @@ class GUI_EXPORT QgsOrderByDialog : public QDialog, private Ui::OrderByDialogBas * \param layer The vector layer for which the order by should be produced * \param parent The parent widget, optional */ - QgsOrderByDialog( QgsVectorLayer *layer, QWidget *parent = nullptr ); + QgsOrderByDialog( QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Set the order by to manage diff --git a/src/gui/qgsowssourceselect.h b/src/gui/qgsowssourceselect.h index 0c2818e4dc1..ed1f933160c 100644 --- a/src/gui/qgsowssourceselect.h +++ b/src/gui/qgsowssourceselect.h @@ -20,6 +20,7 @@ #ifndef QGSOWSSOURCESELECT_H #define QGSOWSSOURCESELECT_H #include "ui_qgsowssourceselectbase.h" +#include "qgis.h" #include "qgsdatasourceuri.h" #include "qgisgui.h" #include "qgscontexthelp.h" @@ -187,7 +188,7 @@ class GUI_EXPORT QgsOWSSourceSelect : public QDialog, public Ui::QgsOWSSourceSel QMap &items, int &layerAndStyleCount, const QMap &layerParents, - const QMap &layerParentNames ); + const QMap &layerParentNames ) SIP_FACTORY; //! Returns a textual description for the authority id QString descriptionForAuthId( const QString &authId ); diff --git a/src/gui/qgspixmaplabel.h b/src/gui/qgspixmaplabel.h index 260866c79b4..a6c3e96bc2a 100644 --- a/src/gui/qgspixmaplabel.h +++ b/src/gui/qgspixmaplabel.h @@ -17,6 +17,7 @@ #define QGSPIXMAPLABEL_H #include +#include "qgis.h" #include "qgis_gui.h" /** \ingroup gui @@ -28,7 +29,7 @@ class GUI_EXPORT QgsPixmapLabel : public QLabel Q_OBJECT public: - explicit QgsPixmapLabel( QWidget *parent = nullptr ); + explicit QgsPixmapLabel( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Calculates the height for the given width. diff --git a/src/gui/qgspresetcolorrampdialog.h b/src/gui/qgspresetcolorrampdialog.h index b6f7407b999..12f7dc985e2 100644 --- a/src/gui/qgspresetcolorrampdialog.h +++ b/src/gui/qgspresetcolorrampdialog.h @@ -17,6 +17,7 @@ #define QGSPRESETCOLORRAMPDIALOG_H #include +#include "qgis.h" #include "qgspanelwidget.h" #include "qgscolorramp.h" #include "ui_qgspresetcolorrampwidgetbase.h" @@ -38,7 +39,7 @@ class GUI_EXPORT QgsPresetColorRampWidget : public QgsPanelWidget, private Ui::Q * \param ramp initial ramp to show in dialog * \param parent parent widget */ - QgsPresetColorRampWidget( const QgsPresetSchemeColorRamp &ramp, QWidget *parent = nullptr ); + QgsPresetColorRampWidget( const QgsPresetSchemeColorRamp &ramp, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a color ramp representing the current settings from the dialog. * \see setRamp() @@ -86,7 +87,7 @@ class GUI_EXPORT QgsPresetColorRampDialog : public QDialog * \param ramp initial ramp to show in dialog * \param parent parent widget */ - QgsPresetColorRampDialog( const QgsPresetSchemeColorRamp &ramp, QWidget *parent = nullptr ); + QgsPresetColorRampDialog( const QgsPresetSchemeColorRamp &ramp, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a color ramp representing the current settings from the dialog. * \see setRamp() diff --git a/src/gui/qgsprevieweffect.h b/src/gui/qgsprevieweffect.h index c3940f60a4f..99749f10e51 100644 --- a/src/gui/qgsprevieweffect.h +++ b/src/gui/qgsprevieweffect.h @@ -19,6 +19,7 @@ #define QGSPREVIEWEFFECT_H #include +#include "qgis.h" #include "qgis_gui.h" /** \ingroup gui @@ -39,7 +40,7 @@ class GUI_EXPORT QgsPreviewEffect: public QGraphicsEffect PreviewDeuteranope }; - QgsPreviewEffect( QObject *parent ); + QgsPreviewEffect( QObject *parent SIP_TRANSFERTHIS ); /** Sets the mode for the preview effect, which controls how the effect modifies a widgets appearance. * \param mode PreviewMode to use to draw the widget diff --git a/src/gui/qgsprojectionselectiondialog.h b/src/gui/qgsprojectionselectiondialog.h index e8a76cfb585..0ee1ea4e48f 100644 --- a/src/gui/qgsprojectionselectiondialog.h +++ b/src/gui/qgsprojectionselectiondialog.h @@ -18,6 +18,7 @@ #ifndef QGSGENERICPROJECTIONSELECTOR_H #define QGSGENERICPROJECTIONSELECTOR_H #include +#include "qgis.h" #include #include @@ -56,7 +57,7 @@ class GUI_EXPORT QgsProjectionSelectionDialog : public QDialog, private Ui::QgsG /** * Constructor for QgsProjectionSelectionDialog. */ - QgsProjectionSelectionDialog( QWidget *parent = nullptr, + QgsProjectionSelectionDialog( QWidget *parent SIP_TRANSFERTHIS = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); diff --git a/src/gui/qgsprojectionselectiontreewidget.h b/src/gui/qgsprojectionselectiontreewidget.h index 69de99f1558..019a1a4fb04 100644 --- a/src/gui/qgsprojectionselectiontreewidget.h +++ b/src/gui/qgsprojectionselectiontreewidget.h @@ -45,7 +45,7 @@ class GUI_EXPORT QgsProjectionSelectionTreeWidget : public QWidget, private Ui:: /** * Constructor for QgsProjectionSelectionTreeWidget. */ - QgsProjectionSelectionTreeWidget( QWidget *parent = nullptr ); + QgsProjectionSelectionTreeWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsProjectionSelectionTreeWidget(); diff --git a/src/gui/qgsprojectionselectionwidget.h b/src/gui/qgsprojectionselectionwidget.h index 93fb1934bfd..9c4c8e731af 100644 --- a/src/gui/qgsprojectionselectionwidget.h +++ b/src/gui/qgsprojectionselectionwidget.h @@ -18,6 +18,7 @@ #define QGSPROJECTIONSELECTIONWIDGET_H #include +#include "qgis.h" #include #include #include @@ -50,7 +51,7 @@ class GUI_EXPORT QgsProjectionSelectionWidget : public QWidget CrsNotSet, //!< Not set (hidden by default) }; - explicit QgsProjectionSelectionWidget( QWidget *parent = nullptr ); + explicit QgsProjectionSelectionWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a pointer to the projection selector dialog used by the widget. * Can be used to modify how the projection selector dialog behaves. diff --git a/src/gui/qgsquerybuilder.h b/src/gui/qgsquerybuilder.h index 3e03290eadd..e2fe22c12c4 100644 --- a/src/gui/qgsquerybuilder.h +++ b/src/gui/qgsquerybuilder.h @@ -15,6 +15,7 @@ #ifndef QGSQUERYBUILDER_H #define QGSQUERYBUILDER_H #include +#include "qgis.h" #include #include #include @@ -48,7 +49,7 @@ class GUI_EXPORT QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBa * \param parent Parent widget * \param fl dialog flags */ - QgsQueryBuilder( QgsVectorLayer *layer, QWidget *parent = nullptr, + QgsQueryBuilder( QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); ~QgsQueryBuilder(); diff --git a/src/gui/qgsrasterpyramidsoptionswidget.h b/src/gui/qgsrasterpyramidsoptionswidget.h index 992d3286726..afd806135fc 100644 --- a/src/gui/qgsrasterpyramidsoptionswidget.h +++ b/src/gui/qgsrasterpyramidsoptionswidget.h @@ -19,6 +19,7 @@ #define QGSRASTERPYRAMIDSOPTIONSWIDGET_H #include "ui_qgsrasterpyramidsoptionswidgetbase.h" +#include "qgis.h" #include "qgis_gui.h" class QCheckBox; @@ -33,7 +34,7 @@ class GUI_EXPORT QgsRasterPyramidsOptionsWidget: public QWidget, public: - QgsRasterPyramidsOptionsWidget( QWidget *parent = nullptr, const QString &provider = "gdal" ); + QgsRasterPyramidsOptionsWidget( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &provider = "gdal" ); QStringList configOptions() const { return mSaveOptionsWidget->options(); } QgsRasterFormatSaveOptionsWidget *createOptionsWidget() { return mSaveOptionsWidget; } diff --git a/src/gui/qgsrubberband.h b/src/gui/qgsrubberband.h index 9bed073276b..03fb4f78325 100644 --- a/src/gui/qgsrubberband.h +++ b/src/gui/qgsrubberband.h @@ -16,6 +16,7 @@ #define QGSRUBBERBAND_H #include "qgsmapcanvasitem.h" +#include "qgis.h" #include "qgsgeometry.h" #include #include @@ -88,7 +89,7 @@ class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem * \param mapCanvas The map canvas to draw onto. It's CRS will be used map points onto screen coordinates. * \param geometryType Defines how the data should be drawn onto the screen. (Use Qgis::Line, Qgis::Polygon or Qgis::Point) */ - QgsRubberBand( QgsMapCanvas *mapCanvas, QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry ); + QgsRubberBand( QgsMapCanvas *mapCanvas SIP_TRANSFERTHIS, QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry ); /** * Sets the color for the rubberband diff --git a/src/gui/qgsscalerangewidget.h b/src/gui/qgsscalerangewidget.h index 9b278bc4b41..63dc42dce6a 100644 --- a/src/gui/qgsscalerangewidget.h +++ b/src/gui/qgsscalerangewidget.h @@ -17,6 +17,7 @@ #define QGSSCALERANGEWIDGET_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -31,7 +32,7 @@ class GUI_EXPORT QgsScaleRangeWidget : public QWidget Q_OBJECT public: - explicit QgsScaleRangeWidget( QWidget *parent = nullptr ); + explicit QgsScaleRangeWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); //! set the map canvas which will be used for the current scale buttons diff --git a/src/gui/qgsscalevisibilitydialog.h b/src/gui/qgsscalevisibilitydialog.h index f1d0c5799c8..ab2fb3c25ae 100644 --- a/src/gui/qgsscalevisibilitydialog.h +++ b/src/gui/qgsscalevisibilitydialog.h @@ -17,6 +17,7 @@ #define QGSSCALEVISIBILITYDIALOG_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -31,7 +32,7 @@ class GUI_EXPORT QgsScaleVisibilityDialog : public QDialog Q_OBJECT public: - explicit QgsScaleVisibilityDialog( QWidget *parent = nullptr, const QString &title = QString(), QgsMapCanvas *mapCanvas = nullptr ); + explicit QgsScaleVisibilityDialog( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &title = QString(), QgsMapCanvas *mapCanvas = nullptr ); //! return if scale visibilty is enabled bool hasScaleVisibility(); diff --git a/src/gui/qgsscrollarea.h b/src/gui/qgsscrollarea.h index adb7d3bf287..d3d8777b949 100644 --- a/src/gui/qgsscrollarea.h +++ b/src/gui/qgsscrollarea.h @@ -17,6 +17,7 @@ #define QGSSCROLLAREA_H #include +#include "qgis.h" #include "qgis_gui.h" #include class ScrollAreaFilter; @@ -46,7 +47,7 @@ class GUI_EXPORT QgsScrollArea : public QScrollArea /** * Constructor for QgsScrollArea. */ - explicit QgsScrollArea( QWidget *parent = nullptr ); + explicit QgsScrollArea( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Should be called when a scroll occurs on with the diff --git a/src/gui/qgsslider.h b/src/gui/qgsslider.h index cb00652f621..2c10916e3fb 100644 --- a/src/gui/qgsslider.h +++ b/src/gui/qgsslider.h @@ -16,6 +16,7 @@ ***************************************************************************/ #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -28,8 +29,8 @@ class GUI_EXPORT QgsSlider : public QSlider { Q_OBJECT public: - QgsSlider( QWidget *parent = nullptr ); - QgsSlider( Qt::Orientation orientation, QWidget *parent = nullptr ); + QgsSlider( QWidget *parent SIP_TRANSFERTHIS = 0 ); + QgsSlider( Qt::Orientation orientation, QWidget *parent SIP_TRANSFERTHIS = 0 ); void setMinimum( const QVariant &min ); void setMaximum( const QVariant &max ); diff --git a/src/gui/qgssubstitutionlistwidget.h b/src/gui/qgssubstitutionlistwidget.h index bdbffacf2b8..54a37d5e681 100644 --- a/src/gui/qgssubstitutionlistwidget.h +++ b/src/gui/qgssubstitutionlistwidget.h @@ -19,6 +19,7 @@ #define QGSSUBSTITUTIONLISTWIDGET_H #include +#include "qgis.h" #include "qgspanelwidget.h" #include "ui_qgssubstitutionlistwidgetbase.h" #include "qgsstringutils.h" @@ -41,7 +42,7 @@ class GUI_EXPORT QgsSubstitutionListWidget : public QgsPanelWidget, private Ui:: /** Constructor for QgsSubstitutionListWidget. * \param parent parent widget */ - QgsSubstitutionListWidget( QWidget *parent = nullptr ); + QgsSubstitutionListWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the list of substitutions to show in the widget. * \param substitutions substitution list @@ -90,7 +91,7 @@ class GUI_EXPORT QgsSubstitutionListDialog : public QDialog /** Constructor for QgsSubstitutionListDialog. * \param parent parent widget */ - QgsSubstitutionListDialog( QWidget *parent = nullptr ); + QgsSubstitutionListDialog( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the list of substitutions to show in the dialog. * \param substitutions substitution list diff --git a/src/gui/qgstaskmanagerwidget.h b/src/gui/qgstaskmanagerwidget.h index a6cae9659af..345bcc4f8fc 100644 --- a/src/gui/qgstaskmanagerwidget.h +++ b/src/gui/qgstaskmanagerwidget.h @@ -18,6 +18,7 @@ #define QGSTASKMANAGERWIDGET_H #include "qgsfloatingwidget.h" +#include "qgis.h" #include "qgstaskmanager.h" #include #include @@ -46,7 +47,7 @@ class GUI_EXPORT QgsTaskManagerWidget : public QWidget * \param manager task manager associated with widget * \param parent parent widget */ - QgsTaskManagerWidget( QgsTaskManager *manager, QWidget *parent = nullptr ); + QgsTaskManagerWidget( QgsTaskManager *manager, QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsTaskManagerWidget(); diff --git a/src/gui/qgstextformatwidget.h b/src/gui/qgstextformatwidget.h index da0b8b51d7c..b2266eca186 100644 --- a/src/gui/qgstextformatwidget.h +++ b/src/gui/qgstextformatwidget.h @@ -18,6 +18,7 @@ #define QGSTEXTFORMATWIDGET_H #include +#include "qgis.h" #include "qgstextrenderer.h" #include "qgsstringutils.h" #include "qgisgui.h" @@ -56,7 +57,7 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, protected Ui::QgsTextForm * \param mapCanvas associated map canvas * \param parent parent widget */ - QgsTextFormatWidget( const QgsTextFormat &format = QgsTextFormat(), QgsMapCanvas *mapCanvas = nullptr, QWidget *parent = nullptr ); + QgsTextFormatWidget( const QgsTextFormat &format = QgsTextFormat(), QgsMapCanvas *mapCanvas = nullptr, QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsTextFormatWidget(); @@ -90,7 +91,7 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, protected Ui::QgsTextForm * \param parent parent widget * \param mode widget mode */ - QgsTextFormatWidget( QgsMapCanvas *mapCanvas, QWidget *parent, Mode mode ); + QgsTextFormatWidget( QgsMapCanvas *mapCanvas, QWidget *parent SIP_TRANSFERTHIS, Mode mode ); /** Updates the widget's state to reflect the settings in a QgsTextFormat. * \param format source format @@ -221,7 +222,7 @@ class GUI_EXPORT QgsTextFormatDialog : public QDialog * \param parent parent widget * \param fl window flags for dialog */ - QgsTextFormatDialog( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = nullptr, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); + QgsTextFormatDialog( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = nullptr, QWidget *parent SIP_TRANSFERTHIS = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); virtual ~QgsTextFormatDialog(); @@ -256,7 +257,7 @@ class GUI_EXPORT QgsTextFormatPanelWidget : public QgsPanelWidgetWrapper * \param mapCanvas optional associated map canvas * \param parent parent widget */ - QgsTextFormatPanelWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = nullptr, QWidget *parent = nullptr ); + QgsTextFormatPanelWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = nullptr, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns the current formatting settings defined by the widget. */ diff --git a/src/gui/qgstreewidgetitem.h b/src/gui/qgstreewidgetitem.h index 3006880511e..3fdfbedc497 100644 --- a/src/gui/qgstreewidgetitem.h +++ b/src/gui/qgstreewidgetitem.h @@ -20,6 +20,7 @@ #define QGSTREEWIDGETITEM_H #include +#include "qgis.h" #include #include "qgis_gui.h" @@ -39,7 +40,7 @@ class GUI_EXPORT QgsTreeWidgetItem : public QTreeWidgetItem * \param view parent QTreeWidget view * \param type item type */ - explicit QgsTreeWidgetItem( QTreeWidget *view, int type = Type ); + explicit QgsTreeWidgetItem( QTreeWidget *view SIP_TRANSFERTHIS, int type = Type ); /** Constructor for QgsTreeWidgetItem * \param type item type @@ -57,34 +58,34 @@ class GUI_EXPORT QgsTreeWidgetItem : public QTreeWidgetItem * \param strings list of strings containing text for each column in the item * \param type item type */ - QgsTreeWidgetItem( QTreeWidget *view, const QStringList &strings, int type = Type ); + QgsTreeWidgetItem( QTreeWidget *view SIP_TRANSFERTHIS, const QStringList &strings, int type = Type ); /** Constructor for QgsTreeWidgetItem * \param view parent QTreeWidget view * \param after QTreeWidgetItem to place insert item after in the view * \param type item type */ - QgsTreeWidgetItem( QTreeWidget *view, QTreeWidgetItem *after, int type = Type ); + QgsTreeWidgetItem( QTreeWidget *view SIP_TRANSFERTHIS, QTreeWidgetItem *after, int type = Type ); /** Constructor for QgsTreeWidgetItem * \param parent QTreeWidgetItem item * \param type item type */ - explicit QgsTreeWidgetItem( QTreeWidgetItem *parent, int type = Type ); + explicit QgsTreeWidgetItem( QTreeWidgetItem *parent SIP_TRANSFERTHIS, int type = Type ); /** Constructor for QgsTreeWidgetItem * \param parent QTreeWidgetItem item * \param strings list of strings containing text for each column in the item * \param type item type */ - QgsTreeWidgetItem( QTreeWidgetItem *parent, const QStringList &strings, int type = Type ); + QgsTreeWidgetItem( QTreeWidgetItem *parent SIP_TRANSFERTHIS, const QStringList &strings, int type = Type ); /** Constructor for QgsTreeWidgetItem * \param parent QTreeWidgetItem item * \param after QTreeWidgetItem to place insert item after in the view * \param type item type */ - QgsTreeWidgetItem( QTreeWidgetItem *parent, QTreeWidgetItem *after, int type = Type ); + QgsTreeWidgetItem( QTreeWidgetItem *parent SIP_TRANSFERTHIS, QTreeWidgetItem *after, int type = Type ); /** Sets the custom sort data for a specified column. If set, this value will be used when * sorting the item instead of the item's display text. If not set, the item's display @@ -156,7 +157,7 @@ class GUI_EXPORT QgsTreeWidgetItemObject: public QObject, public QgsTreeWidgetIt explicit QgsTreeWidgetItemObject( int type = Type ); //! Constructs a tree widget item of the specified type and appends it to the items in the given parent. - explicit QgsTreeWidgetItemObject( QTreeWidget *parent, int type = Type ); + explicit QgsTreeWidgetItemObject( QTreeWidget *parent SIP_TRANSFERTHIS, int type = Type ); //! Sets the value for the item's column and role to the given value. virtual void setData( int column, int role, const QVariant &value ); diff --git a/src/gui/qgsunitselectionwidget.h b/src/gui/qgsunitselectionwidget.h index cfb35ffc54b..e7547885e45 100644 --- a/src/gui/qgsunitselectionwidget.h +++ b/src/gui/qgsunitselectionwidget.h @@ -19,6 +19,7 @@ #define QGSUNITSELECTIONWIDGET_H #include +#include "qgis.h" #include #include "qgspanelwidget.h" #include "qgssymbol.h" @@ -47,7 +48,7 @@ class GUI_EXPORT QgsMapUnitScaleWidget : public QgsPanelWidget, private Ui::QgsM /** Constructor for QgsMapUnitScaleWidget. * \param parent parent widget */ - QgsMapUnitScaleWidget( QWidget *parent = nullptr ); + QgsMapUnitScaleWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a QgsMapUnitScale representing the settings shown in the * widget. @@ -151,7 +152,7 @@ class GUI_EXPORT QgsUnitSelectionWidget : public QWidget, private Ui::QgsUnitSel /** Constructor for QgsUnitSelectionWidget. * \param parent parent widget */ - QgsUnitSelectionWidget( QWidget *parent = nullptr ); + QgsUnitSelectionWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the units which the user can choose from in the combobox. * \param units list of strings for custom units to display in the widget @@ -178,7 +179,7 @@ class GUI_EXPORT QgsUnitSelectionWidget : public QWidget, private Ui::QgsUnitSel * \param unitIndex index of unit to set as current * \note available in Python bindings as setUnitIndex */ - void setUnit( int unitIndex ); + void setUnit( int unitIndex ) SIP_PYNAME( setUnitIndex ); /** Sets the selected unit * \param unit predefined unit to set as current diff --git a/src/gui/qgsuserinputdockwidget.h b/src/gui/qgsuserinputdockwidget.h index 96f957ee25f..b71d64fa7e3 100644 --- a/src/gui/qgsuserinputdockwidget.h +++ b/src/gui/qgsuserinputdockwidget.h @@ -19,6 +19,7 @@ #define QGSUSERINPUTDOCKWIDGET_H #include "qgsdockwidget.h" +#include "qgis.h" #include #include "qgis_gui.h" @@ -36,7 +37,7 @@ class GUI_EXPORT QgsUserInputDockWidget : public QgsDockWidget { Q_OBJECT public: - QgsUserInputDockWidget( QWidget *parent = nullptr ); + QgsUserInputDockWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Add a widget to be displayed in the dock. * \param widget widget to add. Ownership is not transferred. diff --git a/src/gui/qgsvariableeditorwidget.h b/src/gui/qgsvariableeditorwidget.h index ba9d2578558..c99168fe7c9 100644 --- a/src/gui/qgsvariableeditorwidget.h +++ b/src/gui/qgsvariableeditorwidget.h @@ -49,7 +49,7 @@ class GUI_EXPORT QgsVariableEditorWidget : public QWidget /** Constructor for QgsVariableEditorWidget. * \param parent parent widget */ - QgsVariableEditorWidget( QWidget *parent = nullptr ); + QgsVariableEditorWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsVariableEditorWidget(); diff --git a/src/gui/raster/qgsrasterhistogramwidget.h b/src/gui/raster/qgsrasterhistogramwidget.h index 0c7016d44ed..f413c685c3f 100644 --- a/src/gui/raster/qgsrasterhistogramwidget.h +++ b/src/gui/raster/qgsrasterhistogramwidget.h @@ -18,6 +18,7 @@ #define QGSRASTERHISTOGRAMWIDGET_H #include "ui_qgsrasterhistogramwidgetbase.h" +#include "qgis.h" #include "qgsmaplayerconfigwidget.h" #include "qgis_gui.h" @@ -40,7 +41,7 @@ class GUI_EXPORT QgsRasterHistogramWidget : public QgsMapLayerConfigWidget, priv Q_OBJECT public: - QgsRasterHistogramWidget( QgsRasterLayer *lyr, QWidget *parent = nullptr ); + QgsRasterHistogramWidget( QgsRasterLayer *lyr, QWidget *parent SIP_TRANSFERTHIS = 0 ); //! Save the histogram as an image to disk bool histoSaveAsImage( const QString &filename, int width = 600, int height = 600, int quality = -1 ); diff --git a/src/gui/raster/qgsrasterminmaxwidget.h b/src/gui/raster/qgsrasterminmaxwidget.h index 67844cc59cf..ad14742cd60 100644 --- a/src/gui/raster/qgsrasterminmaxwidget.h +++ b/src/gui/raster/qgsrasterminmaxwidget.h @@ -19,6 +19,7 @@ #define QGSRASTERMINMAXWIDGET_H #include "ui_qgsrasterminmaxwidgetbase.h" +#include "qgis.h" #include "qgsrectangle.h" #include "qgsraster.h" @@ -36,7 +37,7 @@ class GUI_EXPORT QgsRasterMinMaxWidget: public QWidget, private Ui::QgsRasterMin { Q_OBJECT public: - QgsRasterMinMaxWidget( QgsRasterLayer *layer, QWidget *parent = nullptr ); + QgsRasterMinMaxWidget( QgsRasterLayer *layer, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the extent to use for minimum and maximum value calculation. * \param extent extent in raster layer's CRS diff --git a/src/gui/raster/qgsrasterrendererwidget.h b/src/gui/raster/qgsrasterrendererwidget.h index de47e68c006..8415fa10fbd 100644 --- a/src/gui/raster/qgsrasterrendererwidget.h +++ b/src/gui/raster/qgsrasterrendererwidget.h @@ -19,6 +19,7 @@ #define QGSRASTERRENDERERWIDGET_H #include "qgsrectangle.h" +#include "qgis.h" #include #include "qgis_gui.h" @@ -44,7 +45,7 @@ class GUI_EXPORT QgsRasterRendererWidget: public QWidget , mCanvas( nullptr ) {} - virtual QgsRasterRenderer *renderer() = 0; + virtual QgsRasterRenderer *renderer() = 0 SIP_FACTORY; void setRasterLayer( QgsRasterLayer *layer ) { mRasterLayer = layer; } const QgsRasterLayer *rasterLayer() const { return mRasterLayer; } diff --git a/src/gui/symbology-ng/qgs25drendererwidget.h b/src/gui/symbology-ng/qgs25drendererwidget.h index fbc017d3ae0..267afe68209 100644 --- a/src/gui/symbology-ng/qgs25drendererwidget.h +++ b/src/gui/symbology-ng/qgs25drendererwidget.h @@ -17,6 +17,7 @@ #define QGS25DRENDERERWIDGET_H #include "ui_qgs25drendererwidgetbase.h" +#include "qgis.h" #include "qgsrendererwidget.h" #include "qgis_gui.h" @@ -43,7 +44,7 @@ class GUI_EXPORT Qgs25DRendererWidget : public QgsRendererWidget, Ui::Qgs25DRend * \param style * \param renderer the mask renderer (will not take ownership) */ - Qgs25DRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + Qgs25DRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer SIP_TRANSFER ); QgsFeatureRenderer *renderer() override; diff --git a/src/gui/symbology-ng/qgsarrowsymbollayerwidget.h b/src/gui/symbology-ng/qgsarrowsymbollayerwidget.h index eb1d6422fad..3d88126ac8c 100644 --- a/src/gui/symbology-ng/qgsarrowsymbollayerwidget.h +++ b/src/gui/symbology-ng/qgsarrowsymbollayerwidget.h @@ -16,6 +16,7 @@ #define QGSARROWSYMBOLLAYERWIDGET_H #include "ui_qgsarrowsymbollayerwidgetbase.h" +#include "qgis.h" #include "qgssymbollayerwidget.h" #include "qgis_gui.h" @@ -34,7 +35,7 @@ class GUI_EXPORT QgsArrowSymbolLayerWidget: public QgsSymbolLayerWidget, private * \param layer the layer where this symbol layer is applied * \param parent the parent widget */ - QgsArrowSymbolLayerWidget( const QgsVectorLayer *layer, QWidget *parent = nullptr ); + QgsArrowSymbolLayerWidget( const QgsVectorLayer *layer, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Static creation method * \param layer the layer where this symbol layer is applied diff --git a/src/gui/symbology-ng/qgscategorizedsymbolrendererwidget.h b/src/gui/symbology-ng/qgscategorizedsymbolrendererwidget.h index 7d6e3a56339..0e54ecdf521 100644 --- a/src/gui/symbology-ng/qgscategorizedsymbolrendererwidget.h +++ b/src/gui/symbology-ng/qgscategorizedsymbolrendererwidget.h @@ -16,6 +16,7 @@ #define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H #include "qgscategorizedsymbolrenderer.h" +#include "qgis.h" #include "qgsrendererwidget.h" #include #include @@ -85,7 +86,7 @@ class GUI_EXPORT QgsCategorizedSymbolRendererWidget : public QgsRendererWidget, { Q_OBJECT public: - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; QgsCategorizedSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsCategorizedSymbolRendererWidget(); diff --git a/src/gui/symbology-ng/qgscptcitycolorrampdialog.h b/src/gui/symbology-ng/qgscptcitycolorrampdialog.h index 137363d2b3f..6e9541440eb 100644 --- a/src/gui/symbology-ng/qgscptcitycolorrampdialog.h +++ b/src/gui/symbology-ng/qgscptcitycolorrampdialog.h @@ -18,6 +18,7 @@ #include "ui_qgscptcitycolorrampv2dialogbase.h" +#include "qgis.h" #include #include "qgscptcityarchive.h" @@ -48,7 +49,7 @@ class GUI_EXPORT QgsCptCityColorRampDialog : public QDialog, private Ui::QgsCptC * \param ramp initial ramp to show in dialog * \param parent parent widget */ - QgsCptCityColorRampDialog( const QgsCptCityColorRamp &ramp, QWidget *parent = nullptr ); + QgsCptCityColorRampDialog( const QgsCptCityColorRamp &ramp, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Returns a color ramp representing the current settings from the dialog. * \see setRamp() diff --git a/src/gui/symbology-ng/qgsellipsesymbollayerwidget.h b/src/gui/symbology-ng/qgsellipsesymbollayerwidget.h index 3f5072b985c..95f62d71a01 100644 --- a/src/gui/symbology-ng/qgsellipsesymbollayerwidget.h +++ b/src/gui/symbology-ng/qgsellipsesymbollayerwidget.h @@ -16,6 +16,7 @@ #define QGSELLIPSESYMBOLLAYERV2WIDGET_H #include "ui_widget_ellipse.h" +#include "qgis.h" #include "qgssymbollayerwidget.h" #include "qgis_gui.h" @@ -29,7 +30,7 @@ class GUI_EXPORT QgsEllipseSymbolLayerWidget: public QgsSymbolLayerWidget, priva Q_OBJECT public: - QgsEllipseSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent = nullptr ); + QgsEllipseSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = 0 ); static QgsSymbolLayerWidget *create( const QgsVectorLayer *vl ) { return new QgsEllipseSymbolLayerWidget( vl ); } diff --git a/src/gui/symbology-ng/qgsgraduatedhistogramwidget.h b/src/gui/symbology-ng/qgsgraduatedhistogramwidget.h index 9af7e8d08ac..47ed4b3c9fb 100644 --- a/src/gui/symbology-ng/qgsgraduatedhistogramwidget.h +++ b/src/gui/symbology-ng/qgsgraduatedhistogramwidget.h @@ -18,6 +18,7 @@ #define QGSGRADUATEDHISTOGRAMWIDGET_H #include "qgshistogramwidget.h" +#include "qgis.h" #include "qgis_gui.h" class QwtPlotPicker; @@ -40,7 +41,7 @@ class GUI_EXPORT QgsGraduatedHistogramWidget : public QgsHistogramWidget /** QgsGraduatedHistogramWidget constructor * \param parent parent widget */ - QgsGraduatedHistogramWidget( QWidget *parent = nullptr ); + QgsGraduatedHistogramWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Sets the QgsGraduatedSymbolRenderer renderer associated with the histogram. * The histogram will fetch the ranges from the renderer before every refresh. diff --git a/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.h b/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.h index d3727aac58e..cd28b4458b4 100644 --- a/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.h +++ b/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.h @@ -17,6 +17,7 @@ #define QGSGRADUATEDSYMBOLRENDERERV2WIDGET_H #include "qgsgraduatedsymbolrenderer.h" +#include "qgis.h" #include "qgsrendererwidget.h" #include #include @@ -84,7 +85,7 @@ class GUI_EXPORT QgsGraduatedSymbolRendererWidget : public QgsRendererWidget, pr Q_OBJECT public: - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; QgsGraduatedSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsGraduatedSymbolRendererWidget(); diff --git a/src/gui/symbology-ng/qgsheatmaprendererwidget.h b/src/gui/symbology-ng/qgsheatmaprendererwidget.h index cd08dfb0ee1..c1f08c244ae 100644 --- a/src/gui/symbology-ng/qgsheatmaprendererwidget.h +++ b/src/gui/symbology-ng/qgsheatmaprendererwidget.h @@ -16,6 +16,7 @@ #define QGSHEATMAPRENDERERWIDGET_H #include "ui_qgsheatmaprendererwidgetbase.h" +#include "qgis.h" #include "qgsrendererwidget.h" #include "qgis_gui.h" @@ -36,7 +37,7 @@ class GUI_EXPORT QgsHeatmapRendererWidget : public QgsRendererWidget, private Ui * \param style * \param renderer the mask renderer (will not take ownership) */ - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; /** Constructor * \param layer the layer where this renderer is applied diff --git a/src/gui/symbology-ng/qgsinvertedpolygonrendererwidget.h b/src/gui/symbology-ng/qgsinvertedpolygonrendererwidget.h index aebf56e2afd..51a26b279bc 100644 --- a/src/gui/symbology-ng/qgsinvertedpolygonrendererwidget.h +++ b/src/gui/symbology-ng/qgsinvertedpolygonrendererwidget.h @@ -16,6 +16,7 @@ #define QGSINVERTEDPOLYGONRENDERERWIDGET_H #include "ui_qgsinvertedpolygonrendererwidgetbase.h" +#include "qgis.h" #include "qgsinvertedpolygonrenderer.h" #include "qgsrendererwidget.h" #include "qgis_gui.h" @@ -38,7 +39,7 @@ class GUI_EXPORT QgsInvertedPolygonRendererWidget : public QgsRendererWidget, pr * \param style * \param renderer the mask renderer (will not take ownership) */ - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; /** Constructor * \param layer the layer where this renderer is applied diff --git a/src/gui/symbology-ng/qgsnullsymbolrendererwidget.h b/src/gui/symbology-ng/qgsnullsymbolrendererwidget.h index 2a588bb4f48..ec74027413f 100644 --- a/src/gui/symbology-ng/qgsnullsymbolrendererwidget.h +++ b/src/gui/symbology-ng/qgsnullsymbolrendererwidget.h @@ -16,6 +16,7 @@ #define QGSNULLSYMBOLRENDERERWIDGET_H #include "qgsrendererwidget.h" +#include "qgis.h" #include "qgis_gui.h" class QgsNullSymbolRenderer; @@ -36,7 +37,7 @@ class GUI_EXPORT QgsNullSymbolRendererWidget : public QgsRendererWidget public: //! Creates a new QgsNullSymbolRendererWidget object - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; //! Constructor for QgsNullSymbolRendererWidget QgsNullSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); diff --git a/src/gui/symbology-ng/qgspointclusterrendererwidget.h b/src/gui/symbology-ng/qgspointclusterrendererwidget.h index d3d56a3fcb1..fa3207e30e3 100644 --- a/src/gui/symbology-ng/qgspointclusterrendererwidget.h +++ b/src/gui/symbology-ng/qgspointclusterrendererwidget.h @@ -19,6 +19,7 @@ #define QGSPOINTCLUSTERRENDERERWIDGET_H #include "ui_qgspointclusterrendererwidgetbase.h" +#include "qgis.h" #include "qgsrendererwidget.h" #include "qgis_gui.h" @@ -41,7 +42,7 @@ class GUI_EXPORT QgsPointClusterRendererWidget: public QgsRendererWidget, privat * \param renderer source QgsPointClusterRenderer renderer * \returns new QgsRendererWidget */ - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; /** Constructor for QgsPointClusterRendererWidget. * \param layer associated vector layer diff --git a/src/gui/symbology-ng/qgspointdisplacementrendererwidget.h b/src/gui/symbology-ng/qgspointdisplacementrendererwidget.h index 2a69b8bfaac..4ba037b3aea 100644 --- a/src/gui/symbology-ng/qgspointdisplacementrendererwidget.h +++ b/src/gui/symbology-ng/qgspointdisplacementrendererwidget.h @@ -19,6 +19,7 @@ #define QGSPOINTDISPLACEMENTRENDERERWIDGET_H #include "ui_qgspointdisplacementrendererwidgetbase.h" +#include "qgis.h" #include "qgsrendererwidget.h" #include "qgis_gui.h" @@ -31,7 +32,7 @@ class GUI_EXPORT QgsPointDisplacementRendererWidget: public QgsRendererWidget, p { Q_OBJECT public: - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; QgsPointDisplacementRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsPointDisplacementRendererWidget(); diff --git a/src/gui/symbology-ng/qgsrendererpropertiesdialog.h b/src/gui/symbology-ng/qgsrendererpropertiesdialog.h index 3ff26cd5286..f345331fcd8 100644 --- a/src/gui/symbology-ng/qgsrendererpropertiesdialog.h +++ b/src/gui/symbology-ng/qgsrendererpropertiesdialog.h @@ -18,6 +18,7 @@ #define QGSRENDERERV2PROPERTIESDIALOG_H #include +#include "qgis.h" #include "ui_qgsrendererv2propsdialogbase.h" @@ -49,7 +50,7 @@ class GUI_EXPORT QgsRendererPropertiesDialog : public QDialog, private Ui::QgsRe * than shown as a dialog by itself * \param parent parent widget */ - QgsRendererPropertiesDialog( QgsVectorLayer *layer, QgsStyle *style, bool embedded = false, QWidget *parent = nullptr ); + QgsRendererPropertiesDialog( QgsVectorLayer *layer, QgsStyle *style, bool embedded = false, QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsRendererPropertiesDialog(); /** Sets the map canvas associated with the dialog. This allows the widget to retrieve the current diff --git a/src/gui/symbology-ng/qgsrulebasedrendererwidget.h b/src/gui/symbology-ng/qgsrulebasedrendererwidget.h index af745083beb..430904558d0 100644 --- a/src/gui/symbology-ng/qgsrulebasedrendererwidget.h +++ b/src/gui/symbology-ng/qgsrulebasedrendererwidget.h @@ -17,6 +17,7 @@ #define QGSRULEBASEDRENDERERV2WIDGET_H #include "qgsrendererwidget.h" +#include "qgis.h" #include "qgsrulebasedrenderer.h" class QMenu; @@ -105,7 +106,7 @@ class GUI_EXPORT QgsRuleBasedRendererWidget : public QgsRendererWidget, private public: - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; QgsRuleBasedRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsRuleBasedRendererWidget(); @@ -248,7 +249,7 @@ class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog * \param parent parent widget * \param context symbol widget context */ - QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Rule *rule, QgsVectorLayer *layer, QgsStyle *style, QWidget *parent = nullptr, const QgsSymbolWidgetContext &context = QgsSymbolWidgetContext() ); + QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Rule *rule, QgsVectorLayer *layer, QgsStyle *style, QWidget *parent SIP_TRANSFERTHIS = 0, const QgsSymbolWidgetContext &context = QgsSymbolWidgetContext() ); ~QgsRendererRulePropsDialog(); diff --git a/src/gui/symbology-ng/qgssinglesymbolrendererwidget.h b/src/gui/symbology-ng/qgssinglesymbolrendererwidget.h index 01e6a6c3d71..2ea9836f885 100644 --- a/src/gui/symbology-ng/qgssinglesymbolrendererwidget.h +++ b/src/gui/symbology-ng/qgssinglesymbolrendererwidget.h @@ -16,6 +16,7 @@ #define QGSSINGLESYMBOLRENDERERV2WIDGET_H #include "qgsrendererwidget.h" +#include "qgis.h" #include "qgis_gui.h" class QgsSingleSymbolRenderer; @@ -31,7 +32,7 @@ class GUI_EXPORT QgsSingleSymbolRendererWidget : public QgsRendererWidget Q_OBJECT public: - static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); + static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY; QgsSingleSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsSingleSymbolRendererWidget(); diff --git a/src/gui/symbology-ng/qgssvgselectorwidget.h b/src/gui/symbology-ng/qgssvgselectorwidget.h index 19b91e86a77..ed1af76d479 100644 --- a/src/gui/symbology-ng/qgssvgselectorwidget.h +++ b/src/gui/symbology-ng/qgssvgselectorwidget.h @@ -18,6 +18,7 @@ #define QGSSVGSELECTORWIDGET_H #include "ui_widget_svgselector.h" +#include "qgis.h" #include "qgisgui.h" #include @@ -172,13 +173,13 @@ class GUI_EXPORT QgsSvgSelectorListModel : public QAbstractListModel * search paths will be shown. * \param parent parent object */ - QgsSvgSelectorListModel( QObject *parent ); + QgsSvgSelectorListModel( QObject *parent SIP_TRANSFERTHIS ); /** Constructor for creating a model for SVG files in a specific path. * \param parent parent object * \param path initial path, which is recursively searched */ - QgsSvgSelectorListModel( QObject *parent, const QString &path ); + QgsSvgSelectorListModel( QObject *parent SIP_TRANSFERTHIS, const QString &path ); int rowCount( const QModelIndex &parent = QModelIndex() ) const override; QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override; @@ -211,7 +212,7 @@ class GUI_EXPORT QgsSvgSelectorGroupsModel : public QStandardItemModel Q_OBJECT public: - QgsSvgSelectorGroupsModel( QObject *parent ); + QgsSvgSelectorGroupsModel( QObject *parent SIP_TRANSFERTHIS ); ~QgsSvgSelectorGroupsModel(); private: @@ -231,7 +232,7 @@ class GUI_EXPORT QgsSvgSelectorWidget : public QWidget, private Ui::WidgetSvgSel Q_OBJECT public: - QgsSvgSelectorWidget( QWidget *parent = nullptr ); + QgsSvgSelectorWidget( QWidget *parent SIP_TRANSFERTHIS = 0 ); ~QgsSvgSelectorWidget(); static QgsSvgSelectorWidget *create( QWidget *parent = nullptr ) { return new QgsSvgSelectorWidget( parent ); } diff --git a/src/gui/symbology-ng/qgssymbollayerwidget.h b/src/gui/symbology-ng/qgssymbollayerwidget.h index 6257d2820ba..1bec066c40e 100644 --- a/src/gui/symbology-ng/qgssymbollayerwidget.h +++ b/src/gui/symbology-ng/qgssymbollayerwidget.h @@ -18,6 +18,7 @@ #define QGSSYMBOLLAYERWIDGET_H #include "qgspropertyoverridebutton.h" +#include "qgis.h" #include "qgssymbolwidgetcontext.h" #include "qgssymbollayer.h" #include @@ -259,7 +260,7 @@ class GUI_EXPORT QgsFilledMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, * \param vl associated vector layer * \param parent parent widget */ - QgsFilledMarkerSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent = nullptr ); + QgsFilledMarkerSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** Creates a new QgsFilledMarkerSymbolLayerWidget. * \param vl associated vector layer @@ -725,7 +726,7 @@ class GUI_EXPORT QgsGeometryGeneratorSymbolLayerWidget : public QgsSymbolLayerWi Q_OBJECT public: - QgsGeometryGeneratorSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent = nullptr ); + QgsGeometryGeneratorSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = 0 ); /** * Will be registered as factory diff --git a/src/gui/symbology-ng/qgssymbolselectordialog.h b/src/gui/symbology-ng/qgssymbolselectordialog.h index f753a8d53ff..7f3e9f7ea26 100644 --- a/src/gui/symbology-ng/qgssymbolselectordialog.h +++ b/src/gui/symbology-ng/qgssymbolselectordialog.h @@ -17,6 +17,7 @@ #define QGSSYMBOLSELECTORDIALOG_H #include +#include "qgis.h" #include "ui_qgssymbolselectordialogbase.h" @@ -247,7 +248,7 @@ class GUI_EXPORT QgsSymbolSelectorDialog : public QDialog Q_OBJECT public: - QgsSymbolSelectorDialog( QgsSymbol *symbol, QgsStyle *style, const QgsVectorLayer *vl, QWidget *parent = nullptr, bool embedded = false ); + QgsSymbolSelectorDialog( QgsSymbol *symbol, QgsStyle *style, const QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = 0, bool embedded = false ); ~QgsSymbolSelectorDialog(); //! return menu for "advanced" button - create it if doesn't exist and show the advanced button diff --git a/src/gui/symbology-ng/qgsvectorfieldsymbollayerwidget.h b/src/gui/symbology-ng/qgsvectorfieldsymbollayerwidget.h index 4f05a634046..c97dc7f4be3 100644 --- a/src/gui/symbology-ng/qgsvectorfieldsymbollayerwidget.h +++ b/src/gui/symbology-ng/qgsvectorfieldsymbollayerwidget.h @@ -16,6 +16,7 @@ #define QGSVECTORFIELDSYMBOLLAYERWIDGET_H #include "qgssymbollayerwidget.h" +#include "qgis.h" #include "ui_widget_vectorfield.h" #include "qgis_gui.h" @@ -28,7 +29,7 @@ class GUI_EXPORT QgsVectorFieldSymbolLayerWidget: public QgsSymbolLayerWidget, p { Q_OBJECT public: - QgsVectorFieldSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent = nullptr ); + QgsVectorFieldSymbolLayerWidget( const QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = 0 ); static QgsSymbolLayerWidget *create( const QgsVectorLayer *vl ) { return new QgsVectorFieldSymbolLayerWidget( vl ); } diff --git a/src/server/qgsserviceregistry.h b/src/server/qgsserviceregistry.h index 65cc6b10fe7..a97e02b703a 100644 --- a/src/server/qgsserviceregistry.h +++ b/src/server/qgsserviceregistry.h @@ -20,6 +20,7 @@ #define QGSSERVICEREGISTRY_H #include "qgsconfig.h" +#include "qgis.h" #include #include @@ -74,7 +75,7 @@ class SERVER_EXPORT QgsServiceRegistry * * \param service a QgsServerResponse to be registered */ - void registerService( QgsService *service ); + void registerService( QgsService *service SIP_TRANSFER ); /** * Unregister service from its name and version