diff --git a/python/analysis/interpolation/qgsgridfilewriter.sip b/python/analysis/interpolation/qgsgridfilewriter.sip index ca79b41f0c1a..1c157fc13d2f 100644 --- a/python/analysis/interpolation/qgsgridfilewriter.sip +++ b/python/analysis/interpolation/qgsgridfilewriter.sip @@ -34,8 +34,6 @@ Writes the grid file. An optional ``feedback`` object can be set for progress reports and cancelation support :return: 0 in case of success -:rtype: int - %End }; diff --git a/python/analysis/interpolation/qgsidwinterpolator.sip b/python/analysis/interpolation/qgsidwinterpolator.sip index a4c597e9eda7..86f4109c75fd 100644 --- a/python/analysis/interpolation/qgsidwinterpolator.sip +++ b/python/analysis/interpolation/qgsidwinterpolator.sip @@ -48,8 +48,6 @@ The default is a coefficient of 2. Point values are weighted by 1 / ( distance ^ coefficient ). -:rtype: float - .. seealso:: :py:func:`setDistanceCoefficient()` .. versionadded:: 3.0 diff --git a/python/analysis/interpolation/qgsinterpolator.sip b/python/analysis/interpolation/qgsinterpolator.sip index 62e42cb8990b..08b526e446cb 100644 --- a/python/analysis/interpolation/qgsinterpolator.sip +++ b/python/analysis/interpolation/qgsinterpolator.sip @@ -100,14 +100,13 @@ Source type virtual int interpolatePoint( double x, double y, double &result, QgsFeedback *feedback = 0 ) = 0; %Docstring Calculates interpolation value for map coordinates x, y + :param x: x-coordinate (in map units) :param y: y-coordinate (in map units) :param result: out: interpolation result :param feedback: optional feedback object for progress and cancelation support :return: 0 in case of success* -:rtype: int - %End @@ -122,8 +121,6 @@ An optional ``feedback`` argument may be specified to allow cancelation and progress reports from the cache operation. :return: Success in case of success -:rtype: Result - %End diff --git a/python/analysis/interpolation/qgstininterpolator.sip b/python/analysis/interpolation/qgstininterpolator.sip index 3a2dd70001e6..bb6ef7a6d852 100644 --- a/python/analysis/interpolation/qgstininterpolator.sip +++ b/python/analysis/interpolation/qgstininterpolator.sip @@ -46,8 +46,6 @@ Returns the fields output by features when saving the triangulation. These fields should be used when creating a suitable feature sink for setTriangulationSink() -:rtype: QgsFields - .. seealso:: :py:func:`setTriangulationSink()` .. versionadded:: 3.0 diff --git a/python/analysis/network/qgsgraph.sip b/python/analysis/network/qgsgraph.sip index 4913c0a3c432..cf211de98ebd 100644 --- a/python/analysis/network/qgsgraph.sip +++ b/python/analysis/network/qgsgraph.sip @@ -32,24 +32,19 @@ Constructor for QgsGraphEdge. QVariant cost( int strategyIndex ) const; %Docstring Returns edge cost calculated using specified strategy -:param strategyIndex: strategy index -:rtype: QVariant +:param strategyIndex: strategy index %End QVector< QVariant > strategies() const; %Docstring Returns array of available strategies - -:rtype: list of QVariant %End int toVertex() const; %Docstring Returns the index of the vertex at the end of this edge. -:rtype: int - .. seealso:: :py:func:`fromVertex()` %End @@ -57,8 +52,6 @@ Returns the index of the vertex at the end of this edge. %Docstring Returns the index of the vertex at the start of this edge. -:rtype: int - .. seealso:: :py:func:`toVertex()` %End @@ -95,8 +88,6 @@ This constructor initializes QgsGraphVertex object and associates a vertex with %Docstring Returns the incoming edge ids, i.e. edges which end at this node. -:rtype: QgsGraphEdgeIds - .. seealso:: :py:func:`outgoingEdges()` %End @@ -104,16 +95,12 @@ Returns the incoming edge ids, i.e. edges which end at this node. %Docstring Returns outgoing edge ids, i.e. edges which start at this node. -:rtype: QgsGraphEdgeIds - .. seealso:: :py:func:`incomingEdges()` %End QgsPointXY point() const; %Docstring Returns point associated with graph vertex. - -:rtype: QgsPointXY %End }; @@ -141,44 +128,32 @@ Constructor for QgsGraph. int addVertex( const QgsPointXY &pt ); %Docstring Add a vertex to the graph - -:rtype: int %End int addEdge( int fromVertexIdx, int toVertexIdx, const QVector< QVariant > &strategies ); %Docstring Add an edge to the graph, going from the ``fromVertexIdx`` to ``toVertexIdx``. - -:rtype: int %End int vertexCount() const; %Docstring Returns number of graph vertices - -:rtype: int %End const QgsGraphVertex &vertex( int idx ) const; %Docstring Returns vertex at given index - -:rtype: QgsGraphVertex %End int edgeCount() const; %Docstring Returns number of graph edges - -:rtype: int %End const QgsGraphEdge &edge( int idx ) const; %Docstring Returns edge at given index - -:rtype: QgsGraphEdge %End int findVertex( const QgsPointXY &pt ) const; @@ -186,8 +161,6 @@ Returns edge at given index Find vertex by associated point :return: vertex index -:rtype: int - %End }; diff --git a/python/analysis/network/qgsgraphanalyzer.sip b/python/analysis/network/qgsgraphanalyzer.sip index e7069c6ce308..c8edc14367c9 100644 --- a/python/analysis/network/qgsgraphanalyzer.sip +++ b/python/analysis/network/qgsgraphanalyzer.sip @@ -26,6 +26,7 @@ points using different strategies with Dijkstra algorithm static SIP_PYLIST dijkstra( const QgsGraph *source, int startVertexIdx, int criterionNum, QVector *resultTree = 0, QVector *resultCost = 0 ); %Docstring Solve shortest path problem using Dijkstra algorithm + :param source: source graph :param startVertexIdx: index of the start vertex :param criterionNum: index of the optimization strategy @@ -65,11 +66,10 @@ Solve shortest path problem using Dijkstra algorithm static QgsGraph *shortestTree( const QgsGraph *source, int startVertexIdx, int criterionNum ); %Docstring Returns shortest path tree with root-node in startVertexIdx + :param source: source graph :param startVertexIdx: index of the start vertex :param criterionNum: index of the optimization strategy - -:rtype: QgsGraph %End }; diff --git a/python/analysis/network/qgsgraphbuilder.sip b/python/analysis/network/qgsgraphbuilder.sip index 637e3fa3b39c..ffe0f9ea6662 100644 --- a/python/analysis/network/qgsgraphbuilder.sip +++ b/python/analysis/network/qgsgraphbuilder.sip @@ -41,8 +41,6 @@ MANDATORY BUILDER PROPERTY DECLARATION QgsGraph *graph() /Factory/; %Docstring Returns generated QgsGraph - -:rtype: QgsGraph %End }; diff --git a/python/analysis/network/qgsgraphbuilderinterface.sip b/python/analysis/network/qgsgraphbuilderinterface.sip index 1f124f29debf..ddd3dc73f19a 100644 --- a/python/analysis/network/qgsgraphbuilderinterface.sip +++ b/python/analysis/network/qgsgraphbuilderinterface.sip @@ -34,6 +34,7 @@ QgsGraphBuilder and QgsGraphDirector both use a "builder" design pattern QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" ); %Docstring Default constructor + :param crs: Coordinate reference system for new graph vertex :param ctfEnabled: enable coordinate transform from source graph CRS to CRS graph :param topologyTolerance: sqrt distance between source point as one graph vertex @@ -45,34 +46,27 @@ Default constructor QgsCoordinateReferenceSystem destinationCrs() const; %Docstring Returns destinaltion CRS - -:rtype: QgsCoordinateReferenceSystem %End bool coordinateTransformationEnabled(); %Docstring Returns coordinate transformation enabled - -:rtype: bool %End double topologyTolerance(); %Docstring Returns topology tolerance - -:rtype: float %End QgsDistanceArea *distanceArea(); %Docstring Returns measurement tool - -:rtype: QgsDistanceArea %End virtual void addVertex( int id, const QgsPointXY &pt ); %Docstring Add vertex to the graph + :param id: vertex identifier :param pt: vertex coordinates @@ -84,6 +78,7 @@ Add vertex to the graph virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies ); %Docstring Add edge to the graph + :param pt1id: first vertex identificator :param pt1: first vertex coordinates :param pt2id: second vertex identificator diff --git a/python/analysis/network/qgsgraphdirector.sip b/python/analysis/network/qgsgraphdirector.sip index 9f7861503b60..1b463c425fe6 100644 --- a/python/analysis/network/qgsgraphdirector.sip +++ b/python/analysis/network/qgsgraphdirector.sip @@ -57,8 +57,6 @@ Add optimization strategy virtual QString name() const = 0; %Docstring Returns director name - -:rtype: str %End protected: diff --git a/python/analysis/network/qgsnetworkstrategy.sip b/python/analysis/network/qgsnetworkstrategy.sip index 283c19fb6e53..8f9a823599be 100644 --- a/python/analysis/network/qgsnetworkstrategy.sip +++ b/python/analysis/network/qgsnetworkstrategy.sip @@ -50,15 +50,11 @@ Default constructor %Docstring Returns a list of the source layer attributes needed for cost calculation. This is method called by QgsGraphDirector. - -:rtype: set of int %End virtual QVariant cost( double distance, const QgsFeature &f ) const = 0; %Docstring Returns edge cost - -:rtype: QVariant %End }; diff --git a/python/analysis/network/qgsvectorlayerdirector.sip b/python/analysis/network/qgsvectorlayerdirector.sip index 02d316e88aaf..da87d8a8af6e 100644 --- a/python/analysis/network/qgsvectorlayerdirector.sip +++ b/python/analysis/network/qgsvectorlayerdirector.sip @@ -39,6 +39,7 @@ class QgsVectorLayerDirector : QgsGraphDirector ); %Docstring Default constructor + :param source: feature source representing network :param directionFieldId: field containing direction value :param directDirectionValue: value for direct one-way road diff --git a/python/analysis/raster/qgsalignraster.sip b/python/analysis/raster/qgsalignraster.sip index cdd9c591fb15..4a6bdf1c4fbc 100644 --- a/python/analysis/raster/qgsalignraster.sip +++ b/python/analysis/raster/qgsalignraster.sip @@ -42,51 +42,35 @@ Construct raster info with a path to a raster file bool isValid() const; %Docstring Check whether the given path is a valid raster - -:rtype: bool %End QString crs() const; %Docstring Return CRS in WKT format - -:rtype: str %End QSize rasterSize() const; %Docstring Return size of the raster grid in pixels - -:rtype: QSize %End int bandCount() const; %Docstring Return number of raster bands in the file - -:rtype: int %End QSizeF cellSize() const; %Docstring Return cell size in map units - -:rtype: QSizeF %End QPointF gridOffset() const; %Docstring Return grid offset - -:rtype: QPointF %End QgsRectangle extent() const; %Docstring Return extent of the raster - -:rtype: QgsRectangle %End QPointF origin() const; %Docstring Return origin of the raster - -:rtype: QPointF %End void dump() const; @@ -97,8 +81,6 @@ write contents of the object to standard error stream - for debugging double identify( double mx, double my ); %Docstring Get raster value at the given coordinates (from the first band) - -:rtype: float %End protected: @@ -159,11 +141,10 @@ used for rescaling of values (if necessary) virtual bool progress( double complete ) = 0; %Docstring Method to be overridden for progress reporting. + :param complete: Overall progress of the alignment operation :return: false if the execution should be canceled, true otherwise -:rtype: bool - %End virtual ~ProgressHandler(); @@ -176,8 +157,6 @@ Assign a progress handler instance. Does not take ownership. None can be passed. ProgressHandler *progressHandler() const; %Docstring Get associated progress handler. May be None (default) - -:rtype: ProgressHandler %End void setRasters( const List &list ); @@ -187,16 +166,10 @@ Set list of rasters that will be aligned List rasters() const; %Docstring Get list of rasters that will be aligned - -:rtype: List %End void setGridOffset( QPointF offset ); QPointF gridOffset() const; -%Docstring - -:rtype: QPointF -%End void setCellSize( double x, double y ); %Docstring @@ -209,8 +182,6 @@ Set output cell size QSizeF cellSize() const; %Docstring Get output cell size - -:rtype: QSizeF %End void setDestinationCrs( const QString &crsWkt ); @@ -220,8 +191,6 @@ Set the output CRS in WKT format QString destinationCrs() const; %Docstring Get the output CRS in WKT format - -:rtype: str %End void setClipExtent( double xmin, double ymin, double xmax, double ymax ); @@ -240,8 +209,6 @@ No extra clipping is done if the rectangle is null %Docstring Get clipping extent (region of interest). No extra clipping is done if the rectangle is null - -:rtype: QgsRectangle %End bool setParametersFromRaster( const RasterInfo &rasterInfo, const QString &customCRSWkt = QString(), QSizeF customCellSize = QSizeF(), QPointF customGridOffset = QPointF( -1, -1 ) ); @@ -255,16 +222,12 @@ If a custom CRS is provided, suggested reprojection is calculated first (using G to determine suitable defaults for cell size and grid offset. :return: true on success (may fail if it is not possible to reproject raster to given CRS) -:rtype: bool - %End bool setParametersFromRaster( const QString &filename, const QString &customCRSWkt = QString(), QSizeF customCellSize = QSizeF(), QPointF customGridOffset = QPointF( -1, -1 ) ); %Docstring Overridden variant for convenience, taking filename instead RasterInfo object. See the other variant for details. - -:rtype: bool %End bool checkInputParameters(); @@ -272,16 +235,12 @@ See the other variant for details. Determine destination extent from the input rasters and calculate derived values :return: true on success, sets error on error (see errorMessage()) -:rtype: bool - %End QSize alignedRasterSize() const; %Docstring Return expected size of the resulting aligned raster -:rtype: QSize - .. note:: first need to run checkInputParameters() which returns with success @@ -291,8 +250,6 @@ Return expected size of the resulting aligned raster %Docstring Return expected extent of the resulting aligned raster -:rtype: QgsRectangle - .. note:: first need to run checkInputParameters() which returns with success @@ -303,16 +260,12 @@ Return expected extent of the resulting aligned raster Run the alignment process :return: true on success, sets error on error (see errorMessage()) -:rtype: bool - %End QString errorMessage() const; %Docstring Return error from a previous run() call. Error message is empty if run() succeeded (returned true) - -:rtype: str %End void dump() const; @@ -323,8 +276,6 @@ write contents of the object to standard error stream - for debugging int suggestedReferenceLayer() const; %Docstring Return index of the layer which has smallest cell size (returns -1 on error) - -:rtype: int %End protected: @@ -332,15 +283,11 @@ Return index of the layer which has smallest cell size (returns -1 on error) bool createAndWarp( const Item &raster ); %Docstring Internal function for processing of one raster (1. create output, 2. do the alignment) - -:rtype: bool %End static bool suggestedWarpOutput( const RasterInfo &info, const QString &destWkt, QSizeF *cellSize = 0, QPointF *gridOffset = 0, QgsRectangle *rect = 0 ); %Docstring Determine suggested output of raster warp to a different CRS. Returns true on success - -:rtype: bool %End protected: diff --git a/python/analysis/raster/qgsaspectfilter.sip b/python/analysis/raster/qgsaspectfilter.sip index 80d49efa1f86..fb5829bd81b7 100644 --- a/python/analysis/raster/qgsaspectfilter.sip +++ b/python/analysis/raster/qgsaspectfilter.sip @@ -27,8 +27,6 @@ Calculates aspect values in a window of 3x3 cells based on first order derivativ %Docstring Calculates output value from nine input values. The input values and the output value can be equal to the nodata value if not present or outside of the border. Must be implemented by subclasses* - -:rtype: float %End }; diff --git a/python/analysis/raster/qgsderivativefilter.sip b/python/analysis/raster/qgsderivativefilter.sip index 8e17ed99f8f2..5828036586ff 100644 --- a/python/analysis/raster/qgsderivativefilter.sip +++ b/python/analysis/raster/qgsderivativefilter.sip @@ -29,14 +29,10 @@ Adds the ability to calculate derivatives in x- and y-directions. Needs to be su float calcFirstDerX( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 ); %Docstring Calculates the first order derivative in x-direction according to Horn (1981) - -:rtype: float %End float calcFirstDerY( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 ); %Docstring Calculates the first order derivative in y-direction according to Horn (1981) - -:rtype: float %End }; diff --git a/python/analysis/raster/qgshillshadefilter.sip b/python/analysis/raster/qgshillshadefilter.sip index b808fcba744b..308214534b72 100644 --- a/python/analysis/raster/qgshillshadefilter.sip +++ b/python/analysis/raster/qgshillshadefilter.sip @@ -25,21 +25,11 @@ class QgsHillshadeFilter: QgsDerivativeFilter %Docstring Calculates output value from nine input values. The input values and the output value can be equal to the nodata value if not present or outside of the border. Must be implemented by subclasses* - -:rtype: float %End float lightAzimuth() const; -%Docstring - -:rtype: float -%End void setLightAzimuth( float azimuth ); float lightAngle() const; -%Docstring - -:rtype: float -%End void setLightAngle( float angle ); }; diff --git a/python/analysis/raster/qgskde.sip b/python/analysis/raster/qgskde.sip index 890e7462d492..c8b93be52fdd 100644 --- a/python/analysis/raster/qgskde.sip +++ b/python/analysis/raster/qgskde.sip @@ -102,8 +102,6 @@ to generate the surface. The output path and file format are also required. %Docstring Runs the KDE calculation across the whole layer at once. Either call this method, or manually call run(), addFeature() and finalise() separately. - -:rtype: Result %End Result prepare(); @@ -111,8 +109,6 @@ call run(), addFeature() and finalise() separately. Prepares the output file for writing and setups up the surface calculation. This must be called before adding features via addFeature(). -:rtype: Result - .. seealso:: :py:func:`addFeature()` .. seealso:: :py:func:`finalise()` @@ -122,8 +118,6 @@ before adding features via addFeature(). %Docstring Adds a single feature to the KDE surface. prepare() must be called before adding features. -:rtype: Result - .. seealso:: :py:func:`prepare()` .. seealso:: :py:func:`finalise()` @@ -133,8 +127,6 @@ Adds a single feature to the KDE surface. prepare() must be called before adding %Docstring Finalises the output file. Must be called after adding all features via addFeature(). -:rtype: Result - .. seealso:: :py:func:`prepare()` .. seealso:: :py:func:`addFeature()` diff --git a/python/analysis/raster/qgsninecellfilter.sip b/python/analysis/raster/qgsninecellfilter.sip index 1dc06c396c32..023cc8625b91 100644 --- a/python/analysis/raster/qgsninecellfilter.sip +++ b/python/analysis/raster/qgsninecellfilter.sip @@ -31,44 +31,23 @@ Constructor that takes input file, output file and output format (GDAL string) int processRaster( QgsFeedback *feedback = 0 ); %Docstring Starts the calculation, reads from mInputFile and stores the result in mOutputFile + :param feedback: feedback object that receives update and that is checked for cancelation. :return: 0 in case of success* -:rtype: int - %End double cellSizeX() const; -%Docstring - -:rtype: float -%End void setCellSizeX( double size ); double cellSizeY() const; -%Docstring - -:rtype: float -%End void setCellSizeY( double size ); double zFactor() const; -%Docstring - -:rtype: float -%End void setZFactor( double factor ); double inputNodataValue() const; -%Docstring - -:rtype: float -%End void setInputNodataValue( double value ); double outputNodataValue() const; -%Docstring - -:rtype: float -%End void setOutputNodataValue( double value ); virtual float processNineCellWindow( float *x11, float *x21, float *x31, @@ -77,8 +56,6 @@ Starts the calculation, reads from mInputFile and stores the result in mOutputFi %Docstring Calculates output value from nine input values. The input values and the output value can be equal to the nodata value if not present or outside of the border. Must be implemented by subclasses* - -:rtype: float %End protected: diff --git a/python/analysis/raster/qgsrastercalcnode.sip b/python/analysis/raster/qgsrastercalcnode.sip index 7d52bfff4d69..2e5b06a7ce96 100644 --- a/python/analysis/raster/qgsrastercalcnode.sip +++ b/python/analysis/raster/qgsrastercalcnode.sip @@ -68,8 +68,6 @@ Constructor for QgsRasterCalcNode. Type type() const; %Docstring QgsRasterCalcNode cannot be copied - -:rtype: Type %End void setLeft( QgsRasterCalcNode *left ); @@ -77,10 +75,6 @@ QgsRasterCalcNode cannot be copied static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) /Factory/; -%Docstring - -:rtype: QgsRasterCalcNode -%End private: QgsRasterCalcNode( const QgsRasterCalcNode &rh ); diff --git a/python/analysis/raster/qgsrastercalculator.sip b/python/analysis/raster/qgsrastercalculator.sip index 8cec1a5e1389..e9f8428a3a6c 100644 --- a/python/analysis/raster/qgsrastercalculator.sip +++ b/python/analysis/raster/qgsrastercalculator.sip @@ -47,6 +47,7 @@ Raster calculator class* const QgsRectangle &outputExtent, int nOutputColumns, int nOutputRows, const QVector &rasterEntries ); %Docstring QgsRasterCalculator constructor. + :param formulaString: formula for raster calculation :param outputFile: output file path :param outputFormat: output file format @@ -60,6 +61,7 @@ QgsRasterCalculator constructor. const QgsRectangle &outputExtent, const QgsCoordinateReferenceSystem &outputCrs, int nOutputColumns, int nOutputRows, const QVector &rasterEntries ); %Docstring QgsRasterCalculator constructor. + :param formulaString: formula for raster calculation :param outputFile: output file path :param outputFormat: output file format @@ -73,10 +75,6 @@ QgsRasterCalculator constructor. %End int processCalculation( QgsFeedback *feedback = 0 ); -%Docstring - -:rtype: int -%End }; diff --git a/python/analysis/raster/qgsrastermatrix.sip b/python/analysis/raster/qgsrastermatrix.sip index e77fc6ac3e9a..0c827aef1b96 100644 --- a/python/analysis/raster/qgsrastermatrix.sip +++ b/python/analysis/raster/qgsrastermatrix.sip @@ -59,155 +59,49 @@ Takes ownership of data array bool isNumber() const; %Docstring Returns true if matrix is 1x1 (=scalar number) - -:rtype: bool %End double number() const; -%Docstring - -:rtype: float -%End void setData( int cols, int rows, double *data, double nodataValue ); int nColumns() const; -%Docstring - -:rtype: int -%End int nRows() const; -%Docstring - -:rtype: int -%End double nodataValue() const; -%Docstring - -:rtype: float -%End void setNodataValue( double d ); bool add( const QgsRasterMatrix &other ); %Docstring Adds another matrix to this one - -:rtype: bool %End bool subtract( const QgsRasterMatrix &other ); %Docstring Subtracts another matrix from this one - -:rtype: bool %End bool multiply( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool divide( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool power( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool equal( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool notEqual( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool greaterThan( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool lesserThan( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool greaterEqual( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool lesserEqual( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool logicalAnd( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool logicalOr( const QgsRasterMatrix &other ); -%Docstring - -:rtype: bool -%End bool squareRoot(); -%Docstring - -:rtype: bool -%End bool sinus(); -%Docstring - -:rtype: bool -%End bool asinus(); -%Docstring - -:rtype: bool -%End bool cosinus(); -%Docstring - -:rtype: bool -%End bool acosinus(); -%Docstring - -:rtype: bool -%End bool tangens(); -%Docstring - -:rtype: bool -%End bool atangens(); -%Docstring - -:rtype: bool -%End bool changeSign(); -%Docstring - -:rtype: bool -%End bool log(); -%Docstring - -:rtype: bool -%End bool log10(); -%Docstring - -:rtype: bool -%End }; diff --git a/python/analysis/raster/qgsrelief.sip b/python/analysis/raster/qgsrelief.sip index bf1a6dcc8f8c..5b5c53101d33 100644 --- a/python/analysis/raster/qgsrelief.sip +++ b/python/analysis/raster/qgsrelief.sip @@ -35,27 +35,18 @@ Produces colored relief rasters from DEM* int processRaster( QgsFeedback *feedback = 0 ); %Docstring Starts the calculation, reads from mInputFile and stores the result in mOutputFile + :param feedback: feedback object that receives update and that is checked for cancelation. :return: 0 in case of success* -:rtype: int - %End double zFactor() const; -%Docstring - -:rtype: float -%End void setZFactor( double factor ); void clearReliefColors(); void addReliefColorClass( const QgsRelief::ReliefColor &color ); QList< QgsRelief::ReliefColor > reliefColors() const; -%Docstring - -:rtype: list of QgsRelief.ReliefColor -%End void setReliefColors( const QList< QgsRelief::ReliefColor > &c ); QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses(); @@ -63,15 +54,11 @@ Starts the calculation, reads from mInputFile and stores the result in mOutputFi Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression :return: true in case of success* -:rtype: list of QgsRelief.ReliefColor - %End bool exportFrequencyDistributionToCsv( const QString &file ); %Docstring Write frequency of elevation values to file for manual inspection - -:rtype: bool %End private: diff --git a/python/analysis/raster/qgsruggednessfilter.sip b/python/analysis/raster/qgsruggednessfilter.sip index 3f10da02dae2..7dfa3890361b 100644 --- a/python/analysis/raster/qgsruggednessfilter.sip +++ b/python/analysis/raster/qgsruggednessfilter.sip @@ -30,8 +30,6 @@ Algorithm from Riley et al. 1999: A terrain ruggedness index that quantifies top %Docstring Calculates output value from nine input values. The input values and the output value can be equal to the nodata value if not present or outside of the border. Must be implemented by subclasses* - -:rtype: float %End }; diff --git a/python/analysis/raster/qgsslopefilter.sip b/python/analysis/raster/qgsslopefilter.sip index d59eb9f1c5f0..3f5f9a7e2442 100644 --- a/python/analysis/raster/qgsslopefilter.sip +++ b/python/analysis/raster/qgsslopefilter.sip @@ -27,8 +27,6 @@ Calculates slope values in a window of 3x3 cells based on first order derivative %Docstring Calculates output value from nine input values. The input values and the output value can be equal to the nodata value if not present or outside of the border. Must be implemented by subclasses* - -:rtype: float %End }; diff --git a/python/analysis/raster/qgstotalcurvaturefilter.sip b/python/analysis/raster/qgstotalcurvaturefilter.sip index d78cea5c5408..13b17aafae8a 100644 --- a/python/analysis/raster/qgstotalcurvaturefilter.sip +++ b/python/analysis/raster/qgstotalcurvaturefilter.sip @@ -29,8 +29,6 @@ Calculates total curvature as described by Wilson, Gallant (2000): terrain analy %Docstring Calculates total curvature from nine input values. The input values and the output value can be equal to the nodata value if not present or outside of the border. Must be implemented by subclasses* - -:rtype: float %End }; diff --git a/python/analysis/vector/qgsgeometrysnapper.sip b/python/analysis/vector/qgsgeometrysnapper.sip index a384bd3cd986..bcb5e0f9b889 100644 --- a/python/analysis/vector/qgsgeometrysnapper.sip +++ b/python/analysis/vector/qgsgeometrysnapper.sip @@ -48,8 +48,6 @@ same CRS as the reference source (ie, no reprojection is performed). Snaps a geometry to the reference layer and returns the result. The geometry must be in the same CRS as the reference layer, and must have the same type as the reference layer geometry. The snap tolerance is specified in the layer units for the reference layer. - -:rtype: QgsGeometry %End QgsFeatureList snapFeatures( const QgsFeatureList &features, double snapTolerance, SnapMode mode = PreferNodes ); @@ -57,15 +55,11 @@ is specified in the layer units for the reference layer. Snaps a set of features to the reference layer and returns the result. This operation is multithreaded for performance. The featureSnapped() signal will be emitted each time a feature is processed. The snap tolerance is specified in the layer units for the reference layer. - -:rtype: QgsFeatureList %End static QgsGeometry snapGeometry( const QgsGeometry &geometry, double snapTolerance, const QList &referenceGeometries, SnapMode mode = PreferNodes ); %Docstring Snaps a single geometry against a list of reference geometries. - -:rtype: QgsGeometry %End signals: @@ -109,15 +103,11 @@ how geometries will be snapped by the snapper. %Docstring Snaps a single feature's geometry against all feature geometries already processed by calls to snapFeature() in this object, and returns the snapped geometry. - -:rtype: QgsGeometry %End QgsGeometryMap snappedGeometries() const; %Docstring Returns a QgsGeometryMap of all feature geometries snapped by this object. - -:rtype: QgsGeometryMap %End }; diff --git a/python/analysis/vector/qgszonalstatistics.sip b/python/analysis/vector/qgszonalstatistics.sip index c4395e0bba5a..09988f536636 100644 --- a/python/analysis/vector/qgszonalstatistics.sip +++ b/python/analysis/vector/qgszonalstatistics.sip @@ -56,8 +56,6 @@ Constructor for QgsZonalStatistics. Starts the calculation :return: 0 in case of success* -:rtype: int - %End public: diff --git a/python/core/3d/qgs3drendererregistry.sip b/python/core/3d/qgs3drendererregistry.sip index 25d43a6d67d9..127fd534061d 100644 --- a/python/core/3d/qgs3drendererregistry.sip +++ b/python/core/3d/qgs3drendererregistry.sip @@ -29,16 +29,12 @@ Base metadata class for 3D renderers. Instances of derived classes may be regist QString type() const; %Docstring Returns unique identifier of the 3D renderer class - -:rtype: str %End virtual QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) = 0 /Factory/; %Docstring Returns new instance of the renderer given the DOM element. Returns NULL on error. Pure virtual function: must be implemented in derived classes. - -:rtype: QgsAbstract3DRenderer %End protected: @@ -84,15 +80,11 @@ Unregisters a 3D renderer type Qgs3DRendererAbstractMetadata *rendererMetadata( const QString &type ) const; %Docstring Returns metadata for a 3D renderer type (may be used to create a new instance of the type) - -:rtype: Qgs3DRendererAbstractMetadata %End QStringList renderersList() const; %Docstring Returns a list of all available 3D renderer types. - -:rtype: list of str %End }; diff --git a/python/core/3d/qgsabstract3drenderer.sip b/python/core/3d/qgsabstract3drenderer.sip index 0ed985361c34..00f8ae50e481 100644 --- a/python/core/3d/qgsabstract3drenderer.sip +++ b/python/core/3d/qgsabstract3drenderer.sip @@ -34,14 +34,10 @@ XML. It is therefore not recommended to store large amount of data within a rend virtual QString type() const = 0; %Docstring Returns unique identifier of the renderer class (used to identify subclass) - -:rtype: str %End virtual QgsAbstract3DRenderer *clone() const = 0 /Factory/; %Docstring Returns a cloned instance - -:rtype: QgsAbstract3DRenderer %End virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const = 0; diff --git a/python/core/annotations/qgsannotation.sip b/python/core/annotations/qgsannotation.sip index 8c2145009acc..3817eb3efa97 100644 --- a/python/core/annotations/qgsannotation.sip +++ b/python/core/annotations/qgsannotation.sip @@ -52,16 +52,12 @@ Constructor for QgsAnnotation. %Docstring Clones the annotation, returning a new copy of the annotation reflecting the annotation's current state. - -:rtype: QgsAnnotation %End bool isVisible() const; %Docstring Returns true if the annotation is visible and should be rendered. -:rtype: bool - .. seealso:: :py:func:`setVisible()` %End @@ -78,8 +74,6 @@ Returns true if the annotation is attached to a fixed map position, or false if the annotation uses a position relative to the current map extent. -:rtype: bool - .. seealso:: :py:func:`setHasFixedMapPosition()` .. seealso:: :py:func:`mapPosition()` @@ -100,8 +94,6 @@ uses a position relative to the current map extent. Returns the map position of the annotation, if it is attached to a fixed map position. -:rtype: QgsPointXY - .. seealso:: :py:func:`setMapPosition()` .. seealso:: :py:func:`hasFixedMapPosition()` @@ -122,8 +114,6 @@ position. Returns the CRS of the map position, or an invalid CRS if the annotation does not have a fixed map position. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setMapPositionCrs()` %End @@ -140,8 +130,6 @@ Returns the relative position of the annotation, if it is not attached to a fixe position. The coordinates in the return point should be between 0 and 1, and represent the relative percentage for the position compared to the map width and height. -:rtype: QPointF - .. seealso:: :py:func:`setRelativePosition()` %End @@ -165,8 +153,6 @@ Sets the annotation's frame's offset from the mapPosition() reference point. %Docstring Returns the annotation's frame's offset from the mapPosition() reference point. -:rtype: QPointF - .. seealso:: :py:func:`setFrameOffsetFromReferencePoint()` %End @@ -183,8 +169,6 @@ the annotation's content is drawn). Returns the size of the annotation's frame (the main area in which the annotation's content is drawn). -:rtype: QSizeF - .. seealso:: :py:func:`setFrameSize()` %End @@ -201,8 +185,6 @@ content. Returns the margins (in millimeters) between the outside of the frame and the annotation content. -:rtype: QgsMargins - .. seealso:: :py:func:`setContentsMargin()` %End @@ -218,8 +200,6 @@ of the symbol is transferred to the annotation. %Docstring Returns the symbol that is used for rendering the annotation frame. -:rtype: QgsFillSymbol - .. seealso:: :py:func:`setFillSymbol()` %End @@ -260,8 +240,6 @@ of the symbol is transferred to the annotation. %Docstring Returns the symbol that is drawn at the annotation's map position. -:rtype: QgsMarkerSymbol - .. seealso:: :py:func:`setMarkerSymbol()` %End @@ -271,8 +249,6 @@ Returns the map layer associated with the annotation. Annotations can be associated with a map layer if their visibility should be synchronized with the layer's visibility. -:rtype: QgsMapLayer - .. seealso:: :py:func:`setMapLayer()` %End @@ -290,8 +266,6 @@ with the layer's visibility. Returns the feature associated with the annotation, or an invalid feature if none has been set. -:rtype: QgsFeature - .. seealso:: :py:func:`setAssociatedFeature()` %End @@ -332,8 +306,6 @@ Derived classes should implement their custom annotation drawing logic here. %Docstring Returns the minimum frame size for the annotation. Subclasses should implement this if they cannot be resized smaller than a certain minimum size. - -:rtype: QSizeF %End void _writeXml( QDomElement &itemElem, QDomDocument &doc, const QgsReadWriteContext &context ) const; diff --git a/python/core/annotations/qgsannotationmanager.sip b/python/core/annotations/qgsannotationmanager.sip index c2b3f29e8084..ccda8e97409d 100644 --- a/python/core/annotations/qgsannotationmanager.sip +++ b/python/core/annotations/qgsannotationmanager.sip @@ -44,8 +44,6 @@ manager. Adds an annotation to the manager. Ownership of the annotation is transferred to the manager. Returns true if the addition was successful, or false if the annotation could not be added. -:rtype: bool - .. seealso:: :py:func:`removeAnnotation()` .. seealso:: :py:func:`annotationAdded()` @@ -57,8 +55,6 @@ Removes an annotation from the manager. The annotation is deleted. Returns true if the removal was successful, or false if the removal failed (eg as a result of removing an annotation which is not contained in the manager). -:rtype: bool - .. seealso:: :py:func:`addAnnotation()` .. seealso:: :py:func:`compositionRemoved()` @@ -79,8 +75,6 @@ Removes and deletes all annotations from the manager. %Docstring Returns a list of all annotations contained in the manager. -:rtype: list of QgsAnnotation - .. seealso:: :py:func:`cloneAnnotations()` %End @@ -90,8 +84,6 @@ Returns a list containing clones of all annotations contained in the manager. The caller takes responsibility for deleting all returned annotations. -:rtype: list of QgsAnnotation - .. seealso:: :py:func:`annotations()` %End @@ -100,8 +92,6 @@ all returned annotations. Reads the manager's state from a DOM element, restoring all annotations present in the XML document. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -109,8 +99,6 @@ present in the XML document. %Docstring Returns a DOM element representing the state of the manager. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End diff --git a/python/core/annotations/qgshtmlannotation.sip b/python/core/annotations/qgshtmlannotation.sip index 7cf7594150d3..f4d19888d5af 100644 --- a/python/core/annotations/qgshtmlannotation.sip +++ b/python/core/annotations/qgshtmlannotation.sip @@ -47,8 +47,6 @@ Sets the file path for the source HTML file. %Docstring Returns the file path for the source HTML file. -:rtype: str - .. seealso:: :py:func:`setSourceFile()` %End @@ -63,8 +61,6 @@ Returns the file path for the source HTML file. static QgsHtmlAnnotation *create() /Factory/; %Docstring Returns a new QgsHtmlAnnotation object. - -:rtype: QgsHtmlAnnotation %End protected: diff --git a/python/core/annotations/qgssvgannotation.sip b/python/core/annotations/qgssvgannotation.sip index fae715bbbfa7..deb93d88dfc3 100644 --- a/python/core/annotations/qgssvgannotation.sip +++ b/python/core/annotations/qgssvgannotation.sip @@ -46,16 +46,12 @@ Sets the file path for the source SVG file. %Docstring Returns the file path for the source SVG file. -:rtype: str - .. seealso:: :py:func:`setFilePath()` %End static QgsSvgAnnotation *create() /Factory/; %Docstring Returns a new QgsSvgAnnotation object. - -:rtype: QgsSvgAnnotation %End protected: diff --git a/python/core/annotations/qgstextannotation.sip b/python/core/annotations/qgstextannotation.sip index 44c929c12a51..7b3511fa0d75 100644 --- a/python/core/annotations/qgstextannotation.sip +++ b/python/core/annotations/qgstextannotation.sip @@ -35,8 +35,6 @@ Constructor for QgsTextAnnotation. Returns the text document which will be rendered within the annotation. -:rtype: QTextDocument - .. seealso:: :py:func:`setDocument()` %End @@ -56,8 +54,6 @@ within the annotation. Ownership is not transferred. static QgsTextAnnotation *create() /Factory/; %Docstring Returns a new QgsTextAnnotation object. - -:rtype: QgsTextAnnotation %End protected: diff --git a/python/core/auth/qgsauthcertutils.sip b/python/core/auth/qgsauthcertutils.sip index fc7bee310de3..8eea190997b2 100644 --- a/python/core/auth/qgsauthcertutils.sip +++ b/python/core/auth/qgsauthcertutils.sip @@ -64,55 +64,42 @@ class QgsAuthCertUtils static QString getSslProtocolName( QSsl::SslProtocol protocol ); %Docstring SSL Protocol name strings per enum - -:rtype: str %End static QMap mapDigestToCerts( const QList &certs ); %Docstring Map certificate sha1 to certificate as simple cache - -:rtype: QMap %End static QMap mapDigestToSslConfigs( const QList &configs ); %Docstring Map SSL custom configs' certificate sha1 to custom config as simple cache - -:rtype: QMap %End static QByteArray fileData( const QString &path ); %Docstring Return data from a local file via a read-only operation + :param path: Path to file to read :return: All data contained in file or empty contents if file does not exist -:rtype: QByteArray - %End static QList certsFromFile( const QString &certspath ); %Docstring Return list of concatenated certs from a PEM or DER formatted file - -:rtype: list of QSslCertificate %End static QList casFromFile( const QString &certspath ); %Docstring Return list of concatenated CAs from a PEM or DER formatted file - -:rtype: list of QSslCertificate %End static QSslCertificate certFromFile( const QString &certpath ); %Docstring Return first cert from a PEM or DER formatted file - -:rtype: QSslCertificate %End static QList casMerge( const QList &bundle1, @@ -120,12 +107,11 @@ Return first cert from a PEM or DER formatted file %Docstring casMerge merges two certificate bundles in a single one removing duplicates, the certificates from the ``bundle2`` are appended to ``bundle1`` if not already there + :param bundle1: first bundle :param bundle2: second bundle :return: a list of unique certificates -:rtype: list of QSslCertificate - %End static QSslKey keyFromFile( const QString &keypath, @@ -133,29 +119,25 @@ from the ``bundle2`` are appended to ``bundle1`` if not already there QString *algtype = 0 ); %Docstring Return non-encrypted key from a PEM or DER formatted file + :param keypath: File path to private key :param keypass: Passphrase for private key :param algtype: QString to set with resolved algorithm type - -:rtype: QSslKey %End static QList certsFromString( const QString &pemtext ); %Docstring Return list of concatenated certs from a PEM Base64 text block - -:rtype: list of QSslCertificate %End static QList casRemoveSelfSigned( const QList &caList ); %Docstring casRemoveSelfSigned remove self-signed CA certificates from ``caList`` + :param caList: list of CA certificates :return: a list of non self-signed certificates -:rtype: list of QSslCertificate - %End static QStringList certKeyBundleToPem( const QString &certpath, @@ -164,24 +146,22 @@ Return list of concatenated certs from a PEM Base64 text block bool reencrypt = true ); %Docstring Return list of certificate, private key and algorithm (as PEM text) from file path components + :param certpath: File path to certificate :param keypath: File path to private key :param keypass: Passphrase for private key :param reencrypt: Whether to re-encrypt the private key with the passphrase :return: certificate, private key, key's algorithm type -:rtype: list of str - %End static bool pemIsPkcs8( const QString &keyPemTxt ); %Docstring Determine if the PEM-encoded text of a key is PKCS#8 format + :param keyPemTxt: PEM-encoded text :return: True if PKCS#8, otherwise false -:rtype: bool - %End @@ -191,87 +171,75 @@ Determine if the PEM-encoded text of a key is PKCS#8 format bool reencrypt = true ); %Docstring Return list of certificate, private key and algorithm (as PEM text) for a PKCS#12 bundle + :param bundlepath: File path to the PKCS bundle :param bundlepass: Passphrase for bundle :param reencrypt: Whether to re-encrypt the private key with the passphrase :return: certificate, private key, key's algorithm type -:rtype: list of str - %End static QList pkcs12BundleCas( const QString &bundlepath, const QString &bundlepass = QString() ); %Docstring Return list of CA certificates (as QSslCertificate) for a PKCS#12 bundle + :param bundlepath: File path to the PKCS bundle :param bundlepass: Passphrase for bundle :return: list of certificate -:rtype: list of QSslCertificate - %End static QByteArray certsToPemText( const QList &certs ); %Docstring certsToPemText dump a list of QSslCertificates to PEM text + :param certs: list of certs :return: a byte array of concatenated certificates as PEM text -:rtype: QByteArray - %End static QString pemTextToTempFile( const QString &name, const QByteArray &pemtext ); %Docstring Write a temporary file for a PEM text of cert/key/CAs bundle component + :param pemtext: Component content as PEM text :param name: Name of file :return: File path to temporary file -:rtype: str - %End static QString getCaSourceName( QgsAuthCertUtils::CaCertSource source, bool single = false ); %Docstring Get the general name for CA source enum type + :param source: The enum source type for the CA :param single: Whether to return singular or plural description - -:rtype: str %End static QString resolvedCertName( const QSslCertificate &cert, bool issuer = false ); %Docstring Get the general name via RFC 5280 resolution - -:rtype: str %End static QString getCertTrustName( QgsAuthCertUtils::CertTrustPolicy trust ); %Docstring Get the general name for certificate trust - -:rtype: str %End static QString getColonDelimited( const QString &txt ); %Docstring Get string with colon delimiters every 2 characters - -:rtype: str %End static QString shaHexForCert( const QSslCertificate &cert, bool formatted = false ); %Docstring Get the sha1 hash for certificate + :param cert: Qt SSL certificate to generate hash from :param formatted: Whether to colon-delimit the hash - -:rtype: str %End @@ -284,79 +252,62 @@ Get the sha1 hash for certificate static QList certificateUsageTypes( const QSslCertificate &cert ); %Docstring Try to determine the certificates usage types - -:rtype: list of QgsAuthCertUtils.CertUsageType %End static bool certificateIsAuthority( const QSslCertificate &cert ); %Docstring Get whether a certificate is an Authority - -:rtype: bool %End static bool certificateIsIssuer( const QSslCertificate &cert ); %Docstring Get whether a certificate can sign other certificates - -:rtype: bool %End static bool certificateIsAuthorityOrIssuer( const QSslCertificate &cert ); %Docstring Get whether a certificate is an Authority or can at least sign other certificates - -:rtype: bool %End static bool certificateIsSslServer( const QSslCertificate &cert ); %Docstring Get whether a certificate is probably used for a SSL server - -:rtype: bool %End static bool certificateIsSslClient( const QSslCertificate &cert ); %Docstring Get whether a certificate is probably used for a client identity - -:rtype: bool %End static QString sslErrorEnumString( QSslError::SslError errenum ); %Docstring Get short strings describing an SSL error - -:rtype: str %End static bool certIsCurrent( const QSslCertificate &cert ); %Docstring certIsCurrent checks if ``cert`` is viable for its not before and not after dates -:param cert: certificate to be checked -:rtype: bool +:param cert: certificate to be checked %End static QList certViabilityErrors( const QSslCertificate &cert ); %Docstring certViabilityErrors checks basic characteristics (validity dates, blacklisting, etc.) of given ``cert`` + :param cert: certificate to be checked :return: list of QSslError (will return NO ERRORS if a null QSslCertificate is passed) -:rtype: list of QSslError - %End static bool certIsViable( const QSslCertificate &cert ); %Docstring certIsViable checks for viability errors of ``cert`` and whether it is NULL + :param cert: certificate to be checked :return: false if cert is NULL or has viability errors -:rtype: bool - %End static QList validateCertChain( const QList &certificateChain, @@ -364,27 +315,25 @@ Get short strings describing an SSL error bool trustRootCa = false ) ; %Docstring validateCertChain validates the given ``certificateChain`` + :param certificateChain: list of certificates to be checked, with leaf first and with optional root CA last :param hostName: (optional) name of the host to be verified :param trustRootCa: if true the CA will be added to the trusted CAs for this validation check :return: list of QSslError, if the list is empty then the cert chain is valid -:rtype: list of QSslError - %End static QStringList validatePKIBundle( QgsPkiBundle &bundle, bool useIntermediates = true, bool trustRootCa = false ); %Docstring validatePKIBundle validate the PKI bundle by checking the certificate chain, the expiration and effective dates, optionally trusts the root CA + :param bundle: :param useIntermediates: if true the intermediate certs are also checked :param trustRootCa: if true the CA will be added to the trusted CAs for this validation check (if useIntermediates is false) this option is ignored and set to false :return: a list of error strings, if the list is empty then the PKI bundle is valid -:rtype: list of str - %End }; diff --git a/python/core/auth/qgsauthconfig.sip b/python/core/auth/qgsauthconfig.sip index 383f65f9446b..41510a0ba615 100644 --- a/python/core/auth/qgsauthconfig.sip +++ b/python/core/auth/qgsauthconfig.sip @@ -25,6 +25,7 @@ class QgsAuthMethodConfig QgsAuthMethodConfig( const QString &method = QString(), int version = 0 ); %Docstring Construct a configuration for an authentication method + :param method: Textual key of the authentication method :param version: Version of the configuration (for updating previously saved configs later on) %End @@ -34,16 +35,12 @@ Construct a configuration for an authentication method bool operator!=( const QgsAuthMethodConfig &other ) const; %Docstring Operator used to compare configs' inequality - -:rtype: bool %End const QString id() const; %Docstring Get 'authcfg' 7-character alphanumeric ID of the config -:rtype: str - .. note:: This is set by QgsAuthManager when the config is initially stored @@ -56,8 +53,6 @@ Set auth config ID const QString name() const; %Docstring Get name of configuration - -:rtype: str %End void setName( const QString &name ); %Docstring @@ -67,24 +62,18 @@ Set name of configuration const QString uri() const; %Docstring A URI to auto-select a config when connecting to a resource - -:rtype: str %End void setUri( const QString &uri ); QString method() const; %Docstring Textual key of the associated authentication method - -:rtype: str %End void setMethod( const QString &method ); int version() const; %Docstring Get version of the configuration - -:rtype: int %End void setVersion( int version ); %Docstring @@ -94,17 +83,14 @@ Set version of the configuration bool isValid( bool validateid = false ) const; %Docstring Whether the configuration is valid -:param validateid: Additionally verify the auth config ID is not empty -:rtype: bool +:param validateid: Additionally verify the auth config ID is not empty %End const QString configString() const; %Docstring The extended configuration, as stored and retrieved from the authentication database -:rtype: str - .. note:: This is an internal construct used by QgsAuthManager that should generally not be set by client code @@ -113,19 +99,19 @@ The extended configuration, as stored and retrieved from the authentication data void loadConfigString( const QString &configstr ); %Docstring Load existing extended configuration + :param configstr: Configuration string to load %End QgsStringMap configMap() const; %Docstring Get extended configuration, mapped to key/value pairs of QStrings - -:rtype: QgsStringMap %End void setConfigMap( const QgsStringMap &map ); %Docstring Set extended configuration map + :param map: Map to set %End @@ -136,6 +122,7 @@ Set a single config value per key in the map .. note:: if key exists, it is replaced + :param key: Config key :param value: Config value %End @@ -147,6 +134,7 @@ Set a multiple config values per key in the map .. note:: if key exists, it is replaced + :param key: Config key :param value: Config value %End @@ -154,36 +142,32 @@ Set a multiple config values per key in the map int removeConfig( const QString &key ); %Docstring Remove a config from map + :param key: Config to remove :return: Number of keys removed (should always be 1 or 0) -:rtype: int - %End QString config( const QString &key, const QString &defaultvalue = QString() ) const; %Docstring Return a config's value + :param key: Config key :param defaultvalue: Default value, if key not found - -:rtype: str %End QStringList configList( const QString &key ) const; %Docstring Return a config's list of values -:param key: -:rtype: list of str +:param key: %End bool hasConfig( const QString &key ) const; %Docstring Whether a config key exists in config map -:param key: -:rtype: bool +:param key: %End void clearConfigMap(); @@ -196,11 +180,10 @@ Clear all configs A utility function for generating a resource from a URL to be compared against the config's uri() for auto-selecting authentication configs to use -:rtype: bool - .. note:: Essentially strips the URL query variables, and by default, strips the path as well + :param accessurl: A URL to process :param resource: Output variable for result :param withpath: Whether to include the URI's path in output @@ -232,6 +215,7 @@ class QgsPkiBundle const QList &caChain = QList() ); %Docstring Construct a bundle from existing PKI components + :param clientCert: Certificate to store in bundle :param clientKey: Private key to store in bundle :param caChain: Chain of Certificate Authorities for client certificate @@ -243,50 +227,40 @@ Construct a bundle from existing PKI components const QList &caChain = QList() ); %Docstring Construct a bundle of PKI components from PEM-formatted file paths + :param certPath: Certificate file path :param keyPath: Private key path :param keyPass: Private key passphrase :param caChain: Chain of Certificate Authorities for client certificate - -:rtype: QgsPkiBundle %End static const QgsPkiBundle fromPkcs12Paths( const QString &bundlepath, const QString &bundlepass = QString() ); %Docstring Construct a bundle of PKI components from a PKCS#12 file path + :param bundlepath: Bundle file path :param bundlepass: Optional bundle passphrase - -:rtype: QgsPkiBundle %End bool isNull() const; %Docstring Whether the bundle, either its certificate or private key, is null - -:rtype: bool %End bool isValid() const; %Docstring Whether the bundle is valid - -:rtype: bool %End const QString certId() const; %Docstring The sha hash of the client certificate - -:rtype: str %End const QSslCertificate clientCert() const; %Docstring Client certificate object - -:rtype: QSslCertificate %End void setClientCert( const QSslCertificate &cert ); %Docstring @@ -296,8 +270,6 @@ Set client certificate object const QSslKey clientKey() const; %Docstring Private key object - -:rtype: QSslKey %End void setClientKey( const QSslKey &certkey ); %Docstring @@ -307,8 +279,6 @@ Set private key object const QList caChain() const; %Docstring Chain of Certificate Authorities for client certificate - -:rtype: list of QSslCertificate %End void setCaChain( const QList &cachain ); %Docstring @@ -335,6 +305,7 @@ class QgsPkiConfigBundle const QList &cachain = QList( ) ); %Docstring Construct a bundle from existing PKI components and authentication method configuration + :param config: Authentication method configuration :param cert: Certificate to store in bundle :param certkey: Private key to store in bundle @@ -344,15 +315,11 @@ Construct a bundle from existing PKI components and authentication method config bool isValid(); %Docstring Whether the bundle is valid - -:rtype: bool %End const QgsAuthMethodConfig config() const; %Docstring Authentication method configuration - -:rtype: QgsAuthMethodConfig %End void setConfig( const QgsAuthMethodConfig &config ); @@ -363,8 +330,6 @@ Set authentication method configuration const QSslCertificate clientCert() const; %Docstring Client certificate object - -:rtype: QSslCertificate %End void setClientCert( const QSslCertificate &cert ); @@ -375,8 +340,6 @@ Set client certificate object const QSslKey clientCertKey() const; %Docstring Private key object - -:rtype: QSslKey %End void setClientCertKey( const QSslKey &certkey ); @@ -389,13 +352,12 @@ Set private key object caChain return the CA chain :return: list of CA certificates -:rtype: list of QSslCertificate - %End void setCaChain( const QList &caChain ); %Docstring setCaChain set the CA chain + :param caChain: %End @@ -470,8 +432,6 @@ Construct a default SSL server configuration const QSslCertificate sslCertificate() const; %Docstring Server certificate object - -:rtype: QSslCertificate %End void setSslCertificate( const QSslCertificate &cert ); %Docstring @@ -481,8 +441,6 @@ Set server certificate object const QString sslHostPort() const; %Docstring Server host:port string - -:rtype: str %End void setSslHostPort( const QString &hostport ); %Docstring @@ -492,8 +450,6 @@ Set server host:port string QSsl::SslProtocol sslProtocol() const; %Docstring SSL server protocol to use in connections - -:rtype: QSsl.SslProtocol %End void setSslProtocol( QSsl::SslProtocol protocol ); %Docstring @@ -503,14 +459,10 @@ Set SSL server protocol to use in connections const QList sslIgnoredErrors() const; %Docstring SSL server errors to ignore in connections - -:rtype: list of QSslError %End const QList sslIgnoredErrorEnums() const; %Docstring SSL server errors (as enum list) to ignore in connections - -:rtype: list of QSslError.SslError %End void setSslIgnoredErrorEnums( const QList &errors ); %Docstring @@ -520,8 +472,6 @@ Set SSL server errors (as enum list) to ignore in connections QSslSocket::PeerVerifyMode sslPeerVerifyMode() const; %Docstring SSL client's peer verify mode to use in connections - -:rtype: QSslSocket.PeerVerifyMode %End void setSslPeerVerifyMode( QSslSocket::PeerVerifyMode mode ); %Docstring @@ -532,8 +482,6 @@ Set SSL client's peer verify mode to use in connections %Docstring Number or SSL client's peer to verify in connections -:rtype: int - .. note:: When set to 0 = unlimited depth @@ -551,8 +499,6 @@ Set number or SSL client's peer to verify in connections int version() const; %Docstring Version of the configuration (used for future upgrading) - -:rtype: int %End void setVersion( int version ); %Docstring @@ -562,8 +508,6 @@ Set version of the configuration (used for future upgrading) int qtVersion() const; %Docstring Qt version when the configuration was made (SSL protocols may differ) - -:rtype: int %End void setQtVersion( int version ); %Docstring @@ -573,8 +517,6 @@ Set Qt version when the configuration was made (SSL protocols may differ) const QString configString() const; %Docstring Configuration as a concatenated string - -:rtype: str %End void loadConfigString( const QString &config = QString() ); %Docstring @@ -584,8 +526,6 @@ Load concatenated string into configuration, e.g. from auth database bool isNull() const; %Docstring Whether configuration is null (missing components) - -:rtype: bool %End }; diff --git a/python/core/auth/qgsauthmanager.sip b/python/core/auth/qgsauthmanager.sip index c08b04dc78c9..cc85ddd37550 100644 --- a/python/core/auth/qgsauthmanager.sip +++ b/python/core/auth/qgsauthmanager.sip @@ -35,12 +35,11 @@ and to utilize configurations through various authentication method plugins bool init( const QString &pluginPath = QString(), const QString &authDatabasePath = QString() ); %Docstring init initialize QCA, prioritize qca-ossl plugin and optionally set up the authentication database + :param pluginPath: the plugin path :param authDatabasePath: the authentication DB path :return: true on success -:rtype: bool - .. seealso:: :py:func:`QgsApplication.pluginPath` @@ -52,45 +51,33 @@ and to utilize configurations through various authentication method plugins QSqlDatabase authDatabaseConnection() const; %Docstring Set up the application instance of the authentication database connection - -:rtype: QSqlDatabase %End const QString authDatabaseConfigTable() const; %Docstring Name of the authentication database table that stores configs - -:rtype: str %End const QString authDatabaseServersTable() const; %Docstring Name of the authentication database table that stores server exceptions/configs - -:rtype: str %End bool isDisabled() const; %Docstring Whether QCA has the qca-ossl plugin, which a base run-time requirement - -:rtype: bool %End const QString disabledMessage() const; %Docstring Standard message for when QCA's qca-ossl plugin is missing and system is disabled - -:rtype: str %End const QString authenticationDatabasePath() const; %Docstring The standard authentication database file in ~/.qgis3/ or defined location -:rtype: str - .. seealso:: :py:func:`QgsApplication.qgisAuthDatabaseFilePath` %End @@ -98,11 +85,10 @@ The standard authentication database file in ~/.qgis3/ or defined location %Docstring Main call to initially set or continually check master password is set -:rtype: bool - .. note:: If it is not set, the user is asked for its input + :param verify: Whether password's hash was saved in authentication database %End @@ -110,11 +96,10 @@ Main call to initially set or continually check master password is set %Docstring Overloaded call to reset master password or set it initially without user interaction -:rtype: bool - .. note:: Only use this in trusted reset functions, unit tests or user/app setup scripts! + :param pass: Password to use :param verify: Whether password's hash was saved in authentication database %End @@ -123,26 +108,21 @@ Overloaded call to reset master password or set it initially without user intera %Docstring Verify the supplied master password against any existing hash in authentication database -:rtype: bool - .. note:: Do not emit verification signals when only comparing + :param compare: Password to compare against %End bool masterPasswordIsSet() const; %Docstring Whether master password has be input and verified, i.e. authentication database is accessible - -:rtype: bool %End bool masterPasswordHashInDatabase() const; %Docstring Verify a password hash existing in authentication database - -:rtype: bool %End void clearMasterPassword(); @@ -157,21 +137,19 @@ Clear supplied master password bool masterPasswordSame( const QString &pass ) const; %Docstring Check whether supplied password is the same as the one already set -:param pass: Password to verify -:rtype: bool +:param pass: Password to verify %End bool resetMasterPassword( const QString &newpass, const QString &oldpass, bool keepbackup, QString *backuppath /In,Out/ = 0 ); %Docstring Reset the master password to a new one, then re-encrypt all previous configs in a new database file, optionally backup curren database + :param newpass: New master password to replace existing :param oldpass: Current master password to replace existing :param keepbackup: Whether to keep the generated backup of current database :param backuppath: Where the backup is located, if kept - -:rtype: bool %End @@ -185,6 +163,7 @@ Re-emit a signal to schedule an optional erase of authentication database. This can be called from the slot connected to a previously emitted scheduling signal, so that the slot can ask for another emit later, if the slot noticies the current GUI processing state is not ready for interacting with the user, e.g. project is still loading + :param emitted: Setting to false will cause signal to be emitted by the schedule timer. Setting to true will stop any emitting, but will not stop the schedule timer. %End @@ -192,22 +171,16 @@ Setting to true will stop any emitting, but will not stop the schedule timer. QString authManTag() const; %Docstring Simple text tag describing authentication system for message logs - -:rtype: str %End bool registerCoreAuthMethods(); %Docstring Instantiate and register existing C++ core authentication methods from plugins - -:rtype: bool %End QgsAuthMethodConfigsMap availableAuthMethodConfigs( const QString &dataprovider = QString() ); %Docstring Get mapping of authentication config ids and their base configs (not decrypted data) - -:rtype: QgsAuthMethodConfigsMap %End void updateConfigAuthMethods(); @@ -218,129 +191,110 @@ Sync the confg/authentication method cache with what is in database QgsAuthMethod *configAuthMethod( const QString &authcfg ); %Docstring Get authentication method from the config/provider cache -:param authcfg: Authentication config id -:rtype: QgsAuthMethod +:param authcfg: Authentication config id %End QString configAuthMethodKey( const QString &authcfg ) const; %Docstring Get key of authentication method associated with config ID -:param authcfg: -:rtype: str +:param authcfg: %End QStringList authMethodsKeys( const QString &dataprovider = QString() ); %Docstring Get keys of supported authentication methods - -:rtype: list of str %End QgsAuthMethod *authMethod( const QString &authMethodKey ); %Docstring Get authentication method from the config/provider cache via its key -:param authMethodKey: Authentication method key -:rtype: QgsAuthMethod +:param authMethodKey: Authentication method key %End QWidget *authMethodEditWidget( const QString &authMethodKey, QWidget *parent ); %Docstring Get authentication method edit widget via its key + :param authMethodKey: Authentication method key :param parent: Parent widget - -:rtype: QWidget %End QgsAuthMethod::Expansions supportedAuthMethodExpansions( const QString &authcfg ); %Docstring Get supported authentication method expansion(s), e.g. NetworkRequest | DataSourceURI, as flags -:param authcfg: -:rtype: QgsAuthMethod.Expansions +:param authcfg: %End const QString uniqueConfigId() const; %Docstring Get a unique generated 7-character string to assign to as config id - -:rtype: str %End bool configIdUnique( const QString &id ) const; %Docstring Verify if provided authentication id is unique -:param id: Id to check -:rtype: bool +:param id: Id to check %End bool hasConfigId( const QString &txt ) const; %Docstring Return whether a string includes an authcfg ID token -:param txt: String to check -:rtype: bool +:param txt: String to check %End QString configIdRegex() const; %Docstring Return regular expression for authcfg=.{7} key/value token for authentication ids - -:rtype: str %End QStringList configIds() const; %Docstring Get list of authentication ids from database - -:rtype: list of str %End bool storeAuthenticationConfig( QgsAuthMethodConfig &mconfig /In,Out/ ); %Docstring Store an authentication config in the database + :param mconfig: Associated authentication config id :return: Whether operation succeeded -:rtype: bool - %End bool updateAuthenticationConfig( const QgsAuthMethodConfig &config ); %Docstring Update an authentication config in the database + :param config: Associated authentication config id :return: Whether operation succeeded -:rtype: bool - %End bool loadAuthenticationConfig( const QString &authcfg, QgsAuthMethodConfig &mconfig /In,Out/, bool full = false ); %Docstring Load an authentication config from the database into subclass + :param authcfg: Associated authentication config id :param mconfig: Subclassed config to load into :param full: Whether to decrypt and populate all sensitive data in subclass :return: Whether operation succeeded -:rtype: bool - %End bool removeAuthenticationConfig( const QString &authcfg ); %Docstring Remove an authentication config in the database + :param authcfg: Associated authentication config id :return: Whether operation succeeded -:rtype: bool - %End bool removeAllAuthenticationConfigs(); @@ -348,8 +302,6 @@ Remove an authentication config in the database Clear all authentication configs from table in database and from provider caches :return: Whether operation succeeded -:rtype: bool - %End bool backupAuthenticationDatabase( QString *backuppath /In,Out/ = 0 ); @@ -357,19 +309,16 @@ Clear all authentication configs from table in database and from provider caches Close connection to current authentication database and back it up :return: Path to backup -:rtype: bool - %End bool eraseAuthenticationDatabase( bool backup, QString *backuppath /In,Out/ = 0 ); %Docstring Erase all rows from all tables in authentication database + :param backup: Whether to backup of current database :param backuppath: Where the backup is locate :return: Whether operation succeeded -:rtype: bool - %End @@ -378,72 +327,65 @@ Erase all rows from all tables in authentication database const QString &dataprovider = QString() ); %Docstring Provider call to update a QNetworkRequest with an authentication config + :param request: The QNetworkRequest :param authcfg: Associated authentication config id :param dataprovider: Provider key filter, offering logic branching in authentication method :return: Whether operation succeeded -:rtype: bool - %End bool updateNetworkReply( QNetworkReply *reply, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Provider call to update a QNetworkReply with an authentication config (used to skip known SSL errors, etc.) + :param reply: The QNetworkReply :param authcfg: Associated authentication config id :param dataprovider: Provider key filter, offering logic branching in authentication method :return: Whether operation succeeded -:rtype: bool - %End bool updateDataSourceUriItems( QStringList &connectionItems /In,Out/, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Provider call to update a QgsDataSourceUri with an authentication config + :param connectionItems: The connection items, e.g. username=myname, of QgsDataSourceUri :param authcfg: Associated authentication config id :param dataprovider: Provider key filter, offering logic branching in authentication method :return: Whether operation succeeded -:rtype: bool - %End bool updateNetworkProxy( QNetworkProxy &proxy /In,Out/, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Provider call to update a QNetworkProxy with an authentication config + :param proxy: the QNetworkProxy :param authcfg: Associated authentication config id :param dataprovider: Provider key filter, offering logic branching in authentication method :return: Whether operation succeeded -:rtype: bool - %End bool storeAuthSetting( const QString &key, const QVariant &value, bool encrypt = false ); %Docstring Store an authentication setting (stored as string via QVariant( value ).toString() ) - -:rtype: bool %End QVariant authSetting( const QString &key, const QVariant &defaultValue = QVariant(), bool decrypt = false ); %Docstring authSetting get an authentication setting (retrieved as string and returned as QVariant( QString )) + :param key: setting key :param defaultValue: :param decrypt: if the value needs decrypted :return: QVariant( QString ) authentication setting -:rtype: QVariant - .. versionadded:: 3.0 %End @@ -451,40 +393,31 @@ Store an authentication setting (stored as string via QVariant( value ).toString bool existsAuthSetting( const QString &key ); %Docstring Check if an authentication setting exists - -:rtype: bool %End bool removeAuthSetting( const QString &key ); %Docstring Remove an authentication setting - -:rtype: bool %End bool initSslCaches(); %Docstring Initialize various SSL authentication caches - -:rtype: bool %End bool storeCertIdentity( const QSslCertificate &cert, const QSslKey &key ); %Docstring Store a certificate identity - -:rtype: bool %End const QSslCertificate certIdentity( const QString &id ); %Docstring certIdentity get a certificate identity by ``id`` (sha hash) + :param id: sha hash of the cert :return: the certificate -:rtype: QSslCertificate - .. versionadded:: 3.0 %End @@ -493,11 +426,10 @@ Store a certificate identity const QStringList certIdentityBundleToPem( const QString &id ); %Docstring certIdentityBundleToPem get a certificate identity bundle by ``id`` (sha hash) returned as PEM text + :param id: sha hash :return: a list of strings -:rtype: list of str - .. versionadded:: 3.0 %End @@ -507,8 +439,6 @@ Store a certificate identity certIdentities get certificate identities :return: list of certificates -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -519,8 +449,6 @@ Store a certificate identity certIdentityIds get list of certificate identity ids from database :return: list of certificate ids -:rtype: list of str - .. versionadded:: 3.0 %End @@ -528,34 +456,27 @@ Store a certificate identity bool existsCertIdentity( const QString &id ); %Docstring Check if a certificate identity exists - -:rtype: bool %End bool removeCertIdentity( const QString &id ); %Docstring Remove a certificate identity - -:rtype: bool %End bool storeSslCertCustomConfig( const QgsAuthConfigSslServer &config ); %Docstring Store an SSL certificate custom config - -:rtype: bool %End const QgsAuthConfigSslServer sslCertCustomConfig( const QString &id, const QString &hostport ); %Docstring sslCertCustomConfig get an SSL certificate custom config by ``id`` (sha hash) and ``hostport`` (host:port) + :param id: sha hash :param hostport: string host:port :return: a SSL certificate custom config -:rtype: QgsAuthConfigSslServer - .. versionadded:: 3.0 %End @@ -563,11 +484,10 @@ Store an SSL certificate custom config const QgsAuthConfigSslServer sslCertCustomConfigByHost( const QString &hostport ); %Docstring sslCertCustomConfigByHost get an SSL certificate custom config by ``hostport`` (host:port) + :param hostport: host:port :return: a SSL certificate custom config -:rtype: QgsAuthConfigSslServer - .. versionadded:: 3.0 %End @@ -577,8 +497,6 @@ Store an SSL certificate custom config sslCertCustomConfigs get SSL certificate custom configs :return: list of SSL certificate custom config -:rtype: list of QgsAuthConfigSslServer - .. versionadded:: 3.0 %End @@ -586,15 +504,11 @@ Store an SSL certificate custom config bool existsSslCertCustomConfig( const QString &id, const QString &hostport ); %Docstring Check if SSL certificate custom config exists - -:rtype: bool %End bool removeSslCertCustomConfig( const QString &id, const QString &hostport ); %Docstring Remove an SSL certificate custom config - -:rtype: bool %End @@ -606,48 +520,37 @@ Utility function to dump the cache for debug purposes bool updateIgnoredSslErrorsCacheFromConfig( const QgsAuthConfigSslServer &config ); %Docstring Update ignored SSL error cache with possible ignored SSL errors, using server config - -:rtype: bool %End bool updateIgnoredSslErrorsCache( const QString &shahostport, const QList &errors ); %Docstring Update ignored SSL error cache with possible ignored SSL errors, using sha:host:port key - -:rtype: bool %End bool rebuildIgnoredSslErrorCache(); %Docstring Rebuild ignoredSSL error cache - -:rtype: bool %End bool storeCertAuthorities( const QList &certs ); %Docstring Store multiple certificate authorities - -:rtype: bool %End bool storeCertAuthority( const QSslCertificate &cert ); %Docstring Store a certificate authority - -:rtype: bool %End const QSslCertificate certAuthority( const QString &id ); %Docstring certAuthority get a certificate authority by ``id`` (sha hash) + :param id: sha hash :return: a certificate -:rtype: QSslCertificate - .. versionadded:: 3.0 %End @@ -655,15 +558,11 @@ Store a certificate authority bool existsCertAuthority( const QSslCertificate &cert ); %Docstring Check if a certificate authority exists - -:rtype: bool %End bool removeCertAuthority( const QSslCertificate &cert ); %Docstring Remove a certificate authority - -:rtype: bool %End const QList systemRootCAs(); @@ -671,8 +570,6 @@ Remove a certificate authority systemRootCAs get root system certificate authorities :return: list of certificate authorities -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -682,8 +579,6 @@ Remove a certificate authority extraFileCAs extra file-based certificate authorities :return: list of certificate authorities -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -693,8 +588,6 @@ Remove a certificate authority databaseCAs get database-stored certificate authorities :return: list of certificate authorities -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -704,8 +597,6 @@ Remove a certificate authority mappedDatabaseCAs get sha1-mapped database-stored certificate authorities :return: sha1-mapped certificate authorities -:rtype: QMap - .. versionadded:: 3.0 %End @@ -714,25 +605,20 @@ Remove a certificate authority bool rebuildCaCertsCache(); %Docstring Rebuild certificate authority cache - -:rtype: bool %End bool storeCertTrustPolicy( const QSslCertificate &cert, QgsAuthCertUtils::CertTrustPolicy policy ); %Docstring Store user trust value for a certificate - -:rtype: bool %End QgsAuthCertUtils::CertTrustPolicy certTrustPolicy( const QSslCertificate &cert ); %Docstring certTrustPolicy get whether certificate ``cert`` is trusted by user + :param cert: :return: DefaultTrust if certificate sha not in trust table, i.e. follows default trust policy -:rtype: QgsAuthCertUtils.CertTrustPolicy - .. versionadded:: 3.0 %End @@ -740,25 +626,20 @@ Store user trust value for a certificate bool removeCertTrustPolicies( const QList &certs ); %Docstring Remove a group certificate authorities - -:rtype: bool %End bool removeCertTrustPolicy( const QSslCertificate &cert ); %Docstring Remove a certificate authority - -:rtype: bool %End QgsAuthCertUtils::CertTrustPolicy certificateTrustPolicy( const QSslCertificate &cert ); %Docstring certificateTrustPolicy get trust policy for a particular certificate ``cert`` + :param cert: :return: DefaultTrust if certificate sha not in trust table, i.e. follows default trust policy -:rtype: QgsAuthCertUtils.CertTrustPolicy - .. versionadded:: 3.0 %End @@ -766,15 +647,11 @@ Remove a certificate authority bool setDefaultCertTrustPolicy( QgsAuthCertUtils::CertTrustPolicy policy ); %Docstring Set the default certificate trust policy perferred by user - -:rtype: bool %End QgsAuthCertUtils::CertTrustPolicy defaultCertTrustPolicy(); %Docstring Get the default certificate trust policy perferred by user - -:rtype: QgsAuthCertUtils.CertTrustPolicy %End const QMap certTrustCache(); @@ -782,8 +659,6 @@ Get the default certificate trust policy perferred by user certTrustCache get cache of certificate sha1s, per trust policy :return: trust-policy-mapped certificate sha1s -:rtype: QMap - .. versionadded:: 3.0 %End @@ -791,18 +666,15 @@ Get the default certificate trust policy perferred by user bool rebuildCertTrustCache(); %Docstring Rebuild certificate authority cache - -:rtype: bool %End const QList trustedCaCerts( bool includeinvalid = false ); %Docstring trustedCaCerts get list of all trusted CA certificates + :param includeinvalid: whether invalid certs needs to be returned :return: list of certificates -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -812,8 +684,6 @@ Rebuild certificate authority cache untrustedCaCerts get list of untrusted certificate authorities :return: list of certificates -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -821,8 +691,6 @@ Rebuild certificate authority cache bool rebuildTrustedCaCertsCache(); %Docstring Rebuild trusted certificate authorities cache - -:rtype: bool %End const QList trustedCaCertsCache(); @@ -830,8 +698,6 @@ Rebuild trusted certificate authorities cache trustedCaCertsCache cache of trusted certificate authorities, ready for network connections :return: list of certificates -:rtype: list of QSslCertificate - .. versionadded:: 3.0 %End @@ -841,8 +707,6 @@ Rebuild trusted certificate authorities cache trustedCaCertsPemText get concatenated string of all trusted CA certificates :return: bye array with all PEM encoded trusted CAs -:rtype: QByteArray - .. versionadded:: 3.0 %End @@ -882,6 +746,7 @@ mainly used in the tests to exit main application loop void messageOut( const QString &message, const QString &tag = QgsAuthManager::AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = QgsAuthManager::INFO ) const; %Docstring Custom logging signal to relay to console output and QgsMessageLog + :param message: Message to send :param tag: Associated tag (title) :param level: Message log level @@ -892,6 +757,7 @@ Custom logging signal to relay to console output and QgsMessageLog void passwordHelperMessageOut( const QString &message, const QString &tag = QgsAuthManager::AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = QgsAuthManager::INFO ); %Docstring Custom logging signal to inform the user about master password <-> password manager interactions + :param message: Message to send :param tag: Associated tag (title) :param level: Message log level @@ -903,6 +769,7 @@ Custom logging signal to inform the user about master password <-> password mana void masterPasswordVerified( bool verified ); %Docstring Emitted when a password has been verify (or not) + :param verified: The state of password's verification %End diff --git a/python/core/auth/qgsauthmethod.sip b/python/core/auth/qgsauthmethod.sip index 6d3c5ac6cc0d..6d373c5c6031 100644 --- a/python/core/auth/qgsauthmethod.sip +++ b/python/core/auth/qgsauthmethod.sip @@ -37,29 +37,21 @@ Abstract base class for authentication method plugins virtual QString key() const = 0; %Docstring A non-translated short name representing the auth method - -:rtype: str %End virtual QString description() const = 0; %Docstring A non-translated short description representing the auth method for use in debug output and About dialog - -:rtype: str %End virtual QString displayDescription() const = 0; %Docstring Translatable display version of the 'description()' - -:rtype: str %End int version() const; %Docstring Increment this if method is significantly updated, allow updater code to be written for previously stored authcfg - -:rtype: int %End QgsAuthMethod::Expansions supportedExpansions() const; @@ -67,8 +59,6 @@ Increment this if method is significantly updated, allow updater code to be writ Flags that represent the update points (where authentication configurations are expanded) supported by an authentication method. -:rtype: QgsAuthMethod.Expansions - .. note:: These should directly correlate to existing 'update*()' member functions @@ -78,64 +68,58 @@ supported by an authentication method. %Docstring The data providers that the method supports, allowing for filtering out authcfgs that are not applicable to a given provider, or where the updating code is not currently implemented. - -:rtype: list of str %End virtual bool updateNetworkRequest( QNetworkRequest &request, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Update a network request with authentication components + :param request: The network request to update :param authcfg: Authentication configuration ID :param dataprovider: Textual key for a data provider, e.g. 'postgres', that allows for custom updater code specific to the provider :return: Whether the update succeeded -:rtype: bool - %End virtual bool updateNetworkReply( QNetworkReply *reply, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Update a network reply with authentication components + :param reply: The network reply object to update :param authcfg: Authentication configuration ID :param dataprovider: Textual key for a data provider, e.g. 'postgres', that allows for custom updater code specific to the provider :return: Whether the update succeeded -:rtype: bool - %End virtual bool updateDataSourceUriItems( QStringList &connectionItems, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Update data source connection items with authentication components + :param connectionItems: QStringlist of 'key=value' pairs, as utilized in QgsDataSourceUri.connectionInfo() :param authcfg: Authentication configuration ID :param dataprovider: Textual key for a data provider, e.g. 'postgres', that allows for custom updater code specific to the provider :return: Whether the update succeeded -:rtype: bool - %End virtual bool updateNetworkProxy( QNetworkProxy &proxy, const QString &authcfg, const QString &dataprovider = QString() ); %Docstring Update proxy settings with authentication components + :param proxy: :param authcfg: Authentication configuration ID :param dataprovider: Textual key for a data provider, e.g. 'proxy', that allows for custom updater code specific to the provider :return: Whether the update succeeded -:rtype: bool - %End virtual void clearCachedConfig( const QString &authcfg ) = 0; @@ -173,8 +157,6 @@ Construct a default authentication method static QString authMethodTag(); %Docstring Tag signifying that this is an authentcation method (e.g. for use as title in message log panel output) - -:rtype: str %End void setVersion( int version ); diff --git a/python/core/composer/qgsatlascomposition.sip b/python/core/composer/qgsatlascomposition.sip index d7ac1cec7f94..c1fb94806bdc 100644 --- a/python/core/composer/qgsatlascomposition.sip +++ b/python/core/composer/qgsatlascomposition.sip @@ -33,8 +33,6 @@ QgsAtlasComposition which is automatically created and attached to the compositi Returns whether the atlas generation is enabled :return: true if atlas is enabled -:rtype: bool - .. seealso:: :py:func:`setEnabled` %End @@ -42,6 +40,7 @@ Returns whether the atlas generation is enabled void setEnabled( bool enabled ); %Docstring Sets whether the atlas is enabled + :param enabled: set to true to enable to atlas .. seealso:: :py:func:`enabled` @@ -52,8 +51,6 @@ Sets whether the atlas is enabled Returns true if the atlas is set to hide the coverage layer :return: true if coverage layer is hidden -:rtype: bool - .. seealso:: :py:func:`setHideCoverage` %End @@ -61,6 +58,7 @@ Returns true if the atlas is set to hide the coverage layer void setHideCoverage( bool hide ); %Docstring Sets whether the coverage layer should be hidden in map items in the composition + :param hide: set to true to hide the coverage layer .. seealso:: :py:func:`hideCoverage` @@ -72,8 +70,6 @@ Returns the filename expression used for generating output filenames for each atlas page. :return: filename pattern -:rtype: str - .. seealso:: :py:func:`setFilenamePattern` @@ -90,7 +86,6 @@ Sets the filename expression used for generating output filenames for each atlas page. :return: true if filename expression could be successful set, false if expression is invalid -:rtype: bool :param pattern: expression to use for output filenames @@ -108,8 +103,6 @@ atlas page. Returns an error string from parsing the filename expression. :return: filename pattern parser error -:rtype: str - .. seealso:: :py:func:`setFilenamePattern` @@ -121,8 +114,6 @@ Returns an error string from parsing the filename expression. Returns the coverage layer used for the atlas features :return: atlas coverage layer -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setCoverageLayer` %End @@ -130,6 +121,7 @@ Returns the coverage layer used for the atlas features void setCoverageLayer( QgsVectorLayer *layer ); %Docstring Sets the coverage layer to use for the atlas features + :param layer: vector coverage layer .. seealso:: :py:func:`coverageLayer` @@ -140,8 +132,6 @@ Sets the coverage layer to use for the atlas features Returns the expression used for calculating the page name. :return: expression string, or field name from coverage layer -:rtype: str - .. seealso:: :py:func:`setPageNameExpression` @@ -153,6 +143,7 @@ Returns the expression used for calculating the page name. void setPageNameExpression( const QString &pageNameExpression ); %Docstring Sets the expression used for calculating the page name. + :param pageNameExpression: expression string, or field name from coverage layer .. seealso:: :py:func:`pageNameExpression` @@ -163,11 +154,10 @@ Sets the expression used for calculating the page name. QString nameForPage( int pageNumber ) const; %Docstring Returns the calculated name for a specified atlas page number. + :param pageNumber: number of page, where 0 = first page :return: page name -:rtype: str - .. seealso:: :py:func:`pageNameExpression` @@ -180,8 +170,6 @@ Returns whether the atlas will be exported to a single file. This is only applicable for PDF exports. :return: true if atlas will be exported to a single file -:rtype: bool - .. seealso:: :py:func:`setSingleFile` @@ -194,6 +182,7 @@ applicable for PDF exports. %Docstring Sets whether the atlas should be exported to a single file. This is only applicable for PDF exports. + :param single: set to true to export atlas to a single file. .. seealso:: :py:func:`singleFile` @@ -208,8 +197,6 @@ applicable for PDF exports. Returns the atlas file format used for image exports. :return: true if atlas will be exported to a single file -:rtype: str - .. seealso:: :py:func:`setFileFormat` @@ -223,6 +210,7 @@ Returns the atlas file format used for image exports. void setFileFormat( const QString &format ); %Docstring Sets the atlas file format used for image exports. + :param format: set the file format extension .. seealso:: :py:func:`fileFormat` @@ -235,31 +223,15 @@ Sets the atlas file format used for image exports. %End bool sortFeatures() const; -%Docstring - -:rtype: bool -%End void setSortFeatures( bool doSort ); bool sortAscending() const; -%Docstring - -:rtype: bool -%End void setSortAscending( bool ascending ); bool filterFeatures() const; -%Docstring - -:rtype: bool -%End void setFilterFeatures( bool doFilter ); QString featureFilter() const; -%Docstring - -:rtype: str -%End void setFeatureFilter( const QString &expression ); QString featureFilterErrorString() const; @@ -267,8 +239,6 @@ Sets the atlas file format used for image exports. Returns an error string from parsing the feature filter expression. :return: filename pattern parser error -:rtype: str - .. seealso:: :py:func:`setFilenamePattern` @@ -276,10 +246,6 @@ Returns an error string from parsing the feature filter expression. %End QString sortKeyAttributeName() const; -%Docstring - -:rtype: str -%End void setSortKeyAttributeName( const QString &fieldName ); QVector predefinedScales() const; @@ -288,8 +254,6 @@ Returns the current list of predefined scales for the atlas. This is used for maps which are set to the predefined atlas scaling mode. :return: a vector of doubles representing predefined scales -:rtype: list of qreal - .. seealso:: :py:func:`setPredefinedScales` @@ -300,6 +264,7 @@ for maps which are set to the predefined atlas scaling mode. %Docstring Sets the list of predefined scales for the atlas. This is used for maps which are set to the predefined atlas scaling mode. + :param scales: a vector of doubles representing predefined scales .. seealso:: :py:func:`predefinedScales` @@ -311,8 +276,6 @@ for maps which are set to the predefined atlas scaling mode. %Docstring Begins the rendering. Returns true if successful, false if no matching atlas features found.* - -:rtype: bool %End void endRender(); %Docstring @@ -322,19 +285,16 @@ Ends the rendering. Restores original extent int numFeatures() const; %Docstring Returns the number of features in the coverage layer - -:rtype: int %End bool prepareForFeature( const int i, const bool updateMaps = true ); %Docstring Prepare the atlas map for the given feature. Sets the extent and context variables + :param i: feature number :param updateMaps: set to true to redraw maps and recalculate their extent :return: true if feature was successfully prepared -:rtype: bool - %End bool prepareForFeature( const QgsFeature *feat ); @@ -342,15 +302,11 @@ Prepare the atlas map for the given feature. Sets the extent and context variabl Prepare the atlas map for the given feature. Sets the extent and context variables :return: true if feature was successfully prepared -:rtype: bool - %End QString currentFilename() const; %Docstring Returns the current filename. Must be called after prepareForFeature() - -:rtype: str %End void writeXml( QDomElement &elem, QDomDocument &doc ) const; @@ -358,6 +314,7 @@ Returns the current filename. Must be called after prepareForFeature() void readXml( const QDomElement &elem, const QDomDocument &doc ); %Docstring Reads general atlas settings from xml + :param elem: a QDomElement holding the atlas properties. :param doc: QDomDocument for the source xml. @@ -369,25 +326,17 @@ Reads general atlas settings from xml %End QgsComposition *composition(); -%Docstring - -:rtype: QgsComposition -%End int updateFeatures(); %Docstring Requeries the current atlas coverage layer and applies filtering and sorting. Returns number of matching features. Must be called after prepareForFeature() - -:rtype: int %End QgsFeature feature() const; %Docstring Returns the current atlas feature. Must be called after prepareForFeature(). -:rtype: QgsFeature - .. versionadded:: 2.12 %End @@ -395,8 +344,6 @@ Returns the current atlas feature. Must be called after prepareForFeature(). %Docstring Returns the name of the page for the current atlas feature. Must be called after prepareForFeature(). -:rtype: str - .. versionadded:: 2.12 %End @@ -404,8 +351,6 @@ Returns the name of the page for the current atlas feature. Must be called after %Docstring Returns the current feature number, where a value of 0 corresponds to the first feature. -:rtype: int - .. versionadded:: 2.12 %End @@ -417,8 +362,6 @@ Recalculates the bounds of an atlas driven map QgsGeometry currentGeometry( const QgsCoordinateReferenceSystem &projectedTo = QgsCoordinateReferenceSystem() ) const; %Docstring Returns the current atlas geometry in the given projection system (default to the coverage layer's CRS) - -:rtype: QgsGeometry %End public slots: diff --git a/python/core/composer/qgscomposerarrow.sip b/python/core/composer/qgscomposerarrow.sip index f1a8b31d5315..dbea86e5b4ce 100644 --- a/python/core/composer/qgscomposerarrow.sip +++ b/python/core/composer/qgscomposerarrow.sip @@ -31,12 +31,14 @@ An item that draws an arrow between two points. QgsComposerArrow( QgsComposition *c /TransferThis/ ); %Docstring Constructor + :param c: parent composition %End QgsComposerArrow( QPointF startPoint, QPointF stopPoint, QgsComposition *c /TransferThis/ ); %Docstring Constructor + :param startPoint: start point for line :param stopPoint: end point for line :param c: parent composition @@ -47,8 +49,6 @@ Constructor virtual int type() const; %Docstring Return composer item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -66,6 +66,7 @@ Modifies position of start and endpoint and calls QgsComposerItem.setSceneRect void setArrowHeadWidth( double width ); %Docstring Sets the width of the arrow head in mm + :param width: width of arrow head .. seealso:: :py:func:`arrowHeadWidth` @@ -76,8 +77,6 @@ Sets the width of the arrow head in mm Returns the width of the arrow head in mm :return: width of arrow head -:rtype: float - .. seealso:: :py:func:`setArrowHeadWidth` %End @@ -85,6 +84,7 @@ Returns the width of the arrow head in mm void setStartMarker( const QString &svgPath ); %Docstring Sets the marker to draw at the start of the line + :param svgPath: file path for svg marker graphic to draw .. seealso:: :py:func:`startMarker` @@ -97,8 +97,6 @@ Sets the marker to draw at the start of the line Returns the marker drawn at the start of the line :return: file path for svg marker graphic -:rtype: str - .. seealso:: :py:func:`setStartMarker` @@ -108,6 +106,7 @@ Returns the marker drawn at the start of the line void setEndMarker( const QString &svgPath ); %Docstring Sets the marker to draw at the end of the line + :param svgPath: file path for svg marker graphic to draw .. seealso:: :py:func:`endMarker` @@ -120,8 +119,6 @@ Sets the marker to draw at the end of the line Returns the marker drawn at the end of the line :return: file path for svg marker graphic -:rtype: str - .. seealso:: :py:func:`setEndMarker` @@ -133,8 +130,6 @@ Returns the marker drawn at the end of the line Returns the color used to draw stroke around the the arrow head. :return: arrow head stroke color -:rtype: QColor - .. seealso:: :py:func:`arrowHeadFillColor` @@ -146,6 +141,7 @@ Returns the color used to draw stroke around the the arrow head. void setArrowHeadStrokeColor( const QColor &color ); %Docstring Sets the color used to draw the stroke around the arrow head. + :param color: arrow head stroke color .. seealso:: :py:func:`setArrowHeadFillColor` @@ -160,8 +156,6 @@ Sets the color used to draw the stroke around the arrow head. Returns the color used to fill the arrow head. :return: arrow head fill color -:rtype: QColor - .. seealso:: :py:func:`arrowHeadStrokeColor` @@ -173,6 +167,7 @@ Returns the color used to fill the arrow head. void setArrowHeadFillColor( const QColor &color ); %Docstring Sets the color used to fill the arrow head. + :param color: arrow head fill color .. seealso:: :py:func:`arrowHeadFillColor` @@ -185,6 +180,7 @@ Sets the color used to fill the arrow head. void setArrowHeadStrokeWidth( const double width ); %Docstring Sets the pen width for the stroke of the arrow head + :param width: pen width for arrow head stroke .. seealso:: :py:func:`arrowHeadStrokeWidth` @@ -199,8 +195,6 @@ Sets the pen width for the stroke of the arrow head Returns the pen width for the stroke of the arrow head :return: pen width for arrow head stroke -:rtype: float - .. seealso:: :py:func:`setArrowHeadStrokeWidth` @@ -212,6 +206,7 @@ Returns the pen width for the stroke of the arrow head void setLineSymbol( QgsLineSymbol *symbol /Transfer/ ); %Docstring Sets the line symbol used for drawing the line portion of the arrow + :param symbol: line symbol .. seealso:: :py:func:`lineSymbol` @@ -224,8 +219,6 @@ Sets the line symbol used for drawing the line portion of the arrow Returns the line symbol used for drawing the line portion of the arrow :return: line symbol -:rtype: QgsLineSymbol - .. seealso:: :py:func:`setLineSymbol` @@ -237,8 +230,6 @@ Returns the line symbol used for drawing the line portion of the arrow Returns marker mode, which controls how the arrow endpoints are drawn :return: marker mode -:rtype: MarkerMode - .. seealso:: :py:func:`setMarkerMode` %End @@ -246,6 +237,7 @@ Returns marker mode, which controls how the arrow endpoints are drawn void setMarkerMode( MarkerMode mode ); %Docstring Sets the marker mode, which controls how the arrow endpoints are drawn + :param mode: marker mode .. seealso:: :py:func:`setMarkerMode` @@ -255,20 +247,18 @@ Sets the marker mode, which controls how the arrow endpoints are drawn %Docstring Stores state in DOM element + :param elem: is DOM element corresponding to 'Composer' tag :param doc: document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from DOM document + :param itemElem: is DOM node corresponding to item tag :param doc: is the document to read - -:rtype: bool %End }; diff --git a/python/core/composer/qgscomposerattributetablemodelv2.sip b/python/core/composer/qgscomposerattributetablemodelv2.sip index b1f124c4e72b..29436a8549e1 100644 --- a/python/core/composer/qgscomposerattributetablemodelv2.sip +++ b/python/core/composer/qgscomposerattributetablemodelv2.sip @@ -32,6 +32,7 @@ A model for displaying columns shown in a QgsComposerAttributeTableV2 QgsComposerAttributeTableColumnModelV2( QgsComposerAttributeTableV2 *composerTable, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsComposerAttributeTableColumnModel. + :param composerTable: QgsComposerAttributeTable the model is attached to :param parent: optional parent %End @@ -63,7 +64,6 @@ Moves the specified row up or down in the model. Used for rearranging the attrib columns. :return: true if the move is allowed -:rtype: bool :param row: row in model representing attribute table column to move :param direction: direction to move the attribute table column @@ -84,7 +84,6 @@ attribute table columns and column customisations. Returns the QgsComposerTableColumn corresponding to an index in the model. :return: QgsComposerTableColumn for specified index -:rtype: QgsComposerTableColumn :param index: a QModelIndex @@ -98,7 +97,6 @@ Returns the QgsComposerTableColumn corresponding to an index in the model. Returns a QModelIndex corresponding to a QgsComposerTableColumn in the model. :return: QModelIndex for specified QgsComposerTableColumn -:rtype: QModelIndex :param column: a QgsComposerTableColumn @@ -111,6 +109,7 @@ Returns a QModelIndex corresponding to a QgsComposerTableColumn in the model. %Docstring Sets a specified column as a sorted column in the QgsComposerAttributeTable. The column will be added to the end of the sort rank list, ie it will take the next largest available sort rank. + :param column: a QgsComposerTableColumn :param order: sort order for column @@ -125,6 +124,7 @@ added to the end of the sort rank list, ie it will take the next largest availab %Docstring Sets a specified column as an unsorted column in the QgsComposerAttributeTable. The column will be removed from the sort rank list. + :param column: a QgsComposerTableColumn .. versionadded:: 2.3 @@ -135,11 +135,10 @@ removed from the sort rank list. bool moveColumnInSortRank( QgsComposerTableColumn *column, ShiftDirection direction ); %Docstring Moves a column up or down in the sort rank for the QgsComposerAttributeTable. + :param column: a QgsComposerTableColumn :param direction: direction to move the column in the sort rank list -:rtype: bool - .. versionadded:: 2.3 .. seealso:: :py:func:`setColumnAsSorted` @@ -169,6 +168,7 @@ Allows for filtering QgsComposerAttributeTable columns by columns which are sort QgsComposerTableSortColumnsProxyModelV2( QgsComposerAttributeTableV2 *composerTable, ColumnFilterType filterType, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsComposerTableSortColumnsProxyModel. + :param composerTable: QgsComposerAttributeTable the model is attached to :param filterType: filter for columns, controls whether sorted or unsorted columns are shown :param parent: optional parent @@ -192,7 +192,6 @@ Constructor for QgsComposerTableSortColumnsProxyModel. Returns the QgsComposerTableColumn corresponding to a row in the proxy model. :return: QgsComposerTableColumn for specified row -:rtype: QgsComposerTableColumn :param row: a row number @@ -206,7 +205,6 @@ Returns the QgsComposerTableColumn corresponding to a row in the proxy model. Returns the QgsComposerTableColumn corresponding to an index in the proxy model. :return: QgsComposerTableColumn for specified index -:rtype: QgsComposerTableColumn :param index: a QModelIndex @@ -223,7 +221,6 @@ Returns the QgsComposerTableColumn corresponding to an index from the source QgsComposerAttributeTableColumnModel model. :return: QgsComposerTableColumn for specified index from QgsComposerAttributeTableColumnModel -:rtype: QgsComposerTableColumn :param sourceIndex: a QModelIndex diff --git a/python/core/composer/qgscomposerattributetablev2.sip b/python/core/composer/qgscomposerattributetablev2.sip index ee1731932d47..6b41af711b4d 100644 --- a/python/core/composer/qgscomposerattributetablev2.sip +++ b/python/core/composer/qgscomposerattributetablev2.sip @@ -26,20 +26,18 @@ Helper class for sorting tables, takes into account sorting column and ascending Constructor for QgsComposerAttributeTableCompareV2. %End bool operator()( const QgsComposerTableRow &m1, const QgsComposerTableRow &m2 ); -%Docstring - -:rtype: bool -%End void setSortColumn( int col ); %Docstring Sets column number to sort by + :param col: column number for sorting %End void setAscending( bool asc ); %Docstring Sets sort order for column sorting + :param asc: set to true to sort in ascending order, false to sort in descending order %End @@ -73,12 +71,11 @@ A table that displays attributes from a vector layer %Docstring Writes properties specific to attribute tables + :param elem: an existing QDomElement in which to store the attribute table's properties. :param doc: QDomDocument for the destination xml. :param ignoreFrames: ignore frames -:rtype: bool - .. seealso:: :py:func:`readXml` %End @@ -86,12 +83,11 @@ Writes properties specific to attribute tables %Docstring Reads the properties specific to an attribute table from xml. + :param itemElem: a QDomElement holding the attribute table's desired properties. :param doc: QDomDocument for the source xml. :param ignoreFrames: ignore frames -:rtype: bool - .. seealso:: :py:func:`writeXml` %End @@ -101,6 +97,7 @@ Reads the properties specific to an attribute table from xml. void setSource( const ContentSource source ); %Docstring Sets the source for attributes to show in table body. + :param source: content source .. seealso:: :py:func:`source` @@ -111,8 +108,6 @@ Sets the source for attributes to show in table body. Returns the source for attributes shown in the table body. :return: content source -:rtype: ContentSource - .. seealso:: :py:func:`setSource` %End @@ -125,13 +120,12 @@ atlas coverage layer. If the table is set to layer attributes mode, then the source layer will be the user specified vector layer. :return: actual source layer -:rtype: QgsVectorLayer - %End void setVectorLayer( QgsVectorLayer *layer ); %Docstring Sets the vector layer from which to display feature attributes + :param layer: Vector layer for attribute table .. seealso:: :py:func:`vectorLayer` @@ -142,8 +136,6 @@ Sets the vector layer from which to display feature attributes Returns the vector layer the attribute table is currently using :return: attribute table's current vector layer -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setVectorLayer` %End @@ -151,6 +143,7 @@ Returns the vector layer the attribute table is currently using void setRelationId( const QString &relationId ); %Docstring Sets the relation id from which to display child features + :param relationId: id for relation to display child features from .. seealso:: :py:func:`relationId` @@ -167,8 +160,6 @@ Sets the relation id from which to display child features Returns the relation id which the table displays child features from :return: relation id -:rtype: str - .. seealso:: :py:func:`setRelationId` @@ -193,6 +184,7 @@ attribute table. This setting only has an effect if setDisplayOnlyVisibleFeature set to true. Changing the composer map forces the table to refetch features from its vector layer, and may result in the table changing size to accommodate the new displayed feature attributes. + :param map: QgsComposerMap which drives the extents of the table's features .. seealso:: :py:func:`composerMap` @@ -206,8 +198,6 @@ Returns the composer map whose extents are controlling the features shown in the table. The extents of the map are only used if displayOnlyVisibleFeatures() is true. :return: composer map controlling the attribute table -:rtype: QgsComposerMap - .. seealso:: :py:func:`setComposerMap` @@ -219,6 +209,7 @@ table. The extents of the map are only used if displayOnlyVisibleFeatures() is t Sets the maximum number of features shown by the table. Changing this setting may result in the attribute table changing its size to accommodate the new number of rows, and requires the table to refetch features from its vector layer. + :param features: maximum number of features to show in the table .. seealso:: :py:func:`maximumNumberOfFeatures` @@ -229,8 +220,6 @@ the table to refetch features from its vector layer. Returns the maximum number of features to be shown by the table. :return: maximum number of features -:rtype: int - .. seealso:: :py:func:`setMaximumNumberOfFeatures` %End @@ -238,6 +227,7 @@ Returns the maximum number of features to be shown by the table. void setUniqueRowsOnly( const bool uniqueOnly ); %Docstring Sets attribute table to only show unique rows. + :param uniqueOnly: set to true to show only unique rows. Duplicate rows will be stripped from the table. @@ -249,8 +239,6 @@ will be stripped from the table. Returns true if the table is set to show only unique rows. :return: true if table only shows unique rows and is stripping out -:rtype: bool - duplicate rows. .. seealso:: :py:func:`setUniqueRowsOnly` @@ -261,6 +249,7 @@ duplicate rows. Sets attribute table to only show features which are visible in a composer map item. Changing this setting forces the table to refetch features from its vector layer, and may result in the table changing size to accommodate the new displayed feature attributes. + :param visibleOnly: set to true to show only visible features .. seealso:: :py:func:`displayOnlyVisibleFeatures` @@ -274,8 +263,6 @@ Returns true if the table is set to show only features visible on a correspondin composer map item. :return: true if table only shows visible features -:rtype: bool - .. seealso:: :py:func:`composerMap` @@ -286,6 +273,7 @@ composer map item. %Docstring Sets attribute table to only show features which intersect the current atlas feature. + :param filterToAtlas: set to true to show only features which intersect the atlas feature @@ -298,8 +286,6 @@ Returns true if the table is set to only show features which intersect the curre feature. :return: true if table only shows features which intersect the atlas feature -:rtype: bool - .. seealso:: :py:func:`setFilterToAtlasFeature` %End @@ -309,8 +295,6 @@ feature. Returns true if a feature filter is active on the attribute table :return: bool state of the feature filter -:rtype: bool - .. seealso:: :py:func:`setFilterFeatures` @@ -322,6 +306,7 @@ Returns true if a feature filter is active on the attribute table Sets whether the feature filter is active for the attribute table. Changing this setting forces the table to refetch features from its vector layer, and may result in the table changing size to accommodate the new displayed feature attributes. + :param filter: Set to true to enable the feature filter .. seealso:: :py:func:`filterFeatures` @@ -335,8 +320,6 @@ Returns the current expression used to filter features for the table. The filter active if filterFeatures() is true. :return: feature filter expression -:rtype: str - .. seealso:: :py:func:`setFeatureFilter` @@ -349,6 +332,7 @@ Sets the expression used for filtering features in the table. The filter is only active if filterFeatures() is set to true. Changing this setting forces the table to refetch features from its vector layer, and may result in the table changing size to accommodate the new displayed feature attributes. + :param expression: filter to use for selecting which features to display in the table .. seealso:: :py:func:`featureFilter` @@ -359,6 +343,7 @@ the table changing size to accommodate the new displayed feature attributes. void setDisplayedFields( const QStringList &fields, bool refresh = true ); %Docstring Sets the attributes to display in the table. + :param fields: list of fields names from the vector layer to show. Set to an empty list to show all feature attributes. :param refresh: set to true to force the table to refetch features from its vector layer @@ -373,6 +358,7 @@ to accommodate the new displayed feature attributes. %Docstring Sets a string to wrap the contents of the table cells by. Occurrences of this string will be replaced by a line break. + :param wrapString: string to replace with line break .. versionadded:: 2.12 @@ -386,8 +372,6 @@ Returns the string used to wrap the contents of the table cells by. Occurrences be replaced by a line break. :return: string which will be replaced with line break -:rtype: str - .. versionadded:: 2.12 diff --git a/python/core/composer/qgscomposerframe.sip b/python/core/composer/qgscomposerframe.sip index 7c067de2642c..959a65a8c054 100644 --- a/python/core/composer/qgscomposerframe.sip +++ b/python/core/composer/qgscomposerframe.sip @@ -25,6 +25,7 @@ Frame item for a composer multiframe item. %Docstring Sets the visible part of the multiframe's content which is visible within this frame (relative to the total multiframe extent in mm). + :param section: visible portion of content .. seealso:: :py:func:`extent` @@ -35,8 +36,6 @@ this frame (relative to the total multiframe extent in mm). Returns the parent multiframe for the frame. :return: parent multiframe -:rtype: QgsComposerMultiFrame - %End virtual QString displayName() const; @@ -63,8 +62,6 @@ Returns the visible portion of the multi frame's content which is shown in this frame. :return: extent of visible portion -:rtype: QRectF - .. versionadded:: 2.5 @@ -76,8 +73,6 @@ is shown in this frame. Returns whether the page should be hidden (ie, not included in composer exports) if this frame is empty :return: true if page should be hidden if frame is empty -:rtype: bool - .. versionadded:: 2.5 @@ -87,6 +82,7 @@ Returns whether the page should be hidden (ie, not included in composer exports) void setHidePageIfEmpty( const bool hidePageIfEmpty ); %Docstring Sets whether the page should be hidden (ie, not included in composer exports) if this frame is empty + :param hidePageIfEmpty: set to true if page should be hidden if frame is empty .. versionadded:: 2.5 @@ -99,8 +95,6 @@ Sets whether the page should be hidden (ie, not included in composer exports) if Returns whether the background and frame stroke should be hidden if this frame is empty :return: true if background and stroke should be hidden if frame is empty -:rtype: bool - .. versionadded:: 2.5 @@ -110,6 +104,7 @@ Returns whether the background and frame stroke should be hidden if this frame i void setHideBackgroundIfEmpty( const bool hideBackgroundIfEmpty ); %Docstring Sets whether the background and frame stroke should be hidden if this frame is empty + :param hideBackgroundIfEmpty: set to true if background and stroke should be hidden if frame is empty .. versionadded:: 2.5 @@ -122,8 +117,6 @@ Sets whether the background and frame stroke should be hidden if this frame is e Returns whether the frame is empty :return: true if frame is empty -:rtype: bool - .. versionadded:: 2.5 diff --git a/python/core/composer/qgscomposerhtml.sip b/python/core/composer/qgscomposerhtml.sip index 78ffa1deaa4a..b4aed251f47b 100644 --- a/python/core/composer/qgscomposerhtml.sip +++ b/python/core/composer/qgscomposerhtml.sip @@ -30,6 +30,7 @@ class QgsComposerHtml: QgsComposerMultiFrame void setContentMode( ContentMode mode ); %Docstring Sets the source mode for item's HTML content. + :param mode: ContentMode for the item's source .. seealso:: :py:func:`contentMode` @@ -46,8 +47,6 @@ Sets the source mode for item's HTML content. Returns the source mode for item's HTML content. :return: ContentMode for the item's source -:rtype: ContentMode - .. seealso:: :py:func:`setContentMode` @@ -63,6 +62,7 @@ Returns the source mode for item's HTML content. Sets the URL for content to display in the item when the item is using the QgsComposerHtml.Url mode. Content is automatically fetched and the HTML item refreshed after calling this function. + :param url: URL of content to display in the item .. seealso:: :py:func:`url` @@ -76,8 +76,6 @@ Returns the URL of the content displayed in the item if the item is using the QgsComposerHtml.Url mode. :return: url for content displayed in item -:rtype: QUrl - .. seealso:: :py:func:`setUrl` @@ -90,6 +88,7 @@ Sets the HTML to display in the item when the item is using the QgsComposerHtml.ManualHtml mode. Setting the HTML using this function does not automatically refresh the item's contents. Call loadHtml to trigger a refresh of the item after setting the HTML content. + :param html: HTML to display in item .. seealso:: :py:func:`html` @@ -107,8 +106,6 @@ Returns the HTML source displayed in the item if the item is using the QgsComposerHtml.ManualHtml mode. :return: HTML displayed in item -:rtype: str - .. seealso:: :py:func:`setHtml` @@ -125,8 +122,6 @@ treated as a QGIS expression and evaluated against the current atlas feature. :return: true if html item will evaluate expressions in the content -:rtype: bool - .. seealso:: :py:func:`setEvaluateExpressions` @@ -139,6 +134,7 @@ Sets whether the html item will evaluate QGIS expressions prior to rendering the HTML content. If set, any content inside [% %] tags will be treated as a QGIS expression and evaluated against the current atlas feature. + :param evaluateExpressions: set to true to evaluate expressions in the HTML content .. seealso:: :py:func:`evaluateExpressions` @@ -152,8 +148,6 @@ Returns whether html item is using smart breaks. Smart breaks prevent the html frame contents from breaking mid-way though a line of text. :return: true if html item is using smart breaks -:rtype: bool - .. seealso:: :py:func:`setUseSmartBreaks` %End @@ -162,6 +156,7 @@ the html frame contents from breaking mid-way though a line of text. %Docstring Sets whether the html item should use smart breaks. Smart breaks prevent the html frame contents from breaking mid-way though a line of text. + :param useSmartBreaks: set to true to prevent content from breaking mid-way through a line of text @@ -176,6 +171,7 @@ at the bottom of a frame after calculating the optimum break location. Setting a larger value will result in better choice of page break location, but more wasted space at the bottom of frames. This setting is only effective if useSmartBreaks is true. + :param maxBreakDistance: maximum amount of empty space to leave when calculating page break locations @@ -194,8 +190,6 @@ at the bottom of a frame after calculating the optimum break location. This sett is only effective if useSmartBreaks is true. :return: maximum amount of empty space to leave when calculating page break locations -:rtype: float - .. versionadded:: 2.3 @@ -210,6 +204,7 @@ Sets the user stylesheet CSS rules to use while rendering the HTML content. Thes allow for overriding the styles specified within the HTML source. Setting the stylesheet using this function does not automatically refresh the item's contents. Call loadHtml to trigger a refresh of the item after setting the stylesheet rules. + :param stylesheet: CSS rules for user stylesheet .. seealso:: :py:func:`userStylesheet` @@ -227,8 +222,6 @@ Returns the user stylesheet CSS rules used while rendering the HTML content. The overriding the styles specified within the HTML source. :return: CSS rules for user stylesheet -:rtype: str - .. seealso:: :py:func:`setUserStylesheet` @@ -240,6 +233,7 @@ overriding the styles specified within the HTML source. void setUserStylesheetEnabled( const bool stylesheetEnabled ); %Docstring Sets whether user stylesheets are enabled for the HTML content. + :param stylesheetEnabled: set to true to enable user stylesheets .. seealso:: :py:func:`userStylesheetEnabled` @@ -254,8 +248,6 @@ Sets whether user stylesheets are enabled for the HTML content. Returns whether user stylesheets are enabled for the HTML content. :return: true if user stylesheets are enabled -:rtype: bool - .. seealso:: :py:func:`setUserStylesheetEnabled` @@ -284,6 +276,7 @@ Returns whether user stylesheets are enabled for the HTML content. void loadHtml( const bool useCache = false, const QgsExpressionContext *context = 0 ); %Docstring Reloads the html source from the url and redraws the item. + :param useCache: set to true to use a cached copy of remote html content :param context: expression context for evaluating data defined urls and expressions in html diff --git a/python/core/composer/qgscomposeritem.sip b/python/core/composer/qgscomposeritem.sip index 5a381cf411a4..6e647a5156d3 100644 --- a/python/core/composer/qgscomposeritem.sip +++ b/python/core/composer/qgscomposeritem.sip @@ -82,6 +82,7 @@ A item that forms part of a map composition. QgsComposerItem( QgsComposition *composition /TransferThis/, bool manageZValue = true ); %Docstring Constructor + :param composition: parent composition :param manageZValue: true if the z-Value of this object should be managed by mComposition* %End @@ -89,6 +90,7 @@ Constructor QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition *composition /TransferThis/, bool manageZValue = true ); %Docstring Constructor with box position and composer object + :param x: x coordinate of item :param y: y coordinate of item :param width: width of item @@ -101,8 +103,6 @@ Constructor with box position and composer object virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual bool isRemoved() const; @@ -112,8 +112,6 @@ from the composition are not deleted so that they can be restored via an undo command. :return: true if the item has been removed from the composition -:rtype: bool - .. versionadded:: 2.5 @@ -125,6 +123,7 @@ command. Sets whether this item has been removed from the composition. Items removed from the composition are not deleted so that they can be restored via an undo command. + :param removed: set to true if the item has been removed from the composition .. versionadded:: 2.5 @@ -140,8 +139,6 @@ command. virtual bool selected() const; %Docstring Is selected - -:rtype: bool %End void move( double dx, double dy ); @@ -152,6 +149,7 @@ Moves item in canvas coordinates virtual void moveContent( double dx, double dy ); %Docstring Move Content of item. Does nothing per default (but implemented in composer map) + :param dx: move in x-direction (canvas coordinates) :param dy: move in y-direction(canvas coordinates)* %End @@ -159,6 +157,7 @@ Move Content of item. Does nothing per default (but implemented in composer map) virtual void zoomContent( const double factor, const QPointF point, const ZoomMode mode = QgsComposerItem::Zoom ); %Docstring Zoom content of item. Does nothing per default (but implemented in composer map) + :param factor: zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out :param point: item point for zoom center :param mode: zoom mode @@ -171,8 +170,6 @@ Zoom content of item. Does nothing per default (but implemented in composer map) Gets the page the item is currently on. :return: page number for item, beginning on page 1 -:rtype: int - .. seealso:: :py:func:`pagePos` @@ -186,8 +183,6 @@ Gets the page the item is currently on. Returns the item's position relative to its current page. :return: position relative to the page's top left corner. -:rtype: QPointF - .. seealso:: :py:func:`page` @@ -200,6 +195,7 @@ Returns the item's position relative to its current page. %Docstring Moves the item so that it retains its relative position on the page when the paper size changes. + :param newPageWidth: new width of the page in mm :param newPageHeight: new height of the page in mm @@ -213,6 +209,7 @@ when the paper size changes. void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft, int page = -1 ); %Docstring Moves the item to a new position (in canvas coordinates) + :param x: item position x (mm) :param y: item position y (mm) :param itemPoint: reference point which coincides with specified position @@ -223,6 +220,7 @@ a page number of 1 corresponds to the first page. void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false, int page = -1 ); %Docstring Sets item position and width / height in one go + :param x: item position x (mm) :param y: item position y (mm) :param width: item width (mm) @@ -237,8 +235,6 @@ a page number of 1 corresponds to the first page. %Docstring Returns item's last used position mode. \note: This property has no effect on actual's item position, which is always the top-left corner. * - -:rtype: ItemPositionMode %End virtual void setSceneRect( const QRectF &rectangle ); @@ -250,15 +246,11 @@ corresponds to 1 scene size unit* bool _writeXml( QDomElement &itemElem, QDomDocument &doc ) const; %Docstring Writes parameter that are not subclass specific in document. Usually called from writeXml methods of subclasses - -:rtype: bool %End bool _readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Reads parameter that are not subclass specific in document. Usually called from readXml methods of subclasses - -:rtype: bool %End bool hasFrame() const; @@ -266,8 +258,6 @@ Reads parameter that are not subclass specific in document. Usually called from Whether this item has a frame or not. :return: true if there is a frame around this item, otherwise false. -:rtype: bool - .. seealso:: :py:func:`setFrameEnabled` @@ -281,6 +271,7 @@ Whether this item has a frame or not. virtual void setFrameEnabled( const bool drawFrame ); %Docstring Set whether this item has a frame drawn around it or not. + :param drawFrame: draw frame .. seealso:: :py:func:`hasFrame` @@ -295,6 +286,7 @@ Set whether this item has a frame drawn around it or not. virtual void setFrameStrokeColor( const QColor &color ); %Docstring Sets frame stroke color + :param color: new color for stroke frame .. versionadded:: 2.6 @@ -313,8 +305,6 @@ Sets frame stroke color Returns the frame's stroke color. Only used if hasFrame is true. :return: frame stroke color -:rtype: QColor - .. versionadded:: 2.6 @@ -330,6 +320,7 @@ Returns the frame's stroke color. Only used if hasFrame is true. virtual void setFrameStrokeWidth( const double strokeWidth ); %Docstring Sets frame stroke width + :param strokeWidth: new width for stroke frame .. versionadded:: 2.2 @@ -348,8 +339,6 @@ Sets frame stroke width Returns the frame's stroke width. Only used if hasFrame is true. :return: Frame stroke width -:rtype: float - .. versionadded:: 2.3 @@ -367,8 +356,6 @@ Returns the frame's stroke width. Only used if hasFrame is true. Returns the join style used for drawing the item's frame :return: Join style for stroke frame -:rtype: Qt.PenJoinStyle - .. versionadded:: 2.3 @@ -384,6 +371,7 @@ Returns the join style used for drawing the item's frame void setFrameJoinStyle( const Qt::PenJoinStyle style ); %Docstring Sets join style used when drawing the item's frame + :param style: Join style for stroke frame .. versionadded:: 2.3 @@ -404,8 +392,6 @@ actual rectangle. For instance, if the item has a 2mm frame stroke, then 1mm of this frame is drawn outside the item's rect. In this case the return value will be 1.0 -:rtype: float - .. versionadded:: 2.2 .. seealso:: :py:func:`rectWithFrame` @@ -419,8 +405,6 @@ more details about QGraphicsItem coordinate systems). The results differ from Qt function, as rect() makes no allowances for the portion of outlines which are drawn outside of the item. -:rtype: QRectF - .. versionadded:: 2.2 .. seealso:: :py:func:`estimatedFrameBleed` @@ -431,8 +415,6 @@ outside of the item. Whether this item has a Background or not. :return: true if there is a Background around this item, otherwise false. -:rtype: bool - .. seealso:: :py:func:`setBackgroundEnabled` @@ -442,6 +424,7 @@ Whether this item has a Background or not. void setBackgroundEnabled( const bool drawBackground ); %Docstring Set whether this item has a Background drawn around it or not. + :param drawBackground: draw Background :return: nothing @@ -456,8 +439,6 @@ Set whether this item has a Background drawn around it or not. Gets the background color for this item :return: background color -:rtype: QColor - .. seealso:: :py:func:`setBackgroundColor` @@ -467,6 +448,7 @@ Gets the background color for this item void setBackgroundColor( const QColor &backgroundColor ); %Docstring Sets the background color for this item + :param backgroundColor: new background color :return: nothing @@ -481,8 +463,6 @@ Sets the background color for this item Returns the item's composition blending mode. :return: item blending mode -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode` %End @@ -490,6 +470,7 @@ Returns the item's composition blending mode. void setBlendMode( const QPainter::CompositionMode blendMode ); %Docstring Sets the item's composition blending mode + :param blendMode: blending mode for item .. seealso:: :py:func:`blendMode` @@ -502,8 +483,6 @@ QGraphicsItem.opacity() as any data defined overrides will be respected. :return: opacity as double between 1.0 (opaque) and 0 (transparent). -:rtype: float - .. seealso:: :py:func:`setItemOpacity()` %End @@ -513,6 +492,7 @@ respected. Sets the item's ``opacity``. This method should be used instead of QGraphicsItem.setOpacity() as any data defined overrides will be respected. + :param opacity: double between 1.0 (opaque) and 0 (transparent). .. seealso:: :py:func:`itemOpacity()` @@ -523,8 +503,6 @@ respected. Returns whether effects (e.g., blend modes) are enabled for the item :return: true if effects are enabled -:rtype: bool - .. seealso:: :py:func:`setEffectsEnabled` @@ -536,6 +514,7 @@ Returns whether effects (e.g., blend modes) are enabled for the item void setEffectsEnabled( const bool effectsEnabled ); %Docstring Sets whether effects (e.g., blend modes) are enabled for the item + :param effectsEnabled: set to true to enable effects .. seealso:: :py:func:`effectsEnabled` @@ -556,6 +535,7 @@ Composite operations for item groups do nothing per default void beginCommand( const QString &commandText, QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown ); %Docstring Starts new composer undo command + :param commandText: command title :param c: context for mergeable commands (unknown for non-mergeable commands* %End @@ -571,6 +551,7 @@ Finish current command and push it onto the undo stack void setPositionLock( const bool lock ); %Docstring Locks / unlocks the item position for mouse drags + :param lock: set to true to prevent item movement and resizing via the mouse .. seealso:: :py:func:`positionLock` @@ -581,20 +562,17 @@ Locks / unlocks the item position for mouse drags Returns whether position lock for mouse drags is enabled returns true if item is locked for mouse movement and resizing -:rtype: bool - .. seealso:: :py:func:`setPositionLock` %End double itemRotation( const QgsComposerObject::PropertyValueType valueType = QgsComposerObject::EvaluatedValue ) const; %Docstring Returns the current rotation for the composer item, in degrees clockwise. + :param valueType: controls whether the returned value is the user specified rotation, or the current evaluated rotation (which may be affected by data driven rotation settings). -:rtype: float - .. versionadded:: 2.1 .. seealso:: :py:func:`setItemRotation()` @@ -612,8 +590,6 @@ currently permitted for the item. Get item's id (which is not necessarly unique) :return: item id -:rtype: str - .. seealso:: :py:func:`setId` %End @@ -621,6 +597,7 @@ Get item's id (which is not necessarly unique) virtual void setId( const QString &id ); %Docstring Set item's id (which is not necessarly unique) + :param id: new id for item .. seealso:: :py:func:`id` @@ -631,8 +608,6 @@ Set item's id (which is not necessarly unique) Get item identification name :return: unique item identification string -:rtype: str - .. note:: @@ -649,8 +624,6 @@ Get item display name. This is the item's id if set, and if not, a user-friendly string identifying item type. :return: display name for item -:rtype: str - .. seealso:: :py:func:`id` @@ -662,6 +635,7 @@ not, a user-friendly string identifying item type. virtual void setVisibility( const bool visible ); %Docstring Sets visibility for item. + :param visible: set to true to show item, false to hide item .. note:: @@ -676,12 +650,11 @@ the visibility toggle. bool excludeFromExports( const QgsComposerObject::PropertyValueType valueType = QgsComposerObject::EvaluatedValue ); %Docstring Returns whether the item should be excluded from composer exports and prints + :param valueType: controls whether the returned value is the user specified value, or the current evaluated value (which may be affected by data driven settings). :return: true if item should be excluded -:rtype: bool - .. versionadded:: 2.5 @@ -691,6 +664,7 @@ or the current evaluated value (which may be affected by data driven settings). virtual void setExcludeFromExports( const bool exclude ); %Docstring Sets whether the item should be excluded from composer exports and prints + :param exclude: set to true to exclude the item from exports .. versionadded:: 2.5 @@ -703,8 +677,6 @@ Sets whether the item should be excluded from composer exports and prints Returns whether this item is part of a group :return: true if item is in a group -:rtype: bool - .. versionadded:: 2.5 @@ -714,6 +686,7 @@ Returns whether this item is part of a group void setIsGroupMember( const bool isGroupMember ); %Docstring Sets whether this item is part of a group + :param isGroupMember: set to true if item is in a group .. versionadded:: 2.5 @@ -726,8 +699,6 @@ Sets whether this item is part of a group Get the number of layers that this item requires for exporting as layers :return: 0 if this item is to be placed on the same layer as the previous item, -:rtype: int - 1 if it should be placed on its own layer, and >1 if it requires multiple export layers .. versionadded:: 2.4 @@ -738,6 +709,7 @@ Get the number of layers that this item requires for exporting as layers virtual void setCurrentExportLayer( const int layerIdx = -1 ); %Docstring Sets the current layer to draw for exporting + :param layerIdx: can be set to -1 to draw all item layers, and must be less than numberExportLayers() .. versionadded:: 2.4 @@ -751,8 +723,6 @@ Sets the current layer to draw for exporting Creates an expression context relating to the item's current state. The context includes scopes for global, project, composition, atlas and item properties. -:rtype: QgsExpressionContext - .. versionadded:: 2.12 %End @@ -775,8 +745,6 @@ the item will not be redrawn. This can be used to prevent multiple item updates when many settings for an item are changed sequentially. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setUpdatesEnabled()` @@ -787,6 +755,7 @@ changed sequentially. virtual void setItemRotation( const double rotation, const bool adjustPosition = false ); %Docstring Sets the item ``rotation``, in degrees clockwise. + :param rotation: item rotation in degrees :param adjustPosition: set to true if item should be shifted so that rotation occurs around item center. If false, rotation occurs around item origin @@ -804,6 +773,7 @@ around item center. If false, rotation occurs around item origin %Docstring Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value. + :param property: data defined property to refresh. If property is set to QgsComposerItem.AllProperties then all data defined properties for the item will be refreshed. @@ -849,8 +819,6 @@ Draw background %Docstring Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the item border for resizing* - -:rtype: float %End double horizontalViewScaleFactor() const; @@ -858,23 +826,17 @@ item border for resizing* Returns the zoom factor of the graphics view. :return: the factor or -1 in case of error (e.g. graphic view does not exist) -:rtype: float - %End QGraphicsLineItem *hAlignSnapItem(); %Docstring Return horizontal align snap item. Creates a new graphics line if 0 - -:rtype: QGraphicsLineItem %End void deleteHAlignSnapItem(); QGraphicsLineItem *vAlignSnapItem(); %Docstring Return vertical align snap item. Creates a new graphics line if 0 - -:rtype: QGraphicsLineItem %End void deleteVAlignSnapItem(); void deleteAlignItems(); @@ -883,6 +845,7 @@ Return vertical align snap item. Creates a new graphics line if 0 %Docstring Evaluates an item's bounding rect to consider data defined position and size of item and reference point + :param newRect: target bounding rect for item :param resizeOnly: set to true if the item is only being resized. If true then the position of the returned rect will be adjusted to account for the item's @@ -890,8 +853,6 @@ position mode :param context: expression context for evaluating data defined expressions :return: bounding box rectangle for item after data defined size and position have been -:rtype: QRectF - set and position mode has been accounted for .. versionadded:: 2.5 @@ -902,8 +863,6 @@ set and position mode has been accounted for Returns whether the item should be drawn in the current context :return: true if item should be drawn -:rtype: bool - .. versionadded:: 2.5 %End diff --git a/python/core/composer/qgscomposeritemcommand.sip b/python/core/composer/qgscomposeritemcommand.sip index 4c21e1ab32a4..3f77bf1e1093 100644 --- a/python/core/composer/qgscomposeritemcommand.sip +++ b/python/core/composer/qgscomposeritemcommand.sip @@ -47,21 +47,11 @@ Saves current item state as after state %End QDomDocument previousState() const; -%Docstring - -:rtype: QDomDocument -%End QDomDocument afterState() const; -%Docstring - -:rtype: QDomDocument -%End bool containsChange() const; %Docstring Returns true if previous state and after state are valid and different - -:rtype: bool %End QgsComposerItem *item() const; @@ -69,8 +59,6 @@ Returns true if previous state and after state are valid and different Returns the target item the command applies to. :return: target composer item -:rtype: QgsComposerItem - %End protected: diff --git a/python/core/composer/qgscomposeritemgroup.sip b/python/core/composer/qgscomposeritemgroup.sip index f30d23b0c9f1..8b3523bc1dcd 100644 --- a/python/core/composer/qgscomposeritemgroup.sip +++ b/python/core/composer/qgscomposeritemgroup.sip @@ -25,8 +25,6 @@ A container for grouping several QgsComposerItems virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void addItem( QgsComposerItem *item ); @@ -60,27 +58,21 @@ corresponds to 1 scene size unit* %Docstring Stores state in Dom node + :param elem: is Dom element corresponding to 'Composer' tag :param doc: is the Dom document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is the Dom document - -:rtype: bool %End QSet items(); -%Docstring - -:rtype: set of QgsComposerItem -%End signals: void childItemDeleted( QgsComposerItem *item ); diff --git a/python/core/composer/qgscomposerlabel.sip b/python/core/composer/qgscomposerlabel.sip index b98f9bab7e81..d496cdca3b71 100644 --- a/python/core/composer/qgscomposerlabel.sip +++ b/python/core/composer/qgscomposerlabel.sip @@ -25,8 +25,6 @@ A label that can be placed onto a map composition. virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -41,31 +39,17 @@ Resizes the widget such that the text fits to the item. Keeps top left point %End QString text(); -%Docstring - -:rtype: str -%End void setText( const QString &text ); int htmlState(); -%Docstring - -:rtype: int -%End void setHtmlState( int state ); QString displayText() const; %Docstring Returns the text as it appears on screen (with replaced data field) - -:rtype: str %End QFont font() const; -%Docstring - -:rtype: QFont -%End void setFont( const QFont &f ); Qt::AlignmentFlag vAlign() const; @@ -73,8 +57,6 @@ Returns the text as it appears on screen (with replaced data field) Accessor for the vertical alignment of the label :return: Qt.AlignmentFlag -:rtype: Qt.AlignmentFlag - %End Qt::AlignmentFlag hAlign() const; @@ -82,13 +64,12 @@ Accessor for the vertical alignment of the label Accessor for the horizontal alignment of the label :return: Qt.AlignmentFlag -:rtype: Qt.AlignmentFlag - %End void setHAlign( Qt::AlignmentFlag a ); %Docstring Mutator for the horizontal alignment of the label + :param a: alignment :return: void @@ -97,6 +78,7 @@ Mutator for the horizontal alignment of the label void setVAlign( Qt::AlignmentFlag a ); %Docstring Mutator for the vertical alignment of the label + :param a: alignment :return: void @@ -108,8 +90,6 @@ Returns the horizontal margin between the edge of the frame and the label contents. :return: horizontal margin in mm -:rtype: float - .. versionadded:: 2.7 %End @@ -120,8 +100,6 @@ Returns the vertical margin between the edge of the frame and the label contents. :return: vertical margin in mm -:rtype: float - .. versionadded:: 2.7 %End @@ -132,6 +110,7 @@ Sets the margin between the edge of the frame and the label contents. This method sets both the horizontal and vertical margins to the same value. The margins can be individually controlled using the setMarginX and setMarginY methods. + :param m: margin in mm .. seealso:: :py:func:`setMarginX` @@ -143,6 +122,7 @@ and setMarginY methods. %Docstring Sets the horizontal margin between the edge of the frame and the label contents. + :param margin: horizontal margin in mm .. seealso:: :py:func:`setMargin` @@ -156,6 +136,7 @@ contents. %Docstring Sets the vertical margin between the edge of the frame and the label contents. + :param margin: vertical margin in mm .. seealso:: :py:func:`setMargin` @@ -172,28 +153,24 @@ Sets text color QColor fontColor() const; %Docstring Get font color - -:rtype: QColor %End virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const; %Docstring Stores state in Dom element + :param elem: is Dom element corresponding to 'Composer' tag :param doc: document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom element corresponding to 'ComposerLabel' tag :param doc: document - -:rtype: bool %End virtual QString displayName() const; @@ -204,8 +181,6 @@ Sets state from Dom document %Docstring In case of negative margins, the bounding rect may be larger than the label's frame - -:rtype: QRectF %End virtual void setFrameEnabled( const bool drawFrame ); diff --git a/python/core/composer/qgscomposerlegend.sip b/python/core/composer/qgscomposerlegend.sip index 3d1aa0fa9d26..d7ba68e9aa06 100644 --- a/python/core/composer/qgscomposerlegend.sip +++ b/python/core/composer/qgscomposerlegend.sip @@ -28,8 +28,6 @@ A legend that can be placed onto a map composition virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -41,8 +39,6 @@ Return correct graphics item type. QSizeF paintAndDetermineSize( QPainter *painter ); %Docstring Paints the legend and calculates its size. If painter is 0, only size is calculated - -:rtype: QSizeF %End void adjustBoxSize(); @@ -53,6 +49,7 @@ Sets item box to the whole content void setResizeToContents( bool enabled ); %Docstring Sets whether the legend should automatically resize to fit its contents. + :param enabled: set to false to disable automatic resizing. The legend frame will not be expanded to fit legend items, and items may be cropped from display. @@ -65,8 +62,6 @@ be expanded to fit legend items, and items may be cropped from display. %Docstring Returns whether the legend should automatically resize to fit its contents. -:rtype: bool - .. seealso:: :py:func:`setResizeToContents()` .. versionadded:: 3.0 @@ -76,8 +71,6 @@ Returns whether the legend should automatically resize to fit its contents. QgsLegendModel *model(); %Docstring Returns the legend model - -:rtype: QgsLegendModel %End void setAutoUpdateModel( bool autoUpdate ); @@ -88,8 +81,6 @@ Returns the legend model bool autoUpdateModel() const; %Docstring -:rtype: bool - .. versionadded:: 2.6 %End @@ -104,8 +95,6 @@ Set whether legend items should be filtered to show just the ones visible in the %Docstring Find out whether legend items are filtered to show just the ones visible in the associated map -:rtype: bool - .. versionadded:: 2.6 %End @@ -129,8 +118,6 @@ where features are outside the current atlas feature. %Docstring Whether to filter out legend elements outside of the current atlas feature -:rtype: bool - .. seealso:: :py:func:`setLegendFilterOutAtlas()` .. versionadded:: 2.14 @@ -138,18 +125,12 @@ Whether to filter out legend elements outside of the current atlas feature void setTitle( const QString &t ); QString title() const; -%Docstring - -:rtype: str -%End Qt::AlignmentFlag titleAlignment() const; %Docstring Returns the alignment of the legend title :return: Qt.AlignmentFlag for the legend title -:rtype: Qt.AlignmentFlag - .. versionadded:: 2.3 @@ -159,6 +140,7 @@ Returns the alignment of the legend title void setTitleAlignment( Qt::AlignmentFlag alignment ); %Docstring Sets the alignment of the legend title + :param alignment: Text alignment for drawing the legend title .. versionadded:: 2.3 @@ -169,22 +151,14 @@ Sets the alignment of the legend title QgsLegendStyle &rstyle( QgsLegendStyle::Style s ); %Docstring Returns reference to modifiable style - -:rtype: QgsLegendStyle %End QgsLegendStyle style( QgsLegendStyle::Style s ) const; %Docstring Returns style - -:rtype: QgsLegendStyle %End void setStyle( QgsLegendStyle::Style s, const QgsLegendStyle &style ); QFont styleFont( QgsLegendStyle::Style s ) const; -%Docstring - -:rtype: QFont -%End void setStyleFont( QgsLegendStyle::Style s, const QFont &f ); %Docstring Set style font @@ -200,8 +174,6 @@ Set style margin %Docstring Returns the spacing in-between lines in mm -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`setLineSpacing` @@ -210,6 +182,7 @@ Returns the spacing in-between lines in mm void setLineSpacing( double spacing ); %Docstring Sets the spacing in-between multiple lines + :param spacing: Double value to use as spacing in between multiple lines .. versionadded:: 3.0 @@ -218,88 +191,42 @@ Sets the spacing in-between multiple lines %End double boxSpace() const; -%Docstring - -:rtype: float -%End void setBoxSpace( double s ); double columnSpace() const; -%Docstring - -:rtype: float -%End void setColumnSpace( double s ); QColor fontColor() const; -%Docstring - -:rtype: QColor -%End void setFontColor( const QColor &c ); double symbolWidth() const; -%Docstring - -:rtype: float -%End void setSymbolWidth( double w ); double symbolHeight() const; -%Docstring - -:rtype: float -%End void setSymbolHeight( double h ); double wmsLegendWidth() const; -%Docstring - -:rtype: float -%End void setWmsLegendWidth( double w ); double wmsLegendHeight() const; -%Docstring - -:rtype: float -%End void setWmsLegendHeight( double h ); void setWrapChar( const QString &t ); QString wrapChar() const; -%Docstring - -:rtype: str -%End int columnCount() const; -%Docstring - -:rtype: int -%End void setColumnCount( int c ); bool splitLayer() const; -%Docstring - -:rtype: bool -%End void setSplitLayer( bool s ); bool equalColumnWidth() const; -%Docstring - -:rtype: bool -%End void setEqualColumnWidth( bool s ); bool drawRasterStroke() const; %Docstring Returns whether a stroke will be drawn around raster symbol items. -:rtype: bool - .. seealso:: :py:func:`setDrawRasterStroke()` .. seealso:: :py:func:`rasterStrokeColor()` @@ -312,6 +239,7 @@ Returns whether a stroke will be drawn around raster symbol items. void setDrawRasterStroke( bool enabled ); %Docstring Sets whether a stroke will be drawn around raster symbol items. + :param enabled: set to true to draw borders .. seealso:: :py:func:`drawRasterStroke()` @@ -328,8 +256,6 @@ Sets whether a stroke will be drawn around raster symbol items. Returns the stroke color for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. -:rtype: QColor - .. seealso:: :py:func:`setRasterStrokeColor()` .. seealso:: :py:func:`drawRasterStroke()` @@ -343,6 +269,7 @@ only drawn if drawRasterStroke() is true. %Docstring Sets the stroke color for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. + :param color: stroke color .. seealso:: :py:func:`rasterStrokeColor()` @@ -359,8 +286,6 @@ only drawn if drawRasterStroke() is true. Returns the stroke width (in millimeters) for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. -:rtype: float - .. seealso:: :py:func:`setRasterStrokeWidth()` .. seealso:: :py:func:`drawRasterStroke()` @@ -374,6 +299,7 @@ only drawn if drawRasterStroke() is true. %Docstring Sets the stroke width for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. + :param width: stroke width in millimeters .. seealso:: :py:func:`rasterStrokeWidth()` @@ -387,10 +313,6 @@ only drawn if drawRasterStroke() is true. void setComposerMap( const QgsComposerMap *map ); const QgsComposerMap *composerMap() const; -%Docstring - -:rtype: QgsComposerMap -%End void updateLegend(); %Docstring @@ -401,20 +323,18 @@ Updates the model and all legend entries %Docstring Stores state in Dom node + :param elem: is Dom element corresponding to 'Composer' tag :param doc: Dom document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is Dom document - -:rtype: bool %End virtual QString displayName() const; @@ -424,8 +344,6 @@ Sets state from Dom document %Docstring Returns the legend's renderer settings object. -:rtype: QgsLegendSettings - .. versionadded:: 3.0 %End diff --git a/python/core/composer/qgscomposermap.sip b/python/core/composer/qgscomposermap.sip index 19f8f3525754..99b761d31ee4 100644 --- a/python/core/composer/qgscomposermap.sip +++ b/python/core/composer/qgscomposermap.sip @@ -33,8 +33,6 @@ Constructor. Settings are read from project. virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End enum AtlasScalingMode @@ -49,6 +47,7 @@ Return correct graphics item type. void draw( QPainter *painter, const QgsRectangle &extent, QSizeF size, double dpi, double *forceWidthScale = 0 ); %Docstring Draw to paint device + :param painter: painter :param extent: map extent :param size: size in scene coordinates @@ -63,23 +62,17 @@ Return correct graphics item type. %Docstring Return map settings that would be used for drawing of the map -:rtype: QgsMapSettings - .. versionadded:: 2.6 %End int id() const; %Docstring Get identification number - -:rtype: int %End bool isDrawing() const; %Docstring True if a draw is already in progress - -:rtype: bool %End void resize( double dx, double dy ); @@ -91,6 +84,7 @@ Resizes an item in x- and y direction (canvas coordinates) %Docstring Move content of map + :param dx: move in x-direction (item and canvas coordinates) :param dy: move in y-direction (item and canvas coordinates) %End @@ -99,6 +93,7 @@ Move content of map %Docstring Zoom content of item. Does nothing per default (but implemented in composer map) + :param factor: zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out :param point: item point for zoom center :param mode: zoom mode @@ -117,8 +112,6 @@ Sets new scene rectangle bounds and recalculates hight and extent Returns the map scale. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setNewScale()` %End @@ -135,6 +128,7 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma Sets new extent for the map. This method may change the width or height of the map item to ensure that the extent exactly matches the specified extent, with no overlap or margin. This method implicitly alters the map scale. + :param extent: new extent for the map .. seealso:: :py:func:`zoomToExtent` @@ -146,6 +140,7 @@ Zooms the map so that the specified extent is fully visible within the map item. This method will not change the width or height of the map, and may result in an overlap or margin from the specified extent. This method implicitly alters the map scale. + :param extent: new extent for the map .. seealso:: :py:func:`setNewExtent` @@ -166,8 +161,6 @@ extent or the temporary atlas-driven feature extent depending on the current atl of the composition. Both a const and non-const version are included. :return: pointer to current map extent -:rtype: QgsRectangle - .. seealso:: :py:func:`visibleExtentPolygon` %End @@ -180,8 +173,6 @@ This will match the presetCrs() if that is set, or if a preset CRS is not set then the map's CRS will follow the composition's project's CRS. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 .. seealso:: :py:func:`presetCrs()` @@ -196,8 +187,6 @@ CRS will be used to render the map regardless of any project CRS setting. If the returned CRS is not valid then the project CRS will be used to render the map. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 .. seealso:: :py:func:`crs()` @@ -225,8 +214,6 @@ or the current layer set of the QGIS map canvas. This is just a GUI flag, and itself does not change which layers are rendered in the map. Instead, use setLayers() to control which layers are rendered. -:rtype: bool - .. seealso:: :py:func:`setKeepLayerSet()` .. seealso:: :py:func:`layers()` @@ -249,8 +236,6 @@ Instead, use setLayers() to control which layers are rendered. Getter for stored layer set. If empty, the current canvas layers will be used instead. -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`setLayers()` .. seealso:: :py:func:`keepLayerSet()` @@ -269,8 +254,6 @@ be used instead. bool keepLayerStyles() const; %Docstring -:rtype: bool - .. versionadded:: 2.8 %End void setKeepLayerStyles( bool enabled ); @@ -282,8 +265,6 @@ be used instead. QMap layerStyleOverrides() const; %Docstring -:rtype: QMap - .. versionadded:: 2.8 %End void setLayerStyleOverrides( const QMap &overrides ); @@ -308,8 +289,6 @@ at any time since they are alternative approaches - if both are enabled, following map theme has higher priority. If neither is enabled (or if preset name is not set), map will use the same configuration as the map canvas uses. -:rtype: bool - .. versionadded:: 2.16 %End @@ -325,8 +304,6 @@ Sets whether the map should follow a map theme. See followVisibilityPreset() for Preset name that decides which layers and layer styles are used for map rendering. It is only used when followVisibilityPreset() returns true. -:rtype: str - .. versionadded:: 2.16 %End @@ -338,10 +315,6 @@ Sets preset name for map rendering. See followVisibilityPresetName() for more de %End QgsRectangle extent() const; -%Docstring - -:rtype: QgsRectangle -%End void setOffset( double xOffset, double yOffset ); %Docstring @@ -351,35 +324,29 @@ Sets offset values to shift image (useful for live updates when moving item cont bool containsWmsLayer() const; %Docstring True if composer map renders a WMS layer - -:rtype: bool %End bool containsAdvancedEffects() const; %Docstring True if composer map contains layers with blend modes or flattened layers for vectors - -:rtype: bool %End virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const; %Docstring Stores state in Dom node + :param elem: is Dom element corresponding to 'Composer' tag :param doc: Dom document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to 'ComposerMap' tag :param doc: is Dom document - -:rtype: bool %End QgsComposerMapGridStack *grids(); @@ -388,8 +355,6 @@ Returns the map item's grid stack, which is used to control how grids are drawn over the map's contents. :return: pointer to grid stack -:rtype: QgsComposerMapGridStack - .. seealso:: :py:func:`grid()` @@ -401,8 +366,6 @@ are drawn over the map's contents. Returns the map item's first grid. This is a convenience function. :return: pointer to first grid for map item -:rtype: QgsComposerMapGrid - .. seealso:: :py:func:`grids()` @@ -415,8 +378,6 @@ Returns the map item's overview stack, which is used to control how overviews are drawn over the map's contents. :return: pointer to overview stack -:rtype: QgsComposerMapOverviewStack - .. seealso:: :py:func:`overview()` @@ -428,8 +389,6 @@ are drawn over the map's contents. Returns the map item's first overview. This is a convenience function. :return: pointer to first overview for map item -:rtype: QgsComposerMapOverview - .. seealso:: :py:func:`overviews()` @@ -440,8 +399,6 @@ Returns the map item's first overview. This is a convenience function. %Docstring In case of annotations, the bounding rectangle can be larger than the map item rectangle - -:rtype: QRectF %End virtual void setFrameStrokeWidth( const double strokeWidth ); @@ -463,12 +420,11 @@ way the map is drawn within the item. Rotation is in degrees, clockwise. double mapRotation( QgsComposerObject::PropertyValueType valueType = QgsComposerObject::EvaluatedValue ) const; %Docstring Returns the rotation used for drawing the map within the composer item, in degrees clockwise. + :param valueType: controls whether the returned value is the user specified rotation, or the current evaluated rotation (which may be affected by data driven rotation settings). -:rtype: float - .. seealso:: :py:func:`setMapRotation()` %End @@ -483,16 +439,12 @@ Sets whether annotations are drawn within the composer map. %Docstring Returns whether annotations are drawn within the composer map. -:rtype: bool - .. seealso:: :py:func:`setDrawAnnotations()` %End double mapUnitsToMM() const; %Docstring Returns the conversion factor map units -> mm - -:rtype: float %End void assignFreeId(); @@ -506,8 +458,6 @@ Usually, this function is called before adding the composer map to the compositi Returns whether the map extent is set to follow the current atlas feature. :return: true if map will follow the current atlas feature. -:rtype: bool - .. seealso:: :py:func:`setAtlasDriven` @@ -517,6 +467,7 @@ Returns whether the map extent is set to follow the current atlas feature. void setAtlasDriven( bool enabled ); %Docstring Sets whether the map extent will follow the current atlas feature. + :param enabled: set to true if the map extents should be set by the current atlas feature. .. seealso:: :py:func:`atlasDriven` @@ -531,8 +482,6 @@ are calculated for the current atlas feature when an atlas composition is enabled. :return: the current scaling mode -:rtype: AtlasScalingMode - .. note:: @@ -548,6 +497,7 @@ is enabled. Sets the current atlas scaling mode. This controls how the map's extents are calculated for the current atlas feature when an atlas composition is enabled. + :param mode: atlas scaling mode to set .. note:: @@ -562,13 +512,12 @@ is enabled. double atlasMargin( const QgsComposerObject::PropertyValueType valueType = QgsComposerObject::EvaluatedValue ); %Docstring Returns the margin size (percentage) used when the map is in atlas mode. + :param valueType: controls whether the returned value is the user specified atlas margin, or the current evaluated atlas margin (which may be affected by data driven atlas margin settings). :return: margin size in percentage to leave around the atlas feature's extent -:rtype: float - .. note:: @@ -582,6 +531,7 @@ settings). void setAtlasMargin( double margin ); %Docstring Sets the margin size (percentage) used when the map is in atlas mode. + :param margin: size in percentage to leave around the atlas feature's extent .. note:: @@ -599,8 +549,6 @@ Sets the margin size (percentage) used when the map is in atlas mode. Get the number of layers that this item requires for exporting as layers :return: 0 if this item is to be placed on the same layer as the previous item, -:rtype: int - 1 if it should be placed on its own layer, and >1 if it requires multiple export layers .. versionadded:: 2.4 @@ -612,8 +560,6 @@ Returns a polygon representing the current visible map extent, considering map e If the map rotation is 0, the result is the same as currentMapExtent :return: polygon with the four corner points representing the visible map extent. The points are -:rtype: QPolygonF - clockwise, starting at the top-left point .. seealso:: :py:func:`currentMapExtent` @@ -625,15 +571,11 @@ clockwise, starting at the top-left point QPolygonF transformedMapPolygon() const; %Docstring Returns extent that considers rotation and shift with mOffsetX / mOffsetY - -:rtype: QPolygonF %End QPointF mapToItemCoords( QPointF mapCoords ) const; %Docstring Transforms map coordinates to item coordinates (considering rotation and move offset) - -:rtype: QPointF %End void requestedExtent( QgsRectangle &extent ) const; diff --git a/python/core/composer/qgscomposermapgrid.sip b/python/core/composer/qgscomposermapgrid.sip index b31f70de3de8..6d474a386e13 100644 --- a/python/core/composer/qgscomposermapgrid.sip +++ b/python/core/composer/qgscomposermapgrid.sip @@ -30,6 +30,7 @@ order they are drawn in. QgsComposerMapGridStack( QgsComposerMap *map ); %Docstring Constructor for QgsComposerMapGridStack. + :param map: QgsComposerMap the grid stack is attached to %End @@ -38,6 +39,7 @@ Constructor for QgsComposerMapGridStack. Adds a new map grid to the stack and takes ownership of the grid. The grid will be added to the end of the stack, and rendered above any existing map grids already present in the stack. + :param grid: QgsComposerMapGrid to add to the stack .. note:: @@ -51,6 +53,7 @@ should be called for the QgsComposerMap to prevent rendering artifacts void removeGrid( const QString &gridId ); %Docstring Removes a grid from the stack and deletes the corresponding QgsComposerMapGrid + :param gridId: id for the QgsComposerMapGrid to remove .. note:: @@ -64,6 +67,7 @@ should be called for the QgsComposerMap to prevent rendering artifacts void moveGridUp( const QString &gridId ); %Docstring Moves a grid up the stack, causing it to be rendered above other grids + :param gridId: id for the QgsComposerMapGrid to move up .. note:: @@ -77,6 +81,7 @@ called for the QgsComposerMap to redraw the map with the new grid stack order void moveGridDown( const QString &gridId ); %Docstring Moves a grid down the stack, causing it to be rendered below other grids + :param gridId: id for the QgsComposerMapGrid to move down .. note:: @@ -90,11 +95,10 @@ called for the QgsComposerMap to redraw the map with the new grid stack order const QgsComposerMapGrid *constGrid( const QString &gridId ) const; %Docstring Returns a const reference to a grid within the stack + :param gridId: id for the QgsComposerMapGrid to find :return: const reference to grid, if found -:rtype: QgsComposerMapGrid - .. seealso:: :py:func:`grid` %End @@ -102,11 +106,10 @@ Returns a const reference to a grid within the stack QgsComposerMapGrid *grid( const QString &gridId ) const; %Docstring Returns a reference to a grid within the stack + :param gridId: id for the QgsComposerMapGrid to find :return: reference to grid if found -:rtype: QgsComposerMapGrid - .. seealso:: :py:func:`constGrid` %End @@ -114,11 +117,10 @@ Returns a reference to a grid within the stack QgsComposerMapGrid *grid( const int index ) const; %Docstring Returns a reference to a grid within the stack + :param index: grid position in the stack :return: reference to grid if found -:rtype: QgsComposerMapGrid - .. seealso:: :py:func:`constGrid` %End @@ -130,20 +132,17 @@ Returns a reference to a grid within the stack Returns a list of QgsComposerMapGrids contained by the stack :return: list of grids -:rtype: list of QgsComposerMapGrid - %End virtual bool readXml( const QDomElement &elem, const QDomDocument &doc ); %Docstring Sets the grid stack's state from a DOM document + :param elem: is DOM node corresponding to 'a ComposerMap' tag :param doc: DOM document :return: true if read was successful -:rtype: bool - .. seealso:: :py:func:`writeXml` %End @@ -154,8 +153,6 @@ Calculates the maximum distance grids within the stack extend beyond the QgsComposerMap's item rect :return: maximum grid extension -:rtype: float - .. seealso:: :py:func:`calculateMaxGridExtension()` %End @@ -165,6 +162,7 @@ beyond the QgsComposerMap's item rect Calculates the maximum distance grids within the stack extend beyond the QgsComposerMap's item rect. This method calculates the distance for each side of the map item separately + :param top: storage for top extension :param right: storage for right extension :param bottom: storage for bottom extension @@ -280,6 +278,7 @@ QgsComposerMap. QgsComposerMapGrid( const QString &name, QgsComposerMap *map ); %Docstring Constructor for QgsComposerMapGrid. + :param name: friendly display name for grid :param map: QgsComposerMap the grid is attached to %End @@ -290,6 +289,7 @@ Constructor for QgsComposerMapGrid. %Docstring Draws a grid + :param painter: destination QPainter %End @@ -297,11 +297,10 @@ Draws a grid %Docstring Stores grid state in DOM element + :param elem: is DOM element corresponding to a 'ComposerMap' tag :param doc: DOM document -:rtype: bool - .. seealso:: :py:func:`readXml` %End @@ -309,17 +308,17 @@ Stores grid state in DOM element %Docstring Sets grid state from a DOM document + :param itemElem: is DOM node corresponding to a 'ComposerMapGrid' tag :param doc: is DOM document -:rtype: bool - .. seealso:: :py:func:`writeXml` %End void setCrs( const QgsCoordinateReferenceSystem &crs ); %Docstring Sets the CRS for the grid. + :param crs: coordinate reference system for grid .. seealso:: :py:func:`crs` @@ -330,8 +329,6 @@ Sets the CRS for the grid. Retrieves the CRS for the grid. :return: coordinate reference system for grid -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs` %End @@ -339,6 +336,7 @@ Retrieves the CRS for the grid. void setBlendMode( const QPainter::CompositionMode mode ); %Docstring Sets the blending mode used for drawing the grid. + :param mode: blending mode for grid .. seealso:: :py:func:`blendMode` @@ -349,8 +347,6 @@ Sets the blending mode used for drawing the grid. Retrieves the blending mode used for drawing the grid. :return: blending mode for grid -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode` %End @@ -364,8 +360,6 @@ Calculates the maximum distance the grid extends beyond the QgsComposerMap's item rect :return: maximum extension in millimeters -:rtype: float - %End void calculateMaxExtension( double &top, double &right, double &bottom, double &left ); @@ -373,6 +367,7 @@ item rect Calculates the maximum distance the grid extends beyond the QgsComposerMap's item rect. This method calculates the distance for each side of the map item separately + :param top: storage for top extension :param right: storage for right extension :param bottom: storage for bottom extension @@ -388,6 +383,7 @@ map item separately %Docstring Sets the units to use for grid measurements such as the interval and offset for grid lines. + :param unit: unit for grid measurements .. seealso:: :py:func:`units` @@ -399,8 +395,6 @@ Gets the units used for grid measurements such as the interval and offset for grid lines. :return: for grid measurements -:rtype: GridUnit - .. seealso:: :py:func:`setUnits` %End @@ -409,6 +403,7 @@ and offset for grid lines. %Docstring Sets the interval between grid lines in the x-direction. The units are controlled through the setUnits method + :param interval: interval between horizontal grid lines .. seealso:: :py:func:`setIntervalY` @@ -422,8 +417,6 @@ Gets the interval between grid lines in the x-direction. The units are retrieved through the units() method. :return: interval between horizontal grid lines -:rtype: float - .. seealso:: :py:func:`setIntervalX` @@ -434,6 +427,7 @@ are retrieved through the units() method. %Docstring Sets the interval between grid lines in the y-direction. The units are controlled through the setUnits method + :param interval: interval between vertical grid lines .. seealso:: :py:func:`setIntervalX` @@ -447,8 +441,6 @@ Gets the interval between grid lines in the y-direction. The units are retrieved through the units() method. :return: interval between vertical grid lines -:rtype: float - .. seealso:: :py:func:`setIntervalY` @@ -459,6 +451,7 @@ are retrieved through the units() method. %Docstring Sets the offset for grid lines in the x-direction. The units are controlled through the setUnits method + :param offset: offset for horizontal grid lines .. seealso:: :py:func:`setOffsetY` @@ -472,8 +465,6 @@ Gets the offset for grid lines in the x-direction. The units are retrieved through the units() method. :return: offset for horizontal grid lines -:rtype: float - .. seealso:: :py:func:`setOffsetX` @@ -484,6 +475,7 @@ are retrieved through the units() method. %Docstring Sets the offset for grid lines in the y-direction. The units are controlled through the setUnits method + :param offset: offset for vertical grid lines .. seealso:: :py:func:`setOffsetX` @@ -497,8 +489,6 @@ Gets the offset for grid lines in the y-direction. The units are retrieved through the units() method. :return: offset for vertical grid lines -:rtype: float - .. seealso:: :py:func:`setOffsetY` @@ -510,6 +500,7 @@ are retrieved through the units() method. %Docstring Sets the grid style, which controls how the grid is drawn over the map's contents + :param style: desired grid style .. seealso:: :py:func:`style` @@ -521,8 +512,6 @@ Gets the grid's style, which controls how the grid is drawn over the map's contents :return: current grid style -:rtype: GridStyle - .. seealso:: :py:func:`setStyle` %End @@ -531,6 +520,7 @@ over the map's contents %Docstring Sets the length of the cross segments drawn for the grid. This is only used for grids with QgsComposerMapGrid.Cross styles + :param length: cross length in millimeters .. seealso:: :py:func:`crossLength` @@ -542,8 +532,6 @@ Retrieves the length of the cross segments drawn for the grid. This is only used with QgsComposerMapGrid.Cross styles :return: cross length in millimeters -:rtype: float - .. seealso:: :py:func:`setCrossLength` %End @@ -553,6 +541,7 @@ with QgsComposerMapGrid.Cross styles Sets width of grid lines. This is only used for grids with QgsComposerMapGrid.Solid or QgsComposerMapGrid.Cross styles. For more control over grid line appearance, use setLineSymbol instead. + :param width: grid line width .. seealso:: :py:func:`setLineSymbol` @@ -565,6 +554,7 @@ setLineSymbol instead. Sets color of grid lines. This is only used for grids with QgsComposerMapGrid.Solid or QgsComposerMapGrid.Cross styles. For more control over grid line appearance, use setLineSymbol instead. + :param color: color of grid lines .. seealso:: :py:func:`setLineSymbol` @@ -576,6 +566,7 @@ setLineSymbol instead. %Docstring Sets the line symbol used for drawing grid lines. This is only used for grids with QgsComposerMapGrid.Solid or QgsComposerMapGrid.Cross styles. + :param symbol: line symbol for grid lines .. seealso:: :py:func:`lineSymbol` @@ -592,8 +583,6 @@ Gets the line symbol used for drawing grid lines. This is only used for grids wi QgsComposerMapGrid.Solid or QgsComposerMapGrid.Cross styles. :return: line symbol for grid lines -:rtype: QgsLineSymbol - .. seealso:: :py:func:`setLineSymbol` @@ -606,6 +595,7 @@ QgsComposerMapGrid.Solid or QgsComposerMapGrid.Cross styles. %Docstring Sets the marker symbol used for drawing grid points. This is only used for grids with a QgsComposerMapGrid.Markers style. + :param symbol: marker symbol for grid intersection points .. seealso:: :py:func:`markerSymbol` @@ -622,8 +612,6 @@ Gets the marker symbol used for drawing grid points. This is only used for grids QgsComposerMapGrid.Markers style. :return: marker symbol for grid intersection points -:rtype: QgsMarkerSymbol - .. seealso:: :py:func:`setMarkerSymbol` @@ -636,6 +624,7 @@ QgsComposerMapGrid.Markers style. void setAnnotationEnabled( const bool enabled ); %Docstring Sets whether annotations should be shown for the grid. + :param enabled: set to true to draw annotations for the grid .. seealso:: :py:func:`annotationEnabled` @@ -646,8 +635,6 @@ Sets whether annotations should be shown for the grid. Gets whether annotations are shown for the grid. :return: true if annotations are drawn for the grid -:rtype: bool - .. seealso:: :py:func:`setAnnotationEnabled` %End @@ -655,6 +642,7 @@ Gets whether annotations are shown for the grid. void setAnnotationFont( const QFont &font ); %Docstring Sets the font used for drawing grid annotations + :param font: font for annotations .. seealso:: :py:func:`annotationFont` @@ -665,8 +653,6 @@ Sets the font used for drawing grid annotations Gets the font used for drawing grid annotations :return: font for annotations -:rtype: QFont - .. seealso:: :py:func:`setAnnotationFont` %End @@ -674,6 +660,7 @@ Gets the font used for drawing grid annotations void setAnnotationFontColor( const QColor &color ); %Docstring Sets the font color used for drawing grid annotations + :param color: font color for annotations .. seealso:: :py:func:`annotationFontColor` @@ -684,8 +671,6 @@ Sets the font color used for drawing grid annotations Gets the font color used for drawing grid annotations :return: font color for annotations -:rtype: QColor - .. seealso:: :py:func:`setAnnotationFontColor` %End @@ -693,6 +678,7 @@ Gets the font color used for drawing grid annotations void setAnnotationPrecision( const int precision ); %Docstring Sets the coordinate precision for grid annotations + :param precision: number of decimal places to show when drawing grid annotations .. seealso:: :py:func:`annotationPrecision` @@ -703,8 +689,6 @@ Sets the coordinate precision for grid annotations Returns the coordinate precision for grid annotations :return: number of decimal places shown when drawing grid annotations -:rtype: int - .. seealso:: :py:func:`setAnnotationPrecision` %End @@ -713,6 +697,7 @@ Returns the coordinate precision for grid annotations %Docstring Sets what types of grid annotations should be drawn for a specified side of the map frame, or whether grid annotations should be disabled for the side. + :param display: display mode for annotations :param border: side of map for annotations @@ -726,11 +711,10 @@ or whether grid annotations should be disabled for the side. Gets the display mode for the grid annotations on a specified side of the map frame. This property also specifies whether annotations have been disabled from a side of the map frame. + :param border: side of map for annotations :return: display mode for grid annotations -:rtype: DisplayMode - .. seealso:: :py:func:`setAnnotationDisplay` @@ -741,6 +725,7 @@ from a side of the map frame. %Docstring Sets the position for the grid annotations on a specified side of the map frame. + :param position: position to draw grid annotations :param border: side of map for annotations @@ -751,11 +736,10 @@ frame. %Docstring Gets the position for the grid annotations on a specified side of the map frame. + :param border: side of map for annotations :return: position that grid annotations are drawn in -:rtype: AnnotationPosition - .. seealso:: :py:func:`setAnnotationPosition` %End @@ -763,6 +747,7 @@ frame. void setAnnotationFrameDistance( const double distance ); %Docstring Sets the distance between the map frame and annotations. Units are in millimeters. + :param distance: margin between map frame and annotations .. seealso:: :py:func:`annotationFrameDistance` @@ -773,8 +758,6 @@ Sets the distance between the map frame and annotations. Units are in millimeter Gets the distance between the map frame and annotations. Units are in millimeters. :return: margin between map frame and annotations -:rtype: float - .. seealso:: :py:func:`setAnnotationFrameDistance` %End @@ -782,6 +765,7 @@ Gets the distance between the map frame and annotations. Units are in millimeter void setAnnotationDirection( const AnnotationDirection direction, const BorderSide border ); %Docstring Sets the direction for drawing frame annotations. + :param direction: direction for frame annotations :param border: side of map for annotations @@ -791,6 +775,7 @@ Sets the direction for drawing frame annotations. void setAnnotationDirection( const AnnotationDirection direction ); %Docstring Sets the direction for drawing all frame annotations. + :param direction: direction for frame annotations .. seealso:: :py:func:`annotationDirection` @@ -799,11 +784,10 @@ Sets the direction for drawing all frame annotations. AnnotationDirection annotationDirection( const BorderSide border ) const; %Docstring Gets the direction for drawing frame annotations. + :param border: side of map for annotations :return: direction for frame annotations -:rtype: AnnotationDirection - .. seealso:: :py:func:`setAnnotationDirection` %End @@ -811,6 +795,7 @@ Gets the direction for drawing frame annotations. void setAnnotationFormat( const AnnotationFormat format ); %Docstring Sets the format for drawing grid annotations. + :param format: format for grid annotations .. seealso:: :py:func:`annotationFormat` @@ -821,8 +806,6 @@ Sets the format for drawing grid annotations. Gets the format for drawing grid annotations. :return: format for grid annotations -:rtype: AnnotationFormat - .. seealso:: :py:func:`setAnnotationFormat` %End @@ -831,6 +814,7 @@ Gets the format for drawing grid annotations. %Docstring Sets the expression used for drawing grid annotations. This is only used when annotationFormat() is QgsComposerMapGrid.CustomFormat. + :param expression: expression for evaluating custom grid annotations .. seealso:: :py:func:`annotationExpression` @@ -844,8 +828,6 @@ Returns the expression used for drawing grid annotations. This is only used when is QgsComposerMapGrid.CustomFormat. :return: expression for evaluating custom grid annotations -:rtype: str - .. seealso:: :py:func:`setAnnotationExpression` @@ -856,6 +838,7 @@ is QgsComposerMapGrid.CustomFormat. void setFrameStyle( const FrameStyle style ); %Docstring Sets the grid frame style. + :param style: style for grid frame .. seealso:: :py:func:`frameStyle` @@ -866,8 +849,6 @@ Sets the grid frame style. Gets the grid frame style. :return: style for grid frame -:rtype: FrameStyle - .. seealso:: :py:func:`setFrameStyle` %End @@ -875,6 +856,7 @@ Gets the grid frame style. void setFrameDivisions( const DisplayMode divisions, const BorderSide border ); %Docstring Sets what type of grid divisions should be used for frames on a specified side of the map. + :param divisions: grid divisions for frame :param border: side of map for frame @@ -886,11 +868,10 @@ Sets what type of grid divisions should be used for frames on a specified side o DisplayMode frameDivisions( const BorderSide border ) const; %Docstring Gets the type of grid divisions which are used for frames on a specified side of the map. + :param border: side of map for frame :return: grid divisions for frame -:rtype: DisplayMode - .. seealso:: :py:func:`setFrameDivisions` @@ -901,6 +882,7 @@ Gets the type of grid divisions which are used for frames on a specified side of %Docstring Sets flags for grid frame sides. Setting these flags controls which sides of the map item the grid frame is drawn on. + :param flags: flags for grid frame sides .. seealso:: :py:func:`setFrameSideFlag` @@ -913,6 +895,7 @@ of the map item the grid frame is drawn on. void setFrameSideFlag( const FrameSideFlag flag, bool on = true ); %Docstring Sets whether the grid frame is drawn for a certain side of the map item. + :param flag: flag for grid frame side :param on: set to true to draw grid frame on that side of the map @@ -929,8 +912,6 @@ Returns the flags which control which sides of the map item the grid frame is drawn on. :return: flags for side of map grid is drawn on -:rtype: FrameSideFlags - .. seealso:: :py:func:`setFrameSideFlags` @@ -943,11 +924,10 @@ is drawn on. %Docstring Tests whether the grid frame should be drawn on a specified side of the map item. + :param flag: flag for grid frame side :return: true if grid frame should be drawn for that side of the map -:rtype: bool - .. seealso:: :py:func:`setFrameSideFlags` @@ -961,6 +941,7 @@ item. Sets the grid frame width. This property controls how wide the grid frame is. The size of the line outlines drawn in the frame is controlled through the setFramePenSize method. + :param width: width of grid frame in millimeters .. seealso:: :py:func:`frameWidth` @@ -973,8 +954,6 @@ The size of the line outlines drawn in the frame can be retrieved via the framePenSize method. :return: width of grid frame in millimeters -:rtype: float - .. seealso:: :py:func:`setFrameWidth` %End @@ -982,6 +961,7 @@ framePenSize method. void setFramePenSize( const double width ); %Docstring Sets the width of the stroke drawn in the grid frame. + :param width: width of grid frame stroke .. seealso:: :py:func:`framePenSize` @@ -994,8 +974,6 @@ Sets the width of the stroke drawn in the grid frame. Retrieves the width of the stroke drawn in the grid frame. :return: width of grid frame stroke -:rtype: float - .. seealso:: :py:func:`setFramePenSize` @@ -1005,6 +983,7 @@ Retrieves the width of the stroke drawn in the grid frame. void setFramePenColor( const QColor &color ); %Docstring Sets the color of the stroke drawn in the grid frame. + :param color: color of grid frame stroke .. seealso:: :py:func:`framePenColor` @@ -1021,8 +1000,6 @@ Sets the color of the stroke drawn in the grid frame. Retrieves the color of the stroke drawn in the grid frame. :return: color of grid frame stroke -:rtype: QColor - .. seealso:: :py:func:`setFramePenColor` @@ -1036,6 +1013,7 @@ Retrieves the color of the stroke drawn in the grid frame. void setFrameFillColor1( const QColor &color ); %Docstring Sets the first fill color used for the grid frame. + :param color: first fill color for grid frame .. seealso:: :py:func:`frameFillColor1` @@ -1050,8 +1028,6 @@ Sets the first fill color used for the grid frame. Retrieves the first fill color for the grid frame. :return: first fill color for grid frame -:rtype: QColor - .. seealso:: :py:func:`setFrameFillColor1` @@ -1063,6 +1039,7 @@ Retrieves the first fill color for the grid frame. void setFrameFillColor2( const QColor &color ); %Docstring Sets the second fill color used for the grid frame. + :param color: second fill color for grid frame .. seealso:: :py:func:`frameFillColor2` @@ -1077,8 +1054,6 @@ Sets the second fill color used for the grid frame. Retrieves the second fill color for the grid frame. :return: second fill color for grid frame -:rtype: QColor - .. seealso:: :py:func:`setFrameFillColor2` diff --git a/python/core/composer/qgscomposermapitem.sip b/python/core/composer/qgscomposermapitem.sip index 05f44705355c..9e9afd560bee 100644 --- a/python/core/composer/qgscomposermapitem.sip +++ b/python/core/composer/qgscomposermapitem.sip @@ -23,6 +23,7 @@ class QgsComposerMapItem : QgsComposerObject QgsComposerMapItem( const QString &name, QgsComposerMap *map ); %Docstring Constructor for QgsComposerMapItem. + :param name: friendly display name for item :param map: QgsComposerMap the item is attached to %End @@ -30,6 +31,7 @@ Constructor for QgsComposerMapItem. virtual void draw( QPainter *painter ) = 0; %Docstring Draws the item on to a painter + :param painter: destination QPainter %End @@ -37,11 +39,10 @@ Draws the item on to a painter %Docstring Stores map item state in DOM element + :param elem: is DOM element corresponding to a 'ComposerMap' tag :param doc: DOM document -:rtype: bool - .. seealso:: :py:func:`readXml` %End @@ -49,17 +50,17 @@ Stores map item state in DOM element %Docstring Sets map item state from a DOM document + :param itemElem: is DOM node corresponding to a 'ComposerMapGrid' tag :param doc: is DOM document -:rtype: bool - .. seealso:: :py:func:`writeXml` %End virtual void setComposerMap( QgsComposerMap *map ); %Docstring Sets composer map for the item + :param map: composer map .. seealso:: :py:func:`composerMap` @@ -70,8 +71,6 @@ Sets composer map for the item Get composer map for the item :return: composer map -:rtype: QgsComposerMap - .. seealso:: :py:func:`setComposerMap` %End @@ -81,13 +80,12 @@ Get composer map for the item Get the unique id for the map item :return: unique id -:rtype: str - %End virtual void setName( const QString &name ); %Docstring Sets the friendly display name for the item + :param name: display name .. seealso:: :py:func:`name` @@ -98,8 +96,6 @@ Sets the friendly display name for the item Get friendly display name for the item :return: display name -:rtype: str - .. seealso:: :py:func:`setName` %End @@ -107,6 +103,7 @@ Get friendly display name for the item virtual void setEnabled( const bool enabled ); %Docstring Controls whether the item will be drawn + :param enabled: set to true to enable drawing of the item .. seealso:: :py:func:`enabled` @@ -117,8 +114,6 @@ Controls whether the item will be drawn Returns whether the item will be drawn :return: true if item will be drawn on the map -:rtype: bool - .. seealso:: :py:func:`setEnabled` %End @@ -128,8 +123,6 @@ Returns whether the item will be drawn Returns true if the item is drawn using advanced effects, such as blend modes. :return: true if item uses advanced effects -:rtype: bool - %End protected: @@ -162,6 +155,7 @@ order they are drawn in. QgsComposerMapItemStack( QgsComposerMap *map ); %Docstring Constructor for QgsComposerMapItemStack. + :param map: QgsComposerMap the item stack is attached to %End @@ -172,19 +166,16 @@ Constructor for QgsComposerMapItemStack. Returns the number of items in the stack :return: number of items in the stack -:rtype: int - %End virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const; %Docstring Stores the state of the item stack in a DOM node + :param elem: is DOM element corresponding to a 'ComposerMap' tag :param doc: DOM document :return: true if write was successful -:rtype: bool - .. seealso:: :py:func:`readXml` %End @@ -192,12 +183,11 @@ Stores the state of the item stack in a DOM node virtual bool readXml( const QDomElement &elem, const QDomDocument &doc ) = 0; %Docstring Sets the item stack's state from a DOM document + :param elem: is DOM node corresponding to 'a ComposerMap' tag :param doc: DOM document :return: true if read was successful -:rtype: bool - .. seealso:: :py:func:`writeXml` %End @@ -205,6 +195,7 @@ Sets the item stack's state from a DOM document void drawItems( QPainter *painter ); %Docstring Draws the items from the stack on a specified painter + :param painter: destination QPainter %End @@ -214,8 +205,6 @@ Returns whether any items within the stack contain advanced effects, such as blending modes :return: true if item stack contains advanced effects -:rtype: bool - %End protected: @@ -225,6 +214,7 @@ such as blending modes Adds a new map item to the stack and takes ownership of the item. The item will be added to the end of the stack, and rendered above any existing map items already present in the stack. + :param item: QgsComposerMapItem to add to the stack .. note:: @@ -238,6 +228,7 @@ should be called for the QgsComposerMap to prevent rendering artifacts void removeItem( const QString &itemId ); %Docstring Removes an item from the stack and deletes the corresponding QgsComposerMapItem + :param itemId: id for the QgsComposerMapItem to remove .. note:: @@ -251,6 +242,7 @@ should be called for the QgsComposerMap to prevent rendering artifacts void moveItemUp( const QString &itemId ); %Docstring Moves an item up the stack, causing it to be rendered above other items + :param itemId: id for the QgsComposerMapItem to move up .. note:: @@ -264,6 +256,7 @@ called for the QgsComposerMap to redraw the map with the new item stack order void moveItemDown( const QString &itemId ); %Docstring Moves an item up the stack, causing it to be rendered above other items + :param itemId: id for the QgsComposerMapItem to move down .. note:: @@ -277,11 +270,10 @@ called for the QgsComposerMap to redraw the map with the new item stack order const QgsComposerMapItem *constItem( const QString &itemId ) const; %Docstring Returns a const reference to an item within the stack + :param itemId: id for the QgsComposerMapItem to find :return: const reference to item, if found -:rtype: QgsComposerMapItem - .. seealso:: :py:func:`item` %End @@ -289,11 +281,10 @@ Returns a const reference to an item within the stack QgsComposerMapItem *item( const QString &itemId ) const; %Docstring Returns a reference to an item within the stack + :param itemId: id for the QgsComposerMapItem to find :return: reference to item if found -:rtype: QgsComposerMapItem - .. seealso:: :py:func:`constItem` %End @@ -301,11 +292,10 @@ Returns a reference to an item within the stack QgsComposerMapItem *item( const int index ) const; %Docstring Returns a reference to an item within the stack + :param index: item position in the stack :return: reference to item if found -:rtype: QgsComposerMapItem - .. seealso:: :py:func:`constItem` %End @@ -316,8 +306,6 @@ Returns a reference to an item within the stack Returns a list of QgsComposerMapItems contained by the stack :return: list of items -:rtype: list of QgsComposerMapItem - %End protected: diff --git a/python/core/composer/qgscomposermapoverview.sip b/python/core/composer/qgscomposermapoverview.sip index 2950e4c52e3b..dda7102f2c15 100644 --- a/python/core/composer/qgscomposermapoverview.sip +++ b/python/core/composer/qgscomposermapoverview.sip @@ -30,6 +30,7 @@ order they are drawn in. QgsComposerMapOverviewStack( QgsComposerMap *map ); %Docstring Constructor for QgsComposerMapOverviewStack. + :param map: QgsComposerMap the overview stack is attached to %End @@ -38,6 +39,7 @@ Constructor for QgsComposerMapOverviewStack. Adds a new map overview to the stack and takes ownership of the overview. The overview will be added to the end of the stack, and rendered above any existing map overviews already present in the stack. + :param overview: QgsComposerMapOverview to add to the stack .. note:: @@ -51,6 +53,7 @@ should be called for the QgsComposerMap to prevent rendering artifacts void removeOverview( const QString &overviewId ); %Docstring Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview + :param overviewId: id for the QgsComposerMapOverview to remove .. note:: @@ -64,6 +67,7 @@ should be called for the QgsComposerMap to prevent rendering artifacts void moveOverviewUp( const QString &overviewId ); %Docstring Moves an overview up the stack, causing it to be rendered above other overviews + :param overviewId: id for the QgsComposerMapOverview to move up .. note:: @@ -77,6 +81,7 @@ called for the QgsComposerMap to redraw the map with the new overview stack orde void moveOverviewDown( const QString &overviewId ); %Docstring Moves an overview down the stack, causing it to be rendered below other overviews + :param overviewId: id for the QgsComposerMapOverview to move down .. note:: @@ -90,11 +95,10 @@ called for the QgsComposerMap to redraw the map with the new overview stack orde const QgsComposerMapOverview *constOverview( const QString &overviewId ) const; %Docstring Returns a const reference to an overview within the stack + :param overviewId: id for the QgsComposerMapOverview to find :return: const reference to overview, if found -:rtype: QgsComposerMapOverview - .. seealso:: :py:func:`overview` %End @@ -102,11 +106,10 @@ Returns a const reference to an overview within the stack QgsComposerMapOverview *overview( const QString &overviewId ) const; %Docstring Returns a reference to an overview within the stack + :param overviewId: id for the QgsComposerMapOverview to find :return: reference to overview if found -:rtype: QgsComposerMapOverview - .. seealso:: :py:func:`constOverview` %End @@ -114,11 +117,10 @@ Returns a reference to an overview within the stack QgsComposerMapOverview *overview( const int index ) const; %Docstring Returns a reference to an overview within the stack + :param index: overview position in the stack :return: reference to overview if found -:rtype: QgsComposerMapOverview - .. seealso:: :py:func:`constOverview` %End @@ -130,20 +132,17 @@ Returns a reference to an overview within the stack Returns a list of QgsComposerMapOverviews contained by the stack :return: list of overviews -:rtype: list of QgsComposerMapOverview - %End virtual bool readXml( const QDomElement &elem, const QDomDocument &doc ); %Docstring Sets the overview stack's state from a DOM document + :param elem: is DOM node corresponding to a 'ComposerMap' tag :param doc: DOM document :return: true if read was successful -:rtype: bool - .. seealso:: :py:func:`writeXml` %End @@ -169,6 +168,7 @@ QgsComposerMap, and shows the extent of another QgsComposerMap. QgsComposerMapOverview( const QString &name, QgsComposerMap *map ); %Docstring Constructor for QgsComposerMapOverview. + :param name: friendly display name for overview :param map: QgsComposerMap the overview is attached to %End @@ -179,6 +179,7 @@ Constructor for QgsComposerMapOverview. %Docstring Draws an overview + :param painter: destination QPainter %End @@ -186,11 +187,10 @@ Draws an overview %Docstring Stores overview state in DOM element + :param elem: is DOM element corresponding to a 'ComposerMap' tag :param doc: DOM document -:rtype: bool - .. seealso:: :py:func:`readXml` %End @@ -198,11 +198,10 @@ Stores overview state in DOM element %Docstring Sets overview state from a DOM document + :param itemElem: is DOM node corresponding to a 'ComposerMapOverview' tag :param doc: is DOM document -:rtype: bool - .. seealso:: :py:func:`writeXml` %End @@ -212,6 +211,7 @@ Sets overview state from a DOM document void setFrameMap( const int mapId ); %Docstring Sets overview frame map. + :param mapId: source map id. -1 disables the overview frame .. seealso:: :py:func:`frameMapId` @@ -222,13 +222,12 @@ Sets overview frame map. Returns id of source map. :return: source map id, or -1 if no source map set -:rtype: int - %End void setFrameSymbol( QgsFillSymbol *symbol /Transfer/ ); %Docstring Sets the fill symbol used for drawing the overview extent. + :param symbol: fill symbol for overview .. seealso:: :py:func:`frameSymbol` @@ -239,8 +238,6 @@ Sets the fill symbol used for drawing the overview extent. Gets the fill symbol used for drawing the overview extent. :return: fill symbol for overview -:rtype: QgsFillSymbol - .. seealso:: :py:func:`setFrameSymbol` %End @@ -251,8 +248,6 @@ Gets the fill symbol used for drawing the overview extent. Retrieves the blending mode used for drawing the overview. :return: blending mode for overview -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode` %End @@ -260,6 +255,7 @@ Retrieves the blending mode used for drawing the overview. void setBlendMode( const QPainter::CompositionMode blendMode ); %Docstring Sets the blending mode used for drawing the overview. + :param blendMode: blending mode for overview .. seealso:: :py:func:`blendMode` @@ -271,8 +267,6 @@ Returns whether the overview frame is inverted, ie, whether the shaded area is d the extent of the overview map. :return: true if overview frame is inverted -:rtype: bool - .. seealso:: :py:func:`setInverted` %End @@ -281,6 +275,7 @@ the extent of the overview map. %Docstring Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. + :param inverted: set to true if overview frame is to be inverted .. seealso:: :py:func:`inverted` @@ -291,8 +286,6 @@ the extent of the overview map. Returns whether the extent of the map is forced to center on the overview :return: true if map will be centered on overview -:rtype: bool - .. seealso:: :py:func:`setCentered` %End @@ -300,6 +293,7 @@ Returns whether the extent of the map is forced to center on the overview void setCentered( const bool centered ); %Docstring Sets whether the extent of the map is forced to center on the overview + :param centered: set to true if map will be centered on overview .. seealso:: :py:func:`centered` diff --git a/python/core/composer/qgscomposermodel.sip b/python/core/composer/qgscomposermodel.sip index 79e9bb1914a1..a0e24c872643 100644 --- a/python/core/composer/qgscomposermodel.sip +++ b/python/core/composer/qgscomposermodel.sip @@ -44,6 +44,7 @@ as required. explicit QgsComposerModel( QgsComposition *composition, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor + :param composition: composition to attach to :param parent: parent object %End @@ -88,8 +89,6 @@ Returns the size of the z-order list, which includes items which may have been removed from the composition. :return: size of z-order list -:rtype: int - .. versionadded:: 2.5 %End @@ -105,6 +104,7 @@ This method should be called after adding multiple items to the composition. void addItemAtTop( QgsComposerItem *item ); %Docstring Adds an item to the top of the composition z stack. + :param item: item to add. The item must not already exist in the z-order list. .. versionadded:: 2.5 @@ -115,6 +115,7 @@ Adds an item to the top of the composition z stack. void removeItem( QgsComposerItem *item ); %Docstring Removes an item from the z-order list. + :param item: item to remove .. versionadded:: 2.5 @@ -123,11 +124,10 @@ Removes an item from the z-order list. bool reorderItemUp( QgsComposerItem *item ); %Docstring Moves an item up the z-order list. + :param item: item to move :return: true if item was moved. Returns false if item was not found -:rtype: bool - in z-order list or was already at the top of the z-order list. .. seealso:: :py:func:`reorderItemDown` @@ -142,11 +142,10 @@ in z-order list or was already at the top of the z-order list. bool reorderItemDown( QgsComposerItem *item ); %Docstring Moves an item down the z-order list. + :param item: item to move :return: true if item was moved. Returns false if item was not found -:rtype: bool - in z-order list or was already at the bottom of the z-order list. .. seealso:: :py:func:`reorderItemUp` @@ -161,11 +160,10 @@ in z-order list or was already at the bottom of the z-order list. bool reorderItemToTop( QgsComposerItem *item ); %Docstring Moves an item to the top of the z-order list. + :param item: item to move :return: true if item was moved. Returns false if item was not found -:rtype: bool - in z-order list or was already at the top of the z-order list. .. seealso:: :py:func:`reorderItemUp` @@ -180,11 +178,10 @@ in z-order list or was already at the top of the z-order list. bool reorderItemToBottom( QgsComposerItem *item ); %Docstring Moves an item to the bottom of the z-order list. + :param item: item to move :return: true if item was moved. Returns false if item was not found -:rtype: bool - in z-order list or was already at the bottom of the z-order list. .. seealso:: :py:func:`reorderItemUp` @@ -201,11 +198,10 @@ in z-order list or was already at the bottom of the z-order list. Finds the next composer item above an item. This method only considers items which are currently in the composition, and ignores items which have been removed from the composition. + :param item: item to search above :return: item above specified item. If no items were found, no item -:rtype: QgsComposerItem - will be returned. .. seealso:: :py:func:`getComposerItemBelow` @@ -218,11 +214,10 @@ will be returned. Finds the next composer item below an item. This method only considers items which are currently in the composition, and ignores items which have been removed from the composition. + :param item: item to search above :return: item below specified item. If no items were found, no item -:rtype: QgsComposerItem - will be returned. .. seealso:: :py:func:`getComposerItemAbove` @@ -236,8 +231,6 @@ Returns the item z-order list. This list includes both items currently in the composition and items which have been removed from the composition. :return: item z-order list -:rtype: list of QgsComposerItem - .. versionadded:: 2.5 %End @@ -246,6 +239,7 @@ composition and items which have been removed from the composition. %Docstring Marks an item as removed from the composition. This must be called whenever an item has been removed from the composition. + :param item: to mark as removed from the composition .. seealso:: :py:func:`setItemRestored` @@ -257,6 +251,7 @@ has been removed from the composition. %Docstring Restores an item to the composition. This must be called whenever an item removed from the composition is restored to the composition. + :param item: to mark as restored to the composition .. seealso:: :py:func:`setItemRemoved` @@ -267,6 +262,7 @@ from the composition is restored to the composition. void updateItemDisplayName( QgsComposerItem *item ); %Docstring Must be called when an item's display name is modified + :param item: item to update .. seealso:: :py:func:`updateItemLockStatus` @@ -281,6 +277,7 @@ Must be called when an item's display name is modified void updateItemLockStatus( QgsComposerItem *item ); %Docstring Must be called when an item's lock status changes + :param item: item to update .. seealso:: :py:func:`updateItemDisplayName` @@ -295,6 +292,7 @@ Must be called when an item's lock status changes void updateItemVisibility( QgsComposerItem *item ); %Docstring Must be called when an item's visibility changes + :param item: item to update .. seealso:: :py:func:`updateItemDisplayName` @@ -309,6 +307,7 @@ Must be called when an item's visibility changes void updateItemSelectStatus( QgsComposerItem *item ); %Docstring Must be called when an item's selection status changes + :param item: item to update .. seealso:: :py:func:`updateItemDisplayName` @@ -323,12 +322,11 @@ Must be called when an item's selection status changes QModelIndex indexForItem( QgsComposerItem *item, const int column = 0 ); %Docstring Returns the QModelIndex corresponding to a QgsComposerItem, if possible + :param item: QgsComposerItem to find index for :param column: column number for created QModelIndex :return: QModelIndex corresponding to item and specified column -:rtype: QModelIndex - %End public slots: @@ -336,6 +334,7 @@ Returns the QModelIndex corresponding to a QgsComposerItem, if possible void setSelected( const QModelIndex &index ); %Docstring Sets an item as the current selection from a QModelIndex + :param index: QModelIndex of item to set as selected .. versionadded:: 2.5 @@ -364,6 +363,7 @@ class QgsComposerProxyModel: QSortFilterProxyModel QgsComposerProxyModel( QgsComposition *composition, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsComposerProxyModel. + :param composition: composition to attach model to :param parent: optional parent %End @@ -373,14 +373,13 @@ Constructor for QgsComposerProxyModel. Returns the current item type filter, or QgsComposerItem.ComposerItem if no item type filter is set. -:rtype: QgsComposerItem.ItemType - .. seealso:: :py:func:`setFilterType()` %End void setFilterType( QgsComposerItem::ItemType itemType ); %Docstring Sets the item type filter. Only matching item types will be shown. + :param itemType: type to filter. Set to QgsComposerItem.ComposerItem to show all item types. @@ -390,6 +389,7 @@ item types. void setExceptedItemList( const QList< QgsComposerItem * > &exceptList ); %Docstring Sets a list of specific items to exclude from the model + :param exceptList: list of items to exclude .. seealso:: :py:func:`exceptedItemList()` @@ -399,27 +399,22 @@ Sets a list of specific items to exclude from the model %Docstring Returns the list of specific items excluded from the model. -:rtype: list of QgsComposerItem - .. seealso:: :py:func:`setExceptedItemList()` %End QgsComposerModel *sourceLayerModel() const; %Docstring Returns the QgsComposerModel used in this proxy model. - -:rtype: QgsComposerModel %End QgsComposerItem *itemFromSourceIndex( const QModelIndex &sourceIndex ) const; %Docstring Returns the QgsComposerItem corresponding to an index from the source QgsComposerModel model. + :param sourceIndex: a QModelIndex :return: QgsComposerItem for specified index from QgsComposerModel -:rtype: QgsComposerItem - %End protected: diff --git a/python/core/composer/qgscomposermultiframe.sip b/python/core/composer/qgscomposermultiframe.sip index 8cadfc6c8a46..d36685c40649 100644 --- a/python/core/composer/qgscomposermultiframe.sip +++ b/python/core/composer/qgscomposermultiframe.sip @@ -52,6 +52,7 @@ Abstract base class for composer items with the ability to distribute the conten QgsComposerMultiFrame( QgsComposition *c /TransferThis/, bool createUndoCommands ); %Docstring Construct a new multiframe item. + :param c: parent composition :param createUndoCommands: %End @@ -63,19 +64,16 @@ Construct a new multiframe item. Returns the total size of the multiframe's content. :return: total size required for content -:rtype: QSizeF - %End virtual QSizeF fixedFrameSize( const int frameIndex = -1 ) const; %Docstring Returns the fixed size for a frame, if desired. If the fixed frame size changes, the sizes of all frames can be recalculated by calling recalculateFrameRects(). + :param frameIndex: frame number :return: fixed size for frame. If the size has a width or height of 0, then -:rtype: QSizeF - the frame size is not fixed in that direction and frames can have variable width or height accordingly. @@ -91,11 +89,10 @@ or height accordingly. Returns the minimum size for a frames, if desired. If the minimum size changes, the sizes of all frames can be recalculated by calling recalculateFrameRects(). + :param frameIndex: frame number :return: minimum size for frame. If the size has a width or height of 0, then -:rtype: QSizeF - the frame size has no minimum in that direction. .. versionadded:: 2.5 @@ -108,6 +105,7 @@ the frame size has no minimum in that direction. virtual void render( QPainter *painter, const QRectF &renderExtent, const int frameIndex ) = 0; %Docstring Renders a portion of the multiframe's content into a painter. + :param painter: destination painter :param renderExtent: visible extent of content to render into the painter. :param frameIndex: frame number for content @@ -118,6 +116,7 @@ Renders a portion of the multiframe's content into a painter. virtual void addFrame( QgsComposerFrame *frame /Transfer/, bool recalcFrameSizes = true ) = 0; %Docstring Adds a frame to the multiframe. + :param frame: frame to add :param recalcFrameSizes: set to true to force recalculation of all existing frame sizes @@ -127,11 +126,10 @@ Adds a frame to the multiframe. virtual double findNearbyPageBreak( double yPos ); %Docstring Finds the optimal position to break a frame at. + :param yPos: maximum vertical position for break :return: the optimal breakable position which occurs in the multi frame close -:rtype: float - to and before the specified yPos .. versionadded:: 2.3 @@ -141,6 +139,7 @@ to and before the specified yPos %Docstring Removes a frame from the multiframe. This method automatically removes the frame from the composition. + :param i: index of frame to remove :param removeEmptyPages: set to true to remove pages which are empty after the frame is removed @@ -159,6 +158,7 @@ Removes and deletes all child frames. void setResizeMode( ResizeMode mode ); %Docstring Sets the resize mode for the multiframe, and recalculates frame sizes to match. + :param mode: resize mode .. seealso:: :py:func:`resizeMode` @@ -169,8 +169,6 @@ Sets the resize mode for the multiframe, and recalculates frame sizes to match. Returns the resize mode for the multiframe. :return: resize mode -:rtype: ResizeMode - .. seealso:: :py:func:`setResizeMode` %End @@ -179,12 +177,11 @@ Returns the resize mode for the multiframe. %Docstring Stores state information about multiframe in DOM element. Implementations of writeXml should also call the _writeXML method to save general multiframe properties. + :param elem: is DOM element :param doc: is the DOM document :param ignoreFrames: set to false to avoid writing state information about child frames into DOM -:rtype: bool - .. seealso:: _writeXML %End @@ -192,12 +189,11 @@ should also call the _writeXML method to save general multiframe properties. %Docstring Stores state information about base multiframe object in DOM element. Implementations of writeXml should call this method. + :param elem: is DOM element :param doc: is the DOM document :param ignoreFrames: set to false to avoid writing state information about child frames into DOM -:rtype: bool - .. seealso:: :py:func:`writeXml` %End @@ -205,12 +201,11 @@ should call this method. %Docstring Reads multiframe state information from a DOM element. Implementations of readXml should also call the _readXML method to restore general multiframe properties. + :param itemElem: is DOM element :param doc: is the DOM document :param ignoreFrames: set to false to avoid read state information about child frames from DOM -:rtype: bool - .. seealso:: _readXML %End @@ -218,12 +213,11 @@ should also call the _readXML method to restore general multiframe properties. %Docstring Restores state information about base multiframe object from a DOM element. Implementations of readXml should call this method. + :param itemElem: is DOM element :param doc: is the DOM document :param ignoreFrames: set to false to avoid reading state information about child frames from DOM -:rtype: bool - .. seealso:: :py:func:`readXml` %End @@ -232,8 +226,6 @@ should call this method. Returns the parent composition for the multiframe. :return: composition -:rtype: QgsComposition - %End bool createUndoCommands() const; @@ -241,8 +233,6 @@ Returns the parent composition for the multiframe. Returns whether undo commands should be created for interactions with the multiframe. :return: true if undo commands should be created -:rtype: bool - .. seealso:: :py:func:`setCreateUndoCommands` %End @@ -250,6 +240,7 @@ Returns whether undo commands should be created for interactions with the multif void setCreateUndoCommands( bool enabled ); %Docstring Sets whether undo commands should be created for interactions with the multiframe. + :param enabled: set to true if undo commands should be created .. seealso:: :py:func:`createUndoCommands` @@ -260,19 +251,16 @@ Sets whether undo commands should be created for interactions with the multifram Returns the number of frames associated with this multiframe. :return: number of child frames -:rtype: int - * %End QgsComposerFrame *frame( int i ) const; %Docstring Returns a child frame from the multiframe. + :param i: index of frame :return: child frame if found -:rtype: QgsComposerFrame - .. seealso:: :py:func:`frameIndex` %End @@ -280,11 +268,10 @@ Returns a child frame from the multiframe. int frameIndex( QgsComposerFrame *frame ) const; %Docstring Returns the index of a frame within the multiframe + :param frame: frame to find index of :return: index for frame if found, -1 if frame not found in multiframe -:rtype: int - .. versionadded:: 2.5 @@ -294,14 +281,13 @@ Returns the index of a frame within the multiframe QgsComposerFrame *createNewFrame( QgsComposerFrame *currentFrame, QPointF pos, QSizeF size ); %Docstring Creates a new frame and adds it to the multi frame and composition. + :param currentFrame: an existing QgsComposerFrame from which to copy the size and general frame properties (e.g., frame style, background, rendering settings). :param pos: position of top-left corner of the new frame :param size: size of the new frame :return: new QgsComposerFrame -:rtype: QgsComposerFrame - .. versionadded:: 2.3 %End @@ -311,8 +297,6 @@ and general frame properties (e.g., frame style, background, rendering settings) Get multiframe display name. :return: display name for item -:rtype: str - .. versionadded:: 2.5 %End diff --git a/python/core/composer/qgscomposermultiframecommand.sip b/python/core/composer/qgscomposermultiframecommand.sip index 89f579c8646d..5f4d47b8334c 100644 --- a/python/core/composer/qgscomposermultiframecommand.sip +++ b/python/core/composer/qgscomposermultiframecommand.sip @@ -33,28 +33,14 @@ Constructor for QgsComposerMultiFrameCommand void saveAfterState(); QDomDocument previousState() const; -%Docstring - -:rtype: QDomDocument -%End QDomDocument afterState() const; -%Docstring - -:rtype: QDomDocument -%End bool containsChange() const; %Docstring Returns true if previous state and after state are valid and different - -:rtype: bool %End const QgsComposerMultiFrame *multiFrame() const; -%Docstring - -:rtype: QgsComposerMultiFrame -%End protected: @@ -64,10 +50,6 @@ Returns true if previous state and after state are valid and different void saveState( QDomDocument &stateDoc ); void restoreState( QDomDocument &stateDoc ); bool checkFirstRun(); -%Docstring - -:rtype: bool -%End }; class QgsComposerMultiFrameMergeCommand: QgsComposerMultiFrameCommand diff --git a/python/core/composer/qgscomposernodesitem.sip b/python/core/composer/qgscomposernodesitem.sip index 0a88606c66ff..6e46dcd85ea9 100644 --- a/python/core/composer/qgscomposernodesitem.sip +++ b/python/core/composer/qgscomposernodesitem.sip @@ -26,6 +26,7 @@ shapes such as polygon or polylines. QgsComposerNodesItem( const QString &mTagName, QgsComposition *c ); %Docstring Constructor + :param mTagName: tag used in XML file :param c: parent composition %End @@ -33,6 +34,7 @@ Constructor QgsComposerNodesItem( const QString &mTagName, const QPolygonF &polygon, QgsComposition *c ); %Docstring Constructor + :param mTagName: tag used in XML file :param polygon: nodes of the shape :param c: parent composition @@ -41,28 +43,27 @@ Constructor bool addNode( QPointF pt, const bool checkArea = true, const double radius = 10 ); %Docstring Add a node in current shape. + :param pt: is the location of the new node :param checkArea: is a flag to indicate if there's a space constraint. :param radius: is the space contraint and is used only if checkArea is true. Typically, if this flag is true, the new node has to be nearest than radius to the shape to be added. - -:rtype: bool %End void setDisplayNodes( const bool display = true ); %Docstring Set a tag to indicate if we want to draw or not the shape's nodes. + :param display: %End bool moveNode( const int index, QPointF node ); %Docstring Move a node to a new position. + :param index: the index of the node to move :param node: is the new position in scene coordinate - -:rtype: bool %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -75,56 +76,49 @@ Move a node to a new position. %Docstring Search the nearest node in shape within a maximal area. Returns the index of the nearest node or -1. + :param node: is where a shape's node is searched :param searchInRadius: is a flag to indicate if the area of research is limited in space. :param radius: is only used if searchInRadius is true - -:rtype: int %End bool nodePosition( const int index, QPointF &position ); %Docstring Gets the position of a node in scene coordinate. + :param index: of the node :param position: the position of the node :return: true if the index is valid and the position is set, false otherwise -:rtype: bool - %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is Dom document - -:rtype: bool %End bool removeNode( const int index ); %Docstring Remove a node from the shape. -:param index: of the node to delete -:rtype: bool +:param index: of the node to delete %End int nodesSize(); %Docstring Returns the number of nodes in the shape. - -:rtype: int %End bool setSelectedNode( const int index ); %Docstring Select a node. -:param index: the node to select -:rtype: bool +:param index: the node to select %End int selectedNode(); @@ -132,8 +126,6 @@ Select a node. Returns the currently selected node. :return: the index of the selected node, -1 otherwise -:rtype: int - %End void deselectNode(); @@ -145,10 +137,9 @@ Deselect a node. %Docstring Stores state in Dom element + :param elem: is Dom element corresponding to 'Composer' tag :param doc: write template file - -:rtype: bool %End protected: @@ -157,15 +148,11 @@ Stores state in Dom element virtual bool _addNode( const int nodeIndex, QPointF newNode, const double radius ) = 0; %Docstring Method called in addNode. - -:rtype: bool %End virtual bool _removeNode( const int nodeIndex ) = 0; %Docstring Method called in removeNode. - -:rtype: bool %End virtual void _draw( QPainter *painter ) = 0; @@ -192,8 +179,6 @@ the shape is resized thanks to the rubber band. * double computeDistance( QPointF pt1, QPointF pt2 ) const; %Docstring Compute an euclidian distance between 2 nodes. - -:rtype: float %End void updateSceneRect(); diff --git a/python/core/composer/qgscomposerobject.sip b/python/core/composer/qgscomposerobject.sip index a370b705ad28..43b9abf89cb0 100644 --- a/python/core/composer/qgscomposerobject.sip +++ b/python/core/composer/qgscomposerobject.sip @@ -82,14 +82,13 @@ A base class for objects which belong to a map composition. %Docstring Returns the composer object property definitions. -:rtype: QgsPropertiesDefinition - .. versionadded:: 3.0 %End QgsComposerObject( QgsComposition *composition ); %Docstring Constructor + :param composition: parent composition %End @@ -98,35 +97,29 @@ Constructor Returns the composition the item is attached to. :return: QgsComposition for item. -:rtype: QgsComposition - %End virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const; %Docstring Stores item state in DOM element + :param elem: is DOM element corresponding to item tag :param doc: is the DOM document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets item state from DOM element + :param itemElem: is DOM node corresponding to item tag :param doc: is DOM document - -:rtype: bool %End QgsPropertyCollection &dataDefinedProperties(); %Docstring Returns a reference to the object's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. versionadded:: 3.0 .. seealso:: :py:func:`setDataDefinedProperties()` @@ -136,6 +129,7 @@ Returns a reference to the object's property collection, used for data defined o void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the objects's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. versionadded:: 3.0 @@ -146,6 +140,7 @@ Sets the objects's property collection, used for data defined overrides. void setCustomProperty( const QString &key, const QVariant &value ); %Docstring Set a custom property for the object. + :param key: property key. If a property with the same key already exists it will be overwritten. :param value: property value @@ -161,12 +156,11 @@ Set a custom property for the object. QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const; %Docstring Read a custom property from the object. + :param key: property key :param defaultValue: default value to return if property with matching key does not exist :return: value of matching property -:rtype: QVariant - .. seealso:: :py:func:`setCustomProperty()` @@ -180,6 +174,7 @@ Read a custom property from the object. void removeCustomProperty( const QString &key ); %Docstring Remove a custom property from the object. + :param key: property key .. seealso:: :py:func:`setCustomProperty()` @@ -195,8 +190,6 @@ Remove a custom property from the object. %Docstring Return list of keys stored in custom properties for the object. -:rtype: list of str - .. seealso:: :py:func:`setCustomProperty()` .. seealso:: :py:func:`customProperty()` @@ -212,8 +205,6 @@ Return list of keys stored in custom properties for the object. Creates an expression context relating to the objects' current state. The context includes scopes for global, project and composition properties. -:rtype: QgsExpressionContext - .. versionadded:: 2.12 %End @@ -228,6 +219,7 @@ Triggers a redraw for the item %Docstring Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value. + :param property: data defined property to refresh. If property is set to QgsComposerItem.AllProperties then all data defined properties for the item will be refreshed. diff --git a/python/core/composer/qgscomposerpicture.sip b/python/core/composer/qgscomposerpicture.sip index b0880ce99266..38b39758e40c 100644 --- a/python/core/composer/qgscomposerpicture.sip +++ b/python/core/composer/qgscomposerpicture.sip @@ -48,8 +48,6 @@ A composer class that displays svg files or raster format (jpg, png, ...) virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -63,6 +61,7 @@ Reimplementation of QCanvasItem.paint Sets the source path of the image (may be svg or a raster format). Data defined picture source may override this value. The path can either be a local path or a remote (http) path. + :param path: path for the source image .. seealso:: :py:func:`usePictureExpression` @@ -78,8 +77,6 @@ Returns the path of the source image. Data defined picture source may override this value. The path can either be a local path or a remote (http) path. :return: path for the source image -:rtype: str - .. seealso:: :py:func:`usePictureExpression` @@ -99,20 +96,18 @@ corresponds to 1 scene size unit and resizes the svg symbol / image %Docstring Stores state in Dom element + :param elem: is Dom element corresponding to 'Composer' tag :param doc: is Dom document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is Dom document - -:rtype: bool %End double pictureRotation() const; @@ -120,8 +115,6 @@ Sets state from Dom document Returns the rotation used for drawing the picture within the item's frame, in degrees clockwise. -:rtype: float - .. versionadded:: 2.2 .. seealso:: :py:func:`setPictureRotation()` @@ -135,6 +128,7 @@ Sets the map object for rotation (by id). A value of -1 disables the map rotation. If this is set then the picture will be rotated by the same amount as the specified map object. This is useful especially for syncing north arrows with a map item. + :param composerMapId: composer map id to sync rotation with .. seealso:: :py:func:`setPictureRotation` @@ -149,8 +143,6 @@ disabled. If this is set then the picture is rotated by the same amount as the specified map object. :return: id of map object -:rtype: int - .. seealso:: :py:func:`setRotationMap` @@ -162,8 +154,6 @@ as the specified map object. True if the picture rotation is matched to a map item. :return: true if rotation map is in use -:rtype: bool - .. seealso:: :py:func:`rotationMap` @@ -174,8 +164,6 @@ True if the picture rotation is matched to a map item. %Docstring Returns the mode used to align the picture to a map's North. -:rtype: NorthMode - .. seealso:: :py:func:`setNorthMode()` .. seealso:: :py:func:`northOffset()` @@ -198,8 +186,6 @@ Sets the mode used to align the picture to a map's North. %Docstring Returns the offset added to the picture's rotation from a map's North. -:rtype: float - .. seealso:: :py:func:`setNorthOffset()` .. seealso:: :py:func:`northMode()` @@ -224,8 +210,6 @@ Returns the resize mode used for drawing the picture within the composer item's frame. :return: resize mode of picture -:rtype: ResizeMode - .. versionadded:: 2.3 @@ -236,6 +220,7 @@ item's frame. %Docstring Sets the picture's anchor point, which controls how it is placed within the picture item's frame. + :param anchor: anchor point for picture .. versionadded:: 2.3 @@ -249,8 +234,6 @@ Returns the picture's current anchor, which controls how it is placed within the picture item's frame. :return: anchor point for picture -:rtype: ItemPositionMode - .. versionadded:: 2.3 @@ -261,8 +244,6 @@ within the picture item's frame. %Docstring Returns the fill color used for parametrized SVG files. -:rtype: QColor - .. seealso:: :py:func:`setSvgFillColor()` .. seealso:: :py:func:`svgStrokeColor()` @@ -273,6 +254,7 @@ Returns the fill color used for parametrized SVG files. void setSvgFillColor( const QColor &color ); %Docstring Sets the fill color used for parametrized SVG files. + :param color: fill color. .. note:: @@ -291,8 +273,6 @@ non-parametrized SVG files. %Docstring Returns the stroke color used for parametrized SVG files. -:rtype: QColor - .. seealso:: :py:func:`setSvgStrokeColor()` .. seealso:: :py:func:`svgFillColor()` @@ -303,6 +283,7 @@ Returns the stroke color used for parametrized SVG files. void setSvgStrokeColor( const QColor &color ); %Docstring Sets the stroke color used for parametrized SVG files. + :param color: stroke color. .. note:: @@ -321,8 +302,6 @@ non-parametrized SVG files. %Docstring Returns the stroke width (in mm) used for parametrized SVG files. -:rtype: float - .. seealso:: :py:func:`setSvgStrokeWidth()` .. seealso:: :py:func:`svgStrokeColor()` @@ -333,6 +312,7 @@ Returns the stroke width (in mm) used for parametrized SVG files. void setSvgStrokeWidth( double width ); %Docstring Sets the stroke width used for parametrized SVG files. + :param width: stroke width in mm .. note:: @@ -352,8 +332,6 @@ non-parametrized SVG files. Returns the current picture mode (image format). :return: picture mode -:rtype: Mode - .. versionadded:: 2.3 %End @@ -373,6 +351,7 @@ the item's frame, only the way the picture is drawn within the item. virtual void setResizeMode( ResizeMode mode ); %Docstring Sets the resize mode used for drawing the picture within the item bounds. + :param mode: ResizeMode to use for image file .. versionadded:: 2.3 @@ -384,6 +363,7 @@ Sets the resize mode used for drawing the picture within the item bounds. %Docstring Recalculates the source image (if using an expression for picture's source) and reloads and redraws the picture. + :param context: expression context for evaluating data defined picture sources .. versionadded:: 2.3 diff --git a/python/core/composer/qgscomposerpolygon.sip b/python/core/composer/qgscomposerpolygon.sip index 480623f092ed..69992edb77d4 100644 --- a/python/core/composer/qgscomposerpolygon.sip +++ b/python/core/composer/qgscomposerpolygon.sip @@ -27,12 +27,14 @@ Composer item for polygons. QgsComposerPolygon( QgsComposition *c ); %Docstring Constructor + :param c: parent composition %End QgsComposerPolygon( const QPolygonF &polygon, QgsComposition *c ); %Docstring Constructor + :param polygon: nodes of the shape :param c: parent composition %End @@ -41,15 +43,11 @@ Constructor %Docstring Overridden to return shape name - -:rtype: str %End QgsFillSymbol *polygonStyleSymbol(); %Docstring Returns the QgsSymbol used to draw the shape. - -:rtype: QgsFillSymbol %End void setPolygonStyleSymbol( QgsFillSymbol *symbol ); @@ -60,8 +58,6 @@ Set the QgsSymbol used to draw the shape. virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End protected: @@ -72,8 +68,6 @@ Return correct graphics item type. %Docstring Add the node newPoint at the given position according to some criteres. * - -:rtype: bool %End virtual bool _removeNode( const int nodeIndex ); diff --git a/python/core/composer/qgscomposerpolyline.sip b/python/core/composer/qgscomposerpolyline.sip index ad36af82f047..97d5e3c75ed1 100644 --- a/python/core/composer/qgscomposerpolyline.sip +++ b/python/core/composer/qgscomposerpolyline.sip @@ -26,12 +26,14 @@ Composer item for polylines. QgsComposerPolyline( QgsComposition *c ); %Docstring Constructor + :param c: parent composition %End QgsComposerPolyline( const QPolygonF &polyline, QgsComposition *c ); %Docstring Constructor + :param polyline: nodes of the shape :param c: parent composition %End @@ -40,15 +42,11 @@ Constructor %Docstring Overridden to return shape name - -:rtype: str %End QgsLineSymbol *polylineStyleSymbol(); %Docstring Returns the QgsSymbol used to draw the shape. - -:rtype: QgsLineSymbol %End void setPolylineStyleSymbol( QgsLineSymbol *symbol ); @@ -59,8 +57,6 @@ Set the QgsSymbol used to draw the shape. virtual int type() const; %Docstring Overridden to return shape type - -:rtype: int %End protected: @@ -71,8 +67,6 @@ Overridden to return shape type %Docstring Add the node newPoint at the given position according to some criteres. * - -:rtype: bool %End virtual bool _removeNode( const int nodeIndex ); diff --git a/python/core/composer/qgscomposerscalebar.sip b/python/core/composer/qgscomposerscalebar.sip index 9b88556ec9c7..dc4f553e5040 100644 --- a/python/core/composer/qgscomposerscalebar.sip +++ b/python/core/composer/qgscomposerscalebar.sip @@ -26,8 +26,6 @@ A scale bar item that can be added to a map composition. virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -37,32 +35,18 @@ Return correct graphics item type. %End int numSegments() const; -%Docstring - -:rtype: int -%End void setNumSegments( int nSegments ); int numSegmentsLeft() const; -%Docstring - -:rtype: int -%End void setNumSegmentsLeft( int nSegmentsLeft ); double numUnitsPerSegment() const; -%Docstring - -:rtype: float -%End void setNumUnitsPerSegment( double units ); QgsScaleBarSettings::SegmentSizeMode segmentSizeMode() const; %Docstring Returns the size mode for scale bar segments. -:rtype: QgsScaleBarSettings.SegmentSizeMode - .. seealso:: :py:func:`setSegmentSizeMode` .. seealso:: :py:func:`minBarWidth` @@ -75,6 +59,7 @@ Returns the size mode for scale bar segments. void setSegmentSizeMode( QgsScaleBarSettings::SegmentSizeMode mode ); %Docstring Sets the size mode for scale bar segments. + :param mode: size mode .. seealso:: :py:func:`segmentSizeMode` @@ -92,8 +77,6 @@ Returns the minimum size (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. -:rtype: float - .. seealso:: :py:func:`segmentSizeMode` .. seealso:: :py:func:`setMinBarWidth` @@ -108,6 +91,7 @@ to SegmentSizeFitWidth. Sets the minimum size (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. + :param minWidth: minimum width in millimeters .. seealso:: :py:func:`minBarWidth` @@ -125,8 +109,6 @@ Returns the maximum size (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. -:rtype: float - .. seealso:: :py:func:`segmentSizeMode` .. seealso:: :py:func:`setMaxBarWidth` @@ -141,6 +123,7 @@ to SegmentSizeFitWidth. Sets the maximum size (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. + :param maxWidth: maximum width in millimeters .. seealso:: :py:func:`minBarWidth` @@ -153,24 +136,12 @@ to SegmentSizeFitWidth. %End double numMapUnitsPerScaleBarUnit() const; -%Docstring - -:rtype: float -%End void setNumMapUnitsPerScaleBarUnit( double d ); QString unitLabeling() const; -%Docstring - -:rtype: str -%End void setUnitLabeling( const QString &label ); QFont font() const; -%Docstring - -:rtype: QFont -%End void setFont( const QFont &font ); QColor fontColor() const; @@ -178,8 +149,6 @@ to SegmentSizeFitWidth. Returns the color used for drawing text in the scalebar. :return: font color for scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFontColor` @@ -189,6 +158,7 @@ Returns the color used for drawing text in the scalebar. void setFontColor( const QColor &c ); %Docstring Sets the color used for drawing text in the scalebar. + :param c: font color for scalebar. .. seealso:: :py:func:`fontColor` @@ -200,8 +170,6 @@ Sets the color used for drawing text in the scalebar. %Docstring Returns the color used for fills in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFillColor()` .. seealso:: :py:func:`fillColor2()` @@ -224,8 +192,6 @@ Sets the color used for fills in the scalebar. %Docstring Returns the secondary color used for fills in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFillColor2()` .. seealso:: :py:func:`fillColor()` @@ -248,8 +214,6 @@ Sets the secondary color used for fills in the scalebar. %Docstring Returns the color used for lines in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setLineColor()` .. versionadded:: 3.0 @@ -268,8 +232,6 @@ Sets the color used for lines in the scalebar. %Docstring Returns the line width in millimeters for lines in the scalebar. -:rtype: float - .. seealso:: :py:func:`setLineWidth()` .. versionadded:: 3.0 @@ -289,8 +251,6 @@ Sets the line width in millimeters for lines in the scalebar. Returns the pen used for drawing the scalebar. :return: QPen used for drawing the scalebar outlines. -:rtype: QPen - .. seealso:: :py:func:`setPen` @@ -302,8 +262,6 @@ Returns the pen used for drawing the scalebar. Returns the primary brush for the scalebar. :return: QBrush used for filling the scalebar -:rtype: QBrush - .. seealso:: :py:func:`setBrush` @@ -318,8 +276,6 @@ Returns the secondary brush for the scalebar. This is used for alternating color as single and double box styles. :return: QBrush used for secondary color areas -:rtype: QBrush - .. seealso:: :py:func:`setBrush2` @@ -327,10 +283,6 @@ as single and double box styles. %End double height() const; -%Docstring - -:rtype: float -%End void setHeight( double h ); void setComposerMap( QgsComposerMap *map ); @@ -341,29 +293,17 @@ Sets the ``map`` item linked to the scalebar. QgsComposerMap *composerMap() const; %Docstring Returns the map item linked to the scalebar. - -:rtype: QgsComposerMap %End double labelBarSpace() const; -%Docstring - -:rtype: float -%End void setLabelBarSpace( double space ); double boxContentSpace() const; -%Docstring - -:rtype: float -%End void setBoxContentSpace( double space ); QgsScaleBarSettings::Alignment alignment() const; %Docstring Returns the alignment of the scalebar. - -:rtype: QgsScaleBarSettings.Alignment %End void setAlignment( QgsScaleBarSettings::Alignment alignment ); @@ -374,8 +314,6 @@ Sets the ``alignment`` of the scalebar. QgsUnitTypes::DistanceUnit units() const; %Docstring Returns the scalebar distance units. - -:rtype: QgsUnitTypes.DistanceUnit %End void setUnits( QgsUnitTypes::DistanceUnit u ); @@ -388,8 +326,6 @@ Sets the scalebar distance units. Returns the join style used for drawing lines in the scalebar :return: Join style for lines -:rtype: Qt.PenJoinStyle - .. versionadded:: 2.3 @@ -399,6 +335,7 @@ Returns the join style used for drawing lines in the scalebar void setLineJoinStyle( Qt::PenJoinStyle style ); %Docstring Sets join style used when drawing the lines in the scalebar + :param style: Join style for lines :return: nothing @@ -413,8 +350,6 @@ Sets join style used when drawing the lines in the scalebar Returns the cap style used for drawing lines in the scalebar :return: Cap style for lines -:rtype: Qt.PenCapStyle - .. versionadded:: 2.3 @@ -424,6 +359,7 @@ Returns the cap style used for drawing lines in the scalebar void setLineCapStyle( Qt::PenCapStyle style ); %Docstring Sets cap style used when drawing the lines in the scalebar + :param style: Cap style for lines :return: nothing @@ -445,14 +381,13 @@ Apply default size (scale bar 1/5 of map item width) void setStyle( const QString &styleName ); %Docstring Sets style by name + :param styleName: (untranslated) style name. Possibilities are: 'Single Box', 'Double Box', 'Line Ticks Middle', 'Line Ticks Down', 'Line Ticks Up', 'Numeric'* %End QString style() const; %Docstring Returns style name - -:rtype: str %End void adjustBoxSize(); @@ -470,20 +405,18 @@ Adjusts box size and calls QgsComposerItem.update() %Docstring Stores state in Dom element + :param elem: is Dom element corresponding to 'Composer' tag :param doc: Dom document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is Dom document - -:rtype: bool %End void correctXPositionAlignment( double width, double widthAfter ); diff --git a/python/core/composer/qgscomposershape.sip b/python/core/composer/qgscomposershape.sip index 1b24a722bc9a..bf0000754ae5 100644 --- a/python/core/composer/qgscomposershape.sip +++ b/python/core/composer/qgscomposershape.sip @@ -35,8 +35,6 @@ A composer items that draws common shapes (ellipse, triangle, rectangle)* virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -49,27 +47,21 @@ Return correct graphics item type. %Docstring Stores state in Dom element + :param elem: is Dom element corresponding to 'Composer' tag :param doc: write template file - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is Dom document - -:rtype: bool %End QgsComposerShape::Shape shapeType() const; -%Docstring - -:rtype: QgsComposerShape.Shape -%End void setShapeType( QgsComposerShape::Shape s ); void setCornerRadius( double radius ); @@ -79,8 +71,6 @@ Sets radius for rounded rectangle corners. Added in v2.1 double cornerRadius() const; %Docstring Returns the radius for rounded rectangle corners - -:rtype: float %End void setShapeStyleSymbol( QgsFillSymbol *symbol ); @@ -94,8 +84,6 @@ Note: added in version 2.1* %Docstring Returns the QgsFillSymbol used to draw the shape. Note: added in version 2.1* - -:rtype: QgsFillSymbol %End void setUseSymbol( bool useSymbol ); @@ -109,8 +97,6 @@ Note: Added in v2.1 * %Docstring Depending on the symbol style, the bounding rectangle can be larger than the shape -:rtype: QRectF - .. versionadded:: 2.3 %End @@ -141,8 +127,6 @@ reimplement drawBackground, since it's not a rect, but a custom shape */ %Docstring Reimplement estimatedFrameBleed, since frames on shapes are drawn using symbology rather than the item's pen * - -:rtype: float %End public slots: diff --git a/python/core/composer/qgscomposertablecolumn.sip b/python/core/composer/qgscomposertablecolumn.sip index 64d8a6d3e5f5..b4b538e06938 100644 --- a/python/core/composer/qgscomposertablecolumn.sip +++ b/python/core/composer/qgscomposertablecolumn.sip @@ -26,17 +26,17 @@ have an effect for QgsComposerAttributeTables, and have no effect for QgsCompose QgsComposerTableColumn( const QString &heading = QString() ); %Docstring Constructor for QgsComposerTableColumn. + :param heading: column heading %End virtual bool writeXml( QDomElement &columnElem, QDomDocument &doc ) const; %Docstring Writes the column's properties to xml for storage. + :param columnElem: an existing QDomElement in which to store the column's properties. :param doc: QDomDocument for the destination xml. -:rtype: bool - .. versionadded:: 2.3 .. seealso:: :py:func:`readXml` @@ -45,9 +45,8 @@ Writes the column's properties to xml for storage. virtual bool readXml( const QDomElement &columnElem ); %Docstring Reads the column's properties from xml. -:param columnElem: a QDomElement holding the column's desired properties. -:rtype: bool +:param columnElem: a QDomElement holding the column's desired properties. .. versionadded:: 2.3 @@ -59,8 +58,6 @@ Reads the column's properties from xml. Returns the width for a column. :return: column width in mm, or 0 if column width is automatically calculated. -:rtype: float - .. versionadded:: 2.5 @@ -70,6 +67,7 @@ Returns the width for a column. void setWidth( const double width ); %Docstring Sets the width for a column. + :param width: column width in mm, or 0 if column width is to be automatically calculated. .. versionadded:: 2.5 @@ -83,8 +81,6 @@ Returns the heading for a column, which is the value displayed in the columns header cell. :return: Heading for column. -:rtype: str - .. versionadded:: 2.3 @@ -95,6 +91,7 @@ header cell. %Docstring Sets the heading for a column, which is the value displayed in the columns header cell. + :param heading: Heading for column. .. versionadded:: 2.3 @@ -108,8 +105,6 @@ Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. :return: horizontal alignment. -:rtype: Qt.AlignmentFlag - .. versionadded:: 2.3 @@ -122,6 +117,7 @@ used for drawing column values within cells. %Docstring Sets the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. + :param alignment: horizontal alignment for cell. .. versionadded:: 2.3 @@ -137,8 +133,6 @@ Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells. :return: vertical alignment. -:rtype: Qt.AlignmentFlag - .. versionadded:: 2.12 @@ -151,6 +145,7 @@ used for drawing column values within cells. %Docstring Sets the vertical alignment for a column, which controls the alignment used for drawing column values within cells. + :param alignment: vertical alignment for cell. .. versionadded:: 2.12 @@ -166,8 +161,6 @@ Returns the attribute name or expression used for the column's values. This prop is only used when the column is part of a QgsComposerAttributeTable. :return: attribute name or expression text for column -:rtype: str - .. versionadded:: 2.3 @@ -182,6 +175,7 @@ is only used when the column is part of a QgsComposerAttributeTable. %Docstring Sets the attribute name or expression used for the column's values. This property is only used when the column is part of a QgsComposerAttributeTable. + :param attribute: attribute name or expression text for column .. versionadded:: 2.3 @@ -199,8 +193,6 @@ Returns the sort order for the column. This property is only used when the colum is part of a QgsComposerAttributeTable and when sortByRank is > 0. :return: sort order for column -:rtype: Qt.SortOrder - .. versionadded:: 2.3 @@ -217,6 +209,7 @@ is part of a QgsComposerAttributeTable and when sortByRank is > 0. %Docstring Sets the sort order for the column. This property is only used when the column is part of a QgsComposerAttributeTable and when sortByRank is > 0. + :param sortOrder: sort order for column .. versionadded:: 2.3 @@ -239,8 +232,6 @@ having higher priority. This property is only used when the column is part of a QgsComposerAttributeTable. :return: sort rank for column. If sort rank is <= 0 then the column is not being -:rtype: int - sorted. .. versionadded:: 2.3 @@ -261,6 +252,7 @@ will be sorted in the table. The sort rank specifies the priority given to the column when the table is sorted by multiple columns, with lower sort ranks having higher priority. This property is only used when the column is part of a QgsComposerAttributeTable. + :param sortByRank: sort rank for column. If sort rank is <= 0 then the column is not being sorted. @@ -280,8 +272,6 @@ sorted. Creates a duplicate column which is a deep copy of this column. :return: a new QgsComposerTableColumn with same properties as this column. -:rtype: QgsComposerTableColumn - .. versionadded:: 2.3 %End diff --git a/python/core/composer/qgscomposertablev2.sip b/python/core/composer/qgscomposertablev2.sip index 0805454665b7..1b355fcdacea 100644 --- a/python/core/composer/qgscomposertablev2.sip +++ b/python/core/composer/qgscomposertablev2.sip @@ -47,20 +47,18 @@ Cell background color bool writeXml( QDomElement &styleElem, QDomDocument &doc ) const; %Docstring Writes the style's properties to XML for storage. + :param styleElem: an existing QDomElement in which to store the style's properties. :param doc: QDomDocument for the destination XML. -:rtype: bool - .. seealso:: :py:func:`readXml` %End bool readXml( const QDomElement &styleElem ); %Docstring Reads the style's properties from XML. -:param styleElem: a QDomElement holding the style's desired properties. -:rtype: bool +:param styleElem: a QDomElement holding the style's desired properties. .. seealso:: :py:func:`writeXml` %End @@ -130,6 +128,7 @@ the table to span over multiple frames void setCellMargin( const double margin ); %Docstring Sets the margin distance between cell borders and their contents. + :param margin: margin for cell contents .. seealso:: :py:func:`cellMargin` @@ -140,8 +139,6 @@ Sets the margin distance between cell borders and their contents. Returns the margin distance between cell borders and their contents. :return: margin for cell contents -:rtype: float - .. seealso:: :py:func:`setCellMargin` %End @@ -149,6 +146,7 @@ Returns the margin distance between cell borders and their contents. void setEmptyTableBehavior( const EmptyTableMode mode ); %Docstring Sets the behavior for empty tables with no content rows. + :param mode: behavior mode for empty tables .. seealso:: :py:func:`emptyTableBehavior` @@ -160,8 +158,6 @@ Returns the behavior mode for empty tables. This property controls how the table is drawn if it contains no content rows. :return: behavior mode for empty tables -:rtype: EmptyTableMode - .. seealso:: :py:func:`setEmptyTableBehavior` %End @@ -171,6 +167,7 @@ how the table is drawn if it contains no content rows. Sets the message for empty tables with no content rows. This message is displayed in the table body if the empty table behavior is set to ShowMessage + :param message: message to show for empty tables .. seealso:: :py:func:`emptyTableMessage` @@ -185,8 +182,6 @@ is displayed in the table body if the empty table behavior is set to ShowMessage :return: message to show for empty tables -:rtype: str - .. seealso:: :py:func:`setEmptyTableMessage` @@ -196,6 +191,7 @@ set to ShowMessage void setShowEmptyRows( const bool showEmpty ); %Docstring Sets whether empty rows should be drawn. Tables default to hiding empty rows. + :param showEmpty: set to true to show empty rows in the table .. seealso:: :py:func:`showEmptyRows` @@ -206,8 +202,6 @@ Sets whether empty rows should be drawn. Tables default to hiding empty rows. Returns whether empty rows are drawn in the table :return: true if empty rows are drawn -:rtype: bool - .. seealso:: :py:func:`setShowEmptyRows` %End @@ -215,6 +209,7 @@ Returns whether empty rows are drawn in the table void setHeaderFont( const QFont &font ); %Docstring Sets the font used to draw header text in the table. + :param font: font for header cells .. seealso:: :py:func:`headerFont` @@ -227,8 +222,6 @@ Sets the font used to draw header text in the table. Returns the font used to draw header text in the table. :return: font for header cells -:rtype: QFont - .. seealso:: :py:func:`setHeaderFont` @@ -238,6 +231,7 @@ Returns the font used to draw header text in the table. void setHeaderFontColor( const QColor &color ); %Docstring Sets the color used to draw header text in the table. + :param color: header text color .. seealso:: :py:func:`headerFontColor` @@ -252,8 +246,6 @@ Sets the color used to draw header text in the table. Returns the color used to draw header text in the table. :return: color for header text -:rtype: QColor - .. seealso:: :py:func:`setHeaderFontColor` @@ -265,6 +257,7 @@ Returns the color used to draw header text in the table. void setHeaderHAlignment( const HeaderHAlignment alignment ); %Docstring Sets the horizontal alignment for table headers + :param alignment: Horizontal alignment for table header cells .. seealso:: :py:func:`headerHAlignment` @@ -275,8 +268,6 @@ Sets the horizontal alignment for table headers Returns the horizontal alignment for table headers :return: Horizontal alignment for table header cells -:rtype: HeaderHAlignment - .. seealso:: :py:func:`setHeaderHAlignment` %End @@ -285,6 +276,7 @@ Returns the horizontal alignment for table headers %Docstring Sets the display mode for headers in the table. This property controls if and where headers are shown in the table. + :param mode: display mode for headers .. seealso:: :py:func:`headerMode` @@ -296,8 +288,6 @@ Returns the display mode for headers in the table. This property controls if and where headers are shown in the table. :return: display mode for headers -:rtype: HeaderMode - .. seealso:: :py:func:`setHeaderMode` %End @@ -305,6 +295,7 @@ if and where headers are shown in the table. void setContentFont( const QFont &font ); %Docstring Sets the font used to draw text in table body cells. + :param font: font for table cells .. seealso:: :py:func:`contentFont` @@ -317,8 +308,6 @@ Sets the font used to draw text in table body cells. Returns the font used to draw text in table body cells. :return: font for table cells -:rtype: QFont - .. seealso:: :py:func:`setContentFont` @@ -328,6 +317,7 @@ Returns the font used to draw text in table body cells. void setContentFontColor( const QColor &color ); %Docstring Sets the color used to draw text in table body cells. + :param color: table cell text color .. seealso:: :py:func:`contentFontColor` @@ -342,8 +332,6 @@ Sets the color used to draw text in table body cells. Returns the color used to draw text in table body cells. :return: text color for table cells -:rtype: QColor - .. seealso:: :py:func:`setContentFontColor` @@ -355,6 +343,7 @@ Returns the color used to draw text in table body cells. void setShowGrid( const bool showGrid ); %Docstring Sets whether grid lines should be drawn in the table + :param showGrid: set to true to show grid lines .. seealso:: :py:func:`showGrid` @@ -369,8 +358,6 @@ Sets whether grid lines should be drawn in the table Returns whether grid lines are drawn in the table :return: true if grid lines are shown -:rtype: bool - .. seealso:: :py:func:`setShowGrid` @@ -382,6 +369,7 @@ Returns whether grid lines are drawn in the table void setGridStrokeWidth( const double width ); %Docstring Sets the width for grid lines in the table. + :param width: grid line width .. seealso:: :py:func:`gridStrokeWidth` @@ -396,8 +384,6 @@ Sets the width for grid lines in the table. Returns the width of grid lines in the table. :return: grid line width -:rtype: float - .. seealso:: :py:func:`setGridStrokeWidth` @@ -409,6 +395,7 @@ Returns the width of grid lines in the table. void setGridColor( const QColor &color ); %Docstring Sets color used for grid lines in the table. + :param color: grid line color .. seealso:: :py:func:`gridColor` @@ -423,8 +410,6 @@ Sets color used for grid lines in the table. Returns the color used for grid lines in the table. :return: grid line color -:rtype: QColor - .. seealso:: :py:func:`setGridColor` @@ -436,6 +421,7 @@ Returns the color used for grid lines in the table. void setHorizontalGrid( const bool horizontalGrid ); %Docstring Sets whether the grid's horizontal lines should be drawn in the table + :param horizontalGrid: set to true to draw grid's horizontal lines .. seealso:: :py:func:`setShowGrid` @@ -454,8 +440,6 @@ Sets whether the grid's horizontal lines should be drawn in the table Returns whether the grid's horizontal lines are drawn in the table :return: true if grid's horizontal lines are drawn -:rtype: bool - .. seealso:: :py:func:`setShowGrid` @@ -471,6 +455,7 @@ Returns whether the grid's horizontal lines are drawn in the table void setVerticalGrid( const bool verticalGrid ); %Docstring Sets whether the grid's vertical lines should be drawn in the table + :param verticalGrid: set to true to draw grid's vertical lines .. seealso:: :py:func:`setShowGrid` @@ -489,8 +474,6 @@ Sets whether the grid's vertical lines should be drawn in the table Returns whether the grid's vertical lines are drawn in the table :return: true if grid's vertical lines are drawn -:rtype: bool - .. seealso:: :py:func:`setShowGrid` @@ -506,6 +489,7 @@ Returns whether the grid's vertical lines are drawn in the table void setBackgroundColor( const QColor &color ); %Docstring Sets color used for background of table. + :param color: table background color .. seealso:: :py:func:`backgroundColor` @@ -518,8 +502,6 @@ Sets color used for background of table. Returns the color used for the background of the table. :return: table background color -:rtype: QColor - .. seealso:: :py:func:`setBackgroundColor` @@ -530,6 +512,7 @@ Returns the color used for the background of the table. %Docstring Sets the wrap behavior for the table, which controls how text within cells is automatically wrapped. + :param behavior: wrap behavior .. seealso:: :py:func:`wrapBehavior` @@ -543,8 +526,6 @@ Returns the wrap behavior for the table, which controls how text within cells is automatically wrapped. :return: current wrap behavior -:rtype: WrapBehavior - .. seealso:: :py:func:`setWrapBehavior` @@ -556,8 +537,6 @@ automatically wrapped. Returns a pointer to the list of QgsComposerTableColumns shown in the table :return: pointer to list of columns in table -:rtype: QgsComposerTableColumns - .. seealso:: :py:func:`setColumns` %End @@ -565,6 +544,7 @@ Returns a pointer to the list of QgsComposerTableColumns shown in the table void setColumns( const QgsComposerTableColumns &columns /Transfer/ ); %Docstring Replaces the columns in the table with a specified list of QgsComposerTableColumns. + :param columns: list of QgsComposerTableColumns to show in table. Ownership of columns is transferred to the table. @@ -574,6 +554,7 @@ is transferred to the table. void setCellStyle( CellStyleGroup group, const QgsComposerTableStyle &style ); %Docstring Sets the cell style for a cell group. + :param group: group to set style for :param style: new cell style @@ -585,9 +566,8 @@ Sets the cell style for a cell group. const QgsComposerTableStyle *cellStyle( CellStyleGroup group ) const; %Docstring Returns the cell style for a cell group. -:param group: group to retrieve style for -:rtype: QgsComposerTableStyle +:param group: group to retrieve style for .. seealso:: :py:func:`setCellStyle()` @@ -600,7 +580,6 @@ Returns the cell style for a cell group. Fetches the contents used for the cells in the table. :return: true if table contents were successfully retrieved. -:rtype: bool :param contents: QgsComposerTableContents to store retrieved row data in %End @@ -610,8 +589,6 @@ Fetches the contents used for the cells in the table. Returns the current contents of the table. Excludes header cells. :return: table contents -:rtype: QgsComposerTableContents - %End virtual QSizeF fixedFrameSize( const int frameIndex = -1 ) const; @@ -670,35 +647,24 @@ new data. virtual bool calculateMaxColumnWidths(); %Docstring Calculates the maximum width of text shown in columns. - -:rtype: bool %End virtual bool calculateMaxRowHeights(); %Docstring Calculates the maximum height of text shown in rows. -:rtype: bool - .. versionadded:: 2.12 %End double totalWidth(); -%Docstring - -:rtype: float -%End double totalHeight(); -%Docstring - -:rtype: float -%End int rowsVisible( double frameHeight, int firstRow, bool includeHeader, bool includeEmptyRows ) const; %Docstring Calculates how many content rows would be visible within a frame of the specified height. + :param frameHeight: height of frame :param firstRow: index of first row visible in frame (where 0 = first row in table) :param includeHeader: set to true if frame would include a header row @@ -707,8 +673,6 @@ if the frame would include all table content rows and have space left for extra to true would also include a count of these extra blank rows. :return: number of visible content rows (excluding header row) -:rtype: int - .. versionadded:: 2.12 %End @@ -716,6 +680,7 @@ to true would also include a count of these extra blank rows. int rowsVisible( int frameIndex, int firstRow, bool includeEmptyRows ) const; %Docstring Calculates how many content rows are visible within a given frame. + :param frameIndex: index number for frame :param firstRow: index of first row visible in frame (where 0 = first row in table) :param includeEmptyRows: set to true to also include rows which would be empty in the returned count. For instance, @@ -723,8 +688,6 @@ if the frame would include all table content rows and have space left for extra to true would also include a count of these extra blank rows. :return: number of visible content rows (excludes header rows) -:rtype: int - .. versionadded:: 2.12 %End @@ -732,11 +695,10 @@ to true would also include a count of these extra blank rows. QPair rowRange( const int frameIndex ) const; %Docstring Calculates a range of rows which should be visible in a given frame. + :param frameIndex: index number for frame :return: row range -:rtype: QPair - .. versionadded:: 2.12 %End @@ -744,6 +706,7 @@ Calculates a range of rows which should be visible in a given frame. void drawHorizontalGridLines( QPainter *painter, int firstRow, int lastRow, bool drawHeaderLines ) const; %Docstring Draws the horizontal grid lines for the table. + :param painter: destination painter for grid lines :param firstRow: index corresponding to first row shown in frame :param lastRow: index corresponding to last row shown in frame. If greater than the number of content rows in the @@ -764,12 +727,11 @@ Recalculates and updates the size of the table and all table frames. bool contentsContainsRow( const QgsComposerTableContents &contents, const QgsComposerTableRow &row ) const; %Docstring Checks whether a table contents contains a given row + :param contents: table contents to check :param row: row to check for :return: true if contents contains rows -:rtype: bool - %End }; diff --git a/python/core/composer/qgscomposertexttable.sip b/python/core/composer/qgscomposertexttable.sip index 0468e369148d..f85d397411c5 100644 --- a/python/core/composer/qgscomposertexttable.sip +++ b/python/core/composer/qgscomposertexttable.sip @@ -26,6 +26,7 @@ A text table item that reads text from string lists void addRow( const QStringList &row ); %Docstring Adds a row to the table + :param row: list of strings to use for each cell's value in the newly added row .. note:: @@ -42,6 +43,7 @@ of columns in the table then these extra strings will be ignored. void setContents( const QList< QStringList > &contents ); %Docstring Sets the contents of the text table. + :param contents: list of table rows .. seealso:: :py:func:`addRow` diff --git a/python/core/composer/qgscomposerutils.sip b/python/core/composer/qgscomposerutils.sip index 6f1488affa2c..bdfaaa96a68c 100644 --- a/python/core/composer/qgscomposerutils.sip +++ b/python/core/composer/qgscomposerutils.sip @@ -23,6 +23,7 @@ Utilities for compositions. static void drawArrowHead( QPainter *p, const double x, const double y, const double angle, const double arrowHeadWidth ); %Docstring Draws an arrow head on to a QPainter. + :param p: destination painter :param x: x-coordinate of arrow center :param y: y-coordinate of arrow center @@ -35,17 +36,17 @@ clockwise from pointing vertical upward %Docstring Calculates the angle of the line from p1 to p2 (counter clockwise, starting from a line from north to south) + :param p1: start point of line :param p2: end point of line :return: angle in degrees, clockwise from south -:rtype: float - %End static void rotate( const double angle, double &x, double &y ); %Docstring Rotates a point / vector around the origin. + :param angle: rotation angle in degrees, counterclockwise :param x: in/out: x coordinate before / after the rotation :param y: in/out: y cooreinate before / after the rotation @@ -54,11 +55,10 @@ Rotates a point / vector around the origin. static double normalizedAngle( const double angle ); %Docstring Ensures that an angle is in the range 0 <= angle < 360 + :param angle: angle in degrees :return: equivalent angle within the range [0, 360) -:rtype: float - .. seealso:: :py:func:`snappedAngle` %End @@ -66,32 +66,29 @@ Ensures that an angle is in the range 0 <= angle < 360 static double snappedAngle( const double angle ); %Docstring Snaps an angle to its closest 45 degree angle + :param angle: angle in degrees :return: angle snapped to 0, 45/90/135/180/225/270 or 315 degrees -:rtype: float - %End static QRectF largestRotatedRectWithinBounds( const QRectF &originalRect, const QRectF &boundsRect, const double rotation ); %Docstring Calculates the largest scaled version of originalRect which fits within boundsRect, when it is rotated by a specified amount. + :param originalRect: QRectF to be rotated and scaled :param boundsRect: QRectF specifying the bounds which the rotated and scaled rectangle must fit within :param rotation: the rotation in degrees to be applied to the rectangle :return: largest scaled version of the rectangle possible -:rtype: QRectF - %End static double pointsToMM( const double pointSize ); %Docstring Returns the size in mm corresponding to a font point size -:param pointSize: font size in points -:rtype: float +:param pointSize: font size in points .. seealso:: :py:func:`mmToPoints` %End @@ -99,9 +96,8 @@ Returns the size in mm corresponding to a font point size static double mmToPoints( const double mmSize ); %Docstring Returns the size in mm corresponding to a font point size -:param mmSize: font size in mm -:rtype: float +:param mmSize: font size in mm .. seealso:: :py:func:`pointsToMM` %End @@ -109,6 +105,7 @@ Returns the size in mm corresponding to a font point size static void relativeResizeRect( QRectF &rectToResize, const QRectF &boundsBefore, const QRectF &boundsAfter ); %Docstring Resizes a QRectF relative to a resized bounding rectangle. + :param rectToResize: QRectF to resize, contained within boundsBefore. The rectangle is linearly scaled to retain its relative position and size within boundsAfter. @@ -119,6 +116,7 @@ boundsAfter. static double relativePosition( const double position, const double beforeMin, const double beforeMax, const double afterMin, const double afterMax ); %Docstring Returns a scaled position given a before and after range + :param position: initial position within before range to scale :param beforeMin: minimum value in before range :param beforeMax: maximum value in before range @@ -126,31 +124,27 @@ Returns a scaled position given a before and after range :param afterMax: maximum value in after range :return: position scaled to range specified by afterMin and afterMax -:rtype: float - %End static QgsComposition::PaperOrientation decodePaperOrientation( const QString &orientationString, bool &ok ); %Docstring Decodes a string representing a paper orientation + :param orientationString: string to decode :param ok: will be true if string could be decoded :return: decoded paper orientation -:rtype: QgsComposition.PaperOrientation - %End static bool decodePresetPaperSize( const QString &presetString, double &width, double &height ); %Docstring Decodes a string representing a preset page size + :param presetString: string to decode :param width: double for decoded paper width :param height: double for decoded paper height :return: true if string could be decoded successfully -:rtype: bool - %End static void readOldDataDefinedPropertyMap( const QDomElement &itemElem, @@ -169,8 +163,6 @@ Reads all pre 3.0 data defined properties from an XML element. %Docstring Reads a pre 3.0 data defined property from an XML DOM element. -:rtype: QgsProperty - .. versionadded:: 3.0 .. seealso:: :py:func:`readDataDefinedPropertyMap` @@ -180,11 +172,10 @@ Reads a pre 3.0 data defined property from an XML DOM element. %Docstring Returns a font where size is set in pixels and the size has been upscaled with FONT_WORKAROUND_SCALE to workaround QT font rendering bugs + :param font: source font with size set in points :return: font with size set in pixels -:rtype: QFont - .. versionadded:: 2.5 %End @@ -192,11 +183,10 @@ to workaround QT font rendering bugs static double fontAscentMM( const QFont &font ); %Docstring Calculate font ascent in millimeters, including workarounds for QT font rendering issues + :param font: input font :return: font ascent in millimeters -:rtype: float - .. versionadded:: 2.5 @@ -212,11 +202,10 @@ Calculate font ascent in millimeters, including workarounds for QT font renderin static double fontDescentMM( const QFont &font ); %Docstring Calculate font descent in millimeters, including workarounds for QT font rendering issues + :param font: input font :return: font descent in millimeters -:rtype: float - .. versionadded:: 2.5 @@ -233,11 +222,10 @@ Calculate font descent in millimeters, including workarounds for QT font renderi %Docstring Calculate font height in millimeters, including workarounds for QT font rendering issues The font height is the font ascent + descent + 1 (for the baseline). + :param font: input font :return: font height in millimeters -:rtype: float - .. versionadded:: 2.5 @@ -254,12 +242,11 @@ The font height is the font ascent + descent + 1 (for the baseline). %Docstring Calculate font height in millimeters of a single character, including workarounds for QT font rendering issues + :param font: input font :param character: character to calculate height for :return: character height in millimeters -:rtype: float - .. versionadded:: 2.5 @@ -276,12 +263,11 @@ rendering issues %Docstring Calculate font width in millimeters for a string, including workarounds for QT font rendering issues + :param font: input font :param text: string to calculate width of :return: string width in millimeters -:rtype: float - .. versionadded:: 2.5 @@ -301,13 +287,12 @@ rendering issues Calculate font height in millimeters for a string, including workarounds for QT font rendering issues. Note that this method uses a non-standard measure of text height, where only the font ascent is considered for the first line of text. + :param font: input font :param text: string to calculate height of :param multiLineHeight: line spacing factor :return: string height in millimeters -:rtype: float - .. versionadded:: 2.12 @@ -318,6 +303,7 @@ where only the font ascent is considered for the first line of text. %Docstring Draws text on a painter at a specific position, taking care of composer specific issues (calculation to pixel, scaling of font and painter to work around Qt font bugs) + :param painter: destination QPainter :param pos: position to draw text :param text: string to draw @@ -331,6 +317,7 @@ scaling of font and painter to work around Qt font bugs) %Docstring Draws text on a painter within a rectangle, taking care of composer specific issues (calculation to pixel, scaling of font and painter to work around Qt font bugs) + :param painter: destination QPainter :param rect: rectangle to draw into :param text: string to draw @@ -350,8 +337,6 @@ This method returns a new QgsRenderContext which matches the scale and settings target map. If the ``dpi`` argument is not specified then the dpi will be taken from the destinatation painter device. -:rtype: QgsRenderContext - .. versionadded:: 3.0 .. seealso:: :py:func:`createRenderContextForComposition()` @@ -363,8 +348,6 @@ Creates a render context suitable for the specified ``composition`` and ``painte This method returns a new QgsRenderContext which matches the scale and settings from the composition's QgsComposition.referenceMap(). -:rtype: QgsRenderContext - .. versionadded:: 3.0 .. seealso:: :py:func:`createRenderContextForMap()` diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 2f5fcddbe86c..9feb754ee0fb 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -70,8 +70,6 @@ Construct a new composition linked to the specified project. The project associated with the composition. Used to get access to layers, map themes, relations and various other bits. It is never null. -:rtype: QgsProject - .. versionadded:: 3.0 %End @@ -79,8 +77,6 @@ relations and various other bits. It is never null. %Docstring Returns the composition's name. -:rtype: str - .. seealso:: :py:func:`setName()` .. versionadded:: 3.0 @@ -99,6 +95,7 @@ Sets the composition's name. bool keepRelativeItemPosition = true ); %Docstring Changes size of paper item. + :param width: page width in mm :param height: page height in mm :param keepRelativeItemPosition: if true, all items and guides will be moved so that they retain @@ -114,8 +111,6 @@ their same relative position to the top left corner of their current page. Height of paper item :return: height in mm -:rtype: float - .. seealso:: :py:func:`paperWidth` @@ -127,8 +122,6 @@ Height of paper item Width of paper item :return: width in mm -:rtype: float - .. seealso:: :py:func:`paperHeight` @@ -143,6 +136,7 @@ Calling this method resets the number of pages to 1, with the size set to the minimum size required to fit all existing composer items. Items will also be repositioned so that the new top-left bounds of the composition is at the point (marginLeft, marginTop). An optional margin can be specified. + :param marginTop: top margin (millimeters) :param marginRight: right margin (millimeters) :param marginBottom: bottom margin (millimeters) @@ -160,6 +154,7 @@ repositioned so that the new top-left bounds of the composition is at the point %Docstring Sets the resize to contents margins. These margins are saved in the composition so that they can be restored with the composer. + :param marginTop: top margin (millimeters) :param marginRight: right margin (millimeters) :param marginBottom: bottom margin (millimeters) @@ -177,6 +172,7 @@ so that they can be restored with the composer. %Docstring Returns the resize to contents margins. These margins are saved in the composition so that they can be restored with the composer. + :param marginTop: reference for top margin (millimeters) :param marginRight: reference for right margin (millimeters) :param marginBottom: reference for bottom margin (millimeters) @@ -194,13 +190,12 @@ so that they can be restored with the composer. Returns the vertical space between pages in a composer view :return: space between pages in mm -:rtype: float - %End void setNumPages( const int pages ); %Docstring Sets the number of pages for the composition. + :param pages: number of pages .. seealso:: :py:func:`numPages` @@ -211,8 +206,6 @@ Sets the number of pages for the composition. Returns the number of pages in the composition. :return: number of pages -:rtype: int - .. seealso:: :py:func:`setNumPages` %End @@ -221,11 +214,10 @@ Returns the number of pages in the composition. %Docstring Returns whether a page is empty, ie, it contains no items except for the background paper item. + :param page: page number, starting with 1 :return: true if page is empty -:rtype: bool - .. versionadded:: 2.5 @@ -239,11 +231,10 @@ paper item. bool shouldExportPage( const int page ) const; %Docstring Returns whether a specified page number should be included in exports of the composition. + :param page: page number, starting with 1 :return: true if page should be exported -:rtype: bool - .. versionadded:: 2.5 @@ -259,16 +250,12 @@ Note: added in version 2.1 QgsFillSymbol *pageStyleSymbol(); %Docstring Note: added in version 2.1 - -:rtype: QgsFillSymbol %End QPointF positionOnPage( QPointF position ) const; %Docstring Returns the position within a page of a point in the composition -:rtype: QPointF - .. versionadded:: 2.1 %End @@ -276,8 +263,6 @@ Returns the position within a page of a point in the composition %Docstring Returns the page number corresponding to a point in the composition -:rtype: int - .. versionadded:: 2.1 %End @@ -297,47 +282,28 @@ Refreshes the composition when composer related options change void setSnapToGridEnabled( const bool b ); bool snapToGridEnabled() const; -%Docstring - -:rtype: bool -%End void setGridVisible( const bool b ); bool gridVisible() const; -%Docstring - -:rtype: bool -%End void setSnapLinesVisible( const bool visible ); %Docstring Hides / shows custom snap lines %End bool snapLinesVisible() const; -%Docstring - -:rtype: bool -%End void setAlignmentSnap( const bool s ); bool alignmentSnap() const; -%Docstring - -:rtype: bool -%End void setSmartGuidesEnabled( const bool b ); bool smartGuidesEnabled() const; -%Docstring - -:rtype: bool -%End void setPagesVisible( bool visible ); %Docstring Sets whether the page items should be visible in the composition. Removing them will prevent both display of the page boundaries in composer views and will also prevent them from being rendered in composition exports. + :param visible: set to true to show pages, false to hide pages .. versionadded:: 2.12 @@ -351,8 +317,6 @@ Returns whether the page items are be visible in the composition. This setting effects both display of the page boundaries in composer views and whether they will be rendered in composition exports. -:rtype: bool - .. versionadded:: 2.12 .. seealso:: :py:func:`setPagesVisible()` @@ -365,43 +329,24 @@ Removes all snap lines void setSnapGridResolution( const double r ); double snapGridResolution() const; -%Docstring - -:rtype: float -%End void setSnapGridOffsetX( const double offset ); double snapGridOffsetX() const; -%Docstring - -:rtype: float -%End void setSnapGridOffsetY( const double offset ); double snapGridOffsetY() const; -%Docstring - -:rtype: float -%End void setGridPen( const QPen &p ); QPen gridPen() const; -%Docstring - -:rtype: QPen -%End void setGridStyle( const GridStyle s ); GridStyle gridStyle() const; -%Docstring - -:rtype: GridStyle -%End void setSnapTolerance( const int snapTolerance ); %Docstring Sets the snap tolerance to use when automatically snapping items during movement and resizing to guides and the edges and centers of other items. + :param snapTolerance: snap tolerance in pixels .. seealso:: :py:func:`alignmentSnapTolerance` @@ -415,8 +360,6 @@ Returns the snap tolerance to use when automatically snapping items during movem and the edges and centers of other items. :return: snap tolerance in pixels -:rtype: int - .. seealso:: :py:func:`setAlignmentSnapTolerance` @@ -426,6 +369,7 @@ and the edges and centers of other items. void setBoundingBoxesVisible( const bool boundsVisible ); %Docstring Sets whether selection bounding boxes should be shown in the composition + :param boundsVisible: set to true to show selection bounding box .. seealso:: :py:func:`boundingBoxesVisible` @@ -438,8 +382,6 @@ Sets whether selection bounding boxes should be shown in the composition Returns whether selection bounding boxes should be shown in the composition :return: true if selection bounding boxes should be shown -:rtype: bool - .. seealso:: :py:func:`setBoundingBoxesVisible` @@ -449,63 +391,52 @@ Returns whether selection bounding boxes should be shown in the composition QUndoStack *undoStack(); %Docstring Returns pointer to undo/redo command storage - -:rtype: QUndoStack %End QgsComposerItem *composerItemAt( QPointF position, const bool ignoreLocked = false ) const; %Docstring Returns the topmost composer item at a specified position. Ignores paper items. + :param position: point to search for item at :param ignoreLocked: set to true to ignore locked items :return: composer item at position -:rtype: QgsComposerItem - %End QgsComposerItem *composerItemAt( QPointF position, const QgsComposerItem *belowItem, const bool ignoreLocked = false ) const; %Docstring Returns the topmost composer item at a specified position which is below a specified item. Ignores paper items. + :param position: point to search for item at :param belowItem: item to search below :param ignoreLocked: set to true to ignore locked items :return: composer item at position which is below specified item -:rtype: QgsComposerItem - %End int pageNumberAt( QPointF position ) const; %Docstring Returns the page number (0-based) given a coordinate - -:rtype: int %End int itemPageNumber( const QgsComposerItem * ) const; %Docstring Returns on which page number (0-based) is displayed an item - -:rtype: int %End QList selectedComposerItems( const bool includeLockedItems = true ); %Docstring Returns list of selected composer items + :param includeLockedItems: set to true to include locked items in list :return: list of selected items -:rtype: list of QgsComposerItem - %End QList composerMapItems() const; %Docstring Returns pointers to all composer maps in the scene -:rtype: list of const QgsComposerMap - .. note:: available in Python bindings only with PyQt >= 4.8.4 @@ -518,41 +449,29 @@ Returns pointers to all composer maps in the scene Returns the composer map with specified id :return: QgsComposerMap or 0 pointer if the composer map item does not exist -:rtype: QgsComposerMap - %End const QgsComposerItem *getComposerItemById( const QString &id ) const; %Docstring Returns a composer item given its text identifier. Ids are not necessarely unique, but this function returns only one element. + :param id: - A QString representing the identifier of the item to retrieve. :return: QgsComposerItem pointer or 0 pointer if no such item exists. -:rtype: QgsComposerItem - %End const QgsComposerItem *getComposerItemByUuid( const QString &uuid ) const; %Docstring Returns a composer item given its unique identifier. -:param uuid: A QString representing the UUID of the item to -:rtype: QgsComposerItem +:param uuid: A QString representing the UUID of the item to %End int printResolution() const; -%Docstring - -:rtype: int -%End void setPrintResolution( const int dpi ); bool printAsRaster() const; -%Docstring - -:rtype: bool -%End void setPrintAsRaster( const bool enabled ); bool generateWorldFile() const; @@ -560,8 +479,6 @@ Returns a composer item given its unique identifier. Returns true if the composition will generate corresponding world files when pages are exported. -:rtype: bool - .. seealso:: :py:func:`setGenerateWorldFile()` .. seealso:: :py:func:`referenceMap()` @@ -571,6 +488,7 @@ are exported. %Docstring Sets whether the composition will generate corresponding world files when pages are exported. + :param enabled: set to true to generate world files .. seealso:: :py:func:`generateWorldFile()` @@ -584,8 +502,6 @@ Returns the map item which will be used to generate corresponding world files wh composition is exported. If no map was explicitly set via setReferenceMap(), the largest map in the composition will be returned (or None if there are no maps in the composition). -:rtype: QgsComposerMap - .. seealso:: :py:func:`setReferenceMap()` .. seealso:: :py:func:`generateWorldFile()` @@ -595,6 +511,7 @@ map in the composition will be returned (or None if there are no maps in the com %Docstring Sets the map item which will be used to generate corresponding world files when the composition is exported. + :param map: composer map item .. seealso:: :py:func:`referenceMap()` @@ -605,8 +522,6 @@ composition is exported. bool useAdvancedEffects() const; %Docstring Returns true if a composition should use advanced effects such as blend modes - -:rtype: bool %End void setUseAdvancedEffects( const bool effectsEnabled ); %Docstring @@ -614,44 +529,36 @@ Used to enable or disable advanced effects such as blend modes in a composition %End QgsComposition::PlotStyle plotStyle() const; -%Docstring - -:rtype: QgsComposition.PlotStyle -%End void setPlotStyle( const QgsComposition::PlotStyle style ); bool writeXml( QDomElement &composerElem, QDomDocument &doc ); %Docstring Writes settings to xml (paper dimension) - -:rtype: bool %End bool readXml( const QDomElement &compositionElem, const QDomDocument &doc ); %Docstring Reads settings from xml file - -:rtype: bool %End bool loadFromTemplate( const QDomDocument &doc, QMap *substitutionMap = 0, bool addUndoCommands = false, const bool clearComposition = true ); %Docstring Load a template document + :param doc: template document :param substitutionMap: map with text to replace. Text needs to be enclosed by brackets (e.g. '[text]' ) :param addUndoCommands: whether or not to add undo commands :param clearComposition: set to true to clear the existing composition and read all composition and atlas properties from the template. Set to false to only add new items from the template, without overwriting the existing items or composition settings. - -:rtype: bool %End void addItemsFromXml( const QDomElement &elem, const QDomDocument &doc, bool addUndoCommands = false, QPointF *pos = 0, bool pasteInPlace = false ); %Docstring Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard) + :param elem: items parent element, e.g. \verbatim \endverbatim or \verbatim \endverbatim :param doc: xml document :param addUndoCommands: insert AddItem commands if true (e.g. for copy/paste) @@ -671,40 +578,16 @@ Removes item from z list. Usually called from destructor of QgsComposerItem void raiseSelectedItems(); bool raiseItem( QgsComposerItem *item ); -%Docstring - -:rtype: bool -%End void lowerSelectedItems(); bool lowerItem( QgsComposerItem *item ); -%Docstring - -:rtype: bool -%End void moveSelectedItemsToTop(); bool moveItemToTop( QgsComposerItem *item ); -%Docstring - -:rtype: bool -%End void moveSelectedItemsToBottom(); bool moveItemToBottom( QgsComposerItem *item ); -%Docstring - -:rtype: bool -%End void selectNextByZOrder( const ZValueDirection direction ); QgsComposerItem *getComposerItemBelow( QgsComposerItem *item ) const; -%Docstring - -:rtype: QgsComposerItem -%End QgsComposerItem *getComposerItemAbove( QgsComposerItem *item ) const; -%Docstring - -:rtype: QgsComposerItem -%End void alignSelectedItemsLeft(); void alignSelectedItemsHCenter(); @@ -725,11 +608,10 @@ Unlock all items QgsComposerItemGroup *groupItems( QList items ); %Docstring Creates a new group from a list of composer items and adds it to the composition. + :param items: items to include in group :return: QgsComposerItemGroup of grouped items, if grouping was possible -:rtype: QgsComposerItemGroup - .. versionadded:: 2.6 %End @@ -738,11 +620,10 @@ Creates a new group from a list of composer items and adds it to the composition %Docstring Ungroups items by removing them from an item group and removing the group from the composition. + :param group: item group to ungroup :return: list of items removed from the group, or an empty list if ungrouping -:rtype: list of QgsComposerItem - was not successful .. versionadded:: 2.6 @@ -757,23 +638,17 @@ but missing from the z order list. QPointF snapPointToGrid( QPointF scenePoint ) const; %Docstring Snaps a scene coordinate point to grid - -:rtype: QPointF %End QList< QGraphicsLineItem * > *snapLines(); %Docstring Returns pointer to snap lines collection - -:rtype: list of QGraphicsLineItem %End QGraphicsLineItem *addSnapLine(); %Docstring Add a custom snap line (can be horizontal or vertical) - -:rtype: QGraphicsLineItem %End void removeSnapLine( QGraphicsLineItem *line ); %Docstring @@ -784,6 +659,7 @@ Remove custom snap line (and delete the object) void beginCommand( QgsComposerItem *item, const QString &commandText, const QgsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown ); %Docstring Allocates new item command and saves initial state in it + :param item: target item :param commandText: descriptive command text :param c: context for merge commands (unknown for non-mergeable commands) @@ -875,10 +751,6 @@ If true, prevents any mouse cursor changes by the composition or by any composer Used by QgsComposer and QgsComposerView to prevent unwanted cursor changes %End bool preventCursorChange() const; -%Docstring - -:rtype: bool -%End void beginPrint( QPrinter &printer, const bool evaluateDDPageSize = false ); %Docstring @@ -892,6 +764,7 @@ Prepare the printer for printing in a PDF void doPrint( QPrinter &printer, QPainter &painter, bool startNewPage = false ); %Docstring Print on a preconfigured printer + :param printer: QPrinter destination :param painter: QPainter source :param startNewPage: set to true to begin the print on a new page @@ -902,8 +775,6 @@ Print on a preconfigured printer Convenience function that prepares the printer and prints :return: true if print was successful -:rtype: bool - %End bool exportAsPDF( const QString &file ); @@ -911,13 +782,12 @@ Convenience function that prepares the printer and prints Convenience function that prepares the printer for printing in PDF and prints :return: true if export was successful -:rtype: bool - %End QImage printPageAsRaster( int page, QSize imageSize = QSize(), int dpi = 0 ); %Docstring Renders a composer page to an image. + :param page: page number, 0 based such that the first page is page 0 :param imageSize: optional target image size, in pixels. It is the caller's responsibility to ensure that the ratio of the target image size matches the ratio of the composition @@ -926,8 +796,6 @@ page size. parameter has no effect if imageSize is specified. :return: rendered image, or null image if image does not fit into available memory -:rtype: QImage - .. seealso:: :py:func:`renderRectAsRaster()` @@ -938,6 +806,7 @@ parameter has no effect if imageSize is specified. %Docstring Renders a portion of the composition to an image. This method can be used to render sections of pages rather than full pages. + :param rect: region of composition to render :param imageSize: optional target image size, in pixels. It is the caller's responsibility to ensure that the ratio of the target image size matches the ratio of the specified @@ -946,8 +815,6 @@ region of the composition. parameter has no effect if imageSize is specified. :return: rendered image, or null image if image does not fit into available memory -:rtype: QImage - .. versionadded:: 2.12 @@ -959,6 +826,7 @@ parameter has no effect if imageSize is specified. void renderPage( QPainter *p, int page ); %Docstring Renders a full page to a paint device. + :param p: destination painter :param page: page number, 0 based such that the first page is page 0 @@ -971,6 +839,7 @@ Renders a full page to a paint device. %Docstring Renders a portion of the composition to a paint device. This method can be used to render sections of pages rather than full pages. + :param p: destination painter :param rect: region of composition to render @@ -985,6 +854,7 @@ to render sections of pages rather than full pages. const QRectF &exportRegion = QRectF(), double dpi = -1 ) const; %Docstring Georeferences a file (image of PDF) exported from the composition. + :param file: filename of exported file :param referenceMap: map item to use for georeferencing, or leave as None to use the currently defined referenceMap(). @@ -1004,6 +874,7 @@ will be exported. void computeWorldFileParameters( const QRectF &exportRegion, double &a, double &b, double &c, double &d, double &e, double &f ) const; %Docstring Computes the world file parameters for a specified region of the composition. + :param exportRegion: region of the composition which will be associated with world file :param a: :param b: @@ -1016,18 +887,12 @@ Computes the world file parameters for a specified region of the composition. %End QgsAtlasComposition &atlasComposition(); -%Docstring - -:rtype: QgsAtlasComposition -%End QgsComposition::AtlasMode atlasMode() const; %Docstring Returns the current atlas mode of the composition :return: current atlas mode -:rtype: QgsComposition.AtlasMode - .. seealso:: :py:func:`setAtlasMode` %End @@ -1035,11 +900,10 @@ Returns the current atlas mode of the composition bool setAtlasMode( const QgsComposition::AtlasMode mode ); %Docstring Sets the current atlas mode of the composition. + :param mode: atlas mode to switch to :return: false if the mode could not be changed. -:rtype: bool - .. seealso:: :py:func:`atlasMode` %End @@ -1048,8 +912,6 @@ Sets the current atlas mode of the composition. %Docstring Return pages in the correct order -:rtype: list of QgsPaperItem - .. note:: composerItems(QList< QgsPaperItem* > &) may not return pages in the correct order @@ -1062,8 +924,6 @@ Return pages in the correct order Returns the items model attached to the composition :return: QgsComposerModel for composition -:rtype: QgsComposerModel - .. versionadded:: 2.5 %End @@ -1071,6 +931,7 @@ Returns the items model attached to the composition void setCustomProperty( const QString &key, const QVariant &value ); %Docstring Set a custom property for the composition. + :param key: property key. If a property with the same key already exists it will be overwritten. :param value: property value @@ -1086,12 +947,11 @@ Set a custom property for the composition. QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const; %Docstring Read a custom property from the composition. + :param key: property key :param defaultValue: default value to return if property with matching key does not exist :return: value of matching property -:rtype: QVariant - .. seealso:: :py:func:`setCustomProperty()` @@ -1105,6 +965,7 @@ Read a custom property from the composition. void removeCustomProperty( const QString &key ); %Docstring Remove a custom property from the composition. + :param key: property key .. seealso:: :py:func:`setCustomProperty()` @@ -1120,8 +981,6 @@ Remove a custom property from the composition. %Docstring Return list of keys stored in custom properties for composition. -:rtype: list of str - .. seealso:: :py:func:`setCustomProperty()` .. seealso:: :py:func:`customProperty()` @@ -1134,21 +993,19 @@ Return list of keys stored in custom properties for composition. QRectF pageItemBounds( int pageNumber, bool visibleOnly = false ) const; %Docstring Returns the bounding box of the items contained on a specified page. + :param pageNumber: page number, where 0 is the first page :param visibleOnly: set to true to only include visible items -:rtype: QRectF - .. versionadded:: 2.12 %End QRectF compositionBounds( bool ignorePages = false, double margin = 0.0 ) const; %Docstring Calculates the bounds of all non-gui items in the composition. Ignores snap lines and mouse handles. + :param ignorePages: set to true to ignore page items :param margin: optional marginal (in percent, e.g., 0.05 = 5% ) to add around items - -:rtype: QRectF %End virtual QgsExpressionContext createExpressionContext() const; @@ -1157,8 +1014,6 @@ Calculates the bounds of all non-gui items in the composition. Ignores snap line Creates an expression context relating to the compositions's current state. The context includes scopes for global, project, composition and atlas properties. -:rtype: QgsExpressionContext - .. versionadded:: 2.12 %End @@ -1166,8 +1021,6 @@ scopes for global, project, composition and atlas properties. %Docstring Returns a reference to the composition's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. versionadded:: 3.0 .. seealso:: :py:func:`setDataDefinedProperties()` @@ -1200,6 +1053,7 @@ attributes within the composition. void setSelectedItem( QgsComposerItem *item ); %Docstring Clears any selected items and sets an item as the current selection. + :param item: item to set as selected .. versionadded:: 2.3 @@ -1218,6 +1072,7 @@ the composition's model to update. %Docstring Refreshes a data defined property for the composition by reevaluating the property's value and redrawing the composition with this new value. + :param property: data defined property to refresh. If property is set to QgsComposerItem.AllProperties then all data defined properties for the composition will be refreshed. @@ -1229,6 +1084,7 @@ refreshed. void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the composition's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. versionadded:: 3.0 diff --git a/python/core/composer/qgslayoutmanager.sip b/python/core/composer/qgslayoutmanager.sip index a2e436650cc2..a1dbe5aa6c8f 100644 --- a/python/core/composer/qgslayoutmanager.sip +++ b/python/core/composer/qgslayoutmanager.sip @@ -45,8 +45,6 @@ Adds a composition to the manager. Ownership of the composition is transferred t Returns true if the addition was successful, or false if the composition could not be added (eg as a result of a duplicate composition name). -:rtype: bool - .. seealso:: :py:func:`removeComposition()` .. seealso:: :py:func:`compositionAdded()` @@ -58,8 +56,6 @@ Adds a ``layout`` to the manager. Ownership of the layout is transferred to the Returns true if the addition was successful, or false if the layout could not be added (eg as a result of a duplicate layout name). -:rtype: bool - .. seealso:: :py:func:`removeLayout()` .. seealso:: :py:func:`layoutAdded()` @@ -71,8 +67,6 @@ Removes a composition from the manager. The composition is deleted. Returns true if the removal was successful, or false if the removal failed (eg as a result of removing a composition which is not contained in the manager). -:rtype: bool - .. seealso:: :py:func:`addComposition()` .. seealso:: :py:func:`compositionRemoved()` @@ -88,8 +82,6 @@ Removes a ``layout`` from the manager. The layout is deleted. Returns true if the removal was successful, or false if the removal failed (eg as a result of removing a layout which is not contained in the manager). -:rtype: bool - .. seealso:: :py:func:`addLayout()` .. seealso:: :py:func:`layoutRemoved()` @@ -109,31 +101,23 @@ Removes and deletes all layouts from the manager. QList< QgsComposition * > compositions() const; %Docstring Returns a list of all compositions contained in the manager. - -:rtype: list of QgsComposition %End QList< QgsLayout * > layouts() const; %Docstring Returns a list of all layouts contained in the manager. - -:rtype: list of QgsLayout %End QgsComposition *compositionByName( const QString &name ) const; %Docstring Returns the composition with a matching name, or None if no matching compositions were found. - -:rtype: QgsComposition %End QgsLayout *layoutByName( const QString &name ) const; %Docstring Returns the layout with a matching name, or None if no matching layouts were found. - -:rtype: QgsLayout %End bool readXml( const QDomElement &element, const QDomDocument &doc ); @@ -141,8 +125,6 @@ were found. Reads the manager's state from a DOM element, restoring all layouts present in the XML document. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -150,8 +132,6 @@ present in the XML document. %Docstring Returns a DOM element representing the state of the manager. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End @@ -159,8 +139,6 @@ Returns a DOM element representing the state of the manager. %Docstring Saves the composition with matching ``name`` in template format. Returns true if save was successful. - -:rtype: bool %End QgsComposition *duplicateComposition( const QString &name, const QString &newName ); @@ -168,8 +146,6 @@ Returns true if save was successful. Duplicates an existing composition from the manager. The new composition will automatically be stored in the manager. Returns new composition if duplication was successful. - -:rtype: QgsComposition %End QgsLayout *duplicateLayout( const QgsLayout *layout, const QString &newName ); @@ -177,24 +153,18 @@ Returns new composition if duplication was successful. Duplicates an existing ``layout`` from the manager. The new layout will automatically be stored in the manager. Returns new the layout if duplication was successful. - -:rtype: QgsLayout %End QString generateUniqueComposerTitle() const; %Docstring Generates a unique title for a new composition, which does not clash with any already contained by the manager. - -:rtype: str %End QString generateUniqueTitle() const; %Docstring Generates a unique title for a new layout, which does not clash with any already contained by the manager. - -:rtype: str %End signals: diff --git a/python/core/composer/qgspaperitem.sip b/python/core/composer/qgspaperitem.sip index 16c114f5d251..8ff98c0fb737 100644 --- a/python/core/composer/qgspaperitem.sip +++ b/python/core/composer/qgspaperitem.sip @@ -47,8 +47,6 @@ Item representing the paper.* virtual int type() const; %Docstring Return correct graphics item type. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -61,20 +59,18 @@ Return correct graphics item type. %Docstring Stores state in Dom element + :param elem: is Dom element corresponding to 'Composer' tag :param doc: Dom document - -:rtype: bool %End virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc ); %Docstring Sets state from Dom document + :param itemElem: is Dom node corresponding to item tag :param doc: is the Dom document - -:rtype: bool %End virtual void setSceneRect( const QRectF &rectangle ); diff --git a/python/core/diagram/qgsdiagram.sip b/python/core/diagram/qgsdiagram.sip index 20b571b6cca6..93bc32f8ba99 100644 --- a/python/core/diagram/qgsdiagram.sip +++ b/python/core/diagram/qgsdiagram.sip @@ -26,8 +26,6 @@ Base class for all diagram types* %Docstring Returns an instance that is equivalent to this one -:rtype: QgsDiagram - .. versionadded:: 2.4 %End @@ -36,11 +34,10 @@ Returns an instance that is equivalent to this one QgsExpression *getExpression( const QString &expression, const QgsExpressionContext &context ); %Docstring Returns a prepared expression for the specified context. + :param expression: expression string :param context: expression context -:rtype: QgsExpression - .. versionadded:: 2.12 %End @@ -52,31 +49,24 @@ Draws the diagram at the given position (in pixel coordinates) virtual QString diagramName() const = 0; %Docstring Get a descriptive name for this diagram type. - -:rtype: str %End virtual QSizeF diagramSize( const QgsAttributes &attributes, const QgsRenderContext &c, const QgsDiagramSettings &s ) = 0; %Docstring Returns the size in map units the diagram will use to render. - -:rtype: QSizeF %End virtual QSizeF diagramSize( const QgsFeature &feature, const QgsRenderContext &c, const QgsDiagramSettings &s, const QgsDiagramInterpolationSettings &is ) = 0; %Docstring Returns the size in map units the diagram will use to render. Interpolate size - -:rtype: QSizeF %End virtual double legendSize( double value, const QgsDiagramSettings &s, const QgsDiagramInterpolationSettings &is ) const = 0; %Docstring Returns the size of the legend item for the diagram corresponding to a specified value. + :param value: value to return legend item size for :param s: diagram settings :param is: interpolation settings -:rtype: float - .. versionadded:: 2.16 %End @@ -91,6 +81,7 @@ Constructor for QgsDiagram. void setPenWidth( QPen &pen, const QgsDiagramSettings &s, const QgsRenderContext &c ); %Docstring Changes the pen width to match the current settings and rendering context + :param pen: The pen to modify :param s: The settings that specify the pen width :param c: The rendering specifying the proper scale units for pixel conversion @@ -99,47 +90,43 @@ Changes the pen width to match the current settings and rendering context QSizeF sizePainterUnits( QSizeF size, const QgsDiagramSettings &s, const QgsRenderContext &c ); %Docstring Calculates a size to match the current settings and rendering context + :param size: The size to convert :param s: The settings that specify the size type :param c: The rendering specifying the proper scale units for pixel conversion :return: The converted size for rendering -:rtype: QSizeF - %End double sizePainterUnits( double l, const QgsDiagramSettings &s, const QgsRenderContext &c ); %Docstring Calculates a length to match the current settings and rendering context + :param l: The length to convert :param s: Unused :param c: The rendering specifying the proper scale units for pixel conversion :return: The converted length for rendering -:rtype: float - %End QFont scaledFont( const QgsDiagramSettings &s, const QgsRenderContext &c ); %Docstring Calculates a size to match the current settings and rendering context + :param s: The settings that contain the font size and size type :param c: The rendering specifying the proper scale units for pixel conversion :return: The properly scaled font for rendering -:rtype: QFont - %End QSizeF sizeForValue( double value, const QgsDiagramSettings &s, const QgsDiagramInterpolationSettings &is ) const; %Docstring Returns the scaled size of a diagram for a value, respecting the specified diagram interpolation settings. + :param value: value to calculate corresponding circular size for :param s: diagram settings :param is: interpolation settings -:rtype: QSizeF - .. versionadded:: 2.16 %End diff --git a/python/core/dxf/qgsdxfexport.sip b/python/core/dxf/qgsdxfexport.sip index 0c6dc87a5517..11d885e78144 100644 --- a/python/core/dxf/qgsdxfexport.sip +++ b/python/core/dxf/qgsdxfexport.sip @@ -42,6 +42,7 @@ Constructor for QgsDxfExport. void setMapSettings( const QgsMapSettings &settings ); %Docstring Set map settings and assign layer name attributes + :param settings: map settings to apply %End @@ -58,8 +59,6 @@ Sets the export flags. %Docstring Returns the export flags. -:rtype: QgsDxfExport.Flags - .. versionadded:: 3.0 .. seealso:: :py:func:`setFlags()` @@ -68,6 +67,7 @@ Returns the export flags. void addLayers( const QList< QPair > &layers ); %Docstring Add layers to export + :param layers: list of layers and corresponding attribute indexes that determine the layer name (-1 for original layer name or title) .. seealso:: :py:func:`setLayerTitleAsName` @@ -90,8 +90,6 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma Returns the reference scale for output. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`setSymbologyScale()` @@ -102,8 +100,6 @@ The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. Retrieve map units :return: unit -:rtype: QgsUnitTypes.DistanceUnit - %End void setDestinationCrs( const QgsCoordinateReferenceSystem &crs ); @@ -119,8 +115,6 @@ Set destination CRS %Docstring Returns the destination CRS, or an invalid CRS if no reprojection will be done. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setDestinationCrs()` .. versionadded:: 3.0 @@ -129,6 +123,7 @@ Returns the destination CRS, or an invalid CRS if no reprojection will be done. void setSymbologyExport( QgsDxfExport::SymbologyExport e ); %Docstring Set symbology export mode + :param e: the mode %End @@ -137,8 +132,6 @@ Set symbology export mode Get symbology export mode :return: mode -:rtype: QgsDxfExport.SymbologyExport - .. seealso:: :py:func:`setSymbologyExport` %End @@ -146,6 +139,7 @@ Get symbology export mode void setExtent( const QgsRectangle &r ); %Docstring Set extent of area to export + :param r: area to export %End @@ -154,8 +148,6 @@ Set extent of area to export Get extent of area to export :return: area to export -:rtype: QgsRectangle - .. seealso:: :py:func:`setExtent` %End @@ -164,6 +156,7 @@ Get extent of area to export %Docstring Enable use of title (where set) instead of layer name, when attribute index of corresponding layer index is -1 + :param layerTitleAsName: flag .. seealso:: :py:func:`addLayers` @@ -174,8 +167,6 @@ when attribute index of corresponding layer index is -1 Retrieve whether layer title (where set) instead of name shall be use :return: flag -:rtype: bool - .. seealso:: :py:func:`setLayerTitleAsName` %End @@ -183,6 +174,7 @@ Retrieve whether layer title (where set) instead of name shall be use void setForce2d( bool force2d ); %Docstring Force 2d output (eg. to support linewidth in polylines) + :param force2d: flag .. seealso:: :py:func:`force2d` @@ -193,8 +185,6 @@ Force 2d output (eg. to support linewidth in polylines) Retrieve whether the output should be forced to 2d :return: flag -:rtype: bool - .. seealso:: :py:func:`setForce2d` %End @@ -202,30 +192,27 @@ Retrieve whether the output should be forced to 2d static int closestColorMatch( QRgb color ); %Docstring Get DXF palette index of nearest entry for given color -:param color: -:rtype: int +:param color: %End QString layerName( const QString &id, const QgsFeature &f ) const; %Docstring Get layer name for feature + :param id: layer id of layer :param f: feature of layer :return: layer name for feature -:rtype: str - %End QString layerName( QgsVectorLayer *vl ) const; %Docstring Get name for layer respecting the use layer title as layer name mode + :param vl: the vector layer :return: name of layer -:rtype: str - .. seealso:: :py:func:`setLayerTitleAsName` %End @@ -233,6 +220,7 @@ Get name for layer respecting the use layer title as layer name mode void writeGroup( int code, int i ) /PyName=writeGroupInt/; %Docstring Write a tuple of group code and integer value + :param code: group code :param i: integer value @@ -244,6 +232,7 @@ Write a tuple of group code and integer value void writeGroup( int code, double d ) /PyName=writeGroupDouble/; %Docstring Write a group code with a floating point value + :param code: group code :param d: floating point value @@ -255,6 +244,7 @@ Write a group code with a floating point value void writeGroup( int code, const QString &s ); %Docstring Write a group code with a string value + :param code: group code :param s: string value %End @@ -262,6 +252,7 @@ Write a group code with a string value void writeGroup( int code, const QgsPoint &p ) /PyName=writeGroupPointV2/; %Docstring Write a group code with a point + :param code: group code :param p: point value @@ -275,6 +266,7 @@ Write a group code with a point void writeGroup( const QColor &color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 ); %Docstring Write a group code with color value + :param color: color :param exactMatch: group code to use if the color has an exact match in the dxf palette :param rgbCode: group code to use if the color doesn't have an exact match or has a transparency component @@ -288,36 +280,39 @@ Write a group code with color value void writeGroupCode( int code ); %Docstring Write a group code + :param code: group code value %End void writeInt( int i ); %Docstring Write an integer value + :param i: integer value %End void writeDouble( double d ); %Docstring Write a floating point value + :param d: floating point value %End void writeString( const QString &s ); %Docstring Write a string value + :param s: string value %End int writeHandle( int code = 5, int handle = 0 ); %Docstring Write a tuple of group code and a handle + :param code: group code to use :param handle: handle to use (0 generates a new handle) :return: the used handle -:rtype: int - %End @@ -388,35 +383,28 @@ Write mtext (MTEXT) %Docstring Calculates a scaling factor to convert from map units to a specified symbol unit. The ``scale`` parameter indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. - -:rtype: float %End static QString dxfLayerName( const QString &name ); %Docstring Return cleaned layer name for use in DXF - -:rtype: str %End static QString dxfEncoding( const QString &name ); %Docstring return DXF encoding for Qt encoding - -:rtype: str %End static QStringList encodings(); %Docstring return list of available DXF encodings - -:rtype: list of str %End void registerDxfLayer( const QString &layerId, QgsFeatureId fid, const QString &layer ); %Docstring Register name of layer for feature + :param layerId: id of layer :param fid: id of feature :param layer: dxf layer of feature diff --git a/python/core/effects/qgsblureffect.sip b/python/core/effects/qgsblureffect.sip index 293fb1bd1cf7..b44263bc20b4 100644 --- a/python/core/effects/qgsblureffect.sip +++ b/python/core/effects/qgsblureffect.sip @@ -32,11 +32,10 @@ methods. static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsBlurEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsBlurEffect -:rtype: QgsPaintEffect - %End QgsBlurEffect(); @@ -55,6 +54,7 @@ Constructor for QgsBlurEffect. void setBlurLevel( const int level ); %Docstring Sets blur level (strength) + :param level: blur level. Depending on the current blurMethod(), this parameter has different effects @@ -68,8 +68,6 @@ has different effects Returns the blur level (strength) :return: blur level. Depending on the current blurMethod(), this parameter -:rtype: int - has different effects .. seealso:: :py:func:`setBlurLevel` @@ -80,6 +78,7 @@ has different effects void setBlurMethod( const BlurMethod method ); %Docstring Sets the blur method (algorithm) to use for performing the blur. + :param method: blur method .. seealso:: :py:func:`blurMethod` @@ -90,8 +89,6 @@ Sets the blur method (algorithm) to use for performing the blur. Returns the blur method (algorithm) used for performing the blur. :return: blur method -:rtype: BlurMethod - .. seealso:: :py:func:`setBlurMethod` %End @@ -99,6 +96,7 @@ Returns the blur method (algorithm) used for performing the blur. void setOpacity( const double opacity ); %Docstring Sets the ``opacity`` for the effect. + :param opacity: double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque @@ -110,8 +108,6 @@ and 1 is fully opaque Returns the opacity for the effect. :return: opacity value between 0 and 1 inclusive, where 0 is fully transparent -:rtype: float - and 1 is fully opaque .. seealso:: :py:func:`setOpacity()` @@ -120,6 +116,7 @@ and 1 is fully opaque void setBlendMode( const QPainter::CompositionMode mode ); %Docstring Sets the blend mode for the effect + :param mode: blend mode used for drawing the effect on to a destination paint device @@ -131,8 +128,6 @@ paint device Returns the blend mode for the effect :return: blend mode used for drawing the effect on to a destination -:rtype: QPainter.CompositionMode - paint device .. seealso:: :py:func:`setBlendMode` diff --git a/python/core/effects/qgscoloreffect.sip b/python/core/effects/qgscoloreffect.sip index ae797e8f2eb9..259752cd89da 100644 --- a/python/core/effects/qgscoloreffect.sip +++ b/python/core/effects/qgscoloreffect.sip @@ -26,11 +26,10 @@ source picture. static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsColorEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsColorEffect -:rtype: QgsPaintEffect - %End QgsColorEffect(); @@ -46,6 +45,7 @@ Creates a new QgsColorEffect effect from a properties string map. void setBrightness( int brightness ); %Docstring Sets the brightness modification for the effect. + :param brightness: Valid values are between -255 and 255, where 0 represents no change, negative values indicate darkening and positive values indicate lightening @@ -58,8 +58,6 @@ lightening Returns the brightness modification for the effect. :return: brightness value. Values are between -255 and 255, where 0 represents -:rtype: int - no change, negative values indicate darkening and positive values indicate lightening @@ -69,6 +67,7 @@ lightening void setContrast( int contrast ); %Docstring Sets the contrast modification for the effect. + :param contrast: Valid values are between -100 and 100, where 0 represents no change, negative values indicate less contrast and positive values indicate greater contrast @@ -81,8 +80,6 @@ greater contrast Returns the contrast modification for the effect. :return: contrast value. Values are between -100 and 100, where 0 represents -:rtype: int - no change, negative values indicate less contrast and positive values indicate greater contrast @@ -92,6 +89,7 @@ greater contrast void setSaturation( double saturation ); %Docstring Sets the saturation modification for the effect. + :param saturation: Valid values are between 0 and 2.0, where 1.0 represents no change, 0.0 represents totally desaturated (grayscale), and positive values indicate greater saturation @@ -104,8 +102,6 @@ greater saturation Returns the saturation modification for the effect. :return: saturation value. Values are between 0 and 2.0, where 1.0 represents -:rtype: float - no change, 0.0 represents totally desaturated (grayscale), and positive values indicate greater saturation @@ -115,6 +111,7 @@ greater saturation void setGrayscaleMode( QgsImageOperation::GrayscaleMode grayscaleMode ); %Docstring Sets whether the effect should convert a picture to grayscale. + :param grayscaleMode: method for grayscale conversion .. seealso:: :py:func:`grayscaleMode` @@ -125,8 +122,6 @@ Sets whether the effect should convert a picture to grayscale. Returns whether the effect will convert a picture to grayscale. :return: method for grayscale conversion -:rtype: QgsImageOperation.GrayscaleMode - .. seealso:: :py:func:`setGrayscaleMode` %End @@ -134,6 +129,7 @@ Returns whether the effect will convert a picture to grayscale. void setColorizeOn( bool colorizeOn ); %Docstring Sets whether the effect should colorize a picture. + :param colorizeOn: set to true to enable colorization .. seealso:: :py:func:`colorizeOn` @@ -148,8 +144,6 @@ Sets whether the effect should colorize a picture. Returns whether the effect will colorize a picture. :return: true if colorization is enableds -:rtype: bool - .. seealso:: :py:func:`setColorizeOn` @@ -162,6 +156,7 @@ Returns whether the effect will colorize a picture. %Docstring Sets the color used for colorizing a picture. This is only used if setColorizeOn() is set to true. + :param colorizeColor: colorization color .. seealso:: :py:func:`colorizeColor` @@ -177,8 +172,6 @@ Returns the color used for colorizing a picture. This is only used if colorizeOn() is set to true. :return: colorization color -:rtype: QColor - .. seealso:: :py:func:`setColorizeColor` @@ -191,6 +184,7 @@ colorizeOn() is set to true. %Docstring Sets the strength for colorizing a picture. This is only used if setColorizeOn() is set to true. + :param colorizeStrength: colorization strength, between 0 and 100 .. seealso:: :py:func:`colorizeStrength` @@ -206,8 +200,6 @@ Returns the strength used for colorizing a picture. This is only used if setColorizeOn() is set to true. :return: colorization strength, between 0 and 100 -:rtype: int - .. seealso:: :py:func:`setColorizeStrengths` @@ -219,6 +211,7 @@ setColorizeOn() is set to true. void setOpacity( const double opacity ); %Docstring Sets the ``opacity`` for the effect. + :param opacity: double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque @@ -230,8 +223,6 @@ and 1 is fully opaque Returns the opacity for the effect. :return: opacity value between 0 and 1 inclusive, where 0 is fully transparent -:rtype: float - and 1 is fully opaque. .. seealso:: :py:func:`setOpacity()` @@ -240,6 +231,7 @@ and 1 is fully opaque. void setBlendMode( const QPainter::CompositionMode mode ); %Docstring Sets the blend mode for the effect + :param mode: blend mode used for drawing the effect on to a destination paint device @@ -251,8 +243,6 @@ paint device Returns the blend mode for the effect :return: blend mode used for drawing the effect on to a destination -:rtype: QPainter.CompositionMode - paint device .. seealso:: :py:func:`setBlendMode` diff --git a/python/core/effects/qgseffectstack.sip b/python/core/effects/qgseffectstack.sip index 900c470b0196..0ba519207d19 100644 --- a/python/core/effects/qgseffectstack.sip +++ b/python/core/effects/qgseffectstack.sip @@ -38,11 +38,10 @@ effect will be drawn using the original picture, not the blurred version. %Docstring Creates a new QgsEffectStack effect. This method ignores the map parameter, and always returns an empty effect stack. + :param map: unused encoded properties string map :return: new QgsEffectStack -:rtype: QgsPaintEffect - %End QgsEffectStack(); @@ -55,6 +54,7 @@ Constructor for empty QgsEffectStack. explicit QgsEffectStack( const QgsPaintEffect &effect ); %Docstring Creates a new QgsEffectStack effect from a single initial effect. + :param effect: initial effect to add to the stack. The effect will be cloned, so ownership is not transferred to the stack. @@ -75,8 +75,6 @@ be cloned, so ownership is not transferred to the stack. %Docstring Unused for QgsEffectStack, will always return an empty string map - -:rtype: QgsStringMap %End virtual void readProperties( const QgsStringMap &props ); @@ -88,6 +86,7 @@ Unused for QgsEffectStack, props parameter will be ignored void appendEffect( QgsPaintEffect *effect /Transfer/ ); %Docstring Appends an effect to the end of the stack. + :param effect: QgsPaintEffect to append. Ownership of the effect will be transferred to the stack object. @@ -97,31 +96,28 @@ transferred to the stack object. bool insertEffect( const int index, QgsPaintEffect *effect /Transfer/ ); %Docstring Inserts an effect at a specified index within the stack. + :param index: position to insert the effect :param effect: QgsPaintEffect to insert. Ownership of the effect will be transferred to the stack object. -:rtype: bool - .. seealso:: :py:func:`appendEffect` %End bool changeEffect( const int index, QgsPaintEffect *effect /Transfer/ ); %Docstring Replaces the effect at a specified position within the stack. + :param index: position of effect to replace :param effect: QgsPaintEffect to replace with. Ownership of the effect will be transferred to the stack object. - -:rtype: bool %End QgsPaintEffect *takeEffect( const int index /TransferBack/ ); %Docstring Removes an effect from the stack and returns a pointer to it. -:param index: position of effect to take -:rtype: QgsPaintEffect +:param index: position of effect to take %End QList< QgsPaintEffect * > *effectList(); @@ -130,8 +126,6 @@ Returns a pointer to the list of effects currently contained by the stack :return: list of QgsPaintEffects within the stack -:rtype: list of QgsPaintEffect - %End int count() const; @@ -139,18 +133,15 @@ the stack Returns count of effects contained by the stack :return: count of effects -:rtype: int - %End QgsPaintEffect *effect( int index ) const; %Docstring Returns a pointer to the effect at a specified index within the stack + :param index: position of effect to return :return: QgsPaintEffect at specified position -:rtype: QgsPaintEffect - %End diff --git a/python/core/effects/qgsgloweffect.sip b/python/core/effects/qgsgloweffect.sip index 1184c646ab59..bc9143d5373c 100644 --- a/python/core/effects/qgsgloweffect.sip +++ b/python/core/effects/qgsgloweffect.sip @@ -43,6 +43,7 @@ picture. void setSpread( const double spread ); %Docstring Sets the spread distance for drawing the glow effect. + :param spread: spread distance. Units are specified via setSpreadUnit() .. seealso:: :py:func:`spread` @@ -57,8 +58,6 @@ Sets the spread distance for drawing the glow effect. Returns the spread distance used for drawing the glow effect. :return: spread distance. Units are retrieved via spreadUnit() -:rtype: float - .. seealso:: :py:func:`setSpread` @@ -70,6 +69,7 @@ Returns the spread distance used for drawing the glow effect. void setSpreadUnit( const QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units used for the glow spread distance. + :param unit: units for spread distance .. seealso:: :py:func:`spreadUnit` @@ -84,8 +84,6 @@ Sets the units used for the glow spread distance. Returns the units used for the glow spread distance. :return: units for spread distance -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setSpreadUnit` @@ -97,6 +95,7 @@ Returns the units used for the glow spread distance. void setSpreadMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale used for the spread distance. + :param scale: map unit scale for spread distance .. seealso:: :py:func:`spreadMapUnitScale` @@ -111,8 +110,6 @@ Sets the map unit scale used for the spread distance. Returns the map unit scale used for the spread distance. :return: map unit scale for spread distance -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setSpreadMapUnitScale` @@ -125,6 +122,7 @@ Returns the map unit scale used for the spread distance. %Docstring Sets blur level (strength) for the glow. This can be used to smooth the output from the glow effect. + :param level: blur level. Values between 0 and 16 are valid, with larger values indicating greater blur strength. @@ -136,8 +134,6 @@ values indicating greater blur strength. Returns the blur level (strength) for the glow. :return: blur level. Value will be between 0 and 16, with larger -:rtype: int - values indicating greater blur strength. .. seealso:: :py:func:`setBlurLevel` @@ -146,6 +142,7 @@ values indicating greater blur strength. void setOpacity( const double opacity ); %Docstring Sets the ``opacity`` for the effect. + :param opacity: double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque @@ -157,8 +154,6 @@ and 1 is fully opaque Returns the opacity for the effect. :return: opacity value between 0 and 1 inclusive, where 0 is fully transparent -:rtype: float - and 1 is fully opaque .. seealso:: :py:func:`setOpacity()` @@ -169,6 +164,7 @@ and 1 is fully opaque Sets the color for the glow. This only applies if the colorType() is set to SingleColor. The glow will fade between the specified color and a totally transparent version of the color. + :param color: glow color .. seealso:: :py:func:`color` @@ -183,8 +179,6 @@ is set to SingleColor. The glow will fade between the specified color and a totally transparent version of the color. :return: glow color -:rtype: QColor - .. seealso:: :py:func:`setColor` @@ -195,6 +189,7 @@ a totally transparent version of the color. %Docstring Sets the color ramp for the glow. This only applies if the colorType() is set to ColorRamp. The glow will utilize colors from the ramp. + :param ramp: color ramp for glow. Ownership of the ramp is transferred to the effect. .. seealso:: :py:func:`ramp` @@ -208,8 +203,6 @@ 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. :return: color ramp for glow -:rtype: QgsColorRamp - .. seealso:: :py:func:`setRamp` @@ -219,6 +212,7 @@ is set to ColorRamp. The glow will utilize colors from the ramp. void setBlendMode( const QPainter::CompositionMode mode ); %Docstring Sets the blend mode for the effect + :param mode: blend mode used for drawing the effect on to a destination paint device @@ -230,8 +224,6 @@ paint device Returns the blend mode for the effect :return: blend mode used for drawing the effect on to a destination -:rtype: QPainter.CompositionMode - paint device .. seealso:: :py:func:`setBlendMode` @@ -242,6 +234,7 @@ paint device Sets the color mode to use for the glow. The glow can either be drawn using a QgsColorRamp color ramp or by simply specificing a single color. setColorType is used to specify which mode to use for the glow. + :param colorType: color type to use for glow .. seealso:: :py:func:`colorType` @@ -257,8 +250,6 @@ Returns the color mode used for the glow. The glow can either be drawn using a Q color ramp or by specificing a single color. :return: current color mode used for the glow -:rtype: GlowColorType - .. seealso:: :py:func:`setColorType` @@ -281,8 +272,6 @@ Specifies whether the glow is drawn outside the picture or within the picture. :return: true if glow is to be drawn outside the picture, or false -:rtype: bool - to draw glow within the picture %End @@ -307,11 +296,10 @@ class QgsOuterGlowEffect : QgsGlowEffect static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsOuterGlowEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsOuterGlowEffect -:rtype: QgsPaintEffect - %End QgsOuterGlowEffect(); @@ -344,11 +332,10 @@ class QgsInnerGlowEffect : QgsGlowEffect static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsInnerGlowEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsInnerGlowEffect -:rtype: QgsPaintEffect - %End QgsInnerGlowEffect(); diff --git a/python/core/effects/qgsimageoperation.sip b/python/core/effects/qgsimageoperation.sip index 8e7f7afa3bcd..88a21370302e 100644 --- a/python/core/effects/qgsimageoperation.sip +++ b/python/core/effects/qgsimageoperation.sip @@ -49,6 +49,7 @@ on which is faster for the particular operation. static void convertToGrayscale( QImage &image, const GrayscaleMode mode = GrayscaleLuminosity ); %Docstring Convert a QImage to a grayscale image. Alpha channel is preserved. + :param image: QImage to convert :param mode: mode to use during grayscale conversion %End @@ -56,6 +57,7 @@ Convert a QImage to a grayscale image. Alpha channel is preserved. static void adjustBrightnessContrast( QImage &image, const int brightness, const double contrast ); %Docstring Alter the brightness or contrast of a QImage. + :param image: QImage to alter :param brightness: brightness value, in the range -255 to 255. A brightness value of 0 indicates no change to brightness, a negative value will darken the image, and a positive value will brighten @@ -69,6 +71,7 @@ contrast of the image. const double colorizeStrength = 1.0 ); %Docstring Alter the hue or saturation of a QImage. + :param image: QImage to alter :param saturation: double between 0 and 2 inclusive, where 0 = desaturate and 1.0 = no change :param colorizeColor: color to use for colorizing image. Set to an invalid QColor to disable @@ -79,6 +82,7 @@ colorization. static void multiplyOpacity( QImage &image, const double factor ); %Docstring Multiplies opacity of image pixel values by a factor. + :param image: QImage to alter :param factor: factor to multiple pixel's opacity by %End @@ -87,6 +91,7 @@ Multiplies opacity of image pixel values by a factor. %Docstring Overlays a color onto an image. This operation retains the alpha channel of the original image, but replaces all image pixel colors with the specified color. + :param image: QImage to alter :param color: color to overlay (any alpha component of the color is ignored) %End @@ -123,6 +128,7 @@ Color ramp to use for shading the distance transform %Docstring Performs a distance transform on the source image and shades the result using a color ramp. + :param image: QImage to alter :param properties: DistanceTransformProperties object with parameters for the distance transform operation @@ -132,6 +138,7 @@ for the distance transform operation %Docstring Performs a stack blur on an image. Stack blur represents a good balance between speed and blur quality. + :param image: QImage to blur :param radius: blur radius in pixels, maximum value of 16 :param alphaOnly: set to true to blur only the alpha component of the image @@ -146,12 +153,11 @@ alphaOnly is set to false, or ARGB32 if alphaOnly is true %Docstring Performs a gaussian blur on an image. Gaussian blur is slower but results in a high quality blur. + :param image: QImage to blur :param radius: blur radius in pixels :return: blurred image -:rtype: QImage - .. note:: @@ -161,6 +167,7 @@ quality blur. static void flipImage( QImage &image, FlipType type ); %Docstring Flips an image horizontally or vertically + :param image: QImage to flip :param type: type of flip to perform (horizontal or vertical) %End @@ -168,14 +175,13 @@ Flips an image horizontally or vertically static QRect nonTransparentImageRect( const QImage &image, QSize minSize = QSize(), bool center = false ); %Docstring Calculates the non-transparent region of an image. + :param image: source image :param minSize: minimum size for returned region, if desired. If the non-transparent region of the image is smaller than this minimum size, it will be centered in the returned rectangle. :param center: return rectangle will be centered on the center of the original image if set to true -:rtype: QRect - .. versionadded:: 2.9 .. seealso:: :py:func:`cropTransparent` @@ -184,14 +190,13 @@ it will be centered in the returned rectangle. static QImage cropTransparent( const QImage &image, QSize minSize = QSize(), bool center = false ); %Docstring Crop any transparent border from around an image. + :param image: source image :param minSize: minimum size for cropped image, if desired. If the cropped image is smaller than the minimum size, it will be centered in the returned image. :param center: cropped image will be centered on the center of the original image if set to true -:rtype: QImage - .. versionadded:: 2.9 %End diff --git a/python/core/effects/qgspainteffect.sip b/python/core/effects/qgspainteffect.sip index 9825ba73e5d8..a33ff48a4bfb 100644 --- a/python/core/effects/qgspainteffect.sip +++ b/python/core/effects/qgspainteffect.sip @@ -98,8 +98,6 @@ Constructor for QgsPaintEffect. Returns the effect type. :return: unique string representation of the effect type -:rtype: str - %End virtual QgsPaintEffect *clone() const = 0 /Factory/; @@ -107,8 +105,6 @@ Returns the effect type. Duplicates an effect by creating a deep copy of the effect :return: clone of paint effect -:rtype: QgsPaintEffect - %End virtual QgsStringMap properties() const = 0; @@ -117,8 +113,6 @@ Returns the properties describing the paint effect encoded in a string format. :return: string map of properties, in the form property key, value -:rtype: QgsStringMap - .. seealso:: :py:func:`readProperties` @@ -129,6 +123,7 @@ string format. %Docstring Reads a string map of an effect's properties and restores the effect to the state described by the properties map. + :param props: effect properties encoded in a string map .. seealso:: :py:func:`properties` @@ -139,12 +134,11 @@ to the state described by the properties map. Saves the current state of the effect to a DOM element. The default behavior is to save the properties string map returned by properties(). + :param doc: destination DOM document :param element: destination DOM element :return: true if save was successful -:rtype: bool - .. seealso:: :py:func:`readProperties` %End @@ -152,11 +146,10 @@ properties(). virtual bool readProperties( const QDomElement &element ); %Docstring Restores the effect to the state described by a DOM element. + :param element: DOM element describing an effect's state :return: true if read was successful -:rtype: bool - .. seealso:: :py:func:`saveProperties` %End @@ -164,6 +157,7 @@ Restores the effect to the state described by a DOM element. virtual void render( QPicture &picture, QgsRenderContext &context ); %Docstring Renders a picture using the effect. + :param picture: source QPicture to render :param context: destination render context @@ -175,6 +169,7 @@ Renders a picture using the effect. Begins intercepting paint operations to a render context. When the corresponding end() member is called all intercepted paint operations will be drawn to the render context after being modified by the effect. + :param context: destination render context .. seealso:: :py:func:`end` @@ -186,6 +181,7 @@ drawn to the render context after being modified by the effect. %Docstring Ends interception of paint operations to a render context, and draws the result to the render context after being modified by the effect. + :param context: destination render context .. seealso:: :py:func:`begin` @@ -196,8 +192,6 @@ to the render context after being modified by the effect. Returns whether the effect is enabled :return: true if effect is enabled -:rtype: bool - .. seealso:: :py:func:`setEnabled` %End @@ -205,6 +199,7 @@ Returns whether the effect is enabled void setEnabled( const bool enabled ); %Docstring Sets whether the effect is enabled + :param enabled: set to false to disable the effect .. seealso:: :py:func:`enabled` @@ -216,8 +211,6 @@ Returns the draw mode for the effect. This property only has an effect if the paint effect is used in a QgsEffectStack. :return: draw mode for effect -:rtype: DrawMode - .. seealso:: :py:func:`setDrawMode` %End @@ -226,6 +219,7 @@ effect if the paint effect is used in a QgsEffectStack. %Docstring Sets the draw mode for the effect. This property only has an effect if the paint effect is used in a QgsEffectStack. + :param drawMode: draw mode for effect .. seealso:: :py:func:`drawMode` @@ -239,6 +233,7 @@ effect if the paint effect is used in a QgsEffectStack. Handles drawing of the effect's result on to the specified render context. Derived classes must reimplement this method to apply any transformations to the source QPicture and draw the result using the context's painter. + :param context: destination render context .. seealso:: :py:func:`drawSource` @@ -248,6 +243,7 @@ the source QPicture and draw the result using the context's painter. %Docstring Draws the source QPicture onto the specified painter. Handles scaling of the picture to account for the destination painter's DPI. + :param painter: destination painter .. seealso:: :py:func:`source` @@ -261,8 +257,6 @@ Returns the source QPicture. The draw() member can utilize this when drawing the effect. :return: source QPicture -:rtype: QPicture - .. seealso:: :py:func:`drawSource` @@ -277,8 +271,6 @@ source QPicture by the results of the boundingRect() method. The result is cached to speed up subsequent calls to sourceAsImage. :return: source QPicture rendered to an image -:rtype: QImage - .. seealso:: :py:func:`drawSource` @@ -293,11 +285,10 @@ The result is cached to speed up subsequent calls to sourceAsImage. %Docstring Returns the offset which should be used when drawing the source image on to a destination render context. + :param context: destination render context :return: point offset for image top left corner -:rtype: QPointF - .. seealso:: :py:func:`sourceAsImage` %End @@ -307,12 +298,11 @@ render context. Returns the bounding rect required for drawing the effect. This method can be used to expand the bounding rect of a source picture to account for offset or blurring effects. + :param rect: original source bounding rect :param context: destination render context :return: modified bounding rect -:rtype: QRectF - .. seealso:: :py:func:`sourceAsImage` %End @@ -322,6 +312,7 @@ effects. Applies a workaround to a QPainter to avoid an issue with incorrect scaling when drawing QPictures. This may need to be called by derived classes prior to rendering results onto a painter. + :param painter: destination painter %End @@ -354,11 +345,10 @@ Constructor for QgsDrawSourceEffect static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsDrawSource effect from a properties string map. + :param map: encoded properties string map :return: new QgsDrawSourceEffect -:rtype: QgsPaintEffect - %End virtual QString type() const; @@ -372,6 +362,7 @@ Creates a new QgsDrawSource effect from a properties string map. void setOpacity( const double opacity ); %Docstring Sets the ``opacity`` for the effect. + :param opacity: double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque @@ -383,8 +374,6 @@ and 1 is fully opaque Returns the opacity for the effect :return: opacity value between 0 and 1 inclusive, where 0 is fully transparent -:rtype: float - and 1 is fully opaque .. seealso:: :py:func:`setOpacity()` @@ -393,6 +382,7 @@ and 1 is fully opaque void setBlendMode( const QPainter::CompositionMode mode ); %Docstring Sets the blend mode for the effect + :param mode: blend mode used for drawing the source on to a destination paint device @@ -404,8 +394,6 @@ paint device Returns the blend mode for the effect :return: blend mode used for drawing the source on to a destination -:rtype: QPainter.CompositionMode - paint device .. seealso:: :py:func:`setBlendMode` diff --git a/python/core/effects/qgspainteffectregistry.sip b/python/core/effects/qgspainteffectregistry.sip index 768958cc75d7..05fc4b5c6a47 100644 --- a/python/core/effects/qgspainteffectregistry.sip +++ b/python/core/effects/qgspainteffectregistry.sip @@ -32,6 +32,7 @@ simplify creation of the metadata. QgsPaintEffectAbstractMetadata( const QString &name, const QString &visibleName ); %Docstring Construct a new QgsPaintEffectAbstractMetadata + :param name: unique string representing paint effect class :param visibleName: user visible name representing paint effect class %End @@ -43,8 +44,6 @@ Construct a new QgsPaintEffectAbstractMetadata Returns the unique string representing the paint effect class :return: unique string -:rtype: str - .. seealso:: :py:func:`visibleName` %End @@ -54,8 +53,6 @@ Returns the unique string representing the paint effect class Returns the user visible string representing the paint effect class :return: friendly user visible string -:rtype: str - .. seealso:: :py:func:`name` %End @@ -63,11 +60,10 @@ Returns the user visible string representing the paint effect class virtual QgsPaintEffect *createPaintEffect( const QgsStringMap &map ) = 0 /Factory/; %Docstring Create a paint effect of this class given an encoded map of properties. + :param map: properties string map :return: new paint effect -:rtype: QgsPaintEffect - %End virtual QgsPaintEffectWidget *createWidget() /Factory/; @@ -76,8 +72,6 @@ Create configuration widget for paint effect of this class. Can return None if there's no GUI for the paint effect class. :return: configuration widget -:rtype: QgsPaintEffectWidget - %End protected: @@ -110,32 +104,29 @@ QgsApplication.paintEffectRegistry(). QgsPaintEffectAbstractMetadata *effectMetadata( const QString &name ) const; %Docstring Returns the metadata for a specific effect. + :param name: unique string name for paint effect class :return: paint effect metadata if found, otherwise None -:rtype: QgsPaintEffectAbstractMetadata - %End bool addEffectType( QgsPaintEffectAbstractMetadata *metadata /Transfer/ ); %Docstring Registers a new effect type. + :param metadata: effect metadata. Ownership is transferred to the registry. :return: true if add was successful. -:rtype: bool - %End QgsPaintEffect *createEffect( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const /Factory/; %Docstring Creates a new paint effect given the effect name and properties map. + :param name: unique name representing paint effect class :param properties: encoded string map of effect properties :return: new paint effect of specified class, or None if matching -:rtype: QgsPaintEffect - paint effect could not be created %End @@ -143,11 +134,10 @@ paint effect could not be created %Docstring Creates a new paint effect given a DOM element storing paint effect properties. + :param element: encoded DOM element of effect properties :return: new paint effect, or None if matching -:rtype: QgsPaintEffect - paint effect could not be created %End @@ -156,8 +146,6 @@ paint effect could not be created Returns a list of known paint effects. :return: list of paint effect names -:rtype: list of str - %End static QgsPaintEffect *defaultStack() /Factory/; @@ -167,8 +155,6 @@ effects. All effects except the standard draw source effect are disabled, but are included so that they can be easily drawn just by enabling the effect. :return: default effects stack -:rtype: QgsPaintEffect - .. seealso:: :py:func:`isDefaultStack()` %End @@ -176,11 +162,10 @@ but are included so that they can be easily drawn just by enabling the effect. static bool isDefaultStack( QgsPaintEffect *effect ); %Docstring Tests whether a paint effect matches the default effects stack. + :param effect: paint effect to test :return: true if effect is default stack -:rtype: bool - .. versionadded:: 2.12 diff --git a/python/core/effects/qgsshadoweffect.sip b/python/core/effects/qgsshadoweffect.sip index a5d29da6c64b..8398f6fb58f5 100644 --- a/python/core/effects/qgsshadoweffect.sip +++ b/python/core/effects/qgsshadoweffect.sip @@ -32,6 +32,7 @@ class QgsShadowEffect : QgsPaintEffect void setBlurLevel( const int level ); %Docstring Sets blur level (strength) for the shadow. + :param level: blur level. Values between 0 and 16 are valid, with larger values indicating greater blur strength. @@ -43,8 +44,6 @@ values indicating greater blur strength. Returns the blur level (strength) for the shadow. :return: blur level. Value will be between 0 and 16, with larger -:rtype: int - values indicating greater blur strength. .. seealso:: :py:func:`setBlurLevel` @@ -53,6 +52,7 @@ values indicating greater blur strength. void setOffsetAngle( const int angle ); %Docstring Sets the angle for offsetting the shadow. + :param angle: offset angle in degrees clockwise from North .. seealso:: :py:func:`offsetAngle` @@ -65,8 +65,6 @@ Sets the angle for offsetting the shadow. Returns the angle used for offsetting the shadow. :return: offset angle in degrees clockwise from North -:rtype: int - .. seealso:: :py:func:`setOffsetAngle` @@ -76,6 +74,7 @@ Returns the angle used for offsetting the shadow. void setOffsetDistance( const double distance ); %Docstring Sets the distance for offsetting the shadow. + :param distance: offset distance. Units are specified via setOffsetUnit() .. seealso:: :py:func:`offsetDistance` @@ -90,8 +89,6 @@ Sets the distance for offsetting the shadow. Returns the distance used for offsetting the shadow. :return: offset distance. Distance units are retrieved via offsetUnit() -:rtype: float - .. seealso:: :py:func:`setOffsetDistance` @@ -103,6 +100,7 @@ Returns the distance used for offsetting the shadow. void setOffsetUnit( const QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units used for the shadow offset distance. + :param unit: units for offset distance .. seealso:: :py:func:`offsetUnit` @@ -117,8 +115,6 @@ Sets the units used for the shadow offset distance. Returns the units used for the shadow offset distance. :return: units for offset distance -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit` @@ -130,6 +126,7 @@ Returns the units used for the shadow offset distance. void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale used for the shadow offset distance. + :param scale: map unit scale for offset distance .. seealso:: :py:func:`offsetMapUnitScale` @@ -144,8 +141,6 @@ Sets the map unit scale used for the shadow offset distance. Returns the map unit scale used for the shadow offset distance. :return: map unit scale for offset distance -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setOffsetMapUnitScale` @@ -157,6 +152,7 @@ Returns the map unit scale used for the shadow offset distance. void setColor( const QColor &color ); %Docstring Sets the color for the shadow. + :param color: shadow color .. seealso:: :py:func:`color` @@ -167,8 +163,6 @@ Sets the color for the shadow. Returns the color used for the shadow. :return: shadow color -:rtype: QColor - .. seealso:: :py:func:`setColor` %End @@ -176,6 +170,7 @@ Returns the color used for the shadow. void setOpacity( const double opacity ); %Docstring Sets the ``opacity`` for the effect. + :param opacity: double between 0 and 1 inclusive, where 0 is fully transparent and 1 is fully opaque @@ -187,8 +182,6 @@ and 1 is fully opaque Returns the opacity for the effect. :return: opacity value between 0 and 1 inclusive, where 0 is fully transparent -:rtype: float - and 1 is fully opaque .. seealso:: :py:func:`setOpacity()` @@ -197,6 +190,7 @@ and 1 is fully opaque void setBlendMode( const QPainter::CompositionMode mode ); %Docstring Sets the blend mode for the effect + :param mode: blend mode used for drawing the effect on to a destination paint device @@ -208,8 +202,6 @@ paint device Returns the blend mode for the effect :return: blend mode used for drawing the effect on to a destination -:rtype: QPainter.CompositionMode - paint device .. seealso:: :py:func:`setBlendMode` @@ -228,8 +220,6 @@ Specifies whether the shadow is drawn outside the picture or within the picture. :return: true if shadow is to be drawn outside the picture, or false -:rtype: bool - to draw shadow within the picture %End @@ -253,11 +243,10 @@ class QgsDropShadowEffect : QgsShadowEffect static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsDropShadowEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsDropShadowEffect -:rtype: QgsPaintEffect - %End QgsDropShadowEffect(); @@ -291,11 +280,10 @@ within a picture. static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsInnerShadowEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsInnerShadowEffect -:rtype: QgsPaintEffect - %End QgsInnerShadowEffect(); diff --git a/python/core/effects/qgstransformeffect.sip b/python/core/effects/qgstransformeffect.sip index c8685938552e..84d9c903cb0b 100644 --- a/python/core/effects/qgstransformeffect.sip +++ b/python/core/effects/qgstransformeffect.sip @@ -26,11 +26,10 @@ scale and rotate) to a picture. static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; %Docstring Creates a new QgsTransformEffect effect from a properties string map. + :param map: encoded properties string map :return: new QgsTransformEffect -:rtype: QgsPaintEffect - %End QgsTransformEffect(); @@ -49,6 +48,7 @@ Constructor for QgsTransformEffect. void setTranslateX( const double translateX ); %Docstring Sets the transform x translation. + :param translateX: distance to translate along the x axis .. seealso:: :py:func:`translateX` @@ -65,8 +65,6 @@ Sets the transform x translation. Returns the transform x translation. :return: X distance translated along the x axis -:rtype: float - .. seealso:: :py:func:`setTranslateX` @@ -80,6 +78,7 @@ Returns the transform x translation. void setTranslateY( const double translateY ); %Docstring Sets the transform y translation. + :param translateY: distance to translate along the y axis .. seealso:: :py:func:`translateY` @@ -96,8 +95,6 @@ Sets the transform y translation. Returns the transform y translation. :return: Y distance translated along the y axis -:rtype: float - .. seealso:: :py:func:`setTranslateY` @@ -111,6 +108,7 @@ Returns the transform y translation. void setTranslateUnit( const QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units used for the transform translation. + :param unit: units for translation .. seealso:: :py:func:`translateUnit` @@ -127,8 +125,6 @@ Sets the units used for the transform translation. Returns the units used for the transform translation. :return: units for translation -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setTranslateUnit` @@ -142,6 +138,7 @@ Returns the units used for the transform translation. void setTranslateMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale used for the transform translation. + :param scale: map unit scale for translation .. seealso:: :py:func:`translateMapUnitScale` @@ -158,8 +155,6 @@ Sets the map unit scale used for the transform translation. Returns the map unit scale used for the transform translation. :return: map unit scale for translation -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setTranslateMapUnitScale` @@ -173,6 +168,7 @@ Returns the map unit scale used for the transform translation. void setScaleX( const double scaleX ); %Docstring Sets the x axis scaling factor. + :param scaleX: factor to scale x axis by, where 1.0 = no scaling .. seealso:: :py:func:`scaleX` @@ -185,8 +181,6 @@ Sets the x axis scaling factor. Returns the x axis scaling factor. :return: x axis scaling factor, where 1.0 = no scaling -:rtype: float - .. seealso:: :py:func:`setScaleX` @@ -196,6 +190,7 @@ Returns the x axis scaling factor. void setScaleY( const double scaleY ); %Docstring Sets the y axis scaling factor. + :param scaleY: factor to scale y axis by, where 1.0 = no scaling .. seealso:: :py:func:`scaleX` @@ -206,8 +201,6 @@ Sets the y axis scaling factor. Returns the y axis scaling factor. :return: y axis scaling factor, where 1.0 = no scaling -:rtype: float - .. seealso:: :py:func:`setScaleY` @@ -225,14 +218,13 @@ Sets the transform ``rotation``, in degrees clockwise. %Docstring Returns the transform rotation, in degrees clockwise. -:rtype: float - .. seealso:: :py:func:`setRotation()` %End void setShearX( const double shearX ); %Docstring Sets the x axis shearing factor. + :param shearX: x axis shearing .. seealso:: :py:func:`shearX` @@ -245,8 +237,6 @@ Sets the x axis shearing factor. Returns the x axis shearing factor. :return: x axis shearing -:rtype: float - .. seealso:: :py:func:`setShearX` @@ -256,6 +246,7 @@ Returns the x axis shearing factor. void setShearY( const double shearY ); %Docstring Sets the y axis shearing factor. + :param shearY: y axis shearing .. seealso:: :py:func:`shearY` @@ -268,8 +259,6 @@ Sets the y axis shearing factor. Returns the y axis shearing factor. :return: y axis shearing -:rtype: float - .. seealso:: :py:func:`setShearY` @@ -279,6 +268,7 @@ Returns the y axis shearing factor. void setReflectX( const bool reflectX ); %Docstring Sets whether to reflect along the x-axis + :param reflectX: true to reflect horizontally .. seealso:: :py:func:`reflectX` @@ -291,8 +281,6 @@ Sets whether to reflect along the x-axis Returns whether transform will be reflected along the x-axis :return: true if transform will reflect horizontally -:rtype: bool - .. seealso:: :py:func:`setReflectX` @@ -302,6 +290,7 @@ Returns whether transform will be reflected along the x-axis void setReflectY( const bool reflectY ); %Docstring Sets whether to reflect along the y-axis + :param reflectY: true to reflect horizontally .. seealso:: :py:func:`reflectY` @@ -314,8 +303,6 @@ Sets whether to reflect along the y-axis Returns whether transform will be reflected along the y-axis :return: true if transform will reflect horizontally -:rtype: bool - .. seealso:: :py:func:`setReflectY` diff --git a/python/core/expression/qgsexpression.sip b/python/core/expression/qgsexpression.sip index fe3a89543d75..787a247bc905 100644 --- a/python/core/expression/qgsexpression.sip +++ b/python/core/expression/qgsexpression.sip @@ -115,37 +115,28 @@ Create an empty expression. Checks if this expression is valid. A valid expression could be parsed but does not necessarily evaluate properly. -:rtype: bool - .. versionadded:: 3.0 %End bool hasParserError() const; %Docstring Returns true if an error occurred when parsing the input expression - -:rtype: bool %End QString parserErrorString() const; %Docstring Returns parser error - -:rtype: str %End const QgsExpressionNode *rootNode() const; %Docstring Returns root node of the expression. Root node is null is parsing has failed - -:rtype: QgsExpressionNode %End bool prepare( const QgsExpressionContext *context ); %Docstring Get the expression ready for evaluation - find out column indexes. -:param context: context for preparing expression -:rtype: bool +:param context: context for preparing expression .. versionadded:: 2.12 %End @@ -154,8 +145,6 @@ Get the expression ready for evaluation - find out column indexes. %Docstring Get list of columns referenced by the expression. -:rtype: set of str - .. note:: If the returned list contains the QgsFeatureRequest.AllAttributes constant then @@ -171,8 +160,6 @@ Return a list of all variables which are used in this expression. If the list contains a NULL QString, there is a variable name used which is determined at runtime. -:rtype: set of str - .. versionadded:: 3.0 %End @@ -180,16 +167,12 @@ which is determined at runtime. %Docstring Return a list of field name indexes obtained from the provided fields. -:rtype: set of int - .. versionadded:: 3.0 %End bool needsGeometry() const; %Docstring Returns true if the expression uses feature geometry for some computation - -:rtype: bool %End @@ -197,8 +180,6 @@ Returns true if the expression uses feature geometry for some computation %Docstring Evaluate the feature and return the result. -:rtype: QVariant - .. note:: this method does not expect that prepare() has been called on this instance @@ -209,9 +190,8 @@ Evaluate the feature and return the result. QVariant evaluate( const QgsExpressionContext *context ); %Docstring Evaluate the expression against the specified context and return the result. -:param context: context for evaluating expression -:rtype: QVariant +:param context: context for evaluating expression .. note:: @@ -223,14 +203,10 @@ Evaluate the expression against the specified context and return the result. bool hasEvalError() const; %Docstring Returns true if an error occurred when evaluating last input - -:rtype: bool %End QString evalErrorString() const; %Docstring Returns evaluation error - -:rtype: str %End void setEvalErrorString( const QString &str ); %Docstring @@ -241,21 +217,18 @@ Set evaluation error (used internally by evaluation functions) %Docstring Checks whether an expression consists only of a single field reference -:rtype: bool - .. versionadded:: 2.9 %End static bool checkExpression( const QString &text, const QgsExpressionContext *context, QString &errorMessage /Out/ ); %Docstring Tests whether a string is a valid expression. + :param text: string to test :param context: optional expression context :param errorMessage: will be filled with any error message from the validation :return: true if string is a valid expression -:rtype: bool - .. versionadded:: 2.12 %End @@ -272,8 +245,6 @@ Set the expression string, will reset the whole internal structure. Return the original, unmodified expression string. If there was none supplied because it was constructed by sole API calls, dump() will be used to create one instead. - -:rtype: str %End QString dump() const; @@ -282,8 +253,6 @@ Return an expression string, constructed from the internal abstract syntax tree. This does not contain any nice whitespace formatting or comments. In general it is preferable to use expression() instead. - -:rtype: str %End QgsDistanceArea *geomCalculator(); @@ -291,8 +260,6 @@ expression() instead. Return calculator used for distance and area calculations (used by $length, $area and $perimeter functions only) -:rtype: QgsDistanceArea - .. seealso:: :py:func:`setGeomCalculator()` .. seealso:: :py:func:`distanceUnits()` @@ -306,6 +273,7 @@ Sets the geometry calculator used for distance and area calculations in expressi (used by $length, $area and $perimeter functions only). By default, no geometry calculator is set and all distance and area calculations are performed using simple Cartesian methods (ie no ellipsoidal calculations). + :param calc: geometry calculator. Ownership is not transferred. Set to a None to force Cartesian calculations. @@ -316,8 +284,6 @@ Cartesian calculations. %Docstring Returns the desired distance units for calculations involving geomCalculator(), e.g., "$length" and "$perimeter". -:rtype: QgsUnitTypes.DistanceUnit - .. note:: distances are only converted when a geomCalculator() has been set @@ -348,8 +314,6 @@ Sets the desired distance units for calculations involving geomCalculator(), e.g %Docstring Returns the desired areal units for calculations involving geomCalculator(), e.g., "$area". -:rtype: QgsUnitTypes.AreaUnit - .. note:: areas are only converted when a geomCalculator() has been set @@ -383,13 +347,12 @@ This function replaces each expression between [% and %] in the string with the result of its evaluation with the specified context Additional substitutions can be passed through the substitutionMap parameter + :param action: The source string in which placeholders should be replaced. :param context: Expression context :param distanceArea: Optional QgsDistanceArea. If specified, the QgsDistanceArea is used for distance and area conversion -:rtype: str - .. versionadded:: 2.12 %End @@ -397,12 +360,11 @@ and area conversion %Docstring Attempts to evaluate a text string as an expression to a resultant double value. + :param text: text to evaluate as expression :param fallbackValue: value to return if text can not be evaluated as a double :return: evaluated double value, or fallback value -:rtype: float - .. versionadded:: 2.7 @@ -426,26 +388,17 @@ for one-off evaluations only. }; static const QList &Functions(); -%Docstring - -:rtype: list of QgsExpressionFunction -%End static const QStringList &BuiltinFunctions(); -%Docstring - -:rtype: list of str -%End static bool registerFunction( QgsExpressionFunction *function, bool transferOwnership = false ); %Docstring Registers a function to the expression engine. This is required to allow expressions to utilize the function. + :param function: function to register :param transferOwnership: set to true to transfer ownership of function to expression engine :return: true on successful registration -:rtype: bool - .. seealso:: :py:func:`unregisterFunction` %End @@ -453,9 +406,8 @@ Registers a function to the expression engine. This is required to allow express static bool unregisterFunction( const QString &name ); %Docstring Unregisters a function from the expression engine. The function will no longer be usable in expressions. -:param name: function name -:rtype: bool +:param name: function name .. seealso:: :py:func:`registerFunction` %End @@ -471,15 +423,11 @@ Deletes all registered functions whose ownership have been transferred to the ex static bool isFunctionName( const QString &name ); %Docstring tells whether the identifier is a name of existing function - -:rtype: bool %End static int functionIndex( const QString &name ); %Docstring return index of the function in Functions array - -:rtype: int %End static int functionCount(); @@ -487,16 +435,12 @@ return index of the function in Functions array Returns the number of functions defined in the parser :return: The number of function defined in the parser. -:rtype: int - %End static QString quotedColumnRef( QString name ); %Docstring Returns a quoted column reference (in double quotes) -:rtype: str - .. seealso:: :py:func:`quotedString()` .. seealso:: :py:func:`quotedValue()` @@ -506,8 +450,6 @@ Returns a quoted column reference (in double quotes) %Docstring Returns a quoted version of a string (in single quotes) -:rtype: str - .. seealso:: :py:func:`quotedValue()` .. seealso:: :py:func:`quotedColumnRef()` @@ -517,9 +459,8 @@ Returns a quoted version of a string (in single quotes) %Docstring Returns a string representation of a literal value, including appropriate quotations where required. -:param value: value to convert to a string representation -:rtype: str +:param value: value to convert to a string representation .. versionadded:: 2.14 @@ -532,11 +473,10 @@ quotations where required. %Docstring Returns a string representation of a literal value, including appropriate quotations where required. + :param value: value to convert to a string representation :param type: value type -:rtype: str - .. versionadded:: 2.14 .. seealso:: :py:func:`quotedString()` @@ -548,9 +488,8 @@ quotations where required. static QString helpText( QString name ); %Docstring Returns the help text for a specified function. -:param name: function name -:rtype: str +:param name: function name .. seealso:: :py:func:`variableHelpText()` @@ -560,12 +499,11 @@ Returns the help text for a specified function. static QString variableHelpText( const QString &variableName ); %Docstring Returns the help text for a specified variable. + :param variableName: name of variable :param showValue: set to true to include current value of variable in help text :param value: current value of variable to show in help text -:rtype: str - .. seealso:: :py:func:`helpText()` .. versionadded:: 2.12 @@ -574,12 +512,11 @@ Returns the help text for a specified variable. static QString formatVariableHelp( const QString &description, bool showValue = true, const QVariant &value = QVariant() ); %Docstring Returns formatted help text for a variable. + :param description: translated description of variable :param showValue: set to true to include current value of variable in help text :param value: current value of variable to show in help text -:rtype: str - .. seealso:: :py:func:`helpText()` .. seealso:: :py:func:`variableHelpText()` @@ -590,20 +527,18 @@ Returns formatted help text for a variable. static QString group( const QString &group ); %Docstring Returns the translated name for a function group. -:param group: untranslated group name -:rtype: str +:param group: untranslated group name %End static QString formatPreviewString( const QVariant &value ); %Docstring Formats an expression result for friendly display to the user. Truncates the result to a sensible length, and presents text representations of non numeric/text types (e.g., geometries and features). + :param value: expression result to format :return: formatted string, may contain HTML formatting characters -:rtype: str - .. versionadded:: 2.14 %End @@ -612,12 +547,11 @@ length, and presents text representations of non numeric/text types (e.g., geome %Docstring Create an expression allowing to evaluate if a field is equal to a value. The value may be null. + :param fieldName: the name of the field :param value: the value of the field :return: the expression to evaluate field equality -:rtype: str - .. versionadded:: 3.0 %End diff --git a/python/core/expression/qgsexpressionfunction.sip b/python/core/expression/qgsexpressionfunction.sip index df464741cd37..01740d01bff5 100644 --- a/python/core/expression/qgsexpressionfunction.sip +++ b/python/core/expression/qgsexpressionfunction.sip @@ -41,6 +41,7 @@ Represents a single parameter passed to a function. const QVariant &defaultValue = QVariant() ); %Docstring Constructor for Parameter. + :param name: parameter name, used when named parameter are specified in an expression :param optional: set to true if parameter should be optional :param defaultValue: default value to use for optional parameters @@ -49,22 +50,16 @@ Constructor for Parameter. QString name() const; %Docstring Returns the name of the parameter. - -:rtype: str %End bool optional() const; %Docstring Returns true if the parameter is optional. - -:rtype: bool %End QVariant defaultValue() const; %Docstring Returns the default value for the parameter. - -:rtype: QVariant %End bool operator==( const QgsExpressionFunction::Parameter &other ) const; @@ -128,38 +123,28 @@ Constructor for function which uses named parameter list and group list. QString name() const; %Docstring The name of the function. - -:rtype: str %End int params() const; %Docstring The number of parameters this function takes. - -:rtype: int %End int minParams() const; %Docstring The minimum number of parameters this function takes. - -:rtype: int %End const QgsExpressionFunction::ParameterList ¶meters() const; %Docstring Returns the list of named parameters for the function, if set. -:rtype: QgsExpressionFunction.ParameterList - .. versionadded:: 2.16 %End virtual bool usesGeometry( const QgsExpressionNodeFunction *node ) const; %Docstring Does this function use a geometry object. - -:rtype: bool %End virtual QStringList aliases() const; @@ -168,8 +153,6 @@ Returns a list of possible aliases for the function. These include other permissible names for the function, e.g., deprecated names. :return: list of known aliases -:rtype: list of str - .. versionadded:: 2.9 %End @@ -179,8 +162,6 @@ other permissible names for the function, e.g., deprecated names. True if this function should use lazy evaluation. Lazy evaluation functions take QgsExpression.Node objects rather than the node results when called. You can use node->eval(parent, feature) to evaluate the node and return the result Functions are non lazy default and will be given the node return value when called. - -:rtype: bool %End virtual bool isStatic( const QgsExpressionNodeFunction *node, QgsExpression *parent, const QgsExpressionContext *context ) const; @@ -192,8 +173,6 @@ attributes and/or geometry. By default this will return true, if all arguments that have been passed to the function are also static. -:rtype: bool - .. versionadded:: 3.0 %End @@ -204,8 +183,6 @@ This will be called during the prepare step() of an expression if it is not stat This can be used by functions to do any preparation steps that might help to speedup the upcoming evaluation. -:rtype: bool - .. versionadded:: 3.0 %End @@ -216,8 +193,6 @@ May contain QgsFeatureRequest.AllAttributes to signal that all attributes are required. If in doubt this will return more fields than strictly required. -:rtype: set of str - .. versionadded:: 3.0 %End @@ -225,8 +200,6 @@ If in doubt this will return more fields than strictly required. %Docstring Returns whether the function is only available if provided by a QgsExpressionContext object. -:rtype: bool - .. versionadded:: 2.12 %End @@ -235,8 +208,6 @@ Returns whether the function is only available if provided by a QgsExpressionCon Returns true if the function is deprecated and should not be presented as a valid option to users in expression builders. -:rtype: bool - .. versionadded:: 3.0 %End @@ -244,8 +215,6 @@ to users in expression builders. %Docstring Returns the first group which the function belongs to. -:rtype: str - .. note:: consider using groups() instead, as some functions naturally belong in multiple groups @@ -255,8 +224,6 @@ Returns the first group which the function belongs to. %Docstring Returns a list of the groups the function belongs to. -:rtype: list of str - .. versionadded:: 3.0 .. seealso:: :py:func:`group()` @@ -265,36 +232,25 @@ Returns a list of the groups the function belongs to. const QString helpText() const; %Docstring The help text for the function. - -:rtype: str %End virtual QVariant func( const QVariantList &values, const QgsExpressionContext *context, QgsExpression *parent, const QgsExpressionNodeFunction *node ) = 0; %Docstring Returns result of evaluating the function. + :param values: list of values passed to the function :param context: context expression is being evaluated against :param parent: parent expression :param node: expression node :return: result of function -:rtype: QVariant - %End virtual QVariant run( QgsExpressionNode::NodeList *args, const QgsExpressionContext *context, QgsExpression *parent, const QgsExpressionNodeFunction *node ); -%Docstring - -:rtype: QVariant -%End bool operator==( const QgsExpressionFunction &other ) const; virtual bool handlesNull() const; -%Docstring - -:rtype: bool -%End protected: @@ -306,8 +262,6 @@ constraints imposed by the ``context`` within the given ``parent``. This can be used as callback for custom implementations of subclasses. It is the default for implementation for StaticFunction.isStatic. -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/core/expression/qgsexpressionnode.sip b/python/core/expression/qgsexpressionnode.sip index a61d32ce96aa..1c744e05cc57 100644 --- a/python/core/expression/qgsexpressionnode.sip +++ b/python/core/expression/qgsexpressionnode.sip @@ -70,6 +70,7 @@ Abstract base class for all nodes that can appear in an expression. NamedNode( const QString &name, QgsExpressionNode *node ); %Docstring Constructor for NamedNode + :param name: node name :param node: node %End @@ -108,32 +109,24 @@ Adds a named node. Takes ownership of the provided node. int count() const; %Docstring Returns the number of nodes in the list. - -:rtype: int %End bool hasNamedNodes() const; %Docstring Returns true if list contains any named nodes -:rtype: bool - .. versionadded:: 2.16 %End QList list(); %Docstring Get a list of all the nodes. - -:rtype: list of QgsExpressionNode %End QgsExpressionNode *at( int i ); %Docstring Get the node at position i in the list. -:rtype: QgsExpressionNode - .. versionadded:: 3.0 %End @@ -141,23 +134,15 @@ Get the node at position i in the list. %Docstring Returns a list of names for nodes. Unnamed nodes will be indicated by an empty string in the list. -:rtype: list of str - .. versionadded:: 2.16 %End QgsExpressionNode::NodeList *clone() const /Factory/; %Docstring Creates a deep copy of this list. Ownership is transferred to the caller - -:rtype: QgsExpressionNode.NodeList %End virtual QString dump() const; -%Docstring - -:rtype: str -%End public: }; @@ -169,8 +154,6 @@ Creates a deep copy of this list. Ownership is transferred to the caller Get the type of this node. :return: The type of this node -:rtype: QgsExpressionNode.NodeType - %End virtual QString dump() const = 0; @@ -178,8 +161,6 @@ Get the type of this node. Dump this node into a serialized (part) of an expression. The returned expression does not necessarily literally match the original expression, it's just guaranteed to behave the same way. - -:rtype: str %End QVariant eval( QgsExpression *parent, const QgsExpressionContext *context ); @@ -188,8 +169,6 @@ Evaluate this node with the given context and parent. This will return a cached value if it has been determined to be static during the prepare() execution. -:rtype: QVariant - .. versionadded:: 2.12 %End @@ -199,8 +178,6 @@ Generate a clone of this node. Ownership is transferred to the caller. :return: a deep copy of this node. -:rtype: QgsExpressionNode - %End virtual QSet referencedColumns() const = 0; @@ -213,15 +190,11 @@ evaluate this node and in addition recursively collect all the columns required to evaluate child nodes. :return: A list of columns required to evaluate this expression -:rtype: set of str - %End virtual QSet referencedVariables() const = 0; %Docstring Return a set of all variables which are used in this expression. - -:rtype: set of str %End virtual bool needsGeometry() const = 0; @@ -232,8 +205,6 @@ this expression. This needs to call `needsGeometry()` recursively on any child nodes. :return: true if a geometry is required to evaluate this expression -:rtype: bool - %End virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const = 0; @@ -243,8 +214,6 @@ the prepare() step and in case it returns true, the value of this node will alre be evaluated and the result cached (and therefore not re-evaluated in subsequent calls to eval()). In case this returns true, prepareNode() will never be called. -:rtype: bool - .. versionadded:: 3.0 %End @@ -255,8 +224,6 @@ This will check if the node content is static and in this case cache the value. If it's not static it will call prepareNode() to allow the node to do initialization work like for example resolving a column name to an attribute index. -:rtype: bool - .. versionadded:: 2.12 %End diff --git a/python/core/expression/qgsexpressionnodeimpl.sip b/python/core/expression/qgsexpressionnodeimpl.sip index 71ea05aaf00d..a5f707d93315 100644 --- a/python/core/expression/qgsexpressionnodeimpl.sip +++ b/python/core/expression/qgsexpressionnodeimpl.sip @@ -33,15 +33,7 @@ A node unary operator is modifying the value of ``operand`` by negating it with ~QgsExpressionNodeUnaryOperator(); QgsExpressionNodeUnaryOperator::UnaryOperator op() const; -%Docstring - -:rtype: QgsExpressionNodeUnaryOperator.UnaryOperator -%End QgsExpressionNode *operand() const; -%Docstring - -:rtype: QgsExpressionNode -%End virtual QgsExpressionNode::NodeType nodeType() const; @@ -68,8 +60,6 @@ A node unary operator is modifying the value of ``operand`` by negating it with %Docstring Returns a the name of this operator without the operands. I.e. "NOT" or "-" - -:rtype: str %End }; @@ -123,20 +113,8 @@ Binary combination of the left and the right with op. ~QgsExpressionNodeBinaryOperator(); QgsExpressionNodeBinaryOperator::BinaryOperator op() const; -%Docstring - -:rtype: QgsExpressionNodeBinaryOperator.BinaryOperator -%End QgsExpressionNode *opLeft() const; -%Docstring - -:rtype: QgsExpressionNode -%End QgsExpressionNode *opRight() const; -%Docstring - -:rtype: QgsExpressionNode -%End virtual QgsExpressionNode::NodeType nodeType() const; @@ -159,22 +137,12 @@ Binary combination of the left and the right with op. int precedence() const; -%Docstring - -:rtype: int -%End bool leftAssociative() const; -%Docstring - -:rtype: bool -%End QString text() const; %Docstring Returns a the name of this operator without the operands. I.e. "AND", "OR", ... - -:rtype: str %End }; @@ -194,20 +162,8 @@ This node tests if the result of ``node`` is in the result of ``list``. Optional ~QgsExpressionNodeInOperator(); QgsExpressionNode *node() const; -%Docstring - -:rtype: QgsExpressionNode -%End bool isNotIn() const; -%Docstring - -:rtype: bool -%End QgsExpressionNode::NodeList *list() const; -%Docstring - -:rtype: QgsExpressionNode.NodeList -%End virtual QgsExpressionNode::NodeType nodeType() const; @@ -248,15 +204,7 @@ a list of arguments that will be passed to it. ~QgsExpressionNodeFunction(); int fnIndex() const; -%Docstring - -:rtype: int -%End QgsExpressionNode::NodeList *args() const; -%Docstring - -:rtype: QgsExpressionNode.NodeList -%End virtual QgsExpressionNode::NodeType nodeType() const; @@ -281,8 +229,6 @@ a list of arguments that will be passed to it. static bool validateParams( int fnIndex, QgsExpressionNode::NodeList *args, QString &error ); %Docstring Tests whether the provided argument list is valid for the matching function - -:rtype: bool %End }; @@ -299,8 +245,6 @@ class QgsExpressionNodeLiteral : QgsExpressionNode QVariant value() const; %Docstring The value of the literal. - -:rtype: QVariant %End virtual QgsExpressionNode::NodeType nodeType() const; @@ -337,8 +281,6 @@ class QgsExpressionNodeColumnRef : QgsExpressionNode QString name() const; %Docstring The name of the column. - -:rtype: str %End virtual QgsExpressionNode::NodeType nodeType() const; @@ -389,8 +331,6 @@ A combination of when and then. Simple as that. QgsExpressionNodeCondition::WhenThen *clone() const /Factory/; %Docstring Get a deep copy of this WhenThen combination. - -:rtype: QgsExpressionNodeCondition.WhenThen %End private: diff --git a/python/core/fieldformatter/qgsdatetimefieldformatter.sip b/python/core/fieldformatter/qgsdatetimefieldformatter.sip index 72ac77d6b447..853a7bbb761b 100644 --- a/python/core/fieldformatter/qgsdatetimefieldformatter.sip +++ b/python/core/fieldformatter/qgsdatetimefieldformatter.sip @@ -44,8 +44,6 @@ The type is expected to be one of - QVariant.DateTime - QVariant.Date - QVariant.Time - -:rtype: str %End }; diff --git a/python/core/fieldformatter/qgsvaluerelationfieldformatter.sip b/python/core/fieldformatter/qgsvaluerelationfieldformatter.sip index cc82e769454d..2c761f352b37 100644 --- a/python/core/fieldformatter/qgsvaluerelationfieldformatter.sip +++ b/python/core/fieldformatter/qgsvaluerelationfieldformatter.sip @@ -62,8 +62,6 @@ Create a cache for a value relation field. This can be used to keep the value map in the local memory if doing multiple lookups in a loop. -:rtype: QgsValueRelationFieldFormatter.ValueRelationCache - .. versionadded:: 3.0 %End }; diff --git a/python/core/geocms/geonode/qgsgeonodeconnection.sip b/python/core/geocms/geonode/qgsgeonodeconnection.sip index 65824fc6f18b..027d4b632b63 100644 --- a/python/core/geocms/geonode/qgsgeonodeconnection.sip +++ b/python/core/geocms/geonode/qgsgeonodeconnection.sip @@ -30,8 +30,6 @@ Constructor for a QgsGeoNodeConnection with the specified ``name``. %Docstring Returns the name of the connection. -:rtype: str - .. seealso:: :py:func:`setConnectionName()` %End @@ -46,8 +44,6 @@ Sets the ``name`` of the connection. %Docstring Returns the URI for the GeoNode connection. -:rtype: QgsDataSourceUri - .. seealso:: :py:func:`setUri()` %End @@ -62,8 +58,6 @@ Sets the ``uri`` for the GeoNode connection. %Docstring Adds uri parameters relating to the settings for a WMS layer on the connection to a QgsDataSourceUri ``uri``. -:rtype: QgsDataSourceUri - .. seealso:: :py:func:`addWmsWcsConnectionSettings()` %End @@ -71,8 +65,6 @@ Adds uri parameters relating to the settings for a WMS layer on the connection t %Docstring Adds uri parameters relating to the settings for a WFS layer on the connection to a QgsDataSourceUri ``uri``. -:rtype: QgsDataSourceUri - .. seealso:: :py:func:`addWmsWcsConnectionSettings()` %End @@ -95,8 +87,6 @@ GeoNode servers associated with a QGIS install. static QStringList connectionList(); %Docstring Returns a list of all known GeoNode connection names. - -:rtype: list of str %End static void deleteConnection( const QString &name ); @@ -107,15 +97,11 @@ Deletes the GeoNode connection with matching ``name``. static QString pathGeoNodeConnection(); %Docstring Returns the base path for settings related to GeoNode connections. - -:rtype: str %End static QString pathGeoNodeConnectionDetails(); %Docstring Returns the base path for settings related to GeoNode connection details. - -:rtype: str %End }; diff --git a/python/core/geocms/geonode/qgsgeonoderequest.sip b/python/core/geocms/geonode/qgsgeonoderequest.sip index 0e11b279a2ff..046ef65f01cb 100644 --- a/python/core/geocms/geonode/qgsgeonoderequest.sip +++ b/python/core/geocms/geonode/qgsgeonoderequest.sip @@ -118,8 +118,6 @@ Any existing request will be aborted. Calling this method will block while waiting for a result. It should not be used from any code which potentially blocks operation in the main GUI thread. -:rtype: bool - .. seealso:: :py:func:`request()` %End @@ -147,8 +145,6 @@ Requests the list of available layers from the server. This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread. -:rtype: list of QgsGeoNodeRequest.ServiceLayerDetail - .. seealso:: :py:func:`fetchLayers()` %End @@ -159,8 +155,6 @@ with matching ``layerName`` from the server. This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread. - -:rtype: list of QgsGeoNodeStyle %End QgsGeoNodeStyle fetchDefaultStyleBlocking( const QString &layerName ); @@ -169,8 +163,6 @@ Requests the default style for the layer with matching ``layerName`` from the se This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread. - -:rtype: QgsGeoNodeStyle %End QgsGeoNodeStyle fetchStyleBlocking( const QString &styleId ); @@ -179,8 +171,6 @@ Requests the details for the style with matching ``styleId`` from the server. This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread. - -:rtype: QgsGeoNodeStyle %End QStringList fetchServiceUrlsBlocking( const QString &serviceType ); @@ -189,8 +179,6 @@ Requests the list of unique URLs for available services with matching ``serviceT This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread. - -:rtype: list of str %End QgsStringMap fetchServiceUrlDataBlocking( const QString &serviceType ); @@ -199,31 +187,23 @@ Obtains a map of layer name to URL for available services with matching ``servic This method is blocking and will wait for results from the server before returning. Accordingly it should not be used from any code which potentially blocks operation in the main GUI thread. - -:rtype: QgsStringMap %End QString lastError() const; %Docstring Returns the most recent error string for any encountered errors, or an empty string if no errors have been encountered. - -:rtype: str %End QByteArray lastResponse() const; %Docstring Returns the most recent response obtained from the server. - -:rtype: QByteArray %End QString protocol() const; %Docstring Returns the network protocol (e.g. 'http') used for connecting with the server. -:rtype: str - .. seealso:: :py:func:`setProtocol()` %End diff --git a/python/core/geometry/qgsabstractgeometry.sip b/python/core/geometry/qgsabstractgeometry.sip index d3d6a24bc4cb..38c6fc1e0807 100644 --- a/python/core/geometry/qgsabstractgeometry.sip +++ b/python/core/geometry/qgsabstractgeometry.sip @@ -75,8 +75,6 @@ Constructor for QgsAbstractGeometry. virtual QgsAbstractGeometry *clone() const = 0 /Factory/; %Docstring Clones the geometry by performing a deep copy - -:rtype: QgsAbstractGeometry %End virtual void clear() = 0; @@ -87,8 +85,6 @@ Clears the geometry, ie reset it to a null geometry virtual QgsRectangle boundingBox() const = 0; %Docstring Returns the minimal bounding box for the geometry - -:rtype: QgsRectangle %End @@ -96,16 +92,12 @@ Returns the minimal bounding box for the geometry %Docstring Returns the inherent dimension of the geometry. For example, this is 0 for a point geometry, 1 for a linestring and 2 for a polygon. - -:rtype: int %End virtual QString geometryType() const = 0; %Docstring Returns a unique string representing the geometry type. -:rtype: str - .. seealso:: :py:func:`wkbType` .. seealso:: :py:func:`wktTypeStr` @@ -115,8 +107,6 @@ Returns a unique string representing the geometry type. %Docstring Returns the WKB type of the geometry. -:rtype: QgsWkbTypes.Type - .. seealso:: :py:func:`geometryType` .. seealso:: :py:func:`wktTypeStr` @@ -126,8 +116,6 @@ Returns the WKB type of the geometry. %Docstring Returns the WKT type string of the geometry. -:rtype: str - .. seealso:: :py:func:`geometryType` .. seealso:: :py:func:`wkbType` @@ -137,8 +125,6 @@ Returns the WKT type string of the geometry. %Docstring Returns true if the geometry is 3D and contains a z-value. -:rtype: bool - .. seealso:: :py:func:`isMeasure` %End @@ -146,8 +132,6 @@ Returns true if the geometry is 3D and contains a z-value. %Docstring Returns true if the geometry contains m values. -:rtype: bool - .. seealso:: :py:func:`is3D` %End @@ -157,8 +141,6 @@ Returns the closure of the combinatorial boundary of the geometry (ie the topolo For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon. :return: boundary for geometry. May be null for some geometry types. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -169,8 +151,6 @@ For instance, a polygon geometry will have a boundary consisting of the linestri Sets the geometry from a WKB string. After successful read the wkb argument will be at the position where the reading has stopped. -:rtype: bool - .. seealso:: :py:func:`fromWkt` %End @@ -178,8 +158,6 @@ After successful read the wkb argument will be at the position where the reading %Docstring Sets the geometry from a WKT string. -:rtype: bool - .. seealso:: :py:func:`fromWkb` %End @@ -188,8 +166,6 @@ Sets the geometry from a WKT string. %Docstring Returns a WKB representation of the geometry. -:rtype: QByteArray - .. seealso:: :py:func:`asWkt` .. seealso:: :py:func:`asGML2` @@ -204,9 +180,8 @@ Returns a WKB representation of the geometry. virtual QString asWkt( int precision = 17 ) const = 0; %Docstring Returns a WKT representation of the geometry. -:param precision: number of decimal places for coordinates -:rtype: str +:param precision: number of decimal places for coordinates .. seealso:: :py:func:`asWkb()` @@ -220,12 +195,11 @@ Returns a WKT representation of the geometry. virtual QDomElement asGml2( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const = 0; %Docstring Returns a GML2 representation of the geometry. + :param doc: DOM document :param precision: number of decimal places for coordinates :param ns: XML namespace -:rtype: QDomElement - .. seealso:: :py:func:`asWkb()` .. seealso:: :py:func:`asWkt()` @@ -238,12 +212,11 @@ Returns a GML2 representation of the geometry. virtual QDomElement asGml3( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const = 0; %Docstring Returns a GML3 representation of the geometry. + :param doc: DOM document :param precision: number of decimal places for coordinates :param ns: XML namespace -:rtype: QDomElement - .. seealso:: :py:func:`asWkb()` .. seealso:: :py:func:`asWkt()` @@ -256,9 +229,8 @@ Returns a GML3 representation of the geometry. virtual QString asJson( int precision = 17 ) const = 0; %Docstring Returns a GeoJSON representation of the geometry. -:param precision: number of decimal places for coordinates -:rtype: str +:param precision: number of decimal places for coordinates .. seealso:: :py:func:`asWkb()` @@ -275,6 +247,7 @@ Returns a GeoJSON representation of the geometry. bool transformZ = false ) = 0; %Docstring Transforms the geometry using a coordinate transform + :param ct: coordinate transform :param d: transformation direction :param transformZ: set to true to also transform z coordinates. This requires that @@ -296,6 +269,7 @@ Similarly, m-values can be scaled via ``mScale`` and translated via ``mTranslate virtual void draw( QPainter &p ) const = 0; %Docstring Draws the geometry using the specified QPainter. + :param p: destination QPainter %End @@ -308,21 +282,18 @@ to the first vertex. Returns -1 if a corresponding vertex could not be found. -:rtype: int - .. versionadded:: 3.0 %End virtual bool nextVertex( QgsVertexId &id, QgsPoint &vertex /Out/ ) const = 0; %Docstring Returns next vertex id and coordinates + :param id: initial value should be the starting vertex id. The next vertex id will be stored in this variable if found. :param vertex: container for found node :return: false if at end -:rtype: bool - %End virtual void adjacentVertices( QgsVertexId vertex, QgsVertexId &previousVertex /Out/, QgsVertexId &nextVertex /Out/ ) const = 0; @@ -337,22 +308,16 @@ Returns the vertices adjacent to a specified ``vertex`` within a geometry. Retrieves the sequence of geometries, rings and nodes. :return: coordinate sequence -:rtype: QgsCoordinateSequence - %End virtual int nCoordinates() const; %Docstring Returns the number of nodes contained in the geometry - -:rtype: int %End virtual QgsPoint vertexAt( QgsVertexId id ) const = 0; %Docstring Returns the point corresponding to a specified vertex id - -:rtype: QgsPoint %End virtual double closestSegment( const QgsPoint &pt, QgsPoint &segmentPt /Out/, @@ -360,6 +325,7 @@ Returns the point corresponding to a specified vertex id int *leftOf /Out/ = 0, double epsilon = 4 * DBL_EPSILON ) const = 0; %Docstring Searches for the closest segment of the geometry to a given point. + :param pt: specifies the point to find closest segment to :param segmentPt: storage for the closest point within the geometry :param vertexAfter: storage for the ID of the vertex at the end of the closest segment @@ -370,20 +336,17 @@ false if point is to right of segment) :param epsilon: epsilon for segment snapping :return: squared distance to closest segment or negative value on error -:rtype: float - %End virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex ) = 0; %Docstring Inserts a vertex into the geometry + :param position: vertex id for position of inserted vertex :param vertex: vertex to insert :return: true if insert was successful -:rtype: bool - .. seealso:: :py:func:`moveVertex` @@ -393,12 +356,11 @@ Inserts a vertex into the geometry virtual bool moveVertex( QgsVertexId position, const QgsPoint &newPos ) = 0; %Docstring Moves a vertex within the geometry + :param position: vertex id for vertex to move :param newPos: new position of vertex :return: true if move was successful -:rtype: bool - .. seealso:: :py:func:`insertVertex` @@ -408,11 +370,10 @@ Moves a vertex within the geometry virtual bool deleteVertex( QgsVertexId position ) = 0; %Docstring Deletes a vertex within the geometry + :param position: vertex id for vertex to delete :return: true if delete was successful -:rtype: bool - .. seealso:: :py:func:`insertVertex` @@ -423,8 +384,6 @@ Deletes a vertex within the geometry %Docstring Returns the length of the geometry. -:rtype: float - .. seealso:: :py:func:`area()` .. seealso:: :py:func:`perimeter()` @@ -434,8 +393,6 @@ Returns the length of the geometry. %Docstring Returns the perimeter of the geometry. -:rtype: float - .. seealso:: :py:func:`area()` .. seealso:: :py:func:`length()` @@ -445,8 +402,6 @@ Returns the perimeter of the geometry. %Docstring Returns the area of the geometry. -:rtype: float - .. seealso:: :py:func:`length()` .. seealso:: :py:func:`perimeter()` @@ -456,40 +411,31 @@ Returns the area of the geometry. %Docstring Returns the length of the segment of the geometry which begins at ``startVertex``. -:rtype: float - .. versionadded:: 3.0 %End virtual QgsPoint centroid() const; %Docstring Returns the centroid of the geometry - -:rtype: QgsPoint %End virtual bool isEmpty() const; %Docstring Returns true if the geometry is empty - -:rtype: bool %End virtual bool hasCurvedSegments() const; %Docstring Returns true if the geometry contains curved segments - -:rtype: bool %End virtual QgsAbstractGeometry *segmentize( double tolerance = M_PI / 180., SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/; %Docstring Returns a version of the geometry without curves. Caller takes ownership of the returned geometry. + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve - -:rtype: QgsAbstractGeometry %End virtual QgsAbstractGeometry *toCurveType() const = 0 /Factory/; @@ -499,8 +445,6 @@ E.g. QgsLineString -> QgsCompoundCurve, QgsPolygon -> QgsCurvePolygon, QgsMultiLineString -> QgsMultiCurve, QgsMultiPolygon -> QgsMultiSurface :return: the converted geometry. Caller takes ownership -:rtype: QgsAbstractGeometry - %End virtual QgsAbstractGeometry *snappedToGrid( double hSpacing, double vSpacing, double dSpacing = 0, double mSpacing = 0 ) const = 0 /Factory/; @@ -517,13 +461,12 @@ geometry->snappedToGrid(1, 1); \endcode In this case we use a 2D grid of 1x1 to gridify. In this case, it can be thought like rounding the x and y of all the points/vertices to full units (remove all decimals). + :param hSpacing: Horizontal spacing of the grid (x axis). 0 to disable. :param vSpacing: Vertical spacing of the grid (y axis). 0 to disable. :param dSpacing: Depth spacing of the grid (z axis). 0 (default) to disable. :param mSpacing: Custom dimension spacing of the grid (m axis). 0 (default) to disable. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -546,8 +489,6 @@ a multipoint geometry with overlapping points will not be changed by this method The function will return true if nodes were removed, or false if no duplicate nodes were found. -:rtype: bool - .. versionadded:: 3.0 %End @@ -556,33 +497,26 @@ were found. Returns approximate angle at a vertex. This is usually the average angle between adjacent segments, and can be pictured as the orientation of a line following the curvature of the geometry at the specified vertex. + :param vertex: the vertex id :return: rotation in radians, clockwise from north -:rtype: float - %End virtual int vertexCount( int part = 0, int ring = 0 ) const = 0; %Docstring Returns the number of vertices of which this geometry is built. - -:rtype: int %End virtual int ringCount( int part = 0 ) const = 0; %Docstring Returns the number of rings of which this geometry is built. - -:rtype: int %End virtual int partCount() const = 0; %Docstring Returns count of parts contained in the geometry. -:rtype: int - .. seealso:: :py:func:`vertexCount` .. seealso:: :py:func:`ringCount` @@ -591,11 +525,10 @@ Returns count of parts contained in the geometry. virtual bool addZValue( double zValue = 0 ) = 0; %Docstring Adds a z-dimension to the geometry, initialized to a preset value. + :param zValue: initial z-value for all nodes :return: true on success -:rtype: bool - .. versionadded:: 2.12 @@ -607,11 +540,10 @@ Adds a z-dimension to the geometry, initialized to a preset value. virtual bool addMValue( double mValue = 0 ) = 0; %Docstring Adds a measure to the geometry, initialized to a preset value. + :param mValue: initial m-value for all nodes :return: true on success -:rtype: bool - .. versionadded:: 2.12 @@ -625,8 +557,6 @@ Adds a measure to the geometry, initialized to a preset value. Drops any z-dimensions which exist in the geometry. :return: true if Z values were present and have been removed -:rtype: bool - .. seealso:: :py:func:`addZValue()` @@ -640,8 +570,6 @@ Drops any z-dimensions which exist in the geometry. Drops any measure values which exist in the geometry. :return: true if m-values were present and have been removed -:rtype: bool - .. seealso:: :py:func:`addMValue()` @@ -655,8 +583,6 @@ Drops any measure values which exist in the geometry. Converts the geometry to a specified type. :return: true if conversion was successful -:rtype: bool - .. versionadded:: 2.14 %End @@ -666,8 +592,6 @@ Converts the geometry to a specified type. %Docstring Returns Java-style iterator for traversal of vertices of the geometry -:rtype: QgsVertexIterator - .. versionadded:: 3.0 %End @@ -678,8 +602,6 @@ Returns Java-style iterator for traversal of vertices of the geometry Creates a new geometry with the same class and same WKB type as the original and transfers ownership. To create it, the geometry is default constructed and then the WKB is changed. -:rtype: QgsAbstractGeometry - .. seealso:: :py:func:`clone()` .. versionadded:: 3.0 @@ -693,8 +615,6 @@ To create it, the geometry is default constructed and then the WKB is changed. %Docstring Returns whether the geometry has any child geometries (false for point / curve, true otherwise) -:rtype: bool - .. note:: used for vertex_iterator implementation @@ -706,8 +626,6 @@ Returns whether the geometry has any child geometries (false for point / curve, %Docstring Returns number of child geometries (for geometries with child geometries) or child points (for geometries without child geometries - i.e. curve / point) -:rtype: int - .. note:: used for vertex_iterator implementation @@ -719,8 +637,6 @@ Returns number of child geometries (for geometries with child geometries) or chi %Docstring Returns pointer to child geometry (for geometries with child geometries - i.e. geom. collection / polygon) -:rtype: QgsAbstractGeometry - .. note:: used for vertex_iterator implementation @@ -732,8 +648,6 @@ Returns pointer to child geometry (for geometries with child geometries - i.e. g %Docstring Returns point at index (for geometries without child geometries - i.e. curve / point) -:rtype: QgsPoint - .. note:: used for vertex_iterator implementation @@ -752,8 +666,6 @@ Updates the geometry type based on whether sub geometries contain z or m values. %Docstring Default calculator for the minimal bounding box for the geometry. Derived classes should override this method if a more efficient bounding box calculation is available. - -:rtype: QgsRectangle %End virtual void clearCache() const; @@ -777,36 +689,14 @@ struct QgsVertexId bool isValid() const; %Docstring Returns true if the vertex id is valid - -:rtype: bool %End bool operator==( QgsVertexId other ) const; bool operator!=( QgsVertexId other ) const; -%Docstring - -:rtype: bool -%End bool partEqual( QgsVertexId o ) const; -%Docstring - -:rtype: bool -%End bool ringEqual( QgsVertexId o ) const; -%Docstring - -:rtype: bool -%End bool vertexEqual( QgsVertexId o ) const; -%Docstring - -:rtype: bool -%End bool isValid( const QgsAbstractGeometry *geom ) const; -%Docstring - -:rtype: bool -%End int part; int ring; @@ -841,22 +731,14 @@ Constructs iterator for the given geometry bool hasNext() const; %Docstring Find out whether there are more vertices - -:rtype: bool %End QgsPoint next(); %Docstring Return next vertex of the geometry (undefined behavior if hasNext() returns false before calling next()) - -:rtype: QgsPoint %End QgsVertexIterator *__iter__(); -%Docstring - -:rtype: QgsVertexIterator -%End %MethodCode sipRes = sipCpp; %End diff --git a/python/core/geometry/qgsbox3d.sip b/python/core/geometry/qgsbox3d.sip index 7d0659778b47..8b824eefd290 100644 --- a/python/core/geometry/qgsbox3d.sip +++ b/python/core/geometry/qgsbox3d.sip @@ -66,8 +66,6 @@ Sets the maximum ``x`` value. %Docstring Returns the minimum x value. -:rtype: float - .. seealso:: :py:func:`setXMinimum()` .. seealso:: :py:func:`xMaximum()` @@ -77,8 +75,6 @@ Returns the minimum x value. %Docstring Returns the maximum x value. -:rtype: float - .. seealso:: :py:func:`setXMaximum()` .. seealso:: :py:func:`xMinimum()` @@ -106,8 +102,6 @@ Sets the maximum ``y`` value. %Docstring Returns the minimum y value. -:rtype: float - .. seealso:: :py:func:`setYMinimum()` .. seealso:: :py:func:`yMaximum()` @@ -117,8 +111,6 @@ Returns the minimum y value. %Docstring Returns the maximum y value. -:rtype: float - .. seealso:: :py:func:`setYMaximum()` .. seealso:: :py:func:`yMinimum()` @@ -146,8 +138,6 @@ Sets the maximum ``z`` value. %Docstring Returns the minimum z value. -:rtype: float - .. seealso:: :py:func:`setZMinimum()` .. seealso:: :py:func:`zMaximum()` @@ -157,8 +147,6 @@ Returns the minimum z value. %Docstring Returns the maximum z value. -:rtype: float - .. seealso:: :py:func:`setZMaximum()` .. seealso:: :py:func:`zMinimum()` @@ -173,8 +161,6 @@ Normalize the box so it has non-negative width/height/depth. %Docstring Returns the width of the box. -:rtype: float - .. seealso:: :py:func:`height()` .. seealso:: :py:func:`depth()` @@ -184,8 +170,6 @@ Returns the width of the box. %Docstring Returns the height of the box. -:rtype: float - .. seealso:: :py:func:`width()` .. seealso:: :py:func:`depth()` @@ -195,8 +179,6 @@ Returns the height of the box. %Docstring Returns the depth of the box. -:rtype: float - .. seealso:: :py:func:`width()` .. seealso:: :py:func:`height()` @@ -205,37 +187,27 @@ Returns the depth of the box. double volume() const; %Docstring Returns the volume of the box. - -:rtype: float %End QgsBox3d intersect( const QgsBox3d &other ) const; %Docstring Returns the intersection of this box and another 3D box. - -:rtype: QgsBox3d %End bool is2d() const; %Docstring Returns true if the box can be considered a 2-dimensional box, i.e. it has equal minimum and maximum z values. - -:rtype: bool %End bool intersects( const QgsBox3d &other ) const; %Docstring Returns true if box intersects with another box. - -:rtype: bool %End bool contains( const QgsBox3d &other ) const; %Docstring Returns true when box contains other box. - -:rtype: bool %End bool contains( const QgsPoint &point ) const; @@ -244,15 +216,11 @@ Returns true when box contains a ``point``. If the point is a 2D point (no z-coordinate), then the containment test will be performed on the x/y extent of the box only. - -:rtype: bool %End QgsRectangle toRectangle() const; %Docstring Converts the box to a 2D rectangle. - -:rtype: QgsRectangle %End }; diff --git a/python/core/geometry/qgscircle.sip b/python/core/geometry/qgscircle.sip index 4f3e007181f8..ec3f41289426 100644 --- a/python/core/geometry/qgscircle.sip +++ b/python/core/geometry/qgscircle.sip @@ -33,6 +33,7 @@ The azimuth is the north angle to the semi-major axis, in degrees. By default, t QgsCircle( const QgsPoint ¢er, double radius, double azimuth = 0 ); %Docstring Constructs a circle by defining all the members. + :param center: The center of the circle. :param radius: The radius of the circle. :param azimuth: Angle in degrees started from the North to the first quadrant. @@ -44,10 +45,9 @@ Constructs a circle by 2 points on the circle. The center point can have z and m values which are the result from the midpoint operation between ``pt1`` and ``pt2``. The radius is calculated from the 2D distance between ``pt1`` and ``pt2``. The azimuth is the angle between ``pt1`` and ``pt2``. + :param pt1: First point. :param pt2: Second point. - -:rtype: QgsCircle %End static QgsCircle from3Points( const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, double epsilon = 1E-8 ); @@ -56,23 +56,21 @@ Constructs a circle by 3 points on the circle. Z and m values are dropped for the center point. The azimuth always takes the default value. If the points are colinear an empty circle is returned. + :param pt1: First point. :param pt2: Second point. :param pt3: Third point. :param epsilon: Value used to compare point. - -:rtype: QgsCircle %End static QgsCircle fromCenterDiameter( const QgsPoint ¢er, double diameter, double azimuth = 0 ); %Docstring Constructs a circle by a center point and a diameter. The center point keeps z and m values from ``center``. + :param center: Center point. :param diameter: Diameter of the circle. :param azimuth: Azimuth of the circle. - -:rtype: QgsCircle %End @@ -82,10 +80,9 @@ Constructs a circle by a center point and another point. The center point keeps z and m values from ``center``. Axes are calculated from the 2D distance between ``center`` and ``pt1``. The azimuth is the angle between ``center`` and ``pt1``. + :param center: Center point. :param pt1: A point on the circle. - -:rtype: QgsCircle %End @@ -96,6 +93,7 @@ The azimuth is the angle between ``center`` and ``pt1``. Constructs a circle by 3 tangents on the circle (aka inscribed circle of a triangle). Z and m values are dropped for the center point. The azimuth always takes the default value. + :param pt1_tg1: First point of the first tangent. :param pt2_tg1: Second point of the first tangent. :param pt1_tg2: First point of the second tangent. @@ -103,8 +101,6 @@ The azimuth always takes the default value. :param pt1_tg3: First point of the third tangent. :param pt2_tg3: Second point of the third tangent. :param epsilon: Value used to compare point. - -:rtype: QgsCircle %End static QgsCircle fromExtent( const QgsPoint &pt1, const QgsPoint &pt2 ); @@ -113,10 +109,9 @@ Constructs a circle by an extent (aka bounding box / QgsRectangle). The center point can have z and m values which are the result from the midpoint operation between ``pt1`` and ``pt2``. Axes are calculated from the 2D distance between ``pt1`` and ``pt2``. The azimuth always takes the default value. + :param pt1: First corner. :param pt2: Second corner. - -:rtype: QgsCircle %End static QgsCircle minimalCircleFrom3Points( const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, double epsilon = 1E-8 ); @@ -125,12 +120,11 @@ Constructs the smallest circle from 3 points. Z and m values are dropped for the center point. The azimuth always takes the default value. If the points are colinear an empty circle is returned. + :param pt1: First point. :param pt2: Second point. :param pt3: Third point. :param epsilon: Value used to compare point. - -:rtype: QgsCircle %End virtual double area() const; @@ -163,8 +157,6 @@ Inherited method. Use setRadius instead. double radius() const; %Docstring Returns the radius of the circle - -:rtype: float %End void setRadius( double radius ); %Docstring @@ -177,8 +169,6 @@ The four quadrants of the ellipse. They are oriented and started from North. :return: quadrants defined by four points. -:rtype: list of QgsPoint - .. seealso:: :py:func:`quadrant()` %End @@ -186,16 +176,13 @@ They are oriented and started from North. QgsCircularString *toCircularString( bool oriented = false ) const; %Docstring Returns a circular string from the circle. -:param oriented: If oriented is true the start point is from azimuth instead from north. -:rtype: QgsCircularString +:param oriented: If oriented is true the start point is from azimuth instead from north. %End bool contains( const QgsPoint &point, double epsilon = 1E-8 ) const; %Docstring Returns true if the circle contains the ``point``. - -:rtype: bool %End virtual QgsRectangle boundingBox() const; diff --git a/python/core/geometry/qgscircularstring.sip b/python/core/geometry/qgscircularstring.sip index 7885a1a0ca5c..4695d4cfdbaf 100644 --- a/python/core/geometry/qgscircularstring.sip +++ b/python/core/geometry/qgscircularstring.sip @@ -63,8 +63,6 @@ class QgsCircularString: QgsCurve QgsPoint pointN( int i ) const; %Docstring Returns the point at index i within the circular string. - -:rtype: QgsPoint %End virtual void points( QgsPointSequence &pts /Out/ ) const; diff --git a/python/core/geometry/qgscompoundcurve.sip b/python/core/geometry/qgscompoundcurve.sip index 8be73fd7177a..4e9b0c06c684 100644 --- a/python/core/geometry/qgscompoundcurve.sip +++ b/python/core/geometry/qgscompoundcurve.sip @@ -73,10 +73,9 @@ class QgsCompoundCurve: QgsCurve %Docstring Returns a new line string geometry corresponding to a segmentized approximation of the curve. + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve* - -:rtype: QgsLineString %End virtual QgsCompoundCurve *snappedToGrid( double hSpacing, double vSpacing, double dSpacing = 0, double mSpacing = 0 ) const /Factory/; @@ -87,15 +86,11 @@ of the curve. int nCurves() const; %Docstring Returns the number of curves in the geometry. - -:rtype: int %End const QgsCurve *curveAt( int i ) const; %Docstring Returns the curve at the specified index. - -:rtype: QgsCurve %End void addCurve( QgsCurve *c /Transfer/ ); @@ -106,6 +101,7 @@ Adds a curve to the geometry (takes ownership) void removeCurve( int i ); %Docstring Removes a curve from the geometry. + :param i: index of curve to remove %End diff --git a/python/core/geometry/qgscurve.sip b/python/core/geometry/qgscurve.sip index 86388bcdb9be..d8211780f902 100644 --- a/python/core/geometry/qgscurve.sip +++ b/python/core/geometry/qgscurve.sip @@ -30,10 +30,6 @@ Constructor for QgsCurve. virtual bool operator==( const QgsCurve &other ) const = 0; virtual bool operator!=( const QgsCurve &other ) const = 0; -%Docstring - -:rtype: bool -%End virtual QgsCurve *clone() const = 0 /Factory/; @@ -42,8 +38,6 @@ Constructor for QgsCurve. %Docstring Returns the starting point of the curve. -:rtype: QgsPoint - .. seealso:: :py:func:`endPoint` %End @@ -51,36 +45,29 @@ Returns the starting point of the curve. %Docstring Returns the end point of the curve. -:rtype: QgsPoint - .. seealso:: :py:func:`startPoint` %End virtual bool isClosed() const; %Docstring Returns true if the curve is closed. - -:rtype: bool %End virtual bool isRing() const; %Docstring Returns true if the curve is a ring. - -:rtype: bool %End virtual QgsLineString *curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const = 0 /Factory/; %Docstring Returns a new line string geometry corresponding to a segmentized approximation of the curve. + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve Uses a MaximumAngle tolerance of 1 degrees by default (360 segments in a full circle) - -:rtype: QgsLineString %End virtual void addToPainterPath( QPainterPath &path ) const = 0; @@ -91,6 +78,7 @@ Adds a curve to a painter path. virtual void drawAsPolygon( QPainter &p ) const = 0; %Docstring Draws the curve as a polygon on the specified QPainter. + :param p: destination QPainter %End @@ -102,8 +90,6 @@ Returns a list of points within the curve. virtual int numPoints() const = 0; %Docstring Returns the number of points in the curve. - -:rtype: int %End virtual void sumUpArea( double &sum /Out/ ) const = 0; @@ -123,21 +109,18 @@ Sums up the area of the curve by iterating over the vertices (shoelace formula). virtual bool pointAt( int node, QgsPoint &point /Out/, QgsVertexId::VertexType &type /Out/ ) const = 0; %Docstring Returns the point and vertex id of a point within the curve. + :param node: node number, where the first node is 0 :param point: will be set to point at corresponding node in the curve :param type: will be set to the vertex type of the node :return: true if node exists within the curve -:rtype: bool - %End virtual QgsCurve *reversed() const = 0 /Factory/; %Docstring Returns a reversed copy of the curve, where the direction of the curve has been flipped. -:rtype: QgsCurve - .. versionadded:: 2.14 %End @@ -148,10 +131,9 @@ Returns a reversed copy of the curve, where the direction of the curve has been %Docstring Returns a geometry without curves. Caller takes ownership + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve* - -:rtype: QgsCurve %End virtual int vertexCount( int part = 0, int ring = 0 ) const; @@ -171,11 +153,10 @@ Returns a geometry without curves. Caller takes ownership virtual double xAt( int index ) const = 0; %Docstring Returns the x-coordinate of the specified node in the line string. + :param index: index of node, where the first node in the line is 0 :return: x-coordinate of node, or 0.0 if index is out of bounds -:rtype: float - .. seealso:: :py:func:`setXAt()` %End @@ -183,11 +164,10 @@ Returns the x-coordinate of the specified node in the line string. virtual double yAt( int index ) const = 0; %Docstring Returns the y-coordinate of the specified node in the line string. + :param index: index of node, where the first node in the line is 0 :return: y-coordinate of node, or 0.0 if index is out of bounds -:rtype: float - .. seealso:: :py:func:`setYAt()` %End @@ -195,8 +175,6 @@ Returns the y-coordinate of the specified node in the line string. QPolygonF asQPolygonF() const; %Docstring Returns a QPolygonF representing the points. - -:rtype: QPolygonF %End diff --git a/python/core/geometry/qgscurvepolygon.sip b/python/core/geometry/qgscurvepolygon.sip index e2de34c0649d..0fd149ee030c 100644 --- a/python/core/geometry/qgscurvepolygon.sip +++ b/python/core/geometry/qgscurvepolygon.sip @@ -27,10 +27,6 @@ class QgsCurvePolygon: QgsSurface bool operator==( const QgsCurvePolygon &other ) const; bool operator!=( const QgsCurvePolygon &other ) const; -%Docstring - -:rtype: bool -%End ~QgsCurvePolygon(); @@ -73,29 +69,16 @@ class QgsCurvePolygon: QgsSurface int numInteriorRings() const; -%Docstring - -:rtype: int -%End const QgsCurve *exteriorRing() const; -%Docstring - -:rtype: QgsCurve -%End const QgsCurve *interiorRing( int i ) const; -%Docstring - -:rtype: QgsCurve -%End virtual QgsPolygon *toPolygon( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/; %Docstring Returns a new polygon geometry corresponding to a segmentized approximation of the curve. + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve* - -:rtype: QgsPolygon %End virtual void setExteriorRing( QgsCurve *ring /Transfer/ ); @@ -103,6 +86,7 @@ of the curve. Sets the exterior ring of the polygon. The CurvePolygon type will be updated to match the dimensionality of the exterior ring. For instance, setting a 2D exterior ring on a 3D CurvePolygon will drop the z dimension from the CurvePolygon and all interior rings. + :param ring: new exterior ring. Ownership is transferred to the CurvePolygon. .. seealso:: :py:func:`setInteriorRings()` @@ -125,8 +109,6 @@ Removes an interior ring from the polygon. The first interior ring has index 0. The corresponding ring is removed from the polygon and deleted. If a ring was successfully removed the function will return true. It is not possible to remove the exterior ring using this method. -:rtype: bool - .. seealso:: :py:func:`removeInteriorRings()` %End @@ -177,21 +159,19 @@ area will be removed. %Docstring Returns a geometry without curves. Caller takes ownership + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve* - -:rtype: QgsAbstractGeometry %End virtual double vertexAngle( QgsVertexId vertex ) const; %Docstring Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + :param vertex: the vertex id :return: rotation in radians, clockwise from north -:rtype: float - %End virtual int vertexCount( int part = 0, int ring = 0 ) const; diff --git a/python/core/geometry/qgsellipse.sip b/python/core/geometry/qgsellipse.sip index 162135d02432..3cd1da648ce6 100644 --- a/python/core/geometry/qgsellipse.sip +++ b/python/core/geometry/qgsellipse.sip @@ -37,6 +37,7 @@ Constructor for QgsEllipse. QgsEllipse( const QgsPoint ¢er, const double semiMajorAxis, const double semiMinorAxis, const double azimuth = 90 ); %Docstring Constructs an ellipse by defining all the members. + :param center: The center of the ellipse. :param semiMajorAxis: Semi-major axis of the ellipse. :param semiMinorAxis: Semi-minor axis of the ellipse. @@ -49,11 +50,10 @@ Constructs an ellipse by foci (``pt1`` and ``pt2``) and a point ``pt3``. The center point can have z and m values which are the result from the midpoint operation between ``pt1`` and ``pt2``. Axes are calculated from the 2D distance with the third point ``pt3``. The azimuth is the angle between ``pt1`` and ``pt2``. + :param pt1: First focus. :param pt2: Second focus. :param pt3: A point to calculate the axes. - -:rtype: QgsEllipse %End static QgsEllipse fromExtent( const QgsPoint &pt1, const QgsPoint &pt2 ); @@ -62,10 +62,9 @@ Constructs an ellipse by an extent (aka bounding box / QgsRectangle). The center point can have z and m values which are the result from the midpoint operation between ``pt1`` and ``pt2``. Axes are calculated from the 2D distance between ``pt1`` and ``pt2``. The azimuth always takes the default value. + :param pt1: First corner. :param pt2: Second corner. - -:rtype: QgsEllipse %End static QgsEllipse fromCenterPoint( const QgsPoint &ptc, const QgsPoint &pt1 ); @@ -74,10 +73,9 @@ Constructs an ellipse by a center point and a another point. The center point keeps z and m values from ``ptc``. Axes are calculated from the 2D distance between ``ptc`` and ``pt1``. The azimuth always takes the default value. + :param ptc: Center point. :param pt1: First point. - -:rtype: QgsEllipse %End static QgsEllipse fromCenter2Points( const QgsPoint &ptc, const QgsPoint &pt1, const QgsPoint &pt2 ); @@ -86,11 +84,10 @@ Constructs an ellipse by a central point and two other points. The center point keeps z and m values from ``ptc``. Axes are calculated from the 2D distance between ``ptc`` and ``pt1`` and ``pt2``. The azimuth is the angle between ``ptc`` and ``pt1``. + :param ptc: Center point. :param pt1: First point. :param pt2: Second point. - -:rtype: QgsEllipse %End virtual bool operator ==( const QgsEllipse &elp ) const; @@ -99,16 +96,12 @@ The azimuth is the angle between ``ptc`` and ``pt1``. virtual bool isEmpty() const; %Docstring An ellipse is empty if axes are equal to 0 - -:rtype: bool %End QgsPoint center() const; %Docstring Returns the center point. -:rtype: QgsPoint - .. seealso:: :py:func:`setCenter()` .. seealso:: :py:func:`rcenter()` @@ -118,8 +111,6 @@ Returns the center point. %Docstring Returns the semi-major axis. -:rtype: float - .. seealso:: :py:func:`setSemiMajorAxis()` %End @@ -127,8 +118,6 @@ Returns the semi-major axis. %Docstring Returns the semi-minor axis. -:rtype: float - .. seealso:: :py:func:`setSemiMinorAxis()` %End @@ -136,8 +125,6 @@ Returns the semi-minor axis. %Docstring Returns the azimuth. -:rtype: float - .. seealso:: :py:func:`setAzimuth()` %End @@ -176,8 +163,6 @@ Sets the azimuth (orientation). %Docstring The distance between the center and each foci. -:rtype: float - .. seealso:: :py:func:`fromFoci()` .. seealso:: :py:func:`foci()` @@ -189,8 +174,6 @@ The distance between the center and each foci. %Docstring Two foci of the ellipse. The axes are oriented by the azimuth and are on the semi-major axis. -:rtype: list of QgsPoint - .. seealso:: :py:func:`fromFoci()` .. seealso:: :py:func:`focusDistance()` @@ -202,20 +185,14 @@ Two foci of the ellipse. The axes are oriented by the azimuth and are on the sem %Docstring The eccentricity of the ellipse. nan is returned if the ellipse is empty. - -:rtype: float %End virtual double area() const; %Docstring The area of the ellipse. - -:rtype: float %End virtual double perimeter() const; %Docstring The circumference of the ellipse using first approximation of Ramanujan. - -:rtype: float %End virtual QVector quadrant() const; @@ -224,54 +201,43 @@ The four quadrants of the ellipse. They are oriented and started always from semi-major axis. :return: quadrants defined by four points. -:rtype: list of QgsPoint - %End virtual QgsPointSequence points( unsigned int segments = 36 ) const; %Docstring Returns a list of points with segmentation from ``segments``. -:param segments: Number of segments used to segment geometry. -:rtype: QgsPointSequence +:param segments: Number of segments used to segment geometry. %End virtual QgsPolygon *toPolygon( unsigned int segments = 36 ) const /Factory/; %Docstring Returns a segmented polygon. -:param segments: Number of segments used to segment geometry. -:rtype: QgsPolygon +:param segments: Number of segments used to segment geometry. %End virtual QgsLineString *toLineString( unsigned int segments = 36 ) const /Factory/; %Docstring Returns a segmented linestring. -:param segments: Number of segments used to segment geometry. -:rtype: QgsLineString +:param segments: Number of segments used to segment geometry. %End virtual QgsPolygon *orientedBoundingBox() const /Factory/; %Docstring Returns the oriented minimal bounding box for the ellipse. - -:rtype: QgsPolygon %End virtual QgsRectangle boundingBox() const; %Docstring Returns the minimal bounding box for the ellipse. - -:rtype: QgsRectangle %End virtual QString toString( int pointPrecision = 17, int axisPrecision = 17, int azimuthPrecision = 2 ) const; %Docstring returns a string representation of the ellipse. Members will be truncated to the specified precision. - -:rtype: str %End protected: diff --git a/python/core/geometry/qgsgeometry.sip b/python/core/geometry/qgsgeometry.sip index 99cfdf89b3ec..a50919033e18 100644 --- a/python/core/geometry/qgsgeometry.sip +++ b/python/core/geometry/qgsgeometry.sip @@ -94,8 +94,6 @@ Returns a non-modifiable (const) reference to the underlying abstract geometry p This is much faster then calling the non-const get() method. -:rtype: QgsAbstractGeometry - .. note:: In QGIS 2.x this method was named geometry(). @@ -114,8 +112,6 @@ Returns a modifiable (non-const) reference to the underlying abstract geometry p This method can be slow to call, as it may trigger a detachment of the geometry and a deep copy. Where possible, use constGet() instead. -:rtype: QgsAbstractGeometry - .. note:: In QGIS 2.x this method was named geometry(). @@ -147,8 +143,6 @@ Sets the underlying geometry store. Ownership of geometry is transferred. Returns true if the geometry is null (ie, contains no underlying geometry accessible via geometry() ). -:rtype: bool - .. seealso:: :py:func:`geometry` .. versionadded:: 2.10 @@ -159,20 +153,14 @@ accessible via geometry() ). static QgsGeometry fromWkt( const QString &wkt ); %Docstring Creates a new geometry from a WKT string - -:rtype: QgsGeometry %End static QgsGeometry fromPointXY( const QgsPointXY &point ); %Docstring Creates a new geometry from a QgsPointXY object - -:rtype: QgsGeometry %End static QgsGeometry fromMultiPointXY( const QgsMultiPointXY &multipoint ); %Docstring Creates a new geometry from a QgsMultiPointXY object - -:rtype: QgsGeometry %End static QgsGeometry fromPolylineXY( const QgsPolylineXY &polyline ); @@ -182,8 +170,6 @@ Creates a new LineString geometry from a list of QgsPointXY points. Using fromPolyline() is preferred, as fromPolyline() is more efficient and will respect any Z or M dimensions present in the input points. -:rtype: QgsGeometry - .. note:: In QGIS 2.x this method was available as fromPolyline(). @@ -201,40 +187,28 @@ This method will respect any Z or M dimensions present in the input points. E.g. if input points are PointZ type, the resultant linestring will be a LineStringZ type. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End static QgsGeometry fromMultiPolylineXY( const QgsMultiPolylineXY &multiline ); %Docstring Creates a new geometry from a QgsMultiPolylineXY object - -:rtype: QgsGeometry %End static QgsGeometry fromPolygonXY( const QgsPolygonXY &polygon ); %Docstring Creates a new geometry from a QgsPolygon - -:rtype: QgsGeometry %End static QgsGeometry fromMultiPolygonXY( const QgsMultiPolygonXY &multipoly ); %Docstring Creates a new geometry from a QgsMultiPolygon - -:rtype: QgsGeometry %End static QgsGeometry fromRect( const QgsRectangle &rect ); %Docstring Creates a new geometry from a QgsRectangle - -:rtype: QgsGeometry %End static QgsGeometry collectGeometry( const QVector &geometries ); %Docstring Creates a new multipart geometry from a list of QgsGeometry objects - -:rtype: QgsGeometry %End @@ -251,8 +225,6 @@ Set the geometry, feeding in the buffer containing OGC Well-Known Binary %Docstring Returns type of the geometry as a WKB type (point / linestring / polygon etc.) -:rtype: QgsWkbTypes.Type - .. seealso:: :py:func:`type` %End @@ -260,8 +232,6 @@ Returns type of the geometry as a WKB type (point / linestring / polygon etc.) %Docstring Returns type of the geometry as a QgsWkbTypes.GeometryType -:rtype: QgsWkbTypes.GeometryType - .. seealso:: :py:func:`wkbType` %End @@ -271,24 +241,18 @@ Returns true if the geometry is empty (eg a linestring with no vertices, or a collection with no geometries). A null geometry will always return true for isEmpty(). -:rtype: bool - .. seealso:: :py:func:`isNull()` %End bool isMultipart() const; %Docstring Returns true if WKB of the geometry is of WKBMulti* type - -:rtype: bool %End bool isGeosEqual( const QgsGeometry & ) const; %Docstring Compares the geometry with another geometry using GEOS -:rtype: bool - .. versionadded:: 1.5 %End @@ -296,8 +260,6 @@ Compares the geometry with another geometry using GEOS %Docstring Checks validity of the geometry using GEOS -:rtype: bool - .. versionadded:: 1.5 %End @@ -307,8 +269,6 @@ Determines whether the geometry is simple (according to OGC definition), i.e. it has no anomalous geometric points, such as self-intersection or self-tangency. Uses GEOS library for the test. -:rtype: bool - .. note:: This is useful mainly for linestrings and linear rings. Polygons are simple by definition, @@ -321,8 +281,6 @@ for checking anomalies in polygon geometries one can use isGeosValid(). %Docstring Returns the area of the geometry using GEOS -:rtype: float - .. versionadded:: 1.5 %End @@ -330,8 +288,6 @@ Returns the area of the geometry using GEOS %Docstring Returns the length of geometry using GEOS -:rtype: float - .. versionadded:: 1.5 %End @@ -341,8 +297,6 @@ Returns the minimum distance between this geometry and another geometry, using G Will return a negative value if a geometry is missing. :param geom: geometry to find minimum distance to - -:rtype: float %End @@ -350,8 +304,6 @@ Will return a negative value if a geometry is missing. %Docstring Returns Java-style iterator for traversal of vertices of the geometry -:rtype: QgsVertexIterator - .. versionadded:: 3.0 %End @@ -370,8 +322,6 @@ If the default approximate provided by this method is insufficient, use hausdorf In case of error -1 will be returned. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`hausdorffDistanceDensify()` @@ -393,27 +343,20 @@ distance returned approach the true Hausdorff distance for the geometries. In case of error -1 will be returned. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`hausdorffDistance()` %End QgsPointXY closestVertex( const QgsPointXY &point, int &atVertex /Out/, int &beforeVertex /Out/, int &afterVertex /Out/, double &sqrDist /Out/ ) const; -%Docstring - -:rtype: QgsPointXY -%End double distanceToVertex( int vertex ) const; %Docstring Returns the distance along this geometry from its first vertex to the specified vertex. + :param vertex: vertex index to calculate distance to :return: distance to vertex (following geometry), or -1 for invalid vertex numbers -:rtype: float - .. versionadded:: 2.16 %End @@ -421,11 +364,10 @@ Returns the distance along this geometry from its first vertex to the specified double angleAtVertex( int vertex ) const; %Docstring Returns the bisector angle for this geometry at the specified vertex. + :param vertex: vertex index to calculate bisector angle at :return: bisector angle, in radians clockwise from north -:rtype: float - .. versionadded:: 3.0 @@ -458,8 +400,6 @@ on this geometry (including if this geometry is a Point). It is up to the caller to distinguish between these error conditions. (Or maybe we add another method to this object to help make the distinction?) - -:rtype: bool %End bool insertVertex( const QgsPoint &point, int beforeVertex ); @@ -474,8 +414,6 @@ on this geometry (including if this geometry is a Point). It is up to the caller to distinguish between these error conditions. (Or maybe we add another method to this object to help make the distinction?) - -:rtype: bool %End bool moveVertex( double x, double y, int atVertex ); @@ -485,8 +423,6 @@ and item (first number is index 0) to the given coordinates. Returns false if atVertex does not correspond to a valid vertex on this geometry - -:rtype: bool %End bool moveVertex( const QgsPoint &p, int atVertex ); @@ -496,8 +432,6 @@ and item (first number is index 0) to the given coordinates. Returns false if atVertex does not correspond to a valid vertex on this geometry - -:rtype: bool %End bool deleteVertex( int atVertex ); @@ -506,8 +440,6 @@ Deletes the vertex at the given position number and item (first number is index 0) :return: false if atVertex does not correspond to a valid vertex -:rtype: bool - on this geometry (including if this geometry is a Point), or if the number of remaining vertices in the linestring would be less than two. @@ -519,11 +451,10 @@ object to help make the distinction?) QgsPoint vertexAt( int atVertex ) const; %Docstring Returns coordinates of a vertex. + :param atVertex: index of the vertex :return: Coordinates of the vertex or QgsPoint(0,0) on error -:rtype: QgsPoint - %End double sqrDistToVertexAt( QgsPointXY &point /In/, int atVertex ) const; @@ -531,16 +462,12 @@ Returns coordinates of a vertex. Returns the squared Cartesian distance between the given point to the given vertex index (vertex at the given position number, ring and item (first number is index 0)) - -:rtype: float %End QgsGeometry nearestPoint( const QgsGeometry &other ) const; %Docstring Returns the nearest point on this geometry to another geometry. -:rtype: QgsGeometry - .. versionadded:: 2.14 .. seealso:: :py:func:`shortestLine()` @@ -550,8 +477,6 @@ Returns the nearest point on this geometry to another geometry. %Docstring Returns the shortest line joining this geometry to another geometry. -:rtype: QgsGeometry - .. versionadded:: 2.14 .. seealso:: :py:func:`nearestPoint()` @@ -560,17 +485,17 @@ Returns the shortest line joining this geometry to another geometry. double closestVertexWithContext( const QgsPointXY &point, int &atVertex /Out/ ) const; %Docstring Searches for the closest vertex in this geometry to the given point. + :param point: Specifiest the point for search :param atVertex: Receives index of the closest vertex :return: The squared Cartesian distance is also returned in sqrDist, negative number on error -:rtype: float - %End double closestSegmentWithContext( const QgsPointXY &point, QgsPointXY &minDistPoint /Out/, int &afterVertex /Out/, int *leftOf /Out/ = 0, double epsilon = DEFAULT_SEGMENT_EPSILON ) const; %Docstring Searches for the closest segment of geometry to the given point + :param point: Specifies the point for search :param minDistPoint: Receives the nearest point on the segment :param afterVertex: Receives index of the vertex after the closest segment. The vertex @@ -580,61 +505,54 @@ that the test was unsuccessful, e.g. for a point exactly on the line) :param epsilon: epsilon for segment snapping :return: The squared Cartesian distance is also returned in sqrDist, negative number on error -:rtype: float - %End OperationResult addRing( const QVector &ring ); %Docstring Adds a new ring to this geometry. This makes only sense for polygon and multipolygons. + :param ring: The ring to be added :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult addRing( QgsCurve *ring /Transfer/ ); %Docstring Adds a new ring to this geometry. This makes only sense for polygon and multipolygons. + :param ring: The ring to be added :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult addPart( const QVector &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry ) /PyName=addPointsXY/; %Docstring Adds a new part to a the geometry. + :param points: points describing part to add :param geomType: default geometry type to create if no existing geometry :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult addPart( const QgsPointSequence &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry ) /PyName=addPoints/; %Docstring Adds a new part to a the geometry. + :param points: points describing part to add :param geomType: default geometry type to create if no existing geometry :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult addPart( QgsAbstractGeometry *part /Transfer/, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry ); %Docstring Adds a new part to this geometry. + :param part: part to add (ownership is transferred) :param geomType: default geometry type to create if no existing geometry :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End @@ -643,8 +561,6 @@ Adds a new part to this geometry. Adds a new island polygon to a multipolygon feature :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - .. note:: @@ -657,8 +573,6 @@ Removes the interior rings from a (multi)polygon geometry. If the minimumAllowed parameter is specified then only rings smaller than this minimum area will be removed. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -667,8 +581,6 @@ area will be removed. Translates this geometry by dx, dy, dz and dm. :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult transform( const QgsCoordinateTransform &ct ); @@ -676,8 +588,6 @@ Translates this geometry by dx, dy, dz and dm. Transforms this geometry as described by CoordinateTransform ct :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult transform( const QTransform &t, double zTranslate = 0.0, double zScale = 1.0, double mTranslate = 0.0, double mScale = 1.0 ); @@ -688,32 +598,28 @@ Optionally, the geometry's z values can be scaled via ``zScale`` and translated Similarly, m-values can be scaled via ``mScale`` and translated via ``mTranslate``. :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult rotate( double rotation, const QgsPointXY ¢er ); %Docstring Rotate this geometry around the Z axis + :param rotation: clockwise rotation in degrees :param center: rotation center :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult splitGeometry( const QVector &splitLine, QVector &newGeometries /Out/, bool topological, QVector &topologyTestPoints /Out/ ); %Docstring Splits this geometry according to a given line. + :param splitLine: the line that splits the geometry \param[out] newGeometries list of new geometries that have been created with the split :param topological: true if topological editing is enabled \param[out] topologyTestPoints points that need to be tested for topological completeness in the dataset :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End OperationResult reshapeGeometry( const QgsLineString &reshapeLineString ); @@ -721,8 +627,6 @@ Splits this geometry according to a given line. Replaces a part of this geometry with another line :return: OperationResult a result code: success or reason of failure -:rtype: OperationResult - %End @@ -730,11 +634,10 @@ Replaces a part of this geometry with another line %Docstring Returns the geometry formed by modifying this geometry such that it does not intersect the other geometry. + :param other: geometry that should not be intersect :return: difference geometry, or empty geometry if difference could not be calculated -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -743,8 +646,6 @@ intersect the other geometry. %Docstring Returns the bounding box of the geometry. -:rtype: QgsRectangle - .. seealso:: :py:func:`orientedMinimumBoundingBox()` %End @@ -754,8 +655,6 @@ Returns the oriented minimum bounding box for the geometry, which is the smalles rotated rectangle which fully encompasses the geometry. The area, angle (clockwise in degrees from North), width and height of the rotated bounding box will also be returned. -:rtype: QgsGeometry - .. versionadded:: 3.0 .. seealso:: :py:func:`boundingBox()` @@ -765,11 +664,10 @@ width and height of the rotated bounding box will also be returned. QgsGeometry minimalEnclosingCircle( QgsPointXY ¢er /Out/, double &radius /Out/, unsigned int segments = 36 ) const; %Docstring Returns the minimal enclosing circle for the geometry. + :param center: Center of the minimal enclosing circle returneds :param radius: Radius of the minimal enclosing circle returned -:rtype: QgsGeometry - .. seealso:: :py:func:`QgsEllipse.toPolygon()` .. versionadded:: 3.0 @@ -784,8 +682,6 @@ either the vertices are within a specified tolerance of right angles or a set nu iterations is reached. The angle threshold parameter specifies how close to a right angle or straight line an angle must be before it is attempted to be straightened. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -796,13 +692,12 @@ Returns a new geometry with all points or vertices snapped to the closest point If the gridified geometry could not be calculated (or was totally collapsed) an empty geometry will be returned. Note that snapping to grid may generate an invalid geometry in some corner cases. It can also be thought as rounding the edges and it may be useful for removing errors. + :param hSpacing: Horizontal spacing of the grid (x axis). 0 to disable. :param vSpacing: Vertical spacing of the grid (y axis). 0 to disable. :param dSpacing: Depth spacing of the grid (z axis). 0 (default) to disable. :param mSpacing: Custom dimension spacing of the grid (m axis). 0 (default) to disable. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -825,38 +720,28 @@ a multipoint geometry with overlapping points will not be changed by this method The function will return true if nodes were removed, or false if no duplicate nodes were found. -:rtype: bool - .. versionadded:: 3.0 %End bool intersects( const QgsRectangle &r ) const; %Docstring Tests for intersection with a rectangle (uses GEOS) - -:rtype: bool %End bool intersects( const QgsGeometry &geometry ) const; %Docstring Tests for intersection with a geometry (uses GEOS) - -:rtype: bool %End bool contains( const QgsPointXY *p ) const; %Docstring Tests for containment of a point (uses GEOS) - -:rtype: bool %End bool contains( const QgsGeometry &geometry ) const; %Docstring Tests for if geometry is contained in another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -864,8 +749,6 @@ Tests for if geometry is contained in another (uses GEOS) %Docstring Tests for if geometry is disjoint of another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -873,8 +756,6 @@ Tests for if geometry is disjoint of another (uses GEOS) %Docstring Test for if geometry equals another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -882,8 +763,6 @@ Test for if geometry equals another (uses GEOS) %Docstring Test for if geometry touch another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -891,8 +770,6 @@ Test for if geometry touch another (uses GEOS) %Docstring Test for if geometry overlaps another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -900,8 +777,6 @@ Test for if geometry overlaps another (uses GEOS) %Docstring Test for if geometry is within another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -909,8 +784,6 @@ Test for if geometry is within another (uses GEOS) %Docstring Test for if geometry crosses another (uses GEOS) -:rtype: bool - .. versionadded:: 1.5 %End @@ -938,34 +811,30 @@ Test for if geometry crosses another (uses GEOS) %Docstring Returns a buffer region around this geometry having the given width and with a specified number of segments used to approximate curves - -:rtype: QgsGeometry %End QgsGeometry buffer( double distance, int segments, EndCapStyle endCapStyle, JoinStyle joinStyle, double miterLimit ) const; %Docstring Returns a buffer region around the geometry, with additional style options. + :param distance: buffer distance :param segments: for round joins, number of segments to approximate quarter-circle :param endCapStyle: end cap style :param joinStyle: join style for corners in geometry :param miterLimit: limit on the miter ratio used for very sharp corners (JoinStyleMiter only) -:rtype: QgsGeometry - .. versionadded:: 2.4 %End QgsGeometry offsetCurve( double distance, int segments, JoinStyle joinStyle, double miterLimit ) const; %Docstring Returns an offset line at a given distance and side from an input line. + :param distance: buffer distance :param segments: for round joins, number of segments to approximate quarter-circle :param joinStyle: join style for corners in geometry :param miterLimit: limit on the miter ratio used for very sharp corners (JoinStyleMiter only) -:rtype: QgsGeometry - .. versionadded:: 2.4 %End @@ -975,6 +844,7 @@ Returns an offset line at a given distance and side from an input line. %Docstring Returns a single sided buffer for a (multi)line geometry. The buffer is only applied to one side of the line. + :param distance: buffer distance :param segments: for round joins, number of segments to approximate quarter-circle :param side: side of geometry to buffer @@ -982,8 +852,6 @@ applied to one side of the line. :param miterLimit: limit on the miter ratio used for very sharp corners :return: buffered geometry, or an empty geometry if buffer could not be -:rtype: QgsGeometry - calculated .. versionadded:: 3.0 @@ -995,16 +863,12 @@ Extends a (multi)line geometry by extrapolating out the start or end of the line by a specified distance. Lines are extended using the bearing of the first or last segment in the line. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End QgsGeometry simplify( double tolerance ) const; %Docstring Returns a simplified version of this geometry using a specified tolerance value - -:rtype: QgsGeometry %End QgsGeometry densifyByCount( int extraNodesPerSegment ) const; @@ -1015,8 +879,6 @@ If the geometry has z or m values present then these will be linearly interpolat at the added nodes. Curved geometry types are automatically segmentized by this routine. -:rtype: QgsGeometry - .. versionadded:: 3.0 .. seealso:: :py:func:`densifyByDistance()` @@ -1035,8 +897,6 @@ If the geometry has z or m values present then these will be linearly interpolat at the added nodes. Curved geometry types are automatically segmentized by this routine. -:rtype: QgsGeometry - .. versionadded:: 3.0 .. seealso:: :py:func:`densifyByCount()` @@ -1051,8 +911,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. -:rtype: QgsGeometry - .. note:: for line based geometries, the center point of the line is returned, @@ -1074,8 +932,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. -:rtype: QgsGeometry - .. seealso:: :py:func:`centroid()` .. seealso:: :py:func:`poleOfInaccessibility()` @@ -1091,8 +947,6 @@ tolerance. More precise tolerances require more iterations and will take longer to calculate. Optionally, the distance to the polygon boundary from the pole can be stored. -:rtype: QgsGeometry - .. seealso:: :py:func:`centroid()` .. seealso:: :py:func:`pointOnSurface()` @@ -1108,8 +962,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. - -:rtype: QgsGeometry %End QgsGeometry voronoiDiagram( const QgsGeometry &extent = QgsGeometry(), double tolerance = 0.0, bool edgesOnly = false ) const; @@ -1127,8 +979,6 @@ If ``edgesOnly`` is true than line string boundary geometries will be returned instead of polygons. An empty geometry will be returned if the diagram could not be calculated. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -1141,8 +991,6 @@ If ``edgesOnly`` is true than line string boundary geometries will be returned instead of polygons. An empty geometry will be returned if the diagram could not be calculated. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -1164,8 +1012,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -1178,8 +1024,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. -:rtype: QgsGeometry - .. versionadded:: 2.0 .. seealso:: :py:func:`lineLocatePoint()` @@ -1191,11 +1035,10 @@ Returns a distance representing the location along this linestring of the closes on this linestring geometry to the specified point. Ie, the returned value indicates how far along this linestring you need to traverse to get to the closest location where this linestring comes to the specified point. + :param point: point to seek proximity to :return: distance along line, or -1 on error -:rtype: float - .. note:: @@ -1212,9 +1055,8 @@ Returns the angle parallel to the linestring or polygon boundary at the specifie along the geometry. Angles are in radians, clockwise from north. If the distance coincides precisely at a node then the average angle from the segment either side of the node is returned. -:param distance: distance along geometry -:rtype: float +:param distance: distance along geometry .. versionadded:: 3.0 @@ -1229,8 +1071,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. - -:rtype: QgsGeometry %End QgsGeometry clipped( const QgsRectangle &rectangle ); @@ -1240,8 +1080,6 @@ Clips the geometry using the specified ``rectangle``. Performs a fast, non-robust intersection between the geometry and a ``rectangle``. The returned geometry may be invalid. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -1255,8 +1093,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. -:rtype: QgsGeometry - .. note:: this operation is not called union since its a reserved word in C++. @@ -1268,8 +1104,6 @@ Merges any connected lines in a LineString/MultiLineString geometry and converts them to single line strings. :return: a LineString or MultiLineString geometry, with any connected lines -:rtype: QgsGeometry - joined. An empty geometry will be returned if the input geometry was not a MultiLineString geometry. @@ -1284,8 +1118,6 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. - -:rtype: QgsGeometry %End QgsGeometry symDifference( const QgsGeometry &geometry ) const; @@ -1296,23 +1128,17 @@ If the input is a NULL geometry, the output will also be a NULL geometry. If an error was encountered while creating the result, more information can be retrieved by calling `error()` on the returned geometry. - -:rtype: QgsGeometry %End QgsGeometry extrude( double x, double y ); %Docstring Returns an extruded version of this geometry. - -:rtype: QgsGeometry %End QByteArray asWkb() const; %Docstring Export the geometry to WKB -:rtype: QByteArray - .. versionadded:: 3.0 %End @@ -1320,8 +1146,6 @@ Export the geometry to WKB %Docstring Exports the geometry to WKT -:rtype: str - .. note:: precision parameter added in QGIS 2.4 @@ -1332,19 +1156,16 @@ Exports the geometry to WKT QString asJson( int precision = 17 ) const; %Docstring Exports the geometry to a GeoJSON string. - -:rtype: str %End QgsGeometry convertToType( QgsWkbTypes::GeometryType destType, bool destMultipart = false ) const /Factory/; %Docstring Try to convert the geometry to the requested type + :param destType: the geometry type to be converted to :param destMultipart: determines if the output geometry will be multipart or not :return: the converted geometry or None if the conversion fails. -:rtype: QgsGeometry - .. versionadded:: 2.2 %End @@ -1354,56 +1175,42 @@ Try to convert the geometry to the requested type %Docstring Returns contents of the geometry as a point if wkbType is WKBPoint, otherwise returns [0,0] - -:rtype: QgsPointXY %End QgsPolylineXY asPolyline() const; %Docstring Returns contents of the geometry as a polyline if wkbType is WKBLineString, otherwise an empty list - -:rtype: QgsPolylineXY %End QgsPolygonXY asPolygon() const; %Docstring Returns contents of the geometry as a polygon if wkbType is WKBPolygon, otherwise an empty list - -:rtype: QgsPolygonXY %End QgsMultiPointXY asMultiPoint() const; %Docstring Returns contents of the geometry as a multi point if wkbType is WKBMultiPoint, otherwise an empty list - -:rtype: QgsMultiPointXY %End QgsMultiPolylineXY asMultiPolyline() const; %Docstring Returns contents of the geometry as a multi linestring if wkbType is WKBMultiLineString, otherwise an empty list - -:rtype: QgsMultiPolylineXY %End QgsMultiPolygonXY asMultiPolygon() const; %Docstring Returns contents of the geometry as a multi polygon if wkbType is WKBMultiPolygon, otherwise an empty list - -:rtype: QgsMultiPolygonXY %End QVector asGeometryCollection() const; %Docstring Return contents of the geometry as a list of geometries -:rtype: list of QgsGeometry - .. versionadded:: 1.1 %End @@ -1412,8 +1219,6 @@ Return contents of the geometry as a list of geometries Returns contents of the geometry as a QPointF if wkbType is WKBPoint, otherwise returns a null QPointF. -:rtype: QPointF - .. versionadded:: 2.7 %End @@ -1423,8 +1228,6 @@ Returns contents of the geometry as a QPolygonF. If geometry is a linestring, then the result will be an open QPolygonF. If the geometry is a polygon, then the result will be a closed QPolygonF of the geometry's exterior ring. -:rtype: QPolygonF - .. versionadded:: 2.7 %End @@ -1434,8 +1237,6 @@ Deletes a ring in polygon or multipolygon. Ring 0 is outer ring and can't be deleted. :return: true on success -:rtype: bool - .. versionadded:: 1.2 %End @@ -1445,8 +1246,6 @@ Ring 0 is outer ring and can't be deleted. Deletes part identified by the part number :return: true on success -:rtype: bool - .. versionadded:: 1.2 %End @@ -1459,8 +1258,6 @@ If it is already a multipart geometry, it will return true and not change the geometry. :return: true in case of success and false else -:rtype: bool - %End bool convertToSingleType(); @@ -1472,8 +1269,6 @@ If it is already a single part geometry, it will return true and not change the geometry. :return: true in case of success and false else -:rtype: bool - %End int avoidIntersections( const QList &avoidIntersectionsLayers ); @@ -1482,11 +1277,10 @@ not change the geometry. Modifies geometry to avoid intersections with the layers specified in project properties :return: 0 in case of success, -:rtype: int - 1 if geometry is not of polygon type, 2 if avoid intersection would change the geometry type, 3 other error during intersection removal + :param avoidIntersectionsLayers: list of layers to check for intersections :param ignoreFeatures: possibility to give a list of features where intersections should be ignored (not available in Python bindings) @@ -1507,8 +1301,6 @@ If an error was encountered during the process, more information can be retrieve by calling `error()` on the returned geometry. :return: new valid QgsGeometry or null geometry on error -:rtype: QgsGeometry - .. note:: @@ -1531,20 +1323,8 @@ by calling `error()` on the returned geometry. Error( const QString &m, const QgsPointXY &p ); QString what(); -%Docstring - -:rtype: str -%End QgsPointXY where(); -%Docstring - -:rtype: QgsPointXY -%End bool hasWhere(); -%Docstring - -:rtype: bool -%End }; enum ValidationMethod @@ -1571,8 +1351,6 @@ The ``method`` argument dictates which validator to utilize. Compute the unary union on a list of ``geometries``. May be faster than an iterative union on a set of geometries. The returned geometry will be fully noded, i.e. a node will be created at every common intersection of the input geometries. An empty geometry will be returned in the case of errors. - -:rtype: QgsGeometry %End static QgsGeometry polygonize( const QVector &geometries ); @@ -1583,8 +1361,6 @@ at every common intersection of the geometries). The easiest way to ensure this call unaryUnion() on the set of input geometries and then pass the result to polygonize(). An empty geometry will be returned in the case of errors. -:rtype: QgsGeometry - .. versionadded:: 3.0 %End @@ -1602,8 +1378,6 @@ Converts the geometry to straight line segments, if it is a curved geometry type Returns true if the geometry is a curved geometry type which requires conversion to display as straight line segments. -:rtype: bool - .. versionadded:: 2.10 .. seealso:: :py:func:`convertToStraightSegment` @@ -1612,6 +1386,7 @@ display as straight line segments. void mapToPixel( const QgsMapToPixel &mtp ); %Docstring Transforms the geometry from map units to pixels in place. + :param mtp: map to pixel transform .. versionadded:: 2.10 @@ -1620,6 +1395,7 @@ Transforms the geometry from map units to pixels in place. void draw( QPainter &p ) const; %Docstring Draws the geometry onto a QPainter + :param p: destination QPainter .. versionadded:: 2.10 @@ -1633,8 +1409,6 @@ If a matching vertex was found, it will be stored in ``id``. Returns true if vertex was found. -:rtype: bool - .. versionadded:: 2.10 .. seealso:: :py:func:`vertexNrFromVertexId()` @@ -1649,8 +1423,6 @@ to the first vertex. Returns -1 if a corresponding vertex could not be found. -:rtype: int - .. versionadded:: 2.10 .. seealso:: :py:func:`vertexIdFromVertexNr()` @@ -1662,8 +1434,6 @@ Returns an error string referring to the last error encountered either when this geometry was created or when an operation was performed on the geometry. -:rtype: str - .. versionadded:: 3.0 %End @@ -1671,9 +1441,8 @@ was performed on the geometry. static QgsGeometry fromQPointF( QPointF point ); %Docstring Construct geometry from a QPointF -:param point: source QPointF -:rtype: QgsGeometry +:param point: source QPointF .. versionadded:: 2.7 %End @@ -1683,9 +1452,8 @@ Construct geometry from a QPointF Construct geometry from a QPolygonF. If the polygon is closed than the resultant geometry will be a polygon, if it is open than the geometry will be a polyline. -:param polygon: source QPolygonF -:rtype: QgsGeometry +:param polygon: source QPolygonF .. versionadded:: 2.7 %End @@ -1693,11 +1461,10 @@ geometry will be a polyline. static QgsPolylineXY createPolylineFromQPolygonF( const QPolygonF &polygon ) /Factory/; %Docstring Creates a QgsPolylineXY from a QPolygonF. + :param polygon: source polygon :return: QgsPolylineXY -:rtype: QgsPolylineXY - .. seealso:: :py:func:`createPolygonFromQPolygonF` %End @@ -1705,11 +1472,10 @@ Creates a QgsPolylineXY from a QPolygonF. static QgsPolygonXY createPolygonFromQPolygonF( const QPolygonF &polygon ) /Factory/; %Docstring Creates a QgsPolygonXYfrom a QPolygonF. + :param polygon: source polygon :return: QgsPolygon -:rtype: QgsPolygonXY - .. seealso:: :py:func:`createPolylineFromQPolygonF` %End @@ -1720,13 +1486,12 @@ Creates a QgsPolygonXYfrom a QPolygonF. Compares two geometry objects for equality within a specified tolerance. The objects can be of type QgsPolylineXY, QgsPolygonXYor QgsMultiPolygon. The 2 types should match. + :param p1: first geometry object :param p2: second geometry object :param epsilon: maximum difference for coordinates between the objects :return: true if objects are -:rtype: bool - - polylines and have the same number of points and all points are equal within the specified tolerance - polygons and have the same number of points and all @@ -1840,6 +1605,7 @@ tolerance %Docstring Smooths a geometry by rounding off corners using the Chaikin algorithm. This operation roughly doubles the number of vertices in a geometry. + :param iterations: number of smoothing iterations to run. More iterations results in a smoother geometry :param offset: fraction of line to create new vertices along, between 0 and 1.0, @@ -1848,21 +1614,18 @@ of the geometry for each iteration. Smaller values result in "tighter" smoothing :param minimumDistance: minimum segment length to apply smoothing to :param maxAngle: maximum angle at node (0-180) at which smoothing will be applied -:rtype: QgsGeometry - .. versionadded:: 2.9 %End static QgsGeometryEngine *createGeometryEngine( const QgsAbstractGeometry *geometry ) /Factory/; %Docstring Creates and returns a new geometry engine - -:rtype: QgsGeometryEngine %End static void convertPointList( const QVector &input, QgsPointSequence &output ); %Docstring Upgrades a point list from QgsPointXY to QgsPoint + :param input: list of QgsPointXY objects to be upgraded :param output: destination for list of points converted to QgsPoint %End @@ -1870,6 +1633,7 @@ Upgrades a point list from QgsPointXY to QgsPoint static void convertPointList( const QgsPointSequence &input, QVector &output ); %Docstring Downgrades a point list from QgsPoint to QgsPointXY + :param input: list of QgsPoint objects to be downgraded :param output: destination for list of points converted to QgsPointXY %End diff --git a/python/core/geometry/qgsgeometrycollection.sip b/python/core/geometry/qgsgeometrycollection.sip index be726162ca7b..a4b75016ca86 100644 --- a/python/core/geometry/qgsgeometrycollection.sip +++ b/python/core/geometry/qgsgeometrycollection.sip @@ -33,17 +33,14 @@ class QgsGeometryCollection: QgsAbstractGeometry int numGeometries() const; %Docstring Returns the number of geometries within the collection. - -:rtype: int %End QgsAbstractGeometry *geometryN( int n ); %Docstring Returns a geometry from within the collection. -:param n: index of geometry to return -:rtype: QgsAbstractGeometry +:param n: index of geometry to return %End virtual bool isEmpty() const; @@ -68,27 +65,23 @@ Returns a geometry from within the collection. virtual bool addGeometry( QgsAbstractGeometry *g /Transfer/ ); %Docstring Adds a geometry and takes ownership. Returns true in case of success. - -:rtype: bool %End virtual bool insertGeometry( QgsAbstractGeometry *g /Transfer/, int index ); %Docstring Inserts a geometry before a specified index and takes ownership. Returns true in case of success. + :param g: geometry to insert. Ownership is transferred to the collection. :param index: position to insert geometry before - -:rtype: bool %End virtual bool removeGeometry( int nr ); %Docstring Removes a geometry from the collection. + :param nr: index of geometry to remove :return: true if removal was successful. -:rtype: bool - %End virtual void transform( const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform, @@ -148,10 +141,9 @@ Removes a geometry from the collection. %Docstring Returns a geometry without curves. Caller takes ownership + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve* - -:rtype: QgsAbstractGeometry %End virtual double vertexAngle( QgsVertexId vertex ) const; @@ -193,16 +185,12 @@ Returns a geometry without curves. Caller takes ownership %Docstring Returns whether child type names are omitted from Wkt representations of the collection -:rtype: bool - .. versionadded:: 2.12 %End bool fromCollectionWkt( const QString &wkt, const QVector &subtypes, const QString &defaultChildWkbType = QString() ); %Docstring Reads a collection from a WKT string. - -:rtype: bool %End virtual QgsRectangle calculateBoundingBox() const; diff --git a/python/core/geometry/qgsgeometryengine.sip b/python/core/geometry/qgsgeometryengine.sip index a725d032ca18..310db1ac97d9 100644 --- a/python/core/geometry/qgsgeometryengine.sip +++ b/python/core/geometry/qgsgeometryengine.sip @@ -58,8 +58,6 @@ tests against other geometries. %Docstring Calculate the intersection of this and ``geom``. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -67,8 +65,6 @@ Calculate the intersection of this and ``geom``. %Docstring Calculate the difference of this and ``geom``. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -76,8 +72,6 @@ Calculate the difference of this and ``geom``. %Docstring Calculate the combination of this and ``geom``. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -85,8 +79,6 @@ Calculate the combination of this and ``geom``. %Docstring Calculate the combination of this and ``geometries``. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -94,8 +86,6 @@ Calculate the combination of this and ``geometries``. %Docstring Calculate the combination of this and ``geometries``. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End @@ -103,43 +93,19 @@ Calculate the combination of this and ``geometries``. %Docstring Calculate the symmetric difference of this and ``geom``. -:rtype: QgsAbstractGeometry - .. versionadded:: 3.0 %End virtual QgsAbstractGeometry *buffer( double distance, int segments, QString *errorMsg = 0 ) const = 0 /Factory/; -%Docstring - -:rtype: QgsAbstractGeometry -%End virtual QgsAbstractGeometry *buffer( double distance, int segments, int endCapStyle, int joinStyle, double miterLimit, QString *errorMsg = 0 ) const = 0 /Factory/; -%Docstring - -:rtype: QgsAbstractGeometry -%End virtual QgsAbstractGeometry *simplify( double tolerance, QString *errorMsg = 0 ) const = 0 /Factory/; -%Docstring - -:rtype: QgsAbstractGeometry -%End virtual QgsAbstractGeometry *interpolate( double distance, QString *errorMsg = 0 ) const = 0 /Factory/; -%Docstring - -:rtype: QgsAbstractGeometry -%End virtual QgsAbstractGeometry *envelope( QString *errorMsg = 0 ) const = 0 /Factory/; -%Docstring - -:rtype: QgsAbstractGeometry -%End virtual QgsPoint *centroid( QString *errorMsg = 0 ) const = 0 /Factory/; %Docstring Calculates the centroid of this. May return a `None`. -:rtype: QgsPoint - .. versionadded:: 3.0 %End @@ -148,24 +114,18 @@ May return a `None`. Calculate a point that is guaranteed to be on the surface of this. May return a `None`. -:rtype: QgsPoint - .. versionadded:: 3.0 %End virtual QgsAbstractGeometry *convexHull( QString *errorMsg = 0 ) const = 0 /Factory/; %Docstring Calculate the convex hull of this. - -:rtype: QgsAbstractGeometry %End virtual double distance( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0; %Docstring Calculates the distance between this and ``geom``. -:rtype: float - .. versionadded:: 3.0 %End @@ -173,8 +133,6 @@ Calculates the distance between this and ``geom``. %Docstring Checks if ``geom`` intersects this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -182,8 +140,6 @@ Checks if ``geom`` intersects this. %Docstring Checks if ``geom`` touches this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -191,8 +147,6 @@ Checks if ``geom`` touches this. %Docstring Checks if ``geom`` crosses this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -200,8 +154,6 @@ Checks if ``geom`` crosses this. %Docstring Checks if ``geom`` is within this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -209,8 +161,6 @@ Checks if ``geom`` is within this. %Docstring Checks if ``geom`` overlaps this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -218,8 +168,6 @@ Checks if ``geom`` overlaps this. %Docstring Checks if ``geom`` contains this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -227,8 +175,6 @@ Checks if ``geom`` contains this. %Docstring Checks if ``geom`` is disjoint from this. -:rtype: bool - .. versionadded:: 3.0 %End @@ -236,12 +182,11 @@ Checks if ``geom`` is disjoint from this. %Docstring Returns the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the relationship between the geometries. + :param geom: geometry to relate to :param errorMsg: destination storage for any error message :return: DE-9IM string for relationship, or an empty string if an error occurred -:rtype: str - .. versionadded:: 2.12 %End @@ -250,54 +195,33 @@ relationship between the geometries. %Docstring Tests whether two geometries are related by a specified Dimensional Extended 9 Intersection Model (DE-9IM) pattern. + :param geom: geometry to relate to :param pattern: DE-9IM pattern for match :param errorMsg: destination storage for any error message :return: true if geometry relationship matches with pattern -:rtype: bool - .. versionadded:: 2.14 %End virtual double area( QString *errorMsg = 0 ) const = 0; -%Docstring - -:rtype: float -%End virtual double length( QString *errorMsg = 0 ) const = 0; -%Docstring - -:rtype: float -%End virtual bool isValid( QString *errorMsg = 0 ) const = 0; -%Docstring - -:rtype: bool -%End virtual bool isEqual( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0; %Docstring Checks if this is equal to ``geom``. If both are Null geometries, `false` is returned. -:rtype: bool - .. versionadded:: 3.0 %End virtual bool isEmpty( QString *errorMsg ) const = 0; -%Docstring - -:rtype: bool -%End virtual bool isSimple( QString *errorMsg = 0 ) const = 0; %Docstring Determines whether the geometry is simple (according to OGC definition). -:rtype: bool - .. versionadded:: 3.0 %End @@ -307,6 +231,7 @@ Determines whether the geometry is simple (according to OGC definition). QgsPointSequence &topologyTestPoints, QString *errorMsg = 0 ) const; %Docstring Splits this geometry according to a given line. + :param splitLine: the line that splits the geometry \param[out] newGeometries list of new geometries that have been created with the split :param topological: true if topological editing is enabled @@ -314,15 +239,9 @@ Splits this geometry according to a given line. \param[out] errorMsg error messages emitted, if any :return: 0 in case of success, 1 if geometry has not been split, error else -:rtype: QgsGeometryEngine.EngineOperationResult - %End virtual QgsAbstractGeometry *offsetCurve( double distance, int segments, int joinStyle, double miterLimit, QString *errorMsg = 0 ) const = 0 /Factory/; -%Docstring - -:rtype: QgsAbstractGeometry -%End protected: diff --git a/python/core/geometry/qgsgeometryutils.sip b/python/core/geometry/qgsgeometryutils.sip index b25937210d28..8682053396c2 100644 --- a/python/core/geometry/qgsgeometryutils.sip +++ b/python/core/geometry/qgsgeometryutils.sip @@ -28,16 +28,12 @@ class QgsGeometryUtils %Docstring Returns list of linestrings extracted from the passed geometry. The returned objects have to be deleted by the caller. - -:rtype: list of QgsLineString %End static QgsPoint closestVertex( const QgsAbstractGeometry &geom, const QgsPoint &pt, QgsVertexId &id /Out/ ); %Docstring Returns the closest vertex to a geometry for a specified point. On error null point will be returned and "id" argument will be invalid. - -:rtype: QgsPoint %End static QgsPoint closestPoint( const QgsAbstractGeometry &geometry, const QgsPoint &point ); @@ -45,19 +41,16 @@ On error null point will be returned and "id" argument will be invalid. Returns the nearest point on a segment of a ``geometry`` for the specified ``point``. The z and m values will be linearly interpolated between the two neighbouring vertices. - -:rtype: QgsPoint %End static double distanceToVertex( const QgsAbstractGeometry &geom, QgsVertexId id ); %Docstring Returns the distance along a geometry from its first vertex to the specified vertex. + :param geom: geometry :param id: vertex id to find distance to :return: distance to vertex (following geometry) -:rtype: float - .. versionadded:: 2.16 %End @@ -69,13 +62,12 @@ Returns the distance along a geometry from its first vertex to the specified ver %Docstring Retrieves the vertices which are before and after the interpolated point at a specified distance along a linestring (or polygon boundary). + :param geometry: line or polygon geometry :param distance: distance to traverse along geometry :param previousVertex: will be set to previous vertex ID :param nextVertex: will be set to next vertex ID -:rtype: bool - .. note:: if the distance coincides exactly with a vertex, then both previousVertex and nextVertex will be set to this vertex @@ -88,20 +80,17 @@ Retrieves the vertices which are before and after the interpolated point at a sp static double sqrDistance2D( const QgsPoint &pt1, const QgsPoint &pt2 ); %Docstring Returns the squared 2D distance between two points. - -:rtype: float %End static double sqrDistToLine( double ptX, double ptY, double x1, double y1, double x2, double y2, double &minDistX /Out/, double &minDistY /Out/, double epsilon ); %Docstring Returns the squared distance between a point and a line. - -:rtype: float %End static bool lineIntersection( const QgsPoint &p1, QgsVector v1, const QgsPoint &p2, QgsVector v2, QgsPoint &intersection /Out/ ); %Docstring Compute the intersection between two lines + :param p1: Point on the first line :param v1: Direction vector of the first line :param p2: Point on the second line @@ -109,13 +98,12 @@ Returns the squared distance between a point and a line. :param intersection: Output parameter, the intersection point :return: Whether the lines intersect -:rtype: bool - %End static bool segmentIntersection( const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &q1, const QgsPoint &q2, QgsPoint &inter /Out/, double tolerance ); %Docstring Compute the intersection between two segments + :param p1: First segment start point :param p2: First segment end point :param q1: Second segment start point @@ -124,20 +112,17 @@ Returns the squared distance between a point and a line. :param tolerance: The tolerance to use :return: Whether the segments intersect -:rtype: bool - %End static QgsPoint projPointOnSegment( const QgsPoint &p, const QgsPoint &s1, const QgsPoint &s2 ); %Docstring Project the point on a segment + :param p: The point :param s1: The segment start point :param s2: The segment end point :return: The projection of the point on the segment -:rtype: QgsPoint - %End @@ -149,22 +134,16 @@ A positive return value indicates the point is to the right of the line. If the return value is 0, then the test was unsuccessful (e.g. due to testing a point exactly on the line, or exactly in line with the segment) and the result is undefined. - -:rtype: int %End static QgsPoint pointOnLineWithDistance( const QgsPoint &startPoint, const QgsPoint &directionPoint, double distance ); %Docstring Returns a point a specified distance toward a second point. - -:rtype: QgsPoint %End static double ccwAngle( double dy, double dx ); %Docstring Returns the counter clockwise angle between a line with components dx, dy and the line with dx > 0 and dy = 0 - -:rtype: float %End static void circleCenterRadius( const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, double &radius /Out/, @@ -176,51 +155,37 @@ Returns radius and center of the circle through pt1, pt2, pt3 static bool circleClockwise( double angle1, double angle2, double angle3 ); %Docstring Returns true if circle is ordered clockwise - -:rtype: bool %End static bool circleAngleBetween( double angle, double angle1, double angle2, bool clockwise ); %Docstring Returns true if, in a circle, angle is between angle1 and angle2 - -:rtype: bool %End static bool angleOnCircle( double angle, double angle1, double angle2, double angle3 ); %Docstring Returns true if an angle is between angle1 and angle3 on a circle described by angle1, angle2 and angle3. - -:rtype: bool %End static double circleLength( double x1, double y1, double x2, double y2, double x3, double y3 ); %Docstring Length of a circular string segment defined by pt1, pt2, pt3 - -:rtype: float %End static double sweepAngle( double centerX, double centerY, double x1, double y1, double x2, double y2, double x3, double y3 ); %Docstring Calculates angle of a circular string part defined by pt1, pt2, pt3 - -:rtype: float %End static bool segmentMidPoint( const QgsPoint &p1, const QgsPoint &p2, QgsPoint &result /Out/, double radius, const QgsPoint &mousePos ); %Docstring Calculates midpoint on circle passing through p1 and p2, closest to given coordinate - -:rtype: bool %End static double circleTangentDirection( const QgsPoint &tangentPoint, const QgsPoint &cp1, const QgsPoint &cp2, const QgsPoint &cp3 ); %Docstring Calculates the direction angle of a circle tangent (clockwise from north in radians) - -:rtype: float %End static void segmentizeArc( const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &p3, @@ -230,8 +195,6 @@ Calculates the direction angle of a circle tangent (clockwise from north in radi %Docstring Convert circular arc defined by p1, p2, p3 (p1/p3 being start resp. end point, p2 lies on the arc) into a sequence of points. -:rtype: QgsPointSequence - .. versionadded:: 3.0 %End @@ -240,8 +203,6 @@ Convert circular arc defined by p1, p2, p3 (p1/p3 being start resp. end point, p For line defined by points pt1 and pt3, find out on which side of the line is point pt3. Returns -1 if pt3 on the left side, 1 if pt3 is on the right side or 0 if pt3 lies on the line. -:rtype: int - .. versionadded:: 3.0 %End @@ -249,8 +210,6 @@ Returns -1 if pt3 on the left side, 1 if pt3 is on the right side or 0 if pt3 li %Docstring Interpolate a value at given angle on circular arc given values (zm1, zm2, zm3) at three different angles (a1, a2, a3). -:rtype: float - .. versionadded:: 3.0 %End @@ -263,24 +222,22 @@ Interpolate a value at given angle on circular arc given values (zm1, zm2, zm3) static double normalizedAngle( double angle ); %Docstring Ensures that an angle is in the range 0 <= angle < 2 pi. + :param angle: angle in radians :return: equivalent angle within the range [0, 2 pi) -:rtype: float - %End static double lineAngle( double x1, double y1, double x2, double y2 ); %Docstring Calculates the direction of line joining two points in radians, clockwise from the north direction. + :param x1: x-coordinate of line start :param y1: y-coordinate of line start :param x2: x-coordinate of line end :param y2: y-coordinate of line end :return: angle in radians. Returned value is undefined if start and end point are the same. -:rtype: float - %End static double angleBetweenThreePoints( double x1, double y1, double x2, double y2, @@ -288,6 +245,7 @@ Calculates the direction of line joining two points in radians, clockwise from t %Docstring Calculates the angle between the lines AB and BC, where AB and BC described by points a, b and b, c. + :param x1: x-coordinate of point a :param y1: y-coordinate of point a :param x2: x-coordinate of point b @@ -296,40 +254,34 @@ by points a, b and b, c. :param y3: y-coordinate of point c :return: angle between lines in radians. Returned value is undefined if two or more points are equal. -:rtype: float - %End static double linePerpendicularAngle( double x1, double y1, double x2, double y2 ); %Docstring Calculates the perpendicular angle to a line joining two points. Returned angle is in radians, clockwise from the north direction. + :param x1: x-coordinate of line start :param y1: y-coordinate of line start :param x2: x-coordinate of line end :param y2: y-coordinate of line end :return: angle in radians. Returned value is undefined if start and end point are the same. -:rtype: float - %End static double averageAngle( double x1, double y1, double x2, double y2, double x3, double y3 ); %Docstring Angle between two linear segments - -:rtype: float %End static double averageAngle( double a1, double a2 ); %Docstring Averages two angles, correctly handling negative angles and ensuring the result is between 0 and 2 pi. + :param a1: first angle (in radians) :param a2: second angle (in radians) :return: average angle (in radians) -:rtype: float - %End @@ -339,12 +291,11 @@ Averages two angles, correctly handling negative angles and ensuring the result Returns a middle point between points pt1 and pt2. Z value is computed if one of this point have Z. M value is computed if one of this point have M. + :param pt1: first point. :param pt2: second point. :return: New point at middle between points pt1 and pt2. -:rtype: QgsPoint - * Example: \code{.py} p = QgsPoint( 4, 6 ) # 2D point @@ -364,12 +315,11 @@ pr = midpoint ( p, QgsPoint( QgsWkbTypes.PointZM, 2, 2, 2, 2 ) ) static double gradient( const QgsPoint &pt1, const QgsPoint &pt2 ); %Docstring Return the gradient of a line defined by points ``pt1`` and ``pt2``. + :param pt1: first point. :param pt2: second point. :return: The gradient of this linear entity, or infinity if vertical -:rtype: float - .. versionadded:: 3.0 %End @@ -378,6 +328,7 @@ Return the gradient of a line defined by points ``pt1`` and ``pt2``. double &a /Out/, double &b /Out/, double &c /Out/ ); %Docstring Return the coefficients (a, b, c for equation "ax + by + c = 0") of a line defined by points ``pt1`` and ``pt2``. + :param pt1: first point. :param pt2: second point. :param a: Output parameter, a coefficient of the equation. @@ -390,13 +341,12 @@ Return the coefficients (a, b, c for equation "ax + by + c = 0") of a line defin static QgsLineString perpendicularSegment( const QgsPoint &p, const QgsPoint &s1, const QgsPoint &s2 ); %Docstring Create a perpendicular line segment from p to segment [s1, s2] + :param p: The point :param s1: The segment start point :param s2: The segment end point :return: A line (segment) from p to perpendicular point on segment [s1, s2] -:rtype: QgsLineString - %End diff --git a/python/core/geometry/qgslinestring.sip b/python/core/geometry/qgslinestring.sip index 5531602f6ceb..f7c14f7e2a1d 100644 --- a/python/core/geometry/qgslinestring.sip +++ b/python/core/geometry/qgslinestring.sip @@ -65,9 +65,8 @@ or repeatedly calling addVertex() QgsPoint pointN( int i ) const; %Docstring Returns the specified point from inside the line string. -:param i: index of point, starting at 0 for the first point -:rtype: QgsPoint +:param i: index of point, starting at 0 for the first point %End virtual double xAt( int index ) const; @@ -78,11 +77,10 @@ Returns the specified point from inside the line string. double zAt( int index ) const; %Docstring Returns the z-coordinate of the specified node in the line string. + :param index: index of node, where the first node in the line is 0 :return: z-coordinate of node, or ``nan`` if index is out of bounds or the line -:rtype: float - does not have a z dimension .. seealso:: :py:func:`setZAt()` @@ -91,11 +89,10 @@ does not have a z dimension double mAt( int index ) const; %Docstring Returns the m value of the specified node in the line string. + :param index: index of node, where the first node in the line is 0 :return: m value of node, or ``nan`` if index is out of bounds or the line -:rtype: float - does not have m values .. seealso:: :py:func:`setMAt()` @@ -104,6 +101,7 @@ does not have m values void setXAt( int index, double x ); %Docstring Sets the x-coordinate of the specified node in the line string. + :param index: index of node, where the first node in the line is 0. Corresponding node must already exist in line string. :param x: x-coordinate of node @@ -114,6 +112,7 @@ node must already exist in line string. void setYAt( int index, double y ); %Docstring Sets the y-coordinate of the specified node in the line string. + :param index: index of node, where the first node in the line is 0. Corresponding node must already exist in line string. :param y: y-coordinate of node @@ -124,6 +123,7 @@ node must already exist in line string. void setZAt( int index, double z ); %Docstring Sets the z-coordinate of the specified node in the line string. + :param index: index of node, where the first node in the line is 0. Corresponding node must already exist in line string, and the line string must have z-dimension. :param z: z-coordinate of node @@ -134,6 +134,7 @@ node must already exist in line string, and the line string must have z-dimensio void setMAt( int index, double m ); %Docstring Sets the m value of the specified node in the line string. + :param index: index of node, where the first node in the line is 0. Corresponding node must already exist in line string, and the line string must have m values. :param m: m value of node @@ -145,18 +146,21 @@ node must already exist in line string, and the line string must have m values. %Docstring Resets the line string to match the specified list of points. The line string will inherit the dimensionality of the first point in the list. + :param points: new points for line string. If empty, line string will be cleared. %End void append( const QgsLineString *line ); %Docstring Appends the contents of another line string to the end of this line string. + :param line: line to append. Ownership is not transferred. %End void addVertex( const QgsPoint &pt ); %Docstring Adds a new vertex to the end of the line string. + :param pt: vertex to add %End @@ -171,8 +175,6 @@ Closes the line string by appending the first point to the end of the line, if i Returns the geometry converted to the more generic curve type QgsCompoundCurve :return: the converted geometry. Caller takes ownership* -:rtype: QgsCompoundCurve - %End void extend( double startDistance, double endDistance ); @@ -228,10 +230,9 @@ segment in the line. %Docstring Returns a new line string geometry corresponding to a segmentized approximation of the curve. + :param tolerance: segmentation tolerance :param toleranceType: maximum segmentation angle or maximum difference between approximation and curve* - -:rtype: QgsLineString %End virtual int numPoints() const; diff --git a/python/core/geometry/qgsmulticurve.sip b/python/core/geometry/qgsmulticurve.sip index 27879b43961c..757ee14a97ed 100644 --- a/python/core/geometry/qgsmulticurve.sip +++ b/python/core/geometry/qgsmulticurve.sip @@ -46,8 +46,6 @@ class QgsMultiCurve: QgsGeometryCollection %Docstring Returns a copy of the multi curve, where each component curve has had its line direction reversed. -:rtype: QgsMultiCurve - .. versionadded:: 2.14 %End diff --git a/python/core/geometry/qgsmultilinestring.sip b/python/core/geometry/qgsmultilinestring.sip index d0c699d38aec..3429c05f2588 100644 --- a/python/core/geometry/qgsmultilinestring.sip +++ b/python/core/geometry/qgsmultilinestring.sip @@ -47,8 +47,6 @@ class QgsMultiLineString: QgsMultiCurve Returns the geometry converted to the more generic curve type QgsMultiCurve :return: the converted geometry. Caller takes ownership* -:rtype: QgsMultiCurve - %End protected: diff --git a/python/core/geometry/qgsmultipolygon.sip b/python/core/geometry/qgsmultipolygon.sip index cab1d306a87c..4f36b7b0fd80 100644 --- a/python/core/geometry/qgsmultipolygon.sip +++ b/python/core/geometry/qgsmultipolygon.sip @@ -46,8 +46,6 @@ class QgsMultiPolygon: QgsMultiSurface Returns the geometry converted to the more generic curve type QgsMultiSurface :return: the converted geometry. Caller takes ownership* -:rtype: QgsMultiSurface - %End virtual QgsAbstractGeometry *boundary() const /Factory/; diff --git a/python/core/geometry/qgspoint.sip b/python/core/geometry/qgspoint.sip index 1c4ce98555bf..c5b08c2f3488 100644 --- a/python/core/geometry/qgspoint.sip +++ b/python/core/geometry/qgspoint.sip @@ -87,17 +87,11 @@ Construct a QgsPoint from a QPointF bool operator==( const QgsPoint &pt ) const; bool operator!=( const QgsPoint &pt ) const; -%Docstring - -:rtype: bool -%End double x() const; %Docstring Returns the point's x-coordinate. -:rtype: float - .. seealso:: :py:func:`setX()` .. seealso:: :py:func:`rx()` @@ -107,8 +101,6 @@ Returns the point's x-coordinate. %Docstring Returns the point's y-coordinate. -:rtype: float - .. seealso:: :py:func:`setY()` .. seealso:: :py:func:`ry()` @@ -118,8 +110,6 @@ Returns the point's y-coordinate. %Docstring Returns the point's z-coordinate. -:rtype: float - .. seealso:: :py:func:`setZ()` .. seealso:: :py:func:`rz()` @@ -129,8 +119,6 @@ Returns the point's z-coordinate. %Docstring Returns the point's m value. -:rtype: float - .. seealso:: :py:func:`setM()` .. seealso:: :py:func:`rm()` @@ -190,8 +178,6 @@ add a m value and force the point to have an m dimension. %Docstring Returns the point as a QPointF. -:rtype: QPointF - .. versionadded:: 2.14 %End @@ -201,8 +187,6 @@ Returns the distance between this point and a specified x, y coordinate. In cert cases it may be more appropriate to call the faster distanceSquared() method, e.g., when comparing distances. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`distanceSquared()` @@ -214,8 +198,6 @@ Returns the 2D distance between this point and another point. In certain cases it may be more appropriate to call the faster distanceSquared() method, e.g., when comparing distances. -:rtype: float - .. versionadded:: 3.0 %End @@ -225,8 +207,6 @@ Returns the squared distance between this point a specified x, y coordinate. Cal this is faster than calling distance(), and may be useful in use cases such as comparing distances where the extra expense of calling distance() is not required. -:rtype: float - .. seealso:: :py:func:`distance()` .. versionadded:: 3.0 @@ -238,8 +218,6 @@ Returns the squared distance between this point another point. Calling this is faster than calling distance(), and may be useful in use cases such as comparing distances where the extra expense of calling distance() is not required. -:rtype: float - .. seealso:: :py:func:`distance()` .. versionadded:: 3.0 @@ -251,8 +229,6 @@ Returns the 3D distance between this point and a specified x, y, z coordinate. I cases it may be more appropriate to call the faster distanceSquared() method, e.g., when comparing distances. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`distanceSquared()` @@ -264,8 +240,6 @@ Returns the 3D distance between this point and another point. In certain cases it may be more appropriate to call the faster distanceSquared() method, e.g., when comparing distances. -:rtype: float - .. versionadded:: 3.0 %End @@ -275,8 +249,6 @@ Returns the 3D squared distance between this point a specified x, y, z coordinat this is faster than calling distance(), and may be useful in use cases such as comparing distances where the extra expense of calling distance() is not required. -:rtype: float - .. seealso:: :py:func:`distance()` .. versionadded:: 3.0 @@ -288,8 +260,6 @@ Returns the 3D squared distance between this point another point. Calling this is faster than calling distance(), and may be useful in use cases such as comparing distances where the extra expense of calling distance() is not required. -:rtype: float - .. seealso:: :py:func:`distance()` .. versionadded:: 3.0 @@ -299,8 +269,6 @@ distances where the extra expense of calling distance() is not required. %Docstring Calculates azimuth between this point and other one (clockwise in degree, starting from north) -:rtype: float - .. versionadded:: 3.0 %End @@ -309,8 +277,6 @@ Calculates azimuth between this point and other one (clockwise in degree, starti Calculates inclination between this point and other one (starting from zenith = 0 to nadir = 180. Horizon = 90) Returns 90.0 if the distance between this point and other one is equal to 0 (same point). -:rtype: float - .. versionadded:: 3.0 %End @@ -319,13 +285,12 @@ Returns 90.0 if the distance between this point and other one is equal to 0 (sam Returns a new point which correspond to this point projected by a specified distance with specified angles (azimuth and inclination). M value is preserved. + :param distance: distance to project :param azimuth: angle to project in X Y, clockwise in degrees starting from north :param inclination: angle to project in Z (3D). If the point is 2D, the Z value is assumed to be 0. :return: The point projected. If a 2D point is projected a 3D point will be returned except if -:rtype: QgsPoint - inclination is 90. A 3D point is always returned if a 3D point is projected. Example: \code{.py} @@ -352,8 +317,6 @@ pr = p.project (1, 0, 0 ) %Docstring Calculates the vector obtained by subtracting a point from this point. -:rtype: QgsVector - .. versionadded:: 3.0 %End @@ -361,8 +324,6 @@ Calculates the vector obtained by subtracting a point from this point. %Docstring Adds a vector to this point in place. -:rtype: QgsPoint - .. versionadded:: 3.0 %End @@ -370,8 +331,6 @@ Adds a vector to this point in place. %Docstring Subtracts a vector from this point in place. -:rtype: QgsPoint - .. versionadded:: 3.0 %End @@ -379,8 +338,6 @@ Subtracts a vector from this point in place. %Docstring Adds a vector to this point. -:rtype: QgsPoint - .. versionadded:: 3.0 %End @@ -388,8 +345,6 @@ Adds a vector to this point. %Docstring Subtracts a vector from this point. -:rtype: QgsPoint - .. versionadded:: 3.0 %End @@ -456,11 +411,10 @@ Subtracts a vector from this point. %Docstring Angle undefined. Always returns 0.0 + :param vertex: the vertex id :return: 0.0* -:rtype: float - %End virtual int vertexCount( int /*part*/ = 0, int /*ring*/ = 0 ) const; diff --git a/python/core/geometry/qgspolygon.sip b/python/core/geometry/qgspolygon.sip index 75cbf2877b64..1b9a2395e227 100644 --- a/python/core/geometry/qgspolygon.sip +++ b/python/core/geometry/qgspolygon.sip @@ -42,8 +42,6 @@ class QgsPolygon: QgsCurvePolygon Returns the geometry converted to the more generic curve type QgsCurvePolygon :return: the converted geometry. Caller takes ownership* -:rtype: QgsCurvePolygon - %End virtual void addInteriorRing( QgsCurve *ring /Transfer/ ); @@ -60,8 +58,6 @@ Returns the distance from a point to the boundary of the polygon (either the exterior ring or any closer interior rings). The returned distance will be negative if the point lies outside the polygon. -:rtype: float - .. versionadded:: 3.0 %End diff --git a/python/core/geometry/qgsrectangle.sip b/python/core/geometry/qgsrectangle.sip index b3201eef0486..7357f076909d 100644 --- a/python/core/geometry/qgsrectangle.sip +++ b/python/core/geometry/qgsrectangle.sip @@ -50,8 +50,6 @@ Copy constructor Creates a new rectangle from a ``wkt`` string. The WKT must contain only 5 vertices, representing a rectangle aligned with X and Y axes. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -60,8 +58,6 @@ The WKT must contain only 5 vertices, representing a rectangle aligned with X an Creates a new rectangle, given the specified ``center`` point and ``width`` and ``height``. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -106,29 +102,21 @@ and max corner is at min. It is NOT normalized. double xMaximum() const; %Docstring Returns the x maximum value (right side of rectangle). - -:rtype: float %End double xMinimum() const; %Docstring Returns the x minimum value (left side of rectangle). - -:rtype: float %End double yMaximum() const; %Docstring Returns the y maximum value (top side of rectangle). - -:rtype: float %End double yMinimum() const; %Docstring Returns the y minimum value (bottom side of rectangle). - -:rtype: float %End void normalize(); @@ -140,8 +128,6 @@ Normalize the rectangle so it has non-negative width/height. %Docstring Returns the width of the rectangle. -:rtype: float - .. seealso:: :py:func:`height()` .. seealso:: :py:func:`area()` @@ -151,8 +137,6 @@ Returns the width of the rectangle. %Docstring Returns the height of the rectangle. -:rtype: float - .. seealso:: :py:func:`width()` .. seealso:: :py:func:`area()` @@ -162,8 +146,6 @@ Returns the height of the rectangle. %Docstring Returns the area of the rectangle. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`width()` @@ -177,8 +159,6 @@ Returns the area of the rectangle. %Docstring Returns the perimeter of the rectangle. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`area()` @@ -187,8 +167,6 @@ Returns the perimeter of the rectangle. QgsPointXY center() const; %Docstring Returns the center point of the rectangle. - -:rtype: QgsPointXY %End void scale( double scaleFactor, const QgsPointXY *c = 0 ); @@ -217,8 +195,6 @@ Updates the rectangle to include the specified point. %Docstring Get rectangle enlarged by buffer. -:rtype: QgsRectangle - .. note:: In earlier QGIS releases this method was named buffer(). @@ -231,29 +207,21 @@ Get rectangle enlarged by buffer. QgsRectangle intersect( const QgsRectangle *rect ) const; %Docstring Return the intersection with the given rectangle. - -:rtype: QgsRectangle %End bool intersects( const QgsRectangle &rect ) const; %Docstring Returns true when rectangle intersects with other rectangle. - -:rtype: bool %End bool contains( const QgsRectangle &rect ) const; %Docstring Return true when rectangle contains other rectangle. - -:rtype: bool %End bool contains( const QgsPointXY &p ) const; %Docstring Return true when rectangle contains a point. - -:rtype: bool %End void combineExtentWith( const QgsRectangle &rect ); @@ -270,8 +238,6 @@ Expand the rectangle so that covers both the original rectangle and the given po %Docstring Returns a rectangle offset from this one in the direction of the reversed vector. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -279,8 +245,6 @@ Returns a rectangle offset from this one in the direction of the reversed vector %Docstring Returns a rectangle offset from this one in the direction of the vector. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -288,8 +252,6 @@ Returns a rectangle offset from this one in the direction of the vector. %Docstring Moves this rectangle in the direction of the reversed vector. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -297,8 +259,6 @@ Moves this rectangle in the direction of the reversed vector. %Docstring Moves this rectangle in the direction of the vector. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -306,8 +266,6 @@ Moves this rectangle in the direction of the vector. %Docstring Returns true if the rectangle is empty. An empty rectangle may still be non-null if it contains valid information (e.g. bounding box of a point). - -:rtype: bool %End bool isNull() const; @@ -315,30 +273,22 @@ An empty rectangle may still be non-null if it contains valid information (e.g. Test if the rectangle is null (all coordinates zero or after call to setMinimal()). A null rectangle is also an empty rectangle. -:rtype: bool - .. versionadded:: 2.4 %End QString asWktCoordinates() const; %Docstring Returns a string representation of the rectangle in WKT format. - -:rtype: str %End QString asWktPolygon() const; %Docstring Returns a string representation of the rectangle as a WKT Polygon. - -:rtype: str %End QRectF toRectF() const; %Docstring Returns a QRectF with same coordinates as the rectangle. - -:rtype: QRectF %End QString toString( int precision = 16 ) const; @@ -346,15 +296,11 @@ Returns a QRectF with same coordinates as the rectangle. Returns a string representation of form xmin,ymin : xmax,ymax Coordinates will be truncated to the specified precision. If the specified precision is less than 0, a suitable minimum precision is used. - -:rtype: str %End QString asPolygon() const; %Docstring Returns the rectangle as a polygon. - -:rtype: str %End bool operator==( const QgsRectangle &r1 ) const; @@ -364,8 +310,6 @@ Returns the rectangle as a polygon. Comparison operator :return: False if rectangles are equal -:rtype: bool - %End @@ -373,8 +317,6 @@ Comparison operator %Docstring Returns true if the rectangle has finite boundaries. Will return false if any of the rectangle boundaries are NaN or Inf. - -:rtype: bool %End void invert(); @@ -387,8 +329,6 @@ Swap x/y coordinates in the rectangle. Converts the rectangle to a 3D box, with the specified ``zMin`` and ``zMax`` z values. -:rtype: QgsBox3d - .. versionadded:: 3.0 %End diff --git a/python/core/geometry/qgsreferencedgeometry.sip b/python/core/geometry/qgsreferencedgeometry.sip index ad6f8d9a6650..130233e399a1 100644 --- a/python/core/geometry/qgsreferencedgeometry.sip +++ b/python/core/geometry/qgsreferencedgeometry.sip @@ -38,8 +38,6 @@ Constructor for QgsReferencedGeometryBase, with the specified ``crs``. Returns the associated coordinate reference system, or an invalid CRS if no reference system is set. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs()` %End diff --git a/python/core/geometry/qgsregularpolygon.sip b/python/core/geometry/qgsregularpolygon.sip index 8ba9d8f92b7f..b712913a6607 100644 --- a/python/core/geometry/qgsregularpolygon.sip +++ b/python/core/geometry/qgsregularpolygon.sip @@ -41,6 +41,7 @@ Constructor for QgsRegularPolygon. QgsRegularPolygon( const QgsPoint ¢er, const double radius, const double azimuth, const unsigned int numberSides, const ConstructionOption circle ); %Docstring Constructs a regular polygon by ``center`` and parameters for the first vertex. An empty regular polygon is returned if ``numberSides`` < 3 or ``ConstructionOption`` isn't valid. + :param center: The center of the regular polygon. :param radius: Distance from the center and the first vertex or sides (see ``ConstructionOption``). :param azimuth: Angle in degrees started from the North to the first vertex. @@ -52,6 +53,7 @@ Constructs a regular polygon by ``center`` and parameters for the first vertex. QgsRegularPolygon( const QgsPoint ¢er, const QgsPoint &pt1, const unsigned int numberSides, const ConstructionOption circle ); %Docstring Constructs a regular polygon by ``center`` and another point. + :param center: The center of the regular polygon. :param pt1: The first vertex if the polygon is inscribed in circle or the midpoint of a side if the polygon is circumscribed about circle. :param numberSides: Number of sides of the regular polygon. @@ -61,6 +63,7 @@ Constructs a regular polygon by ``center`` and another point. QgsRegularPolygon( const QgsPoint &pt1, const QgsPoint &pt2, const unsigned int numberSides ); %Docstring Constructs a regular polygon by two points of the first side. + :param pt1: The first vertex of the first side, also first vertex of the regular polygon. :param pt2: The second vertex of the first side. :param numberSides: Number of sides of the regular polygon. @@ -72,16 +75,12 @@ Constructs a regular polygon by two points of the first side. bool isEmpty() const; %Docstring A regular polygon is empty if radius equal to 0 or number of sides < 3 - -:rtype: bool %End QgsPoint center() const; %Docstring Returns the center point of the regular polygon. -:rtype: QgsPoint - .. seealso:: :py:func:`setCenter()` %End @@ -90,8 +89,6 @@ Returns the center point of the regular polygon. Returns the radius. This is also the radius of the circumscribing circle. -:rtype: float - .. seealso:: :py:func:`apothem()` .. seealso:: :py:func:`setRadius()` @@ -101,8 +98,6 @@ This is also the radius of the circumscribing circle. %Docstring Returns the first vertex (corner) of the regular polygon. -:rtype: QgsPoint - .. seealso:: :py:func:`setFirstVertex()` %End @@ -111,8 +106,6 @@ Returns the first vertex (corner) of the regular polygon. Returns the apothem of the regular polygon. The apothem is the radius of the inscribed circle. -:rtype: float - .. seealso:: :py:func:`radius()` %End @@ -158,98 +151,72 @@ If numberSides < 3, the number of sides is unchanged. QgsPointSequence points() const; %Docstring Returns a list including the vertices of the regular polygon. - -:rtype: QgsPointSequence %End QgsPolygon *toPolygon() const /Factory/; %Docstring Returns as a polygon. - -:rtype: QgsPolygon %End QgsLineString *toLineString() const /Factory/; %Docstring Returns as a linestring. - -:rtype: QgsLineString %End QgsTriangle toTriangle() const; %Docstring Returns as a triangle. An empty triangle is returned if the regular polygon is empty or if the number of sides is different from 3. - -:rtype: QgsTriangle %End QVector triangulate() const; %Docstring Returns a triangulation (vertices from sides to the center) of the regular polygon. An empty list is returned if the regular polygon is empty. - -:rtype: list of QgsTriangle %End QgsCircle inscribedCircle() const; %Docstring Returns the inscribed circle - -:rtype: QgsCircle %End QgsCircle circumscribedCircle() const; %Docstring Returns the circumscribed circle - -:rtype: QgsCircle %End QString toString( int pointPrecision = 17, int radiusPrecision = 17, int anglePrecision = 2 ) const; %Docstring Returns a string representation of the regular polygon. Members will be truncated to the specified precision. - -:rtype: str %End double interiorAngle() const; %Docstring Returns the measure of the interior angles in degrees. - -:rtype: float %End double centralAngle() const; %Docstring Returns the measure of the central angle (the angle subtended at the center of the polygon by one of its sides) in degrees. - -:rtype: float %End double area() const; %Docstring Returns the area. Returns 0 if the regular polygon is empty. - -:rtype: float %End double perimeter() const; %Docstring Returns the perimeter. Returns 0 if the regular polygon is empty. - -:rtype: float %End double length() const; %Docstring Returns the length of a side. Returns 0 if the regular polygon is empty. - -:rtype: float %End }; diff --git a/python/core/geometry/qgssurface.sip b/python/core/geometry/qgssurface.sip index e1cae55ff814..f56300cd0382 100644 --- a/python/core/geometry/qgssurface.sip +++ b/python/core/geometry/qgssurface.sip @@ -22,15 +22,11 @@ class QgsSurface: QgsAbstractGeometry %Docstring Get a polygon representation of this surface. Ownership is transferred to the caller. - -:rtype: QgsPolygon %End virtual QgsRectangle boundingBox() const; %Docstring Returns the minimal bounding box for the geometry - -:rtype: QgsRectangle %End protected: diff --git a/python/core/geometry/qgstriangle.sip b/python/core/geometry/qgstriangle.sip index 1daa5bec66c1..29a962f74f14 100644 --- a/python/core/geometry/qgstriangle.sip +++ b/python/core/geometry/qgstriangle.sip @@ -26,6 +26,7 @@ class QgsTriangle : QgsPolygon QgsTriangle( const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &p3 ); %Docstring Construct a QgsTriangle from three QgsPointV2. + :param p1: first point :param p2: second point :param p3: third point @@ -34,6 +35,7 @@ Construct a QgsTriangle from three QgsPointV2. explicit QgsTriangle( const QgsPointXY &p1, const QgsPointXY &p2, const QgsPointXY &p3 ); %Docstring Construct a QgsTriangle from three QgsPoint. + :param p1: first point :param p2: second point :param p3: third point @@ -42,6 +44,7 @@ Construct a QgsTriangle from three QgsPoint. explicit QgsTriangle( const QPointF p1, const QPointF p2, const QPointF p3 ); %Docstring Construct a QgsTriangle from three QPointF. + :param p1: first point :param p2: second point :param p3: third point @@ -49,10 +52,6 @@ Construct a QgsTriangle from three QPointF. bool operator==( const QgsTriangle &other ) const; bool operator!=( const QgsTriangle &other ) const; -%Docstring - -:rtype: bool -%End virtual QString geometryType() const; @@ -86,15 +85,11 @@ Inherited method not used. You cannot add an interior ring into a triangle. %Docstring Inherited method not used. You cannot delete or insert a vertex directly. Returns always false. - -:rtype: bool %End virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex ); %Docstring Inherited method not used. You cannot delete or insert a vertex directly. Returns always false. - -:rtype: bool %End virtual bool moveVertex( QgsVertexId vId, const QgsPoint &newPos ); @@ -109,11 +104,10 @@ Inherited method not used. You cannot delete or insert a vertex directly. Return QgsPoint vertexAt( int atVertex ) const; %Docstring Returns coordinates of a vertex. + :param atVertex: index of the vertex :return: Coordinates of the vertex or QgsPoint(0,0) on error (``atVertex`` < 0 or > 3). -:rtype: QgsPoint - %End QVector lengths() const; @@ -121,8 +115,6 @@ Returns coordinates of a vertex. Returns the three lengths of the triangle. :return: Lengths of triangle ABC where [AB] is at 0, [BC] is at 1, [CA] is at 2. -:rtype: list of float - An empty list is returned for empty triangle. * Example: \code{.py} @@ -139,8 +131,6 @@ QgsTriangle().lengths() Returns the three angles of the triangle. :return: Angles in radians of triangle ABC where angle BAC is at 0, angle ABC is at 1, angle BCA is at 2. -:rtype: list of float - An empty list is returned for empty triangle. * Example: \code{.py} @@ -157,8 +147,6 @@ QgsTriangle().angles() Convenient method checking if the geometry is degenerate (have duplicate or colinear point(s)). :return: True if the triangle is degenerate or empty, otherwise false. -:rtype: bool - Example: \code{.py} tri = QgsTriangle() @@ -179,11 +167,10 @@ tri.isDegenerate() bool isIsocele( double lengthTolerance = 0.0001 ) const; %Docstring Is the triangle isocele (two sides with the same length)? + :param lengthTolerance: The tolerance to use :return: True or False. Always false for empty triangle. -:rtype: bool - * Example: \code{.py} tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) ) @@ -200,11 +187,10 @@ QgsTriangle().isIsocele() bool isEquilateral( double lengthTolerance = 0.0001 ) const; %Docstring Is the triangle equilateral (three sides with the same length)? + :param lengthTolerance: The tolerance to use :return: True or False. Always false for empty triangle. -:rtype: bool - * Example: \code{.py} tri = QgsTriangle( QgsPoint( 10, 10 ), QgsPoint( 16, 10 ), QgsPoint( 13, 15.1962 ) ) @@ -221,11 +207,10 @@ QgsTriangle().isEquilateral() bool isRight( double angleTolerance = 0.0001 ) const; %Docstring Is the triangle right-angled? + :param angleTolerance: The tolerance to use :return: True or False. Always false for empty triangle. -:rtype: bool - * Example: \code{.py} tri = QgsTriangle( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 5, 5 ) ) @@ -242,11 +227,10 @@ QgsTriangle().isRight() bool isScalene( double lengthTolerance = 0.0001 ) const; %Docstring Is the triangle scalene (all sides have differen lengths)? + :param lengthTolerance: The tolerance to use :return: True or False. Always false for empty triangle. -:rtype: bool - * Example: \code{.py} tri = QgsTriangle( QgsPoint( 7.2825, 4.2368 ), QgsPoint( 13.0058, 3.3218 ), QgsPoint( 9.2145, 6.5242 ) ) @@ -265,8 +249,6 @@ QgsTriangle().isScalene() An altitude is a segment (defined by a QgsLineString) from a vertex to the opposite side (or, if necessary, to the extension of the opposite side). :return: Three altitudes from this triangle. -:rtype: list of QgsLineString - An empty list is returned for empty triangle. * Example: \code{.py} @@ -283,8 +265,6 @@ QgsTriangle().altitudes() A median is a segment (defined by a QgsLineString) from a vertex to the midpoint of the opposite side. :return: Three medians from this triangle. -:rtype: list of QgsLineString - An empty list is returned for empty triangle. * Example: \code{.py} @@ -299,11 +279,10 @@ QgsTriangle().medians() QVector bisectors( double lengthTolerance = 0.0001 ) const; %Docstring The segment (defined by a QgsLineString) returned bisect the angle of a vertex to the opposite side. + :param lengthTolerance: The tolerance to use. :return: Three angle bisector from this triangle. -:rtype: list of QgsLineString - An empty list is returned for empty triangle. * Example: \code{.py} @@ -320,8 +299,6 @@ QgsTriangle().bisectors() Medial (or midpoint) triangle of a triangle ABC is the triangle with vertices at the midpoints of the triangle's sides. :return: The medial from this triangle. -:rtype: QgsTriangle - An empty triangle is returned for empty triangle. * Example: \code{.py} @@ -336,11 +313,10 @@ QgsTriangle().medial().asWkt() QgsPoint orthocenter( double lengthTolerance = 0.0001 ) const; %Docstring An orthocenter is the point of intersection of the altitudes of a triangle. + :param lengthTolerance: The tolerance to use :return: The orthocenter of the triangle. -:rtype: QgsPoint - An empty point is returned for empty triangle. * Example: \code{.py} @@ -357,8 +333,6 @@ QgsTriangle().orthocenter().asWkt() Center of the circumscribed circle of the triangle. :return: The center of the circumscribed circle of the triangle. -:rtype: QgsPoint - An empty point is returned for empty triangle. * Example: \code{.py} @@ -375,8 +349,6 @@ QgsTriangle().circumscribedCenter().asWkt() Radius of the circumscribed circle of the triangle. :return: The radius of the circumscribed circle of the triangle. -:rtype: float - 0.0 is returned for empty triangle. * Example: \code{.py} @@ -393,8 +365,6 @@ QgsTriangle().circumscribedRadius() Circumscribed circle of the triangle. :return: The circumbscribed of the triangle with a QgsCircle. -:rtype: QgsCircle - An empty circle is returned for empty triangle. Example: \code{.py} @@ -411,8 +381,6 @@ QgsTriangle().circumscribedCircle() Center of the inscribed circle of the triangle. :return: The center of the inscribed circle of the triangle. -:rtype: QgsPoint - An empty point is returned for empty triangle. * Example: \code{.py} @@ -429,8 +397,6 @@ QgsTriangle().inscribedCenter().asWkt() Radius of the inscribed circle of the triangle. :return: The radius of the inscribed circle of the triangle. -:rtype: float - 0.0 is returned for empty triangle. * Example: \code{.py} @@ -447,8 +413,6 @@ QgsTriangle().inscribedRadius() Inscribed circle of the triangle. :return: The inscribed of the triangle with a QgsCircle. -:rtype: QgsCircle - An empty circle is returned for empty triangle. Example: \code{.py} diff --git a/python/core/geometry/qgswkbtypes.sip b/python/core/geometry/qgswkbtypes.sip index bfe1bdf54c8c..0ee132d1cb96 100644 --- a/python/core/geometry/qgswkbtypes.sip +++ b/python/core/geometry/qgswkbtypes.sip @@ -102,8 +102,6 @@ class QgsWkbTypes %Docstring Returns the single type for a WKB type. For example, for MultiPolygon WKB types the single type would be Polygon. -:rtype: Type - .. seealso:: :py:func:`isSingleType()` .. seealso:: :py:func:`multiType()` @@ -115,8 +113,6 @@ Returns the single type for a WKB type. For example, for MultiPolygon WKB types %Docstring Returns the multi type for a WKB type. For example, for Polygon WKB types the multi type would be MultiPolygon. -:rtype: Type - .. seealso:: :py:func:`isMultiType()` .. seealso:: :py:func:`singleType()` @@ -129,8 +125,6 @@ Returns the multi type for a WKB type. For example, for Polygon WKB types the mu Returns the flat type for a WKB type. This is the WKB type minus any Z or M dimensions. For example, for PolygonZM WKB types the single type would be Polygon. -:rtype: Type - .. seealso:: :py:func:`singleType()` .. seealso:: :py:func:`multiType()` @@ -139,24 +133,19 @@ For example, for PolygonZM WKB types the single type would be Polygon. static Type zmType( Type type, bool hasZ, bool hasM ); %Docstring Returns the modified input geometry type according to hasZ / hasM - -:rtype: Type %End static Type parseType( const QString &wktStr ); %Docstring Attempts to extract the WKB type from a WKT string. -:param wktStr: a valid WKT string -:rtype: Type +:param wktStr: a valid WKT string %End static bool isSingleType( Type type ); %Docstring Returns true if the WKB type is a single type. -:rtype: bool - .. seealso:: :py:func:`isMultiType()` .. seealso:: :py:func:`singleType()` @@ -166,8 +155,6 @@ Returns true if the WKB type is a single type. %Docstring Returns true if the WKB type is a multi type. -:rtype: bool - .. seealso:: :py:func:`isSingleType()` .. seealso:: :py:func:`multiType()` @@ -177,8 +164,6 @@ Returns true if the WKB type is a multi type. %Docstring Returns true if the WKB type is a curved type or can contain curved geometries. -:rtype: bool - .. versionadded:: 2.14 %End @@ -188,8 +173,6 @@ Returns the inherent dimension of the geometry type as an integer. Returned valu always be less than or equal to the coordinate dimension. :return: 0 for point geometries, 1 for line geometries, 2 for polygon geometries -:rtype: int - Invalid geometry types will return a dimension of 0. .. seealso:: :py:func:`coordDimensions()` @@ -201,8 +184,6 @@ Returns the coordinate dimension of the geometry type as an integer. Returned va be between 2-4, depending on whether the geometry type contains the Z or M dimensions. Invalid geometry types will return a dimension of 0. -:rtype: int - .. versionadded:: 2.14 .. seealso:: :py:func:`wkbDimensions()` @@ -213,15 +194,11 @@ Invalid geometry types will return a dimension of 0. Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a PolygonGeometry geometry type. GeometryCollections are reported as QgsWkbTypes.UnknownGeometry. - -:rtype: GeometryType %End static QString displayString( Type type ); %Docstring Returns a display string type for a WKB type, e.g., the geometry name used in WKT geometry representations. - -:rtype: str %End static QString geometryDisplayString( GeometryType type ); @@ -237,8 +214,6 @@ This will return one of the following strings: - No Geometry - Invalid Geometry -:rtype: str - .. versionadded:: 3.0 %End @@ -247,8 +222,6 @@ This will return one of the following strings: Tests whether a WKB type contains the z-dimension. :return: true if type has z values -:rtype: bool - .. seealso:: :py:func:`addZ()` @@ -260,8 +233,6 @@ Tests whether a WKB type contains the z-dimension. Tests whether a WKB type contains m values. :return: true if type has m values -:rtype: bool - .. seealso:: :py:func:`addM()` @@ -271,9 +242,8 @@ Tests whether a WKB type contains m values. static Type addZ( Type type ); %Docstring Adds the z dimension to a WKB type and returns the new type -:param type: original type -:rtype: Type +:param type: original type .. versionadded:: 2.12 @@ -287,9 +257,8 @@ Adds the z dimension to a WKB type and returns the new type static Type addM( Type type ); %Docstring Adds the m dimension to a WKB type and returns the new type -:param type: original type -:rtype: Type +:param type: original type .. versionadded:: 2.12 @@ -303,9 +272,8 @@ Adds the m dimension to a WKB type and returns the new type static Type dropZ( Type type ); %Docstring Drops the z dimension (if present) for a WKB type and returns the new type. -:param type: original type -:rtype: Type +:param type: original type .. versionadded:: 2.14 @@ -317,9 +285,8 @@ Drops the z dimension (if present) for a WKB type and returns the new type. static Type dropM( Type type ); %Docstring Drops the m dimension (if present) for a WKB type and returns the new type. -:param type: original type -:rtype: Type +:param type: original type .. versionadded:: 2.14 @@ -331,11 +298,10 @@ Drops the m dimension (if present) for a WKB type and returns the new type. static Type to25D( Type type ); %Docstring Will convert the 25D version of the flat type if supported or Unknown if not supported. + :param type: The type to convert :return: the 25D version of the type or Unknown -:rtype: Type - %End }; diff --git a/python/core/gps/qgsgpsconnection.sip b/python/core/gps/qgsgpsconnection.sip index b13ee77f1e4b..1496916da2ea 100644 --- a/python/core/gps/qgsgpsconnection.sip +++ b/python/core/gps/qgsgpsconnection.sip @@ -75,20 +75,17 @@ Abstract base class for connection to a GPS device* QgsGPSConnection( QIODevice *dev /Transfer/ ); %Docstring Constructor + :param dev: input device for the connection (e.g. serial device). The class takes ownership of the object %End ~QgsGPSConnection(); bool connect(); %Docstring Opens connection to device - -:rtype: bool %End bool close(); %Docstring Closes connection to device - -:rtype: bool %End void setSource( QIODevice *source /Transfer/ ); @@ -99,15 +96,11 @@ Sets the GPS source. The class takes ownership of the device class Status status() const; %Docstring Returns the status. Possible state are not connected, connected, data received - -:rtype: Status %End QgsGPSInformation currentGPSInformation() const; %Docstring Returns the current gps information (lat, lon, etc.) - -:rtype: QgsGPSInformation %End signals: diff --git a/python/core/gps/qgsgpsconnectionregistry.sip b/python/core/gps/qgsgpsconnectionregistry.sip index 160e6460f1e4..6f4960c86465 100644 --- a/python/core/gps/qgsgpsconnectionregistry.sip +++ b/python/core/gps/qgsgpsconnectionregistry.sip @@ -43,10 +43,6 @@ Unregisters connection. The registry does no longer own the connection %End QList< QgsGPSConnection *> connectionList() const; -%Docstring - -:rtype: list of QgsGPSConnection -%End private: QgsGPSConnectionRegistry( const QgsGPSConnectionRegistry &rh ); diff --git a/python/core/gps/qgsgpsdetector.sip b/python/core/gps/qgsgpsdetector.sip index 51afa4104f07..20da06a19332 100644 --- a/python/core/gps/qgsgpsdetector.sip +++ b/python/core/gps/qgsgpsdetector.sip @@ -25,10 +25,6 @@ Class to detect the GPS port ~QgsGPSDetector(); static QList< QPair > availablePorts(); -%Docstring - -:rtype: list of QPair -%End public slots: void advance(); diff --git a/python/core/layertree/qgslayertree.sip b/python/core/layertree/qgslayertree.sip index 6740cdd9d513..f5bf98f4da2f 100644 --- a/python/core/layertree/qgslayertree.sip +++ b/python/core/layertree/qgslayertree.sip @@ -28,8 +28,6 @@ with the layer tree are in QgsLayerTreeUtils class. %Docstring Check whether the node is a valid group node -:rtype: bool - .. versionadded:: 2.4 %End @@ -37,8 +35,6 @@ Check whether the node is a valid group node %Docstring Check whether the node is a valid layer node -:rtype: bool - .. versionadded:: 2.4 %End @@ -56,8 +52,6 @@ The order in which layers will be rendered on the canvas. Will only be used if the property hasCustomLayerOrder is true. If you need the current layer order that is active, prefer using layerOrder(). -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`setCustomLayerOrder` .. seealso:: :py:func:`layerOrder` @@ -104,8 +98,6 @@ Depending on hasCustomLayerOrder, this will return either the override customLayerOrder or the layer order derived from the tree. This property is read only. -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`customLayerOrder` .. versionadded:: 3.0 @@ -116,8 +108,6 @@ This property is read only. Determines if the layer order should be derived from the layer tree or if a custom override order shall be used instead. -:rtype: bool - .. seealso:: :py:func:`customLayerOrder` .. versionadded:: 3.0 @@ -140,8 +130,6 @@ It is not required that layers are loaded at this point. resolveReferences() needs to be called after loading the layers and before using the tree. -:rtype: QgsLayerTree - .. versionadded:: 3.0 %End diff --git a/python/core/layertree/qgslayertreegroup.sip b/python/core/layertree/qgslayertreegroup.sip index fd298d59eb84..e903b40c27d5 100644 --- a/python/core/layertree/qgslayertreegroup.sip +++ b/python/core/layertree/qgslayertreegroup.sip @@ -34,8 +34,6 @@ Constructor %Docstring Returns the group's name. - -:rtype: str %End virtual void setName( const QString &n ); @@ -47,29 +45,21 @@ Sets the group's name. QgsLayerTreeGroup *insertGroup( int index, const QString &name ); %Docstring Insert a new group node with given name at specified position. The newly created node is owned by this group. - -:rtype: QgsLayerTreeGroup %End QgsLayerTreeGroup *addGroup( const QString &name ); %Docstring Append a new group node with given name. Newly created node is owned by this group. - -:rtype: QgsLayerTreeGroup %End QgsLayerTreeLayer *insertLayer( int index, QgsMapLayer *layer ); %Docstring Insert a new layer node for given map layer at specified position. The newly created node is owned by this group. - -:rtype: QgsLayerTreeLayer %End QgsLayerTreeLayer *addLayer( QgsMapLayer *layer ); %Docstring Append a new layer node for given map layer. The newly created node is owned by this group. - -:rtype: QgsLayerTreeLayer %End void insertChildNodes( int index, const QList &nodes /Transfer/ ); @@ -116,45 +106,33 @@ Remove all child nodes. The nodes will be deleted. %Docstring Find layer node representing the map layer. Searches recursively the whole sub-tree. -:rtype: QgsLayerTreeLayer - .. versionadded:: 3.0 %End QgsLayerTreeLayer *findLayer( const QString &layerId ) const; %Docstring Find layer node representing the map layer specified by its ID. Searches recursively the whole sub-tree. - -:rtype: QgsLayerTreeLayer %End QList findLayers() const; %Docstring Find all layer nodes. Searches recursively the whole sub-tree. - -:rtype: list of QgsLayerTreeLayer %End QStringList findLayerIds() const; %Docstring Find layer IDs used in all layer nodes. Searches recursively the whole sub-tree. - -:rtype: list of str %End QgsLayerTreeGroup *findGroup( const QString &name ); %Docstring Find group node with specified name. Searches recursively the whole sub-tree. - -:rtype: QgsLayerTreeGroup %End static QgsLayerTreeGroup *readXml( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Read group (tree) from XML element and return the newly created group (or null on error). Does not resolve textual references to layers. Call resolveReferences() afterwards to do it. - -:rtype: QgsLayerTreeGroup %End static QgsLayerTreeGroup *readXml( QDomElement &element, const QgsProject *project, const QgsReadWriteContext &context ) /Factory/; @@ -162,8 +140,6 @@ Does not resolve textual references to layers. Call resolveReferences() afterwar Read group (tree) from XML element and return the newly created group (or null on error). Also resolves textual references to layers from the project (calls resolveReferences() internally). -:rtype: QgsLayerTreeGroup - .. versionadded:: 3.0 %End @@ -183,16 +159,12 @@ Does not resolve textual references to layers. Call resolveReferences() afterwar %Docstring Return text representation of the tree. For debugging purposes only. - -:rtype: str %End virtual QgsLayerTreeGroup *clone() const /Factory/; %Docstring Return a clone of the group. The children are cloned too. - -:rtype: QgsLayerTreeGroup %End virtual void resolveReferences( const QgsProject *project, bool looseMatching = false ); @@ -213,8 +185,6 @@ Check or uncheck a node and all its children (taking into account exclusion rule %Docstring Return whether the group is mutually exclusive (only one child can be checked at a time) -:rtype: bool - .. versionadded:: 2.12 %End diff --git a/python/core/layertree/qgslayertreelayer.sip b/python/core/layertree/qgslayertreelayer.sip index 2b1295c9472e..05a0bead2e1a 100644 --- a/python/core/layertree/qgslayertreelayer.sip +++ b/python/core/layertree/qgslayertreelayer.sip @@ -39,24 +39,14 @@ Constructor for QgsLayerTreeLayer using weak references to layer ID, ``name``, p %End QString layerId() const; -%Docstring - -:rtype: str -%End QgsMapLayer *layer() const; -%Docstring - -:rtype: QgsMapLayer -%End virtual QString name() const; %Docstring Returns the layer's name. -:rtype: str - .. versionadded:: 3.0 %End @@ -72,8 +62,6 @@ Sets the layer's name. %Docstring Read layer node from XML. Returns new instance. Does not resolve textual references to layers. Call resolveReferences() afterwards to do it. - -:rtype: QgsLayerTreeLayer %End static QgsLayerTreeLayer *readXml( QDomElement &element, const QgsProject *project, const QgsReadWriteContext &context ) /Factory/; @@ -81,8 +69,6 @@ Does not resolve textual references to layers. Call resolveReferences() afterwar Read layer node from XML. Returns new instance. Also resolves textual references to layers from the project (calls resolveReferences() internally). -:rtype: QgsLayerTreeLayer - .. versionadded:: 3.0 %End diff --git a/python/core/layertree/qgslayertreemodel.sip b/python/core/layertree/qgslayertreemodel.sip index ed79c1fb0086..5d78d7eed7ae 100644 --- a/python/core/layertree/qgslayertreemodel.sip +++ b/python/core/layertree/qgslayertreemodel.sip @@ -103,28 +103,20 @@ Enable or disable a model flag Flags flags() const; %Docstring Return OR-ed combination of model flags - -:rtype: Flags %End bool testFlag( Flag f ) const; %Docstring Check whether a flag is enabled - -:rtype: bool %End QgsLayerTreeNode *index2node( const QModelIndex &index ) const; %Docstring Return layer tree node for given index. Returns root node for invalid index. Returns null pointer if index does not refer to a layer tree node (e.g. it is a legend node) - -:rtype: QgsLayerTreeNode %End QModelIndex node2index( QgsLayerTreeNode *node ) const; %Docstring Return index for a given node. If the node does not belong to the layer tree, the result is undefined - -:rtype: QModelIndex %End QList indexes2nodes( const QModelIndexList &list, bool skipInternal = false ) const; @@ -132,16 +124,12 @@ Return index for a given node. If the node does not belong to the layer tree, th Convert a ``list`` of indexes to a list of layer tree nodes. Indices that do not represent layer tree nodes are skipped. If ``skipInternal`` is true, a node is included in the output list only if no parent node is in the list. - -:rtype: list of QgsLayerTreeNode %End static QgsLayerTreeModelLegendNode *index2legendNode( const QModelIndex &index ); %Docstring Return legend node for given index. Returns null for invalid index -:rtype: QgsLayerTreeModelLegendNode - .. versionadded:: 2.6 %End @@ -150,8 +138,6 @@ Return legend node for given index. Returns null for invalid index Return index for a given legend node. If the legend node does not belong to the layer tree, the result is undefined. If the legend node is belongs to the tree but it is filtered out, invalid model index is returned. -:rtype: QModelIndex - .. versionadded:: 2.6 %End @@ -160,8 +146,6 @@ If the legend node is belongs to the tree but it is filtered out, invalid model Return filtered list of active legend nodes attached to a particular layer node (by default it returns also legend node embedded in parent layer node (if any) unless skipNodeEmbeddedInParent is true) -:rtype: list of QgsLayerTreeModelLegendNode - .. versionadded:: 2.6 .. note:: @@ -175,8 +159,6 @@ Return filtered list of active legend nodes attached to a particular layer node %Docstring Return original (unfiltered) list of legend nodes attached to a particular layer node -:rtype: list of QgsLayerTreeModelLegendNode - .. versionadded:: 2.14 .. seealso:: :py:func:`layerLegendNodes()` @@ -186,8 +168,6 @@ Return original (unfiltered) list of legend nodes attached to a particular layer %Docstring Return legend node that may be embedded in parent (i.e. its icon will be used for layer's icon). -:rtype: QgsLayerTreeModelLegendNode - .. versionadded:: 2.18 %End @@ -195,12 +175,11 @@ Return legend node that may be embedded in parent (i.e. its icon will be used fo %Docstring Searches through the layer tree to find a legend node with a matching layer ID and rule key. + :param layerId: map layer ID :param ruleKey: legend node rule key :return: QgsLayerTreeModelLegendNode if found -:rtype: QgsLayerTreeModelLegendNode - .. versionadded:: 2.14 %End @@ -208,8 +187,6 @@ and rule key. QgsLayerTree *rootGroup() const; %Docstring Return pointer to the root node of the layer tree. Always a non-null pointer. - -:rtype: QgsLayerTree %End void setRootGroup( QgsLayerTree *newRootGroup ); @@ -228,8 +205,6 @@ Not necessary to call when layer's renderer is changed as the model listens to t QModelIndex currentIndex() const; %Docstring Get index of the item marked as current. Item marked as current is underlined. - -:rtype: QModelIndex %End void setCurrentIndex( const QModelIndex ¤tIndex ); %Docstring @@ -243,8 +218,6 @@ Set font for a particular type of layer tree node. nodeType should come from Qgs QFont layerTreeNodeFont( int nodeType ) const; %Docstring Get font for a particular type of layer tree node. nodeType should come from QgsLayerTreeNode.NodeType enumeration - -:rtype: QFont %End void setAutoCollapseLegendNodes( int nodeCount ); @@ -254,8 +227,6 @@ Set at what number of legend nodes the layer node should be collapsed. Setting - int autoCollapseLegendNodes() const; %Docstring Return at what number of legend nodes the layer node should be collapsed. -1 means no auto-collapse (default). - -:rtype: int %End void setLegendFilterByScale( double scale ); @@ -275,8 +246,6 @@ Returns the scale which restricts the legend nodes which are visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale <= 0 indicates that no scale filtering is being performed. -:rtype: float - .. versionadded:: 2.6 .. seealso:: :py:func:`setLegendFilterByScale()` @@ -294,6 +263,7 @@ Ownership of map settings pointer does not change, a copy is made. void setLegendFilter( const QgsMapSettings *settings, bool useExtent = true, const QgsGeometry &polygon = QgsGeometry(), bool useExpressions = true ); %Docstring Filter display of legend nodes for given map settings + :param settings: Map settings. Setting a null pointer or invalid settings will disable any filter. Ownership is not changed, a copy is made :param useExtent: Whether to use the extent of the map settings as a first spatial filter on legend nodes :param polygon: If not empty, this polygon will be used instead of the map extent to filter legend nodes @@ -306,8 +276,6 @@ Filter display of legend nodes for given map settings %Docstring Returns the current map settings used for the current legend filter (or null if none is enabled) -:rtype: QgsMapSettings - .. versionadded:: 2.14 %End @@ -331,8 +299,6 @@ If there are no valid map view data (from previous call to setLegendMapViewData( %Docstring Get map of map layer style overrides (key: layer ID, value: style name) where a different style should be used instead of the current one -:rtype: QMap - .. versionadded:: 2.10 %End @@ -396,69 +362,23 @@ Emits dataChanged() for all scale dependent layers. %End static QIcon iconGroup(); -%Docstring - -:rtype: QIcon -%End QList filterLegendNodes( const QList &nodes ); %Docstring Filter nodes from QgsMapLayerLegend according to the current filtering rules - -:rtype: list of QgsLayerTreeModelLegendNode %End QModelIndex indexOfParentLayerTreeNode( QgsLayerTreeNode *parentNode ) const; -%Docstring - -:rtype: QModelIndex -%End int legendRootRowCount( QgsLayerTreeLayer *nL ) const; -%Docstring - -:rtype: int -%End int legendNodeRowCount( QgsLayerTreeModelLegendNode *node ) const; -%Docstring - -:rtype: int -%End QModelIndex legendRootIndex( int row, int column, QgsLayerTreeLayer *nL ) const; -%Docstring - -:rtype: QModelIndex -%End QModelIndex legendNodeIndex( int row, int column, QgsLayerTreeModelLegendNode *node ) const; -%Docstring - -:rtype: QModelIndex -%End QModelIndex legendParent( QgsLayerTreeModelLegendNode *legendNode ) const; -%Docstring - -:rtype: QModelIndex -%End QVariant legendNodeData( QgsLayerTreeModelLegendNode *node, int role ) const; -%Docstring - -:rtype: QVariant -%End Qt::ItemFlags legendNodeFlags( QgsLayerTreeModelLegendNode *node ) const; -%Docstring - -:rtype: Qt.ItemFlags -%End bool legendEmbeddedInParent( QgsLayerTreeLayer *nodeLayer ) const; -%Docstring - -:rtype: bool -%End QIcon legendIconEmbeddedInParent( QgsLayerTreeLayer *nodeLayer ) const; -%Docstring - -:rtype: QIcon -%End void legendCleanup(); void legendInvalidateMapBasedData(); diff --git a/python/core/layertree/qgslayertreemodellegendnode.sip b/python/core/layertree/qgslayertreemodellegendnode.sip index 3a02ba85ce4c..b95623be0aa2 100644 --- a/python/core/layertree/qgslayertreemodellegendnode.sip +++ b/python/core/layertree/qgslayertreemodellegendnode.sip @@ -38,57 +38,35 @@ and customized look. QgsLayerTreeLayer *layerNode() const; %Docstring Return pointer to the parent layer node - -:rtype: QgsLayerTreeLayer %End QgsLayerTreeModel *model() const; %Docstring Return pointer to model owning this legend node - -:rtype: QgsLayerTreeModel %End virtual Qt::ItemFlags flags() const; %Docstring Return item flags associated with the item. Default implementation returns Qt.ItemIsEnabled. - -:rtype: Qt.ItemFlags %End virtual QVariant data( int role ) const = 0; %Docstring Return data associated with the item. Must be implemented in derived class. - -:rtype: QVariant %End virtual bool setData( const QVariant &value, int role ); %Docstring Set some data associated with the item. Default implementation does nothing and returns false. - -:rtype: bool %End virtual bool isEmbeddedInParent() const; -%Docstring - -:rtype: bool -%End virtual void setEmbeddedInParent( bool embedded ); virtual QString userLabel() const; -%Docstring - -:rtype: str -%End virtual void setUserLabel( const QString &userLabel ); virtual bool isScaleOK( double scale ) const; -%Docstring - -:rtype: bool -%End virtual void invalidateMapBasedData(); %Docstring @@ -124,32 +102,28 @@ Entry point called from QgsLegendRenderer to do the rendering. Default implementation calls drawSymbol() and drawSymbolText() methods. If ctx is null, this is just first stage when preparing layout - without actual rendering. - -:rtype: ItemMetrics %End virtual QSizeF drawSymbol( const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight ) const; %Docstring Draws symbol on the left side of the item + :param settings: Legend layout configuration :param ctx: Context for rendering - may be null if only doing layout without actual rendering :param itemHeight: Minimal height of the legend item - used for correct positioning when rendering :return: Real size of the symbol (may be bigger than "normal" symbol size from settings) -:rtype: QSizeF - %End virtual QSizeF drawSymbolText( const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize ) const; %Docstring Draws label on the right side of the item + :param settings: Legend layout configuration :param ctx: Context for rendering - may be null if only doing layout without actual rendering :param symbolSize: Real size of the associated symbol - used for correct positioning when rendering :return: Size of the label (may span multiple lines) -:rtype: QSizeF - %End signals: @@ -167,8 +141,6 @@ Construct the node with pointer to its parent layer node QgsRenderContext *createTemporaryRenderContext() const /Factory/; %Docstring Returns a temporary context or null if legendMapViewData are not valid - -:rtype: QgsRenderContext %End protected: @@ -192,6 +164,7 @@ and allowing interaction with the symbol / renderer. QgsSymbolLegendNode( QgsLayerTreeLayer *nodeLayer, const QgsLegendSymbolItem &item, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSymbolLegendNode. + :param nodeLayer: layer node :param item: the legend symbol item :param parent: attach a parent QObject to the legend node. @@ -226,8 +199,6 @@ Set the icon size QSize iconSize() const; %Docstring -:rtype: QSize - .. versionadded:: 2.10 %End @@ -238,8 +209,6 @@ the size for multiple icons it is more efficient to create a single render context in advance and use the variant which accepts a QgsRenderContext argument. -:rtype: QSize - .. versionadded:: 2.10 %End @@ -249,8 +218,6 @@ Calculates the minimum icon size to prevent cropping. When evaluating the size for multiple icons it is more efficient to create a single render context in advance and call this method instead of minimumIconSize(). -:rtype: QSize - .. versionadded:: 2.18 %End @@ -258,8 +225,6 @@ render context in advance and call this method instead of minimumIconSize(). %Docstring Returns the symbol used by the legend node. -:rtype: QgsSymbol - .. seealso:: :py:func:`setSymbol()` .. versionadded:: 2.14 @@ -269,6 +234,7 @@ Returns the symbol used by the legend node. %Docstring Sets the symbol to be used by the legend node. The symbol change is also propagated to the associated vector layer's renderer. + :param symbol: new symbol for node. Ownership is transferred. .. seealso:: :py:func:`symbol()` @@ -315,6 +281,7 @@ Implementation of legend node interface for displaying arbitrary label with icon QgsSimpleLegendNode( QgsLayerTreeLayer *nodeLayer, const QString &label, const QIcon &icon = QIcon(), QObject *parent /TransferThis/ = 0, const QString &key = QString() ); %Docstring Constructor for QgsSimpleLegendNode. + :param nodeLayer: layer node :param label: label :param icon: icon @@ -344,6 +311,7 @@ Implementation of legend node interface for displaying arbitrary raster image QgsImageLegendNode( QgsLayerTreeLayer *nodeLayer, const QImage &img, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsImageLegendNode. + :param nodeLayer: layer node :param img: the image :param parent: attach a parent QObject to the legend node. @@ -373,6 +341,7 @@ Implementation of legend node interface for displaying raster legend entries QgsRasterSymbolLegendNode( QgsLayerTreeLayer *nodeLayer, const QColor &color, const QString &label, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsRasterSymbolLegendNode. + :param nodeLayer: layer node :param color: color :param label: label @@ -404,6 +373,7 @@ Implementation of legend node interface for displaying WMS legend entries QgsWmsLegendNode( QgsLayerTreeLayer *nodeLayer, QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsWmsLegendNode. + :param nodeLayer: layer node :param parent: attach a parent QObject to the legend node. %End diff --git a/python/core/layertree/qgslayertreenode.sip b/python/core/layertree/qgslayertreenode.sip index b16c987294ae..6ee592e86d05 100644 --- a/python/core/layertree/qgslayertreenode.sip +++ b/python/core/layertree/qgslayertreenode.sip @@ -86,28 +86,20 @@ Custom properties that have already been used within QGIS: NodeType nodeType() const; %Docstring Find out about type of the node. It is usually shorter to use convenience functions from QgsLayerTree namespace for that - -:rtype: NodeType %End QgsLayerTreeNode *parent(); %Docstring Get pointer to the parent. If parent is a null pointer, the node is a root node - -:rtype: QgsLayerTreeNode %End QList children(); %Docstring Get list of children of the node. Children are owned by the parent - -:rtype: list of QgsLayerTreeNode %End virtual QString name() const = 0; %Docstring Return name of the node -:rtype: str - .. versionadded:: 3.0 %End @@ -122,8 +114,6 @@ Set name of the node. Emits nameChanged signal. %Docstring Read layer tree from XML. Returns new instance. Does not resolve textual references to layers. Call resolveReferences() afterwards to do it. - -:rtype: QgsLayerTreeNode %End static QgsLayerTreeNode *readXml( QDomElement &element, const QgsProject *project ) /Factory/; @@ -131,8 +121,6 @@ Does not resolve textual references to layers. Call resolveReferences() afterwar Read layer tree from XML. Returns new instance. Also resolves textual references to layers from the project (calls resolveReferences() internally). -:rtype: QgsLayerTreeNode - .. versionadded:: 3.0 %End @@ -144,15 +132,11 @@ Write layer tree to XML virtual QString dump() const = 0; %Docstring Return string with layer tree structure. For debug purposes only - -:rtype: str %End virtual QgsLayerTreeNode *clone() const = 0 /Factory/; %Docstring Create a copy of the node. Returns new instance - -:rtype: QgsLayerTreeNode %End virtual void resolveReferences( const QgsProject *project, bool looseMatching = false ) = 0; @@ -171,8 +155,6 @@ will have different layer IDs. %Docstring Returns whether a node is really visible (ie checked and all its ancestors checked as well) -:rtype: bool - .. versionadded:: 3.0 %End @@ -180,8 +162,6 @@ Returns whether a node is really visible (ie checked and all its ancestors check %Docstring Returns whether a node is checked (independently of its ancestors or children) -:rtype: bool - .. versionadded:: 3.0 %End @@ -210,8 +190,6 @@ Check or uncheck a node and all its parents %Docstring Return whether this node is checked and all its children. -:rtype: bool - .. versionadded:: 3.0 %End @@ -219,8 +197,6 @@ Return whether this node is checked and all its children. %Docstring Return whether this node is unchecked and all its children. -:rtype: bool - .. versionadded:: 3.0 %End @@ -229,16 +205,12 @@ Return whether this node is unchecked and all its children. Returns a list of any checked layers which belong to this node or its children. -:rtype: list of QgsMapLayer - .. versionadded:: 3.0 %End bool isExpanded() const; %Docstring Return whether the node should be shown as expanded or collapsed in GUI - -:rtype: bool %End void setExpanded( bool expanded ); %Docstring @@ -252,8 +224,6 @@ Set a custom property for the node. Properties are stored in a map and saved in QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const; %Docstring Read a custom property from layer. Properties are stored in a map and saved in project file. - -:rtype: QVariant %End void removeCustomProperty( const QString &key ); %Docstring @@ -262,14 +232,10 @@ Remove a custom property from layer. Properties are stored in a map and saved in QStringList customProperties() const; %Docstring Return list of keys stored in custom properties - -:rtype: list of str %End bool takeChild( QgsLayerTreeNode *node ); %Docstring Remove a child from a node - -:rtype: bool %End signals: diff --git a/python/core/layertree/qgslayertreeregistrybridge.sip b/python/core/layertree/qgslayertreeregistrybridge.sip index 96d97fb38261..641d15cb81c9 100644 --- a/python/core/layertree/qgslayertreeregistrybridge.sip +++ b/python/core/layertree/qgslayertreeregistrybridge.sip @@ -37,17 +37,9 @@ Create the instance that synchronizes given project with a layer tree root void setEnabled( bool enabled ); bool isEnabled() const; -%Docstring - -:rtype: bool -%End void setNewLayersVisible( bool enabled ); bool newLayersVisible() const; -%Docstring - -:rtype: bool -%End void setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ); %Docstring diff --git a/python/core/layertree/qgslayertreeutils.sip b/python/core/layertree/qgslayertreeutils.sip index 0c065e0ed4ee..06fb9e8d9160 100644 --- a/python/core/layertree/qgslayertreeutils.sip +++ b/python/core/layertree/qgslayertreeutils.sip @@ -26,46 +26,32 @@ Assorted functions for dealing with layer trees. static bool readOldLegend( QgsLayerTreeGroup *root, const QDomElement &legendElem ); %Docstring Try to load layer tree from \verbatim \endverbatim tag from project files from QGIS 2.2 and below - -:rtype: bool %End static bool readOldLegendLayerOrder( const QDomElement &legendElem, bool &hasCustomOrder, QStringList &order ); %Docstring Try to load custom layer order from \verbatim \endverbatim tag from project files from QGIS 2.2 and below - -:rtype: bool %End static QDomElement writeOldLegend( QDomDocument &doc, QgsLayerTreeGroup *root, bool hasCustomOrder, const QList &order ); %Docstring Return \verbatim \endverbatim tag used in QGIS 2.2 and below - -:rtype: QDomElement %End static QString checkStateToXml( Qt::CheckState state ); %Docstring Convert Qt.CheckState to QString - -:rtype: str %End static Qt::CheckState checkStateFromXml( const QString &txt ); %Docstring Convert QString to Qt.CheckState - -:rtype: Qt.CheckState %End static bool layersEditable( const QList &layerNodes ); %Docstring Return true if any of the layers is editable - -:rtype: bool %End static bool layersModified( const QList &layerNodes ); %Docstring Return true if any of the layers is modified - -:rtype: bool %End static void removeInvalidLayers( QgsLayerTreeGroup *group ); @@ -89,8 +75,6 @@ Remove subtree of embedded groups and replaces it with a custom property embedde static QStringList invisibleLayerList( QgsLayerTreeNode *node ); %Docstring get invisible layers - -:rtype: list of str %End static void setLegendFilterByExpression( QgsLayerTreeLayer &layer, const QString &expr, bool enabled = true ); @@ -100,26 +84,21 @@ Set the expression filter of a legend layer static QString legendFilterByExpression( const QgsLayerTreeLayer &layer, bool *enabled = 0 ); %Docstring Return the expression filter of a legend layer - -:rtype: str %End static bool hasLegendFilterExpression( const QgsLayerTreeGroup &group ); %Docstring Test if one of the layers in a group has an expression filter - -:rtype: bool %End static QgsLayerTreeLayer *insertLayerBelow( QgsLayerTreeGroup *group, const QgsMapLayer *refLayer, QgsMapLayer *layerToInsert ); %Docstring Insert a QgsMapLayer just below another one + :param group: the tree group where layers are (can be the root group) :param refLayer: the reference layer :param layerToInsert: the new layer to insert just below the reference layer :return: the new tree layer -:rtype: QgsLayerTreeLayer - %End }; diff --git a/python/core/layout/qgslayout.sip b/python/core/layout/qgslayout.sip index eb1d8e36c20a..c05886882594 100644 --- a/python/core/layout/qgslayout.sip +++ b/python/core/layout/qgslayout.sip @@ -61,31 +61,23 @@ Calling this method removes all items and pages from the layout. %Docstring The project associated with the layout. Used to get access to layers, map themes, relations and various other bits. It is never null. - -:rtype: QgsProject %End QgsLayoutModel *itemsModel(); %Docstring Returns the items model attached to the layout. - -:rtype: QgsLayoutModel %End QgsLayoutExporter &exporter(); %Docstring Returns the layout's exporter, which is used for rendering the layout and exporting to various formats. - -:rtype: QgsLayoutExporter %End QString name() const; %Docstring Returns the layout's name. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -103,8 +95,6 @@ Returns list of selected layout items. If ``includeLockedItems`` is set to true, then locked items will also be included in the returned list. - -:rtype: list of QgsLayoutItem %End void setSelectedItem( QgsLayoutItem *item ); @@ -130,8 +120,6 @@ to reflect the new stacking order. This allows multiple raiseItem() calls to be made in sequence without the cost of updating the scene for each one. -:rtype: bool - .. seealso:: :py:func:`lowerItem()` .. seealso:: :py:func:`updateZValues()` @@ -147,8 +135,6 @@ to reflect the new stacking order. This allows multiple raiseItem() calls to be made in sequence without the cost of updating the scene for each one. -:rtype: bool - .. seealso:: :py:func:`raiseItem()` .. seealso:: :py:func:`updateZValues()` @@ -164,8 +150,6 @@ to reflect the new stacking order. This allows multiple raiseItem() calls to be made in sequence without the cost of updating the scene for each one. -:rtype: bool - .. seealso:: :py:func:`moveItemToBottom()` .. seealso:: :py:func:`updateZValues()` @@ -180,8 +164,6 @@ to reflect the new stacking order. This allows multiple raiseItem() calls to be made in sequence without the cost of updating the scene for each one. -:rtype: bool - .. seealso:: :py:func:`moveItemToTop()` .. seealso:: :py:func:`updateZValues()` @@ -202,8 +184,6 @@ if a matching item could not be found. If ``includeTemplateUuids`` is true, then item's QgsLayoutItem.templateUuid() will also be tested when trying to match the uuid. -:rtype: QgsLayoutItem - .. seealso:: :py:func:`multiFrameByUuid()` %End @@ -212,8 +192,6 @@ will also be tested when trying to match the uuid. Returns the layout multiframe with matching ``uuid`` unique identifier, or a None if a matching multiframe could not be found. -:rtype: QgsLayoutMultiFrame - .. seealso:: :py:func:`itemByUuid()` %End @@ -221,16 +199,12 @@ if a matching multiframe could not be found. %Docstring Returns the topmost layout item at a specified ``position``. Ignores paper items. If ``ignoreLocked`` is set to true any locked items will be ignored. - -:rtype: QgsLayoutItem %End QgsLayoutItem *layoutItemAt( QPointF position, const QgsLayoutItem *belowItem, const bool ignoreLocked = false ) const; %Docstring Returns the topmost composer item at a specified ``position`` which is below a specified ``item``. Ignores paper items. If ``ignoreLocked`` is set to true any locked items will be ignored. - -:rtype: QgsLayoutItem %End void setUnits( QgsUnitTypes::LayoutUnit units ); @@ -247,8 +221,6 @@ for measurements for the layout. %Docstring Returns the native units for the layout. -:rtype: QgsUnitTypes.LayoutUnit - .. seealso:: :py:func:`setUnits()` .. seealso:: :py:func:`convertToLayoutUnits()` @@ -259,8 +231,6 @@ Returns the native units for the layout. Converts a measurement into the layout's native units. :return: length of measurement in layout units -:rtype: float - .. seealso:: :py:func:`convertFromLayoutUnits()` @@ -272,8 +242,6 @@ Converts a measurement into the layout's native units. Converts a size into the layout's native units. :return: size of measurement in layout units -:rtype: QSizeF - .. seealso:: :py:func:`convertFromLayoutUnits()` @@ -285,8 +253,6 @@ Converts a size into the layout's native units. Converts a ``point`` into the layout's native units. :return: point in layout units -:rtype: QPointF - .. seealso:: :py:func:`convertFromLayoutUnits()` @@ -298,8 +264,6 @@ Converts a ``point`` into the layout's native units. Converts a ``length`` measurement from the layout's native units to a specified target ``unit``. :return: length of measurement in specified units -:rtype: QgsLayoutMeasurement - .. seealso:: :py:func:`convertToLayoutUnits()` @@ -311,8 +275,6 @@ Converts a ``length`` measurement from the layout's native units to a specified Converts a ``size`` from the layout's native units to a specified target ``unit``. :return: size of measurement in specified units -:rtype: QgsLayoutSize - .. seealso:: :py:func:`convertToLayoutUnits()` @@ -324,8 +286,6 @@ Converts a ``size`` from the layout's native units to a specified target ``unit` Converts a ``point`` from the layout's native units to a specified target ``unit``. :return: point in specified units -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`convertToLayoutUnits()` @@ -336,8 +296,6 @@ Converts a ``point`` from the layout's native units to a specified target ``unit %Docstring Returns a reference to the layout's context, which stores information relating to the current context and rendering settings for the layout. - -:rtype: QgsLayoutContext %End @@ -345,8 +303,6 @@ current context and rendering settings for the layout. %Docstring Returns a reference to the layout's snapper, which stores handles layout snap grids and lines and snapping points to the nearest matching point. - -:rtype: QgsLayoutSnapper %End @@ -354,16 +310,12 @@ and snapping points to the nearest matching point. %Docstring Returns a reference to the layout's grid settings, which stores settings relating to grid appearance, spacing and offsets. - -:rtype: QgsLayoutGridSettings %End QgsLayoutGuideCollection &guides(); %Docstring Returns a reference to the layout's guide collection, which manages page snap guides. - -:rtype: QgsLayoutGuideCollection %End @@ -372,13 +324,12 @@ Returns a reference to the layout's guide collection, which manages page snap gu %Docstring Creates an expression context relating to the layout's current state. The context includes scopes for global, project, layout and layout context properties. - -:rtype: QgsExpressionContext %End void setCustomProperty( const QString &key, const QVariant &value ); %Docstring Set a custom property for the layout. + :param key: property key. If a property with the same key already exists it will be overwritten. :param value: property value @@ -392,12 +343,11 @@ Set a custom property for the layout. QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const; %Docstring Read a custom property from the layout. + :param key: property key :param defaultValue: default value to return if property with matching key does not exist :return: value of matching property -:rtype: QVariant - .. seealso:: :py:func:`setCustomProperty()` @@ -409,6 +359,7 @@ Read a custom property from the layout. void removeCustomProperty( const QString &key ); %Docstring Remove a custom property from the layout. + :param key: property key .. seealso:: :py:func:`setCustomProperty()` @@ -422,8 +373,6 @@ Remove a custom property from the layout. %Docstring Return list of keys stored in custom properties for the layout. -:rtype: list of str - .. seealso:: :py:func:`setCustomProperty()` .. seealso:: :py:func:`customProperty()` @@ -432,10 +381,6 @@ Return list of keys stored in custom properties for the layout. %End QgsLayoutItemMap *referenceMap() const; -%Docstring - -:rtype: QgsLayoutItemMap -%End void setReferenceMap( QgsLayoutItemMap *map ); @@ -443,8 +388,6 @@ Return list of keys stored in custom properties for the layout. %Docstring Returns a pointer to the layout's page collection, which stores and manages page items in the layout. - -:rtype: QgsLayoutPageCollection %End @@ -452,12 +395,11 @@ page items in the layout. %Docstring Calculates the bounds of all non-gui items in the layout. Ignores snap lines, mouse handles and other cosmetic items. + :param ignorePages: set to true to ignore page items :param margin: optional marginal (in percent, e.g., 0.05 = 5% ) to add around items :return: layout bounds, in layout units. -:rtype: QRectF - %End void addLayoutItem( QgsLayoutItem *item /Transfer/ ); @@ -495,8 +437,6 @@ Removes a ``multiFrame`` from the layout (but does not delete it). %Docstring Returns a list of multi frames contained in the layout. -:rtype: list of QgsLayoutMultiFrame - .. seealso:: :py:func:`addMultiFrame()` .. seealso:: :py:func:`removeMultiFrame()` @@ -507,8 +447,6 @@ Returns a list of multi frames contained in the layout. Saves the layout as a template at the given file ``path``. Returns true if save was successful. -:rtype: bool - .. seealso:: :py:func:`loadFromTemplate()` %End @@ -523,16 +461,12 @@ from the template, without overwriting the existing items or layout settings. If ``ok`` is specified, it will be set to true if the load was successful. Returns a list of loaded items. - -:rtype: list of QgsLayoutItem %End QDomElement writeXml( QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Returns the layout's state encapsulated in a DOM element. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End @@ -540,8 +474,6 @@ Returns the layout's state encapsulated in a DOM element. %Docstring Sets the collection's state from a DOM element. ``layoutElement`` is the DOM node corresponding to the layout. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -559,16 +491,12 @@ The ``pasteInPlace`` argument determines whether the serialized position should origin of the page corresponding to the page at ``position``. A list of the newly added items is returned. - -:rtype: list of QgsLayoutItem %End QgsLayoutUndoStack *undoStack(); %Docstring Returns a pointer to the layout's undo stack, which manages undo/redo states for the layout and it's associated objects. - -:rtype: QgsLayoutUndoStack %End @@ -580,8 +508,6 @@ and it's associated objects. Creates a new group from a list of layout ``items`` and adds the group to the layout. If grouping was not possible, a None will be returned. -:rtype: QgsLayoutItemGroup - .. seealso:: :py:func:`ungroupItems()` %End @@ -593,8 +519,6 @@ layout. Child items will remain in the layout and will not be deleted. Returns a list of the items removed from the group, or an empty list if ungrouping was not successful. -:rtype: list of QgsLayoutItem - .. seealso:: :py:func:`groupItems()` %End diff --git a/python/core/layout/qgslayoutcontext.sip b/python/core/layout/qgslayoutcontext.sip index bb3b59c84677..f82fa6afd2be 100644 --- a/python/core/layout/qgslayoutcontext.sip +++ b/python/core/layout/qgslayoutcontext.sip @@ -60,8 +60,6 @@ flags are not affected. %Docstring Returns the current combination of flags used for rendering the layout. -:rtype: QgsLayoutContext.Flags - .. seealso:: :py:func:`setFlags()` .. seealso:: :py:func:`setFlag()` @@ -73,8 +71,6 @@ Returns the current combination of flags used for rendering the layout. %Docstring Check whether a particular rendering ``flag`` is enabled for the layout. -:rtype: bool - .. seealso:: :py:func:`setFlags()` .. seealso:: :py:func:`setFlag()` @@ -85,8 +81,6 @@ Check whether a particular rendering ``flag`` is enabled for the layout. QgsRenderContext::Flags renderContextFlags() const; %Docstring Returns the combination of render context flags matched to the layout context's settings. - -:rtype: QgsRenderContext.Flags %End void setFeature( const QgsFeature &feature ); @@ -104,8 +98,6 @@ Returns the current feature for evaluating the layout. This feature may be used for altering an item's content and appearance for a report or atlas layout. -:rtype: QgsFeature - .. seealso:: :py:func:`setFeature()` %End @@ -113,8 +105,6 @@ or atlas layout. %Docstring Returns the vector layer associated with the layout's context. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer()` %End @@ -137,8 +127,6 @@ corresponding DPI for the context's measurementConverter(). %Docstring Returns the ``dpi`` for outputting the layout. -:rtype: float - .. seealso:: :py:func:`setDpi()` %End @@ -147,8 +135,6 @@ Returns the ``dpi`` for outputting the layout. %Docstring Returns the layout measurement converter to be used in the layout. This converter is used for translating between other measurement units and the layout's native unit. - -:rtype: QgsLayoutMeasurementConverter %End bool isPreviewRender() const; @@ -156,16 +142,12 @@ for translating between other measurement units and the layout's native unit. Returns true if the render current being conducted is a preview render, i.e. it is being rendered inside a QGraphicsView widget as opposed to a destination device (such as an image). - -:rtype: bool %End bool gridVisible() const; %Docstring Returns true if the page grid should be drawn. -:rtype: bool - .. seealso:: :py:func:`setGridVisible()` %End @@ -180,8 +162,6 @@ Sets whether the page grid should be ``visible``. %Docstring Returns true if the item bounding boxes should be drawn. -:rtype: bool - .. seealso:: :py:func:`setBoundingBoxesVisible()` %End @@ -207,8 +187,6 @@ Returns whether the page items are be visible in the layout. This setting effects both display of the page boundaries in layout views and whether they will be rendered in layout exports. -:rtype: bool - .. seealso:: :py:func:`setPagesVisible()` %End @@ -231,8 +209,6 @@ and customise their rendering based on the layer. If ``layer`` is -1, all item layers should be rendered. -:rtype: int - .. seealso:: :py:func:`setCurrentExportLayer()` %End diff --git a/python/core/layout/qgslayouteffect.sip b/python/core/layout/qgslayouteffect.sip index 77e9b7e1a64d..e57b55276ebc 100644 --- a/python/core/layout/qgslayouteffect.sip +++ b/python/core/layout/qgslayouteffect.sip @@ -43,8 +43,6 @@ the item. Returns the composition (blending) mode used for rendering the item. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setCompositionMode()` %End diff --git a/python/core/layout/qgslayoutframe.sip b/python/core/layout/qgslayoutframe.sip index b5c11a018b98..244220812d89 100644 --- a/python/core/layout/qgslayoutframe.sip +++ b/python/core/layout/qgslayoutframe.sip @@ -31,8 +31,6 @@ and belonging to a ``multiFrame``. static QgsLayoutFrame *create( QgsLayout *layout ) /Factory/; %Docstring Creates a new QgsLayoutFrame belonging to the specified ``layout``. - -:rtype: QgsLayoutFrame %End virtual int type() const; @@ -54,8 +52,6 @@ this frame (relative to the total multiframe extent in layout units). QgsLayoutMultiFrame *multiFrame() const; %Docstring Returns the parent multiframe for the frame. - -:rtype: QgsLayoutMultiFrame %End virtual QgsLayoutSize minimumSize() const; @@ -69,8 +65,6 @@ Returns the parent multiframe for the frame. Returns the visible portion of the multi frame's content which is shown in this frame, in layout units. -:rtype: QRectF - .. seealso:: :py:func:`setContentSection()` %End @@ -79,8 +73,6 @@ is shown in this frame, in layout units. Returns whether the page should be hidden (ie, not included in layout exports) if this frame is empty :return: true if page should be hidden if frame is empty -:rtype: bool - .. seealso:: :py:func:`setHidePageIfEmpty()` %End @@ -88,6 +80,7 @@ Returns whether the page should be hidden (ie, not included in layout exports) i void setHidePageIfEmpty( const bool hidePageIfEmpty ); %Docstring Sets whether the page should be hidden (ie, not included in layout exports) if this frame is empty + :param hidePageIfEmpty: set to true if page should be hidden if frame is empty .. seealso:: :py:func:`hidePageIfEmpty()` @@ -98,8 +91,6 @@ Sets whether the page should be hidden (ie, not included in layout exports) if t Returns whether the background and frame stroke should be hidden if this frame is empty :return: true if background and stroke should be hidden if frame is empty -:rtype: bool - .. seealso:: :py:func:`setHideBackgroundIfEmpty()` %End @@ -107,6 +98,7 @@ Returns whether the background and frame stroke should be hidden if this frame i void setHideBackgroundIfEmpty( const bool hideBackgroundIfEmpty ); %Docstring Sets whether the background and frame stroke should be hidden if this frame is empty + :param hideBackgroundIfEmpty: set to true if background and stroke should be hidden if frame is empty .. seealso:: :py:func:`hideBackgroundIfEmpty()` @@ -116,8 +108,6 @@ Sets whether the background and frame stroke should be hidden if this frame is e %Docstring Returns whether the frame is empty. -:rtype: bool - .. seealso:: :py:func:`hidePageIfEmpty()` %End diff --git a/python/core/layout/qgslayoutgridsettings.sip b/python/core/layout/qgslayoutgridsettings.sip index 615d7c5d7a05..7afba3b54b36 100644 --- a/python/core/layout/qgslayoutgridsettings.sip +++ b/python/core/layout/qgslayoutgridsettings.sip @@ -50,8 +50,6 @@ Sets the page/snap grid ``resolution``. %Docstring Returns the page/snap grid resolution. -:rtype: QgsLayoutMeasurement - .. seealso:: :py:func:`setResolution()` .. seealso:: :py:func:`offset()` @@ -70,8 +68,6 @@ Sets the ``offset`` of the page/snap grid. %Docstring Returns the offset of the page/snap grid. -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`setOffset()` .. seealso:: :py:func:`resolution()` @@ -90,8 +86,6 @@ Sets the ``pen`` used for drawing page/snap grids. %Docstring Returns the pen used for drawing page/snap grids. -:rtype: QPen - .. seealso:: :py:func:`setPen()` .. seealso:: :py:func:`style()` @@ -110,8 +104,6 @@ Sets the ``style`` used for drawing the page/snap grids. %Docstring Returns the style used for drawing the page/snap grids. -:rtype: Style - .. seealso:: :py:func:`setStyle()` .. seealso:: :py:func:`pen()` @@ -122,8 +114,6 @@ Returns the style used for drawing the page/snap grids. %Docstring Stores the grid's state in a DOM element. The ``parentElement`` should refer to the parent layout's DOM element. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -132,8 +122,6 @@ Stores the grid's state in a DOM element. The ``parentElement`` should refer to %Docstring Sets the grid's state from a DOM element. gridElement is the DOM node corresponding to the grid. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End diff --git a/python/core/layout/qgslayoutguidecollection.sip b/python/core/layout/qgslayoutguidecollection.sip index 5c4ec3fe80e9..59fc346a4e14 100644 --- a/python/core/layout/qgslayoutguidecollection.sip +++ b/python/core/layout/qgslayoutguidecollection.sip @@ -37,8 +37,6 @@ the corresponding layout for you. %Docstring Returns the layout the guide belongs to. -:rtype: QgsLayout - .. seealso:: :py:func:`setLayout()` %End @@ -57,8 +55,6 @@ the corresponding layout for you. Qt::Orientation orientation() const; %Docstring Returns the guide's orientation. - -:rtype: Qt.Orientation %End QgsLayoutMeasurement position() const; @@ -68,8 +64,6 @@ Returns the guide's position within the page. The position indicates either the horizontal or vertical position of the guide, depending on the guide's orientation(). -:rtype: QgsLayoutMeasurement - .. seealso:: :py:func:`setPosition()` %End @@ -87,8 +81,6 @@ of the guide, depending on the guide's orientation(). %Docstring Returns the page the guide is contained within. -:rtype: QgsLayoutItemPage - .. seealso:: :py:func:`setPage()` %End @@ -107,16 +99,12 @@ Updates the position of the guide's line item. QGraphicsLineItem *item(); %Docstring Returns the guide's line item. - -:rtype: QGraphicsLineItem %End double layoutPosition() const; %Docstring Returns the guide's position in absolute layout units. -:rtype: float - .. seealso:: :py:func:`setLayoutPosition()` %End @@ -226,8 +214,6 @@ Returns the list of guides contained in the collection with the specified ``orientation`` and on a matching ``page``. If ``page`` is -1, guides from all pages will be returned. -:rtype: list of QgsLayoutGuide - .. seealso:: :py:func:`guidesOnPage()` %End @@ -235,8 +221,6 @@ If ``page`` is -1, guides from all pages will be returned. %Docstring Returns the list of guides contained on a matching ``page``. -:rtype: list of QgsLayoutGuide - .. seealso:: :py:func:`guides()` %End @@ -244,8 +228,6 @@ Returns the list of guides contained on a matching ``page``. %Docstring Returns true if the guide lines should be drawn. -:rtype: bool - .. seealso:: :py:func:`setVisible()` %End @@ -261,8 +243,6 @@ Sets whether the guide lines should be ``visible``. %Docstring Stores the collection's state in a DOM element. The ``parentElement`` should refer to the parent layout's DOM element. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -271,8 +251,6 @@ Stores the collection's state in a DOM element. The ``parentElement`` should ref %Docstring Sets the collection's state from a DOM element. collectionElement is the DOM node corresponding to the collection. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End diff --git a/python/core/layout/qgslayoutitem.sip b/python/core/layout/qgslayoutitem.sip index 80d5e8ac8773..29ce84634320 100644 --- a/python/core/layout/qgslayoutitem.sip +++ b/python/core/layout/qgslayoutitem.sip @@ -265,8 +265,6 @@ tasks. Return unique graphics item type identifier. Plugin based subclasses should return an identifier greater than QgsLayoutItemRegistry.PluginItem. - -:rtype: int %End virtual QString uuid() const; @@ -274,8 +272,6 @@ Plugin based subclasses should return an identifier greater than QgsLayoutItemRe Returns the item identification string. This is a unique random string set for the item upon creation. -:rtype: str - .. note:: There is no corresponding setter for the uuid - it's created automatically. @@ -294,8 +290,6 @@ for items which have been added to an existing layout from a template. In this c templateUuid() returns the original item UUID at the time the template was created, while uuid() returns the current instance of the item's unique identifier. -:rtype: str - .. seealso:: :py:func:`uuid()` %End @@ -304,8 +298,6 @@ while uuid() returns the current instance of the item's unique identifier. Returns the item's ID name. This is not necessarily unique, and duplicate ID names may exist for a layout. -:rtype: str - .. seealso:: :py:func:`setId()` .. seealso:: :py:func:`uuid()` @@ -326,8 +318,6 @@ for a layout. Get item display name. This is the item's id if set, and if not, a user-friendly string identifying item type. -:rtype: str - .. seealso:: :py:func:`id()` .. seealso:: :py:func:`setId()` @@ -362,8 +352,6 @@ Sets whether the item is ``locked``, preventing mouse interactions with the item %Docstring Returns true if the item is locked, and cannot be interacted with using the mouse. -:rtype: bool - .. seealso:: :py:func:`setLocked()` .. seealso:: :py:func:`lockChanged()` @@ -373,8 +361,6 @@ Returns true if the item is locked, and cannot be interacted with using the mous %Docstring Returns true if the item is part of a QgsLayoutItemGroup group. -:rtype: bool - .. seealso:: :py:func:`parentGroup()` .. seealso:: :py:func:`setParentGroup()` @@ -384,8 +370,6 @@ Returns true if the item is part of a QgsLayoutItemGroup group. %Docstring Returns the item's parent group, if the item is part of a QgsLayoutItemGroup group. -:rtype: QgsLayoutItemGroup - .. seealso:: :py:func:`isGroupMember()` .. seealso:: :py:func:`setParentGroup()` @@ -408,8 +392,6 @@ Returns 0 if this item is to be placed on the same layer as the previous item, Items which require multiply layers should check QgsLayoutContext.currentExportLayer() during their rendering to determine which layer should be drawn. - -:rtype: int %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -435,8 +417,6 @@ Returns the reference point for positioning of the layout item. This point is al fixed during resizing of the item, and any size changes will be performed so that the position of the reference point within the layout remains unchanged. -:rtype: ReferencePoint - .. seealso:: :py:func:`setReferencePoint()` %End @@ -445,8 +425,6 @@ so that the position of the reference point within the layout remains unchanged. Returns the fixed size of the item, if applicable, or an empty size if item can be freely resized. -:rtype: QgsLayoutSize - .. seealso:: :py:func:`setFixedSize()` .. seealso:: :py:func:`minimumSize()` @@ -457,8 +435,6 @@ resized. Returns the minimum allowed size of the item, if applicable, or an empty size if item can be freely resized. -:rtype: QgsLayoutSize - .. seealso:: :py:func:`setMinimumSize()` .. seealso:: :py:func:`fixedSize()` @@ -556,8 +532,6 @@ Returns the item's current position, including units. The position returned is the position of the item's reference point, which may not necessarily be the top left corner of the item. -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`attemptMove()` .. seealso:: :py:func:`referencePoint()` @@ -569,8 +543,6 @@ left corner of the item. %Docstring Returns the page the item is currently on, with the first page returning 0. -:rtype: int - .. seealso:: :py:func:`pagePos()` %End @@ -578,8 +550,6 @@ Returns the page the item is currently on, with the first page returning 0. %Docstring Returns the item's position (in layout units) relative to the top left corner of its current page. -:rtype: QPointF - .. seealso:: :py:func:`page()` .. seealso:: :py:func:`pagePositionWithUnits()` @@ -589,8 +559,6 @@ Returns the item's position (in layout units) relative to the top left corner of %Docstring Returns the item's position (in item units) relative to the top left corner of its current page. -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`page()` .. seealso:: :py:func:`pagePos()` @@ -600,8 +568,6 @@ Returns the item's position (in item units) relative to the top left corner of i %Docstring Returns the item's current size, including units. -:rtype: QgsLayoutSize - .. seealso:: :py:func:`attemptResize()` .. seealso:: :py:func:`positionWithUnits()` @@ -616,26 +582,24 @@ which may differ from the current item rotation (if data defined rotation settings are present). Use QGraphicsItem.rotation() to obtain the current item rotation. -:rtype: float - .. seealso:: :py:func:`setItemRotation()` %End bool writeXml( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Stores the item state in a DOM element. + :param parentElement: parent DOM element (e.g. 'Layout' element) :param document: DOM document :param context: read write context -:rtype: bool - .. seealso:: :py:func:`readXml()` %End bool readXml( const QDomElement &itemElement, const QDomDocument &document, const QgsReadWriteContext &context ); %Docstring Sets the item state from a DOM element. + :param itemElement: is the DOM node corresponding to item (e.g. 'LayoutItem' element) :param document: DOM document :param context: read write context @@ -646,8 +610,6 @@ other items must be made in the finalizeRestoreFromXml() method. E.g. when resto a scalebar, the connection to the linked map's signals should be implemented in finalizeRestoreFromXml(), not readXml(). -:rtype: bool - .. seealso:: :py:func:`writeXml()` .. seealso:: :py:func:`finalizeRestoreFromXml()` @@ -671,8 +633,6 @@ map item after restoration from XML. %Docstring Returns true if the item includes a frame. -:rtype: bool - .. seealso:: :py:func:`setFrameEnabled()` .. seealso:: :py:func:`frameStrokeWidth()` @@ -712,8 +672,6 @@ Sets the frame stroke ``color``. %Docstring Returns the frame's stroke color. This is only used if hasFrame() returns true. -:rtype: QColor - .. seealso:: :py:func:`hasFrame()` .. seealso:: :py:func:`setFrameStrokeColor()` @@ -740,8 +698,6 @@ Sets the frame stroke ``width``. %Docstring Returns the frame's stroke width. This is only used if hasFrame() returns true. -:rtype: QgsLayoutMeasurement - .. seealso:: :py:func:`hasFrame()` .. seealso:: :py:func:`setFrameStrokeWidth()` @@ -755,8 +711,6 @@ Returns the frame's stroke width. This is only used if hasFrame() returns true. %Docstring Returns the join style used for drawing the item's frame. -:rtype: Qt.PenJoinStyle - .. seealso:: :py:func:`hasFrame()` .. seealso:: :py:func:`setFrameJoinStyle()` @@ -783,8 +737,6 @@ Sets the join ``style`` used when drawing the item's frame. %Docstring Returns true if the item has a background. -:rtype: bool - .. seealso:: :py:func:`setBackgroundEnabled()` .. seealso:: :py:func:`backgroundColor()` @@ -804,8 +756,6 @@ Sets whether this item has a background drawn under it or not. Returns the background color for this item. This is only used if hasBackground() returns true. -:rtype: QColor - .. seealso:: :py:func:`setBackgroundColor()` .. seealso:: :py:func:`hasBackground()` @@ -824,8 +774,6 @@ Sets the background ``color`` for this item. %Docstring Returns the item's composition blending mode. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End @@ -843,8 +791,6 @@ QGraphicsItem.opacity() as any data defined overrides will be respected. :return: opacity as double between 1.0 (opaque) and 0 (transparent). -:rtype: float - .. seealso:: :py:func:`setItemOpacity()` %End @@ -854,6 +800,7 @@ respected. Sets the item's ``opacity``. This method should be used instead of QGraphicsItem.setOpacity() as any data defined overrides will be respected. + :param opacity: double between 1.0 (opaque) and 0 (transparent). .. seealso:: :py:func:`itemOpacity()` @@ -863,8 +810,6 @@ respected. %Docstring Returns whether the item should be excluded from layout exports and prints. -:rtype: bool - .. seealso:: :py:func:`setExcludeFromExports()` %End @@ -884,8 +829,6 @@ return value will be 1.0. Returned values are in layout units. -:rtype: float - .. seealso:: :py:func:`rectWithFrame()` %End @@ -897,8 +840,6 @@ more details about QGraphicsItem coordinate systems). The results differ from Qt function, as rect() makes no allowances for the portion of outlines which are drawn outside of the item. -:rtype: QRectF - .. seealso:: :py:func:`estimatedFrameBleed()` %End @@ -924,6 +865,7 @@ The default implementation has no effect. virtual void zoomContent( double factor, QPointF point ); %Docstring Zooms content of item. Does nothing by default. + :param factor: zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out :param point: item point for zoom center @@ -1040,6 +982,7 @@ Emitted when the item's size or position changes. %Docstring Draws a debugging rectangle of the item's current bounds within the specified painter. + :param painter: destination QPainter %End @@ -1087,8 +1030,6 @@ Subclasses can override this method if they need to apply advanced logic regardi sizes, which cannot be covered by setFixedSize() or setMinimumSize(). Item size constraints are applied after fixed, minimum and data defined size constraints. -:rtype: QSizeF - .. seealso:: :py:func:`setFixedSize()` .. seealso:: :py:func:`setMinimumSize()` @@ -1157,34 +1098,27 @@ Refresh item's blend mode, considering data defined blend mode. %Docstring Adjusts the specified ``point`` at which a ``reference`` position of the item sits and returns the top left corner of the item, if reference point were placed at the specified position. - -:rtype: QPointF %End QPointF positionAtReferencePoint( const ReferencePoint &reference ) const; %Docstring Returns the current position (in layout units) of a ``reference`` point for the item. - -:rtype: QPointF %End QgsLayoutPoint topLeftToReferencePoint( const QgsLayoutPoint &point ) const; %Docstring Returns the position for the reference point of the item, if the top-left of the item was placed at the specified ``point``. - -:rtype: QgsLayoutPoint %End virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Stores item state within an XML DOM element. + :param element: is the DOM element to store the item's properties in :param document: DOM document :param context: read write context -:rtype: bool - .. seealso:: :py:func:`writeXml()` .. seealso:: :py:func:`readPropertiesFromElement()` @@ -1193,6 +1127,7 @@ Stores item state within an XML DOM element. virtual bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context ); %Docstring Sets item state from a DOM element. + :param element: is the DOM element for the item :param document: DOM document :param context: read write context @@ -1203,8 +1138,6 @@ other items must be made in the finalizeRestoreFromXml() method. E.g. when resto a scalebar, the connection to the linked map's signals should be implemented in finalizeRestoreFromXml(), not readPropertiesFromElement(). -:rtype: bool - .. seealso:: :py:func:`writePropertiesToElement()` .. seealso:: :py:func:`readXml()` @@ -1213,15 +1146,11 @@ in finalizeRestoreFromXml(), not readPropertiesFromElement(). bool shouldDrawItem() const; %Docstring Returns whether the item should be drawn in the current context. - -:rtype: bool %End QgsLayoutSize applyDataDefinedSize( const QgsLayoutSize &size ); %Docstring Applies any present data defined size overrides to the specified layout ``size``. - -:rtype: QgsLayoutSize %End }; diff --git a/python/core/layout/qgslayoutitemattributetable.sip b/python/core/layout/qgslayoutitemattributetable.sip index d638541c6afe..5c13313ca22c 100644 --- a/python/core/layout/qgslayoutitemattributetable.sip +++ b/python/core/layout/qgslayoutitemattributetable.sip @@ -45,8 +45,6 @@ Ownership is transferred to the layout. static QgsLayoutItemAttributeTable *create( QgsLayout *layout ) /Factory/; %Docstring Returns a new QgsLayoutItemAttributeTable for the specified parent ``layout``. - -:rtype: QgsLayoutItemAttributeTable %End void setSource( ContentSource source ); @@ -60,8 +58,6 @@ Sets the ``source`` for attributes to show in table body. %Docstring Returns the source for attributes shown in the table body. -:rtype: ContentSource - .. seealso:: :py:func:`setSource()` %End @@ -71,8 +67,6 @@ Returns the source layer for the table, considering the table source mode. For e if the table is set to atlas feature mode, then the source layer will be the atlas coverage layer. If the table is set to layer attributes mode, then the source layer will be the user specified vector layer. - -:rtype: QgsVectorLayer %End void setVectorLayer( QgsVectorLayer *layer ); @@ -90,8 +84,6 @@ Returns the vector layer the attribute table is currently using. This is only considered if the table source() is LayerAttributes. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setVectorLayer()` .. seealso:: :py:func:`sourceLayer()` @@ -114,8 +106,6 @@ Sets the relation ``id`` from which to display child features %Docstring Returns the relation id which the table displays child features from. -:rtype: str - .. seealso:: :py:func:`setRelationId()` .. seealso:: :py:func:`source()` @@ -150,8 +140,6 @@ feature attributes. Returns the layout map whose extents are controlling the features shown in the table. The extents of the map are only used if displayOnlyVisibleFeatures() is true. -:rtype: QgsLayoutItemMap - .. seealso:: :py:func:`setMap()` .. seealso:: :py:func:`displayOnlyVisibleFeatures()` @@ -170,8 +158,6 @@ the table to refetch features from its vector layer. %Docstring Returns the maximum number of features to be shown by the table. -:rtype: int - .. seealso:: :py:func:`setMaximumNumberOfFeatures()` %End @@ -189,8 +175,6 @@ will be stripped from the table. %Docstring Returns true if the table is set to show only unique rows. -:rtype: bool - .. seealso:: :py:func:`setUniqueRowsOnly()` %End @@ -210,8 +194,6 @@ the table changing size to accommodate the new displayed feature attributes. Returns true if the table is set to show only features visible on a corresponding map item. -:rtype: bool - .. seealso:: :py:func:`map()` .. seealso:: :py:func:`setDisplayOnlyVisibleFeatures()` @@ -230,8 +212,6 @@ feature. Returns true if the table is set to only show features which intersect the current atlas feature. -:rtype: bool - .. seealso:: :py:func:`setFilterToAtlasFeature()` %End @@ -239,8 +219,6 @@ feature. %Docstring Returns true if a feature filter is active on the attribute table. -:rtype: bool - .. seealso:: :py:func:`setFilterFeatures()` .. seealso:: :py:func:`featureFilter()` @@ -262,8 +240,6 @@ the table changing size to accommodate the new displayed feature attributes. Returns the current expression used to filter features for the table. The filter is only active if filterFeatures() is true. -:rtype: str - .. seealso:: :py:func:`setFeatureFilter()` .. seealso:: :py:func:`filterFeatures()` @@ -284,6 +260,7 @@ the table changing size to accommodate the new displayed feature attributes. void setDisplayedFields( const QStringList &fields, bool refresh = true ); %Docstring Sets the attributes to display in the table. + :param fields: list of fields names from the vector layer to show. Set to an empty list to show all feature attributes. :param refresh: set to true to force the table to refetch features from its vector layer @@ -296,6 +273,7 @@ to accommodate the new displayed feature attributes. %Docstring Sets a string to wrap the contents of the table cells by. Occurrences of this string will be replaced by a line break. + :param wrapString: string to replace with line break .. seealso:: :py:func:`wrapString()` @@ -306,8 +284,6 @@ be replaced by a line break. Returns the string used to wrap the contents of the table cells by. Occurrences of this string will be replaced by a line break. -:rtype: str - .. seealso:: :py:func:`setWrapString()` %End diff --git a/python/core/layout/qgslayoutitemgroup.sip b/python/core/layout/qgslayoutitemgroup.sip index 43bbfb157fe5..cecd22c8435c 100644 --- a/python/core/layout/qgslayoutitemgroup.sip +++ b/python/core/layout/qgslayoutitemgroup.sip @@ -39,8 +39,6 @@ Constructor for QgsLayoutItemGroup, belonging to the specified ``layout``. Returns a new group item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemGroup %End void addItem( QgsLayoutItem *item /Transfer/ ); @@ -58,8 +56,6 @@ Items remain in the scene but are no longer grouped together QList items() const; %Docstring Returns a list of items contained by the group. - -:rtype: list of QgsLayoutItem %End virtual void setVisibility( const bool visible ); diff --git a/python/core/layout/qgslayoutitemhtml.sip b/python/core/layout/qgslayoutitemhtml.sip index 7221242ad5a9..4dbc91398df3 100644 --- a/python/core/layout/qgslayoutitemhtml.sip +++ b/python/core/layout/qgslayoutitemhtml.sip @@ -43,8 +43,6 @@ Ownership is transferred to the layout. static QgsLayoutItemHtml *create( QgsLayout *layout ) /Factory/; %Docstring Returns a new QgsLayoutItemHtml for the specified parent ``layout``. - -:rtype: QgsLayoutItemHtml %End void setContentMode( ContentMode mode ); @@ -62,8 +60,6 @@ Sets the source ``mode`` for item's HTML content. %Docstring Returns the source mode for item's HTML content. -:rtype: ContentMode - .. seealso:: :py:func:`setContentMode()` .. seealso:: :py:func:`url()` @@ -87,8 +83,6 @@ HTML item refreshed after calling this function. Returns the URL of the content displayed in the item if the item is using the QgsLayoutItemHtml.Url mode. -:rtype: QUrl - .. seealso:: :py:func:`setUrl()` .. seealso:: :py:func:`contentMode()` @@ -113,8 +107,6 @@ a refresh of the item after setting the HTML content. Returns the HTML source displayed in the item if the item is using the QgsLayoutItemHtml.ManualHtml mode. -:rtype: str - .. seealso:: :py:func:`setHtml()` .. seealso:: :py:func:`contentMode()` @@ -127,8 +119,6 @@ the HTML content. If set, any content inside [% %] tags will be treated as a QGIS expression and evaluated against the current atlas feature. -:rtype: bool - .. seealso:: :py:func:`setEvaluateExpressions()` %End @@ -147,8 +137,6 @@ feature. Returns whether html item is using smart breaks. Smart breaks prevent the html frame contents from breaking mid-way though a line of text. -:rtype: bool - .. seealso:: :py:func:`setUseSmartBreaks()` %End @@ -181,8 +169,6 @@ in the html. This distance is the maximum amount of empty space allowed at the bottom of a frame after calculating the optimum break location. This setting is only effective if useSmartBreaks is true. -:rtype: float - .. seealso:: :py:func:`setMaxBreakDistance()` .. seealso:: :py:func:`useSmartBreaks()` @@ -207,8 +193,6 @@ to trigger a refresh of the item after setting the stylesheet rules. Returns the user stylesheet CSS rules used while rendering the HTML content. These overriding the styles specified within the HTML source. -:rtype: str - .. seealso:: :py:func:`setUserStylesheet()` .. seealso:: :py:func:`userStylesheetEnabled()` @@ -227,8 +211,6 @@ Sets whether user stylesheets are ``enabled`` for the HTML content. %Docstring Returns whether user stylesheets are enabled for the HTML content. -:rtype: bool - .. seealso:: :py:func:`setUserStylesheetEnabled()` .. seealso:: :py:func:`userStylesheet()` @@ -249,6 +231,7 @@ Returns whether user stylesheets are enabled for the HTML content. void loadHtml( const bool useCache = false, const QgsExpressionContext *context = 0 ); %Docstring Reloads the html source from the url and redraws the item. + :param useCache: set to true to use a cached copy of remote html content :param context: expression context for evaluating data defined urls and expressions in html diff --git a/python/core/layout/qgslayoutitemlabel.sip b/python/core/layout/qgslayoutitemlabel.sip index bf929814459e..de4cb4516a70 100644 --- a/python/core/layout/qgslayoutitemlabel.sip +++ b/python/core/layout/qgslayoutitemlabel.sip @@ -38,8 +38,6 @@ Constructor for QgsLayoutItemLabel, with the specified parent ``layout``. Returns a new label item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemLabel %End virtual int type() const; @@ -58,8 +56,6 @@ Resizes the item so that the label's text fits to the item. Keeps the top left p %Docstring Returns the required item size (in layout units) for the label's text to fill the item. -:rtype: QSizeF - .. seealso:: :py:func:`adjustSizeToText()` %End @@ -67,8 +63,6 @@ Returns the required item size (in layout units) for the label's text to fill th %Docstring Returns the label's preset text. -:rtype: str - .. seealso:: :py:func:`currentText()` .. seealso:: :py:func:`setText()` @@ -86,8 +80,6 @@ Sets the label's preset ``text``. Returns the text as it appears on the label (with evaluated expressions and other dynamic content). -:rtype: str - .. seealso:: :py:func:`text()` %End @@ -95,8 +87,6 @@ and other dynamic content). %Docstring Returns the label's current mode. -:rtype: Mode - .. seealso:: :py:func:`setMode()` %End @@ -112,8 +102,6 @@ to switch between font based and HTML based rendering. %Docstring Returns the label's current font. -:rtype: QFont - .. seealso:: :py:func:`setFont()` %End @@ -128,8 +116,6 @@ Sets the label's current ``font``. %Docstring Returns for the vertical alignment of the label. -:rtype: Qt.AlignmentFlag - .. seealso:: :py:func:`setVAlign()` .. seealso:: :py:func:`hAlign()` @@ -139,8 +125,6 @@ Returns for the vertical alignment of the label. %Docstring Returns the horizontal alignment of the label. -:rtype: Qt.AlignmentFlag - .. seealso:: :py:func:`vAlign()` .. seealso:: :py:func:`setHAlign()` @@ -169,8 +153,6 @@ Sets for the vertical ``alignment`` of the label. Returns the horizontal margin between the edge of the frame and the label contents, in layout units. -:rtype: float - .. seealso:: :py:func:`setMargin()` .. seealso:: :py:func:`marginY()` @@ -181,8 +163,6 @@ contents, in layout units. Returns the vertical margin between the edge of the frame and the label contents, in layout units. -:rtype: float - .. seealso:: :py:func:`setMargin()` .. seealso:: :py:func:`marginX()` @@ -233,8 +213,6 @@ Sets the label font ``color``. %Docstring Returns the label font color. -:rtype: QColor - .. seealso:: :py:func:`setFontColor()` %End diff --git a/python/core/layout/qgslayoutitemlegend.sip b/python/core/layout/qgslayoutitemlegend.sip index 41ca4da058d8..2425a87a1eeb 100644 --- a/python/core/layout/qgslayoutitemlegend.sip +++ b/python/core/layout/qgslayoutitemlegend.sip @@ -61,8 +61,6 @@ Constructor for QgsLayoutItemLegend, with the specified parent ``layout``. Returns a new legend item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemLegend %End virtual int type() const; @@ -78,6 +76,7 @@ Sets the legend's item bounds to fit the whole legend content. void setResizeToContents( bool enabled ); %Docstring Sets whether the legend should automatically resize to fit its contents. + :param enabled: set to false to disable automatic resizing. The legend frame will not be expanded to fit legend items, and items may be cropped from display. @@ -88,16 +87,12 @@ be expanded to fit legend items, and items may be cropped from display. %Docstring Returns whether the legend should automatically resize to fit its contents. -:rtype: bool - .. seealso:: :py:func:`setResizeToContents()` %End QgsLegendModel *model(); %Docstring Returns the legend model. - -:rtype: QgsLegendModel %End void setAutoUpdateModel( bool autoUpdate ); @@ -113,8 +108,6 @@ layer tree. Returns whether the legend content should auto update to reflect changes in the project's layer tree. -:rtype: bool - .. seealso:: :py:func:`setAutoUpdateModel()` %End @@ -129,8 +122,6 @@ Set whether legend items should be filtered to show just the ones visible in the %Docstring Find out whether legend items are filtered to show just the ones visible in the associated map -:rtype: bool - .. seealso:: :py:func:`setLegendFilterByMapEnabled()` %End @@ -147,8 +138,6 @@ where features are outside the current atlas feature. %Docstring Returns whether to filter out legend elements outside of the current atlas feature. -:rtype: bool - .. seealso:: :py:func:`setLegendFilterOutAtlas()` %End @@ -163,8 +152,6 @@ Sets the legend ``title``. %Docstring Returns the legend title. -:rtype: str - .. seealso:: :py:func:`setTitle()` %End @@ -172,8 +159,6 @@ Returns the legend title. %Docstring Returns the alignment of the legend title. -:rtype: Qt.AlignmentFlag - .. seealso:: :py:func:`setTitleAlignment()` %End @@ -187,15 +172,11 @@ Sets the ``alignment`` of the legend title. QgsLegendStyle &rstyle( QgsLegendStyle::Style s ); %Docstring Returns reference to modifiable legend style. - -:rtype: QgsLegendStyle %End QgsLegendStyle style( QgsLegendStyle::Style s ) const; %Docstring Returns legend style. - -:rtype: QgsLegendStyle %End void setStyle( QgsLegendStyle::Style component, const QgsLegendStyle &style ); @@ -207,8 +188,6 @@ Sets the style of ``component`` to ``style`` for the legend. %Docstring Returns the font settings for a legend ``component``. -:rtype: QFont - .. seealso:: :py:func:`setStyleFont()` %End @@ -233,8 +212,6 @@ Set the ``margin`` for a particular ``side`` of a legend ``component``. %Docstring Returns the spacing in-between lines in layout units. -:rtype: float - .. seealso:: :py:func:`setLineSpacing()` %End @@ -249,8 +226,6 @@ Sets the ``spacing`` in-between multiple lines. %Docstring Returns the legend box space. -:rtype: float - .. seealso:: :py:func:`setBoxSpace()` %End @@ -265,8 +240,6 @@ Sets the legend box ``space``. %Docstring Returns the legend column spacing. -:rtype: float - .. seealso:: :py:func:`setColumnSpace()` %End @@ -281,8 +254,6 @@ Sets the legend column ``spacing``. %Docstring Returns the legend font color. -:rtype: QColor - .. seealso:: :py:func:`setFontColor()` %End @@ -297,8 +268,6 @@ Sets the legend font ``color``. %Docstring Returns the legend symbol width. -:rtype: float - .. seealso:: :py:func:`setSymbolWidth()` %End @@ -313,8 +282,6 @@ Sets the legend symbol ``width``. %Docstring Returns the legend symbol height. -:rtype: float - .. seealso:: :py:func:`setSymbolHeight()` %End @@ -329,8 +296,6 @@ Sets the legend symbol ``height``. %Docstring Returns the WMS legend width. -:rtype: float - .. seealso:: :py:func:`setWmsLegendWidth()` %End @@ -345,8 +310,6 @@ Sets the WMS legend ``width``. %Docstring Returns the WMS legend height. -:rtype: float - .. seealso:: :py:func:`setWmsLegendHeight()` %End @@ -368,8 +331,6 @@ Sets the legend text wrapping ``string``. %Docstring Returns the legend text wrapping string. -:rtype: str - .. seealso:: :py:func:`setWrapString()` %End @@ -377,8 +338,6 @@ Returns the legend text wrapping string. %Docstring Returns the legend column count. -:rtype: int - .. seealso:: :py:func:`setColumnCount()` %End @@ -394,8 +353,6 @@ Sets the legend column ``count``. Returns whether the legend items from a single layer can be split over multiple columns. -:rtype: bool - .. seealso:: :py:func:`setSplitLayer()` %End @@ -411,8 +368,6 @@ over multiple columns. %Docstring Returns whether column widths should be equalized. -:rtype: bool - .. seealso:: :py:func:`setEqualColumnWidth()` %End @@ -427,8 +382,6 @@ Sets whether column widths should be equalized. %Docstring Returns whether a stroke will be drawn around raster symbol items. -:rtype: bool - .. seealso:: :py:func:`setDrawRasterStroke()` .. seealso:: :py:func:`rasterStrokeColor()` @@ -439,6 +392,7 @@ Returns whether a stroke will be drawn around raster symbol items. void setDrawRasterStroke( bool enabled ); %Docstring Sets whether a stroke will be drawn around raster symbol items. + :param enabled: set to true to draw borders .. seealso:: :py:func:`drawRasterStroke()` @@ -453,8 +407,6 @@ Sets whether a stroke will be drawn around raster symbol items. Returns the stroke color for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. -:rtype: QColor - .. seealso:: :py:func:`setRasterStrokeColor()` .. seealso:: :py:func:`drawRasterStroke()` @@ -479,8 +431,6 @@ only drawn if drawRasterStroke() is true. Returns the stroke width (in layout units) for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. -:rtype: float - .. seealso:: :py:func:`setRasterStrokeWidth()` .. seealso:: :py:func:`drawRasterStroke()` @@ -511,8 +461,6 @@ Sets the ``map`` to associate with the legend. %Docstring Returns the associated map. -:rtype: QgsLayoutItemMap - .. seealso:: :py:func:`setMap()` %End @@ -529,8 +477,6 @@ Updates the legend content when filtered by map. const QgsLegendSettings &legendSettings() const; %Docstring Returns the legend's renderer settings object. - -:rtype: QgsLegendSettings %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); diff --git a/python/core/layout/qgslayoutitemmap.sip b/python/core/layout/qgslayoutitemmap.sip index dbc1e0a8d394..148d013abbb4 100644 --- a/python/core/layout/qgslayoutitemmap.sip +++ b/python/core/layout/qgslayoutitemmap.sip @@ -53,8 +53,6 @@ Sets the map id() to a number not yet used in the layout. The existing id() is k Returns a new map item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemMap %End virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ); @@ -70,8 +68,6 @@ The caller takes responsibility for deleting the returned object. Returns the map scale. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setScale()` %End @@ -109,8 +105,6 @@ map scale. %Docstring Returns the current map extent. -:rtype: QgsRectangle - .. seealso:: :py:func:`visibleExtentPolygon()` .. seealso:: :py:func:`extentChanged()` @@ -123,8 +117,6 @@ Returns a polygon representing the current visible map extent, considering map e If the map rotation is 0, the result is the same as currentMapExtent :return: polygon with the four corner points representing the visible map extent. The points are -:rtype: QPolygonF - clockwise, starting at the top-left point .. seealso:: :py:func:`extent()` @@ -137,8 +129,6 @@ This will match the presetCrs() if that is set, or if a preset CRS is not set then the map's CRS will follow the composition's project's CRS. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`presetCrs()` .. seealso:: :py:func:`setCrs()` @@ -151,8 +141,6 @@ CRS will be used to render the map regardless of any project CRS setting. If the returned CRS is not valid then the project CRS will be used to render the map. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`crs()` .. seealso:: :py:func:`setCrs()` @@ -176,8 +164,6 @@ or the current layer set from the project associated with the layout. This is ju and itself does not change which layers are rendered in the map. Instead, use setLayers() to control which layers are rendered. -:rtype: bool - .. seealso:: :py:func:`setKeepLayerSet()` .. seealso:: :py:func:`layers()` @@ -200,8 +186,6 @@ Instead, use setLayers() to control which layers are rendered. Returns the stored layer set. If empty, the current project layers will be used instead. -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`setLayers()` .. seealso:: :py:func:`keepLayerSet()` @@ -221,8 +205,6 @@ be used instead. %Docstring Returns whether current styles of layers should be overridden by previously stored styles. -:rtype: bool - .. seealso:: :py:func:`setKeepLayerStyles()` %End @@ -237,8 +219,6 @@ Sets whether current styles of layers should be overridden by previously stored %Docstring Returns stored overrides of styles for layers. -:rtype: QMap - .. seealso:: :py:func:`setLayerStyleOverrides()` %End @@ -264,8 +244,6 @@ At most one of the flags keepLayerSet() and followVisibilityPreset() should be e at any time since they are alternative approaches - if both are enabled, following map theme has higher priority. If neither is enabled (or if preset name is not set), map will use the same configuration as the map canvas uses. - -:rtype: bool %End void setFollowVisibilityPreset( bool follow ); @@ -278,8 +256,6 @@ Sets whether the map should follow a map theme. See followVisibilityPreset() for Preset name that decides which layers and layer styles are used for map rendering. It is only used when followVisibilityPreset() returns true. -:rtype: str - .. seealso:: :py:func:`setFollowVisibilityPresetName()` %End @@ -302,15 +278,11 @@ Sets preset name for map rendering. See followVisibilityPresetName() for more de bool containsWmsLayer() const; %Docstring Returns true if the map contains a WMS layer. - -:rtype: bool %End bool containsAdvancedEffects() const; %Docstring Returns true if the map contains layers with blend modes or flattened layers for vectors - -:rtype: bool %End void setMapRotation( double rotation ); @@ -326,12 +298,11 @@ way the map is drawn within the item. Rotation is in degrees, clockwise. double mapRotation( QgsLayoutObject::PropertyValueType valueType = QgsLayoutObject::EvaluatedValue ) const; %Docstring Returns the rotation used for drawing the map within the composer item, in degrees clockwise. + :param valueType: controls whether the returned value is the user specified rotation, or the current evaluated rotation (which may be affected by data driven rotation settings). -:rtype: float - .. seealso:: :py:func:`setMapRotation()` .. seealso:: :py:func:`mapRotationChanged()` @@ -348,8 +319,6 @@ Sets whether annotations are drawn within the composer map. %Docstring Returns whether annotations are drawn within the composer map. -:rtype: bool - .. seealso:: :py:func:`setDrawAnnotations()` %End @@ -359,8 +328,6 @@ Returns whether annotations are drawn within the composer map. Returns whether the map extent is set to follow the current atlas feature. :return: true if map will follow the current atlas feature. -:rtype: bool - .. seealso:: :py:func:`setAtlasDriven` @@ -370,6 +337,7 @@ Returns whether the map extent is set to follow the current atlas feature. void setAtlasDriven( bool enabled ); %Docstring Sets whether the map extent will follow the current atlas feature. + :param enabled: set to true if the map extents should be set by the current atlas feature. .. seealso:: :py:func:`atlasDriven` @@ -384,8 +352,6 @@ are calculated for the current atlas feature when an atlas composition is enabled. :return: the current scaling mode -:rtype: AtlasScalingMode - .. note:: @@ -401,6 +367,7 @@ is enabled. Sets the current atlas scaling mode. This controls how the map's extents are calculated for the current atlas feature when an atlas composition is enabled. + :param mode: atlas scaling mode to set .. note:: @@ -415,13 +382,12 @@ is enabled. double atlasMargin( const QgsLayoutObject::PropertyValueType valueType = QgsLayoutObject::EvaluatedValue ); %Docstring Returns the margin size (percentage) used when the map is in atlas mode. + :param valueType: controls whether the returned value is the user specified atlas margin, or the current evaluated atlas margin (which may be affected by data driven atlas margin settings). :return: margin size in percentage to leave around the atlas feature's extent -:rtype: float - .. note:: @@ -435,6 +401,7 @@ settings). void setAtlasMargin( double margin ); %Docstring Sets the margin size (percentage) used when the map is in atlas mode. + :param margin: size in percentage to leave around the atlas feature's extent .. note:: @@ -451,8 +418,6 @@ Sets the margin size (percentage) used when the map is in atlas mode. Returns the map item's grid stack, which is used to control how grids are drawn over the map's contents. -:rtype: QgsLayoutItemMapGridStack - .. seealso:: :py:func:`grid()` %End @@ -460,8 +425,6 @@ are drawn over the map's contents. %Docstring Returns the map item's first grid. This is a convenience function. -:rtype: QgsLayoutItemMapGrid - .. seealso:: :py:func:`grids()` %End @@ -471,8 +434,6 @@ Returns the map item's overview stack, which is used to control how overviews are drawn over the map's contents. :return: pointer to overview stack -:rtype: QgsLayoutItemMapOverviewStack - .. seealso:: :py:func:`overview()` %End @@ -482,8 +443,6 @@ are drawn over the map's contents. Returns the map item's first overview. This is a convenience function. :return: pointer to first overview for map item -:rtype: QgsLayoutItemMapOverview - .. seealso:: :py:func:`overviews()` %End @@ -496,15 +455,11 @@ Returns the map item's first overview. This is a convenience function. Returns the conversion factor from map units to layout units. This is calculated using the width of the map item and the width of the current visible map extent. - -:rtype: float %End QgsMapSettings mapSettings( const QgsRectangle &extent, QSizeF size, int dpi ) const; %Docstring Return map settings that will be used for drawing of the map. - -:rtype: QgsMapSettings %End virtual void finalizeRestoreFromXml(); @@ -522,8 +477,6 @@ Return map settings that will be used for drawing of the map. bool isDrawing() const; %Docstring True if a draw is already in progress - -:rtype: bool %End @@ -533,22 +486,16 @@ True if a draw is already in progress QPolygonF transformedMapPolygon() const; %Docstring Returns extent that considers rotation and shift with mOffsetX / mOffsetY - -:rtype: QPolygonF %End QPointF mapToItemCoords( QPointF mapCoords ) const; %Docstring Transforms map coordinates to item coordinates (considering rotation and move offset) - -:rtype: QPointF %End QgsRectangle requestedExtent() const; %Docstring Calculates the extent to request and the yShift of the top-left point in case of rotation. - -:rtype: QgsRectangle %End signals: diff --git a/python/core/layout/qgslayoutitemmapgrid.sip b/python/core/layout/qgslayoutitemmapgrid.sip index 9cd566a3f2bf..c827e91e0627 100644 --- a/python/core/layout/qgslayoutitemmapgrid.sip +++ b/python/core/layout/qgslayoutitemmapgrid.sip @@ -86,8 +86,6 @@ called for the QgsLayoutItemMap to redraw the map with the new grid stack order. %Docstring Returns a reference to a grid with matching ``gridId`` within the stack. -:rtype: QgsLayoutItemMapGrid - .. seealso:: :py:func:`constGrid()` %End @@ -95,8 +93,6 @@ Returns a reference to a grid with matching ``gridId`` within the stack. %Docstring Returns a reference to a grid at the specified ``index`` within the stack. -:rtype: QgsLayoutItemMapGrid - .. seealso:: :py:func:`constGrid()` %End @@ -105,8 +101,6 @@ Returns a reference to a grid at the specified ``index`` within the stack. QList< QgsLayoutItemMapGrid * > asList() const; %Docstring Returns a list of QgsLayoutItemMapGrids contained by the stack. - -:rtype: list of QgsLayoutItemMapGrid %End virtual bool readXml( const QDomElement &elem, const QDomDocument &doc, const QgsReadWriteContext &context ); @@ -117,8 +111,6 @@ Returns a list of QgsLayoutItemMapGrids contained by the stack. Calculates the maximum distance grids within the stack extend beyond the QgsLayoutItemMap's item rect. -:rtype: float - .. seealso:: :py:func:`calculateMaxGridExtension()` %End @@ -236,6 +228,7 @@ QgsLayoutItemMap. QgsLayoutItemMapGrid( const QString &name, QgsLayoutItemMap *map ); %Docstring Constructor for QgsLayoutItemMapGrid. + :param name: friendly display name for grid :param map: QgsLayoutItemMap the grid is attached to %End @@ -258,8 +251,6 @@ Sets the ``crs`` for the grid. %Docstring Retrieves the CRS for the grid. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs()` %End @@ -274,8 +265,6 @@ Sets the blending ``mode`` used for drawing the grid. %Docstring Retrieves the blending mode used for drawing the grid. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End @@ -286,8 +275,6 @@ Retrieves the blending mode used for drawing the grid. %Docstring Calculates the maximum distance the grid extends beyond the QgsLayoutItemMap's item rect (in layout units). - -:rtype: float %End void calculateMaxExtension( double &top, double &right, double &bottom, double &left ) const; @@ -313,8 +300,6 @@ and offset for grid lines. Returns the units used for grid measurements such as the interval and offset for grid lines. -:rtype: GridUnit - .. seealso:: :py:func:`setUnits()` %End @@ -333,8 +318,6 @@ are controlled through the setUnits method Returns the interval between grid lines in the x-direction. The units are retrieved through the units() method. -:rtype: float - .. seealso:: :py:func:`setIntervalX()` .. seealso:: :py:func:`intervalY()` @@ -355,8 +338,6 @@ are controlled through the setUnits method Returns the interval between grid lines in the y-direction. The units are retrieved through the units() method. -:rtype: float - .. seealso:: :py:func:`setIntervalY()` .. seealso:: :py:func:`intervalX()` @@ -377,8 +358,6 @@ are controlled through the setUnits method. Returns the offset for grid lines in the x-direction. The units are retrieved through the units() method. -:rtype: float - .. seealso:: :py:func:`setOffsetX()` .. seealso:: :py:func:`offsetY()` @@ -399,8 +378,6 @@ are controlled through the setUnits method. Returns the offset for grid lines in the y-direction. The units are retrieved through the units() method. -:rtype: float - .. seealso:: :py:func:`setOffsetY()` .. seealso:: :py:func:`offsetX()` @@ -420,8 +397,6 @@ over the map's contents. Returns the grid's style, which controls how the grid is drawn over the map's contents. -:rtype: GridStyle - .. seealso:: :py:func:`setStyle()` %End @@ -438,8 +413,6 @@ with QgsLayoutItemMapGrid.Cross styles. Retrieves the length (in layout units) of the cross segments drawn for the grid. This is only used for grids with QgsLayoutItemMapGrid.Cross styles. -:rtype: float - .. seealso:: :py:func:`setCrossLength()` %End @@ -483,8 +456,6 @@ Ownership of ``symbol`` is transferred to the grid. Returns the line symbol used for drawing grid lines. This is only used for grids with QgsLayoutItemMapGrid.Solid or QgsLayoutItemMapGrid.Cross styles. -:rtype: QgsLineSymbol - .. seealso:: :py:func:`setLineSymbol()` .. seealso:: :py:func:`markerSymbol()` @@ -510,8 +481,6 @@ Ownership of ``symbol`` is transferred to the grid. Returns the marker symbol used for drawing grid points. This is only used for grids with a QgsLayoutItemMapGrid.Markers style. -:rtype: QgsMarkerSymbol - .. seealso:: :py:func:`setMarkerSymbol()` .. seealso:: :py:func:`lineSymbol()` @@ -531,8 +500,6 @@ Sets whether annotations should be shown for the grid. %Docstring Returns whether annotations are shown for the grid. -:rtype: bool - .. seealso:: :py:func:`setAnnotationEnabled()` %End @@ -547,8 +514,6 @@ Sets the ``font`` used for drawing grid annotations. %Docstring Returns the font used for drawing grid annotations. -:rtype: QFont - .. seealso:: :py:func:`setAnnotationFont()` %End @@ -563,8 +528,6 @@ Sets the font ``color`` used for drawing grid annotations. %Docstring Returns the font color used for drawing grid annotations. -:rtype: QColor - .. seealso:: :py:func:`setAnnotationFontColor()` %End @@ -581,8 +544,6 @@ The ``precision`` indicates the number of decimal places to show when drawing gr Returns the coordinate precision for grid annotations, which is the number of decimal places shown when drawing grid annotations. -:rtype: int - .. seealso:: :py:func:`setAnnotationPrecision()` %End @@ -590,6 +551,7 @@ number of decimal places shown when drawing grid annotations. %Docstring Sets what types of grid annotations should be drawn for a specified side of the map frame, or whether grid annotations should be disabled for the side. + :param display: display mode for annotations :param border: side of map for annotations @@ -601,11 +563,10 @@ or whether grid annotations should be disabled for the side. Returns the display mode for the grid annotations on a specified side of the map frame. This property also specifies whether annotations have been disabled from a side of the map frame. + :param border: side of map for annotations :return: display mode for grid annotations -:rtype: DisplayMode - .. seealso:: :py:func:`setAnnotationDisplay()` %End @@ -623,8 +584,6 @@ frame. Returns the position for the grid annotations on a specified ``side`` of the map frame. -:rtype: AnnotationPosition - .. seealso:: :py:func:`setAnnotationPosition()` %End @@ -639,8 +598,6 @@ Sets the ``distance`` between the map frame and annotations. Units are layout un %Docstring Returns the distance between the map frame and annotations. Units are in layout units. -:rtype: float - .. seealso:: :py:func:`setAnnotationFrameDistance()` %End @@ -663,8 +620,6 @@ Sets the ``direction`` for drawing all frame annotations. Returns the direction for drawing frame annotations, on the specified ``side`` of the map. -:rtype: AnnotationDirection - .. seealso:: :py:func:`setAnnotationDirection()` %End @@ -679,8 +634,6 @@ Sets the ``format`` for drawing grid annotations. %Docstring Returns the format for drawing grid annotations. -:rtype: AnnotationFormat - .. seealso:: :py:func:`setAnnotationFormat()` %End @@ -697,8 +650,6 @@ is QgsLayoutItemMapGrid.CustomFormat. Returns the expression used for drawing grid annotations. This is only used when annotationFormat() is QgsLayoutItemMapGrid.CustomFormat. -:rtype: str - .. seealso:: :py:func:`setAnnotationExpression()` %End @@ -714,8 +665,6 @@ Sets the grid frame ``style``. %Docstring Returns the grid frame style. -:rtype: FrameStyle - .. seealso:: :py:func:`setFrameStyle()` %End @@ -730,8 +679,6 @@ Sets what type of grid ``divisions`` should be used for frames on a specified `` %Docstring Returns the type of grid divisions which are used for frames on a specified ``side`` of the map. -:rtype: DisplayMode - .. seealso:: :py:func:`setFrameDivisions()` %End @@ -750,6 +697,7 @@ of the map item the grid frame is drawn on. void setFrameSideFlag( const QgsLayoutItemMapGrid::FrameSideFlag flag, bool on = true ); %Docstring Sets whether the grid frame is drawn for a certain side of the map item. + :param flag: flag for grid frame side :param on: set to true to draw grid frame on that side of the map @@ -765,8 +713,6 @@ Sets whether the grid frame is drawn for a certain side of the map item. Returns the flags which control which sides of the map item the grid frame is drawn on. -:rtype: QgsLayoutItemMapGrid.FrameSideFlags - .. seealso:: :py:func:`setFrameSideFlags()` .. seealso:: :py:func:`setFrameSideFlag()` @@ -778,11 +724,10 @@ is drawn on. %Docstring Tests whether the grid frame should be drawn on a specified side of the map item. + :param flag: flag for grid frame side :return: true if grid frame should be drawn for that side of the map -:rtype: bool - .. seealso:: :py:func:`setFrameSideFlags()` @@ -806,8 +751,6 @@ Gets the grid frame width in layout units. This property controls how wide the g The size of the line outlines drawn in the frame can be retrieved via the framePenSize method. -:rtype: float - .. seealso:: :py:func:`setFrameWidth()` %End @@ -824,8 +767,6 @@ Sets the ``width`` of the stroke drawn in the grid frame. %Docstring Retrieves the width of the stroke drawn in the grid frame. -:rtype: float - .. seealso:: :py:func:`setFramePenSize()` .. seealso:: :py:func:`framePenColor()` @@ -848,8 +789,6 @@ Sets the ``color`` of the stroke drawn in the grid frame. %Docstring Retrieves the color of the stroke drawn in the grid frame. -:rtype: QColor - .. seealso:: :py:func:`setFramePenColor()` .. seealso:: :py:func:`framePenSize()` @@ -874,8 +813,6 @@ Sets the first fill ``color`` used for the grid frame. %Docstring Retrieves the first fill color for the grid frame. -:rtype: QColor - .. seealso:: :py:func:`setFrameFillColor1()` .. seealso:: :py:func:`framePenColor()` @@ -898,8 +835,6 @@ Sets the second fill ``color`` used for the grid frame. %Docstring Retrieves the second fill color for the grid frame. -:rtype: QColor - .. seealso:: :py:func:`setFrameFillColor2()` .. seealso:: :py:func:`framePenColor` diff --git a/python/core/layout/qgslayoutitemmapitem.sip b/python/core/layout/qgslayoutitemmapitem.sip index a31020c9b0f7..9a7affdb758b 100644 --- a/python/core/layout/qgslayoutitemmapitem.sip +++ b/python/core/layout/qgslayoutitemmapitem.sip @@ -39,8 +39,6 @@ Draws the item on to a destination ``painter``. Stores map item state in a DOM element, where ``element`` is the DOM element corresponding to a 'LayoutMap' tag. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -49,8 +47,6 @@ corresponding to a 'LayoutMap' tag. Sets the map item state from a DOM document, where ``element`` is the DOM node corresponding to a 'LayoutMapGrid' tag. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -65,16 +61,12 @@ Sets the corresponding layout ``map`` for the item. %Docstring Returns the layout item map for the item. -:rtype: QgsLayoutItemMap - .. seealso:: :py:func:`setMap()` %End QString id() const; %Docstring Returns the unique id for the map item. - -:rtype: str %End void setName( const QString &name ); @@ -88,8 +80,6 @@ Sets the friendly display ``name`` for the item. %Docstring Returns the friendly display name for the item. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -104,16 +94,12 @@ Controls whether the item will be drawn. Set ``enabled`` to true to enable drawi %Docstring Returns whether the item will be drawn. -:rtype: bool - .. seealso:: :py:func:`setEnabled()` %End virtual bool usesAdvancedEffects() const; %Docstring Returns true if the item is drawn using advanced effects, such as blend modes. - -:rtype: bool %End protected: @@ -154,8 +140,6 @@ specified ``map``. int size() const; %Docstring Returns the number of items in the stack. - -:rtype: int %End virtual bool writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) const; @@ -163,8 +147,6 @@ Returns the number of items in the stack. Stores the state of the item stack in a DOM node, where ``element`` is the DOM element corresponding to a 'LayoutMap' tag. Returns true if write was successful. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -173,8 +155,6 @@ Returns true if write was successful. Sets the item stack's state from a DOM document, where ``element`` is a DOM node corresponding to a 'LayoutMap' tag. Returns true if read was successful. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -187,8 +167,6 @@ Draws the items from the stack on a specified ``painter``. %Docstring Returns whether any items within the stack contain advanced effects, such as blending modes. - -:rtype: bool %End protected: @@ -247,8 +225,6 @@ called for the QgsLayoutItemMap to redraw the map with the new item stack order. %Docstring Returns a reference to an item which matching ``itemId`` within the stack. -:rtype: QgsLayoutItemMapItem - .. seealso:: :py:func:`constItem()` %End @@ -256,8 +232,6 @@ Returns a reference to an item which matching ``itemId`` within the stack. %Docstring Returns a reference to the item at the specified ``index`` within the stack. -:rtype: QgsLayoutItemMapItem - .. seealso:: :py:func:`constItem` %End @@ -265,8 +239,6 @@ Returns a reference to the item at the specified ``index`` within the stack. QList< QgsLayoutItemMapItem * > asList() const; %Docstring Returns a list of QgsLayoutItemMapItems contained by the stack. - -:rtype: list of QgsLayoutItemMapItem %End protected: diff --git a/python/core/layout/qgslayoutitemmapoverview.sip b/python/core/layout/qgslayoutitemmapoverview.sip index 45d909d21ddc..105f1550c9e5 100644 --- a/python/core/layout/qgslayoutitemmapoverview.sip +++ b/python/core/layout/qgslayoutitemmapoverview.sip @@ -87,8 +87,6 @@ called for the QgsLayoutItemMap to redraw the map with the new overview stack or %Docstring Returns a reference to an overview with matching overviewId within the stack. -:rtype: QgsLayoutItemMapOverview - .. seealso:: :py:func:`constOverview()` %End @@ -96,8 +94,6 @@ Returns a reference to an overview with matching overviewId within the stack. %Docstring Returns a reference to an overview at the specified ``index`` within the stack. -:rtype: QgsLayoutItemMapOverview - .. seealso:: :py:func:`constOverview()` %End @@ -106,8 +102,6 @@ Returns a reference to an overview at the specified ``index`` within the stack. QList< QgsLayoutItemMapOverview * > asList() const; %Docstring Returns a list of QgsLayoutItemMapOverviews contained by the stack. - -:rtype: list of QgsLayoutItemMapOverview %End virtual bool readXml( const QDomElement &elem, const QDomDocument &doc, const QgsReadWriteContext &context ); @@ -133,6 +127,7 @@ QgsLayoutItemMap, and shows the extent of another QgsLayoutItemMap. QgsLayoutItemMapOverview( const QString &name, QgsLayoutItemMap *map ); %Docstring Constructor for QgsLayoutItemMapOverview. + :param name: friendly display name for overview :param map: QgsLayoutItemMap the overview is attached to %End @@ -160,8 +155,6 @@ the overview frame. %Docstring Returns the uuid of source map, or an empty string if no map set. -:rtype: str - .. seealso:: :py:func:`setFrameMapUuid()` .. seealso:: :py:func:`frameMap()` @@ -178,8 +171,6 @@ Sets the ``map`` to show the overview extent of. %Docstring Returns the source map to show the overview extent of. -:rtype: QgsLayoutItemMap - .. seealso:: :py:func:`setFrameMap()` %End @@ -195,8 +186,6 @@ is transferred to the overview. %Docstring Returns the fill symbol used for drawing the overview extent. -:rtype: QgsFillSymbol - .. seealso:: :py:func:`setFrameSymbol()` %End @@ -204,8 +193,6 @@ Returns the fill symbol used for drawing the overview extent. %Docstring Retrieves the blending mode used for drawing the overview. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End @@ -221,8 +208,6 @@ Sets the blending ``mode`` used for drawing the overview. Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. -:rtype: bool - .. seealso:: :py:func:`setInverted()` %End @@ -238,8 +223,6 @@ the extent of the overview map. %Docstring Returns whether the extent of the map is forced to center on the overview. -:rtype: bool - .. seealso:: :py:func:`setCentered()` %End diff --git a/python/core/layout/qgslayoutitemnodeitem.sip b/python/core/layout/qgslayoutitemnodeitem.sip index 3a21c16e32c9..4c060c08170e 100644 --- a/python/core/layout/qgslayoutitemnodeitem.sip +++ b/python/core/layout/qgslayoutitemnodeitem.sip @@ -34,21 +34,18 @@ Sets the ``nodes`` the shape consists of. %Docstring Returns the nodes the shape consists of. -:rtype: QPolygonF - .. seealso:: :py:func:`setNodes()` %End bool addNode( QPointF point, bool checkArea = true, double radius = 10 ); %Docstring Add a node in current shape. + :param point: is the location of the new node (in scene coordinates) :param checkArea: is a flag to indicate if there's a space constraint. :param radius: is the space contraint and is used only if checkArea is true. Typically, if this flag is true, the new node has to be nearer than radius to the shape to be added. - -:rtype: bool %End void setDisplayNodes( bool display = true ); @@ -59,61 +56,50 @@ Set whether the item's nodes should be displayed. bool moveNode( int index, QPointF node ); %Docstring Moves a node to a new position. + :param index: the index of the node to move :param node: is the new position in scene coordinate - -:rtype: bool %End int nodeAtPosition( QPointF point, bool searchInRadius = true, double radius = 10 ) const; %Docstring Search for the nearest node in the shape within a maximal area. Returns the index of the nearest node or -1 if no node was found. + :param point: is the location to search for nodes from (in scene coordinates) :param searchInRadius: is a flag to indicate if the area of research is limited in space. :param radius: is only used if searchInRadius is true - -:rtype: int %End bool nodePosition( int index, QPointF &position ) const; %Docstring Gets the position of a node in scene coordinates. + :param index: of the node :param position: the position of the node :return: true if the index is valid and the position is set, false otherwise -:rtype: bool - %End bool removeNode( int index ); %Docstring Remove a node with specified ``index`` from the shape. - -:rtype: bool %End int nodesSize() const; %Docstring Returns the number of nodes in the shape. - -:rtype: int %End bool setSelectedNode( int index ); %Docstring Selects a node by ``index``. - -:rtype: bool %End int selectedNode() const; %Docstring Returns the currently selected node, or -1 if no node is selected. - -:rtype: int %End void deselectNode(); @@ -152,15 +138,11 @@ Constructor for a QgsLayoutNodesItem with the given ``polygon`` nodes, attached virtual bool _addNode( const int nodeIndex, QPointF newNode, const double radius ) = 0; %Docstring Method called in addNode. - -:rtype: bool %End virtual bool _removeNode( const int nodeIndex ) = 0; %Docstring Method called in removeNode. - -:rtype: bool %End virtual void _draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 ) = 0; @@ -187,8 +169,6 @@ the shape is resized thanks to the rubber band. double computeDistance( QPointF pt1, QPointF pt2 ) const; %Docstring Compute an euclidian distance between 2 nodes. - -:rtype: float %End void updateSceneRect(); diff --git a/python/core/layout/qgslayoutitempage.sip b/python/core/layout/qgslayoutitempage.sip index 955f3cb186d7..835355d09ace 100644 --- a/python/core/layout/qgslayoutitempage.sip +++ b/python/core/layout/qgslayoutitempage.sip @@ -44,8 +44,6 @@ Constructor for QgsLayoutItemPage, with the specified parent ``layout``. Returns a new page item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemPage %End virtual int type() const; @@ -67,8 +65,6 @@ The function returns true if ``size`` was a valid page size and the page size was changed. If false is returned then ``size`` could not be matched to a known page size. -:rtype: bool - .. seealso:: :py:func:`pageSize()` %End @@ -76,8 +72,6 @@ to a known page size. %Docstring Returns the size of the page. -:rtype: QgsLayoutSize - .. seealso:: :py:func:`setPageSize()` %End @@ -85,8 +79,6 @@ Returns the size of the page. %Docstring Returns the page orientiation. -:rtype: Orientation - .. note:: There is no direct setter for page orientation - use setPageSize() instead. @@ -97,8 +89,6 @@ Returns the page orientiation. Decodes a ``string`` representing a page orientation. If specified, ``ok`` will be set to true if string could be successfully interpreted as a page orientation. - -:rtype: QgsLayoutItemPage.Orientation %End virtual void attemptResize( const QgsLayoutSize &size, bool includesFrame = false ); diff --git a/python/core/layout/qgslayoutitempicture.sip b/python/core/layout/qgslayoutitempicture.sip index 42624ec74755..6f3109c0088c 100644 --- a/python/core/layout/qgslayoutitempicture.sip +++ b/python/core/layout/qgslayoutitempicture.sip @@ -57,8 +57,6 @@ Constructor for QgsLayoutItemPicture, with the specified parent ``layout``. Returns a new picture item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemPicture %End @@ -77,8 +75,6 @@ Returns the path of the source image. Data defined picture source may override this value. The path can either be a local path or a remote (http) path. :return: path for the source image -:rtype: str - .. seealso:: :py:func:`usePictureExpression()` @@ -90,8 +86,6 @@ this value. The path can either be a local path or a remote (http) path. Returns the rotation used for drawing the picture within the item's frame, in degrees clockwise. -:rtype: float - .. seealso:: :py:func:`setPictureRotation()` .. seealso:: :py:func:`rotationMap()` @@ -115,8 +109,6 @@ Returns the uuid of the rotation map. An empty string means map rotation is disabled. If this is set then the picture is rotated by the same amount as the specified map object. -:rtype: str - .. seealso:: :py:func:`setRotationMap()` .. seealso:: :py:func:`useRotationMap()` @@ -126,8 +118,6 @@ as the specified map object. %Docstring True if the picture rotation is matched to a map item. -:rtype: bool - .. seealso:: :py:func:`rotationMap()` .. seealso:: :py:func:`setRotationMap()` @@ -137,8 +127,6 @@ True if the picture rotation is matched to a map item. %Docstring Returns the mode used to align the picture to a map's North. -:rtype: NorthMode - .. seealso:: :py:func:`setNorthMode()` .. seealso:: :py:func:`northOffset()` @@ -157,8 +145,6 @@ Sets the ``mode`` used to align the picture to a map's North. %Docstring Returns the offset added to the picture's rotation from a map's North. -:rtype: float - .. seealso:: :py:func:`setNorthOffset()` .. seealso:: :py:func:`northMode()` @@ -178,8 +164,6 @@ Sets the ``offset`` added to the picture's rotation from a map's North. Returns the resize mode used for drawing the picture within the composer item's frame. -:rtype: ResizeMode - .. seealso:: :py:func:`setResizeMode()` %End @@ -196,8 +180,6 @@ within the picture item's frame. Returns the picture's current anchor, which controls how it is placed within the picture item's frame. -:rtype: QgsLayoutItem.ReferencePoint - .. seealso:: :py:func:`setPictureAnchor()` %End @@ -205,8 +187,6 @@ within the picture item's frame. %Docstring Returns the fill color used for parametrized SVG files. -:rtype: QColor - .. seealso:: :py:func:`setSvgFillColor()` .. seealso:: :py:func:`svgStrokeColor()` @@ -230,8 +210,6 @@ non-parametrized SVG files. %Docstring Returns the stroke color used for parametrized SVG files. -:rtype: QColor - .. seealso:: :py:func:`setSvgStrokeColor()` .. seealso:: :py:func:`svgFillColor()` @@ -240,6 +218,7 @@ Returns the stroke color used for parametrized SVG files. void setSvgStrokeColor( const QColor &color ); %Docstring Sets the stroke ``color`` used for parametrized SVG files. + :param color: stroke color. .. note:: @@ -256,8 +235,6 @@ non-parametrized SVG files. %Docstring Returns the stroke width (in layout units) used for parametrized SVG files. -:rtype: float - .. seealso:: :py:func:`setSvgStrokeWidth()` .. seealso:: :py:func:`svgStrokeColor()` @@ -280,8 +257,6 @@ non-parametrized SVG files. Format mode() const; %Docstring Returns the current picture mode (image format). - -:rtype: Format %End virtual void finalizeRestoreFromXml(); @@ -300,6 +275,7 @@ the item's frame, only the way the picture is drawn within the item. void setResizeMode( ResizeMode mode ); %Docstring Sets the resize ``mode`` used for drawing the picture within the item bounds. + :param mode: ResizeMode to use for image file .. seealso:: :py:func:`resizeMode` @@ -309,6 +285,7 @@ Sets the resize ``mode`` used for drawing the picture within the item bounds. %Docstring Recalculates the source image (if using an expression for picture's source) and reloads and redraws the picture. + :param context: expression context for evaluating data defined picture sources %End diff --git a/python/core/layout/qgslayoutitempolygon.sip b/python/core/layout/qgslayoutitempolygon.sip index dc87726dc5e8..3dbb26f1973a 100644 --- a/python/core/layout/qgslayoutitempolygon.sip +++ b/python/core/layout/qgslayoutitempolygon.sip @@ -39,8 +39,6 @@ and ``layout``. Returns a new polygon item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemPolygon %End virtual int type() const; @@ -52,8 +50,6 @@ The caller takes responsibility for deleting the returned object. %Docstring Returns the fill symbol used to draw the shape. -:rtype: QgsFillSymbol - .. seealso:: :py:func:`setSymbol()` %End diff --git a/python/core/layout/qgslayoutitempolyline.sip b/python/core/layout/qgslayoutitempolyline.sip index 31650516450f..584b88a79460 100644 --- a/python/core/layout/qgslayoutitempolyline.sip +++ b/python/core/layout/qgslayoutitempolyline.sip @@ -45,8 +45,6 @@ and ``layout``. Returns a new polyline item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemPolyline %End virtual int type() const; @@ -58,8 +56,6 @@ The caller takes responsibility for deleting the returned object. %Docstring Returns the line symbol used to draw the shape. -:rtype: QgsLineSymbol - .. seealso:: :py:func:`setSymbol()` %End @@ -75,8 +71,6 @@ Ownership of ``symbol`` is not transferred. %Docstring Returns the start marker mode, which controls what marker is drawn at the start of the line. -:rtype: MarkerMode - .. seealso:: :py:func:`setStartMarker()` .. seealso:: :py:func:`endMarker()` @@ -95,8 +89,6 @@ Sets the start marker ``mode``, which controls what marker is drawn at the start %Docstring Returns the end marker mode, which controls what marker is drawn at the end of the line. -:rtype: MarkerMode - .. seealso:: :py:func:`setEndMarker()` .. seealso:: :py:func:`startMarker()` @@ -122,8 +114,6 @@ Sets the ``width`` of line arrow heads in mm. %Docstring Returns the width of line arrow heads in mm. -:rtype: float - .. seealso:: :py:func:`setArrowHeadWidth()` %End @@ -140,8 +130,6 @@ Sets the ``path`` to a SVG marker to draw at the start of the line. %Docstring Returns the path the an SVG marker drawn at the start of the line. -:rtype: str - .. seealso:: :py:func:`setStartSvgMarkerPath()` .. seealso:: :py:func:`endSvgMarkerPath` @@ -160,8 +148,6 @@ Sets the ``path`` to a SVG marker to draw at the end of the line. %Docstring Returns the path the an SVG marker drawn at the end of the line. -:rtype: str - .. seealso:: :py:func:`setEndSvgMarkerPath()` .. seealso:: :py:func:`startSvgMarkerPath` @@ -171,8 +157,6 @@ Returns the path the an SVG marker drawn at the end of the line. %Docstring Returns the color used to draw the stroke around the the arrow head. -:rtype: QColor - .. seealso:: :py:func:`arrowHeadFillColor()` .. seealso:: :py:func:`setArrowHeadStrokeColor()` @@ -191,8 +175,6 @@ Sets the ``color`` used to draw the stroke around the arrow head. %Docstring Returns the color used to fill the arrow head. -:rtype: QColor - .. seealso:: :py:func:`arrowHeadStrokeColor()` .. seealso:: :py:func:`setArrowHeadFillColor()` @@ -220,8 +202,6 @@ Sets the pen ``width`` in millimeters for the stroke of the arrow head %Docstring Returns the pen width in millimeters for the stroke of the arrow head. -:rtype: float - .. seealso:: :py:func:`setArrowHeadStrokeWidth()` .. seealso:: :py:func:`arrowHeadStrokeColor()` diff --git a/python/core/layout/qgslayoutitemregistry.sip b/python/core/layout/qgslayoutitemregistry.sip index dac039899dad..7948845d863c 100644 --- a/python/core/layout/qgslayoutitemregistry.sip +++ b/python/core/layout/qgslayoutitemregistry.sip @@ -40,29 +40,21 @@ and ``visibleName``. int type() const; %Docstring Returns the unique item type code for the layout item class. - -:rtype: int %End virtual QIcon icon() const; %Docstring Returns an icon representing the layout item type. - -:rtype: QIcon %End QString visibleName() const; %Docstring Returns a translated, user visible name for the layout item class. - -:rtype: str %End virtual QgsLayoutItem *createItem( QgsLayout *layout ) = 0 /Factory/; %Docstring Creates a layout item of this class for a specified ``layout``. - -:rtype: QgsLayoutItem %End virtual void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving ); @@ -110,29 +102,21 @@ and ``visibleName``. int type() const; %Docstring Returns the unique item type code for the layout multiframe class. - -:rtype: int %End virtual QIcon icon() const; %Docstring Returns an icon representing the layout multiframe type. - -:rtype: QIcon %End QString visibleName() const; %Docstring Returns a translated, user visible name for the layout multiframe class. - -:rtype: str %End virtual QgsLayoutMultiFrame *createMultiFrame( QgsLayout *layout ) = 0 /Factory/; %Docstring Creates a layout multiframe of this class for a specified ``layout``. - -:rtype: QgsLayoutMultiFrame %End virtual void resolvePaths( QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving ); @@ -211,8 +195,6 @@ QgsApplication.layoutItemRegistry(). %Docstring Populates the registry with standard item types. If called on a non-empty registry then this will have no effect and will return false. - -:rtype: bool %End @@ -221,8 +203,6 @@ then this will have no effect and will return false. Returns the metadata for the specified item ``type``. Returns None if a corresponding type was not found in the registry. -:rtype: QgsLayoutItemAbstractMetadata - .. seealso:: :py:func:`multiFrameMetadata()` %End @@ -231,8 +211,6 @@ a corresponding type was not found in the registry. Returns the metadata for the specified multiframe ``type``. Returns None if a corresponding type was not found in the registry. -:rtype: QgsLayoutMultiFrameAbstractMetadata - .. seealso:: :py:func:`itemMetadata()` %End @@ -240,8 +218,6 @@ a corresponding type was not found in the registry. %Docstring Registers a new layout item type. Takes ownership of the metadata instance. -:rtype: bool - .. seealso:: :py:func:`addLayoutMultiFrameType()` %End @@ -249,8 +225,6 @@ Registers a new layout item type. Takes ownership of the metadata instance. %Docstring Registers a new layout multiframe type. Takes ownership of the metadata instance. -:rtype: bool - .. seealso:: :py:func:`addLayoutItemType()` %End @@ -258,8 +232,6 @@ Registers a new layout multiframe type. Takes ownership of the metadata instance %Docstring Creates a new instance of a layout item given the item ``type``, and target ``layout``. -:rtype: QgsLayoutItem - .. seealso:: :py:func:`createMultiFrame()` %End @@ -267,8 +239,6 @@ Creates a new instance of a layout item given the item ``type``, and target ``la %Docstring Creates a new instance of a layout multiframe given the multiframe ``type``, and target ``layout``. -:rtype: QgsLayoutMultiFrame - .. seealso:: :py:func:`createItem()` %End @@ -282,8 +252,6 @@ and converting absolute paths to relative paths when saving. QMap< int, QString> itemTypes() const; %Docstring Returns a map of available item types to translated name. - -:rtype: QMap< int, str> %End signals: diff --git a/python/core/layout/qgslayoutitemscalebar.sip b/python/core/layout/qgslayoutitemscalebar.sip index ae89636b89a5..194444e86804 100644 --- a/python/core/layout/qgslayoutitemscalebar.sip +++ b/python/core/layout/qgslayoutitemscalebar.sip @@ -34,8 +34,6 @@ Constructor for QgsLayoutItemScaleBar, with the specified parent ``layout``. Returns a new scale bar item for the specified ``layout``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsLayoutItemScaleBar %End virtual QgsLayoutSize minimumSize() const; @@ -44,8 +42,6 @@ The caller takes responsibility for deleting the returned object. %Docstring Returns the number of segments included in the scalebar. -:rtype: int - .. seealso:: :py:func:`setNumberOfSegments()` .. seealso:: :py:func:`numberOfSegmentsLeft()` @@ -64,8 +60,6 @@ Sets the number of ``segments`` included in the scalebar. %Docstring Returns the number of segments included in the left part of the scalebar. -:rtype: int - .. seealso:: :py:func:`setNumberOfSegmentsLeft()` .. seealso:: :py:func:`numberOfSegments()` @@ -84,8 +78,6 @@ Sets the number of ``segments`` included in the left part of the scalebar. %Docstring Returns the number of scalebar units per segment. -:rtype: float - .. seealso:: :py:func:`setUnitsPerSegment()` %End @@ -100,8 +92,6 @@ Sets the number of scalebar ``units`` per segment. %Docstring Returns the size mode for the scale bar segments. -:rtype: QgsScaleBarSettings.SegmentSizeMode - .. seealso:: :py:func:`setSegmentSizeMode()` .. seealso:: :py:func:`minBarWidth()` @@ -126,8 +116,6 @@ Returns the minimum width (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. -:rtype: float - .. seealso:: :py:func:`segmentSizeMode()` .. seealso:: :py:func:`setMinimumBarWidth()` @@ -154,8 +142,6 @@ Returns the maximum width (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. -:rtype: float - .. seealso:: :py:func:`segmentSizeMode()` .. seealso:: :py:func:`setMaximumBarWidth()` @@ -180,8 +166,6 @@ to SegmentSizeFitWidth. %Docstring Returns the number of map units per scale bar unit used by the scalebar. -:rtype: float - .. seealso:: :py:func:`setMapUnitsPerScaleBarUnit()` %End @@ -196,8 +180,6 @@ Sets the number of map ``units`` per scale bar unit used by the scalebar. %Docstring Returns the label for units. -:rtype: str - .. seealso:: :py:func:`setUnitLabel()` %End @@ -212,8 +194,6 @@ Sets the ``label`` for units. %Docstring Returns the font used for drawing text in the scalebar. -:rtype: QFont - .. seealso:: :py:func:`setFont()` %End @@ -228,8 +208,6 @@ Sets the ``font`` used for drawing text in the scalebar. %Docstring Returns the color used for drawing text in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFontColor()` .. seealso:: :py:func:`font()` @@ -248,8 +226,6 @@ Sets the ``color`` used for drawing text in the scalebar. %Docstring Returns the color used for fills in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFillColor()` .. seealso:: :py:func:`fillColor2()` @@ -268,8 +244,6 @@ Sets the ``color`` used for fills in the scalebar. %Docstring Returns the secondary color used for fills in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFillColor2()` .. seealso:: :py:func:`fillColor()` @@ -288,8 +262,6 @@ Sets the secondary ``color`` used for fills in the scalebar. %Docstring Returns the color used for lines in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setLineColor()` %End @@ -304,8 +276,6 @@ Sets the ``color`` used for lines in the scalebar. %Docstring Returns the line width in millimeters for lines in the scalebar. -:rtype: float - .. seealso:: :py:func:`setLineWidth()` %End @@ -320,8 +290,6 @@ Sets the line ``width`` in millimeters for lines in the scalebar. %Docstring Returns the pen used for drawing outlines in the scalebar. -:rtype: QPen - .. seealso:: :py:func:`setPen()` .. seealso:: :py:func:`brush()` @@ -332,8 +300,6 @@ Returns the pen used for drawing outlines in the scalebar. Returns the primary brush for the scalebar. :return: QBrush used for filling the scalebar -:rtype: QBrush - .. seealso:: :py:func:`setBrush` @@ -348,8 +314,6 @@ Returns the secondary brush for the scalebar. This is used for alternating color as single and double box styles. :return: QBrush used for secondary color areas -:rtype: QBrush - .. seealso:: :py:func:`setBrush2` @@ -360,8 +324,6 @@ as single and double box styles. %Docstring Returns the scalebar height (in millimeters). -:rtype: float - .. seealso:: :py:func:`setHeight()` %End @@ -383,8 +345,6 @@ Sets the ``map`` item linked to the scalebar. %Docstring Returns the map item linked to the scalebar. -:rtype: QgsLayoutItemMap - .. seealso:: :py:func:`setMap()` %End @@ -392,8 +352,6 @@ Returns the map item linked to the scalebar. %Docstring Returns the spacing (in millimeters) between labels and the scalebar. -:rtype: float - .. seealso:: :py:func:`setLabelBarSpace()` %End @@ -408,8 +366,6 @@ Sets the spacing (in millimeters) between labels and the scalebar. %Docstring Returns the spacing (margin) between the scalebar box and content in millimeters. -:rtype: float - .. seealso:: :py:func:`setBoxContentSpace()` %End @@ -424,8 +380,6 @@ Sets the ``space`` (margin) between the scalebar box and content in millimeters. %Docstring Returns the scalebar alignment. -:rtype: QgsScaleBarSettings.Alignment - .. seealso:: :py:func:`setAlignment()` %End @@ -440,8 +394,6 @@ Sets the scalebar ``alignment``. %Docstring Returns the distance units used by the scalebar. -:rtype: QgsUnitTypes.DistanceUnit - .. seealso:: :py:func:`setUnits()` %End @@ -456,8 +408,6 @@ Sets the distance ``units`` used by the scalebar. %Docstring Returns the join style used for drawing lines in the scalebar. -:rtype: Qt.PenJoinStyle - .. seealso:: :py:func:`setLineJoinStyle()` %End @@ -472,8 +422,6 @@ Sets the join ``style`` used when drawing the lines in the scalebar %Docstring Returns the cap style used for drawing lines in the scalebar. -:rtype: Qt.PenCapStyle - .. seealso:: :py:func:`setLineCapStyle()` %End @@ -498,8 +446,6 @@ the current linked map's scale. This method also considers the linked map's CRS, in order to determine if metric or imperial units are more appropriate. - -:rtype: QgsUnitTypes.DistanceUnit %End void applyDefaultSize( QgsUnitTypes::DistanceUnit units = QgsUnitTypes::DistanceMeters ); @@ -529,8 +475,6 @@ Possibilities are: 'Single Box', 'Double Box', 'Line Ticks Middle', %Docstring Returns the scale bar style name. -:rtype: str - .. seealso:: :py:func:`setStyle()` %End diff --git a/python/core/layout/qgslayoutitemshape.sip b/python/core/layout/qgslayoutitemshape.sip index a1daf0d5c383..a4de50a2da94 100644 --- a/python/core/layout/qgslayoutitemshape.sip +++ b/python/core/layout/qgslayoutitemshape.sip @@ -44,8 +44,6 @@ Constructor for QgsLayoutItemShape, with the specified parent ``layout``. %Docstring Returns the type of shape (e.g. rectangle, ellipse, etc). -:rtype: QgsLayoutItemShape.Shape - .. seealso:: :py:func:`setShapeType()` %End @@ -68,8 +66,6 @@ and a clone of the symbol is made. %Docstring Returns the fill symbol used to draw the shape. -:rtype: QgsFillSymbol - .. seealso:: :py:func:`setSymbol()` %End @@ -84,8 +80,6 @@ Sets the corner ``radius`` for rounded rectangle corners. %Docstring Returns the corner radius for rounded rectangle corners. -:rtype: QgsLayoutMeasurement - .. seealso:: :py:func:`setCornerRadius()` %End diff --git a/python/core/layout/qgslayoutitemtexttable.sip b/python/core/layout/qgslayoutitemtexttable.sip index 986461d01f3c..76dcde7dd7a0 100644 --- a/python/core/layout/qgslayoutitemtexttable.sip +++ b/python/core/layout/qgslayoutitemtexttable.sip @@ -37,13 +37,12 @@ Ownership is transferred to the layout. static QgsLayoutItemTextTable *create( QgsLayout *layout ) /Factory/; %Docstring Returns a new QgsLayoutItemTextTable for the specified parent ``layout``. - -:rtype: QgsLayoutItemTextTable %End void addRow( const QStringList &row ); %Docstring Adds a row to the table + :param row: list of strings to use for each cell's value in the newly added row .. note:: @@ -60,6 +59,7 @@ of columns in the table then these extra strings will be ignored. void setContents( const QVector< QStringList > &contents ); %Docstring Sets the contents of the text table. + :param contents: list of table rows .. seealso:: :py:func:`addRow` diff --git a/python/core/layout/qgslayoutmeasurement.sip b/python/core/layout/qgslayoutmeasurement.sip index 6fa772c67621..28f245987bdd 100644 --- a/python/core/layout/qgslayoutmeasurement.sip +++ b/python/core/layout/qgslayoutmeasurement.sip @@ -29,6 +29,7 @@ using a variety of different measurement units. explicit QgsLayoutMeasurement( const double length, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters ); %Docstring Constructor for QgsLayoutMeasurement. + :param length: measurement length :param units: measurement units %End @@ -37,8 +38,6 @@ Constructor for QgsLayoutMeasurement. %Docstring Returns the length of the measurement. -:rtype: float - .. seealso:: :py:func:`setLength()` %End @@ -53,8 +52,6 @@ Sets the ``length`` of the measurement. %Docstring Returns the units for the measurement. -:rtype: QgsUnitTypes.LayoutUnit - .. seealso:: :py:func:`setUnits()` %End @@ -70,8 +67,6 @@ ie. no length conversion is done. %Docstring Encodes the layout measurement to a string -:rtype: str - .. seealso:: :py:func:`decodeMeasurement()` %End @@ -79,72 +74,50 @@ Encodes the layout measurement to a string %Docstring Decodes a measurement from a ``string``. -:rtype: QgsLayoutMeasurement - .. seealso:: :py:func:`encodeMeasurement()` %End bool operator==( const QgsLayoutMeasurement &other ) const; bool operator!=( const QgsLayoutMeasurement &other ) const; -%Docstring - -:rtype: bool -%End QgsLayoutMeasurement operator+( const double v ) const; %Docstring Adds a scalar value to the measurement. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator+=( const double v ); %Docstring Adds a scalar value to the measurement. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator-( const double v ) const; %Docstring Subtracts a scalar value from the measurement. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator-=( const double v ); %Docstring Subtracts a scalar value from the measurement. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator*( const double v ) const; %Docstring Multiplies the measurement by a scalar value. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator*=( const double v ); %Docstring Multiplies the measurement by a scalar value. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator/( const double v ) const; %Docstring Divides the measurement by a scalar value. - -:rtype: QgsLayoutMeasurement %End QgsLayoutMeasurement operator/=( const double v ); %Docstring Divides the measurement by a scalar value. - -:rtype: QgsLayoutMeasurement %End }; diff --git a/python/core/layout/qgslayoutmeasurementconverter.sip b/python/core/layout/qgslayoutmeasurementconverter.sip index c0deab8b5df3..4efe4e134554 100644 --- a/python/core/layout/qgslayoutmeasurementconverter.sip +++ b/python/core/layout/qgslayoutmeasurementconverter.sip @@ -46,42 +46,37 @@ when converting measurements to and from pixels. Returns the Dots per inch (DPI) of the measurement converter. This is used when converting measurements to and from pixels. -:rtype: float - .. seealso:: :py:func:`setDpi()` %End QgsLayoutMeasurement convert( const QgsLayoutMeasurement &measurement, const QgsUnitTypes::LayoutUnit targetUnits ) const; %Docstring Converts a measurement from one unit to another. + :param measurement: measurement to convert :param targetUnits: units to convert measurement into :return: measurement converted to target units -:rtype: QgsLayoutMeasurement - %End QgsLayoutSize convert( const QgsLayoutSize &size, const QgsUnitTypes::LayoutUnit targetUnits ) const; %Docstring Converts a layout size from one unit to another. + :param size: layout size to convert :param targetUnits: units to convert size into :return: size converted to target units -:rtype: QgsLayoutSize - %End QgsLayoutPoint convert( const QgsLayoutPoint &point, const QgsUnitTypes::LayoutUnit targetUnits ) const; %Docstring Converts a layout point from one unit to another. + :param point: layout point to convert :param targetUnits: units to convert point into :return: point converted to target units -:rtype: QgsLayoutPoint - %End }; diff --git a/python/core/layout/qgslayoutmodel.sip b/python/core/layout/qgslayoutmodel.sip index 9eb397138924..403b50cdb7d1 100644 --- a/python/core/layout/qgslayoutmodel.sip +++ b/python/core/layout/qgslayoutmodel.sip @@ -79,8 +79,6 @@ Constructor for a QgsLayoutModel attached to the specified ``layout``. %Docstring Returns the QgsLayoutItem corresponding to a QModelIndex ``index``, if possible. -:rtype: QgsLayoutItem - .. seealso:: :py:func:`indexForItem()` %End @@ -88,8 +86,6 @@ Returns the QgsLayoutItem corresponding to a QModelIndex ``index``, if possible. %Docstring Returns the QModelIndex corresponding to a QgsLayoutItem ``item`` and ``column``, if possible. -:rtype: QModelIndex - .. seealso:: :py:func:`itemFromIndex()` %End @@ -122,8 +118,6 @@ Constructor for QgsLayoutProxyModelm, attached to the specified ``layout``. Returns the current item type filter, or QgsLayoutItemRegistry.LayoutItem if no item type filter is set. -:rtype: QgsLayoutItemRegistry.ItemType - .. seealso:: :py:func:`setFilterType()` %End @@ -147,24 +141,18 @@ Sets a list of specific ``items`` to exclude from the model. %Docstring Returns the list of specific items excluded from the model. -:rtype: list of QgsLayoutItem - .. seealso:: :py:func:`setExceptedItemList()` %End QgsLayoutModel *sourceLayerModel() const; %Docstring Returns the QgsLayoutModel used in this proxy model. - -:rtype: QgsLayoutModel %End QgsLayoutItem *itemFromSourceIndex( const QModelIndex &sourceIndex ) const; %Docstring Returns the QgsLayoutItem corresponding to an index from the source QgsLayoutModel model. - -:rtype: QgsLayoutItem %End protected: diff --git a/python/core/layout/qgslayoutmultiframe.sip b/python/core/layout/qgslayoutmultiframe.sip index 7a1336e17be9..2c1deb546b91 100644 --- a/python/core/layout/qgslayoutmultiframe.sip +++ b/python/core/layout/qgslayoutmultiframe.sip @@ -60,8 +60,6 @@ Construct a new multiframe item, attached to the specified ``layout``. Returns the multiframe identification string. This is a unique random string set for the multiframe upon creation. -:rtype: str - .. note:: There is no corresponding setter for the uuid - it's created automatically. @@ -70,26 +68,21 @@ upon creation. virtual QSizeF totalSize() const = 0; %Docstring Returns the total size of the multiframe's content, in layout units. - -:rtype: QSizeF %End virtual int type() const = 0; %Docstring Returns unique multiframe type id. - -:rtype: int %End virtual QSizeF fixedFrameSize( const int frameIndex = -1 ) const; %Docstring Returns the fixed size for a frame, if desired. If the fixed frame size changes, the sizes of all frames can be recalculated by calling recalculateFrameRects(). + :param frameIndex: frame number :return: fixed size for frame. If the size has a width or height of 0, then -:rtype: QSizeF - the frame size is not fixed in that direction and frames can have variable width or height accordingly. @@ -103,11 +96,10 @@ or height accordingly. Returns the minimum size for a frames, if desired. If the minimum size changes, the sizes of all frames can be recalculated by calling recalculateFrameRects(). + :param frameIndex: frame number :return: minimum size for frame. If the size has a width or height of 0, then -:rtype: QSizeF - the frame size has no minimum in that direction. .. seealso:: :py:func:`fixedFrameSize()` @@ -119,6 +111,7 @@ the frame size has no minimum in that direction. const QStyleOptionGraphicsItem *itemStyle = 0 ) = 0; %Docstring Renders a portion of the multiframe's content into a render ``context``. + :param context: destination render painter :param renderExtent: visible extent of content to render into the painter. :param frameIndex: frame number for content @@ -137,11 +130,10 @@ If ``recalcFrameSizes`` is set to true, then a recalculation of all existing fra virtual double findNearbyPageBreak( double yPos ); %Docstring Finds the optimal position to break a frame at. + :param yPos: maximum vertical position for break, in layout units. :return: the optimal breakable position which occurs in the multi frame close -:rtype: float - to and before the specified yPos %End @@ -176,34 +168,30 @@ Sets the resize ``mode`` for the multiframe, and recalculates frame sizes to mat %Docstring Returns the resize mode for the multiframe. -:rtype: ResizeMode - .. seealso:: :py:func:`setResizeMode()` %End bool writeXml( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context, bool ignoreFrames = false ) const; %Docstring Stores the multiframe state in a DOM element. + :param parentElement: parent DOM element (e.g. 'Layout' element) :param document: DOM document :param context: read write context :param ignoreFrames: set to false to avoid writing state information about child frames into DOM -:rtype: bool - .. seealso:: :py:func:`readXml()` %End bool readXml( const QDomElement &itemElement, const QDomDocument &document, const QgsReadWriteContext &context, bool ignoreFrames = false ); %Docstring Sets the item state from a DOM element. + :param itemElement: is the DOM node corresponding to item (e.g. 'LayoutItem' element) :param document: DOM document :param context: read write context :param ignoreFrames: set to false to avoid read state information about child frames from DOM -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -211,8 +199,6 @@ Sets the item state from a DOM element. %Docstring Returns a list of all child frames for this multiframe. -:rtype: list of QgsLayoutFrame - .. seealso:: :py:func:`frameCount()` %End @@ -220,8 +206,6 @@ Returns a list of all child frames for this multiframe. %Docstring Returns the number of frames associated with this multiframe. -:rtype: int - .. seealso:: :py:func:`frames()` %End @@ -229,8 +213,6 @@ Returns the number of frames associated with this multiframe. %Docstring Returns the child frame at a specified ``index`` from the multiframe. -:rtype: QgsLayoutFrame - .. seealso:: :py:func:`frameIndex()` %End @@ -239,8 +221,6 @@ Returns the child frame at a specified ``index`` from the multiframe. Returns the index of a ``frame`` within the multiframe. :return: index for frame if found, -1 if frame not found in multiframe -:rtype: int - .. seealso:: :py:func:`frame()` %End @@ -248,19 +228,16 @@ Returns the index of a ``frame`` within the multiframe. QgsLayoutFrame *createNewFrame( QgsLayoutFrame *currentFrame, QPointF pos, QSizeF size ); %Docstring Creates a new frame and adds it to the multi frame and layout. + :param currentFrame: an existing QgsLayoutFrame from which to copy the size and general frame properties (e.g., frame style, background, rendering settings). :param pos: position of top-left corner of the new frame, in layout units :param size: size of the new frame, in layout units - -:rtype: QgsLayoutFrame %End virtual QString displayName() const; %Docstring Returns the multiframe display name. - -:rtype: str %End virtual QgsAbstractLayoutUndoCommand *createCommand( const QString &text, int id, QUndoCommand *parent = 0 ) /Factory/; @@ -370,12 +347,11 @@ must be redrawn. virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Stores multiframe state within an XML DOM element. + :param element: is the DOM element to store the multiframe's properties in :param document: DOM document :param context: read write context -:rtype: bool - .. seealso:: :py:func:`writeXml()` .. seealso:: :py:func:`readPropertiesFromElement()` @@ -384,12 +360,11 @@ Stores multiframe state within an XML DOM element. virtual bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context ); %Docstring Sets multiframe state from a DOM element. + :param element: is the DOM element for the multiframe :param document: DOM document :param context: read write context -:rtype: bool - .. seealso:: :py:func:`writePropertiesToElement()` Note that item subclasses should not rely on all other items being present in the diff --git a/python/core/layout/qgslayoutobject.sip b/python/core/layout/qgslayoutobject.sip index 0161d683d692..dfdd67b89e51 100644 --- a/python/core/layout/qgslayoutobject.sip +++ b/python/core/layout/qgslayoutobject.sip @@ -82,8 +82,6 @@ A base class for objects which belong to a layout. static const QgsPropertiesDefinition &propertyDefinitions(); %Docstring Returns the layout object property definitions. - -:rtype: QgsPropertiesDefinition %End explicit QgsLayoutObject( QgsLayout *layout ); @@ -101,16 +99,12 @@ may transfer their ownership to a layout upon construction. QgsLayout *layout(); %Docstring Returns the layout the object is attached to. - -:rtype: QgsLayout %End QgsPropertyCollection &dataDefinedProperties(); %Docstring Returns a reference to the object's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. seealso:: :py:func:`setDataDefinedProperties()` %End @@ -118,6 +112,7 @@ Returns a reference to the object's property collection, used for data defined o void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the objects's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. seealso:: :py:func:`dataDefinedProperties()` @@ -127,6 +122,7 @@ Sets the objects's property collection, used for data defined overrides. void setCustomProperty( const QString &key, const QVariant &value ); %Docstring Set a custom property for the object. + :param key: property key. If a property with the same key already exists it will be overwritten. :param value: property value @@ -140,12 +136,11 @@ Set a custom property for the object. QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const; %Docstring Read a custom property from the object. + :param key: property key :param defaultValue: default value to return if property with matching key does not exist :return: value of matching property -:rtype: QVariant - .. seealso:: :py:func:`setCustomProperty()` @@ -157,6 +152,7 @@ Read a custom property from the object. void removeCustomProperty( const QString &key ); %Docstring Remove a custom property from the object. + :param key: property key .. seealso:: :py:func:`setCustomProperty()` @@ -170,8 +166,6 @@ Remove a custom property from the object. %Docstring Return list of keys stored in custom properties for the object. -:rtype: list of str - .. seealso:: :py:func:`setCustomProperty()` .. seealso:: :py:func:`customProperty()` @@ -184,8 +178,6 @@ Return list of keys stored in custom properties for the object. %Docstring Creates an expression context relating to the objects' current state. The context includes scopes for global, project and layout properties. - -:rtype: QgsExpressionContext %End public slots: @@ -207,13 +199,12 @@ Emitted when the object's properties change. bool writeObjectPropertiesToElement( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Stores object properties within an XML DOM element. + :param parentElement: is the parent DOM element to store the object's properties in :param document: DOM document :param context: read write context :return: true if write was successful -:rtype: bool - .. seealso:: :py:func:`readObjectPropertiesFromElement()` %End @@ -221,13 +212,12 @@ Stores object properties within an XML DOM element. bool readObjectPropertiesFromElement( const QDomElement &parentElement, const QDomDocument &document, const QgsReadWriteContext &context ); %Docstring Sets object properties from a DOM element + :param parentElement: is the parent DOM element for the object :param document: DOM document :param context: read write context :return: true if read was successful -:rtype: bool - .. seealso:: :py:func:`writeObjectPropertiesToElement()` %End diff --git a/python/core/layout/qgslayoutpagecollection.sip b/python/core/layout/qgslayoutpagecollection.sip index 4567774c852b..42235f0f3f39 100644 --- a/python/core/layout/qgslayoutpagecollection.sip +++ b/python/core/layout/qgslayoutpagecollection.sip @@ -37,8 +37,6 @@ Constructor for QgsLayoutItemPage, with the specified parent ``layout``. %Docstring Returns a list of pages in the collection. -:rtype: list of QgsLayoutItemPage - .. seealso:: :py:func:`page()` .. seealso:: :py:func:`pageCount()` @@ -48,8 +46,6 @@ Returns a list of pages in the collection. %Docstring Returns the number of pages in the collection. -:rtype: int - .. seealso:: :py:func:`pages()` %End @@ -60,8 +56,6 @@ Internal page numbering starts at 0 - so a ``pageNumber`` of 0 corresponds to the first page in the collection. A None is returned if an invalid page number is specified. -:rtype: QgsLayoutItemPage - .. seealso:: :py:func:`pages()` %End @@ -69,8 +63,6 @@ A None is returned if an invalid page number is specified. %Docstring Returns the page number for the specified ``page``, or -1 if the page is not contained in the collection. - -:rtype: int %End QList< QgsLayoutItemPage * > visiblePages( QRectF region ) const; @@ -78,8 +70,6 @@ is not contained in the collection. Returns a list of the pages which are visible within the specified ``region`` (in layout coordinates). -:rtype: list of QgsLayoutItemPage - .. seealso:: :py:func:`visiblePageNumbers()` %End @@ -88,8 +78,6 @@ Returns a list of the pages which are visible within the specified Returns a list of the page numbers which are visible within the specified ``region`` (in layout coordinates). -:rtype: list of int - .. seealso:: :py:func:`visiblePages()` %End @@ -97,15 +85,11 @@ Returns a list of the page numbers which are visible within the specified %Docstring Returns whether a given ``page`` index is empty, ie, it contains no items except for the background paper item. - -:rtype: bool %End QList< QgsLayoutItem *> itemsOnPage( int page ) const; %Docstring Returns a list of layout items on the specified ``page`` index. - -:rtype: list of QgsLayoutItem %End void addPage( QgsLayoutItemPage *page /Transfer/ ); @@ -129,8 +113,6 @@ same size as the current final page in the collection. The newly created page will be returned. -:rtype: QgsLayoutItemPage - .. seealso:: :py:func:`addPage()` .. seealso:: :py:func:`insertPage()` @@ -186,8 +168,6 @@ Removes all pages from the collection. QgsLayoutItemPage *takePage( QgsLayoutItemPage *page ) /TransferBack/; %Docstring Takes a ``page`` from the collection, returning ownership of the page to the caller. - -:rtype: QgsLayoutItemPage %End void setPageStyleSymbol( QgsFillSymbol *symbol ); @@ -203,8 +183,6 @@ Ownership is not transferred, and a copy of the symbol is created internally. %Docstring Returns the symbol to use for drawing pages in the collection. -:rtype: QgsFillSymbol - .. seealso:: :py:func:`setPageStyleSymbol()` %End @@ -218,8 +196,6 @@ for page size/orientation change. %Docstring Returns the maximum width of pages in the collection. The returned value is in layout units. - -:rtype: float %End int pageNumberForPoint( QPointF point ) const; @@ -229,8 +205,6 @@ Returns the page number corresponding to a ``point`` in the layout (in layout un Page numbers in collections begin at 0 - so a page number of 0 indicates the first page. -:rtype: int - .. note:: This is a relaxed check, which will always return a page number. For instance, @@ -256,8 +230,6 @@ imaginary pages will inherit the size of the existing final page in the layout. Page numbers in collections begin at 0 - so a page number of 0 indicates the first page. -:rtype: int - .. seealso:: :py:func:`pageNumberForPoint()` .. seealso:: :py:func:`pageAtPoint()` @@ -271,8 +243,6 @@ Returns the page at a specified ``point`` (in layout coordinates). If no page exists at ``point``, None will be returned. -:rtype: QgsLayoutItemPage - .. note:: Unlike pageNumberForPoint(), this method only returns pages which @@ -285,8 +255,6 @@ directly intersect with the specified point. %Docstring Converts a ``position`` on a ``page`` to an absolute position in layout coordinates.\ -:rtype: QPointF - .. seealso:: :py:func:`pagePositionToAbsolute()` %End @@ -294,8 +262,6 @@ Converts a ``position`` on a ``page`` to an absolute position in layout coordina %Docstring Converts a ``position`` on a ``page`` to an absolute position in (maintaining the units from the input ``position``). -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`pagePositionToLayoutPosition()` %End @@ -303,23 +269,17 @@ Converts a ``position`` on a ``page`` to an absolute position in (maintaining th %Docstring Returns the position within a page of a ``point`` in the layout (in layout units). -:rtype: QPointF - .. seealso:: :py:func:`pageNumberForPoint()` %End double spaceBetweenPages() const; %Docstring Returns the space between pages, in layout units. - -:rtype: float %End double pageShadowWidth() const; %Docstring Returns the size of the page shadow, in layout units. - -:rtype: float %End virtual bool writeXml( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const; @@ -327,8 +287,6 @@ Returns the size of the page shadow, in layout units. %Docstring Stores the collection's state in a DOM element. The ``parentElement`` should refer to the parent layout's DOM element. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -337,16 +295,12 @@ Stores the collection's state in a DOM element. The ``parentElement`` should ref %Docstring Sets the collection's state from a DOM element. collectionElement is the DOM node corresponding to the collection. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End QgsLayoutGuideCollection &guides(); %Docstring Returns a reference to the collection's guide collection, which manages page snap guides. - -:rtype: QgsLayoutGuideCollection %End diff --git a/python/core/layout/qgslayoutpoint.sip b/python/core/layout/qgslayoutpoint.sip index 0ca19bd20e6b..ba963897ea5f 100644 --- a/python/core/layout/qgslayoutpoint.sip +++ b/python/core/layout/qgslayoutpoint.sip @@ -46,6 +46,7 @@ Constructor for QgsLayoutPoint. explicit QgsLayoutPoint( const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters ); %Docstring Constructor for an empty point, where both x and y are set to 0. + :param units: units for measurement %End @@ -64,8 +65,6 @@ Sets new x and y coordinates for the point. %Docstring Returns x coordinate of point. -:rtype: float - .. seealso:: :py:func:`setX()` .. seealso:: y() @@ -84,8 +83,6 @@ Sets the x coordinate of point. %Docstring Returns y coordinate of point. -:rtype: float - .. seealso:: :py:func:`setY()` .. seealso:: x() @@ -104,8 +101,6 @@ Sets y coordinate of point. %Docstring Returns the units for the point. -:rtype: QgsUnitTypes.LayoutUnit - .. seealso:: :py:func:`setUnits()` %End @@ -123,8 +118,6 @@ Tests whether the position is null, ie both its x and y coordinates are zero. :return: true if point is null -:rtype: bool - %End QPointF toQPointF() const; @@ -133,16 +126,12 @@ Converts the layout point to a QPointF. The unit information is discarded during this operation. :return: QPointF with same x and y coordinates as layout point -:rtype: QPointF - %End QString encodePoint() const; %Docstring Encodes the layout point to a string -:rtype: str - .. seealso:: :py:func:`decodePoint()` %End @@ -150,44 +139,30 @@ Encodes the layout point to a string %Docstring Decodes a point from a ``string``. -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`encodePoint()` %End bool operator==( const QgsLayoutPoint &other ) const; bool operator!=( const QgsLayoutPoint &other ) const; -%Docstring - -:rtype: bool -%End QgsLayoutPoint operator*( const double v ) const; %Docstring Multiplies the x and y by a scalar value. - -:rtype: QgsLayoutPoint %End QgsLayoutPoint operator*=( const double v ); %Docstring Multiplies the x and y by a scalar value. - -:rtype: QgsLayoutPoint %End QgsLayoutPoint operator/( const double v ) const; %Docstring Divides the x and y by a scalar value. - -:rtype: QgsLayoutPoint %End QgsLayoutPoint operator/=( const double v ); %Docstring Divides the x and y by a scalar value. - -:rtype: QgsLayoutPoint %End }; diff --git a/python/core/layout/qgslayoutserializableobject.sip b/python/core/layout/qgslayoutserializableobject.sip index 366f763692b7..7370f8edb2da 100644 --- a/python/core/layout/qgslayoutserializableobject.sip +++ b/python/core/layout/qgslayoutserializableobject.sip @@ -28,23 +28,17 @@ An interface for layout objects which can be stored and read from DOM elements. Return the object type as a string. This string must be a unique, single word, character only representation of the item type, eg "LayoutScaleBar" - -:rtype: str %End virtual QgsLayout *layout() = 0; %Docstring Returns the layout the object belongs to. - -:rtype: QgsLayout %End virtual bool writeXml( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const = 0; %Docstring Stores the objects's state in a DOM element. The ``parentElement`` should refer to the parent layout's DOM element. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -52,8 +46,6 @@ Stores the objects's state in a DOM element. The ``parentElement`` should refer %Docstring Sets the objects's state from a DOM element. ``element`` is the DOM node corresponding to the object. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End diff --git a/python/core/layout/qgslayoutsize.sip b/python/core/layout/qgslayoutsize.sip index b3d5c2aed308..426bb4910628 100644 --- a/python/core/layout/qgslayoutsize.sip +++ b/python/core/layout/qgslayoutsize.sip @@ -37,6 +37,7 @@ paper and screen units can be correctly performed. QgsLayoutSize( const double width, const double height, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters ); %Docstring Constructor for QgsLayoutSize. + :param width: width :param height: height :param units: units for width and height @@ -50,6 +51,7 @@ Constructor for QgsLayoutSize. explicit QgsLayoutSize( const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters ); %Docstring Constructor for an empty layout size + :param units: units for measurement %End @@ -68,8 +70,6 @@ Sets new ``width`` and ``height`` for the size. %Docstring Returns the width of the size. -:rtype: float - .. seealso:: :py:func:`setWidth()` .. seealso:: :py:func:`height()` @@ -88,8 +88,6 @@ Sets the ``width`` for the size. %Docstring Returns the height of the size. -:rtype: float - .. seealso:: :py:func:`setHeight()` .. seealso:: :py:func:`width()` @@ -108,8 +106,6 @@ Sets the ``height`` for the size. %Docstring Returns the units for the size. -:rtype: QgsUnitTypes.LayoutUnit - .. seealso:: :py:func:`setUnits()` %End @@ -127,8 +123,6 @@ Tests whether the size is empty, ie both its width and height are zero. :return: true if size is empty -:rtype: bool - %End QSizeF toQSizeF() const; @@ -137,16 +131,12 @@ Converts the layout size to a QSizeF. The unit information is discarded during this operation. :return: QSizeF with same dimensions as layout size -:rtype: QSizeF - %End QString encodeSize() const; %Docstring Encodes the layout size to a string -:rtype: str - .. seealso:: :py:func:`decodeSize()` %End @@ -154,44 +144,30 @@ Encodes the layout size to a string %Docstring Decodes a size from a ``string``. -:rtype: QgsLayoutSize - .. seealso:: :py:func:`encodeSize()` %End bool operator==( const QgsLayoutSize &other ) const; bool operator!=( const QgsLayoutSize &other ) const; -%Docstring - -:rtype: bool -%End QgsLayoutSize operator*( const double v ) const; %Docstring Multiplies the width and height by a scalar value. - -:rtype: QgsLayoutSize %End QgsLayoutSize operator*=( const double v ); %Docstring Multiplies the width and height by a scalar value. - -:rtype: QgsLayoutSize %End QgsLayoutSize operator/( const double v ) const; %Docstring Divides the width and height by a scalar value. - -:rtype: QgsLayoutSize %End QgsLayoutSize operator/=( const double v ); %Docstring Divides the width and height by a scalar value. - -:rtype: QgsLayoutSize %End }; diff --git a/python/core/layout/qgslayoutsnapper.sip b/python/core/layout/qgslayoutsnapper.sip index 734947ecf9a4..074e0526b104 100644 --- a/python/core/layout/qgslayoutsnapper.sip +++ b/python/core/layout/qgslayoutsnapper.sip @@ -42,8 +42,6 @@ Sets the snap ``tolerance`` (in pixels) to use when snapping. %Docstring Returns the snap tolerance (in pixels) to use when snapping. -:rtype: int - .. seealso:: :py:func:`setSnapTolerance()` %End @@ -51,8 +49,6 @@ Returns the snap tolerance (in pixels) to use when snapping. %Docstring Returns true if snapping to grid is enabled. -:rtype: bool - .. seealso:: :py:func:`setSnapToGrid()` %End @@ -67,8 +63,6 @@ Sets whether snapping to grid is ``enabled``. %Docstring Returns true if snapping to guides is enabled. -:rtype: bool - .. seealso:: :py:func:`setSnapToGuides()` %End @@ -83,8 +77,6 @@ Sets whether snapping to guides is ``enabled``. %Docstring Returns true if snapping to items is enabled. -:rtype: bool - .. seealso:: :py:func:`setSnapToItems()` %End @@ -112,8 +104,6 @@ will automatically display and position these lines to indicate snapping positio A list of items to ignore during the snapping can be specified via the ``ignoreItems`` list. -:rtype: QPointF - .. seealso:: :py:func:`snapRect()` %End @@ -137,8 +127,6 @@ will automatically display and position these lines to indicate snapping positio A list of items to ignore during the snapping can be specified via the ``ignoreItems`` list. -:rtype: QRectF - .. seealso:: :py:func:`snapPoint()` %End @@ -155,8 +143,6 @@ graphics view transform().m11() value. If snapToGrid() is disabled, this method will return the point unchanged. -:rtype: QPointF - .. seealso:: :py:func:`snapPointsToGrid()` %End @@ -174,8 +160,6 @@ If snapToGrid() is disabled, this method will not attempt to snap the points. The returned value is the smallest delta which the points need to be shifted by in order to align one of the points to the grid. -:rtype: QPointF - .. seealso:: :py:func:`snapPointToGrid()` %End @@ -191,8 +175,6 @@ graphics view transform().m11() value. If snapToGuides() is disabled, this method will return the point unchanged. -:rtype: float - .. seealso:: :py:func:`snapPointsToGuides()` %End @@ -210,8 +192,6 @@ If snapToGuides() is disabled, this method will not attempt to snap the points. The returned value is the smallest delta which the points need to be shifted by in order to align one of the points to a guide. -:rtype: float - .. seealso:: :py:func:`snapPointToGuides()` %End @@ -233,8 +213,6 @@ A list of items to ignore during the snapping can be specified via the ``ignoreI If ``snapLine`` is specified, the snapper will automatically show (or hide) the snap line based on the result of the snap, and position it at the correct location for the snap. -:rtype: float - .. seealso:: :py:func:`snapPointsToItems()` %End @@ -253,8 +231,6 @@ If snapToItems() is disabled, this method will not attempt to snap the points. The returned value is the smallest delta which the points need to be shifted by in order to align one of the points to an item bound. -:rtype: float - .. seealso:: :py:func:`snapPointToItems()` %End @@ -263,8 +239,6 @@ one of the points to an item bound. %Docstring Stores the snapper's state in a DOM element. The ``parentElement`` should refer to the parent layout's DOM element. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -273,8 +247,6 @@ Stores the snapper's state in a DOM element. The ``parentElement`` should refer %Docstring Sets the snapper's state from a DOM element. snapperElement is the DOM node corresponding to the snapper. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End diff --git a/python/core/layout/qgslayouttable.sip b/python/core/layout/qgslayouttable.sip index 2a745033be90..2648c29603e2 100644 --- a/python/core/layout/qgslayouttable.sip +++ b/python/core/layout/qgslayouttable.sip @@ -50,20 +50,18 @@ Cell background color bool writeXml( QDomElement &styleElem, QDomDocument &doc ) const; %Docstring Writes the style's properties to XML for storage. + :param styleElem: an existing QDomElement in which to store the style's properties. :param doc: QDomDocument for the destination XML. -:rtype: bool - .. seealso:: :py:func:`readXml` %End bool readXml( const QDomElement &styleElem ); %Docstring Reads the style's properties from XML. -:param styleElem: a QDomElement holding the style's desired properties. -:rtype: bool +:param styleElem: a QDomElement holding the style's desired properties. .. seealso:: :py:func:`writeXml` %End @@ -143,8 +141,6 @@ Sets the ``margin`` distance in mm between cell borders and their contents. %Docstring Returns the margin distance between cell borders and their contents in mm. -:rtype: float - .. seealso:: :py:func:`setCellMargin()` %End @@ -160,8 +156,6 @@ Sets the behavior ``mode`` for empty tables with no content rows. Returns the behavior mode for empty tables. This property controls how the table is drawn if it contains no content rows. -:rtype: EmptyTableMode - .. seealso:: :py:func:`setEmptyTableBehavior()` %End @@ -182,8 +176,6 @@ Returns the message for empty tables with no content rows. This message is displayed in the table body if the empty table behavior is set to ShowMessage. -:rtype: str - .. seealso:: :py:func:`setEmptyTableMessage()` .. seealso:: :py:func:`emptyTableBehavior()` @@ -192,6 +184,7 @@ set to ShowMessage. void setShowEmptyRows( const bool showEmpty ); %Docstring Sets whether empty rows should be drawn. Tables default to hiding empty rows. + :param showEmpty: set to true to show empty rows in the table .. seealso:: :py:func:`showEmptyRows()` @@ -201,8 +194,6 @@ Sets whether empty rows should be drawn. Tables default to hiding empty rows. %Docstring Returns whether empty rows are drawn in the table. -:rtype: bool - .. seealso:: :py:func:`setShowEmptyRows()` %End @@ -219,8 +210,6 @@ Sets the ``font`` used to draw header text in the table. %Docstring Returns the font used to draw header text in the table. -:rtype: QFont - .. seealso:: :py:func:`setHeaderFont()` .. seealso:: :py:func:`contentFont()` @@ -241,8 +230,6 @@ Sets the ``color`` used to draw header text in the table. %Docstring Returns the color used to draw header text in the table. -:rtype: QColor - .. seealso:: :py:func:`setHeaderFontColor()` .. seealso:: :py:func:`headerFont()` @@ -261,8 +248,6 @@ Sets the horizontal ``alignment`` for table headers. %Docstring Returns the horizontal alignment for table headers. -:rtype: HeaderHAlignment - .. seealso:: :py:func:`setHeaderHAlignment()` %End @@ -279,8 +264,6 @@ if and where headers are shown in the table. Returns the display mode for headers in the table. This property controls if and where headers are shown in the table. -:rtype: HeaderMode - .. seealso:: :py:func:`setHeaderMode()` %End @@ -297,8 +280,6 @@ Sets the ``font`` used to draw text in table body cells. %Docstring Returns the font used to draw text in table body cells. -:rtype: QFont - .. seealso:: :py:func:`setContentFont()` .. seealso:: :py:func:`headerFont()` @@ -319,8 +300,6 @@ Sets the ``color`` used to draw text in table body cells. %Docstring Returns the color used to draw text in table body cells. -:rtype: QColor - .. seealso:: :py:func:`setContentFontColor()` .. seealso:: :py:func:`contentFont()` @@ -331,6 +310,7 @@ Returns the color used to draw text in table body cells. void setShowGrid( const bool showGrid ); %Docstring Sets whether grid lines should be drawn in the table + :param showGrid: set to true to show grid lines .. seealso:: :py:func:`showGrid()` @@ -344,8 +324,6 @@ Sets whether grid lines should be drawn in the table %Docstring Returns whether grid lines are drawn in the table -:rtype: bool - .. seealso:: :py:func:`setShowGrid()` .. seealso:: :py:func:`gridStrokeWidth()` @@ -368,8 +346,6 @@ Sets the ``width`` in mm for grid lines in the table. %Docstring Returns the width of grid lines in the table in mm. -:rtype: float - .. seealso:: :py:func:`setGridStrokeWidth()` .. seealso:: :py:func:`showGrid()` @@ -392,8 +368,6 @@ Sets the ``color`` used for grid lines in the table. %Docstring Returns the color used for grid lines in the table. -:rtype: QColor - .. seealso:: :py:func:`setGridColor()` .. seealso:: :py:func:`showGrid()` @@ -404,6 +378,7 @@ Returns the color used for grid lines in the table. void setHorizontalGrid( const bool horizontalGrid ); %Docstring Sets whether the grid's horizontal lines should be drawn in the table + :param horizontalGrid: set to true to draw grid's horizontal lines .. seealso:: :py:func:`setShowGrid()` @@ -419,8 +394,6 @@ Sets whether the grid's horizontal lines should be drawn in the table %Docstring Returns whether the grid's horizontal lines are drawn in the table. -:rtype: bool - .. seealso:: :py:func:`setShowGrid()` .. seealso:: :py:func:`setGridStrokeWidth()` @@ -433,6 +406,7 @@ Returns whether the grid's horizontal lines are drawn in the table. void setVerticalGrid( const bool verticalGrid ); %Docstring Sets whether the grid's vertical lines should be drawn in the table + :param verticalGrid: set to true to draw grid's vertical lines .. seealso:: :py:func:`setShowGrid()` @@ -448,8 +422,6 @@ Sets whether the grid's vertical lines should be drawn in the table %Docstring Returns whether the grid's vertical lines are drawn in the table. -:rtype: bool - .. seealso:: :py:func:`setShowGrid()` .. seealso:: :py:func:`setGridStrokeWidth()` @@ -472,8 +444,6 @@ Sets the ``color`` used for background of table. %Docstring Returns the color used for the background of the table. -:rtype: QColor - .. seealso:: :py:func:`setBackgroundColor()` .. seealso:: :py:func:`gridColor()` @@ -492,8 +462,6 @@ automatically wrapped. Returns the wrap behavior for the table, which controls how text within cells is automatically wrapped. -:rtype: WrapBehavior - .. seealso:: :py:func:`setWrapBehavior()` %End @@ -501,14 +469,13 @@ automatically wrapped. %Docstring Returns a reference to the list of QgsLayoutTableColumns shown in the table -:rtype: QgsLayoutTableColumns - .. seealso:: :py:func:`setColumns()` %End void setColumns( const QgsLayoutTableColumns &columns ); %Docstring Replaces the columns in the table with a specified list of QgsLayoutTableColumns. + :param columns: list of QgsLayoutTableColumns to show in table. .. seealso:: :py:func:`columns()` @@ -525,8 +492,6 @@ Sets the cell ``style`` for a cell ``group``. %Docstring Returns the cell style for a cell ``group``. -:rtype: QgsLayoutTableStyle - .. seealso:: :py:func:`setCellStyle()` %End @@ -536,7 +501,6 @@ Returns the cell style for a cell ``group``. Fetches the contents used for the cells in the table. :return: true if table contents were successfully retrieved. -:rtype: bool :param contents: QgsLayoutTableContents to store retrieved row data in %End @@ -544,8 +508,6 @@ Fetches the contents used for the cells in the table. QgsLayoutTableContents &contents(); %Docstring Returns the current contents of the table. Excludes header cells. - -:rtype: QgsLayoutTableContents %End virtual QSizeF fixedFrameSize( const int frameIndex = -1 ) const; @@ -606,33 +568,22 @@ new data. virtual bool calculateMaxColumnWidths(); %Docstring Calculates the maximum width of text shown in columns. - -:rtype: bool %End virtual bool calculateMaxRowHeights(); %Docstring Calculates the maximum height of text shown in rows. - -:rtype: bool %End double totalWidth(); -%Docstring - -:rtype: float -%End double totalHeight(); -%Docstring - -:rtype: float -%End int rowsVisible( double frameHeight, int firstRow, bool includeHeader, bool includeEmptyRows ) const; %Docstring Calculates how many content rows would be visible within a frame of the specified height. + :param frameHeight: height of frame :param firstRow: index of first row visible in frame (where 0 = first row in table) :param includeHeader: set to true if frame would include a header row @@ -641,13 +592,12 @@ if the frame would include all table content rows and have space left for extra to true would also include a count of these extra blank rows. :return: number of visible content rows (excluding header row) -:rtype: int - %End int rowsVisible( int frameIndex, int firstRow, bool includeEmptyRows ) const; %Docstring Calculates how many content rows are visible within a given frame. + :param frameIndex: index number for frame :param firstRow: index of first row visible in frame (where 0 = first row in table) :param includeEmptyRows: set to true to also include rows which would be empty in the returned count. For instance, @@ -655,23 +605,21 @@ if the frame would include all table content rows and have space left for extra to true would also include a count of these extra blank rows. :return: number of visible content rows (excludes header rows) -:rtype: int - %End QPair rowRange( const int frameIndex ) const; %Docstring Calculates a range of rows which should be visible in a given frame. + :param frameIndex: index number for frame :return: row range -:rtype: QPair - %End void drawHorizontalGridLines( QPainter *painter, int firstRow, int lastRow, bool drawHeaderLines ) const; %Docstring Draws the horizontal grid lines for the table. + :param painter: destination painter for grid lines :param firstRow: index corresponding to first row shown in frame :param lastRow: index corresponding to last row shown in frame. If greater than the number of content rows in the @@ -690,12 +638,11 @@ Recalculates and updates the size of the table and all table frames. bool contentsContainsRow( const QgsLayoutTableContents &contents, const QgsLayoutTableRow &row ) const; %Docstring Checks whether a table contents contains a given row + :param contents: table contents to check :param row: row to check for :return: true if contents contains rows -:rtype: bool - %End }; diff --git a/python/core/layout/qgslayouttablecolumn.sip b/python/core/layout/qgslayouttablecolumn.sip index 7039cf191e49..844bb63c503c 100644 --- a/python/core/layout/qgslayouttablecolumn.sip +++ b/python/core/layout/qgslayouttablecolumn.sip @@ -28,26 +28,25 @@ have an effect for QgsLayoutItemAttributeTables, and have no effect for QgsLayou QgsLayoutTableColumn( const QString &heading = QString() ); %Docstring Constructor for QgsLayoutTableColumn. + :param heading: column heading %End bool writeXml( QDomElement &columnElem, QDomDocument &doc ) const; %Docstring Writes the column's properties to xml for storage. + :param columnElem: an existing QDomElement in which to store the column's properties. :param doc: QDomDocument for the destination xml. -:rtype: bool - .. seealso:: :py:func:`readXml()` %End bool readXml( const QDomElement &columnElem ); %Docstring Reads the column's properties from xml. -:param columnElem: a QDomElement holding the column's desired properties. -:rtype: bool +:param columnElem: a QDomElement holding the column's desired properties. .. seealso:: :py:func:`writeXml()` %End @@ -57,8 +56,6 @@ Reads the column's properties from xml. Returns the width for the column in mm, or 0 if column width is automatically calculated. -:rtype: float - .. seealso:: :py:func:`setWidth()` %End @@ -74,8 +71,6 @@ Sets the width for a column in mm. Set the ``width`` to 0 if the column width is Returns the heading for a column, which is the value displayed in the column's header cell. -:rtype: str - .. seealso:: :py:func:`setHeading()` %End @@ -92,8 +87,6 @@ header cell. Returns the horizontal alignment for a column, which controls the alignment used for drawing column values within cells. -:rtype: Qt.AlignmentFlag - .. seealso:: :py:func:`setHAlignment()` .. seealso:: :py:func:`vAlignment()` @@ -114,8 +107,6 @@ used for drawing column values within cells. Returns the vertical alignment for a column, which controls the alignment used for drawing column values within cells. -:rtype: Qt.AlignmentFlag - .. seealso:: :py:func:`setVAlignment()` .. seealso:: :py:func:`hAlignment()` @@ -136,8 +127,6 @@ used for drawing column values within cells. Returns the attribute name or expression used for the column's values. This property is only used when the column is part of a QgsLayoutItemAttributeTable. -:rtype: str - .. note:: only applicable when used in a QgsLayoutItemAttributeTable @@ -162,8 +151,6 @@ is only used when the column is part of a QgsLayoutItemAttributeTable. Returns the sort order for the column. This property is only used when the column is part of a QgsLayoutItemAttributeTable and when sortByRank is > 0. -:rtype: Qt.SortOrder - .. note:: only applicable when used in a QgsLayoutItemAttributeTable @@ -197,8 +184,6 @@ is part of a QgsLayoutItemAttributeTable. If sort rank is <= 0 then the column is not being sorted. -:rtype: int - .. note:: only applicable when used in a QgsLayoutItemAttributeTable @@ -231,8 +216,6 @@ If the sort ``rank`` is <= 0 then the column is not being sorted. Creates a duplicate column which is a deep copy of this column. :return: a new QgsLayoutTableColumn with same properties as this column. -:rtype: QgsLayoutTableColumn - %End }; diff --git a/python/core/layout/qgslayoutundocommand.sip b/python/core/layout/qgslayoutundocommand.sip index f0c0c2a84cd6..e8a280707b38 100644 --- a/python/core/layout/qgslayoutundocommand.sip +++ b/python/core/layout/qgslayoutundocommand.sip @@ -59,8 +59,6 @@ Saves current layout state as after state. %Docstring Returns the before state for the layout. -:rtype: QDomDocument - .. seealso:: :py:func:`saveBeforeState()` .. seealso:: :py:func:`afterState()` @@ -70,8 +68,6 @@ Returns the before state for the layout. %Docstring Returns the after state for the layout. -:rtype: QDomDocument - .. seealso:: :py:func:`saveAfterState()` .. seealso:: :py:func:`beforeState()` @@ -80,8 +76,6 @@ Returns the after state for the layout. virtual bool containsChange() const; %Docstring Returns true if both the before and after states are valid and different. - -:rtype: bool %End protected: @@ -136,8 +130,6 @@ Creates a new layout undo command with the specified ``text`` and ``parent``. The ``id`` argument can be used to specify an id number for the source event - this is used to determine whether QUndoCommand command compression can apply to the command. - -:rtype: QgsAbstractLayoutUndoCommand %End }; diff --git a/python/core/layout/qgslayoutundostack.sip b/python/core/layout/qgslayoutundostack.sip index e953c7d58692..6031e9e626d8 100644 --- a/python/core/layout/qgslayoutundostack.sip +++ b/python/core/layout/qgslayoutundostack.sip @@ -90,8 +90,6 @@ Cancels the active command, discarding it without pushing to the undo history. QUndoStack *stack(); %Docstring Returns a pointer to the internal QUndoStack. - -:rtype: QUndoStack %End void notifyUndoRedoOccurred( QgsLayoutItem *item ); @@ -116,8 +114,6 @@ will take two calls unblocking commands in order to release the block. %Docstring Returns true if undo commands are currently blocked. -:rtype: bool - .. seealso:: :py:func:`blockCommands()` %End diff --git a/python/core/layout/qgslayoututils.sip b/python/core/layout/qgslayoututils.sip index 16df0659391c..1ceb6bcf9b8b 100644 --- a/python/core/layout/qgslayoututils.sip +++ b/python/core/layout/qgslayoututils.sip @@ -26,6 +26,7 @@ Utilities for layouts. static void rotate( double angle, double &x, double &y ); %Docstring Rotates a point / vector around the origin. + :param angle: rotation angle in degrees, counterclockwise :param x: in/out: x coordinate before / after the rotation :param y: in/out: y coordinate before / after the rotation @@ -36,8 +37,6 @@ Rotates a point / vector around the origin. Ensures that an ``angle`` (in degrees) is in the range 0 <= angle < 360. If ``allowNegative`` is true then angles between (-360, 360) are allowed. If false, angles are converted to positive angles in the range [0, 360). - -:rtype: float %End static double snappedAngle( double angle ); @@ -45,8 +44,6 @@ angles are converted to positive angles in the range [0, 360). Snaps an ``angle`` (in degrees) to its closest 45 degree angle. :return: angle snapped to 0, 45/90/135/180/225/270 or 315 degrees -:rtype: float - %End static QgsRenderContext createRenderContextForMap( QgsLayoutItemMap *map, QPainter *painter, double dpi = -1 ); @@ -56,8 +53,6 @@ This method returns a new QgsRenderContext which matches the scale and settings target map. If the ``dpi`` argument is not specified then the dpi will be taken from the destination painter device. -:rtype: QgsRenderContext - .. seealso:: :py:func:`createRenderContextForLayout()` %End @@ -69,14 +64,13 @@ QgsLayout.referenceMap(). If the ``dpi`` argument is not specified then the dpi will be taken from the destination painter device. -:rtype: QgsRenderContext - .. seealso:: :py:func:`createRenderContextForMap()` %End static void relativeResizeRect( QRectF &rectToResize, const QRectF &boundsBefore, const QRectF &boundsAfter ); %Docstring Resizes a QRectF relative to a resized bounding rectangle. + :param rectToResize: QRectF to resize, contained within boundsBefore. The rectangle is linearly scaled to retain its relative position and size within boundsAfter. @@ -87,6 +81,7 @@ boundsAfter. static double relativePosition( const double position, const double beforeMin, const double beforeMax, const double afterMin, const double afterMax ); %Docstring Returns a scaled position given a before and after range + :param position: initial position within before range to scale :param beforeMin: minimum value in before range :param beforeMax: maximum value in before range @@ -94,8 +89,6 @@ Returns a scaled position given a before and after range :param afterMax: maximum value in after range :return: position scaled to range specified by afterMin and afterMax -:rtype: float - %End static QFont scaledFontPixelSize( const QFont &font ); @@ -103,16 +96,12 @@ Returns a scaled position given a before and after range Returns a ``font`` where size is set in points and the size has been upscaled with FONT_WORKAROUND_SCALE to workaround QT font rendering bugs. Returns a font with size set in pixels. - -:rtype: QFont %End static double fontAscentMM( const QFont &font ); %Docstring Calculates a ``font`` ascent in millimeters, including workarounds for QT font rendering issues. -:rtype: float - .. seealso:: :py:func:`fontDescentMM()` .. seealso:: :py:func:`fontHeightMM()` @@ -126,8 +115,6 @@ Calculates a ``font`` ascent in millimeters, including workarounds for QT font r %Docstring Calculate a ``font`` descent in millimeters, including workarounds for QT font rendering issues. -:rtype: float - .. seealso:: :py:func:`fontAscentMM()` .. seealso:: :py:func:`fontHeightMM()` @@ -142,8 +129,6 @@ Calculate a ``font`` descent in millimeters, including workarounds for QT font r Calculate a ``font`` height in millimeters, including workarounds for QT font rendering issues. The font height is the font ascent + descent + 1 (for the baseline). -:rtype: float - .. seealso:: :py:func:`fontAscentMM()` .. seealso:: :py:func:`fontDescentMM()` @@ -158,8 +143,6 @@ The font height is the font ascent + descent + 1 (for the baseline). Calculate a ``font`` height in millimeters of a single ``character``, including workarounds for QT font rendering issues. -:rtype: float - .. seealso:: :py:func:`fontAscentMM()` .. seealso:: :py:func:`fontDescentMM()` @@ -174,8 +157,6 @@ rendering issues. Calculate a ``font`` width in millimeters for a ``text`` string, including workarounds for QT font rendering issues. -:rtype: float - .. seealso:: :py:func:`fontAscentMM()` .. seealso:: :py:func:`fontDescentMM()` @@ -195,8 +176,6 @@ where only the font ascent is considered for the first line of text. The ``multiLineHeight`` parameter specifies the line spacing factor. -:rtype: float - .. seealso:: :py:func:`textWidthMM()` %End @@ -227,13 +206,12 @@ The ``flags`` parameter allows for passing Qt.TextFlags to control appearance of %Docstring Calculates the largest scaled version of ``originalRect`` which fits within ``boundsRect``, when it is rotated by the a specified ``rotation`` amount. + :param originalRect: QRectF to be rotated and scaled :param boundsRect: QRectF specifying the bounds which the rotated and scaled rectangle must fit within :param rotation: the rotation in degrees to be applied to the rectangle :return: largest scaled version of the rectangle possible -:rtype: QRectF - %End diff --git a/python/core/layout/qgspagesizeregistry.sip b/python/core/layout/qgspagesizeregistry.sip index 4adf1753e139..785dba7dd4d1 100644 --- a/python/core/layout/qgspagesizeregistry.sip +++ b/python/core/layout/qgspagesizeregistry.sip @@ -52,10 +52,6 @@ Translated page name bool operator==( const QgsPageSize &other ) const; bool operator!=( const QgsPageSize &other ) const; -%Docstring - -:rtype: bool -%End }; class QgsPageSizeRegistry @@ -87,16 +83,12 @@ Adds a page ``size`` to the registry. QList< QgsPageSize > entries() const; %Docstring Returns a list of page sizes in the registry. - -:rtype: list of QgsPageSize %End QList< QgsPageSize > find( const QString &name ) const; %Docstring Finds matching page sizes from the registry, using a case insensitive match on the page size ``name``. - -:rtype: list of QgsPageSize %End QString find( const QgsLayoutSize &size ) const; @@ -106,8 +98,6 @@ or an empty string if no matching size could be found. Orientation is ignored when matching page sizes, so a landscape A4 page will match to the portrait A4 size in the registry. - -:rtype: str %End bool decodePageSize( const QString &string, QgsPageSize &size ); @@ -116,8 +106,6 @@ Decodes a ``string`` representing a preset page size. The decoded page size will be stored in the ``size`` argument. :return: true if string was successfully decoded -:rtype: bool - %End }; diff --git a/python/core/locator/qgslocator.sip b/python/core/locator/qgslocator.sip index b52fe5106f37..51d42930cfd1 100644 --- a/python/core/locator/qgslocator.sip +++ b/python/core/locator/qgslocator.sip @@ -73,8 +73,6 @@ deregisterFilter() to deregister their filters upon plugin unload to avoid crash %Docstring Returns the list of filters registered in the locator. -:rtype: list of QgsLocatorFilter - .. seealso:: :py:func:`prefixedFilters()` %End @@ -83,8 +81,6 @@ Returns the list of filters registered in the locator. Returns a map of prefix to filter, for all registered filters with valid prefixes. -:rtype: QMap< str, QgsLocatorFilter *> - .. seealso:: :py:func:`filters()` %End @@ -119,8 +115,6 @@ take some time to cancel after calling this. bool isRunning() const; %Docstring Returns true if a query is currently being executed by the locator. - -:rtype: bool %End signals: diff --git a/python/core/locator/qgslocatorfilter.sip b/python/core/locator/qgslocatorfilter.sip index 63967da3ad03..90601c164d3c 100644 --- a/python/core/locator/qgslocatorfilter.sip +++ b/python/core/locator/qgslocatorfilter.sip @@ -96,8 +96,6 @@ Constructor for QgsLocatorFilter. %Docstring Returns the unique name for the filter. This should be an untranslated string identifying the filter. -:rtype: str - .. seealso:: :py:func:`displayName()` %End @@ -105,8 +103,6 @@ Returns the unique name for the filter. This should be an untranslated string id %Docstring Returns a translated, user-friendly name for the filter. -:rtype: str - .. seealso:: :py:func:`name()` %End @@ -114,8 +110,6 @@ Returns a translated, user-friendly name for the filter. %Docstring Returns the priority for the filter, which controls how results are ordered in the locator. - -:rtype: Priority %End virtual QString prefix() const; @@ -124,8 +118,6 @@ Returns the search prefix character(s) for this filter. Prefix a search with these characters will restrict the locator search to only include results from this filter. -:rtype: str - .. note:: Plugins are not permitted to utilize prefixes with < 3 characters, @@ -163,8 +155,6 @@ result. Returns true if the filter should be used when no prefix is entered. -:rtype: bool - .. seealso:: :py:func:`setUseWithoutPrefix()` %End @@ -182,16 +172,12 @@ Tests a ``candidate`` string to see if it should be considered a match for a specified ``search`` string. Filter subclasses should use this method when comparing strings instead of directly using QString.contains() or Python 'in' checks. - -:rtype: bool %End bool enabled() const; %Docstring Returns true if the filter is enabled. -:rtype: bool - .. seealso:: :py:func:`setEnabled()` %End @@ -206,8 +192,6 @@ Sets whether the filter is ``enabled``. %Docstring Should return true if the filter has a configuration widget. -:rtype: bool - .. seealso:: :py:func:`createConfigWidget()` %End diff --git a/python/core/locator/qgslocatormodel.sip b/python/core/locator/qgslocatormodel.sip index d62b78dc539d..29697222e5cb 100644 --- a/python/core/locator/qgslocatormodel.sip +++ b/python/core/locator/qgslocatormodel.sip @@ -108,8 +108,6 @@ The ``locator`` is used as the model's parent. QgsLocator *locator(); %Docstring Returns a pointer to the locator utilized by this model. - -:rtype: QgsLocator %End void search( const QString &string ); @@ -128,8 +126,6 @@ search string as soon as possible. Returns a new locator context for searches. The default implementation returns a default constructed QgsLocatorContext. Subclasses can override this method to implement custom context creation logic. - -:rtype: QgsLocatorContext %End }; diff --git a/python/core/metadata/qgslayermetadata.sip b/python/core/metadata/qgslayermetadata.sip index 2c04fed0330a..2ec5aa994217 100644 --- a/python/core/metadata/qgslayermetadata.sip +++ b/python/core/metadata/qgslayermetadata.sip @@ -74,8 +74,6 @@ compulsory. %Docstring Spatial extents of the resource. -:rtype: list of QgsLayerMetadata.SpatialExtent - .. seealso:: :py:func:`setSpatialExtents()` %End @@ -93,8 +91,6 @@ whether the temporal extent is a range or a single point in time. If QgsDateTimeRange.isInfinite() returns true then the temporal extent is considered to be indeterminate and continuous. -:rtype: list of QgsDateTimeRange - .. seealso:: :py:func:`setTemporalExtents()` %End @@ -286,8 +282,6 @@ Constructor for QgsLayerMetadata. %Docstring A reference, URI, URL or some other mechanism to identify the resource. -:rtype: str - .. seealso:: :py:func:`setIdentifier()` %End @@ -303,8 +297,6 @@ Sets the reference, URI, URL or some other mechanism to identify the resource. A reference, URI, URL or some other mechanism to identify the parent resource that this resource is a part (child) of. Returns an empty string if no parent identifier is set. -:rtype: str - .. seealso:: :py:func:`setParentIdentifier()` %End @@ -323,8 +315,6 @@ will follow either the ISO 639.2 or ISO 3166 specifications, e.g. 'ENG' or 'SPA' this is not a hard requirement and the caller must account for non compliant values. -:rtype: str - .. seealso:: :py:func:`setLanguage()` %End @@ -342,8 +332,6 @@ e.g. 'ENG' or 'SPA' (ISO 639.2) or 'EN-AU' (ISO 3166). Returns the nature of the resource. While a formal vocabulary is not imposed, it is advised to use the ISO 19115 MD_ScopeCode values. E.g. 'dataset' or 'series'. -:rtype: str - .. seealso:: :py:func:`setType()` %End @@ -359,8 +347,6 @@ to use the ISO 19115 MD_ScopeCode values. E.g. 'dataset' or 'series'. %Docstring Returns the human readable name of the resource, typically displayed in search results. -:rtype: str - .. seealso:: :py:func:`setTitle()` %End @@ -375,8 +361,6 @@ Sets the human readable ``title`` (name) of the resource, typically displayed in %Docstring Returns a free-form description of the resource. -:rtype: str - .. seealso:: :py:func:`setAbstract()` %End @@ -392,8 +376,6 @@ Sets a free-form ``abstract`` (description) of the resource. Returns any fees associated with using the resource. An empty string will be returned if no fees are set. -:rtype: str - .. seealso:: :py:func:`setFees()` %End @@ -409,8 +391,6 @@ Use an empty string if no fees are set. %Docstring Returns a list of constraints associated with using the resource. -:rtype: QgsLayerMetadata.ConstraintList - .. seealso:: :py:func:`setConstraints()` %End @@ -434,8 +414,6 @@ Sets the list of ``constraints`` associated with using the resource. %Docstring Returns a list of attribution or copyright strings associated with the resource. -:rtype: list of str - .. seealso:: :py:func:`setRights()` %End @@ -450,8 +428,6 @@ Sets a list of ``rights`` (attribution or copyright strings) associated with the %Docstring Returns a list of licenses associated with the resource (examples: http://opendefinition.org/licenses/). -:rtype: list of str - .. seealso:: :py:func:`setLicenses()` %End @@ -467,8 +443,6 @@ Sets a list of ``licenses`` associated with the resource. %Docstring Returns a freeform description of the history or lineage of the resource. -:rtype: list of str - .. seealso:: :py:func:`setHistory()` %End @@ -495,8 +469,6 @@ Adds a single history ``text`` to the end of the existing history list. %Docstring Returns the character encoding of the data in the resource. An empty string will be returned if no encoding is set. -:rtype: str - .. seealso:: :py:func:`setEncoding()` %End @@ -512,8 +484,6 @@ Sets the character ``encoding`` of the data in the resource. Use an empty string %Docstring Returns the spatial and temporal extents associated with the resource. -:rtype: QgsLayerMetadata.Extent - .. seealso:: :py:func:`setExtent()` %End @@ -535,8 +505,6 @@ CRS which is actually used to display and manipulate the layer within QGIS. This may be the case when a layer has an incorrect CRS within its metadata and a user has manually overridden the layer's CRS within QGIS. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs()` %End @@ -567,8 +535,6 @@ The map key is the vocabulary string and map value is a list of keywords for tha The vocabulary string is a reference (URI/URL preferred) to a codelist or vocabulary associated with keyword list. -:rtype: KeywordMap - .. seealso:: :py:func:`setKeywords()` .. seealso:: :py:func:`keywordVocabularies()` @@ -605,8 +571,6 @@ associated with keyword list. %Docstring Remove a vocabulary from the list. -:rtype: bool - .. seealso:: :py:func:`setKeywords()` .. seealso:: :py:func:`addKeywords()` @@ -619,8 +583,6 @@ Returns a list of keyword vocabularies contained in the metadata. The vocabulary string is a reference (URI/URL preferred) to a codelist or vocabulary associated with keyword list. -:rtype: list of str - .. seealso:: :py:func:`keywords()` %End @@ -633,8 +595,6 @@ list will be returned. The vocabulary string is a reference (URI/URL preferred) to a codelist or vocabulary associated with keyword list. -:rtype: list of str - .. seealso:: :py:func:`keywordVocabularies()` %End @@ -643,8 +603,6 @@ associated with keyword list. Returns categories of the resource. Categories are stored using a special vocabulary 'gmd:topicCategory' in keywords. -:rtype: list of str - .. seealso:: :py:func:`keywords()` %End @@ -660,8 +618,6 @@ Categories are stored using a special vocabulary 'gmd:topicCategory' in keywords %Docstring Returns a list of contact persons or entities associated with the resource. -:rtype: QgsLayerMetadata.ContactList - .. seealso:: :py:func:`setContacts()` %End @@ -688,8 +644,6 @@ Adds an individual ``contact`` to the existing contacts. %Docstring Returns a list of online resources associated with the resource. -:rtype: QgsLayerMetadata.LinkList - .. seealso:: :py:func:`setLinks()` %End @@ -729,22 +683,20 @@ Reads the metadata state from a ``layer``'s custom properties (see QgsMapLayer.c bool readMetadataXml( const QDomElement &metadataElement ); %Docstring Sets state from Dom document + :param metadataElement: The Dom element corresponding to ``resourceMetadata'' tag :return: true if successful -:rtype: bool - %End bool writeMetadataXml( QDomElement &metadataElement, QDomDocument &document ) const; %Docstring Stores state in Dom node + :param metadataElement: is a Dom element corresponding to ``resourceMetadata'' tag :param document: is a the dom document being written :return: true if successful -:rtype: bool - %End }; diff --git a/python/core/metadata/qgslayermetadataformatter.sip b/python/core/metadata/qgslayermetadataformatter.sip index d5e67e647c0b..cd588ae69be8 100644 --- a/python/core/metadata/qgslayermetadataformatter.sip +++ b/python/core/metadata/qgslayermetadataformatter.sip @@ -31,48 +31,36 @@ Constructor for QgsLayerMetadataFormatter %Docstring Formats the "Access" section according to a ``metadata`` object. This will return a HTML table. - -:rtype: str %End QString contactsSectionHtml() const; %Docstring Formats the "Contacts" section according to a ``metadata`` object. This will return a HTML table. - -:rtype: str %End QString extentSectionHtml() const; %Docstring Formats the "Extents" section according to a ``metadata`` object. This will return a HTML table. - -:rtype: str %End QString identificationSectionHtml() const; %Docstring Formats the "Identification" section according to a ``metadata`` object. This will return a HTML table. - -:rtype: str %End QString historySectionHtml() const; %Docstring Formats the "History" section according to a ``metadata`` object. This will return a HTML table. - -:rtype: str %End QString linksSectionHtml() const; %Docstring Formats the "Links" section according to a ``metadata`` object. This will return a HTML table. - -:rtype: str %End }; diff --git a/python/core/metadata/qgslayermetadatavalidator.sip b/python/core/metadata/qgslayermetadatavalidator.sip index 268c1002a587..bb8148f7bf5f 100644 --- a/python/core/metadata/qgslayermetadatavalidator.sip +++ b/python/core/metadata/qgslayermetadatavalidator.sip @@ -60,8 +60,6 @@ metadata is considered valid. If validation fails, the ``results`` list will be filled with a list of items describing why the validation failed and what needs to be rectified to fix the metadata. - -:rtype: bool %End }; diff --git a/python/core/processing/models/qgsprocessingmodelalgorithm.sip b/python/core/processing/models/qgsprocessingmodelalgorithm.sip index b9da2b19230c..f6b57d5d2bdf 100644 --- a/python/core/processing/models/qgsprocessingmodelalgorithm.sip +++ b/python/core/processing/models/qgsprocessingmodelalgorithm.sip @@ -72,8 +72,6 @@ Sets the model ``group``. Returns the map of child algorithms contained in the model. The keys are the child algorithm ids (see QgsProcessingModelAlgorithm.ChildAlgorithm.childId()). -:rtype: QMap - .. seealso:: :py:func:`childAlgorithm()` .. seealso:: :py:func:`setChildAlgorithms()` @@ -113,8 +111,6 @@ in the model with the same child ID then ``algorithm`` will be assigned a new autogenerated unique ID. The assigned child ID will be returned. -:rtype: str - .. seealso:: :py:func:`childAlgorithms()` .. seealso:: :py:func:`childAlgorithm()` @@ -129,8 +125,6 @@ The assigned child ID will be returned. Returns the child algorithm with matching ``id``. If no child algorithm exists with this ID a new algorithm will be added to the model and returned. -:rtype: QgsProcessingModelChildAlgorithm - .. seealso:: :py:func:`addChildAlgorithm()` .. seealso:: :py:func:`childAlgorithms()` @@ -143,8 +137,6 @@ Returns true if the algorithm could be removed, or false if the algorithm could not be removed (e.g. due to other child algorithms depending on it). -:rtype: bool - .. seealso:: :py:func:`deactivateChildAlgorithm()` %End @@ -165,8 +157,6 @@ Attempts to activate the child algorithm with matching ``id``. If any child algorithms on which the child depends are not active, then the child will not be activated and false will be returned. -:rtype: bool - .. seealso:: :py:func:`deactivateChildAlgorithm()` %End @@ -175,8 +165,6 @@ then the child will not be activated and false will be returned. Returns a list of the child algorithm IDs depending on the child algorithm with the specified ``childId``. -:rtype: set of str - .. seealso:: :py:func:`dependsOnChildAlgorithms()` %End @@ -185,8 +173,6 @@ algorithm with the specified ``childId``. Returns a list of the child algorithm IDs on which the child algorithm with the specified ``childId`` depends upon. -:rtype: set of str - .. seealso:: :py:func:`dependentChildAlgorithms()` %End @@ -225,8 +211,6 @@ is deleted. Returns true if any child algorithms depend on the model parameter with the specified ``name``. -:rtype: bool - .. seealso:: :py:func:`otherParametersDependOnParameter()` %End @@ -236,8 +220,6 @@ Returns true if any other model parameters depend on the parameter with the specified ``name`` (e.g. field parameters where ``name`` is the parent layer parameter). -:rtype: bool - .. seealso:: :py:func:`childAlgorithmsDependOnParameter()` %End @@ -246,8 +228,6 @@ is the parent layer parameter). Returns the map of parameter components used by the model. The keys should match the algorithm's parameter names (see parameterDefinitions() ). -:rtype: QMap - .. seealso:: :py:func:`setParameterComponent()` .. seealso:: :py:func:`parameterComponent()` @@ -283,8 +263,6 @@ exists in the model with the same parameter name then that component will be rep Returns the parameter component with matching ``name``. If no parameter component exists with this name a new component will be added to the model and returned. -:rtype: QgsProcessingModelParameter - .. seealso:: :py:func:`parameterComponents()` .. seealso:: :py:func:`setParameterComponents()` @@ -303,8 +281,6 @@ Must be called whenever child algorithm ModelOutputs are altered. %Docstring Writes the model to a file, at the specified ``path``. -:rtype: bool - .. seealso:: :py:func:`fromFile()` %End @@ -312,8 +288,6 @@ Writes the model to a file, at the specified ``path``. %Docstring Reads the model from a file, at the specified ``path``. -:rtype: bool - .. seealso:: :py:func:`toFile()` %End @@ -322,8 +296,6 @@ Reads the model from a file, at the specified ``path``. Returns the model's help contents (a free-form map of values describing the algorithm's use and metadata). -:rtype: QVariantMap - .. seealso:: :py:func:`setHelpContent()` %End @@ -340,8 +312,6 @@ use and metadata). %Docstring Returns the source file path for the model, if available. -:rtype: str - .. seealso:: :py:func:`setSourceFilePath()` %End @@ -355,8 +325,6 @@ Sets the source file ``path`` for the model, if available. QString asPythonCode() const; %Docstring Attempts to convert the model to executable Python code. - -:rtype: str %End QList< QgsProcessingModelChildParameterSource > availableSourcesForChild( const QString &childId, const QStringList ¶meterTypes = QStringList(), @@ -368,8 +336,6 @@ specified ``parameterTypes`` (see QgsProcessingParameterDefinition.type() ) or on of the specified ``outputTypes`` (see QgsProcessingOutputDefinition.type() ). If specified, an optional list of ``dataTypes`` can be used to filter the returned sources to those with compatible data types for the parameter/outputs. - -:rtype: list of QgsProcessingModelChildParameterSource %End class VariableDefinition @@ -421,8 +387,6 @@ will be available for a specific child algorithm, e.g. for use in expression bui In order to calculate the actual variable value, the input model ``modelParameters`` and already executed child algorithm ``results`` must be passed. -:rtype: QMap< str, QgsProcessingModelAlgorithm.VariableDefinition > - .. seealso:: :py:func:`createExpressionContextScopeForChildAlgorithm()` %End @@ -431,8 +395,6 @@ algorithm ``results`` must be passed. %Docstring Creates a new expression context scope for a child algorithm within the model. -:rtype: QgsExpressionContextScope - .. seealso:: :py:func:`variablesForChildAlgorithm()` %End diff --git a/python/core/processing/models/qgsprocessingmodelchildalgorithm.sip b/python/core/processing/models/qgsprocessingmodelchildalgorithm.sip index bdc818af8a0b..5eebcc88193d 100644 --- a/python/core/processing/models/qgsprocessingmodelchildalgorithm.sip +++ b/python/core/processing/models/qgsprocessingmodelchildalgorithm.sip @@ -37,8 +37,6 @@ should be set to a QgsProcessingAlgorithm algorithm ID. Returns the child algorithm's unique ID string, used the identify this child algorithm within its parent model. -:rtype: str - .. seealso:: :py:func:`setChildId()` .. seealso:: :py:func:`generateChildId()` @@ -68,8 +66,6 @@ avoiding child IDs which are already present in ``model``. %Docstring Returns the underlying child algorithm's ID. -:rtype: str - .. seealso:: :py:func:`algorithm()` .. seealso:: :py:func:`setAlgorithmId()` @@ -94,8 +90,6 @@ to the algorithm, allowing it to dynamically adjust its initialized parameters and outputs according to this configuration. This allows child algorithms in the model to adjust their behavior at run time according to some user configuration. -:rtype: QVariantMap - .. seealso:: :py:func:`setConfiguration()` %End @@ -116,8 +110,6 @@ to adjust their behavior at run time according to some user configuration. Returns the underlying child algorithm, or a None if a matching algorithm is not available. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`algorithmId()` %End @@ -126,8 +118,6 @@ if a matching algorithm is not available. Returns a map of parameter sources. The keys are the child algorithm parameter names, the values are the sources for that parameter. -:rtype: QMap< str, QList< QgsProcessingModelChildParameterSource > > - .. seealso:: :py:func:`setParameterSources()` .. seealso:: :py:func:`addParameterSources()` @@ -160,8 +150,6 @@ Any existing parameter sources with matching name will be replaced. %Docstring Returns true if the child algorithm is active. -:rtype: bool - .. seealso:: :py:func:`setActive()` %End @@ -178,8 +166,6 @@ Returns the list of child algorithms from the parent model on which this algorithm is dependent. The returned list contains the id() of the dependent algorithms. -:rtype: list of str - .. seealso:: :py:func:`setDependencies()` %End @@ -197,8 +183,6 @@ dependent algorithms. Returns true if the list of parameters for this algorithm should be collapsed in the graphical modeller. -:rtype: bool - .. seealso:: :py:func:`setParametersCollapsed()` .. seealso:: :py:func:`outputsCollapsed()` @@ -219,8 +203,6 @@ in the graphical modeller. Returns true if the list of outputs for this algorithm should be collapsed in the graphical modeller. -:rtype: bool - .. seealso:: :py:func:`setParametersCollapsed()` .. seealso:: :py:func:`parametersCollapsed()` @@ -242,8 +224,6 @@ Returns the map of final model outputs which are generated by this child algorit The keys are the output names from this child algorithm. Only outputs which are part of the final outputs from the model are included in this map. -:rtype: QMap - .. seealso:: :py:func:`setModelOutputs()` .. seealso:: :py:func:`modelOutput()` @@ -257,8 +237,6 @@ exists with the name, a new one will be created and returned. If child model outputs are altered by this method, QgsProcessingModelAlgorithm.updateDestinationParameters() must be called on the parent model. -:rtype: QgsProcessingModelOutput - .. seealso:: :py:func:`modelOutputs()` .. seealso:: :py:func:`setModelOutputs()` @@ -279,8 +257,6 @@ must be called on the parent model. %Docstring Saves this child to a QVariant. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -288,16 +264,12 @@ Saves this child to a QVariant. %Docstring Loads this child from a QVariant. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End QString asPythonCode() const; %Docstring Attempts to convert the child to executable Python code. - -:rtype: str %End }; diff --git a/python/core/processing/models/qgsprocessingmodelchildparametersource.sip b/python/core/processing/models/qgsprocessingmodelchildparametersource.sip index 588b0ed34a05..6402327bdcee 100644 --- a/python/core/processing/models/qgsprocessingmodelchildparametersource.sip +++ b/python/core/processing/models/qgsprocessingmodelchildparametersource.sip @@ -39,17 +39,11 @@ fromStaticValue(), fromModelParameter(), fromChildOutput() and fromExpression() bool operator==( const QgsProcessingModelChildParameterSource &other ) const; bool operator!=( const QgsProcessingModelChildParameterSource &other ) const; -%Docstring - -:rtype: bool -%End static QgsProcessingModelChildParameterSource fromStaticValue( const QVariant &value ); %Docstring Returns a new QgsProcessingModelChildParameterSource which takes its value from a static ``value``. -:rtype: QgsProcessingModelChildParameterSource - .. seealso:: :py:func:`fromModelParameter()` .. seealso:: :py:func:`fromChildOutput()` @@ -61,8 +55,6 @@ Returns a new QgsProcessingModelChildParameterSource which takes its value from %Docstring Returns a new QgsProcessingModelChildParameterSource which takes its value from a parent model parameter. -:rtype: QgsProcessingModelChildParameterSource - .. seealso:: :py:func:`fromStaticValue()` .. seealso:: :py:func:`fromChildOutput()` @@ -74,8 +66,6 @@ Returns a new QgsProcessingModelChildParameterSource which takes its value from %Docstring Returns a new QgsProcessingModelChildParameterSource which takes its value from an output generated by a child algorithm. -:rtype: QgsProcessingModelChildParameterSource - .. seealso:: :py:func:`fromStaticValue()` .. seealso:: :py:func:`fromModelParameter()` @@ -90,8 +80,6 @@ is evaluated just before the child algorithm executes, and can use functions ava in its expression context to include results calculated from the child algorithms already executed by the model. -:rtype: QgsProcessingModelChildParameterSource - .. seealso:: :py:func:`fromStaticValue()` .. seealso:: :py:func:`fromChildOutput()` @@ -102,16 +90,12 @@ executed by the model. Source source() const; %Docstring Returns the parameter value's source. - -:rtype: Source %End QVariant staticValue() const; %Docstring Returns the source's static value. This is only used when the source() is StaticValue. -:rtype: QVariant - .. seealso:: :py:func:`setStaticValue()` %End @@ -126,8 +110,6 @@ Sets the source's static value. Calling this will also change the source() to St %Docstring Returns the source's model parameter name. This is only used when the source() is ModelParameter. -:rtype: str - .. seealso:: :py:func:`setParameterName()` %End @@ -142,8 +124,6 @@ Sets the source's model parameter ``name``. Calling this will also change the so %Docstring Returns the source's child algorithm ID from which the output value will be taken. This is only used when the source() is ChildOutput. -:rtype: str - .. seealso:: :py:func:`setOutputChildId()` .. seealso:: :py:func:`outputName()` @@ -162,8 +142,6 @@ Sets the source's child algorithm ``id`` from which the output value will be tak %Docstring Returns the source's child algorithm output name from which the output value will be taken. This is only used when the source() is ChildOutput. -:rtype: str - .. seealso:: :py:func:`setOutputName()` .. seealso:: :py:func:`outputChildId()` @@ -182,8 +160,6 @@ Sets the source's child algorithm output ``name`` from which the output value wi %Docstring Returns the source's expression. This is only used when the source() is Expression. -:rtype: str - .. seealso:: :py:func:`setExpression()` %End @@ -201,8 +177,6 @@ executed by the model. %Docstring Saves this source to a QVariant. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -210,16 +184,12 @@ Saves this source to a QVariant. %Docstring Loads this source from a QVariantMap. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End QString asPythonCode() const; %Docstring Attempts to convert the source to executable Python code. - -:rtype: str %End }; diff --git a/python/core/processing/models/qgsprocessingmodelcomponent.sip b/python/core/processing/models/qgsprocessingmodelcomponent.sip index 9f3547468ae8..956d82c0cce9 100644 --- a/python/core/processing/models/qgsprocessingmodelcomponent.sip +++ b/python/core/processing/models/qgsprocessingmodelcomponent.sip @@ -27,8 +27,6 @@ Represents a component of a model algorithm. %Docstring Returns the friendly description text for the component. -:rtype: str - .. seealso:: :py:func:`setDescription()` %End @@ -43,8 +41,6 @@ Sets the friendly ``description`` text for the component. %Docstring Returns the position of the model component within the graphical modeler. -:rtype: QPointF - .. seealso:: :py:func:`setPosition()` %End diff --git a/python/core/processing/models/qgsprocessingmodeloutput.sip b/python/core/processing/models/qgsprocessingmodeloutput.sip index ab9436fcf357..ee91e7e9c047 100644 --- a/python/core/processing/models/qgsprocessingmodeloutput.sip +++ b/python/core/processing/models/qgsprocessingmodeloutput.sip @@ -32,8 +32,6 @@ Constructor for QgsProcessingModelOutput with the specified ``name`` and ``descr %Docstring Returns the model output name. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -48,8 +46,6 @@ Sets the model output ``name``. %Docstring Returns the child algorithm ID from which this output is generated. -:rtype: str - .. seealso:: :py:func:`setChildId()` %End @@ -64,8 +60,6 @@ Sets the child algorithm ``id`` from which this output is generated. %Docstring Returns the child algorithm output name from which this output is generated. -:rtype: str - .. seealso:: :py:func:`setOutputName()` %End @@ -80,8 +74,6 @@ Sets the child algorithm output ``name`` from which this output is generated. %Docstring Saves this output to a QVariant. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -89,8 +81,6 @@ Saves this output to a QVariant. %Docstring Loads this output from a QVariantMap. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End diff --git a/python/core/processing/models/qgsprocessingmodelparameter.sip b/python/core/processing/models/qgsprocessingmodelparameter.sip index 961f0280ab16..5c0d2e7f7364 100644 --- a/python/core/processing/models/qgsprocessingmodelparameter.sip +++ b/python/core/processing/models/qgsprocessingmodelparameter.sip @@ -35,8 +35,6 @@ parameters from the parent model. Returns the associated parameter name. The parameter name should match one of the parameters from the parent model. -:rtype: str - .. seealso:: :py:func:`parameterName()` %End @@ -52,8 +50,6 @@ parameters from the parent model. %Docstring Saves this parameter to a QVariant. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -61,8 +57,6 @@ Saves this parameter to a QVariant. %Docstring Loads this parameter from a QVariantMap. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End diff --git a/python/core/processing/qgsprocessingalgorithm.sip b/python/core/processing/qgsprocessingalgorithm.sip index 95acf37b394b..2311c712a941 100644 --- a/python/core/processing/qgsprocessingalgorithm.sip +++ b/python/core/processing/qgsprocessingalgorithm.sip @@ -75,8 +75,6 @@ and outputs according to this configuration. This is generally used only for algorithms in a model, allowing them to adjust their behavior at run time according to some user configuration. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`initAlgorithm()` %End @@ -87,8 +85,6 @@ should be fixed for the algorithm, and must not be localised. The name should be unique within each provider. Names should contain lowercase alphanumeric characters only and no spaces or other formatting characters. -:rtype: str - .. seealso:: :py:func:`displayName()` .. seealso:: :py:func:`group()` @@ -101,8 +97,6 @@ only and no spaces or other formatting characters. Returns the unique ID for the algorithm, which is a combination of the algorithm provider's ID and the algorithms unique name (e.g. "qgis:mergelayers" ). -:rtype: str - .. seealso:: :py:func:`name()` .. seealso:: :py:func:`provider()` @@ -113,8 +107,6 @@ provider's ID and the algorithms unique name (e.g. "qgis:mergelayers" ). Returns the translated algorithm name, which should be used for any user-visible display of the algorithm name. -:rtype: str - .. seealso:: :py:func:`name()` %End @@ -122,8 +114,6 @@ of the algorithm name. %Docstring Returns a list of tags which relate to the algorithm, and are used to assist users in searching for suitable algorithms. These tags should be localised. - -:rtype: list of str %End virtual QString shortHelpString() const; @@ -131,8 +121,6 @@ for suitable algorithms. These tags should be localised. Returns a localised short helper string for the algorithm. This string should provide a basic description about what the algorithm does and the parameters and outputs associated with it. -:rtype: str - .. seealso:: :py:func:`helpString()` .. seealso:: :py:func:`helpUrl()` @@ -143,8 +131,6 @@ about what the algorithm does and the parameters and outputs associated with it. Returns a localised help string for the algorithm. Algorithm subclasses should implement either helpString() or helpUrl(). -:rtype: str - .. seealso:: :py:func:`helpUrl()` .. seealso:: :py:func:`shortHelpString()` @@ -154,8 +140,6 @@ helpString() or helpUrl(). %Docstring Returns a url pointing to the algorithm's help page. -:rtype: str - .. seealso:: :py:func:`helpString()` .. seealso:: :py:func:`shortHelpString()` @@ -165,8 +149,6 @@ Returns a url pointing to the algorithm's help page. %Docstring Returns an icon for the algorithm. -:rtype: QIcon - .. seealso:: :py:func:`svgIconPath()` %End @@ -174,8 +156,6 @@ Returns an icon for the algorithm. %Docstring Returns a path to an SVG version of the algorithm's icon. -:rtype: str - .. seealso:: :py:func:`icon()` %End @@ -184,8 +164,6 @@ Returns a path to an SVG version of the algorithm's icon. Returns the name of the group this algorithm belongs to. This string should be localised. -:rtype: str - .. seealso:: :py:func:`groupId()` .. seealso:: :py:func:`tags()` @@ -198,16 +176,12 @@ should be fixed for the algorithm, and must not be localised. The group id should be unique within each provider. Group id should contain lowercase alphanumeric characters only and no spaces or other formatting characters. -:rtype: str - .. seealso:: :py:func:`group()` %End virtual Flags flags() const; %Docstring Returns the flags indicating how and when the algorithm operates and should be exposed to users. Default flags are FlagSupportsBatch and FlagCanCancel. - -:rtype: Flags %End virtual bool canExecute( QString *errorMessage /Out/ = 0 ) const; @@ -216,8 +190,6 @@ Returns true if the algorithm can execute. Algorithm subclasses can return false here to indicate that they are not able to execute, e.g. as a result of unmet external dependencies. If specified, the ``errorMessage`` argument will be filled with a localised error message describing why the algorithm cannot execute. - -:rtype: bool %End virtual bool checkParameterValues( const QVariantMap ¶meters, @@ -229,23 +201,17 @@ filled with explanatory text if validation fails. Overridden implementations should also check this base class implementation. :return: true if parameters are acceptable for the algorithm. -:rtype: bool - %End QgsProcessingProvider *provider() const; %Docstring Returns the provider to which this algorithm belongs. - -:rtype: QgsProcessingProvider %End QgsProcessingParameterDefinitions parameterDefinitions() const; %Docstring Returns an ordered list of parameter definitions utilized by the algorithm. -:rtype: QgsProcessingParameterDefinitions - .. seealso:: :py:func:`addParameter()` .. seealso:: :py:func:`parameterDefinition()` @@ -258,8 +224,6 @@ Returns an ordered list of parameter definitions utilized by the algorithm. Returns a matching parameter by ``name``. Matching is done in a case-insensitive manner. -:rtype: QgsProcessingParameterDefinition - .. seealso:: :py:func:`parameterDefinitions()` %End @@ -267,16 +231,12 @@ manner. %Docstring Returns the number of visible (non-hidden) parameters defined by this algorithm. - -:rtype: int %End QgsProcessingParameterDefinitions destinationParameterDefinitions() const; %Docstring Returns a list of destination parameters definitions utilized by the algorithm. -:rtype: QgsProcessingParameterDefinitions - .. seealso:: :py:func:`QgsProcessingParameterDefinition.isDestination()` .. seealso:: :py:func:`parameterDefinitions()` @@ -286,8 +246,6 @@ Returns a list of destination parameters definitions utilized by the algorithm. %Docstring Returns an ordered list of output definitions utilized by the algorithm. -:rtype: QgsProcessingOutputDefinitions - .. seealso:: :py:func:`addOutput()` .. seealso:: :py:func:`outputDefinition()` @@ -298,16 +256,12 @@ Returns an ordered list of output definitions utilized by the algorithm. Returns a matching output by ``name``. Matching is done in a case-insensitive manner. -:rtype: QgsProcessingOutputDefinition - .. seealso:: :py:func:`outputDefinitions()` %End bool hasHtmlOutputs() const; %Docstring Returns true if this algorithm generates HTML outputs. - -:rtype: bool %End QVariantMap run( const QVariantMap ¶meters, @@ -324,8 +278,6 @@ Algorithm progress should be reported using the supplied ``feedback`` object. If specified, ``ok`` will be set to true if algorithm was successfully run. :return: A map of algorithm outputs. These may be output layer references, or calculated -:rtype: QVariantMap - values such as statistical calculations. .. note:: @@ -340,8 +292,6 @@ Prepares the algorithm for execution. This must be run in the main thread, and a to pre-evaluate input parameters in a thread-safe manner. This must be called before calling runPrepared() (which is safe to do in any thread). -:rtype: bool - .. seealso:: :py:func:`runPrepared()` .. seealso:: :py:func:`postProcess()` @@ -360,8 +310,6 @@ This method is safe to call from any thread. Returns true if the algorithm was s After runPrepared() has finished, the postProcess() method should be called from the main thread to allow the algorithm to perform any required cleanup tasks and return its final result. -:rtype: QVariantMap - .. seealso:: :py:func:`prepare()` .. seealso:: :py:func:`postProcess()` @@ -379,8 +327,6 @@ Should be called in the main thread following the completion of runPrepared(). T allows the algorithm to perform any required cleanup tasks. The returned variant map includes the results evaluated by the algorithm. -:rtype: QVariantMap - .. note:: This method modifies the algorithm instance, so it is not safe to call @@ -394,8 +340,6 @@ If an algorithm subclass implements a custom parameters widget, a copy of this w should be constructed and returned by this method. The base class implementation returns None, which indicates that an autogenerated parameters widget should be used. - -:rtype: QWidget %End QgsExpressionContext createExpressionContext( const QVariantMap ¶meters, @@ -405,8 +349,6 @@ Creates an expression context relating to the algorithm. This can be called by a to create a new expression context ready for evaluating expressions within the algorithm. Optionally, a ``source`` can be specified which will be used to populate the context if it implements the QgsExpressionContextGenerator interface. - -:rtype: QgsExpressionContext %End virtual bool validateInputCrs( const QVariantMap ¶meters, @@ -416,8 +358,6 @@ Checks whether the coordinate reference systems for the specified set of ``param are valid for the algorithm. For instance, the base implementation performs checks to ensure that all input CRS are equal Returns true if ``parameters`` have passed the CRS check. - -:rtype: bool %End virtual QString asPythonCommand( const QVariantMap ¶meters, QgsProcessingContext &context ) const; @@ -427,8 +367,6 @@ using the specified ``parameters``. Algorithms which cannot be run from a Python command should return an empty string. - -:rtype: str %End void setProvider( QgsProcessingProvider *provider ); @@ -443,8 +381,6 @@ Associates this algorithm with its provider. No transfer of ownership is involve Creates a new instance of the algorithm class. This method should return a 'pristine' instance of the algorithm class. - -:rtype: QgsProcessingAlgorithm %End virtual void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) = 0; @@ -483,8 +419,6 @@ added to the algorithm. There is no need to call addOutput() to manually add a c for this vector. If ``createOutput`` is false then this automatic output creation will not occur. -:rtype: bool - .. seealso:: :py:func:`initAlgorithm()` .. seealso:: :py:func:`addOutput()` @@ -507,8 +441,6 @@ This should usually be called from a subclass' initAlgorithm() implementation. Note that in some cases output creation can be automatically performed when calling addParameter(). See the notes in addParameter() for a description of when this occurs. -:rtype: bool - .. seealso:: :py:func:`addParameter()` .. seealso:: :py:func:`initAlgorithm()` @@ -542,8 +474,6 @@ this indicates that the preparation could not be completed, and the algorithm ex will be canceled. :return: true if preparation was successful. -:rtype: bool - .. seealso:: :py:func:`processAlgorithm()` @@ -574,8 +504,6 @@ to indicate that a fatal error occurred within the execution. Python based subcl should raise GeoAlgorithmExecutionException for the same purpose. :return: A map of algorithm outputs. These may be output layer references, or calculated -:rtype: QVariantMap - values such as statistical calculations. Unless the algorithm subclass overrides the postProcessAlgorithm() step this returned map will be used as the output for the algorithm. @@ -607,8 +535,6 @@ postProcessAlgorithm will not be called if the prepareAlgorithm() step failed (r or if an exception was raised by the processAlgorithm() step. :return: A map of algorithm outputs. These may be output layer references, or calculated -:rtype: QVariantMap - values such as statistical calculations. Implementations which return a non-empty map will override any results returned by processAlgorithm(). @@ -620,50 +546,36 @@ map will override any results returned by processAlgorithm(). QString parameterAsString( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a static string value. - -:rtype: str %End QString parameterAsExpression( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to an expression. - -:rtype: str %End double parameterAsDouble( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a static double value. - -:rtype: float %End int parameterAsInt( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a static integer value. - -:rtype: int %End int parameterAsEnum( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a enum value. - -:rtype: int %End QList parameterAsEnums( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to list of enum values. - -:rtype: list of int %End bool parameterAsBool( const QVariantMap ¶meters, const QString &name, const QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a static boolean value. - -:rtype: bool %End QgsFeatureSink *parameterAsSink( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context, QString &destinationIdentifier /Out/, @@ -681,8 +593,6 @@ The ``destinationIdentifier`` argument will be set to a string which can be used to the sink, e.g. via calling QgsProcessingUtils.mapLayerFromString(). This function creates a new object and the caller takes responsibility for deleting the returned object. - -:rtype: QgsFeatureSink %End QgsProcessingFeatureSource *parameterAsSource( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const /Factory/; @@ -693,8 +603,6 @@ Sources will either be taken from ``context``'s active project, or loaded from e sources and stored temporarily in the ``context``. This function creates a new object and the caller takes responsibility for deleting the returned object. - -:rtype: QgsProcessingFeatureSource %End QString parameterAsCompatibleSourceLayerPath( const QVariantMap ¶meters, const QString &name, @@ -710,8 +618,6 @@ in a temporary location. The function will then return the path to that temporar The ``preferredFormat`` argument is used to specify to desired file extension to use when a temporary layer export is required. - -:rtype: str %End QgsMapLayer *parameterAsLayer( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; @@ -721,8 +627,6 @@ Evaluates the parameter with matching ``name`` to a map layer. Layers will either be taken from ``context``'s active project, or loaded from external sources and stored temporarily in the ``context``. In either case, callers do not need to handle deletion of the returned layer. - -:rtype: QgsMapLayer %End QgsRasterLayer *parameterAsRasterLayer( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; @@ -732,22 +636,16 @@ Evaluates the parameter with matching ``name`` to a raster layer. Layers will either be taken from ``context``'s active project, or loaded from external sources and stored temporarily in the ``context``. In either case, callers do not need to handle deletion of the returned layer. - -:rtype: QgsRasterLayer %End QString parameterAsOutputLayer( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a output layer destination. - -:rtype: str %End QString parameterAsFileOutput( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a file based output destination. - -:rtype: str %End QgsVectorLayer *parameterAsVectorLayer( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; @@ -757,15 +655,11 @@ Evaluates the parameter with matching ``name`` to a vector layer. Layers will either be taken from ``context``'s active project, or loaded from external sources and stored temporarily in the ``context``. In either case, callers do not need to handle deletion of the returned layer. - -:rtype: QgsVectorLayer %End QgsCoordinateReferenceSystem parameterAsCrs( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a coordinate reference system. - -:rtype: QgsCoordinateReferenceSystem %End QgsRectangle parameterAsExtent( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context, @@ -776,8 +670,6 @@ Evaluates the parameter with matching ``name`` to a rectangular extent. If ``crs`` is set, and the original coordinate reference system of the parameter can be determined, then the extent will be automatically reprojected so that it is in the specified ``crs``. In this case the extent of the reproject rectangle will be returned. -:rtype: QgsRectangle - .. seealso:: :py:func:`parameterAsExtentGeometry()` %End @@ -791,8 +683,6 @@ reprojected so that it is in the specified ``crs``. Unlike parameterAsExtent(), will no longer be a rectangle itself (i.e. this method returns the geometry of the actual reprojected rectangle, while parameterAsExtent() returns just the extent of the reprojected rectangle). -:rtype: QgsGeometry - .. seealso:: :py:func:`parameterAsExtent()` %End @@ -800,8 +690,6 @@ just the extent of the reprojected rectangle). %Docstring Returns the coordinate reference system associated with an extent parameter value. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`parameterAsExtent()` %End @@ -813,8 +701,6 @@ Evaluates the parameter with matching ``name`` to a point. If ``crs`` is set then the point will be automatically reprojected so that it is in the specified ``crs``. -:rtype: QgsPointXY - .. seealso:: :py:func:`parameterAsPointCrs()` %End @@ -822,45 +708,33 @@ reprojected so that it is in the specified ``crs``. %Docstring Returns the coordinate reference system associated with an point parameter value. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`parameterAsPoint()` %End QString parameterAsFile( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a file/folder name. - -:rtype: str %End QVariantList parameterAsMatrix( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a matrix/table of values. Tables are collapsed to a 1 dimensional list. - -:rtype: QVariantList %End QList< QgsMapLayer *> parameterAsLayerList( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a list of map layers. - -:rtype: list of QgsMapLayer %End QList parameterAsRange( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a range of values. - -:rtype: list of float %End QStringList parameterAsFields( const QVariantMap ¶meters, const QString &name, QgsProcessingContext &context ) const; %Docstring Evaluates the parameter with matching ``name`` to a list of fields. - -:rtype: list of str %End private: @@ -915,8 +789,6 @@ Constructor for QgsProcessingFeatureBasedAlgorithm. Returns the translated, user visible name for any layers created by this algorithm. This name will be used as the default name when loading the resultant layer into a QGIS project. - -:rtype: str %End virtual QList inputLayerTypes() const; @@ -924,23 +796,17 @@ QGIS project. Returns the valid input layer types for the source layer for this algorithm. By default vector layers with any geometry types (excluding non-spatial, geometryless layers) are accepted. - -:rtype: list of int %End virtual QgsProcessing::SourceType outputLayerType() const; %Docstring Returns the layer type for layers generated by this algorithm, if this is possible to determine in advance. - -:rtype: QgsProcessing.SourceType %End virtual QgsProcessingFeatureSource::Flag sourceFlags() const; %Docstring Returns the processing feature source flags to be used in the algorithm. - -:rtype: QgsProcessingFeatureSource.Flag %End virtual QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const; @@ -950,8 +816,6 @@ output WKB type generated by the algorithm. The default behavior is that the alg the same WKB type. This is called once by the base class when creating the output sink for the algorithm (i.e. it is not called once per feature processed). - -:rtype: QgsWkbTypes.Type %End virtual QgsFields outputFields( const QgsFields &inputFields ) const; @@ -964,8 +828,6 @@ implement logic here to indicate which fields are output by the algorithm. This is called once by the base class when creating the output sink for the algorithm (i.e. it is not called once per feature processed). - -:rtype: QgsFields %End virtual QgsCoordinateReferenceSystem outputCrs( const QgsCoordinateReferenceSystem &inputCrs ) const; @@ -976,8 +838,6 @@ the same CRS as the input source. This is called once by the base class when creating the output sink for the algorithm (i.e. it is not called once per feature processed). - -:rtype: QgsCoordinateReferenceSystem %End virtual void initParameters( const QVariantMap &configuration = QVariantMap() ); @@ -991,8 +851,6 @@ QgsProcessingFeatureBasedAlgorithm. %Docstring Returns the source's coordinate reference system. This will only return a valid CRS when called from a subclasses' processFeature() implementation. - -:rtype: QgsCoordinateReferenceSystem %End virtual QgsFeature processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0; @@ -1015,8 +873,6 @@ Algorithms can throw a QgsProcessingException if a fatal error occurred which sh prevent the algorithm execution from continuing. This can be annoying for users though as it can break valid model execution - so use with extreme caution, and consider using ``feedback`` to instead report non-fatal processing failures for features instead. - -:rtype: QgsFeature %End virtual QVariantMap processAlgorithm( const QVariantMap ¶meters, @@ -1026,8 +882,6 @@ can break valid model execution - so use with extreme caution, and consider usin %Docstring Returns the feature request used for fetching features to process from the source layer. The default implementation requests all attributes and geometry. - -:rtype: QgsFeatureRequest %End }; diff --git a/python/core/processing/qgsprocessingcontext.sip b/python/core/processing/qgsprocessingcontext.sip index 610363f884b1..1222195b3e78 100644 --- a/python/core/processing/qgsprocessingcontext.sip +++ b/python/core/processing/qgsprocessingcontext.sip @@ -49,8 +49,6 @@ Copies all settings which are safe for use across different threads from %Docstring Returns any flags set in the context. -:rtype: QgsProcessingContext.Flags - .. seealso:: :py:func:`setFlags()` %End @@ -65,8 +63,6 @@ Sets ``flags`` for the context. %Docstring Returns the project in which the algorithm is being executed. -:rtype: QgsProject - .. seealso:: :py:func:`setProject()` %End @@ -80,8 +76,6 @@ Sets the ``project`` in which the algorithm will be executed. QgsExpressionContext &expressionContext(); %Docstring Returns the expression context. - -:rtype: QgsExpressionContext %End @@ -94,8 +88,6 @@ Sets the expression ``context``. %Docstring Returns a reference to the layer store used for storing temporary layers during algorithm execution. - -:rtype: QgsMapLayerStore %End struct LayerDetails @@ -127,8 +119,6 @@ Destination project %Docstring Returns a map of layers (by ID or datasource) to LayerDetails, to load into the canvas upon completion of the algorithm or model. -:rtype: QMap< str, QgsProcessingContext.LayerDetails > - .. seealso:: :py:func:`setLayersToLoadOnCompletion()` .. seealso:: :py:func:`addLayerToLoadOnCompletion()` @@ -157,8 +147,6 @@ The ``details`` parameter dictates the LayerDetails. %Docstring Returns the behavior used for checking invalid geometries in input layers. -:rtype: QgsFeatureRequest.InvalidGeometryCheck - .. seealso:: :py:func:`setInvalidGeometryCheck()` %End @@ -223,8 +211,6 @@ called using the feature which encountered the transform error as a parameter. %Docstring Returns the default encoding to use for newly created files. -:rtype: str - .. seealso:: :py:func:`setDefaultEncoding()` %End @@ -239,8 +225,6 @@ Sets the default ``encoding`` to use for newly created files. %Docstring Returns the associated feedback object. -:rtype: QgsProcessingFeedback - .. seealso:: :py:func:`setFeedback()` %End @@ -259,8 +243,6 @@ Ownership of ``feedback`` is not transferred. %Docstring Returns the thread in which the context lives. -:rtype: QThread - .. seealso:: :py:func:`pushToThread()` %End @@ -288,8 +270,6 @@ Takes the result map layer with matching ``id`` from the context and transfers ownership of it back to the caller. This method can be used to remove temporary layers which are not required for further processing from a context. - -:rtype: QgsMapLayer %End private: diff --git a/python/core/processing/qgsprocessingoutputs.sip b/python/core/processing/qgsprocessingoutputs.sip index 74fc857b5c17..de738d0c20cd 100644 --- a/python/core/processing/qgsprocessingoutputs.sip +++ b/python/core/processing/qgsprocessingoutputs.sip @@ -58,8 +58,6 @@ Constructor for QgsProcessingOutputDefinition. virtual QString type() const = 0; %Docstring Unique output type name. - -:rtype: str %End QString name() const; @@ -67,8 +65,6 @@ Unique output type name. Returns the name of the output. This is the internal identifier by which algorithms access this output. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -85,8 +81,6 @@ algorithms access this output. Returns the description for the output. This is the user-visible string used to identify this output. -:rtype: str - .. seealso:: :py:func:`setDescription()` %End @@ -130,8 +124,6 @@ Constructor for QgsProcessingOutputMapLayer. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; @@ -160,8 +152,6 @@ Constructor for QgsProcessingOutputVectorLayer. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; @@ -169,8 +159,6 @@ Returns the type name for the output class. %Docstring Returns the layer type for the output layer. -:rtype: QgsProcessing.SourceType - .. seealso:: :py:func:`setDataType()` %End @@ -204,8 +192,6 @@ Constructor for QgsProcessingOutputRasterLayer. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; @@ -233,8 +219,6 @@ Constructor for QgsProcessingOutputHtml. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; @@ -261,8 +245,6 @@ Constructor for QgsProcessingOutputNumber. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; }; @@ -288,8 +270,6 @@ Constructor for QgsProcessingOutputString. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; @@ -317,8 +297,6 @@ Constructor for QgsProcessingOutputFolder. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; @@ -345,8 +323,6 @@ Constructor for QgsProcessingOutputFile. static QString typeName(); %Docstring Returns the type name for the output class. - -:rtype: str %End virtual QString type() const; diff --git a/python/core/processing/qgsprocessingparameters.sip b/python/core/processing/qgsprocessingparameters.sip index 919771aa84ee..72f5add23141 100644 --- a/python/core/processing/qgsprocessingparameters.sip +++ b/python/core/processing/qgsprocessingparameters.sip @@ -48,10 +48,6 @@ True if only selected features in the source should be used by algorithms. bool operator==( const QgsProcessingFeatureSourceDefinition &other ); bool operator!=( const QgsProcessingFeatureSourceDefinition &other ); -%Docstring - -:rtype: bool -%End operator QVariant() const; %Docstring @@ -216,15 +212,11 @@ Constructor for QgsProcessingParameterDefinition. virtual QgsProcessingParameterDefinition *clone() const = 0 /Factory/; %Docstring Creates a clone of the parameter definition. - -:rtype: QgsProcessingParameterDefinition %End virtual QString type() const = 0; %Docstring Unique parameter type name. - -:rtype: str %End virtual bool isDestination() const; @@ -232,8 +224,6 @@ Unique parameter type name. Returns true if this parameter represents a file or layer destination, e.g. parameters which are used for the destination for layers output by an algorithm will return true. - -:rtype: bool %End QString name() const; @@ -241,8 +231,6 @@ true. Returns the name of the parameter. This is the internal identifier by which algorithms access this parameter. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -259,8 +247,6 @@ algorithms access this parameter. Returns the description for the parameter. This is the user-visible string used to identify this parameter. -:rtype: str - .. seealso:: :py:func:`setDescription()` %End @@ -276,8 +262,6 @@ used to identify this parameter. %Docstring Returns the default value for the parameter. -:rtype: QVariant - .. seealso:: :py:func:`setDefaultValue()` %End @@ -293,8 +277,6 @@ to ensure that ``value`` is a valid input for the parameter subclass. %Docstring Returns any flags associated with the parameter. -:rtype: Flags - .. seealso:: :py:func:`setFlags()` %End @@ -312,8 +294,6 @@ parameter. Returns true if the value can be accepted. The optional ``context`` parameter can be specified to allow a more stringent check to be performed, capable of checking for the presence of required layers and other factors within the context. - -:rtype: bool %End virtual QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const; @@ -321,16 +301,12 @@ layers and other factors within the context. Returns a string version of the parameter input ``value``, which is suitable for use as an input parameter value when running an algorithm directly from a Python command. The returned value must be correctly escaped - e.g. string values must be wrapped in ' 's. - -:rtype: str %End virtual QString asScriptCode() const; %Docstring Returns the parameter definition encoded in a string which can be used within a Python processing script. - -:rtype: str %End virtual QVariantMap toVariantMap() const; @@ -338,8 +314,6 @@ Python processing script. Saves this parameter to a QVariantMap. Subclasses should ensure that they call the base class method and then extend the result with additional properties. -:rtype: QVariantMap - .. seealso:: :py:func:`fromVariantMap()` %End @@ -348,8 +322,6 @@ method and then extend the result with additional properties. Restores this parameter to a QVariantMap. Subclasses should ensure that they call the base class method. -:rtype: bool - .. seealso:: :py:func:`toVariantMap()` %End @@ -359,8 +331,6 @@ method. Returns the parameter's freeform metadata. This is mostly used by parameter widget wrappers in order to customise their appearance and behavior. -:rtype: QVariantMap - .. seealso:: :py:func:`setMetadata()` %End @@ -376,8 +346,6 @@ in order to customise their appearance and behavior. %Docstring Returns a list of other parameter names on which this parameter is dependent (e.g. field parameters which depend on a parent layer parameter). - -:rtype: list of str %End QgsProcessingAlgorithm *algorithm() const; @@ -385,8 +353,6 @@ field parameters which depend on a parent layer parameter). Returns a pointer to the algorithm which owns this parameter. May be None for non-owned parameters. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`provider()` %End @@ -395,8 +361,6 @@ for non-owned parameters. Returns a pointer to the provider for the algorithm which owns this parameter. May be None for non-owned parameters or algorithms. -:rtype: QgsProcessingProvider - .. seealso:: :py:func:`algorithm()` %End @@ -404,8 +368,6 @@ for non-owned parameters or algorithms. %Docstring Returns a formatted tooltip for use with the parameter, which gives helpful information like parameter description, ID, and extra content like default values (depending on parameter type). - -:rtype: str %End bool isDynamic() const; @@ -413,8 +375,6 @@ like parameter description, ID, and extra content like default values (depending Returns true if the parameter supports is dynamic, and can support data-defined values (i.e. QgsProperty based values). -:rtype: bool - .. seealso:: :py:func:`setIsDynamic()` .. seealso:: :py:func:`dynamicPropertyDefinition()` @@ -438,8 +398,6 @@ Sets whether the parameter is ``dynamic``, and can support data-defined values %Docstring Returns the property definition for dynamic properties. -:rtype: QgsPropertyDefinition - .. seealso:: :py:func:`isDynamic()` .. seealso:: :py:func:`setDynamicPropertyDefinition()` @@ -466,8 +424,6 @@ Dynamic parameters (see isDynamic()) can have an optional vector layer parameter which indicates which layer the fields and values will be available from when evaluating the dynamic parameter. -:rtype: str - .. seealso:: :py:func:`setDynamicLayerParameterName()` .. seealso:: :py:func:`isDynamic()` @@ -537,57 +493,41 @@ the evaluation to understand available map layers and expression contexts %Docstring Returns true if the parameter with matching ``name`` is a dynamic parameter, and must be evaluated once for every input feature processed. - -:rtype: bool %End static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a static string value. - -:rtype: str %End static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to an expression. - -:rtype: str %End static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a static double value. - -:rtype: float %End static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a static integer value. - -:rtype: int %End static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a enum value. - -:rtype: int %End static QList parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to list of enum values. - -:rtype: list of int %End static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a static boolean value. - -:rtype: bool %End static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, @@ -605,8 +545,6 @@ argument will be set to a string which can be used to retrieve the layer corresp to the sink, e.g. via calling QgsProcessingUtils.mapLayerFromString(). This function creates a new object and the caller takes responsibility for deleting the returned object. - -:rtype: QgsFeatureSink %End static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ) /Factory/; @@ -617,8 +555,6 @@ Sources will either be taken from ``context``'s active project, or loaded from e sources and stored temporarily in the ``context``. This function creates a new object and the caller takes responsibility for deleting the returned object. - -:rtype: QgsProcessingFeatureSource %End static QString parameterAsCompatibleSourceLayerPath( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, @@ -634,8 +570,6 @@ in a temporary location. The function will then return the path to that temporar The ``preferredFormat`` argument is used to specify to desired file extension to use when a temporary layer export is required. This defaults to shapefiles, because shapefiles are the future (don't believe the geopackage hype!). - -:rtype: str %End static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); @@ -645,8 +579,6 @@ Evaluates the parameter with matching ``definition`` to a map layer. Layers will either be taken from ``context``'s active project, or loaded from external sources and stored temporarily in the ``context``. In either case, callers do not need to handle deletion of the returned layer. - -:rtype: QgsMapLayer %End static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); @@ -656,22 +588,16 @@ Evaluates the parameter with matching ``definition`` to a raster layer. Layers will either be taken from ``context``'s active project, or loaded from external sources and stored temporarily in the ``context``. In either case, callers do not need to handle deletion of the returned layer. - -:rtype: QgsRasterLayer %End static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a output layer destination. - -:rtype: str %End static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a file based output destination. - -:rtype: str %End static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); @@ -681,15 +607,11 @@ Evaluates the parameter with matching ``definition`` to a vector layer. Layers will either be taken from ``context``'s active project, or loaded from external sources and stored temporarily in the ``context``. In either case, callers do not need to handle deletion of the returned layer. - -:rtype: QgsVectorLayer %End static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a coordinate reference system. - -:rtype: QgsCoordinateReferenceSystem %End static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, @@ -700,8 +622,6 @@ Evaluates the parameter with matching ``definition`` to a rectangular extent. If ``crs`` is set, and the original coordinate reference system of the parameter can be determined, then the extent will be automatically reprojected so that it is in the specified ``crs``. In this case the extent of the reproject rectangle will be returned. -:rtype: QgsRectangle - .. seealso:: :py:func:`parameterAsExtentGeometry()` .. seealso:: :py:func:`parameterAsExtentCrs()` @@ -717,8 +637,6 @@ reprojected so that it is in the specified ``crs``. Unlike parameterAsExtent(), will no longer be a rectangle itself (i.e. this method returns the geometry of the actual reprojected rectangle, while parameterAsExtent() returns just the extent of the reprojected rectangle). -:rtype: QgsGeometry - .. seealso:: :py:func:`parameterAsExtent()` .. seealso:: :py:func:`parameterAsExtentCrs()` @@ -728,8 +646,6 @@ just the extent of the reprojected rectangle). %Docstring Returns the coordinate reference system associated with an extent parameter value. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`parameterAsExtent()` %End @@ -740,8 +656,6 @@ Evaluates the parameter with matching ``definition`` to a point. If ``crs`` is set then the point will be automatically reprojected so that it is in the specified ``crs``. -:rtype: QgsPointXY - .. seealso:: :py:func:`parameterAsPointCrs()` %End @@ -749,45 +663,33 @@ If ``crs`` is set then the point will be automatically reprojected so that it is %Docstring Returns the coordinate reference system associated with an point parameter value. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`parameterAsPoint()` %End static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a file/folder name. - -:rtype: str %End static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a matrix/table of values. Tables are collapsed to a 1 dimensional list. - -:rtype: QVariantList %End static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a list of map layers. - -:rtype: list of QgsMapLayer %End static QList parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a range of values. - -:rtype: list of float %End static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ); %Docstring Evaluates the parameter with matching ``definition`` to a list of fields. - -:rtype: list of str %End static QgsProcessingParameterDefinition *parameterFromVariantMap( const QVariantMap &map ) /Factory/; @@ -795,15 +697,11 @@ Evaluates the parameter with matching ``definition`` to a list of fields. Creates a new QgsProcessingParameterDefinition using the configuration from a supplied variant ``map``. The caller takes responsibility for deleting the returned object. - -:rtype: QgsProcessingParameterDefinition %End static QString descriptionFromName( const QString &name ); %Docstring Creates an autogenerated parameter description from a parameter ``name``. - -:rtype: str %End static QgsProcessingParameterDefinition *parameterFromScriptCode( const QString &code ) /Factory/; @@ -811,8 +709,6 @@ Creates an autogenerated parameter description from a parameter ``name``. Creates a new QgsProcessingParameterDefinition using the configuration from a supplied script ``code`` string. The caller takes responsibility for deleting the returned object. - -:rtype: QgsProcessingParameterDefinition %End }; @@ -841,8 +737,6 @@ Constructor for QgsProcessingParameterBoolean. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -855,8 +749,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterBoolean *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterBoolean %End }; @@ -882,8 +774,6 @@ Constructor for QgsProcessingParameterCrs. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -896,8 +786,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterCrs *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterCrs %End }; @@ -924,8 +812,6 @@ Constructor for QgsProcessingParameterMapLayer. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -938,8 +824,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterMapLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterMapLayer %End }; @@ -966,8 +850,6 @@ Constructor for QgsProcessingParameterExtent. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -980,8 +862,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterExtent *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterExtent %End }; @@ -1009,8 +889,6 @@ Constructor for QgsProcessingParameterPoint. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1023,8 +901,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterPoint *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterPoint %End }; @@ -1057,8 +933,6 @@ Constructor for QgsProcessingParameterFile. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1072,8 +946,6 @@ Returns the type name for the parameter class. %Docstring Returns the parameter behavior (e.g. File or Folder). -:rtype: Behavior - .. seealso:: :py:func:`setBehavior()` %End @@ -1088,8 +960,6 @@ Sets the parameter ``behavior`` (e.g. File or Folder). %Docstring Returns any specified file extension for the parameter. -:rtype: str - .. seealso:: :py:func:`setExtension()` %End @@ -1108,8 +978,6 @@ Sets a file ``extension`` for the parameter. static QgsProcessingParameterFile *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition, Behavior behavior = File ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterFile %End }; @@ -1138,8 +1006,6 @@ Constructor for QgsProcessingParameterMatrix. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1153,8 +1019,6 @@ Returns the type name for the parameter class. %Docstring Returns a list of column headers (if set). -:rtype: list of str - .. seealso:: :py:func:`setHeaders()` %End @@ -1170,8 +1034,6 @@ Sets the list of column ``headers``. Returns the fixed number of rows in the table. This parameter only has an effect if hasFixedNumberRows() is true. -:rtype: int - .. seealso:: :py:func:`setNumberRows()` .. seealso:: :py:func:`setFixedNumberRows()` @@ -1191,8 +1053,6 @@ effect if hasFixedNumberRows() is true. %Docstring Returns whether the table has a fixed number of rows. -:rtype: bool - .. seealso:: :py:func:`numberRows()` .. seealso:: :py:func:`setHasFixedNumberRows()` @@ -1215,8 +1075,6 @@ Sets whether the table has a fixed number of rows. static QgsProcessingParameterMatrix *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterMatrix %End }; @@ -1244,8 +1102,6 @@ Constructor for QgsProcessingParameterMultipleLayers. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1261,8 +1117,6 @@ Returns the type name for the parameter class. %Docstring Returns the layer type for layers acceptable by the parameter. -:rtype: QgsProcessing.SourceType - .. seealso:: :py:func:`setLayerType()` %End @@ -1278,8 +1132,6 @@ Sets the layer ``type`` for layers acceptable by the parameter. Returns the minimum number of layers required for the parameter. If the return value is < 1 then the parameter accepts any number of layers. -:rtype: int - .. seealso:: :py:func:`setMinimumNumberInputs()` %End @@ -1299,8 +1151,6 @@ if the parameter is not optional. static QgsProcessingParameterMultipleLayers *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterMultipleLayers %End }; @@ -1338,8 +1188,6 @@ Constructor for QgsProcessingParameterNumber. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1355,8 +1203,6 @@ Returns the type name for the parameter class. %Docstring Returns the minimum value acceptable by the parameter. -:rtype: float - .. seealso:: :py:func:`setMinimum()` %End @@ -1371,8 +1217,6 @@ Sets the ``minimum`` value acceptable by the parameter. %Docstring Returns the maximum value acceptable by the parameter. -:rtype: float - .. seealso:: :py:func:`setMaximum()` %End @@ -1387,8 +1231,6 @@ Sets the ``maximum`` value acceptable by the parameter. %Docstring Returns the acceptable data type for the parameter. -:rtype: Type - .. seealso:: :py:func:`setDataType()` %End @@ -1407,8 +1249,6 @@ Sets the acceptable data ``type`` for the parameter. static QgsProcessingParameterNumber *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterNumber %End }; @@ -1437,8 +1277,6 @@ Constructor for QgsProcessingParameterRange. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1452,8 +1290,6 @@ Returns the type name for the parameter class. %Docstring Returns the acceptable data type for the range. -:rtype: QgsProcessingParameterNumber.Type - .. seealso:: :py:func:`setDataType()` %End @@ -1472,8 +1308,6 @@ Sets the acceptable data ``type`` for the range. static QgsProcessingParameterRange *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterRange %End }; @@ -1500,8 +1334,6 @@ Constructor for QgsProcessingParameterRasterLayer. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1514,8 +1346,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterRasterLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterRasterLayer %End }; @@ -1544,8 +1374,6 @@ Constructor for QgsProcessingParameterEnum. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1561,8 +1389,6 @@ Returns the type name for the parameter class. %Docstring Returns the list of acceptable options for the parameter. -:rtype: list of str - .. seealso:: :py:func:`setOptions()` %End @@ -1577,8 +1403,6 @@ Sets the list of acceptable ``options`` for the parameter. %Docstring Returns true if the parameter allows multiple selected values. -:rtype: bool - .. seealso:: :py:func:`setAllowMultiple()` %End @@ -1597,8 +1421,6 @@ Sets whether the parameter allows multiple selected values. static QgsProcessingParameterEnum *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterEnum %End }; @@ -1626,8 +1448,6 @@ Constructor for QgsProcessingParameterString. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1641,8 +1461,6 @@ Returns the type name for the parameter class. %Docstring Returns true if the parameter allows multiline strings. -:rtype: bool - .. seealso:: :py:func:`setMultiLine()` %End @@ -1661,8 +1479,6 @@ Sets whether the parameter allows multiline strings. static QgsProcessingParameterString *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterString %End }; @@ -1690,8 +1506,6 @@ Constructor for QgsProcessingParameterExpression. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1705,8 +1519,6 @@ Returns the type name for the parameter class. %Docstring Returns the name of the parent layer parameter, or an empty string if this is not set. -:rtype: str - .. seealso:: :py:func:`setParentLayerParameterName()` %End @@ -1725,8 +1537,6 @@ Sets the name of the parent layer parameter. Use an empty string if this is not static QgsProcessingParameterExpression *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterExpression %End }; @@ -1754,8 +1564,6 @@ Constructor for QgsProcessingParameterLimitedDataTypes, with a list of acceptabl %Docstring Returns the geometry types for sources acceptable by the parameter. -:rtype: list of int - .. seealso:: :py:func:`setDataTypes()` %End @@ -1796,8 +1604,6 @@ Constructor for QgsProcessingParameterVectorLayer. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1815,8 +1621,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterVectorLayer *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterVectorLayer %End }; @@ -1854,8 +1658,6 @@ Constructor for QgsProcessingParameterField. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1873,8 +1675,6 @@ Returns the type name for the parameter class. %Docstring Returns the name of the parent layer parameter, or an empty string if this is not set. -:rtype: str - .. seealso:: :py:func:`setParentLayerParameterName()` %End @@ -1889,8 +1689,6 @@ Sets the name of the parent layer parameter. Use an empty string if this is not %Docstring Returns the acceptable data type for the field. -:rtype: DataType - .. seealso:: :py:func:`setDataType()` %End @@ -1905,8 +1703,6 @@ Sets the acceptable data ``type`` for the field. %Docstring Returns whether multiple field selections are permitted. -:rtype: bool - .. seealso:: :py:func:`setAllowMultiple()` %End @@ -1925,8 +1721,6 @@ Sets whether multiple field selections are permitted. static QgsProcessingParameterField *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterField %End }; @@ -1955,8 +1749,6 @@ Constructor for QgsProcessingParameterFeatureSource. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -1976,8 +1768,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterFeatureSource *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterFeatureSource %End }; @@ -2012,8 +1802,6 @@ Constructor for QgsProcessingDestinationParameter. %Docstring Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parameter. - -:rtype: QgsProcessingOutputDefinition %End bool supportsNonFileBasedOutputs() const; @@ -2021,8 +1809,6 @@ parameter. Returns true if the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs. -:rtype: bool - .. seealso:: :py:func:`setSupportsNonFileBasedOutputs()` %End @@ -2038,8 +1824,6 @@ such as memory layers or direct database outputs. %Docstring Returns the default file extension for destination file paths associated with this parameter. - -:rtype: str %End virtual QString generateTemporaryDestination() const; @@ -2047,8 +1831,6 @@ associated with this parameter. Generates a temporary destination value for this parameter. The returned value will be a file path or QGIS data provider URI suitable for temporary storage of created layers and files. - -:rtype: str %End bool createByDefault() const; @@ -2056,8 +1838,6 @@ temporary storage of created layers and files. Returns true if the destination should be created by default. For optional parameters, a return value of false indicates that the destination should not be created by default. -:rtype: bool - .. seealso:: :py:func:`setCreateByDefault()` %End @@ -2096,8 +1876,6 @@ Constructor for QgsProcessingParameterFeatureSink. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -2117,8 +1895,6 @@ Returns the type name for the parameter class. %Docstring Returns the layer type for sinks associated with the parameter. -:rtype: QgsProcessing.SourceType - .. seealso:: :py:func:`setDataType()` %End @@ -2126,8 +1902,6 @@ Returns the layer type for sinks associated with the parameter. %Docstring Returns true if sink is likely to include geometries. In cases were presence of geometry cannot be reliably determined in advance, this method will default to returning true. - -:rtype: bool %End void setDataType( QgsProcessing::SourceType type ); @@ -2147,8 +1921,6 @@ Sets the layer ``type`` for the sinks associated with the parameter. static QgsProcessingParameterFeatureSink *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterFeatureSink %End }; @@ -2182,8 +1954,6 @@ Constructor for QgsProcessingParameterVectorDestination. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -2203,8 +1973,6 @@ Returns the type name for the parameter class. %Docstring Returns the layer type for this created vector layer. -:rtype: QgsProcessing.SourceType - .. seealso:: :py:func:`setDataType()` %End @@ -2212,8 +1980,6 @@ Returns the layer type for this created vector layer. %Docstring Returns true if the created layer is likely to include geometries. In cases were presence of geometry cannot be reliably determined in advance, this method will default to returning true. - -:rtype: bool %End void setDataType( QgsProcessing::SourceType type ); @@ -2231,8 +1997,6 @@ Sets the layer ``type`` for the created vector layer. static QgsProcessingParameterVectorDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterVectorDestination %End @@ -2262,8 +2026,6 @@ Constructor for QgsProcessingParameterRasterDestination. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -2280,8 +2042,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterRasterDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterRasterDestination %End }; @@ -2310,8 +2070,6 @@ Constructor for QgsProcessingParameterFileDestination. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -2329,8 +2087,6 @@ Returns the type name for the parameter class. %Docstring Returns the file filter string for file destinations compatible with this parameter. -:rtype: str - .. seealso:: :py:func:`setFileFilter()` %End @@ -2349,8 +2105,6 @@ Sets the file ``filter`` string for file destinations compatible with this param static QgsProcessingParameterFileDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterFileDestination %End @@ -2381,8 +2135,6 @@ Constructor for QgsProcessingParameterFolderDestination. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -2397,8 +2149,6 @@ Returns the type name for the parameter class. static QgsProcessingParameterFolderDestination *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterFolderDestination %End }; @@ -2426,8 +2176,6 @@ Constructor for QgsProcessingParameterBand. static QString typeName(); %Docstring Returns the type name for the parameter class. - -:rtype: str %End virtual QgsProcessingParameterDefinition *clone() const /Factory/; @@ -2445,8 +2193,6 @@ Returns the type name for the parameter class. %Docstring Returns the name of the parent layer parameter, or an empty string if this is not set. -:rtype: str - .. seealso:: :py:func:`setParentLayerParameterName()` %End @@ -2465,8 +2211,6 @@ Sets the name of the parent layer parameter. Use an empty string if this is not static QgsProcessingParameterBand *fromScriptCode( const QString &name, const QString &description, bool isOptional, const QString &definition ) /Factory/; %Docstring Creates a new parameter using the definition from a script code. - -:rtype: QgsProcessingParameterBand %End }; diff --git a/python/core/processing/qgsprocessingprovider.sip b/python/core/processing/qgsprocessingprovider.sip index 8bdb2cd55e55..611d306d4b02 100644 --- a/python/core/processing/qgsprocessingprovider.sip +++ b/python/core/processing/qgsprocessingprovider.sip @@ -36,8 +36,6 @@ Constructor for QgsProcessingProvider. %Docstring Returns an icon for the provider. -:rtype: QIcon - .. seealso:: :py:func:`svgIconPath()` %End @@ -45,8 +43,6 @@ Returns an icon for the provider. %Docstring Returns a path to an SVG version of the provider's icon. -:rtype: str - .. seealso:: :py:func:`icon()` %End @@ -56,8 +52,6 @@ Returns the unique provider id, used for identifying the provider. This string should be a unique, short, character only string, eg "qgis" or "gdal". This string should not be localised. -:rtype: str - .. seealso:: :py:func:`name()` %End @@ -66,8 +60,6 @@ string should not be localised. Returns the provider name, which is used to describe the provider within the GUI. This string should be short (e.g. "Lastools") and localised. -:rtype: str - .. seealso:: :py:func:`longName()` .. seealso:: :py:func:`id()` @@ -81,8 +73,6 @@ This string should be localised. The default implementation returns the same string as name(). -:rtype: str - .. seealso:: :py:func:`name()` .. seealso:: :py:func:`id()` @@ -93,24 +83,18 @@ The default implementation returns the same string as name(). Returns true if the provider can be activated, or false if it cannot be activated (e.g. due to missing external dependencies). -:rtype: bool - .. seealso:: :py:func:`isActive()` %End virtual bool isActive() const; %Docstring Returns true if the provider is active and able to run algorithms. - -:rtype: bool %End virtual QStringList supportedOutputRasterLayerExtensions() const; %Docstring Returns a list of the raster format file extensions supported by this provider. -:rtype: list of str - .. seealso:: :py:func:`supportedOutputVectorLayerExtensions()` %End @@ -118,8 +102,6 @@ Returns a list of the raster format file extensions supported by this provider. %Docstring Returns a list of the vector format file extensions supported by this provider. -:rtype: list of str - .. seealso:: :py:func:`defaultVectorFileExtension()` .. seealso:: :py:func:`supportedOutputRasterLayerExtensions()` @@ -139,8 +121,6 @@ The default implementation returns the user's default Processing vector output f setting, if it's supported by the provider (see supportedOutputVectorLayerExtensions()). Otherwise the first reported supported vector format will be used. -:rtype: str - .. seealso:: :py:func:`supportedOutputVectorLayerExtensions()` .. seealso:: :py:func:`defaultRasterFileExtension()` @@ -155,8 +135,6 @@ The default implementation returns the user's default Processing raster output f setting, if it's supported by the provider (see supportedOutputRasterLayerExtensions()). Otherwise the first reported supported raster format will be used. -:rtype: str - .. seealso:: :py:func:`supportedOutputRasterLayerExtensions()` .. seealso:: :py:func:`defaultVectorFileExtension()` @@ -167,8 +145,6 @@ Otherwise the first reported supported raster format will be used. Returns true if the provider supports non-file based outputs (such as memory layers or direct database outputs). -:rtype: bool - .. seealso:: :py:func:`supportedOutputVectorLayerExtensions()` %End @@ -181,8 +157,6 @@ occur within the loadAlgorithms() method. Instead, subclasses should call refres from any overloaded load() method to trigger an initial load of the provider's algorithms. :return: true if provider could be successfully loaded -:rtype: bool - .. seealso:: :py:func:`unload()` %End @@ -203,8 +177,6 @@ Refreshes the algorithms available from the provider, causing it to re-populate %Docstring Returns a list of algorithms supplied by this provider. -:rtype: list of const QgsProcessingAlgorithm - .. seealso:: :py:func:`algorithm()` %End @@ -213,8 +185,6 @@ Returns a list of algorithms supplied by this provider. Returns the matching algorithm by ``name``, or a None if no matching algorithm is contained by this provider. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`algorithms()` %End @@ -239,8 +209,6 @@ addAlgorithm() to register all their associated algorithms. bool addAlgorithm( QgsProcessingAlgorithm *algorithm /Transfer/ ); %Docstring Adds an ``algorithm`` to the provider. Ownership of the algorithm is transferred to the provider. - -:rtype: bool %End private: diff --git a/python/core/processing/qgsprocessingregistry.sip b/python/core/processing/qgsprocessingregistry.sip index 4d6413af08eb..0837ffff2a0f 100644 --- a/python/core/processing/qgsprocessingregistry.sip +++ b/python/core/processing/qgsprocessingregistry.sip @@ -37,8 +37,6 @@ Constructor for QgsProcessingRegistry. QList providers() const; %Docstring Get list of available providers. - -:rtype: list of QgsProcessingProvider %End bool addProvider( QgsProcessingProvider *provider /Transfer/ ); @@ -50,8 +48,6 @@ in the registry). Adding a provider to the registry automatically triggers the providers QgsProcessingProvider.load() method to populate the provider with algorithms. -:rtype: bool - .. seealso:: :py:func:`removeProvider()` %End @@ -60,8 +56,6 @@ method to populate the provider with algorithms. Removes a provider implementation from the registry (the provider object is deleted). Returns false if the provider could not be removed (eg provider does not exist in the registry). -:rtype: bool - .. seealso:: :py:func:`addProvider()` %End @@ -70,24 +64,18 @@ Returns false if the provider could not be removed (eg provider does not exist i Removes a provider implementation from the registry (the provider object is deleted). Returns false if the provider could not be removed (eg provider does not exist in the registry). -:rtype: bool - .. seealso:: :py:func:`addProvider()` %End QgsProcessingProvider *providerById( const QString &id ); %Docstring Returns a matching provider by provider ID. - -:rtype: QgsProcessingProvider %End QList< const QgsProcessingAlgorithm *> algorithms() const; %Docstring Returns a list of all available algorithms from registered providers. -:rtype: list of const QgsProcessingAlgorithm - .. seealso:: :py:func:`algorithmById()` %End @@ -96,8 +84,6 @@ Returns a list of all available algorithms from registered providers. Finds an algorithm by its ID. If no matching algorithm is found, a None is returned. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`algorithms()` .. seealso:: :py:func:`createAlgorithmById()` @@ -115,8 +101,6 @@ and outputs according to this configuration. This is generally used only for algorithms in a model, allowing them to adjust their behavior at run time according to some user configuration. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`algorithms()` .. seealso:: :py:func:`algorithmById()` diff --git a/python/core/processing/qgsprocessingutils.sip b/python/core/processing/qgsprocessingutils.sip index 7f8911b95dce..5b62f5b94f01 100644 --- a/python/core/processing/qgsprocessingutils.sip +++ b/python/core/processing/qgsprocessingutils.sip @@ -33,8 +33,6 @@ framework. If the ``sort`` argument is true then the layers will be sorted by their QgsMapLayer.name() value. -:rtype: list of QgsRasterLayer - .. seealso:: :py:func:`compatibleVectorLayers()` .. seealso:: :py:func:`compatibleLayers()` @@ -54,8 +52,6 @@ list empty will cause all vector layers, regardless of their geometry type, to b If the ``sort`` argument is true then the layers will be sorted by their QgsMapLayer.name() value. -:rtype: list of QgsVectorLayer - .. seealso:: :py:func:`compatibleRasterLayers()` .. seealso:: :py:func:`compatibleLayers()` @@ -69,8 +65,6 @@ framework. If the ``sort`` argument is true then the layers will be sorted by their QgsMapLayer.name() value. -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`compatibleRasterLayers()` .. seealso:: :py:func:`compatibleVectorLayers()` @@ -86,8 +80,6 @@ within the context's project or temporary layer store then this layer will be re If the string is a file path and ``allowLoadingNewLayers`` is true, then the layer at this file path will be loaded and added to the context's temporary layer store. Ownership of the layer remains with the ``context`` or the context's current project. - -:rtype: QgsMapLayer %End static QgsProcessingFeatureSource *variantToSource( const QVariant &value, QgsProcessingContext &context, const QVariant &fallbackValue = QVariant() ) /Factory/; @@ -101,23 +93,17 @@ The optional ``fallbackValue`` can be used to specify a "default" value which is if ``value`` cannot be successfully converted to a source. This function creates a new object and the caller takes responsibility for deleting the returned object. - -:rtype: QgsProcessingFeatureSource %End static QString normalizeLayerSource( const QString &source ); %Docstring Normalizes a layer ``source`` string for safe comparison across different operating system environments. - -:rtype: str %End static QString stringToPythonLiteral( const QString &string ); %Docstring Converts a string to a Python string literal. E.g. by replacing ' with \'. - -:rtype: str %End @@ -158,8 +144,6 @@ SIP bindings. c++ code should call the other createFeatureSink() version. %Docstring Combines the extent of several map ``layers``. If specified, the target ``crs`` will be used to transform the layer's extent to the desired output reference system. - -:rtype: QgsRectangle %End static QVariant generateIteratingDestination( const QVariant &input, const QVariant &id, QgsProcessingContext &context ); @@ -168,16 +152,12 @@ Converts an ``input`` parameter value for use in source iterating mode, where on is created per input feature. The ``id`` parameter represents the unique ID for this output, which is embedded into the resulting parameter value. - -:rtype: QVariant %End static QString tempFolder(); %Docstring Returns a session specific processing temporary folder for use in processing algorithms. -:rtype: str - .. seealso:: :py:func:`generateTempFileName()` %End @@ -187,8 +167,6 @@ Returns a temporary filename for a given file, putting it into a temporary folder (creating that folder in the process), but not changing the ``basename``. -:rtype: str - .. seealso:: :py:func:`tempFolder()` %End @@ -196,8 +174,6 @@ but not changing the ``basename``. %Docstring Returns a HTML formatted version of the help text encoded in a variant ``map`` for a specified ``algorithm``. - -:rtype: str %End static QString convertToCompatibleFormat( const QgsVectorLayer *layer, @@ -218,8 +194,6 @@ in a temporary location using ``baseName``. The function will then return the pa The ``preferredFormat`` argument is used to specify to desired file extension to use when a temporary layer export is required. This defaults to shapefiles. - -:rtype: str %End static QgsFields combineFields( const QgsFields &fieldsA, const QgsFields &fieldsB ); @@ -229,8 +203,6 @@ Combines two field lists, avoiding duplicate field names (in a case-insensitive Duplicate field names will be altered to "name_2", "name_3", etc, finding the first non-duplicate name. -:rtype: QgsFields - .. note:: Some output file formats (e.g. shapefiles) have restrictions on the maximum @@ -277,8 +249,6 @@ If ``ownsOriginalSource`` is true, then this object will take ownership of ``ori Returns an iterator for the features in the source, respecting the supplied feature ``flags``. An optional ``request`` can be used to optimise the returned iterator, eg by restricting the returned attributes or geometry. - -:rtype: QgsFeatureIterator %End virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const; @@ -307,8 +277,6 @@ iterator, eg by restricting the returned attributes or geometry. QgsExpressionContextScope *createExpressionContextScope() const /Factory/; %Docstring Returns an expression context scope suitable for this source. - -:rtype: QgsExpressionContextScope %End }; diff --git a/python/core/providers/memory/qgsmemoryproviderutils.sip b/python/core/providers/memory/qgsmemoryproviderutils.sip index ebe8319adc65..ac71bbd400ad 100644 --- a/python/core/providers/memory/qgsmemoryproviderutils.sip +++ b/python/core/providers/memory/qgsmemoryproviderutils.sip @@ -30,12 +30,11 @@ Utility functions for use with the memory vector data provider. %Docstring Creates a new memory layer using the specified parameters. The caller takes responsibility for deleting the newly created layer. + :param name: layer name :param fields: fields for layer :param geometryType: optional layer geometry type :param crs: optional layer CRS for layers with geometry - -:rtype: QgsVectorLayer %End }; diff --git a/python/core/qgis.sip b/python/core/qgis.sip index 4b5394959ebd..8b205b4e8ad0 100644 --- a/python/core/qgis.sip +++ b/python/core/qgis.sip @@ -133,52 +133,43 @@ to account for differences in the default font sizes across different platforms. uint qHash( const QVariant &variant ); %Docstring Hash for QVariant - -:rtype: uint %End QString qgsDoubleToString( double a, int precision = 17 ); %Docstring Returns a string representation of a double + :param a: double value :param precision: number of decimal places to retain - -:rtype: str %End bool qgsDoubleNear( double a, double b, double epsilon = 4 * DBL_EPSILON ); %Docstring Compare two doubles (but allow some difference) + :param a: first double :param b: second double :param epsilon: maximum difference allowable between doubles - -:rtype: bool %End bool qgsFloatNear( float a, float b, float epsilon = 4 * FLT_EPSILON ); %Docstring Compare two floats (but allow some difference) + :param a: first float :param b: second float :param epsilon: maximum difference allowable between floats - -:rtype: bool %End bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 ); %Docstring Compare two doubles using specified number of significant digits - -:rtype: bool %End double qgsRound( double number, double places ); %Docstring Returns a double ``number``, rounded (as close as possible) to the specified number of ``places``. -:rtype: float - .. versionadded:: 3.0 %End @@ -188,12 +179,11 @@ double qgsPermissiveToDouble( QString string, bool &ok ); %Docstring Converts a string to a double in a permissive way, e.g., allowing for incorrect numbers of digits between thousand separators + :param string: string to convert :param ok: will be set to true if conversion was successful :return: string converted to double if possible -:rtype: float - .. versionadded:: 2.9 @@ -204,12 +194,11 @@ int qgsPermissiveToInt( QString string, bool &ok ); %Docstring Converts a string to an integer in a permissive way, e.g., allowing for incorrect numbers of digits between thousand separators + :param string: string to convert :param ok: will be set to true if conversion was successful :return: string converted to int if possible -:rtype: int - .. versionadded:: 2.9 @@ -222,8 +211,6 @@ Compares two QVariant values and returns whether the first is less than the seco Useful for sorting lists of variants, correctly handling sorting of the various QVariant data types (such as strings, numeric values, dates and times) -:rtype: bool - .. seealso:: :py:func:`qgsVariantGreaterThan()` %End @@ -233,16 +220,10 @@ Compares two QVariant values and returns whether the first is greater than the s Useful for sorting lists of variants, correctly handling sorting of the various QVariant data types (such as strings, numeric values, dates and times) -:rtype: bool - .. seealso:: :py:func:`qgsVariantLessThan()` %End QString qgsVsiPrefix( const QString &path ); -%Docstring - -:rtype: str -%End diff --git a/python/core/qgsaction.sip b/python/core/qgsaction.sip index fa178147ebda..d099043fd97c 100644 --- a/python/core/qgsaction.sip +++ b/python/core/qgsaction.sip @@ -61,23 +61,17 @@ Create a new QgsAction QString name() const; %Docstring The name of the action. This may be a longer description. - -:rtype: str %End QString shortTitle() const; %Docstring The short title is used to label user interface elements like buttons - -:rtype: str %End QUuid id() const; %Docstring Returns a unique id for this action. -:rtype: QUuid - .. versionadded:: 3.0 %End @@ -85,23 +79,17 @@ Returns a unique id for this action. %Docstring Returns true if this action was a default constructed one. -:rtype: bool - .. versionadded:: 3.0 %End QString iconPath() const; %Docstring The path to the icon - -:rtype: str %End QIcon icon() const; %Docstring The icon - -:rtype: QIcon %End QString command() const; @@ -110,8 +98,6 @@ Returns the command that is executed by this action. How the content is interpreted depends on the type() and the actionScope(). -:rtype: str - .. versionadded:: 3.0 %End @@ -119,30 +105,22 @@ the actionScope(). %Docstring Returns the notification message that triggers the action -:rtype: str - .. versionadded:: 3.0 %End ActionType type() const; %Docstring The action type - -:rtype: ActionType %End bool capture() const; %Docstring Whether to capture output for display when this action is run - -:rtype: bool %End bool runable() const; %Docstring Checks if the action is runable on the current platform - -:rtype: bool %End void run( QgsVectorLayer *layer, const QgsFeature &feature, const QgsExpressionContext &expressionContext ) const; @@ -165,8 +143,6 @@ The action scopes define where an action will be available. Action scopes may offer additional variables like the clicked coordinate. -:rtype: set of str - .. seealso:: :py:class:`QgsActionScope` .. versionadded:: 3.0 @@ -208,8 +184,6 @@ Sets an expression context scope to use for running the action. %Docstring Returns an expression context scope used for running the action. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End diff --git a/python/core/qgsactionmanager.sip b/python/core/qgsactionmanager.sip index e0e027c4c9c8..2420b7bf44a6 100644 --- a/python/core/qgsactionmanager.sip +++ b/python/core/qgsactionmanager.sip @@ -37,8 +37,6 @@ Will happily have duplicate names and actions. If capture is true, when running the action using doAction(), any stdout from the process will be captured and displayed in a dialog box. - -:rtype: QUuid %End QUuid addAction( QgsAction::ActionType type, const QString &name, const QString &command, const QString &icon, bool capture = false ); @@ -48,8 +46,6 @@ Will happily have duplicate names and actions. If capture is true, when running the action using doAction(), any stdout from the process will be captured and displayed in a dialog box. - -:rtype: QUuid %End void addAction( const QgsAction &action ); @@ -82,6 +78,7 @@ Does the given action. %Docstring Does the action using the expression engine to replace any embedded expressions in the action definition. + :param actionId: action id :param feature: feature to run action for :param context: expression context to evaluate expressions under @@ -97,38 +94,28 @@ Removes all actions Return a list of actions that are available in the given action scope. If no action scope is provided, all actions will be returned. -:rtype: list of QgsAction - .. versionadded:: 3.0 %End QgsVectorLayer *layer() const; %Docstring Return the layer - -:rtype: QgsVectorLayer %End bool writeXml( QDomNode &layer_node ) const; %Docstring Writes the actions out in XML format - -:rtype: bool %End bool readXml( const QDomNode &layer_node ); %Docstring Reads the actions in in XML format - -:rtype: bool %End QgsAction action( const QUuid &id ); %Docstring Get an action by its id. -:rtype: QgsAction - .. versionadded:: 3.0 %End @@ -145,8 +132,6 @@ file. Each scope can have a default action. This will be saved in the project file. -:rtype: QgsAction - .. versionadded:: 3.0 %End diff --git a/python/core/qgsactionscope.sip b/python/core/qgsactionscope.sip index 7e87136d68e4..1c4a6439bdcd 100644 --- a/python/core/qgsactionscope.sip +++ b/python/core/qgsactionscope.sip @@ -59,8 +59,6 @@ An expression scope may offer additional variables for an action scope. This can be an `field_name` for the attribute which was clicked or `clicked_x` and `clicked_y` for actions which are available as map canvas clicks. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End @@ -73,8 +71,6 @@ This can be an `field_name` for the attribute which was clicked or %Docstring A unique identifier for this action scope. -:rtype: str - .. versionadded:: 3.0 %End @@ -88,8 +84,6 @@ A unique identifier for this action scope. The title is a human readable and translated string that will be presented to the user in the properties dialog. -:rtype: str - .. versionadded:: 3.0 %End void setTitle( const QString &title ); @@ -103,8 +97,6 @@ The description should be a longer description of where actions in this scope are available. It is not necessary to list the available expression variables in here, they are extracted automatically from the expressionContextScope(). -:rtype: str - .. versionadded:: 3.0 %End void setDescription( const QString &description ); @@ -116,8 +108,6 @@ in here, they are extracted automatically from the expressionContextScope(). %Docstring Returns if this scope is valid. -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/core/qgsactionscoperegistry.sip b/python/core/qgsactionscoperegistry.sip index 3763c88698e7..e2321a10e1d0 100644 --- a/python/core/qgsactionscoperegistry.sip +++ b/python/core/qgsactionscoperegistry.sip @@ -43,8 +43,6 @@ to that one instead. %Docstring Get all registered action scopes. -:rtype: set of QgsActionScope - .. versionadded:: 3.0 %End @@ -66,8 +64,6 @@ Unregister an additional action scope. %Docstring Get an action scope by its id. -:rtype: QgsActionScope - .. versionadded:: 3.0 %End diff --git a/python/core/qgsaggregatecalculator.sip b/python/core/qgsaggregatecalculator.sip index d32b5b98c2fc..1f0633b08046 100644 --- a/python/core/qgsaggregatecalculator.sip +++ b/python/core/qgsaggregatecalculator.sip @@ -85,25 +85,26 @@ Delimiter to use for joining values with the StringConcatenate aggregate. QgsAggregateCalculator( const QgsVectorLayer *layer ); %Docstring Constructor for QgsAggregateCalculator. + :param layer: vector layer to calculate aggregate from %End const QgsVectorLayer *layer() const; %Docstring Returns the associated vector layer. - -:rtype: QgsVectorLayer %End void setParameters( const AggregateParameters ¶meters ); %Docstring Sets all aggregate parameters from a parameter bundle. + :param parameters: aggregate parameters %End void setFilter( const QString &filterExpression ); %Docstring Sets a filter to limit the features used during the aggregate calculation. + :param filterExpression: expression for filtering features, or empty string to remove filter .. seealso:: :py:func:`filter()` @@ -113,14 +114,13 @@ Sets a filter to limit the features used during the aggregate calculation. %Docstring Returns the filter which limits the features used during the aggregate calculation. -:rtype: str - .. seealso:: :py:func:`setFilter()` %End void setDelimiter( const QString &delimiter ); %Docstring Sets the delimiter to use for joining values with the StringConcatenate aggregate. + :param delimiter: string delimiter .. seealso:: :py:func:`delimiter()` @@ -130,8 +130,6 @@ Sets the delimiter to use for joining values with the StringConcatenate aggregat %Docstring Returns the delimiter used for joining values with the StringConcatenate aggregate. -:rtype: str - .. seealso:: :py:func:`setDelimiter()` %End @@ -139,6 +137,7 @@ Returns the delimiter used for joining values with the StringConcatenate aggrega QgsExpressionContext *context = 0, bool *ok = 0 ) const; %Docstring Calculates the value of an aggregate. + :param aggregate: aggregate to calculate :param fieldOrExpression: source field or expression to use as basis for aggregated values. If an expression is used, then the context parameter must be set. @@ -146,27 +145,22 @@ If an expression is used, then the context parameter must be set. :param ok: if specified, will be set to true if aggregate calculation was successful :return: calculated aggregate value -:rtype: QVariant - %End static Aggregate stringToAggregate( const QString &string, bool *ok = 0 ); %Docstring Converts a string to a aggregate type. + :param string: string to convert :param ok: if specified, will be set to true if conversion was successful :return: aggregate type -:rtype: Aggregate - %End static QList< QgsAggregateCalculator::AggregateInfo > aggregates(); %Docstring Structured information for available aggregates. -:rtype: list of QgsAggregateCalculator.AggregateInfo - .. versionadded:: 3.2 %End diff --git a/python/core/qgsanimatedicon.sip b/python/core/qgsanimatedicon.sip index f08303dc8c42..bc549d1e951d 100644 --- a/python/core/qgsanimatedicon.sip +++ b/python/core/qgsanimatedicon.sip @@ -27,8 +27,6 @@ Create a new animated icon. Optionally, the ``iconPath`` can already be specifie QString iconPath() const; %Docstring Path to a movie, e.g. animated GIF - -:rtype: str %End void setIconPath( const QString &iconPath ); @@ -41,8 +39,6 @@ Path to a movie, e.g. animated GIF Get the icons representation in the current frame. This will need to be called repeatedly, whenever a frameChanged() signal is emitted. - -:rtype: QIcon %End @@ -54,8 +50,6 @@ request the current icon and trigger UI updates. Connect to the frame changed signal with this method and not directly. This method makes sure the annimation is started. -:rtype: bool - .. versionadded:: 3.0 %End @@ -63,8 +57,6 @@ makes sure the annimation is started. %Docstring Convenience function to disconnect the same style that the frame change connection was established. -:rtype: bool - .. versionadded:: 3.0 %End @@ -73,8 +65,6 @@ Convenience function to disconnect the same style that the frame change connecti %Docstring The native width of the icon. -:rtype: int - .. versionadded:: 3.0 %End @@ -82,8 +72,6 @@ The native width of the icon. %Docstring The native height of the icon. -:rtype: int - .. versionadded:: 3.0 %End diff --git a/python/core/qgsapplication.sip b/python/core/qgsapplication.sip index 83e305db909d..042a88da556d 100644 --- a/python/core/qgsapplication.sip +++ b/python/core/qgsapplication.sip @@ -107,8 +107,6 @@ to change due to centralization. %Docstring Returns the singleton instance of the QgsApplication. -:rtype: QgsApplication - .. versionadded:: 3.0 %End @@ -117,16 +115,12 @@ Returns the singleton instance of the QgsApplication. %Docstring Watch for QFileOpenEvent. - -:rtype: bool %End virtual bool notify( QObject *receiver, QEvent *event ); %Docstring Catch exceptions when sending event to receiver. - -:rtype: bool %End static void setFileOpenEventReceiver( QObject *receiver ); @@ -156,8 +150,6 @@ The theme name should be a single word e.g. 'default','classic'. The theme search path usually will be pkgDataPath + "/themes/" + themName + "/" but plugin writers etc can use this method as a basis for searching for resources in their own datastores e.g. a Qt4 resource bundle. - -:rtype: str %End static void setUITheme( const QString &themeName ); @@ -165,6 +157,7 @@ for resources in their own datastores e.g. a Qt4 resource bundle. Set the current UI theme used to style the interface. Use uiThemes() to find valid themes to use. Variables found in variables.qss will be added to the stylesheet on load. + :param themeName: The name of the theme. .. note:: @@ -177,8 +170,6 @@ on load. All themes found in ~/.qgis3/themes folder. The path is to the root folder for the theme -:rtype: QHash - .. note:: Valid theme folders must contain a style.qss file. @@ -189,8 +180,6 @@ The path is to the root folder for the theme static QString authorsFilePath(); %Docstring Returns the path to the authors file. - -:rtype: str %End static QString contributorsFilePath(); @@ -198,8 +187,6 @@ Returns the path to the authors file. Returns the path to the contributors file. Contributors are people who have submitted patches but don't have commit access. * - -:rtype: str %End static QString developersMapFilePath(); @@ -208,181 +195,131 @@ Returns the path to the developers map file. The developers map was created by using leaflet framework, it shows the doc/contributors.json file. -:rtype: str - .. versionadded:: 2.7 %End static QString sponsorsFilePath(); %Docstring Returns the path to the sponsors file. - -:rtype: str %End static QString donorsFilePath(); %Docstring Returns the path to the donors file. - -:rtype: str %End static QString serverResourcesPath(); %Docstring Returns the path to the server resources directory. - -:rtype: str %End static QString translatorsFilePath(); %Docstring Returns the path to the sponsors file. - -:rtype: str %End static QString licenceFilePath(); %Docstring Returns the path to the licence file. - -:rtype: str %End static QString i18nPath(); %Docstring Returns the path to the translation directory. - -:rtype: str %End static QString metadataPath(); %Docstring Returns the path to the metadata directory. -:rtype: str - .. versionadded:: 3.0 %End static QString qgisMasterDatabaseFilePath(); %Docstring Returns the path to the master qgis.db file. - -:rtype: str %End static QString qgisSettingsDirPath(); %Docstring Returns the path to the settings directory in user's home dir - -:rtype: str %End static QString qgisUserDatabaseFilePath(); %Docstring Returns the path to the user qgis.db file. - -:rtype: str %End static QString qgisAuthDatabaseFilePath(); %Docstring Returns the path to the user authentication database file: qgis-auth.db. - -:rtype: str %End static QString splashPath(); %Docstring Returns the path to the splash screen image directory. - -:rtype: str %End static QString iconsPath(); %Docstring Returns the path to the icons image directory. - -:rtype: str %End static QString srsDatabaseFilePath(); %Docstring Returns the path to the srs.db file. - -:rtype: str %End static QStringList svgPaths(); %Docstring Returns the paths to svg directories. - -:rtype: list of str %End static QStringList composerTemplatePaths(); %Docstring Returns the paths to composer template directories - -:rtype: list of str %End static QMap systemEnvVars(); %Docstring Returns the system environment variables passed to application. - -:rtype: QMap %End static QString prefixPath(); %Docstring Returns the path to the application prefix directory. - -:rtype: str %End static QString pluginPath(); %Docstring Returns the path to the application plugin directory. - -:rtype: str %End static QString pkgDataPath(); %Docstring Returns the common root path of all application data directories. - -:rtype: str %End static QString activeThemePath(); %Docstring Returns the path to the currently active theme directory. - -:rtype: str %End static QString defaultThemePath(); %Docstring Returns the path to the default theme directory. - -:rtype: str %End static QString iconPath( const QString &iconFile ); %Docstring Returns path to the desired icon file. First it tries to use the active theme path, then default theme path - -:rtype: str %End static QIcon getThemeIcon( const QString &name ); %Docstring Helper to get a theme icon. It will fall back to the default theme if the active theme does not have the required icon. - -:rtype: QIcon %End enum Cursor @@ -402,38 +339,28 @@ Helper to get a theme cursor. It will fall back to the default theme if the active theme does not have the required icon. Cursors are automatically scaled to look like a 16px cursor on 96dpi screens. - -:rtype: QCursor %End static QPixmap getThemePixmap( const QString &name ); %Docstring Helper to get a theme icon as a pixmap. It will fall back to the default theme if the active theme does not have the required icon. - -:rtype: QPixmap %End static QString userStylePath(); %Docstring Returns the path to user's style. - -:rtype: str %End static QRegExp shortNameRegExp(); %Docstring Returns the short name regular expression for line edit validator - -:rtype: QRegExp %End static QString userLoginName(); %Docstring Returns the user's operating system login account name. -:rtype: str - .. versionadded:: 2.14 .. seealso:: :py:func:`userFullName()` @@ -443,8 +370,6 @@ Returns the user's operating system login account name. %Docstring Returns the user's operating system login account full display name. -:rtype: str - .. versionadded:: 2.14 .. seealso:: :py:func:`userLoginName()` @@ -454,8 +379,6 @@ Returns the user's operating system login account full display name. %Docstring Returns a string name of the operating system QGIS is running on. -:rtype: str - .. versionadded:: 2.14 .. seealso:: :py:func:`platform()` @@ -465,8 +388,6 @@ Returns a string name of the operating system QGIS is running on. %Docstring Returns the QGIS platform name, e.g., "desktop" or "server". -:rtype: str - .. versionadded:: 2.14 .. seealso:: :py:func:`osName()` @@ -476,44 +397,32 @@ Returns the QGIS platform name, e.g., "desktop" or "server". %Docstring Returns the QGIS locale. -:rtype: str - .. versionadded:: 3.0 %End static QString userThemesFolder(); %Docstring Returns the path to user's themes folder - -:rtype: str %End static QString defaultStylePath(); %Docstring Returns the path to default style (works as a starting point). - -:rtype: str %End static QString defaultThemesFolder(); %Docstring Returns the path to default themes folder from install (works as a starting point). - -:rtype: str %End static QString libraryPath(); %Docstring Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries - -:rtype: str %End static QString libexecPath(); %Docstring Returns the path with utility executables (help viewer, crssync, ...) - -:rtype: str %End static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false ); @@ -549,15 +458,11 @@ loads providers static bool createDatabase( QString *errorMessage = 0 ); %Docstring initialize qgis.db - -:rtype: bool %End static bool createThemeFolder(); %Docstring Create the users theme folder - -:rtype: bool %End static void exitQgis(); @@ -568,8 +473,6 @@ deletes provider registry and map layer registry static QString appIconPath(); %Docstring get application icon - -:rtype: str %End enum endian_t @@ -581,8 +484,6 @@ get application icon static endian_t endian(); %Docstring Returns whether this machine uses big or little endian - -:rtype: endian_t %End @@ -594,8 +495,6 @@ QString myStyle = QgsApplication.reportStyleSheet(); textBrowserReport->document()->setDefaultStyleSheet(myStyle); :return: QString containing the CSS 2.1 compliant stylesheet. -:rtype: str - .. note:: @@ -607,8 +506,6 @@ the gradient fills for backgrounds. %Docstring Convenience function to get a summary of the paths used in this application instance useful for debugging mainly.* - -:rtype: str %End static void registerOgrDrivers(); @@ -623,33 +520,23 @@ times. static QString absolutePathToRelativePath( const QString &apath, const QString &targetPath ); %Docstring Converts absolute path to path relative to target - -:rtype: str %End static QString relativePathToAbsolutePath( const QString &rpath, const QString &targetPath ); %Docstring Converts path relative to target to an absolute path - -:rtype: str %End static bool isRunningFromBuildDir(); %Docstring Indicates whether running from build directory (not installed) - -:rtype: bool %End static QString buildSourcePath(); %Docstring Returns path to the source directory. Valid only when running from build directory - -:rtype: str %End static QString buildOutputPath(); %Docstring Returns path to the build output directory. Valid only when running from build directory - -:rtype: str %End static void skipGdalDriver( const QString &driver ); @@ -670,8 +557,6 @@ driver name should be the short format of the Gdal driver name e.g. GTIFF. %Docstring Returns the list of gdal drivers that should be skipped (based on GDAL_SKIP environment variable) - -:rtype: list of str %End static void applyGdalSkippedDrivers(); @@ -689,8 +574,6 @@ Apply the skipped drivers list to gdal %Docstring Get maximum concurrent thread count -:rtype: int - .. versionadded:: 2.4 %End @@ -710,8 +593,6 @@ Set maximum concurrent thread count Returns the application's task manager, used for managing application wide background task handling. -:rtype: QgsTaskManager - .. versionadded:: 3.0 %End @@ -719,8 +600,6 @@ wide background task handling. %Docstring Returns the application's color scheme registry, used for managing color schemes. -:rtype: QgsColorSchemeRegistry - .. versionadded:: 3.0 %End @@ -728,8 +607,6 @@ Returns the application's color scheme registry, used for managing color schemes %Docstring Returns the application's paint effect registry, used for managing paint effects. -:rtype: QgsPaintEffectRegistry - .. versionadded:: 3.0 %End @@ -737,8 +614,6 @@ Returns the application's paint effect registry, used for managing paint effects %Docstring Returns the application's renderer registry, used for managing vector layer renderers. -:rtype: QgsRendererRegistry - .. versionadded:: 3.0 %End @@ -748,8 +623,6 @@ Returns the application's renderer registry, used for managing vector layer rend Returns the application's data item provider registry, which keeps a list of data item providers that may add items to the browser tree. -:rtype: QgsDataItemProviderRegistry - .. versionadded:: 3.0 %End @@ -758,8 +631,6 @@ providers that may add items to the browser tree. Returns the application's SVG cache, used for caching SVG images and handling parameter replacement within SVG files. -:rtype: QgsSvgCache - .. versionadded:: 3.0 %End @@ -767,8 +638,6 @@ within SVG files. %Docstring Returns the application's symbol layer registry, used for managing symbol layers. -:rtype: QgsSymbolLayerRegistry - .. versionadded:: 3.0 %End @@ -776,8 +645,6 @@ Returns the application's symbol layer registry, used for managing symbol layers %Docstring Returns the application's layout item registry, used for layout item types. -:rtype: QgsLayoutItemRegistry - .. versionadded:: 3.0 %End @@ -785,8 +652,6 @@ Returns the application's layout item registry, used for layout item types. %Docstring Returns the application's GPS connection registry, used for managing GPS connections. -:rtype: QgsGPSConnectionRegistry - .. versionadded:: 3.0 %End @@ -794,8 +659,6 @@ Returns the application's GPS connection registry, used for managing GPS connect %Docstring Returns the application's plugin layer registry, used for managing plugin layer types. -:rtype: QgsPluginLayerRegistry - .. versionadded:: 3.0 %End @@ -803,8 +666,6 @@ Returns the application's plugin layer registry, used for managing plugin layer %Docstring Returns the application's message log. -:rtype: QgsMessageLog - .. versionadded:: 3.0 %End @@ -812,8 +673,6 @@ Returns the application's message log. %Docstring Returns the application's authentication manager instance -:rtype: QgsAuthManager - .. note:: this can be a null pointer if called before initQgis @@ -828,8 +687,6 @@ Returns the application's authentication manager instance Returns the application's processing registry, used for managing processing providers, algorithms, and various parameters and outputs. -:rtype: QgsProcessingRegistry - .. versionadded:: 3.0 %End @@ -837,8 +694,6 @@ algorithms, and various parameters and outputs. %Docstring Returns the application's page size registry, used for managing layout page sizes. -:rtype: QgsPageSizeRegistry - .. versionadded:: 3.0 %End @@ -847,8 +702,6 @@ Returns the application's page size registry, used for managing layout page size %Docstring Returns the action scope registry. -:rtype: QgsActionScopeRegistry - .. versionadded:: 3.0 %End @@ -856,24 +709,18 @@ Returns the action scope registry. %Docstring Returns the application runtime profiler. -:rtype: QgsRuntimeProfiler - .. versionadded:: 3.0 %End static QgsFieldFormatterRegistry *fieldFormatterRegistry(); %Docstring Get the registry of available field formatters. - -:rtype: QgsFieldFormatterRegistry %End static Qgs3DRendererRegistry *renderer3DRegistry(); %Docstring Returns registry of available 3D renderers. -:rtype: Qgs3DRendererRegistry - .. note:: not available in Python bindings @@ -889,8 +736,6 @@ In general, when passing values around, prefer to use a null QVariant `QVariant( field.type() )` or `QVariant( QVariant.Int )`. This value should only be used in the final presentation step when showing values in a widget or sending it to a web browser. - -:rtype: str %End static void setNullRepresentation( const QString &nullRepresentation ); @@ -903,8 +748,6 @@ in a widget or sending it to a web browser. Custom expression variables for this application. This does not include generated variables (like system name, user name etc.) -:rtype: QVariantMap - .. seealso:: :py:func:`QgsExpressionContextUtils.globalVariables()` .. versionadded:: 3.0 @@ -931,10 +774,6 @@ Set a single custom expression variable. %If (ANDROID) //dummy method to workaround sip generation issue bool x11EventFilter( XEvent *event ); -%Docstring - -:rtype: bool -%End %End signals: diff --git a/python/core/qgsarchive.sip b/python/core/qgsarchive.sip index 6e5483c0a791..ed14bb2566b2 100644 --- a/python/core/qgsarchive.sip +++ b/python/core/qgsarchive.sip @@ -41,22 +41,20 @@ Destructor bool zip( const QString &zipFilename ); %Docstring Zip the content of this archive + :param zipFilename: The name of the zip to generate :return: false if something goes wrong, true otherwise -:rtype: bool - %End virtual bool unzip( const QString &zipFilename ); %Docstring Clear the current content of this archive and unzip. Files are unzipped in the temporary directory. + :param zipFilename: The zip file to unzip :return: true if unzip action is a success, false otherwise -:rtype: bool - %End void clear(); @@ -69,31 +67,27 @@ directory. %Docstring Add a new file to this archive. During a zip action, this file will be part of the resulting zipped file. + :param filename: A file to add when zipping this archive %End bool removeFile( const QString &filename ); %Docstring Remove a file from this archive and from the filesystem. + :param filename: The path of the file to remove :return: true if the file has been removed from the filesystem, false otherwise -:rtype: bool - %End QStringList files() const; %Docstring Returns the list of files within this archive - -:rtype: list of str %End QString dir() const; %Docstring Returns the current temporary directory. - -:rtype: str %End }; @@ -117,18 +111,15 @@ class QgsProjectArchive : QgsArchive Clear the current content of this archive and unzip. If a project file is found in the content, then this archive may be considered as a valid one. Files are unzipped in the temporary directory. + :param zipFilename: The zip file to unzip :return: true if a project file has been found, false otherwise -:rtype: bool - %End QString projectFile() const; %Docstring Returns the current .qgs project file or an empty string if there's none - -:rtype: str %End bool clearProjectFile(); @@ -136,16 +127,12 @@ Returns the current .qgs project file or an empty string if there's none Remove the current .qgs project file from the temporary directory. :return: true if the file is well removed, false otherwise -:rtype: bool - %End QString auxiliaryStorageFile() const; %Docstring Returns the current .qgd auxiliary storage file or an empty string if there's none - -:rtype: str %End }; diff --git a/python/core/qgsattributeeditorelement.sip b/python/core/qgsattributeeditorelement.sip index 7f5ccfe002e1..2a82a28088ef 100644 --- a/python/core/qgsattributeeditorelement.sip +++ b/python/core/qgsattributeeditorelement.sip @@ -66,8 +66,6 @@ Constructor Return the name of this element :return: The name for this element -:rtype: str - %End AttributeEditorType type() const; @@ -75,16 +73,12 @@ Return the name of this element The type of this element :return: The type -:rtype: AttributeEditorType - %End QgsAttributeEditorElement *parent() const; %Docstring Get the parent of this element. -:rtype: QgsAttributeEditorElement - .. versionadded:: 3.0 %End @@ -95,16 +89,12 @@ Get the XML Dom element to save this element. :param doc: The QDomDocument which is used to create new XML elements :return: A DOM element to serialize this element -:rtype: QDomElement - %End virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const = 0 /Factory/; %Docstring Returns a clone of this element. To be implemented by subclasses. -:rtype: QgsAttributeEditorElement - .. versionadded:: 3.0 %End @@ -112,8 +102,6 @@ Returns a clone of this element. To be implemented by subclasses. %Docstring Controls if this element should be labeled with a title (field, relation or groupname). -:rtype: bool - .. versionadded:: 2.18 %End @@ -171,8 +159,6 @@ Determines if this container is rendered as collapsible group box or tab in a ta Returns if this container is going to be rendered as a group box :return: True if it will be a group box, false if it will be a tab -:rtype: bool - %End QList children() const; @@ -180,8 +166,6 @@ Returns if this container is going to be rendered as a group box Get a list of the children elements of this container :return: A list of elements -:rtype: list of QgsAttributeEditorElement - %End virtual QList findElements( AttributeEditorType type ) const; @@ -191,8 +175,6 @@ Traverses the element tree to find any element of the specified type :param type: The type which should be searched :return: A list of elements of the type which has been searched for -:rtype: list of QgsAttributeEditorElement - %End void clear(); @@ -208,8 +190,6 @@ Change the name of this container int columnCount() const; %Docstring Get the number of columns in this group - -:rtype: int %End void setColumnCount( int columnCount ); @@ -222,8 +202,6 @@ Set the number of columns in this group %Docstring Creates a deep copy of this element. To be implemented by subclasses. -:rtype: QgsAttributeEditorElement - .. versionadded:: 3.0 %End @@ -233,8 +211,6 @@ The visibility expression is used in the attribute form to show or hide this container based on an expression incorporating the field value controlled by editor widgets. -:rtype: QgsOptionalExpression - .. versionadded:: 3.0 %End @@ -274,8 +250,6 @@ Creates a new attribute editor element which represents a field Return the index of the field :return: -:rtype: int - %End virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const /Factory/; @@ -317,8 +291,6 @@ Creates a new element which embeds a relation. Get the id of the relation which shall be embedded :return: the id -:rtype: QgsRelation - %End bool init( QgsRelationManager *relManager ); @@ -328,8 +300,6 @@ Initializes the relation from the id :param relManager: The relation manager to use for the initialization :return: true if the relation was found in the relationmanager -:rtype: bool - %End virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const /Factory/; @@ -339,8 +309,6 @@ Initializes the relation from the id %Docstring Determines if the "link feature" button should be shown -:rtype: bool - .. versionadded:: 2.18 %End @@ -355,8 +323,6 @@ Determines if the "link feature" button should be shown %Docstring Determines if the "unlink feature" button should be shown -:rtype: bool - .. versionadded:: 2.18 %End diff --git a/python/core/qgsattributetableconfig.sip b/python/core/qgsattributetableconfig.sip index 3eaf8aa94490..3580fc930856 100644 --- a/python/core/qgsattributetableconfig.sip +++ b/python/core/qgsattributetableconfig.sip @@ -59,25 +59,20 @@ Constructor for QgsAttributeTableConfig. %Docstring Get the list with all columns and their configuration. The list order defines the order of appearance. - -:rtype: list of QgsAttributeTableConfig.ColumnConfig %End bool isEmpty() const; %Docstring Returns true if the configuration is empty, ie it contains no columns. - -:rtype: bool %End int mapVisibleColumnToIndex( int visibleColumn ) const; %Docstring Maps a visible column index to its original column index. + :param visibleColumn: index of visible column :return: corresponding index when hidden columns are considered -:rtype: int - %End void setColumns( const QVector &columns ); @@ -97,8 +92,6 @@ fields but not in the configuration will be appended. bool actionWidgetVisible() const; %Docstring Returns true if the action widget is visible - -:rtype: bool %End void setActionWidgetVisible( bool visible ); @@ -109,8 +102,6 @@ Set if the action widget is visible ActionWidgetStyle actionWidgetStyle() const; %Docstring Get the style of the action widget - -:rtype: ActionWidgetStyle %End void setActionWidgetStyle( ActionWidgetStyle actionWidgetStyle ); @@ -131,8 +122,6 @@ Deserialize to XML on layer load QString sortExpression() const; %Docstring Get the expression used for sorting. - -:rtype: str %End void setSortExpression( const QString &sortExpression ); @@ -143,9 +132,8 @@ Set the sort expression used for sorting. int columnWidth( int column ) const; %Docstring Returns the width of a column, or -1 if column should use default width. -:param column: column index -:rtype: int +:param column: column index .. seealso:: :py:func:`setColumnWidth()` %End @@ -153,6 +141,7 @@ Returns the width of a column, or -1 if column should use default width. void setColumnWidth( int column, int width ); %Docstring Sets the width of a column. + :param column: column index :param width: column width in pixels, or -1 if column should use default width @@ -162,9 +151,8 @@ Sets the width of a column. bool columnHidden( int column ) const; %Docstring Returns true if the specified column is hidden. -:param column: column index -:rtype: bool +:param column: column index .. seealso:: :py:func:`setColumnHidden()` %End @@ -172,6 +160,7 @@ Returns true if the specified column is hidden. void setColumnHidden( int column, bool hidden ); %Docstring Sets whether the specified column should be hidden. + :param column: column index :param hidden: set to true to hide column @@ -182,8 +171,6 @@ Sets whether the specified column should be hidden. %Docstring Get the sort order -:rtype: Qt.SortOrder - .. versionadded:: 2.16 %End diff --git a/python/core/qgsauxiliarystorage.sip b/python/core/qgsauxiliarystorage.sip index 446e30f6ef82..a4ef13714d0f 100644 --- a/python/core/qgsauxiliarystorage.sip +++ b/python/core/qgsauxiliarystorage.sip @@ -62,8 +62,6 @@ is duplicate for the layer given in parameter. Note that the current auxiliary layer should be saved to have a proper duplicated table. :param layer: The layer for which the clone is made - -:rtype: QgsAuxiliaryLayer %End QgsVectorLayer *toSpatialLayer() const; @@ -72,8 +70,6 @@ An auxiliary layer is not spatial. This method returns a spatial representation of auxiliary data. :return: A new spatial vector layer -:rtype: QgsVectorLayer - %End bool clear(); @@ -82,15 +78,11 @@ Deletes all features from the layer. Changes are automatically committed and the layer remains editable. :return: true if changes are committed without error, false otherwise. -:rtype: bool - %End QgsVectorLayerJoinInfo joinInfo() const; %Docstring Returns information to use for joining with primary key and so on. - -:rtype: QgsVectorLayerJoinInfo %End bool exists( const QgsPropertyDefinition &definition ) const; @@ -101,8 +93,6 @@ otherwise. :param definition: The property definition to check :return: true if the property is stored, false otherwise -:rtype: bool - %End bool addAuxiliaryField( const QgsPropertyDefinition &definition ); @@ -114,15 +104,11 @@ table config to hide auxiliary fields by default. :param definition: The definition of the property to add :return: true if the auxiliary field is well added, false otherwise -:rtype: bool - %End QgsFields auxiliaryFields() const; %Docstring Returns a list of all auxiliary fields currently managed by the layer. - -:rtype: QgsFields %End bool save(); @@ -130,8 +116,6 @@ Returns a list of all auxiliary fields currently managed by the layer. Commits changes and starts editing then. :return: true if commit step passed, false otherwise -:rtype: bool - %End virtual bool deleteAttribute( int attr ); @@ -143,8 +127,6 @@ editable. :param attr: The index of the attribute to remove :return: true if the attribute is well deleted, false otherwise -:rtype: bool - %End bool isHiddenProperty( int index ) const; @@ -153,8 +135,6 @@ Returns true if the underlying field has to be hidden from editing tools like attribute table, false otherwise. :param index: The index of the field for which visibility is checked - -:rtype: bool %End int indexOfPropertyDefinition( const QgsPropertyDefinition &definition ) const; @@ -165,8 +145,6 @@ definition. :param definition: The property definition :return: The index of the field corresponding to the property or -1 -:rtype: int - %End int propertyFromIndex( int index ) const; @@ -177,8 +155,6 @@ property definition of the field. The key -1 is returned if an error happened. :param index: The index of the field - -:rtype: int %End QgsPropertyDefinition propertyDefinitionFromIndex( int index ) const; @@ -186,8 +162,6 @@ happened. Returns the property definition for the underlying field index. :param index: The index of the field - -:rtype: QgsPropertyDefinition %End static int createProperty( QgsPalLayerSettings::Property property, QgsVectorLayer *vlayer ); @@ -199,8 +173,6 @@ activates this property in settings. :param vlayer: The vector layer :return: The index of the auxiliary field or -1 -:rtype: int - %End static int createProperty( QgsDiagramLayerSettings::Property property, QgsVectorLayer *vlayer ); @@ -212,8 +184,6 @@ activates this property in settings. :param vlayer: The vector layer :return: The index of the auxiliary field or -1 -:rtype: int - %End static QgsField createAuxiliaryField( const QgsPropertyDefinition &definition ); @@ -221,8 +191,6 @@ activates this property in settings. Creates a new auxiliary field from a property definition. :param definition: The property definition of the auxiliary field to create - -:rtype: QgsField %End static QgsField createAuxiliaryField( const QgsField &field ); @@ -230,8 +198,6 @@ Creates a new auxiliary field from a property definition. Creates a new auxiliary field from a field. :param field: The field to use to create the auxiliary field - -:rtype: QgsField %End static QString nameFromProperty( const QgsPropertyDefinition &def, bool joined = false ); @@ -240,8 +206,6 @@ Returns the name of the auxiliary field for a property definition. :param def: The property definition :param joined: The join prefix is taken into account if true - -:rtype: str %End static QgsPropertyDefinition propertyDefinitionFromField( const QgsField &field ); @@ -249,8 +213,6 @@ Returns the name of the auxiliary field for a property definition. Returns the property definition from an auxiliary field. :param field: The auxiliary field - -:rtype: QgsPropertyDefinition %End }; @@ -317,23 +279,17 @@ Destructor. Returns the status of the auxiliary storage currently defined. :return: true if the auxiliary storage is valid, false otherwise -:rtype: bool - %End QString fileName() const; %Docstring Returns the target filename of the database. - -:rtype: str %End QString currentFileName() const; %Docstring Returns the path of the current database used. It may be different from the target filename if the auxiliary storage is opened in copy mode. - -:rtype: str %End bool saveAs( const QString &filename ) const; @@ -341,8 +297,6 @@ the target filename if the auxiliary storage is opened in copy mode. Saves the current database to a new path. :return: true if everything is saved, false otherwise -:rtype: bool - %End bool saveAs( const QgsProject &project ) const; @@ -352,8 +306,6 @@ Actually, the current filename of the project is used to deduce the path of the database to save. :return: true if everything is saved, false otherwise -:rtype: bool - %End bool save() const; @@ -361,8 +313,6 @@ path of the database to save. Saves the current database. :return: true if everything is saved, false otherwise -:rtype: bool - %End QgsAuxiliaryLayer *createAuxiliaryLayer( const QgsField &field, QgsVectorLayer *layer ) const /Factory/; @@ -375,8 +325,6 @@ given in parameter. :param layer: The vector layer for which the auxiliary layer has to be created :return: A new auxiliary layer or a None if an error happened. -:rtype: QgsAuxiliaryLayer - %End static bool deleteTable( const QgsDataSourceUri &uri ); @@ -386,8 +334,6 @@ Removes a table from the auxiliary storage. :param uri: The uri of the table to remove :return: true if the table is well deleted, false otherwise -:rtype: bool - %End static bool duplicateTable( const QgsDataSourceUri &uri, const QString &newTable ); @@ -398,15 +344,11 @@ Duplicates a table and its content. :param newTable: The name of the new table :return: true if the table is well duplicated, false otherwise -:rtype: bool - %End static QString extension(); %Docstring Returns the extension used for auxiliary databases. - -:rtype: str %End }; diff --git a/python/core/qgsbearingutils.sip b/python/core/qgsbearingutils.sip index 80d380a50463..2aacf9bf52b3 100644 --- a/python/core/qgsbearingutils.sip +++ b/python/core/qgsbearingutils.sip @@ -29,8 +29,6 @@ Utilities for calculating bearings and directions. Returns the direction to true north from a specified point and for a specified coordinate reference system. The returned value is in degrees clockwise from vertical. An exception will be thrown if the bearing could not be calculated. - -:rtype: float %End }; diff --git a/python/core/qgsbrowsermodel.sip b/python/core/qgsbrowsermodel.sip index 7916a7b83c7c..14c63320caa1 100644 --- a/python/core/qgsbrowsermodel.sip +++ b/python/core/qgsbrowsermodel.sip @@ -31,8 +31,6 @@ class QgsBrowserModel : QAbstractItemModel %Docstring Used by other components to obtain information about each item provided by the model. In many models, the combination of flags should include Qt.ItemIsEnabled and Qt.ItemIsSelectable. * - -:rtype: Qt.ItemFlags %End virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const; @@ -42,8 +40,6 @@ Used to supply item data to views and delegates. Generally, models only need to for Qt.DisplayRole and any application-specific user roles, but it is also good practice to provide data for Qt.ToolTipRole, Qt.AccessibleTextRole, and Qt.AccessibleDescriptionRole. See the Qt.ItemDataRole enum documentation for information about the types associated with each role. * - -:rtype: QVariant %End virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; @@ -51,16 +47,12 @@ See the Qt.ItemDataRole enum documentation for information about the types assoc %Docstring Provides views with information to show in their headers. The information is only retrieved by views that can display header information. * - -:rtype: QVariant %End virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const; %Docstring Provides the number of rows of data exposed by the model. - -:rtype: int %End virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const; @@ -68,62 +60,42 @@ Provides the number of rows of data exposed by the model. %Docstring Provides the number of columns of data exposed by the model. List models do not provide this function because it is already implemented in QAbstractListModel. * - -:rtype: int %End virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; %Docstring Returns the index of the item in the model specified by the given row, column and parent index. - -:rtype: QModelIndex %End QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const; -%Docstring - -:rtype: QModelIndex -%End virtual QModelIndex parent( const QModelIndex &index ) const; %Docstring Returns the parent of the model item with the given index. If the item has no parent, an invalid QModelIndex is returned. - -:rtype: QModelIndex %End virtual QStringList mimeTypes() const; %Docstring Returns a list of mime that can describe model indexes - -:rtype: list of str %End virtual QMimeData *mimeData( const QModelIndexList &indexes ) const; %Docstring Returns an object that contains serialized items of data corresponding to the list of indexes specified - -:rtype: QMimeData %End virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent ); %Docstring Handles the data supplied by a drag and drop operation that ended with the given action - -:rtype: bool %End QgsDataItem *dataItem( const QModelIndex &idx ) const; -%Docstring - -:rtype: QgsDataItem -%End virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const; @@ -142,13 +114,12 @@ Refresh item children %Docstring Return index of item with given path. It only searches in currently fetched items, i.e. it does not fetch children. + :param path: item path :param matchFlag: supported is Qt.MatchExactly and Qt.MatchStartsWith which has reverse meaning, i.e. find item with the longest match from start with path (to get as close/deep as possible to deleted item). :return: model index, invalid if item not found * -:rtype: QModelIndex - %End @@ -162,8 +133,6 @@ item with the longest match from start with path (to get as close/deep as possib bool initialized( ) const; %Docstring Returns true if the model has been initialized - -:rtype: bool %End signals: diff --git a/python/core/qgscachedfeatureiterator.sip b/python/core/qgscachedfeatureiterator.sip index 5ad62d43719a..018c30caf167 100644 --- a/python/core/qgscachedfeatureiterator.sip +++ b/python/core/qgscachedfeatureiterator.sip @@ -35,8 +35,6 @@ This constructor creates a feature iterator, that delivers all cached features. Rewind to the beginning of the iterator :return: bool true if the operation was OK -:rtype: bool - %End virtual bool close(); @@ -45,8 +43,6 @@ Rewind to the beginning of the iterator Close this iterator. No further features will be available. :return: true if successful -:rtype: bool - %End protected: @@ -59,8 +55,6 @@ Implementation for fetching a feature. :param f: Will write to this feature :return: bool true if the operation was OK -:rtype: bool - .. seealso:: :py:func:`bool` %End @@ -72,8 +66,6 @@ We have a local special iterator for FilterFids, no need to run the generic. :param f: Will write to this feature :return: bool true if the operation was OK -:rtype: bool - %End }; @@ -104,8 +96,6 @@ This constructor creates a feature iterator, which queries the backend and cache Rewind to the beginning of the iterator :return: bool true if the operation was OK -:rtype: bool - %End virtual bool close(); @@ -114,8 +104,6 @@ Rewind to the beginning of the iterator Close this iterator. No further features will be available. :return: true if successful -:rtype: bool - %End protected: @@ -128,8 +116,6 @@ Implementation for fetching a feature. :param f: Will write to this feature :return: bool true if the operation was OK -:rtype: bool - .. seealso:: :py:func:`bool` %End diff --git a/python/core/qgscacheindex.sip b/python/core/qgscacheindex.sip index d41b7fc8bd60..ddbb67eb9b0d 100644 --- a/python/core/qgscacheindex.sip +++ b/python/core/qgscacheindex.sip @@ -64,8 +64,6 @@ value is true. :param featureRequest: The feature request, for which this index is queried. :return: True, if this index holds the information to answer the request. -:rtype: bool - %End }; diff --git a/python/core/qgscadutils.sip b/python/core/qgscadutils.sip index e9a5fa14377b..13654eac6207 100644 --- a/python/core/qgscadutils.sip +++ b/python/core/qgscadutils.sip @@ -110,8 +110,6 @@ Angle (in degrees) to which we have soft-locked ourselves (if not set it is -1) Applies X/Y/angle/distance constraints from the given context to a map point. Returns a structure containing aligned map point, whether the constraints are valid and some extra information. - -:rtype: QgsCadUtils.AlignMapPointOutput %End }; diff --git a/python/core/qgsclipper.sip b/python/core/qgsclipper.sip index 7fe148413b42..e374aa26942b 100644 --- a/python/core/qgsclipper.sip +++ b/python/core/qgsclipper.sip @@ -82,12 +82,11 @@ an open shape (linestring). static QPolygonF clippedLine( const QgsCurve &curve, const QgsRectangle &clipExtent ); %Docstring Takes a linestring and clips it to clipExtent + :param curve: the linestring :param clipExtent: clipping bounds :return: clipped line coordinates -:rtype: QPolygonF - %End }; diff --git a/python/core/qgscolorramp.sip b/python/core/qgscolorramp.sip index dcf466a42e45..7e5a7f82bc72 100644 --- a/python/core/qgscolorramp.sip +++ b/python/core/qgscolorramp.sip @@ -42,32 +42,25 @@ class QgsColorRamp virtual int count() const = 0; %Docstring Returns number of defined colors, or -1 if undefined - -:rtype: int %End virtual double value( int index ) const = 0; %Docstring Returns relative value between [0,1] of color at specified index - -:rtype: float %End virtual QColor color( double value ) const = 0; %Docstring Returns the color corresponding to a specified value. + :param value: value between [0, 1] inclusive :return: color for value -:rtype: QColor - %End virtual QString type() const = 0; %Docstring Returns a string representing the color ramp type. - -:rtype: str %End @@ -79,15 +72,11 @@ Inverts the ordering of the color ramp. virtual QgsColorRamp *clone() const = 0 /Factory/; %Docstring Creates a clone of the color ramp. - -:rtype: QgsColorRamp %End virtual QgsStringMap properties() const = 0; %Docstring Returns a string map containing all the color ramp's properties. - -:rtype: QgsStringMap %End }; @@ -107,6 +96,7 @@ class QgsGradientStop QgsGradientStop( double offset, const QColor &color ); %Docstring Constructor for QgsGradientStop + :param offset: positional offset for stop, between 0 and 1.0 :param color: color for stop %End @@ -146,6 +136,7 @@ supports optional extra color stops. const QgsGradientStopsList &stops = QgsGradientStopsList() ); %Docstring Constructor for QgsGradientColorRamp + :param color1: start color, corresponding to a position of 0.0 :param color2: end color, corresponding to a position of 1.0 :param discrete: set to true for discrete interpolation instead of smoothly @@ -156,8 +147,6 @@ interpolating between colors static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; %Docstring Creates a new QgsColorRamp from a map of properties - -:rtype: QgsColorRamp %End virtual int count() const; @@ -177,8 +166,6 @@ Creates a new QgsColorRamp from a map of properties %Docstring Returns the gradient start color. -:rtype: QColor - .. seealso:: :py:func:`setColor1()` .. seealso:: :py:func:`color2()` @@ -188,8 +175,6 @@ Returns the gradient start color. %Docstring Returns the gradient end color. -:rtype: QColor - .. seealso:: :py:func:`setColor2()` .. seealso:: :py:func:`color1()` @@ -198,6 +183,7 @@ Returns the gradient end color. void setColor1( const QColor &color ); %Docstring Sets the gradient start color. + :param color: start color .. seealso:: :py:func:`color1()` @@ -208,6 +194,7 @@ Sets the gradient start color. void setColor2( const QColor &color ); %Docstring Sets the gradient end color. + :param color: end color .. seealso:: :py:func:`color2()` @@ -220,8 +207,6 @@ Sets the gradient end color. Returns true if the gradient is using discrete interpolation, rather than smoothly interpolating between colors. -:rtype: bool - .. seealso:: :py:func:`setDiscrete()` %End @@ -229,6 +214,7 @@ smoothly interpolating between colors. %Docstring Sets whether the gradient should use discrete interpolation, rather than smoothly interpolating between colors. + :param discrete: set to true to use discrete interpolation .. seealso:: :py:func:`convertToDiscrete()` @@ -240,6 +226,7 @@ smoothly interpolating between colors. %Docstring Converts a gradient with existing color stops to or from discrete interpolation. + :param discrete: set to true to convert the gradient stops to discrete, or false to convert them to smooth interpolation @@ -249,6 +236,7 @@ or false to convert them to smooth interpolation void setStops( const QgsGradientStopsList &stops ); %Docstring Sets the list of intermediate gradient stops for the ramp. + :param stops: list of stops. Any existing color stops will be replaced. The stop list will be automatically reordered so that stops are listed in ascending offset order. @@ -260,8 +248,6 @@ order. %Docstring Returns the list of intermediate gradient stops for the ramp. -:rtype: QgsGradientStopsList - .. seealso:: :py:func:`setStops()` %End @@ -269,14 +255,13 @@ Returns the list of intermediate gradient stops for the ramp. %Docstring Returns any additional info attached to the gradient ramp (e.g., authorship notes) -:rtype: QgsStringMap - .. seealso:: :py:func:`setInfo()` %End void setInfo( const QgsStringMap &info ); %Docstring Sets additional info to attach to the gradient ramp (e.g., authorship notes) + :param info: map of string info to attach .. seealso:: :py:func:`info()` @@ -285,6 +270,7 @@ Sets additional info to attach to the gradient ramp (e.g., authorship notes) void addStopsToGradient( QGradient *gradient, double opacity = 1 ); %Docstring Copy color ramp stops to a QGradient + :param gradient: gradient to copy stops into :param opacity: opacity multiplier. Opacity of colors will be multiplied by this factor before adding to the gradient. @@ -316,6 +302,7 @@ class QgsLimitedRandomColorRamp : QgsColorRamp int valMin = DEFAULT_RANDOM_VAL_MIN, int valMax = DEFAULT_RANDOM_VAL_MAX ); %Docstring Constructor for QgsLimitedRandomColorRamp + :param count: number of colors in ramp :param hueMin: minimum hue :param hueMax: maximum hue @@ -329,9 +316,8 @@ Constructor for QgsLimitedRandomColorRamp %Docstring Returns a new QgsLimitedRandomColorRamp color ramp created using the properties encoded in a string map. -:param properties: color ramp properties -:rtype: QgsColorRamp +:param properties: color ramp properties .. seealso:: :py:func:`properties()` %End @@ -354,8 +340,6 @@ map. %Docstring Get a list of random colors -:rtype: list of QColor - .. versionadded:: 2.4 %End @@ -369,8 +353,6 @@ to regenerate the list of random colors. %Docstring Returns the minimum hue for generated colors -:rtype: int - .. seealso:: :py:func:`setHueMin()` %End @@ -378,8 +360,6 @@ Returns the minimum hue for generated colors %Docstring Returns the maximum hue for generated colors -:rtype: int - .. seealso:: :py:func:`setHueMax()` %End @@ -387,8 +367,6 @@ Returns the maximum hue for generated colors %Docstring Returns the minimum saturation for generated colors -:rtype: int - .. seealso:: :py:func:`setSatMin()` %End @@ -396,8 +374,6 @@ Returns the minimum saturation for generated colors %Docstring Returns the maximum saturation for generated colors -:rtype: int - .. seealso:: :py:func:`setSatMax()` %End @@ -405,8 +381,6 @@ Returns the maximum saturation for generated colors %Docstring Returns the minimum value for generated colors -:rtype: int - .. seealso:: :py:func:`setValMin()` %End @@ -414,8 +388,6 @@ Returns the minimum value for generated colors %Docstring Returns the maximum value for generated colors -:rtype: int - .. seealso:: :py:func:`setValMax()` %End @@ -502,6 +474,7 @@ Constructor for QgsRandomColorRamp. Sets the desired total number of unique colors for the resultant ramp. Calling this method pregenerates a set of visually distinct colors which are returned by subsequent calls to color(). + :param colorCount: number of unique colors .. versionadded:: 2.5 @@ -538,12 +511,14 @@ class QgsPresetSchemeColorRamp : QgsColorRamp, QgsColorScheme QgsPresetSchemeColorRamp( const QList< QColor > &colors = QList< QColor >() ); %Docstring Constructor for QgsPresetSchemeColorRamp. + :param colors: list of colors in ramp %End QgsPresetSchemeColorRamp( const QgsNamedColorList &colors ); %Docstring Constructor for QgsPresetColorRamp. + :param colors: list of named colors in ramp .. note:: @@ -555,9 +530,8 @@ Constructor for QgsPresetColorRamp. %Docstring Returns a new QgsPresetSchemeColorRamp color ramp created using the properties encoded in a string map. -:param properties: color ramp properties -:rtype: QgsColorRamp +:param properties: color ramp properties .. seealso:: :py:func:`properties()` %End @@ -565,9 +539,8 @@ map. virtual bool setColors( const QgsNamedColorList &colors, const QString & = QString(), const QColor & = QColor() ); %Docstring Sets the list of colors used by the ramp. -:param colors: list of colors -:rtype: bool +:param colors: list of colors .. seealso:: :py:func:`colors()` %End @@ -576,8 +549,6 @@ Sets the list of colors used by the ramp. %Docstring Returns the list of colors used by the ramp. -:rtype: list of QColor - .. seealso:: :py:func:`setColors()` %End @@ -622,6 +593,7 @@ class QgsColorBrewerColorRamp : QgsColorRamp bool inverted = false ); %Docstring Constructor for QgsColorBrewerColorRamp + :param schemeName: color brewer scheme name :param colors: number of colors in ramp :param inverted: invert ramp ordering @@ -631,9 +603,8 @@ Constructor for QgsColorBrewerColorRamp %Docstring Returns a new QgsColorBrewerColorRamp color ramp created using the properties encoded in a string map. -:param properties: color ramp properties -:rtype: QgsColorRamp +:param properties: color ramp properties .. seealso:: :py:func:`properties()` %End @@ -655,8 +626,6 @@ map. %Docstring Returns the name of the color brewer color scheme. -:rtype: str - .. seealso:: :py:func:`setSchemeName()` %End @@ -664,14 +633,13 @@ Returns the name of the color brewer color scheme. %Docstring Returns the number of colors in the ramp. -:rtype: int - .. seealso:: :py:func:`setColors()` %End void setSchemeName( const QString &schemeName ); %Docstring Sets the name of the color brewer color scheme. + :param schemeName: scheme name, must match a valid color brewer scheme name .. seealso:: :py:func:`schemeName()` @@ -682,6 +650,7 @@ Sets the name of the color brewer color scheme. void setColors( int colors ); %Docstring Sets the number of colors in the ramp. + :param colors: number of colors. Must match a valid value for the scheme, which can be retrieved using listSchemeVariants() @@ -692,8 +661,6 @@ which can be retrieved using listSchemeVariants() %Docstring Returns a list of all valid color brewer scheme names. -:rtype: list of str - .. seealso:: :py:func:`listSchemeVariants()` %End @@ -701,9 +668,8 @@ Returns a list of all valid color brewer scheme names. %Docstring Returns a list of the valid variants (numbers of colors) for a specified color brewer scheme name -:param schemeName: color brewer scheme name -:rtype: list of int +:param schemeName: color brewer scheme name .. seealso:: :py:func:`listSchemeNames()` %End @@ -733,6 +699,7 @@ class QgsCptCityColorRamp : QgsGradientColorRamp bool doLoadFile = true ); %Docstring Constructor for QgsCptCityColorRamp + :param schemeName: cpt-city scheme name :param variantName: cpt-city variant name :param inverted: invert ramp ordering @@ -744,6 +711,7 @@ Constructor for QgsCptCityColorRamp bool doLoadFile = true ); %Docstring Constructor for QgsCptCityColorRamp + :param schemeName: cpt-city scheme name :param variantList: cpt-city variant list :param variantName: cpt-city variant name @@ -752,10 +720,6 @@ Constructor for QgsCptCityColorRamp %End static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsColorRamp -%End virtual QString type() const; @@ -766,29 +730,13 @@ Constructor for QgsCptCityColorRamp void copy( const QgsCptCityColorRamp *other ); QgsGradientColorRamp *cloneGradientRamp() const /Factory/; -%Docstring - -:rtype: QgsGradientColorRamp -%End virtual QgsStringMap properties() const; QString schemeName() const; -%Docstring - -:rtype: str -%End QString variantName() const; -%Docstring - -:rtype: str -%End QStringList variantList() const; -%Docstring - -:rtype: list of str -%End void setSchemeName( const QString &schemeName ); void setVariantName( const QString &variantName ); @@ -797,42 +745,14 @@ Constructor for QgsCptCityColorRamp void loadPalette(); bool hasMultiStops() const; -%Docstring - -:rtype: bool -%End QString fileName() const; -%Docstring - -:rtype: str -%End bool loadFile(); -%Docstring - -:rtype: bool -%End bool fileLoaded() const; -%Docstring - -:rtype: bool -%End QString copyingFileName() const; -%Docstring - -:rtype: str -%End QString descFileName() const; -%Docstring - -:rtype: str -%End QgsStringMap copyingInfo() const; -%Docstring - -:rtype: QgsStringMap -%End protected: diff --git a/python/core/qgscolorscheme.sip b/python/core/qgscolorscheme.sip index 10b6593ea23e..17a911e457c2 100644 --- a/python/core/qgscolorscheme.sip +++ b/python/core/qgscolorscheme.sip @@ -64,8 +64,6 @@ Constructor for QgsColorScheme. Gets the name for the color scheme :return: color scheme name -:rtype: str - %End virtual SchemeFlags flags() const; @@ -73,8 +71,6 @@ Gets the name for the color scheme Returns the current flags for the color scheme. :return: current flags -:rtype: SchemeFlags - %End virtual QgsNamedColorList fetchColors( const QString &context = QString(), @@ -82,6 +78,7 @@ Returns the current flags for the color scheme. %Docstring Gets a list of colors from the scheme. The colors can optionally be generated using the supplied context and base color. + :param context: string specifying an optional context for the returned colors. For instance, a "recent colors" scheme may filter returned colors by context so that colors used only in a "composer" context are returned. @@ -90,8 +87,6 @@ may take advantage of this to filter or modify their returned colors to colors related to the base color. :return: a list of QPairs of color and color name -:rtype: QgsNamedColorList - %End virtual bool isEditable() const; @@ -99,8 +94,6 @@ to colors related to the base color. Returns whether the color scheme is editable :return: true if scheme is editable -:rtype: bool - .. seealso:: :py:func:`setColors` %End @@ -108,13 +101,12 @@ Returns whether the color scheme is editable virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() ); %Docstring Sets the colors for the scheme. This method is only valid for editable color schemes. + :param colors: list of colors for the scheme :param context: to set colors for :param baseColor: base color to set colors for :return: true if colors were set successfully -:rtype: bool - .. seealso:: :py:func:`isEditable` %End @@ -124,8 +116,6 @@ Sets the colors for the scheme. This method is only valid for editable color sch Clones a color scheme :return: copy of color scheme -:rtype: QgsColorScheme - %End }; @@ -163,8 +153,6 @@ Constructor for QgsGplColorScheme. Returns the file path for the associated gpl palette file :return: gpl file path -:rtype: str - %End }; @@ -186,6 +174,7 @@ subfolder off the user's QGIS settings folder. QgsUserColorScheme( const QString &filename ); %Docstring Constructs a new user color scheme, using a specified gpl palette file + :param filename: filename of gpl palette file stored in the users "palettes" folder %End @@ -203,6 +192,7 @@ Constructs a new user color scheme, using a specified gpl palette file void setName( const QString &name ); %Docstring Sets the name for the scheme + :param name: new name %End @@ -211,13 +201,12 @@ Sets the name for the scheme Erases the associated gpl palette file from the users "palettes" folder :return: true if erase was successful -:rtype: bool - %End void setShowSchemeInMenu( bool show ); %Docstring Sets whether a this scheme should be shown in color button menus. + :param show: set to true to show in color button menus, or false to hide from menus .. versionadded:: 3.0 @@ -263,6 +252,7 @@ Constructor for QgsRecentColorScheme. static void addRecentColor( const QColor &color ); %Docstring Adds a color to the list of recent colors. + :param color: color to add .. versionadded:: 2.14 @@ -274,8 +264,6 @@ Adds a color to the list of recent colors. %Docstring Returns the most recently used color. -:rtype: QColor - .. versionadded:: 3.0 .. seealso:: :py:func:`addRecentColor()` diff --git a/python/core/qgscolorschemeregistry.sip b/python/core/qgscolorschemeregistry.sip index 1dde2b710d12..428c756bccc3 100644 --- a/python/core/qgscolorschemeregistry.sip +++ b/python/core/qgscolorschemeregistry.sip @@ -67,6 +67,7 @@ Creates schemes for all gpl palettes in the user's palettes folder. %Docstring Adds a color scheme to the registry. Ownership of the scheme is transferred to the registry. + :param scheme: color scheme to add .. seealso:: :py:func:`populateFromInstance` @@ -77,11 +78,10 @@ to the registry. bool removeColorScheme( QgsColorScheme *scheme ); %Docstring Removes all matching color schemes from the registry + :param scheme: color scheme to remove :return: true if scheme was found and removed -:rtype: bool - .. seealso:: :py:func:`addColorScheme` %End @@ -91,18 +91,15 @@ Removes all matching color schemes from the registry Returns all color schemes in the registry :return: list of color schemes -:rtype: list of QgsColorScheme - %End QList schemes( const QgsColorScheme::SchemeFlag flag ) const; %Docstring Returns all color schemes in the registry which have a specified flag set + :param flag: flag to match :return: list of color schemes with flag set -:rtype: list of QgsColorScheme - %End diff --git a/python/core/qgsconditionalstyle.sip b/python/core/qgsconditionalstyle.sip index 59b0e9e3f699..6fd322181674 100644 --- a/python/core/qgsconditionalstyle.sip +++ b/python/core/qgsconditionalstyle.sip @@ -26,15 +26,12 @@ for a layer. This includes field styles and full row styles. QgsConditionalLayerStyles(); QList rowStyles(); -%Docstring - -:rtype: list of QgsConditionalStyle -%End void setRowStyles( const QList &styles ); %Docstring Set the conditional styles that apply to full rows of data in the attribute table. Each row will check be checked against each rule. + :param styles: The styles to assign to all the rows .. versionadded:: 2.12 @@ -43,6 +40,7 @@ Each row will check be checked against each rule. void setFieldStyles( const QString &fieldName, const QList &styles ); %Docstring Set the conditional styles for the field UI properties. + :param fieldName: name of field :param styles: %End @@ -52,22 +50,16 @@ Each row will check be checked against each rule. Returns the conditional styles set for the field UI properties :return: A list of conditional styles that have been set. -:rtype: list of QgsConditionalStyle - %End bool readXml( const QDomNode &node, const QgsReadWriteContext &context ); %Docstring Reads field ui properties specific state from Dom node. - -:rtype: bool %End bool writeXml( QDomNode &node, QDomDocument &doc, const QgsReadWriteContext &context ) const; %Docstring Write field ui properties specific state from Dom node. - -:rtype: bool %End }; @@ -90,12 +82,11 @@ Conditional styling for a rule. bool matches( const QVariant &value, QgsExpressionContext &context ) const; %Docstring Check if the rule matches using the given value and feature + :param value: The current value being checked. The "value" variable from the context is replaced with this value. :param context: Expression context for evaluating rule expression :return: True of the rule matches against the given feature -:rtype: bool - %End QPixmap renderPreview() const; @@ -103,13 +94,12 @@ Conditional styling for a rule. Render a preview icon of the rule. :return: QPixmap preview of the style -:rtype: QPixmap - %End void setName( const QString &value ); %Docstring Set the name of the style. Names are optional but handy for display + :param value: The name given to the style %End @@ -117,30 +107,35 @@ Conditional styling for a rule. %Docstring Set the rule for the style. Rules should be of QgsExpression syntax. Special value of \@value is replaced at run time with the check value + :param value: The QgsExpression style rule to use for this style %End void setBackgroundColor( const QColor &value ); %Docstring Set the background color for the style + :param value: QColor for background color %End void setTextColor( const QColor &value ); %Docstring Set the text color for the style + :param value: QColor for text color %End void setFont( const QFont &value ); %Docstring Set the font for the the style + :param value: QFont to be used for text %End void setSymbol( QgsSymbol *value ); %Docstring Set the icon for the style. Icons are generated from symbols + :param value: QgsSymbol to be used when generating the icon %End @@ -149,8 +144,6 @@ Special value of \@value is replaced at run time with the check value The name of the style. :return: The name of the style. Names are optional so might be empty. -:rtype: str - %End QString name() const; @@ -158,8 +151,6 @@ Special value of \@value is replaced at run time with the check value The name of the style. :return: The name of the style. Names are optional so might be empty. -:rtype: str - %End QPixmap icon() const; @@ -167,8 +158,6 @@ Special value of \@value is replaced at run time with the check value The icon set for style generated from the set symbol :return: A QPixmap that was set for the icon using the symbol -:rtype: QPixmap - %End QgsSymbol *symbol() const; @@ -176,8 +165,6 @@ Special value of \@value is replaced at run time with the check value The symbol used to generate the icon for the style :return: The QgsSymbol used for the icon -:rtype: QgsSymbol - %End QColor textColor() const; @@ -185,8 +172,6 @@ Special value of \@value is replaced at run time with the check value The text color set for style :return: QColor for text color -:rtype: QColor - %End bool validTextColor() const; @@ -195,8 +180,6 @@ Special value of \@value is replaced at run time with the check value Valid colors are non invalid QColors and a color with a > 0 alpha :return: True of the color set for text is valid. -:rtype: bool - %End QColor backgroundColor() const; @@ -204,8 +187,6 @@ Valid colors are non invalid QColors and a color with a > 0 alpha The background color for style :return: QColor for background color -:rtype: QColor - %End bool validBackgroundColor() const; @@ -214,8 +195,6 @@ Valid colors are non invalid QColors and a color with a > 0 alpha Valid colors are non invalid QColors and a color with a > 0 alpha :return: True of the color set for background is valid. -:rtype: bool - %End QFont font() const; @@ -223,8 +202,6 @@ Valid colors are non invalid QColors and a color with a > 0 alpha The font for the style :return: QFont for the style -:rtype: QFont - %End QString rule() const; @@ -233,8 +210,6 @@ Valid colors are non invalid QColors and a color with a > 0 alpha to represent the current value :return: QString of the current set rule -:rtype: str - %End bool isValid() const; @@ -243,8 +218,6 @@ to represent the current value set. :return: True if the rule is valid. -:rtype: bool - %End static QList matchingConditionalStyles( const QList &styles, const QVariant &value, QgsExpressionContext &context ); @@ -253,8 +226,6 @@ set. If no match is found a invalid QgsConditionalStyle is return. :return: A conditional style that matches the value and feature. -:rtype: list of QgsConditionalStyle - Check with QgsConditionalStyle.isValid() %End @@ -264,8 +235,6 @@ Check with QgsConditionalStyle.isValid() If no match is found a invalid QgsConditionalStyle is return. :return: A conditional style that matches the value and feature. -:rtype: QgsConditionalStyle - Check with QgsConditionalStyle.isValid() %End @@ -273,25 +242,20 @@ Check with QgsConditionalStyle.isValid() %Docstring Compress a list of styles into a single style. This can be used to stack the elements of the styles. The font of the last style is used in the output. + :param styles: The list of styles to compress down :return: A single style generated from joining each style property. -:rtype: QgsConditionalStyle - %End bool readXml( const QDomNode &node, const QgsReadWriteContext &context ); %Docstring Reads vector conditional style specific state from layer Dom node. - -:rtype: bool %End bool writeXml( QDomNode &node, QDomDocument &doc, const QgsReadWriteContext &context ) const; %Docstring Write vector conditional style specific state from layer Dom node. - -:rtype: bool %End diff --git a/python/core/qgscoordinateformatter.sip b/python/core/qgscoordinateformatter.sip index 68b690b740f0..b84ed0becd70 100644 --- a/python/core/qgscoordinateformatter.sip +++ b/python/core/qgscoordinateformatter.sip @@ -56,8 +56,6 @@ The ``precision`` argument gives the number of decimal places to include for coo Optional ``flags`` can be specified to control the output format. -:rtype: str - .. seealso:: :py:func:`formatY()` %End @@ -71,8 +69,6 @@ The ``precision`` argument gives the number of decimal places to include for coo Optional ``flags`` can be specified to control the output format. -:rtype: str - .. seealso:: :py:func:`formatX()` %End @@ -85,16 +81,12 @@ The ``format`` argument indicates the desired display format for the coordinate. The ``precision`` argument gives the number of decimal places to include for coordinates. Optional ``flags`` can be specified to control the output format. - -:rtype: str %End static QString asPair( double x, double y, int precision = 12 ); %Docstring Formats coordinates as an "``x``,``y``" pair, with optional decimal ``precision`` (number of decimal places to include). - -:rtype: str %End }; diff --git a/python/core/qgscoordinatereferencesystem.sip b/python/core/qgscoordinatereferencesystem.sip index 93c163051acc..f6eaacb1f41c 100644 --- a/python/core/qgscoordinatereferencesystem.sip +++ b/python/core/qgscoordinatereferencesystem.sip @@ -183,6 +183,7 @@ It supports the following formats: - "WKT:" - handled with createFromWkt() If no prefix is specified, WKT definition is assumed. + :param definition: A String containing a coordinate reference system definition. .. seealso:: :py:func:`createFromString()` @@ -197,6 +198,7 @@ Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile. + :param id: The ID valid for the chosen CRS ID type :param type: One of the types described in CrsType / // TODO QGIS 3: remove type and always use EPSG code @@ -219,8 +221,6 @@ Returns a list of all valid SRS IDs present in the CRS database. Any of the returned values can be safely passed to fromSrsId() to create a new, valid QgsCoordinateReferenceSystem object. -:rtype: list of long - .. seealso:: :py:func:`fromSrsId()` .. versionadded:: 3.0 @@ -230,11 +230,10 @@ QgsCoordinateReferenceSystem object. static QgsCoordinateReferenceSystem fromOgcWmsCrs( const QString &ogcCrs ); %Docstring Creates a CRS from a given OGC WMS-format Coordinate Reference System string. + :param ogcCrs: OGR compliant CRS definition, e.g., "EPSG:4326" :return: matching CRS, or an invalid CRS if string could not be matched -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 @@ -244,11 +243,10 @@ Creates a CRS from a given OGC WMS-format Coordinate Reference System string. static QgsCoordinateReferenceSystem fromEpsgId( long epsg ); %Docstring Creates a CRS from a given EPSG ID. + :param epsg: epsg CRS ID :return: matching CRS, or an invalid CRS if string could not be matched -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 %End @@ -256,11 +254,10 @@ Creates a CRS from a given EPSG ID. static QgsCoordinateReferenceSystem fromProj4( const QString &proj4 ); %Docstring Creates a CRS from a proj4 style formatted string. + :param proj4: proj4 format string :return: matching CRS, or an invalid CRS if string could not be matched -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 @@ -270,11 +267,10 @@ Creates a CRS from a proj4 style formatted string. static QgsCoordinateReferenceSystem fromWkt( const QString &wkt ); %Docstring Creates a CRS from a WKT spatial ref sys definition string. + :param wkt: WKT for the desired spatial reference system. :return: matching CRS, or an invalid CRS if string could not be matched -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 @@ -284,11 +280,10 @@ Creates a CRS from a WKT spatial ref sys definition string. static QgsCoordinateReferenceSystem fromSrsId( long srsId ); %Docstring Creates a CRS from a specified QGIS SRS ID. + :param srsId: internal QGIS SRS ID :return: matching CRS, or an invalid CRS if ID could not be found -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 @@ -302,8 +297,6 @@ Creates a CRS from a specified QGIS SRS ID. %Docstring Sets this CRS by lookup of the given ID in the CRS database. -:rtype: bool - .. note:: We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code @@ -321,8 +314,6 @@ Accepts both ":" format and OGC URN "urn:ogc:def:crs::[" - handled with createFromWkt() If no prefix is specified, WKT definition is assumed. + :param definition: A String containing a coordinate reference system definition. :return: True on success else false -:rtype: bool - %End bool createFromUserInput( const QString &definition ); @@ -453,12 +439,11 @@ ESRI.[WKT string] (directly or in a file), "IGNF:xxx" For more details on supported formats see OGRSpatialReference.SetFromUserInput() ( http://www.gdal.org/ogr/classOGRSpatialReference.html#aec3c6a49533fe457ddc763d699ff8796 ) -:rtype: bool - .. note:: this function generates a WKT string using OSRSetFromUserInput() and passes it to createFromWkt() function. + :param definition: A String containing a coordinate reference system definition. :return: True on success else false @@ -485,8 +470,6 @@ For more details refer to OGRSpatialReference.morphFromESRI() . bool isValid() const; %Docstring Returns whether this CRS is correctly initialized and usable - -:rtype: bool %End void validate(); @@ -511,8 +494,6 @@ Walks the CRS databases (both system and user database) trying to match stored PROJ.4 string to a database entry in order to fill in further pieces of information about CRS. -:rtype: long - .. note:: The ellipsoid and projection acronyms must be set as well as the proj4string! @@ -528,29 +509,25 @@ pieces of information about CRS. Overloaded != operator used to compare to CRS's. Returns opposite bool value to operator == - -:rtype: bool %End bool readXml( const QDomNode &node ); %Docstring Restores state from the given DOM node. + :param node: The node from which state will be restored :return: bool True on success, False on failure -:rtype: bool - %End bool writeXml( QDomNode &node, QDomDocument &doc ) const; %Docstring Stores state to the given Dom node in the given document. + :param node: The node in which state will be restored :param doc: The document in which state will be stored :return: bool True on success, False on failure -:rtype: bool - %End @@ -562,8 +539,6 @@ Stores state to the given Dom node in the given document. Returns the internal CRS ID, if available. :return: the internal sqlite3 srs.db primary key for this CRS -:rtype: long - %End long postgisSrid() const; @@ -571,8 +546,6 @@ Returns the internal CRS ID, if available. Returns PostGIS SRID for the CRS. :return: the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0) -:rtype: long - / // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead %End @@ -588,8 +561,6 @@ If CRS object is a custom CRS (not found in database), the method will return internal QGIS CRS ID with "QGIS" authority, for example "QGIS:100005" :return: the authority identifier for this CRS -:rtype: str - .. seealso:: :py:func:`description()` %End @@ -601,8 +572,6 @@ cases this is the best method to use when showing a friendly identifier for the user. :return: descriptive name of the CRS -:rtype: str - .. note:: @@ -616,8 +585,6 @@ user. Returns the projection acronym for the projection used by the CRS. :return: the official proj4 acronym for the projection family -:rtype: str - .. note:: @@ -631,8 +598,6 @@ Returns the projection acronym for the projection used by the CRS. Returns the ellipsoid acronym for the ellipsoid used by the CRS. :return: the official proj4 acronym for the ellipoid -:rtype: str - .. note:: @@ -646,8 +611,6 @@ Returns the ellipsoid acronym for the ellipsoid used by the CRS. Returns a WKT representation of this CRS. :return: string containing WKT of the CRS -:rtype: str - .. seealso:: :py:func:`toProj4()` %End @@ -661,8 +624,6 @@ they will be stripped out and the projection and ellipsoid acronyms will be overridden with these. :return: Proj4 format string that defines this CRS. -:rtype: str - .. note:: @@ -676,8 +637,6 @@ overridden with these. Returns whether the CRS is a geographic CRS (using lat/lon coordinates) :return: true if CRS is geographic, or false if it is a projected CRS -:rtype: bool - %End bool hasAxisInverted() const; @@ -685,15 +644,11 @@ Returns whether the CRS is a geographic CRS (using lat/lon coordinates) Returns whether axis is inverted (e.g., for WMS 1.3) for the CRS. :return: true if CRS axis is inverted -:rtype: bool - %End QgsUnitTypes::DistanceUnit mapUnits() const; %Docstring Returns the units for the projection used by the CRS. - -:rtype: QgsUnitTypes.DistanceUnit %End QgsRectangle bounds() const; @@ -703,8 +658,6 @@ Returns the approximate bounds for the region the CRS is usable within. The returned bounds represent the latitude and longitude extent for the projection in the WGS 84 CRS. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -717,8 +670,6 @@ Set user hint for validation QString validationHint(); %Docstring Get user hint for validation - -:rtype: str %End static int syncDatabase(); @@ -726,8 +677,6 @@ Get user hint for validation Update proj.4 parameters in our database from proj.4 :return: number of updated CRS on success and -:rtype: int - negative number of failed updates in case of errors. .. note:: @@ -741,15 +690,11 @@ negative number of failed updates in case of errors. Save the proj4-string as a custom CRS. Returns the new CRS srsid(), or -1 if the CRS could not be saved. - -:rtype: long %End QString geographicCrsAuthId() const; %Docstring Returns auth id of related geographic CRS - -:rtype: str %End static QStringList recentProjections(); @@ -757,8 +702,6 @@ Returns auth id of related geographic CRS Returns a list of recently used projections :return: list of srsid for recently used projections -:rtype: list of str - .. versionadded:: 2.7 %End diff --git a/python/core/qgscoordinatetransform.sip b/python/core/qgscoordinatetransform.sip index f4f1aba5a5c3..1c00caab7ac7 100644 --- a/python/core/qgscoordinatetransform.sip +++ b/python/core/qgscoordinatetransform.sip @@ -103,14 +103,13 @@ Assignment operator Returns true if the coordinate transform is valid, ie both the source and destination CRS have been set and are valid. -:rtype: bool - .. versionadded:: 3.0 %End void setSourceCrs( const QgsCoordinateReferenceSystem &crs ); %Docstring Sets the source coordinate reference system. + :param crs: CRS to transform coordinates from .. seealso:: :py:func:`sourceCrs()` @@ -121,6 +120,7 @@ Sets the source coordinate reference system. void setDestinationCrs( const QgsCoordinateReferenceSystem &crs ); %Docstring Sets the destination coordinate reference system. + :param crs: CRS to transform coordinates to .. seealso:: :py:func:`destinationCrs()` @@ -141,8 +141,6 @@ calculated. Returns the source coordinate reference system, which the transform will transform coordinates from. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setSourceCrs()` .. seealso:: :py:func:`destinationCrs()` @@ -153,8 +151,6 @@ transform coordinates from. Returns the destination coordinate reference system, which the transform will transform coordinates to. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setDestinationCrs()` .. seealso:: :py:func:`sourceCrs()` @@ -165,12 +161,11 @@ transform coordinates to. Transform the point from the source CRS to the destination CRS. If the direction is ForwardTransform then coordinates are transformed from source to destination, otherwise points are transformed from destination to source CRS. + :param point: point to transform :param direction: transform direction (defaults to ForwardTransform) :return: transformed point -:rtype: QgsPointXY - %End QgsPointXY transform( const double x, const double y, TransformDirection direction = ForwardTransform ) const; @@ -178,13 +173,12 @@ otherwise points are transformed from destination to source CRS. Transform the point specified by x,y from the source CRS to the destination CRS. If the direction is ForwardTransform then coordinates are transformed from source to destination, otherwise points are transformed from destination to source CRS. + :param x: x coordinate of point to transform :param y: y coordinate of point to transform :param direction: transform direction (defaults to ForwardTransform) :return: transformed point -:rtype: QgsPointXY - %End QgsRectangle transformBoundingBox( const QgsRectangle &rectangle, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const; @@ -195,14 +189,13 @@ otherwise points are transformed from destination to source CRS. This method assumes that the rectangle is a bounding box, and creates a bounding box in the projected CRS, such that all points from the source rectangle are within the returned rectangle. + :param rectangle: rectangle to transform :param direction: transform direction (defaults to ForwardTransform) :param handle180Crossover: set to true if destination CRS is geographic and handling of extents crossing the 180 degree longitude line is required :return: rectangle in destination CRS -:rtype: QgsRectangle - %End void transformInPlace( double &x, double &y, double &z, TransformDirection direction = ForwardTransform ) const; @@ -210,6 +203,7 @@ crossing the 180 degree longitude line is required Transforms an array of x, y and z double coordinates in place, from the source CRS to the destination CRS. If the direction is ForwardTransform then coordinates are transformed from source to destination, otherwise points are transformed from destination to source CRS. + :param x: array of x coordinates of points to transform :param y: array of y coordinates of points to transform :param z: array of z coordinates of points to transform. The z coordinates of the points @@ -225,6 +219,7 @@ heights) and must be expressed in its vertical units (generally meters) void transformPolygon( QPolygonF &polygon, TransformDirection direction = ForwardTransform ) const; %Docstring Transforms a polygon to the destination coordinate system. + :param polygon: polygon to transform (occurs in place) :param direction: transform direction (defaults to forward transformation) %End @@ -234,12 +229,11 @@ Transforms a polygon to the destination coordinate system. Transforms a rectangle to the destination CRS. If the direction is ForwardTransform then coordinates are transformed from source to destination, otherwise points are transformed from destination to source CRS. + :param rectangle: rectangle to transform :param direction: transform direction (defaults to ForwardTransform) :return: transformed rectangle -:rtype: QgsRectangle - %End void transformCoords( int numPoint, double *x, double *y, double *z, TransformDirection direction = ForwardTransform ) const; @@ -247,6 +241,7 @@ otherwise points are transformed from destination to source CRS. Transform an array of coordinates to the destination CRS. If the direction is ForwardTransform then coordinates are transformed from source to destination, otherwise points are transformed from destination to source CRS. + :param numPoint: number of coordinates in arrays :param x: array of x coordinates to transform :param y: array of y coordinates to transform @@ -257,8 +252,6 @@ otherwise points are transformed from destination to source CRS. bool isShortCircuited() const; %Docstring Returns true if the transform short circuits because the source and destination are equivalent. - -:rtype: bool %End struct TransformPair @@ -287,10 +280,6 @@ ID for the datum transform to use when projecting to the destination CRS. bool operator==( const QgsCoordinateTransform::TransformPair &other ) const; bool operator!=( const QgsCoordinateTransform::TransformPair &other ) const; -%Docstring - -:rtype: bool -%End }; @@ -298,8 +287,6 @@ ID for the datum transform to use when projecting to the destination CRS. %Docstring Returns a list of datum transformations which are available for the given ``source`` and ``destination`` CRS. -:rtype: list of QgsCoordinateTransform.TransformPair - .. seealso:: :py:func:`datumTransformToProj()` .. seealso:: :py:func:`datumTransformInfo()` @@ -309,8 +296,6 @@ Returns a list of datum transformations which are available for the given ``sour %Docstring Returns a proj string representing the specified ``datumTransformId`` datum transform ID. -:rtype: str - .. seealso:: :py:func:`datumTransformations()` .. seealso:: :py:func:`datumTransformInfo()` @@ -323,8 +308,6 @@ Returns a proj string representing the specified ``datumTransformId`` datum tran Returns the datum transform ID corresponding to a specified proj ``string``. Returns -1 if matching datum ID was not found. -:rtype: int - .. seealso:: :py:func:`datumTransformToProj()` .. versionadded:: 3.0 @@ -390,8 +373,6 @@ Returns detailed information about the specified ``datumTransformId``. If ``datumTransformId`` was not a valid transform ID, a TransformInfo with TransformInfo.datumTransformId of -1 will be returned. -:rtype: QgsCoordinateTransform.TransformInfo - .. seealso:: :py:func:`datumTransformations()` .. seealso:: :py:func:`datumTransformToProj()` @@ -405,8 +386,6 @@ CRS. This is usually calculated automatically from the transform's QgsCoordinateTransformContext, but can be manually overwritten by a call to setSourceDatumTransformId(). -:rtype: int - .. seealso:: :py:func:`setSourceDatumTransformId()` .. seealso:: :py:func:`destinationDatumTransformId()` @@ -437,8 +416,6 @@ CRS. This is usually calculated automatically from the transform's QgsCoordinateTransformContext, but can be manually overwritten by a call to setDestinationDatumTransformId(). -:rtype: int - .. seealso:: :py:func:`setDestinationDatumTransformId()` .. seealso:: :py:func:`sourceDatumTransformId()` diff --git a/python/core/qgscoordinatetransformcontext.sip b/python/core/qgscoordinatetransformcontext.sip index e63e39853df4..e47e1841c808 100644 --- a/python/core/qgscoordinatetransformcontext.sip +++ b/python/core/qgscoordinatetransformcontext.sip @@ -77,8 +77,6 @@ required for transformations for that source or destination. to use for a coordinate transform. Instead, always use calculateDatumTransforms() to determine this. -:rtype: QMap< QPair< str, QString>, QgsCoordinateTransform.TransformPair > - .. seealso:: :py:func:`addSourceDestinationDatumTransform()` %End @@ -95,8 +93,6 @@ required for transformations for that source or destination. Returns true if the new transform pair was added successfully. -:rtype: bool - .. note:: Transforms set using this method will override any specific source or destination @@ -122,8 +118,6 @@ Removes the source to destination datum transform pair for the specified ``sourc Returns true if the context has a valid datum transform to use when transforming from the specified ``source`` CRS to ``destination`` CRS. -:rtype: bool - .. note:: source and destination are reversible. @@ -138,8 +132,6 @@ for a transform from the specified ``source`` CRS to ``destination`` CRS. Returns an ID of -1 if a datum transform should not be used for the source or destination. -:rtype: QgsCoordinateTransform.TransformPair - .. note:: source and destination are reversible. @@ -152,8 +144,6 @@ Reads the context's state from a DOM ``element``. Returns false if transforms stored in the XML are not available. In this case ``missingTransforms`` will be filled with missing datum transform strings. -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End diff --git a/python/core/qgscredentials.sip b/python/core/qgscredentials.sip index 4d6ae207df33..ccf39d7f8054 100644 --- a/python/core/qgscredentials.sip +++ b/python/core/qgscredentials.sip @@ -35,23 +35,13 @@ Destructor. %End bool get( const QString &realm, QString &username /In,Out/, QString &password /In,Out/, const QString &message = QString() ); -%Docstring - -:rtype: bool -%End void put( const QString &realm, const QString &username, const QString &password ); bool getMasterPassword( QString &password /In,Out/, bool stored = false ); -%Docstring - -:rtype: bool -%End static QgsCredentials *instance(); %Docstring retrieves instance - -:rtype: QgsCredentials %End void lock(); @@ -74,8 +64,6 @@ Unlock the instance after being locked. %Docstring Return pointer to mutex -:rtype: QMutex - .. versionadded:: 2.4 %End @@ -89,15 +77,11 @@ Constructor for QgsCredentials. virtual bool request( const QString &realm, QString &username /In,Out/, QString &password /In,Out/, const QString &message = QString() ) = 0; %Docstring request a password - -:rtype: bool %End virtual bool requestMasterPassword( QString &password /In,Out/, bool stored = false ) = 0; %Docstring request a master password - -:rtype: bool %End void setInstance( QgsCredentials *instance ); diff --git a/python/core/qgsdartmeasurement.sip b/python/core/qgsdartmeasurement.sip index 88d4cfcba021..f6e3bcf750dd 100644 --- a/python/core/qgsdartmeasurement.sip +++ b/python/core/qgsdartmeasurement.sip @@ -31,10 +31,6 @@ Constructor for QgsDartMeasurement QgsDartMeasurement( const QString &name, Type type, const QString &value ); const QString toString() const; -%Docstring - -:rtype: str -%End void send() const; @@ -43,8 +39,6 @@ Constructor for QgsDartMeasurement Convert a QgsDartMeasurement.Type enum to a string that is understood by the system. -:rtype: str - .. versionadded:: 2. %End diff --git a/python/core/qgsdatadefinedsizelegend.sip b/python/core/qgsdatadefinedsizelegend.sip index 32a85a2fc59b..13124c6acf08 100644 --- a/python/core/qgsdatadefinedsizelegend.sip +++ b/python/core/qgsdatadefinedsizelegend.sip @@ -63,8 +63,6 @@ Sets how the legend should be rendered LegendType legendType() const; %Docstring Returns how the legend should be rendered - -:rtype: LegendType %End void setSymbol( QgsMarkerSymbol *symbol /Transfer/ ); @@ -74,8 +72,6 @@ Sets marker symbol that will be used to draw markers in legend QgsMarkerSymbol *symbol() const; %Docstring Returns marker symbol that will be used to draw markers in legend - -:rtype: QgsMarkerSymbol %End void setSizeScaleTransformer( QgsSizeScaleTransformer *transformer /Transfer/ ); @@ -85,8 +81,6 @@ Sets transformer for scaling of symbol sizes. Takes ownership of the object. Acc QgsSizeScaleTransformer *sizeScaleTransformer() const; %Docstring Returns transformer for scaling of symbol sizes. Returns null if no transformer is defined. - -:rtype: QgsSizeScaleTransformer %End void setClasses( const QList< QgsDataDefinedSizeLegend::SizeClass > &classes ); @@ -96,8 +90,6 @@ Sets list of classes: each class is a pair of symbol size (in units used by the QList< QgsDataDefinedSizeLegend::SizeClass > classes() const; %Docstring Returns list of classes: each class is a pair of symbol size (in units used by the symbol) and label - -:rtype: list of QgsDataDefinedSizeLegend.SizeClass %End void setTitle( const QString &title ); @@ -107,8 +99,6 @@ Sets title label for data-defined size legend QString title() const; %Docstring Returns title label for data-defined size legend - -:rtype: str %End void setVerticalAlignment( VerticalAlignment vAlign ); @@ -118,8 +108,6 @@ Sets vertical alignment of symbols - only valid for collapsed legend VerticalAlignment verticalAlignment() const; %Docstring Returns vertical alignment of symbols - only valid for collapsed legend - -:rtype: VerticalAlignment %End void setFont( const QFont &font ); @@ -129,8 +117,6 @@ Sets font used for rendering of labels - only valid for collapsed legend QFont font() const; %Docstring Returns font used for rendering of labels - only valid for collapsed legend - -:rtype: QFont %End void setTextColor( const QColor &color ); @@ -140,8 +126,6 @@ Sets text color for rendering of labels - only valid for collapsed legend QColor textColor() const; %Docstring Returns text color for rendering of labels - only valid for collapsed legend - -:rtype: QColor %End void setTextAlignment( Qt::AlignmentFlag flag ); @@ -151,8 +135,6 @@ Sets horizontal text alignment for rendering of labels - only valid for collapse Qt::AlignmentFlag textAlignment() const; %Docstring Returns horizontal text alignment for rendering of labels - only valid for collapsed legend - -:rtype: Qt.AlignmentFlag %End @@ -164,8 +146,6 @@ Updates the list of classes, source symbol and title label from given symbol and QgsLegendSymbolList legendSymbolList() const; %Docstring Generates legend symbol items according to the configuration - -:rtype: QgsLegendSymbolList %End void drawCollapsedLegend( QgsRenderContext &context, QSize *outputSize /Out/ = 0, int *labelXOffset /Out/ = 0 ) const; @@ -178,15 +158,11 @@ Does nothing if legend is not configured as collapsed. QImage collapsedLegendImage( QgsRenderContext &context, const QColor &backgroundColor = Qt::transparent, double paddingMM = 1 ) const; %Docstring Returns output image that would be shown in the legend. Returns invalid image if legend is not configured as collapsed. - -:rtype: QImage %End static QgsDataDefinedSizeLegend *readXml( const QDomElement &elem, const QgsReadWriteContext &context ) /Factory/; %Docstring Creates instance from given element and returns it (caller takes ownership). Returns null on error. - -:rtype: QgsDataDefinedSizeLegend %End void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const; diff --git a/python/core/qgsdataitem.sip b/python/core/qgsdataitem.sip index ad9f22716b17..12cf5f5cd521 100644 --- a/python/core/qgsdataitem.sip +++ b/python/core/qgsdataitem.sip @@ -60,23 +60,13 @@ Create new data item. ~QgsDataItem(); bool hasChildren(); -%Docstring - -:rtype: bool -%End int rowCount(); -%Docstring - -:rtype: int -%End virtual QVector createChildren() /Factory/; %Docstring Create children. Children are not expected to have parent set. This method MUST BE THREAD SAFE. * - -:rtype: list of QgsDataItem %End enum State @@ -89,14 +79,13 @@ This method MUST BE THREAD SAFE. * State state() const; %Docstring -:rtype: State - .. versionadded:: 2.8 %End virtual void setState( State state ); %Docstring Set item state. It also take care about starting/stopping loading icon animation. + :param state: .. versionadded:: 2.8 @@ -105,6 +94,7 @@ Set item state. It also take care about starting/stopping loading icon animation virtual void addChildItem( QgsDataItem *child /Transfer/, bool refresh = false ); %Docstring Inserts a new child item. The child will be inserted at a position using an alphabetical order based on mName. + :param child: child item to insert. Ownership is transferred, and item parent will be set and relevant connections made. :param refresh: - set to true to refresh populated item, emitting relevant signals to the model @@ -114,6 +104,7 @@ Inserts a new child item. The child will be inserted at a position using an alph virtual void deleteChildItem( QgsDataItem *child ); %Docstring Removes and deletes a child item, emitting relevant signals to the model. + :param child: child to remove. Item must exist as a current child. .. seealso:: :py:func:`addChildItem()` @@ -122,25 +113,18 @@ Removes and deletes a child item, emitting relevant signals to the model. virtual QgsDataItem *removeChildItem( QgsDataItem *child ) /TransferBack/; %Docstring Removes a child item and returns it without deleting it. Emits relevant signals to model as required. + :param child: child to remove :return: pointer to the removed item or null if no such item was found -:rtype: QgsDataItem - %End virtual bool equal( const QgsDataItem *other ); %Docstring Returns true if this item is equal to another item (by testing item type and path). - -:rtype: bool %End virtual QWidget *paramWidget() /Factory/; -%Docstring - -:rtype: QWidget -%End virtual QList actions( QWidget *parent ); %Docstring @@ -149,8 +133,6 @@ the item. Subclasses should override this to provide actions. Subclasses should ensure that ownership of created actions is correctly handled by parenting them to the specified parent widget. - -:rtype: list of QAction %End virtual QList menus( QWidget *parent ); @@ -158,11 +140,10 @@ to the specified parent widget. Returns the list of menus available for this item. This is usually used for the popup menu on right-clicking the item. Subclasses should override this to provide actions. Subclasses should ensure that ownership of created menus is correctly handled by parenting them to the specified parent widget. + :param parent: a parent widget of the menu :return: list of menus -:rtype: list of QMenu - .. versionadded:: 3.0 %End @@ -172,8 +153,6 @@ created menus is correctly handled by parenting them to the specified parent wid Returns whether the item accepts drag and dropped layers - e.g. for importing a dataset to a provider. Subclasses should override this and handleDrop() to accept dropped layers. -:rtype: bool - .. seealso:: :py:func:`handleDrop()` %End @@ -182,8 +161,6 @@ Subclasses should override this and handleDrop() to accept dropped layers. Attempts to process the mime data dropped on this item. Subclasses must override this and acceptDrop() if they accept dropped layers. -:rtype: bool - .. seealso:: :py:func:`acceptDrop()` %End @@ -193,8 +170,6 @@ Called when a user double clicks on the item. Subclasses should return true if they have implemented a double-click handler and do not want the default double-click behavior for items. -:rtype: bool - .. versionadded:: 3.0 %End @@ -204,8 +179,6 @@ Returns true if the item may be dragged. Default implementation returns false. A draggable item has to implement mimeUri() that will be used to pass data. -:rtype: bool - .. seealso:: :py:func:`mimeUri()` .. versionadded:: 3.0 @@ -216,8 +189,6 @@ A draggable item has to implement mimeUri() that will be used to pass data. Return mime URI for the data item. Items that return valid URI will be returned in mime data when dragging a selection from browser model. -:rtype: QgsMimeDataUtils.Uri - .. seealso:: :py:func:`hasDragEnabled()` .. versionadded:: 3.0 @@ -238,15 +209,9 @@ Items that return valid URI will be returned in mime data when dragging a select %Docstring Writes the selected crs into data source. The original data source will be modified when calling this method. - -:rtype: bool %End virtual Capabilities capabilities2() const; -%Docstring - -:rtype: Capabilities -%End virtual void setCapabilities( Capabilities capabilities ); %Docstring @@ -255,24 +220,14 @@ Sets the capabilities for the data item. static int findItem( QVector items, QgsDataItem *item ); -%Docstring - -:rtype: int -%End Type type() const; -%Docstring - -:rtype: Type -%End QgsDataItem *parent() const; %Docstring Get item parent. QgsDataItem maintains its own items hierarchy, it does not use QObject hierarchy. * - -:rtype: QgsDataItem %End void setParent( QgsDataItem *parent ); @@ -281,22 +236,12 @@ Set item parent and connect / disconnect parent to / from item signals. It does not add itself to parents children (mChildren) * %End QVector children() const; -%Docstring - -:rtype: list of QgsDataItem -%End virtual QIcon icon(); -%Docstring - -:rtype: QIcon -%End QString name() const; %Docstring Returns the name of the item (the displayed text for the item). -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -308,16 +253,10 @@ Sets the ``name`` of the item (the displayed text for the item). %End QString path() const; -%Docstring - -:rtype: str -%End void setPath( const QString &path ); static QString pathComponent( const QString &component ); %Docstring Create path component replacing path separators - -:rtype: str %End virtual QVariant sortKey() const; @@ -328,8 +267,6 @@ but setSortKey() can be used to set a custom sort key for the item. Alternatively subclasses can override this method to return a custom sort key. -:rtype: QVariant - .. seealso:: :py:func:`setSortKey()` .. versionadded:: 3.0 @@ -350,10 +287,6 @@ Sets a custom sorting ``key`` for the item. void setToolTip( const QString &msg ); QString toolTip() const; -%Docstring - -:rtype: str -%End static void deleteLater( QVector &items ); @@ -378,8 +311,6 @@ the deferredDelete() returns true and item will be deleted once Populating finis Items with slow reateChildren() (for example network or database based) may check during createChildren() if deferredDelete() returns true and return from createChildren() immediately because result will be useless. * - -:rtype: bool %End @@ -482,30 +413,22 @@ Item that represents a layer that can be opened with one of the providers QgsMapLayer::LayerType mapLayerType() const; %Docstring Returns QgsMapLayer.LayerType - -:rtype: QgsMapLayer.LayerType %End QString uri() const; %Docstring Returns layer uri or empty string if layer cannot be created - -:rtype: str %End QString providerKey() const; %Docstring Returns provider key - -:rtype: str %End QStringList supportedCrs() const; %Docstring Returns the supported CRS -:rtype: list of str - .. versionadded:: 2.8 %End @@ -513,8 +436,6 @@ Returns the supported CRS %Docstring Returns the supported formats -:rtype: list of str - .. versionadded:: 2.8 %End @@ -522,8 +443,6 @@ Returns the supported formats %Docstring Returns comments of the layer -:rtype: str - .. versionadded:: 2.12 %End @@ -531,8 +450,6 @@ Returns comments of the layer %Docstring Returns the string representation of the given ``layerType`` -:rtype: str - .. versionadded:: 3 %End @@ -540,8 +457,6 @@ Returns the string representation of the given ``layerType`` %Docstring Returns the icon name of the given ``layerType`` -:rtype: str - .. versionadded:: 3 %End @@ -550,42 +465,16 @@ Returns the icon name of the given ``layerType`` public: static QIcon iconPoint(); -%Docstring - -:rtype: QIcon -%End static QIcon iconLine(); -%Docstring - -:rtype: QIcon -%End static QIcon iconPolygon(); -%Docstring - -:rtype: QIcon -%End static QIcon iconTable(); -%Docstring - -:rtype: QIcon -%End static QIcon iconRaster(); -%Docstring - -:rtype: QIcon -%End static QIcon iconDefault(); -%Docstring - -:rtype: QIcon -%End virtual QString layerName() const; %Docstring :return: the layer name -:rtype: str - %End }; @@ -635,6 +524,7 @@ A directory: contains subdirectories and layers QgsDirectoryItem( QgsDataItem *parent, const QString &name, const QString &dirPath, const QString &path ); %Docstring Constructor. + :param parent: :param name: directory name :param dirPath: path to directory in file system @@ -648,10 +538,6 @@ Constructor. QString dirPath() const; -%Docstring - -:rtype: str -%End virtual bool equal( const QgsDataItem *other ); virtual QIcon icon(); @@ -662,8 +548,6 @@ Constructor. static bool hiddenPath( const QString &path ); %Docstring Check if the given path is hidden from the browser model - -:rtype: bool %End virtual QList actions( QWidget *parent ); @@ -694,6 +578,7 @@ Data item that can be used to represent QGIS projects. QgsProjectItem( QgsDataItem *parent, const QString &name, const QString &path ); %Docstring A data item holding a reference to a QGIS project file. + :param parent: The parent data item. :param name: The name of the of the project. Displayed to the user. :param path: The full path to the project. @@ -784,8 +669,6 @@ Renames the stored favorite with corresponding ``path`` a new ``name``. static QIcon iconFavorites(); %Docstring Icon for favorites group - -:rtype: QIcon %End virtual QVariant sortKey() const; @@ -811,42 +694,26 @@ A zip file: contains layers, using GDAL/OGR VSIFILE mechanism virtual QVector createChildren(); QStringList getZipFileList(); -%Docstring - -:rtype: list of str -%End static QStringList sProviderNames; static QString vsiPrefix( const QString &uri ); -%Docstring - -:rtype: str -%End static QgsDataItem *itemFromPath( QgsDataItem *parent, const QString &path, const QString &name ) /Factory/; %Docstring Creates a new data item from the specified path. - -:rtype: QgsDataItem %End static QgsDataItem *itemFromPath( QgsDataItem *parent, const QString &filePath, const QString &name, const QString &path ) /Factory,PyName=itemFromFilePath/; %Docstring Creates a new data item from the specified path. -:rtype: QgsDataItem - .. note:: available in Python as itemFromFilePath %End static QIcon iconZip(); -%Docstring - -:rtype: QIcon -%End }; diff --git a/python/core/qgsdataitemprovider.sip b/python/core/qgsdataitemprovider.sip index c9934f60f660..f474c06d8410 100644 --- a/python/core/qgsdataitemprovider.sip +++ b/python/core/qgsdataitemprovider.sip @@ -36,31 +36,23 @@ or directory being inspected, parent item is a valid QgsDirectoryItem virtual QString name() = 0; %Docstring Human-readable name of the provider name - -:rtype: str %End virtual int capabilities() = 0; %Docstring Return combination of flags from QgsDataProvider.DataCapabilities - -:rtype: int %End virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0 /Factory/; %Docstring Create a new instance of QgsDataItem (or null) for given path and parent item. Caller takes responsibility of deleting created items. - -:rtype: QgsDataItem %End virtual QVector createDataItems( const QString &path, QgsDataItem *parentItem ); %Docstring Create a vector of instances of QgsDataItem (or null) for given path and parent item. Caller takes responsibility of deleting created items. - -:rtype: list of QgsDataItem %End virtual bool handlesDirectoryPath( const QString &path ); @@ -73,8 +65,6 @@ provider to correctly populate relevant entries for the path. The default implementation returns false for all paths. -:rtype: bool - .. versionadded:: 3.0 %End }; diff --git a/python/core/qgsdataitemproviderregistry.sip b/python/core/qgsdataitemproviderregistry.sip index 3147574c3f8e..da365ef422c4 100644 --- a/python/core/qgsdataitemproviderregistry.sip +++ b/python/core/qgsdataitemproviderregistry.sip @@ -35,8 +35,6 @@ QgsApplication.dataItemProviderRegistry(). QList providers() const; %Docstring Get list of available providers - -:rtype: list of QgsDataItemProvider %End void addProvider( QgsDataItemProvider *provider /Transfer/ ); diff --git a/python/core/qgsdataprovider.sip b/python/core/qgsdataprovider.sip index 4ae7600e44b2..af620caabbf8 100644 --- a/python/core/qgsdataprovider.sip +++ b/python/core/qgsdataprovider.sip @@ -70,8 +70,6 @@ Create a new dataprovider with the specified in the ``uri``. Returns the coordinate system for the data source. If the provider isn't capable of returning its projection then an invalid QgsCoordinateReferenceSystem will be returned. - -:rtype: QgsCoordinateReferenceSystem %End @@ -79,6 +77,7 @@ QgsCoordinateReferenceSystem will be returned. %Docstring Set the data source specification. This may be a path or database connection string + :param uri: source specification %End @@ -86,11 +85,10 @@ connection string %Docstring Get the data source specification. This may be a path or database connection string + :param expandAuthConfig: Whether to expand any assigned authentication configuration :return: data source specification -:rtype: str - .. note:: @@ -110,8 +108,6 @@ Set the data source specification. %Docstring Get the data source specification. -:rtype: QgsDataSourceUri - .. versionadded:: 3.0 %End @@ -120,8 +116,6 @@ Get the data source specification. Returns the extent of the layer :return: QgsRectangle containing the extent of the layer -:rtype: QgsRectangle - %End @@ -129,8 +123,6 @@ Returns the extent of the layer %Docstring Returns true if this is a valid layer. It is up to individual providers to determine what constitutes a valid layer. - -:rtype: bool %End @@ -146,16 +138,12 @@ Set the subset string used to create a subset of features in the layer. This may be a sql where clause or any other string that can be used by the data provider to create a subset. Must be implemented in the dataprovider. - -:rtype: bool %End virtual bool supportsSubsetString() const; %Docstring Returns true if the provider supports setting of subset strings. - -:rtype: bool %End virtual QString subsetString() const; @@ -164,8 +152,6 @@ Returns the subset definition string (typically sql) currently in use by the layer and used by the provider to limit the feature set. Must be overridden in the dataprovider, otherwise returns a null QString. - -:rtype: str %End @@ -176,8 +162,6 @@ Sub-layers handled by this provider, in order from bottom to top Sub-layers are used when the provider's source can combine layers it knows about in some way before it hands them off to the provider. -:rtype: list of str - .. seealso:: SUBLAYER_SEPARATOR %End @@ -197,16 +181,12 @@ in order from bottom to top Sub-layer styles are used to abstract the way the provider's source can symbolise layers in some way at the server, before it serves them to the provider. - -:rtype: list of str %End virtual uint subLayerCount() const; %Docstring return the number of layers for the current data source - -:rtype: uint %End @@ -241,8 +221,6 @@ select a specific provider to open that file. Instead of being pure virtual, might be better to generalize this behavior and presume that none of the sub-classes are going to do anything strange with regards to their name or description? - -:rtype: str %End @@ -257,8 +235,6 @@ Return a terse string describing what the provider is. Instead of being pure virtual, might be better to generalize this behavior and presume that none of the sub-classes are going to do anything strange with regards to their name or description? - -:rtype: str %End @@ -271,8 +247,6 @@ supported by the data provider. Naturally this will be an empty string for those data providers that do not deal with plain files, such as databases and servers. -:rtype: str - .. note:: It'd be nice to eventually be raster/vector neutral. @@ -288,8 +262,6 @@ supported by the data provider. Naturally this will be an empty string for those data providers that do not deal with plain files, such as databases and servers. -:rtype: str - .. note:: It'd be nice to eventually be raster/vector neutral. @@ -304,15 +276,11 @@ synchronize with changes in the data source virtual QDateTime timestamp() const; %Docstring Time stamp of data source in the moment when data/metadata were loaded by provider - -:rtype: QDateTime %End virtual QDateTime dataTimestamp() const; %Docstring Current time stamp of data source - -:rtype: QDateTime %End virtual QgsError error() const; @@ -320,8 +288,6 @@ Current time stamp of data source Get current status error. This error describes some principal problem for which provider cannot work and thus is not valid. It is not last error after accessing data by block(), identify() etc. - -:rtype: QgsError %End virtual void invalidateConnections( const QString &connection ); @@ -351,8 +317,6 @@ a concept of stack of calls that must be handled by the provider. Only the first call to enterUpdateMode() will really turn update mode on. :return: true in case of success (or no-op implementation), false in case of failure. -:rtype: bool - .. versionadded:: 2.16 %End @@ -372,8 +336,6 @@ a concept of stack of calls that must be handled by the provider. Only the last call to leaveUpdateMode() will really turn update mode off. :return: true in case of success (or no-op implementation), false in case of failure. -:rtype: bool - .. versionadded:: 2.16 %End @@ -391,8 +353,6 @@ It depends on the provider which properties are supported. Get the current value of a certain provider property. It depends on the provider which properties are supported. -:rtype: QVariant - .. versionadded:: 2.16 %End diff --git a/python/core/qgsdatasourceuri.sip b/python/core/qgsdatasourceuri.sip index a75c9e38f247..a56b9f435e75 100644 --- a/python/core/qgsdatasourceuri.sip +++ b/python/core/qgsdatasourceuri.sip @@ -41,22 +41,16 @@ constructor which parses input URI QString connectionInfo( bool expandAuthConfig = true ) const; %Docstring return connection part of URI - -:rtype: str %End QString uri( bool expandAuthConfig = true ) const; %Docstring return complete uri - -:rtype: str %End QByteArray encodedUri() const; %Docstring return complete encoded uri (generic mode) - -:rtype: QByteArray %End @@ -68,8 +62,6 @@ set complete encoded uri (generic mode) QString quotedTablename() const; %Docstring quoted table name - -:rtype: str %End void setParam( const QString &key, const QString &value ); @@ -92,8 +84,6 @@ Set generic param (generic mode) %Docstring Remove generic param (generic mode) -:rtype: int - .. note:: remove all occurrences of key, returns number of params removed @@ -102,22 +92,16 @@ Remove generic param (generic mode) QString param( const QString &key ) const; %Docstring Get generic param (generic mode) - -:rtype: str %End QStringList params( const QString &key ) const; %Docstring Get multiple generic param (generic mode) - -:rtype: list of str %End bool hasParam( const QString &key ) const; %Docstring Test if param exists (generic mode) - -:rtype: bool %End void setConnection( const QString &aHost, @@ -173,50 +157,36 @@ set password static QString removePassword( const QString &aUri ); %Docstring Removes password element from uris - -:rtype: str %End QString authConfigId() const; %Docstring Any associated authentication configuration ID - -:rtype: str %End QString username() const; %Docstring Returns the username - -:rtype: str %End QString schema() const; %Docstring Returns the schema - -:rtype: str %End QString table() const; %Docstring Returns the table - -:rtype: str %End QString sql() const; %Docstring Returns the SQL query - -:rtype: str %End QString geometryColumn() const; %Docstring Return the name of the geometry column - -:rtype: str %End void setUseEstimatedMetadata( bool flag ); @@ -227,8 +197,6 @@ set use Estimated Metadata bool useEstimatedMetadata() const; %Docstring Returns true if estimated metadata are used - -:rtype: bool %End void disableSelectAtId( bool flag ); @@ -238,8 +206,6 @@ Set to true to disable selection by id bool selectAtIdDisabled() const; %Docstring Returns whether the selection by id is disabled - -:rtype: bool %End void clearSchema(); @@ -257,52 +223,34 @@ Sets the SQL query QString host() const; %Docstring Returns the host - -:rtype: str %End QString database() const; %Docstring Returns the database - -:rtype: str %End QString port() const; %Docstring Returns the port - -:rtype: str %End QString driver() const; -%Docstring - -:rtype: str -%End void setDriver( const QString &driver ); QString password() const; %Docstring Returns the password - -:rtype: str %End SslMode sslMode() const; %Docstring Returns the SSL mode - -:rtype: SslMode %End QString service() const; %Docstring Returns the service name - -:rtype: str %End QString keyColumn() const; %Docstring Returns the name of the (primary) key column - -:rtype: str %End void setKeyColumn( const QString &column ); %Docstring @@ -312,8 +260,6 @@ Sets the name of the (primary) key column QgsWkbTypes::Type wkbType() const; %Docstring The wkb type. - -:rtype: QgsWkbTypes.Type %End void setWkbType( QgsWkbTypes::Type type ); @@ -324,8 +270,6 @@ Sets the wkb type QString srid() const; %Docstring Returns the srid - -:rtype: str %End void setSrid( const QString &srid ); %Docstring diff --git a/python/core/qgsdatetimestatisticalsummary.sip b/python/core/qgsdatetimestatisticalsummary.sip index 5222a270dd84..58ba294eafd3 100644 --- a/python/core/qgsdatetimestatisticalsummary.sip +++ b/python/core/qgsdatetimestatisticalsummary.sip @@ -44,6 +44,7 @@ specifying the statistic in the constructor or via setStatistics(). QgsDateTimeStatisticalSummary( QgsDateTimeStatisticalSummary::Statistics stats = All ); %Docstring Constructor for QgsDateTimeStatisticalSummary + :param stats: flags for statistics to calculate %End @@ -52,8 +53,6 @@ Constructor for QgsDateTimeStatisticalSummary Returns flags which specify which statistics will be calculated. Some statistics are always calculated (e.g., count). -:rtype: Statistics - .. seealso:: :py:func:`setStatistics` %End @@ -61,6 +60,7 @@ are always calculated (e.g., count). %Docstring Sets flags which specify which statistics will be calculated. Some statistics are always calculated (e.g., count). + :param stats: flags for statistics to calculate .. seealso:: :py:func:`statistics` @@ -75,6 +75,7 @@ Resets the calculated values %Docstring Calculates summary statistics for a list of variants. Any non-datetime variants will be ignored. + :param values: list of variants .. seealso:: :py:func:`addValue()` @@ -86,6 +87,7 @@ Adds a single datetime to the statistics calculation. Calling this method allows datetimes to be added to the calculation one at a time. For large quantities of dates this may be more efficient then first adding all the variants to a list and calling calculate(). + :param value: datetime to add. Any non-datetime variants will be ignored. .. note:: @@ -114,68 +116,52 @@ any calculated datetime statistics. QVariant statistic( QgsDateTimeStatisticalSummary::Statistic stat ) const; %Docstring Returns the value of a specified statistic + :param stat: statistic to return :return: calculated value of statistic -:rtype: QVariant - %End int count() const; %Docstring Returns the calculated count of values. - -:rtype: int %End int countDistinct() const; %Docstring Returns the number of distinct datetime values. - -:rtype: int %End QSet< QDateTime > distinctValues() const; %Docstring Returns the set of distinct datetime values. - -:rtype: set of QDateTime %End int countMissing() const; %Docstring Returns the number of missing (null) datetime values. - -:rtype: int %End QDateTime min() const; %Docstring Returns the minimum (earliest) non-null datetime value. - -:rtype: QDateTime %End QDateTime max() const; %Docstring Returns the maximum (latest) non-null datetime value. - -:rtype: QDateTime %End QgsInterval range() const; %Docstring Returns the range (interval between earliest and latest non-null datetime values). - -:rtype: QgsInterval %End static QString displayName( QgsDateTimeStatisticalSummary::Statistic statistic ); %Docstring Returns the friendly display name for a statistic -:param statistic: statistic to return name for -:rtype: str +:param statistic: statistic to return name for %End }; diff --git a/python/core/qgsdefaultvalue.sip b/python/core/qgsdefaultvalue.sip index 2335f79f075a..064b57ca5244 100644 --- a/python/core/qgsdefaultvalue.sip +++ b/python/core/qgsdefaultvalue.sip @@ -50,8 +50,6 @@ Create a new default value with the given ``expression`` and ``applyOnUpdate`` f %Docstring The expression will be evaluated whenever a default value needs to be calculated for a field. - -:rtype: str %End void setExpression( const QString &expression ); @@ -64,8 +62,6 @@ to be calculated for a field. %Docstring The applyOnUpdate flag determines if this expression should also be applied when a feature is updated or only when it's created. - -:rtype: bool %End void setApplyOnUpdate( bool applyOnUpdate ); @@ -79,8 +75,6 @@ applied when a feature is updated or only when it's created. Returns if this default value should be applied. :return: false if the expression is a null string. -:rtype: bool - %End operator bool() const; diff --git a/python/core/qgsdiagramrenderer.sip b/python/core/qgsdiagramrenderer.sip index 3e9b6cb34cb4..678f33e0a017 100644 --- a/python/core/qgsdiagramrenderer.sip +++ b/python/core/qgsdiagramrenderer.sip @@ -66,8 +66,6 @@ QgsDiagramLayerSettings stores settings which control how ALL diagrams within a %Docstring Returns the diagram property definitions. -:rtype: QgsPropertiesDefinition - .. versionadded:: 3.0 %End @@ -88,8 +86,6 @@ Copy constructor %Docstring Returns the diagram placement. -:rtype: Placement - .. seealso:: :py:func:`setPlacement()` .. versionadded:: 2.16 @@ -98,6 +94,7 @@ Returns the diagram placement. void setPlacement( Placement value ); %Docstring Sets the diagram placement. + :param value: placement value .. seealso:: :py:func:`placement()` @@ -110,8 +107,6 @@ Sets the diagram placement. Returns the diagram placement flags. These are only used if the diagram placement is set to a line type. -:rtype: LinePlacementFlags - .. seealso:: :py:func:`setLinePlacementFlags()` .. versionadded:: 2.16 @@ -121,6 +116,7 @@ is set to a line type. %Docstring Sets the the diagram placement flags. These are only used if the diagram placement is set to a line type. + :param flags: placement value .. seealso:: :py:func:`getPlacement()` @@ -133,8 +129,6 @@ is set to a line type. Returns the diagram priority. :return: diagram priority, where 0 = low and 10 = high -:rtype: int - .. note:: @@ -149,6 +143,7 @@ and vice-versa void setPriority( int value ); %Docstring Sets the diagram priority. + :param value: priority, where 0 = low and 10 = high .. seealso:: :py:func:`priority()` @@ -161,8 +156,6 @@ Sets the diagram priority. Returns the diagram z-index. Diagrams (or labels) with a higher z-index are drawn over diagrams with a lower z-index. -:rtype: float - .. note:: z-index ordering is shared with labeling, so diagrams with a high z-index may be drawn over labels @@ -177,6 +170,7 @@ with a low z-index and vice-versa %Docstring Sets the diagram z-index. Diagrams (or labels) with a higher z-index are drawn over diagrams with a lower z-index. + :param index: diagram z-index .. seealso:: :py:func:`zIndex()` @@ -188,8 +182,6 @@ with a lower z-index. %Docstring Returns whether the feature associated with a diagram acts as an obstacle for other labels or diagrams. -:rtype: bool - .. seealso:: :py:func:`setIsObstacle()` .. versionadded:: 2.16 @@ -198,6 +190,7 @@ Returns whether the feature associated with a diagram acts as an obstacle for ot void setIsObstacle( bool isObstacle ); %Docstring Sets whether the feature associated with a diagram acts as an obstacle for other labels or diagrams. + :param isObstacle: set to true for feature to act as obstacle .. seealso:: :py:func:`isObstacle()` @@ -209,8 +202,6 @@ Sets whether the feature associated with a diagram acts as an obstacle for other %Docstring Returns the distance between the diagram and the feature (in mm). -:rtype: float - .. seealso:: :py:func:`setDistance()` .. versionadded:: 2.16 @@ -219,6 +210,7 @@ Returns the distance between the diagram and the feature (in mm). void setDistance( double distance ); %Docstring Sets the distance between the diagram and the feature. + :param distance: distance in mm .. seealso:: :py:func:`distance()` @@ -230,8 +222,6 @@ Sets the distance between the diagram and the feature. %Docstring Returns the diagram renderer associated with the layer. -:rtype: QgsDiagramRenderer - .. seealso:: :py:func:`setRenderer()` .. versionadded:: 2.16 @@ -241,6 +231,7 @@ Returns the diagram renderer associated with the layer. void setRenderer( QgsDiagramRenderer *diagramRenderer /Transfer/ ); %Docstring Sets the diagram renderer associated with the layer. + :param diagramRenderer: diagram renderer. Ownership is transferred to the object. .. seealso:: :py:func:`renderer()` @@ -253,8 +244,6 @@ Sets the diagram renderer associated with the layer. Returns the coordinate transform associated with the layer, or an invalid transform if no transformation is required. -:rtype: QgsCoordinateTransform - .. seealso:: :py:func:`setCoordinateTransform()` .. versionadded:: 2.16 @@ -263,6 +252,7 @@ invalid transform if no transformation is required. void setCoordinateTransform( const QgsCoordinateTransform &transform ); %Docstring Sets the coordinate transform associated with the layer. + :param transform: coordinate transform. Ownership is transferred to the object. .. seealso:: :py:func:`coordinateTransform()` @@ -274,8 +264,6 @@ Sets the coordinate transform associated with the layer. %Docstring Returns whether the layer should show all diagrams, including overlapping diagrams -:rtype: bool - .. seealso:: :py:func:`setShowAllDiagrams()` .. versionadded:: 2.16 @@ -284,6 +272,7 @@ Returns whether the layer should show all diagrams, including overlapping diagra void setShowAllDiagrams( bool showAllDiagrams ); %Docstring Sets whether the layer should show all diagrams, including overlapping diagrams + :param showAllDiagrams: set to true to show all diagrams .. seealso:: :py:func:`showAllDiagrams()` @@ -311,17 +300,14 @@ Prepares the diagrams for a specified expression context. Calling prepare before multiple diagrams allows precalculation of expensive setup tasks such as parsing expressions. Returns true if preparation was successful. -:rtype: bool - .. versionadded:: 3.0 %End QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const; %Docstring Returns the set of any fields referenced by the layer's diagrams. -:param context: expression context the diagrams will be drawn using -:rtype: set of str +:param context: expression context the diagrams will be drawn using .. versionadded:: 2.16 %End @@ -330,8 +316,6 @@ Returns the set of any fields referenced by the layer's diagrams. %Docstring Returns a reference to the diagram's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. versionadded:: 3.0 .. seealso:: :py:func:`setDataDefinedProperties()` @@ -341,6 +325,7 @@ Returns a reference to the diagram's property collection, used for data defined void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the diagram's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. versionadded:: 3.0 @@ -480,8 +465,6 @@ Writes diagram settings to XML %Docstring Returns list of legend nodes for the diagram -:rtype: list of QgsLayerTreeModelLegendNode - .. note:: caller is responsible for deletion of QgsLayerTreeModelLegendNodes @@ -546,37 +529,26 @@ Constructor for QgsDiagramRenderer. %Docstring Returns new instance that is equivalent to this one -:rtype: QgsDiagramRenderer - .. versionadded:: 2.4 %End virtual QSizeF sizeMapUnits( const QgsFeature &feature, const QgsRenderContext &c ) const; %Docstring Returns size of the diagram for a feature in map units. Returns an invalid QSizeF in case of error - -:rtype: QSizeF %End virtual QString rendererName() const = 0; -%Docstring - -:rtype: str -%End virtual QList diagramAttributes() const = 0; %Docstring Returns attribute indices needed for diagram rendering - -:rtype: list of str %End virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const; %Docstring Returns the set of any fields required for diagram rendering -:param context: expression context the diagrams will be drawn using -:rtype: set of str +:param context: expression context the diagrams will be drawn using .. versionadded:: 2.16 %End @@ -588,16 +560,10 @@ Renders the diagram for a specified feature at a specific position in the passed void setDiagram( QgsDiagram *d /Transfer/ ); QgsDiagram *diagram() const; -%Docstring - -:rtype: QgsDiagram -%End virtual QList diagramSettings() const = 0; %Docstring Returns list with all diagram settings in the renderer - -:rtype: list of QgsDiagramSettings %End virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) = 0; @@ -620,8 +586,6 @@ by their writeXml implementation to save the general QgsDiagramRenderer settings %Docstring Returns list of legend nodes for the diagram -:rtype: list of QgsLayerTreeModelLegendNode - .. note:: caller is responsible for deletion of QgsLayerTreeModelLegendNodes @@ -633,8 +597,6 @@ Returns list of legend nodes for the diagram %Docstring Returns true if renderer will show legend items for diagram attributes. -:rtype: bool - .. versionadded:: 2.16 .. seealso:: :py:func:`setAttributeLegend()` @@ -645,6 +607,7 @@ Returns true if renderer will show legend items for diagram attributes. void setAttributeLegend( bool enabled ); %Docstring Sets whether the renderer will show legend items for diagram attributes. + :param enabled: set to true to show diagram attribute legend .. versionadded:: 2.16 @@ -660,18 +623,15 @@ Sets whether the renderer will show legend items for diagram attributes. virtual bool diagramSettings( const QgsFeature &feature, const QgsRenderContext &c, QgsDiagramSettings &s ) const = 0; %Docstring Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered). Used internally within renderDiagram() + :param feature: the feature :param c: render context :param s: out: diagram settings for the feature - -:rtype: bool %End virtual QSizeF diagramSize( const QgsFeature &features, const QgsRenderContext &c ) const = 0; %Docstring Returns size of the diagram (in painter units) or an invalid size in case of error - -:rtype: QSizeF %End void convertSizeToMapUnits( QSizeF &size, const QgsRenderContext &context ) const; @@ -682,8 +642,6 @@ Converts size from mm to map units static int dpiPaintDevice( const QPainter * ); %Docstring Returns the paint device dpi (or -1 in case of error - -:rtype: int %End @@ -766,8 +724,6 @@ class QgsLinearlyInterpolatedDiagramRenderer : QgsDiagramRenderer %Docstring Returns list with all diagram settings in the renderer - -:rtype: list of QgsDiagramSettings %End void setDiagramSettings( const QgsDiagramSettings &s ); @@ -782,38 +738,20 @@ Returns list with all diagram settings in the renderer void setLowerValue( double val ); double lowerValue() const; -%Docstring - -:rtype: float -%End void setUpperValue( double val ); double upperValue() const; -%Docstring - -:rtype: float -%End void setLowerSize( QSizeF s ); QSizeF lowerSize() const; -%Docstring - -:rtype: QSizeF -%End void setUpperSize( QSizeF s ); QSizeF upperSize() const; -%Docstring - -:rtype: QSizeF -%End QString classificationField() const; %Docstring Returns the field name used for interpolating the diagram size. -:rtype: str - .. seealso:: :py:func:`setClassificationField()` .. versionadded:: 3.0 @@ -829,17 +767,9 @@ Sets the field name used for interpolating the diagram size. %End QString classificationAttributeExpression() const; -%Docstring - -:rtype: str -%End void setClassificationAttributeExpression( const QString &expression ); bool classificationAttributeIsExpression() const; -%Docstring - -:rtype: bool -%End void setClassificationAttributeIsExpression( bool isExpression ); virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ); @@ -861,8 +791,6 @@ Configures appearance of legend. Takes ownership of the passed settings objects. %Docstring Returns configuration of appearance of legend. Will return null if no configuration has been set. -:rtype: QgsDataDefinedSizeLegend - .. versionadded:: 3.0 %End diff --git a/python/core/qgsdistancearea.sip b/python/core/qgsdistancearea.sip index a4c6cc6bfcf4..d6931d9f98d6 100644 --- a/python/core/qgsdistancearea.sip +++ b/python/core/qgsdistancearea.sip @@ -45,8 +45,6 @@ Constructor Returns whether calculations will use the ellipsoid. Calculations will only use the ellipsoid if a valid ellipsoid() has been set. -:rtype: bool - .. versionadded:: 2.14 .. seealso:: :py:func:`ellipsoid()` @@ -65,8 +63,6 @@ Sets source spatial reference system. %Docstring Returns the source spatial reference system. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setSourceCrs()` %End @@ -77,8 +73,6 @@ retrieved using QgsEllipsoidUtils.acronyms(). Calculations will only use the ellipsoid if a valid ellipsoid has been set. :return: true if ellipsoid was successfully set -:rtype: bool - .. seealso:: :py:func:`ellipsoid()` @@ -91,8 +85,6 @@ Sets ellipsoid by supplied radii. Calculations will only use the ellipsoid if a valid ellipsoid been set. :return: true if ellipsoid was successfully set -:rtype: bool - .. seealso:: :py:func:`ellipsoid()` @@ -104,8 +96,6 @@ a valid ellipsoid been set. Returns ellipsoid's acronym. Calculations will only use the ellipsoid if a valid ellipsoid has been set. -:rtype: str - .. seealso:: :py:func:`setEllipsoid()` .. seealso:: :py:func:`willUseEllipsoid()` @@ -115,8 +105,6 @@ ellipsoid if a valid ellipsoid has been set. %Docstring Returns the ellipsoid's semi major axis. -:rtype: float - .. seealso:: :py:func:`ellipsoid()` .. seealso:: :py:func:`ellipsoidSemiMinor()` @@ -128,8 +116,6 @@ Returns the ellipsoid's semi major axis. %Docstring Returns ellipsoid's semi minor axis. -:rtype: float - .. seealso:: :py:func:`ellipsoid()` .. seealso:: :py:func:`ellipsoidSemiMajor()` @@ -142,8 +128,6 @@ Returns ellipsoid's semi minor axis. Returns ellipsoid's inverse flattening. The inverse flattening is calculated with invf = a/(a-b). -:rtype: float - .. seealso:: :py:func:`ellipsoid()` .. seealso:: :py:func:`ellipsoidSemiMajor()` @@ -154,11 +138,10 @@ The inverse flattening is calculated with invf = a/(a-b). double measureArea( const QgsGeometry &geometry ) const; %Docstring Measures the area of a geometry. + :param geometry: geometry to measure :return: area of geometry. For geometry collections, non surface geometries will be ignored. The units for the -:rtype: float - returned area can be retrieved by calling areaUnits(). .. versionadded:: 2.12 @@ -173,11 +156,10 @@ returned area can be retrieved by calling areaUnits(). double measureLength( const QgsGeometry &geometry ) const; %Docstring Measures the length of a geometry. + :param geometry: geometry to measure :return: length of geometry. For geometry collections, non curve geometries will be ignored. The units for the -:rtype: float - returned distance can be retrieved by calling lengthUnits(). .. versionadded:: 2.12 @@ -192,11 +174,10 @@ returned distance can be retrieved by calling lengthUnits(). double measurePerimeter( const QgsGeometry &geometry ) const; %Docstring Measures the perimeter of a polygon geometry. + :param geometry: geometry to measure :return: perimeter of geometry. For geometry collections, any non-polygon geometries will be ignored. The units for the -:rtype: float - returned perimeter can be retrieved by calling lengthUnits(). .. versionadded:: 2.12 @@ -211,11 +192,10 @@ returned perimeter can be retrieved by calling lengthUnits(). double measureLine( const QVector &points ) const; %Docstring Measures the length of a line with multiple segments. + :param points: list of points in line :return: length of line. The units for the returned length can be retrieved by calling lengthUnits(). -:rtype: float - .. seealso:: :py:func:`lengthUnits()` %End @@ -223,12 +203,11 @@ Measures the length of a line with multiple segments. double measureLine( const QgsPointXY &p1, const QgsPointXY &p2 ) const; %Docstring Measures the distance between two points. + :param p1: start of line :param p2: end of line :return: distance between points. The units for the returned distance can be retrieved by calling lengthUnits(). -:rtype: float - .. seealso:: :py:func:`lengthUnits()` %End @@ -241,9 +220,8 @@ otherwise QgsPoint.project() will be called after QgsUnitTypes.fromUnitToUnitFac \note: The input Point must be in the coordinate reference system being used -:rtype: float - .. versionadded:: 3.0 + :param p1: start point [can be Cartesian or Geographic] :param distance: must be in meters :param azimuth: - azimuth in radians, clockwise from North @@ -260,8 +238,6 @@ The input Point must be in the coordinate reference system being used %Docstring Returns the units of distance for length calculations made by this object. -:rtype: QgsUnitTypes.DistanceUnit - .. versionadded:: 2.14 .. seealso:: :py:func:`areaUnits()` @@ -271,8 +247,6 @@ Returns the units of distance for length calculations made by this object. %Docstring Returns the units of area for areal calculations made by this object. -:rtype: QgsUnitTypes.AreaUnit - .. versionadded:: 2.14 .. seealso:: :py:func:`lengthUnits()` @@ -281,20 +255,17 @@ Returns the units of area for areal calculations made by this object. double measurePolygon( const QVector &points ) const; %Docstring Measures the area of the polygon described by a set of points. - -:rtype: float %End double bearing( const QgsPointXY &p1, const QgsPointXY &p2 ) const; %Docstring Computes the bearing (in radians) between two points. - -:rtype: float %End static QString formatDistance( double distance, int decimals, QgsUnitTypes::DistanceUnit unit, bool keepBaseUnit = false ); %Docstring Returns an distance formatted as a friendly string. + :param distance: distance to format :param decimals: number of decimal places to show :param unit: unit of distance @@ -302,8 +273,6 @@ Returns an distance formatted as a friendly string. kilometers :return: formatted distance string -:rtype: str - .. versionadded:: 2.16 @@ -313,6 +282,7 @@ kilometers static QString formatArea( double area, int decimals, QgsUnitTypes::AreaUnit unit, bool keepBaseUnit = false ); %Docstring Returns an area formatted as a friendly string. + :param area: area to format :param decimals: number of decimal places to show :param unit: unit of area @@ -320,8 +290,6 @@ Returns an area formatted as a friendly string. square kilometers :return: formatted area string -:rtype: str - .. versionadded:: 2.14 @@ -332,13 +300,12 @@ square kilometers %Docstring Takes a length measurement calculated by this QgsDistanceArea object and converts it to a different distance unit. + :param length: length value calculated by this class to convert. It is assumed that the length was calculated by this class, ie that its unit of length is equal to lengthUnits(). :param toUnits: distance unit to convert measurement to :return: converted distance -:rtype: float - .. seealso:: :py:func:`convertAreaMeasurement()` @@ -349,13 +316,12 @@ was calculated by this class, ie that its unit of length is equal to lengthUnits %Docstring Takes an area measurement calculated by this QgsDistanceArea object and converts it to a different areal unit. + :param area: area value calculated by this class to convert. It is assumed that the area was calculated by this class, ie that its unit of area is equal to areaUnits(). :param toUnits: area unit to convert measurement to :return: converted area -:rtype: float - .. seealso:: :py:func:`convertLengthMeasurement()` @@ -369,8 +335,6 @@ location of the projected point. Based on Vincenty's formula for the geodetic direct problem as described in "Geocentric Datum of Australia Technical Manual", Chapter 4. -:rtype: QgsPointXY - .. note:: code (and documentation) taken from rttopo project @@ -381,6 +345,7 @@ https://git.osgeo.org/gogs/rttopo/librttopo --> latitudes outside these bounds cause the calculations to become unstable and can return invalid results .. versionadded:: 3.0 + :param p1: - location of first geographic (latitude/longitude) point as degrees. :param distance: - distance in meters. :param azimuth: - azimuth in radians, clockwise from North diff --git a/python/core/qgseditformconfig.sip b/python/core/qgseditformconfig.sip index 3efbc31105fb..6597bc59b33d 100644 --- a/python/core/qgseditformconfig.sip +++ b/python/core/qgseditformconfig.sip @@ -85,8 +85,6 @@ This is only useful in combination with EditorLayout.TabLayout. QList< QgsAttributeEditorElement * > tabs() const; %Docstring Returns a list of tabs for EditorLayout.TabLayout obtained from the invisible root container. - -:rtype: list of QgsAttributeEditorElement %End void clearTabs(); @@ -98,16 +96,12 @@ Clears all the tabs for the attribute editor form with EditorLayout.TabLayout. %Docstring Get the invisible root container for the drag and drop designer form (EditorLayout.TabLayout). -:rtype: QgsAttributeEditorContainer - .. versionadded:: 3 %End EditorLayout layout() const; %Docstring Get the active layout style for the attribute editor for this layer - -:rtype: EditorLayout %End void setLayout( EditorLayout editorLayout ); @@ -118,8 +112,6 @@ Set the active layout style for the attribute editor for this layer QString uiForm() const; %Docstring Get path to the .ui form. Only meaningful with EditorLayout.UiFileLayout. - -:rtype: str %End void setUiForm( const QString &ui ); @@ -145,8 +137,6 @@ layer.setEditFormConfig(editFormConfig) :param config: The config to set for this widget :return: false if a field exists with the provided widgetName. In this case -:rtype: bool - QgsVectorLayer.setEditorWidgetSetup should be used. .. seealso:: :py:func:`QgsVectorLayer.setEditorWidgetSetup()` @@ -159,8 +149,6 @@ Get the configuration for the editor widget with the given name. :param widgetName: The name of the widget. :return: The configuration for the editor widget or an empty config if the field does not exist -:rtype: QVariantMap - %End bool removeWidgetConfig( const QString &widgetName ); @@ -170,16 +158,12 @@ Remove the configuration for the editor widget with the given name :param widgetName: The name of the widget. :return: true if a configuration has been removed -:rtype: bool - %End bool readOnly( int idx ) const; %Docstring This returns true if the field is manually set to read only or if the field does not support editing like joins or virtual fields. - -:rtype: bool %End void setReadOnly( int idx, bool readOnly = true ); @@ -193,8 +177,6 @@ If this returns true, the widget at the given index will receive its label on th while if it returns false, the widget will receive its label on the left hand side. Labeling on top leaves more horizontal space for the widget itself. * - -:rtype: bool %End void setLabelOnTop( int idx, bool onTop ); @@ -214,8 +196,6 @@ Get Python function for edit form initialization. Will be looked up in a Python file relative to the project folder if it includes a module name or if it's a pure function name it will searched in the Python code set with setInitCode(). - -:rtype: str %End void setInitFunction( const QString &function ); @@ -229,8 +209,6 @@ in the Python code set with setInitCode(). QString initCode() const; %Docstring Get Python code for edit form initialization. - -:rtype: str %End void setInitCode( const QString &code ); @@ -243,8 +221,6 @@ setInitFunction(). QString initFilePath() const; %Docstring Get Python external file path for edit form initialization. - -:rtype: str %End void setInitFilePath( const QString &filePath ); @@ -259,8 +235,6 @@ setInitFunction(). Return Python code source for edit form initialization (if it shall be loaded from a file, read from the provided dialog editor or inherited from the environment) - -:rtype: PythonInitCodeSource %End void setInitCodeSource( PythonInitCodeSource initCodeSource ); @@ -271,8 +245,6 @@ Set if Python code shall be used for edit form initialization and its origin FeatureFormSuppress suppress() const; %Docstring Type of feature form pop-up suppression after feature creation (overrides app setting) - -:rtype: FeatureFormSuppress %End void setSuppress( FeatureFormSuppress s ); %Docstring @@ -295,8 +267,6 @@ Serialize on project save QgsAttributeEditorElement *attributeEditorElementFromDomElement( QDomElement &elem, QgsAttributeEditorElement *parent ); %Docstring Deserialize drag and drop designer elements. - -:rtype: QgsAttributeEditorElement %End explicit QgsEditFormConfig(); diff --git a/python/core/qgseditorwidgetsetup.sip b/python/core/qgseditorwidgetsetup.sip index a7c22606e117..59628803cb08 100644 --- a/python/core/qgseditorwidgetsetup.sip +++ b/python/core/qgseditorwidgetsetup.sip @@ -35,24 +35,18 @@ Constructor for QgsEditorWidgetSetup %Docstring :return: the widget type to use -:rtype: str - %End QVariantMap config() const; %Docstring :return: the widget configuration to used -:rtype: QVariantMap - %End bool isNull() const; %Docstring :return: true if there is no widget configured. -:rtype: bool - %End }; diff --git a/python/core/qgsellipsoidutils.sip b/python/core/qgsellipsoidutils.sip index c9e1ab219c68..f4bf914c357a 100644 --- a/python/core/qgsellipsoidutils.sip +++ b/python/core/qgsellipsoidutils.sip @@ -73,8 +73,6 @@ Ellipsoid parameters %Docstring Returns the parameters for the specified ``ellipsoid``. Results are cached to allow for fast retrieval of parameters. - -:rtype: EllipsoidParameters %End static QList< QgsEllipsoidUtils::EllipsoidDefinition > definitions(); @@ -82,8 +80,6 @@ Results are cached to allow for fast retrieval of parameters. Returns a list of the definitions for all known ellipsoids from the internal ellipsoid database. -:rtype: list of QgsEllipsoidUtils.EllipsoidDefinition - .. seealso:: :py:func:`acronyms()` %End @@ -92,8 +88,6 @@ internal ellipsoid database. Returns a list of all known ellipsoid acronyms from the internal ellipsoid database. -:rtype: list of str - .. seealso:: :py:func:`definitions()` %End diff --git a/python/core/qgserror.sip b/python/core/qgserror.sip index d185e92def97..86040f7b2a03 100644 --- a/python/core/qgserror.sip +++ b/python/core/qgserror.sip @@ -34,6 +34,7 @@ Constructor for QgsErrorMessage QgsErrorMessage( const QString &message, const QString &tag = QString(), const QString &file = QString(), const QString &function = QString(), int line = 0 ); %Docstring Constructor. + :param message: error message string :param tag: error label, for example GDAL, GDAL Provider, Raster layer :param file: the file where error was created @@ -42,30 +43,10 @@ Constructor. %End QString message() const; -%Docstring - -:rtype: str -%End QString tag() const; -%Docstring - -:rtype: str -%End QString file() const; -%Docstring - -:rtype: str -%End QString function() const; -%Docstring - -:rtype: str -%End int line() const; -%Docstring - -:rtype: int -%End }; @@ -90,6 +71,7 @@ Constructor for QgsError QgsError( const QString &message, const QString &tag ); %Docstring Constructor with single message. + :param message: error message :param tag: short description, e.g. GDAL, Provider, Layer %End @@ -97,6 +79,7 @@ Constructor with single message. void append( const QString &message, const QString &tag ); %Docstring Append new error message. + :param message: error message string :param tag: error label, for example GDAL, GDAL Provider, Raster layer %End @@ -104,6 +87,7 @@ Append new error message. void append( const QgsErrorMessage &message ); %Docstring Append new error message. + :param message: error message %End @@ -112,18 +96,15 @@ Append new error message. Test if any error is set. :return: true if contains error -:rtype: bool - %End QString message( QgsErrorMessage::Format format = QgsErrorMessage::Html ) const; %Docstring Full error messages description + :param format: output format :return: error report -:rtype: str - %End QString summary() const; @@ -131,8 +112,6 @@ Full error messages description Short error description, usually the first error in chain, the real error. :return: error description -:rtype: str - %End void clear(); @@ -145,8 +124,6 @@ Clear error messages messageList return the list of current error messages :return: current list of error messages -:rtype: list of QgsErrorMessage - %End }; diff --git a/python/core/qgsexpressioncontext.sip b/python/core/qgsexpressioncontext.sip index 45e0b7f9f9ce..4706b2a7304e 100644 --- a/python/core/qgsexpressioncontext.sip +++ b/python/core/qgsexpressioncontext.sip @@ -60,8 +60,6 @@ Create a new QgsScopedExpressionFunction using named parameters. virtual QgsScopedExpressionFunction *clone() const = 0 /Factory/; %Docstring Returns a clone of the function. - -:rtype: QgsScopedExpressionFunction %End virtual bool usesGeometry( const QgsExpressionNodeFunction *node ) const; @@ -101,6 +99,7 @@ See QgsExpressionContextUtils for helper methods for working with QgsExpressionC StaticVariable( const QString &name = QString(), const QVariant &value = QVariant(), bool readOnly = false, bool isStatic = false, const QString &description = QString() ); %Docstring Constructor for StaticVariable. + :param name: variable name (should be unique within the QgsExpressionContextScope) :param value: initial variable value :param readOnly: true if variable should not be editable by users @@ -137,6 +136,7 @@ Translated description of variable, for use within expression builder widgets. QgsExpressionContextScope( const QString &name = QString() ); %Docstring Constructor for QgsExpressionContextScope + :param name: friendly display name for the context scope %End @@ -151,8 +151,6 @@ Copy constructor QString name() const; %Docstring Returns the friendly display name of the context scope. - -:rtype: str %End void setVariable( const QString &name, const QVariant &value, bool isStatic = false ); @@ -169,6 +167,7 @@ of QgsExpression.prepare(). %Docstring Adds a variable into the context scope. If a variable with the same name is already set then its value is overwritten, otherwise a new variable is added to the scope. + :param variable: definition of variable to insert .. seealso:: :py:func:`setVariable()` @@ -179,22 +178,20 @@ value is overwritten, otherwise a new variable is added to the scope. bool removeVariable( const QString &name ); %Docstring Removes a variable from the context scope, if found. + :param name: name of variable to remove :return: true if variable was removed from the scope, false if matching variable was not -:rtype: bool - found within the scope %End bool hasVariable( const QString &name ) const; %Docstring Tests whether a variable with the specified name exists in the scope. + :param name: variable name :return: true if matching variable was found in the scope -:rtype: bool - .. seealso:: :py:func:`variable()` @@ -204,11 +201,10 @@ Tests whether a variable with the specified name exists in the scope. QVariant variable( const QString &name ) const; %Docstring Retrieves a variable's value from the scope. + :param name: variable name :return: variable value, or invalid QVariant if matching variable could not be found -:rtype: QVariant - .. seealso:: :py:func:`hasVariable()` @@ -219,8 +215,6 @@ Retrieves a variable's value from the scope. %Docstring Returns a list of variable names contained within the scope. -:rtype: list of str - .. seealso:: :py:func:`functionNames()` .. seealso:: :py:func:`filteredVariableNames()` @@ -232,8 +226,6 @@ Returns a filtered and sorted list of variable names contained within the scope. Hidden variable names will be excluded, and the list will be sorted so that read only variables are listed first. -:rtype: list of str - .. seealso:: :py:func:`variableNames()` %End @@ -241,11 +233,10 @@ read only variables are listed first. %Docstring Tests whether the specified variable is read only and should not be editable by users. + :param name: variable name :return: true if variable is read only -:rtype: bool - %End bool isStatic( const QString &name ) const; @@ -253,8 +244,6 @@ by users. Tests whether the variable with the specified ``name`` is static and can be cached. -:rtype: bool - .. versionadded:: 3.0 %End @@ -263,26 +252,21 @@ be cached. Returns the translated description for the variable with the specified ``name`` (if set). -:rtype: str - .. versionadded:: 3.0 %End int variableCount() const; %Docstring Returns the count of variables contained within the scope. - -:rtype: int %End bool hasFunction( const QString &name ) const; %Docstring Tests whether a function with the specified name exists in the scope. + :param name: function name :return: true if matching function was found in the scope -:rtype: bool - .. seealso:: :py:func:`function()` @@ -292,11 +276,10 @@ Tests whether a function with the specified name exists in the scope. QgsExpressionFunction *function( const QString &name ) const; %Docstring Retrieves a function from the scope. + :param name: function name :return: function, or null if matching function could not be found -:rtype: QgsExpressionFunction - .. seealso:: :py:func:`hasFunction()` @@ -309,8 +292,6 @@ Retrieves a function from the scope. %Docstring Retrieves a list of names of functions contained in the scope. -:rtype: list of str - .. seealso:: :py:func:`function()` .. seealso:: :py:func:`variableNames()` @@ -319,6 +300,7 @@ Retrieves a list of names of functions contained in the scope. void addFunction( const QString &name, QgsScopedExpressionFunction *function /Transfer/ ); %Docstring Adds a function to the scope. + :param name: function name :param function: function to insert. Ownership is transferred to the scope. @@ -329,8 +311,6 @@ Adds a function to the scope. %Docstring Returns true if the scope has a feature associated with it. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`feature()` @@ -340,8 +320,6 @@ Returns true if the scope has a feature associated with it. %Docstring Sets the feature associated with the scope. -:rtype: QgsFeature - .. seealso:: :py:func:`setFeature()` .. seealso:: :py:func:`hasFeature()` @@ -353,6 +331,7 @@ Sets the feature associated with the scope. %Docstring Convenience function for setting a feature for the scope. Any existing feature set by the scope will be overwritten. + :param feature: feature for scope .. seealso:: :py:func:`removeFeature()` @@ -375,6 +354,7 @@ Removes any feature associated with the scope. %Docstring Convenience function for setting a fields for the scope. Any existing fields set by the scope will be overwritten. + :param fields: fields for scope %End @@ -424,11 +404,10 @@ Copy constructor bool hasVariable( const QString &name ) const; %Docstring Check whether a variable is specified by any scope within the context. + :param name: variable name :return: true if variable is set -:rtype: bool - .. seealso:: :py:func:`variable()` @@ -440,11 +419,10 @@ Check whether a variable is specified by any scope within the context. Fetches a matching variable from the context. The variable will be fetched from the last scope contained within the context which has a matching variable set. + :param name: variable name :return: variable value if matching variable exists in the context, otherwise an invalid QVariant -:rtype: QVariant - .. seealso:: :py:func:`hasVariable()` @@ -456,8 +434,6 @@ variable set. Returns a map of variable name to value representing all the expression variables contained by the context. -:rtype: QVariantMap - .. versionadded:: 3.0 %End @@ -466,9 +442,8 @@ contained by the context. Returns true if the specified variable name is intended to be highlighted to the user. This is used by the expression builder to more prominently display the variable. -:param name: variable name -:rtype: bool +:param name: variable name .. seealso:: :py:func:`setHighlightedVariables()` %End @@ -477,6 +452,7 @@ variable. %Docstring Sets the list of variable names within the context intended to be highlighted to the user. This is used by the expression builder to more prominently display these variables. + :param variableNames: variable names to highlight .. seealso:: :py:func:`isHighlightedVariable()` @@ -487,22 +463,20 @@ is used by the expression builder to more prominently display these variables. Returns the currently active scope from the context for a specified variable name. As scopes later in the stack override earlier contexts, this will be the last matching scope which contains a matching variable. + :param name: variable name :return: matching scope containing variable, or null if none found -:rtype: QgsExpressionContextScope - %End QgsExpressionContextScope *scope( int index ); %Docstring Returns the scope at the specified index within the context. + :param index: index of scope :return: matching scope, or null if none found -:rtype: QgsExpressionContextScope - .. seealso:: :py:func:`lastScope()` %End @@ -511,8 +485,6 @@ Returns the scope at the specified index within the context. %Docstring Returns the last scope added to the context. -:rtype: QgsExpressionContextScope - .. seealso:: :py:func:`scope()` %End @@ -521,28 +493,24 @@ Returns the last scope added to the context. Returns a list of scopes contained within the stack. :return: list of pointers to scopes -:rtype: list of QgsExpressionContextScope - %End int indexOfScope( QgsExpressionContextScope *scope ) const; %Docstring Returns the index of the specified scope if it exists within the context. + :param scope: scope to find :return: index of scope, or -1 if scope was not found within the context. -:rtype: int - %End int indexOfScope( const QString &scopeName ) const; %Docstring Returns the index of the first scope with a matching name within the context. + :param scopeName: name of scope to find :return: index of scope, or -1 if scope was not found within the context. -:rtype: int - .. versionadded:: 3.0 %End @@ -552,8 +520,6 @@ Returns the index of the first scope with a matching name within the context. Returns a list of variables names set by all scopes in the context. :return: list of unique variable names -:rtype: list of str - .. seealso:: :py:func:`filteredVariableNames` @@ -570,8 +536,6 @@ Returns a filtered list of variables names set by all scopes in the context. The variables are those which should be seen by users. :return: filtered list of unique variable names -:rtype: list of str - .. seealso:: :py:func:`variableNames` %End @@ -579,11 +543,10 @@ variables are those which should be seen by users. bool isReadOnly( const QString &name ) const; %Docstring Returns whether a variable is read only, and should not be modifiable by users. + :param name: variable name :return: true if variable is read only. Read only status will be taken from last -:rtype: bool - matching scope which contains a matching variable. %End @@ -594,19 +557,16 @@ Returns a translated description string for the variable with specified ``name`` If no specific description has been provided for the variable, the value from QgsExpression.variableHelpText() will be returned. -:rtype: str - .. versionadded:: 3.0 %End bool hasFunction( const QString &name ) const; %Docstring Checks whether a specified function is contained in the context. + :param name: function name :return: true if context provides a matching function -:rtype: bool - .. seealso:: :py:func:`function` %End @@ -615,8 +575,6 @@ Checks whether a specified function is contained in the context. %Docstring Retrieves a list of function names contained in the context. -:rtype: list of str - .. seealso:: :py:func:`function()` .. seealso:: :py:func:`variableNames()` @@ -627,11 +585,10 @@ Retrieves a list of function names contained in the context. Fetches a matching function from the context. The function will be fetched from the last scope contained within the context which has a matching function set. + :param name: function name :return: function if contained by the context, otherwise null. -:rtype: QgsExpressionFunction - .. seealso:: :py:func:`hasFunction` %End @@ -639,8 +596,6 @@ function set. int scopeCount() const; %Docstring Returns the number of scopes contained in the context. - -:rtype: int %End void appendScope( QgsExpressionContextScope *scope /Transfer/ ); @@ -648,6 +603,7 @@ Returns the number of scopes contained in the context. Appends a scope to the end of the context. This scope will override any matching variables or functions provided by existing scopes within the context. Ownership of the scope is transferred to the stack. + :param scope: expression context to append to context %End @@ -656,6 +612,7 @@ context. Ownership of the scope is transferred to the stack. 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 context. Ownership of the scopes is transferred to the stack. + :param scopes: scopes to append to context .. versionadded:: 3.0 @@ -664,8 +621,6 @@ context. Ownership of the scopes is transferred to the stack. QgsExpressionContextScope *popScope(); %Docstring Removes the last scope from the expression context and return it. - -:rtype: QgsExpressionContextScope %End @@ -675,6 +630,7 @@ Removes the last scope from the expression context and return it. 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 existing features within the context. + :param feature: feature for context .. seealso:: :py:func:`feature()` @@ -684,8 +640,6 @@ existing features within the context. %Docstring Returns true if the context has a feature associated with it. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`feature()` @@ -695,8 +649,6 @@ Returns true if the context has a feature associated with it. %Docstring Convenience function for retrieving the feature for the context, if set. -:rtype: QgsFeature - .. seealso:: :py:func:`setFeature` %End @@ -705,6 +657,7 @@ Convenience function for retrieving the feature for the context, if set. Convenience function for setting a fields for the context. The fields will be set within the last scope of the context, so will override any existing fields within the context. + :param fields: fields for context .. seealso:: :py:func:`fields()` @@ -714,14 +667,13 @@ existing fields within the context. %Docstring Convenience function for retrieving the fields for the context, if set. -:rtype: QgsFields - .. seealso:: :py:func:`setFields` %End void setOriginalValueVariable( const QVariant &value ); %Docstring Sets the original value variable value for the context. + :param value: value for original value variable. This usually represents the an original widget value before any data defined overrides have been applied. @@ -733,6 +685,7 @@ value before any data defined overrides have been applied. Sets a value to cache within the expression context. This can be used to cache the results of expensive expression sub-calculations, to speed up future evaluations using the same expression context. + :param key: unique key for retrieving cached value :param value: value to cache @@ -748,9 +701,8 @@ expression context. bool hasCachedValue( const QString &key ) const; %Docstring Returns true if the expression context contains a cached value with a matching key. -:param key: unique key used to store cached value -:rtype: bool +:param key: unique key used to store cached value .. seealso:: :py:func:`setCachedValue()` @@ -765,11 +717,10 @@ Returns true if the expression context contains a cached value with a matching k %Docstring Returns the matching cached value, if set. This can be used to retrieve the previously stored results of an expensive expression sub-calculation. + :param key: unique key used to store cached value :return: matching cached value, or invalid QVariant if not set -:rtype: QVariant - .. seealso:: :py:func:`setCachedValue()` @@ -856,8 +807,6 @@ for creating scopes for specific uses (e.g., project scopes, layer scopes). Creates a new scope which contains variables and functions relating to the global QGIS context. For instance, QGIS version numbers and variables specified through QGIS options. -:rtype: QgsExpressionContextScope - .. seealso:: :py:func:`setGlobalVariable()` %End @@ -865,6 +814,7 @@ For instance, QGIS version numbers and variables specified through QGIS options. %Docstring Sets a global context variable. This variable will be contained within scopes retrieved via globalScope(). + :param name: variable name :param value: variable value @@ -879,6 +829,7 @@ globalScope(). %Docstring Sets all global context variables. Existing global variables will be removed and replaced with the variables specified. + :param variables: new set of global variables .. seealso:: :py:func:`setGlobalVariable()` @@ -891,6 +842,7 @@ with the variables specified. static void removeGlobalVariable( const QString &name ); %Docstring Remove a global context variable. + :param name: variable name .. seealso:: :py:func:`setGlobalVariable()` @@ -904,9 +856,8 @@ Remove a global context variable. %Docstring Creates a new scope which contains variables and functions relating to a QGIS project. For instance, project path and title, and variables specified through the project properties. -:param project: What project to use -:rtype: QgsExpressionContextScope +:param project: What project to use .. seealso:: :py:func:`setProjectVariable()` %End @@ -915,6 +866,7 @@ For instance, project path and title, and variables specified through the projec %Docstring Sets a project context variable. This variable will be contained within scopes retrieved via projectScope(). + :param project: Project to apply changes to :param name: variable name :param value: variable value @@ -930,6 +882,7 @@ projectScope(). %Docstring Sets all project context variables. Existing project variables will be removed and replaced with the variables specified. + :param project: Project to apply changes to :param variables: new set of project variables @@ -943,6 +896,7 @@ with the variables specified. static void removeProjectVariable( QgsProject *project, const QString &name ); %Docstring Remove project context variable. + :param project: Project to apply changes to :param name: variable name @@ -957,16 +911,12 @@ Remove project context variable. %Docstring Creates a new scope which contains variables and functions relating to a QgsMapLayer. For instance, layer name, id and fields. - -:rtype: QgsExpressionContextScope %End static QList globalProjectLayerScopes( const QgsMapLayer *layer ) /Factory/; %Docstring Creates a list of three scopes: global, layer's project and layer. -:rtype: list of QgsExpressionContextScope - .. versionadded:: 3.0 %End @@ -974,6 +924,7 @@ Creates a list of three scopes: global, layer's project and layer. %Docstring Sets a layer context variable. This variable will be contained within scopes retrieved via layerScope(). + :param layer: map layer :param name: variable name :param value: variable value @@ -987,6 +938,7 @@ layerScope(). %Docstring Sets all layer context variables. Existing layer variables will be removed and replaced with the variables specified. + :param layer: map layer :param variables: new set of layer variables @@ -999,8 +951,6 @@ with the variables specified. %Docstring Creates a new scope which contains variables and functions relating to a QgsMapSettings object. For instance, map scale and rotation. - -:rtype: QgsExpressionContextScope %End static QgsExpressionContextScope *mapToolCaptureScope( const QList &matches ) /Factory/; @@ -1008,19 +958,16 @@ For instance, map scale and rotation. Sets the expression context variables which are available for expressions triggered by a map tool capture like add feature. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End static QgsExpressionContextScope *updateSymbolScope( const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope = 0 ); %Docstring Updates a symbol scope related to a QgsSymbol to an expression context. + :param symbol: symbol to extract properties from :param symbolScope: pointer to an existing scope to update -:rtype: QgsExpressionContextScope - .. versionadded:: 2.14 %End @@ -1028,15 +975,15 @@ Updates a symbol scope related to a QgsSymbol to an expression context. %Docstring Creates a new scope which contains variables and functions relating to a QgsComposition. For instance, number of pages and page sizes. -:param composition: source composition -:rtype: QgsExpressionContextScope +:param composition: source composition %End static void setCompositionVariable( QgsComposition *composition, const QString &name, const QVariant &value ); %Docstring Sets a composition context variable. This variable will be contained within scopes retrieved via compositionScope(). + :param composition: target composition :param name: variable name :param value: variable value @@ -1050,6 +997,7 @@ compositionScope(). %Docstring Sets all composition context variables. Existing composition variables will be removed and replaced with the variables specified. + :param composition: target composition :param variables: new set of layer variables @@ -1063,8 +1011,6 @@ with the variables specified. Creates a new scope which contains variables and functions relating to a QgsLayout ``layout``. For instance, number of pages and page sizes. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End @@ -1072,6 +1018,7 @@ For instance, number of pages and page sizes. %Docstring Sets a layout context variable. This variable will be contained within scopes retrieved via layoutScope(). + :param layout: target layout :param name: variable name :param value: variable value @@ -1087,6 +1034,7 @@ layoutScope(). %Docstring Sets all layout context variables. Existing layout variables will be removed and replaced with the variables specified. + :param layout: target layout :param variables: new set of layer variables @@ -1101,24 +1049,23 @@ with the variables specified. %Docstring Creates a new scope which contains variables and functions relating to a QgsAtlasComposition. 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. -:rtype: QgsExpressionContextScope +:param atlas: source atlas. If null, a set of default atlas variables will be added to the scope. %End static QgsExpressionContextScope *composerItemScope( const QgsComposerItem *composerItem ) /Factory/; %Docstring Creates a new scope which contains variables and functions relating to a QgsComposerItem. For instance, item size and position. -:param composerItem: source composer item -:rtype: QgsExpressionContextScope +:param composerItem: source composer item %End static void setComposerItemVariable( QgsComposerItem *composerItem, const QString &name, const QVariant &value ); %Docstring Sets a composer item context variable. This variable will be contained within scopes retrieved via composerItemScope(). + :param composerItem: target composer item :param name: variable name :param value: variable value @@ -1132,6 +1079,7 @@ composerItemScope(). %Docstring Sets all composition context variables. Existing compositoin variables will be removed and replaced with the variables specified. + :param composerItem: target composer item :param variables: new set of layer variables @@ -1145,8 +1093,6 @@ with the variables specified. Helper function for creating an expression context which contains just a feature and fields collection. Generally this method should not be used as the created context does not include standard scopes such as the global and project scopes. - -:rtype: QgsExpressionContext %End static QgsExpressionContextScope *processingAlgorithmScope( const QgsProcessingAlgorithm *algorithm, const QVariantMap ¶meters, QgsProcessingContext &context ) /Factory/; @@ -1154,16 +1100,13 @@ standard scopes such as the global and project scopes. Creates a new scope which contains variables and functions relating to a processing ``algorithm``, when used with the specified ``parameters`` and ``context``. For instance, algorithm name and parameter functions. - -:rtype: QgsExpressionContextScope %End static QgsExpressionContextScope *notificationScope( const QString &message = QString() ) /Factory/; %Docstring Creates a new scope which contains variables and functions relating to provider notifications -:param message: the notification message -:rtype: QgsExpressionContextScope +:param message: the notification message %End static void registerContextFunctions(); diff --git a/python/core/qgsexpressioncontextgenerator.sip b/python/core/qgsexpressioncontextgenerator.sip index 0fecb9271681..e03c3d9aec86 100644 --- a/python/core/qgsexpressioncontextgenerator.sip +++ b/python/core/qgsexpressioncontextgenerator.sip @@ -34,8 +34,6 @@ editor even when the environment changes. This method needs to be reimplemented in all classes which implement this interface and return an expression context. -:rtype: QgsExpressionContext - .. versionadded:: 3.0 %End diff --git a/python/core/qgsexpressioncontextscopegenerator.sip b/python/core/qgsexpressioncontextscopegenerator.sip index 80660650d780..cff9361c4463 100644 --- a/python/core/qgsexpressioncontextscopegenerator.sip +++ b/python/core/qgsexpressioncontextscopegenerator.sip @@ -26,8 +26,6 @@ Abstract interface for generating an expression context scope. This method needs to be reimplemented in all classes which implement this interface and return an expression context scope. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End diff --git a/python/core/qgsexpressionfieldbuffer.sip b/python/core/qgsexpressionfieldbuffer.sip index ff4f1ed99766..a5a9c015610d 100644 --- a/python/core/qgsexpressionfieldbuffer.sip +++ b/python/core/qgsexpressionfieldbuffer.sip @@ -88,10 +88,6 @@ Adds fields with the expressions buffered in this object to a QgsFields object %End QList expressions() const; -%Docstring - -:rtype: list of QgsExpressionFieldBuffer.ExpressionField -%End }; diff --git a/python/core/qgsfeature.sip b/python/core/qgsfeature.sip index c4419f5edc8f..f5a366dc5032 100644 --- a/python/core/qgsfeature.sip +++ b/python/core/qgsfeature.sip @@ -139,12 +139,14 @@ geometry and a list of field/values attributes. QgsFeature( qint64 id = 0 ); %Docstring Constructor for QgsFeature + :param id: feature id %End QgsFeature( const QgsFields &fields, qint64 id = 0 ); %Docstring Constructor for QgsFeature + :param fields: feature's fields :param id: feature id %End @@ -164,8 +166,6 @@ Copy constructor Get the feature ID for this feature. :return: feature ID -:rtype: QgsFeatureId - .. seealso:: :py:func:`setId()` %End @@ -173,6 +173,7 @@ Get the feature ID for this feature. void setId( QgsFeatureId id ); %Docstring Sets the feature ID for this feature. + :param id: feature id .. seealso:: :py:func:`id` @@ -183,8 +184,6 @@ Sets the feature ID for this feature. Returns the feature's attributes. :return: list of feature's attributes -:rtype: QgsAttributes - .. seealso:: :py:func:`setAttributes` @@ -199,6 +198,7 @@ Returns the feature's attributes. %Docstring Sets the feature's attributes. The feature will be valid after. + :param attrs: attribute list .. seealso:: :py:func:`setAttribute` @@ -210,12 +210,11 @@ The feature will be valid after. %Docstring Set an attribute's value by field index. The feature will be valid if it was successful. + :param field: the index of the field to set :param attr: the value of the attribute :return: false, if the field index does not exist -:rtype: bool - .. note:: @@ -251,12 +250,14 @@ The feature will be valid if it was successful. void initAttributes( int fieldCount ); %Docstring Initialize this feature with the given number of fields. Discard any previously set attribute data. + :param fieldCount: Number of fields to initialize %End void deleteAttribute( int field ); %Docstring Deletes an attribute and its value. + :param field: the index of the field .. seealso:: :py:func:`setAttribute` @@ -285,14 +286,13 @@ Returns the validity of this feature. This is normally set by the provider to indicate some problem that makes the feature invalid or to indicate a null feature. -:rtype: bool - .. seealso:: :py:func:`setValid` %End void setValid( bool validity ); %Docstring Sets the validity of the feature. + :param validity: set to true if feature is valid .. seealso:: :py:func:`isValid` @@ -302,8 +302,6 @@ Sets the validity of the feature. %Docstring Returns true if the feature has an associated geometry. -:rtype: bool - .. seealso:: :py:func:`geometry()` .. versionadded:: 3.0. @@ -314,8 +312,6 @@ Returns true if the feature has an associated geometry. Returns the geometry associated with this feature. If the feature has no geometry, an empty QgsGeometry object will be returned. -:rtype: QgsGeometry - .. seealso:: :py:func:`hasGeometry()` .. seealso:: :py:func:`setGeometry()` @@ -324,6 +320,7 @@ an empty QgsGeometry object will be returned. void setGeometry( const QgsGeometry &geometry ); %Docstring Set the feature's geometry. The feature will be valid after. + :param geometry: new feature geometry .. seealso:: :py:func:`geometry()` @@ -345,6 +342,7 @@ Removes any geometry associated with the feature. void setFields( const QgsFields &fields, bool initAttributes = true ); %Docstring Assign a field map with the feature to allow attribute access by attribute name. + :param fields: The attribute fields which this feature holds :param initAttributes: If true, attributes are initialized. Clears any data previously assigned. C++: Defaults to false @@ -359,8 +357,6 @@ Python: Defaults to true %Docstring Returns the field map associated with the feature. -:rtype: QgsFields - .. seealso:: :py:func:`setFields` %End @@ -369,6 +365,7 @@ Returns the field map associated with the feature. Insert a value into attribute. Returns false if attribute name could not be converted to index. Field map must be associated using setFields() before this method can be used. The feature will be valid if it was successful + :param name: The name of the field to set :param value: The value to set @@ -408,11 +405,10 @@ The feature will be valid if it was successful %Docstring Removes an attribute value by field name. Field map must be associated using setFields() before this method can be used. + :param name: The name of the field to delete :return: false if attribute name could not be converted to index (C++ only) -:rtype: bool - .. note:: @@ -443,6 +439,7 @@ before this method can be used. %Docstring Lookup attribute value from attribute name. Field map must be associated using setFields() before this method can be used. + :param name: The name of the attribute to get :return: The value of the attribute (C++: Invalid variant if no such name exists ) @@ -475,6 +472,7 @@ before this method can be used. %Docstring Lookup attribute value from its index. Field map must be associated using setFields() before this method can be used. + :param fieldIdx: The index of the attribute to get :return: The value of the attribute (C++: Invalid variant if no such index exists ) @@ -508,11 +506,10 @@ before this method can be used. %Docstring Utility method to get attribute index from name. Field map must be associated using setFields() before this method can be used. + :param fieldName: name of field to get attribute index of :return: -1 if field does not exist or field map is not associated. -:rtype: int - .. seealso:: :py:func:`setFields` %End diff --git a/python/core/qgsfeaturefiltermodel.sip b/python/core/qgsfeaturefiltermodel.sip index 3389ec584b29..d6d97638bdd0 100644 --- a/python/core/qgsfeaturefiltermodel.sip +++ b/python/core/qgsfeaturefiltermodel.sip @@ -38,8 +38,6 @@ Create a new QgsFeatureFilterModel, optionally specifying a ``parent``. QgsVectorLayer *sourceLayer() const; %Docstring The source layer from which features will be fetched. - -:rtype: QgsVectorLayer %End void setSourceLayer( QgsVectorLayer *sourceLayer ); @@ -53,8 +51,6 @@ The display expression will be used for - displaying values in the combobox - filtering based on filterValue - -:rtype: str %End void setDisplayExpression( const QString &displayExpression ); @@ -70,8 +66,6 @@ The display expression will be used for This value will be used to filter the features available from this model. Whenever a substring of the displayExpression of a feature matches the filter value, it will be accessible by this model. - -:rtype: str %End void setFilterValue( const QString &filterValue ); @@ -96,8 +90,6 @@ matches the filter value, it will be accessible by this model. %Docstring An additional filter expression to apply, next to the filterValue. Can be used for spatial filtering etc. - -:rtype: str %End void setFilterExpression( const QString &filterExpression ); @@ -109,16 +101,12 @@ Can be used for spatial filtering etc. bool isLoading() const; %Docstring Indicator if the model is currently performing any feature iteration in the background. - -:rtype: bool %End QString identifierField() const; %Docstring The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer. - -:rtype: str %End void setIdentifierField( const QString &identifierField ); @@ -131,8 +119,6 @@ It is normally set to the primary key of the layer. %Docstring Allows specifying one value that does not need to match the filter criteria but will still be available in the model. - -:rtype: QVariant %End void setExtraIdentifierValue( const QVariant &extraIdentifierValue ); @@ -144,22 +130,16 @@ still be available in the model. int extraIdentifierValueIndex() const; %Docstring The index at which the extra identifier value is available within the model. - -:rtype: int %End bool extraValueDoesNotExist() const; %Docstring Flag indicating that the extraIdentifierValue does not exist in the data. - -:rtype: bool %End bool allowNull() const; %Docstring Add a NULL entry to the list. - -:rtype: bool %End void setAllowNull( bool allowNull ); diff --git a/python/core/qgsfeaturefilterprovider.sip b/python/core/qgsfeaturefilterprovider.sip index 3dd445fcfb0d..1736997e183f 100644 --- a/python/core/qgsfeaturefilterprovider.sip +++ b/python/core/qgsfeaturefilterprovider.sip @@ -34,6 +34,7 @@ additional filters to the request. %Docstring Add additional filters to the feature request to further restrict the features returned by the request. Derived classes must implement this method. + :param layer: the layer to filter :param featureRequest: the feature request to update %End @@ -43,8 +44,6 @@ Derived classes must implement this method. Create a clone of the feature filter provider :return: a new clone -:rtype: QgsFeatureFilterProvider - %End }; diff --git a/python/core/qgsfeatureiterator.sip b/python/core/qgsfeatureiterator.sip index 3cc9663c553e..94d44c5151e9 100644 --- a/python/core/qgsfeatureiterator.sip +++ b/python/core/qgsfeatureiterator.sip @@ -41,21 +41,15 @@ destructor makes sure that the iterator is closed properly virtual bool nextFeature( QgsFeature &f ); %Docstring fetch next feature, return true on success - -:rtype: bool %End virtual bool rewind() = 0; %Docstring reset the iterator to the starting position - -:rtype: bool %End virtual bool close() = 0; %Docstring end of iterating: free the resources / lock - -:rtype: bool %End @@ -63,8 +57,6 @@ end of iterating: free the resources / lock %Docstring Returns the status of expression compilation for filter expression requests. -:rtype: CompileStatus - .. versionadded:: 2.16 %End @@ -77,8 +69,6 @@ after a timeout to give the system some time to stay responsive). If you want to check if the iterator successfully completed, better use QgsFeatureIterator.isClosed(). -:rtype: bool - .. versionadded:: 3.0 %End @@ -92,8 +82,6 @@ need to implement!! :param f: The feature to write to :return: true if a feature was written to f -:rtype: bool - %End virtual bool nextFeatureFilterExpression( QgsFeature &f ); @@ -107,8 +95,6 @@ redirect this call to fetchFeature so the default check will be omitted. :param f: The feature to write to :return: true if a feature was written to f -:rtype: bool - %End virtual bool nextFeatureFilterFids( QgsFeature &f ); @@ -123,8 +109,6 @@ so the default check will be omitted. :param f: The feature to write to :return: true if a feature was written to f -:rtype: bool - %End void geometryToDestinationCrs( QgsFeature &feature, const QgsCoordinateTransform &transform ) const; @@ -148,8 +132,6 @@ Iterators should call this method and use the returned rectangle for filtering features to ensure that any QgsFeatureRequest.destinationCrs() set on the request is respected. Will throw a QgsCsException if the rect cannot be transformed from the destination CRS. -:rtype: QgsRectangle - .. versionadded:: 3.0 %End @@ -170,8 +152,6 @@ Remove reference, delete if refs == 0 virtual bool prepareSimplification( const QgsSimplifyMethod &simplifyMethod ); %Docstring Setup the simplification of geometries to fetch using the specified simplify method - -:rtype: bool %End @@ -218,10 +198,6 @@ Wrapper for iterator of features from vector data provider or vector layer public: QgsFeatureIterator *__iter__(); -%Docstring - -:rtype: QgsFeatureIterator -%End %MethodCode sipRes = sipCpp; %End @@ -253,20 +229,8 @@ destructor deletes the iterator if it has no more references bool nextFeature( QgsFeature &f ); -%Docstring - -:rtype: bool -%End bool rewind(); -%Docstring - -:rtype: bool -%End bool close(); -%Docstring - -:rtype: bool -%End virtual bool isValid() const; %Docstring @@ -274,8 +238,6 @@ Will return if this iterator is valid. An invalid iterator was probably introduced by a failed attempt to acquire a connection or is a default constructed iterator. -:rtype: bool - .. seealso:: :py:func:`isClosed` .. versionadded:: 3.0 @@ -284,8 +246,6 @@ or is a default constructed iterator. bool isClosed() const; %Docstring find out whether the iterator is still valid or closed already - -:rtype: bool %End @@ -293,8 +253,6 @@ find out whether the iterator is still valid or closed already %Docstring Returns the status of expression compilation for filter expression requests. -:rtype: QgsAbstractFeatureIterator.CompileStatus - .. versionadded:: 2.16 %End diff --git a/python/core/qgsfeaturerequest.sip b/python/core/qgsfeaturerequest.sip index a2c75a6534f3..07f4d6813e5b 100644 --- a/python/core/qgsfeaturerequest.sip +++ b/python/core/qgsfeaturerequest.sip @@ -148,16 +148,12 @@ Creates a new OrderByClause for a QgsFeatureRequest The expression :return: the expression -:rtype: QgsExpression - %End bool prepare( QgsExpressionContext *context ); %Docstring Prepare the expression with the given context. -:rtype: bool - .. seealso:: :py:func:`QgsExpression.prepare` .. versionadded:: 3.0 @@ -168,8 +164,6 @@ Prepare the expression with the given context. Order ascending :return: If ascending order is requested -:rtype: bool - %End void setAscending( bool ascending ); @@ -182,8 +176,6 @@ Set if ascending order is requested Set if NULLS should be returned first :return: if NULLS should be returned first -:rtype: bool - %End void setNullsFirst( bool nullsFirst ); @@ -194,8 +186,6 @@ Set if NULLS should be returned first QString dump() const; %Docstring Dumps the content to an SQL equivalent - -:rtype: str %End @@ -232,8 +222,6 @@ Get a copy as a list of OrderByClauses This is only required in Python where the inheritance is not properly propagated and this makes it usable. - -:rtype: list of QgsFeatureRequest.OrderByClause %End void save( QDomElement &elem ) const; @@ -249,15 +237,11 @@ Deserialize from XML QSet usedAttributes() const; %Docstring Returns a set of used attributes - -:rtype: set of str %End QString dump() const; %Docstring Dumps the content to an SQL equivalent syntax - -:rtype: str %End }; @@ -302,8 +286,6 @@ copy constructor Return the filter type which is currently set on this request :return: Filter type -:rtype: FilterType - %End QgsFeatureRequest &setFilterRect( const QgsRectangle &rectangle ); @@ -314,8 +296,6 @@ When a destination CRS is set using setDestinationCrs(), ``rectangle`` is expected to be in the same CRS as the destinationCrs(). Otherwise, ``rectangle`` should use the same CRS as the source layer/provider. -:rtype: QgsFeatureRequest - .. seealso:: :py:func:`filterRect()` %End @@ -328,43 +308,31 @@ When a destination CRS is set using setDestinationCrs(), the rectangle will be in the same CRS as the destinationCrs(). Otherwise, the rectangle will use the same CRS as the source layer/provider. -:rtype: QgsRectangle - .. seealso:: :py:func:`setFilterRect()` %End QgsFeatureRequest &setFilterFid( QgsFeatureId fid ); %Docstring Set feature ID that should be fetched. - -:rtype: QgsFeatureRequest %End QgsFeatureId filterFid() const; %Docstring Get the feature ID that should be fetched. - -:rtype: QgsFeatureId %End QgsFeatureRequest &setFilterFids( const QgsFeatureIds &fids ); %Docstring Set feature IDs that should be fetched. - -:rtype: QgsFeatureRequest %End const QgsFeatureIds &filterFids() const; %Docstring Get feature IDs that should be fetched. - -:rtype: QgsFeatureIds %End QgsFeatureRequest &setInvalidGeometryCheck( InvalidGeometryCheck check ); %Docstring Sets invalid geometry checking behavior. -:rtype: QgsFeatureRequest - .. note:: Invalid geometry checking is not performed when retrieving features @@ -379,8 +347,6 @@ directly from a QgsVectorDataProvider. %Docstring Returns the invalid geometry checking behavior. -:rtype: InvalidGeometryCheck - .. seealso:: :py:func:`setInvalidGeometryCheck()` .. versionadded:: 3.0 @@ -392,8 +358,6 @@ Sets a callback function to use when encountering an invalid geometry and invalidGeometryCheck() is set to GeometryAbortOnInvalid or GeometrySkipInvalid. This function will be called using the feature with invalid geometry as a parameter. -:rtype: QgsFeatureRequest - .. versionadded:: 3.0 .. seealso:: :py:func:`invalidGeometryCallback()` @@ -417,9 +381,8 @@ called using the feature with invalid geometry as a parameter. QgsFeatureRequest &setFilterExpression( const QString &expression ); %Docstring -:rtype: QgsFeatureRequest - .. seealso:: :py:class:`QgsExpression` + :param expression: expression string .. seealso:: :py:func:`filterExpression` @@ -431,8 +394,6 @@ called using the feature with invalid geometry as a parameter. %Docstring Returns the filter expression if set. -:rtype: QgsExpression - .. seealso:: :py:func:`setFilterExpression` .. seealso:: :py:func:`expressionContext` @@ -444,8 +405,6 @@ Modifies the existing filter expression to add an additional expression filter. filter expressions are combined using AND, so only features matching both the existing expression and the additional expression will be returned. -:rtype: QgsFeatureRequest - .. versionadded:: 2.14 %End @@ -453,8 +412,6 @@ the existing expression and the additional expression will be returned. %Docstring Returns the expression context used to evaluate filter expressions. -:rtype: QgsExpressionContext - .. versionadded:: 2.12 .. seealso:: :py:func:`setExpressionContext` @@ -466,8 +423,6 @@ Returns the expression context used to evaluate filter expressions. %Docstring Sets the expression context used to evaluate filter expressions. -:rtype: QgsFeatureRequest - .. versionadded:: 2.12 .. seealso:: :py:func:`expressionContext` @@ -481,8 +436,6 @@ Disables filter conditions. The spatial filter (filterRect) will be kept in place. :return: The object the method is called on for chaining -:rtype: QgsFeatureRequest - .. versionadded:: 2.12 %End @@ -497,8 +450,6 @@ Adds a new OrderByClause, appending it as the least important one. If the order is ascending, by default nulls are last If the order is descending, by default nulls are first -:rtype: QgsFeatureRequest - .. versionadded:: 2.14 %End @@ -510,8 +461,6 @@ Adds a new OrderByClause, appending it as the least important one. :param ascending: If the order should be ascending (1,2,3) or descending (3,2,1) :param nullsfirst: If true, NULLS are at the beginning, if false, NULLS are at the end -:rtype: QgsFeatureRequest - .. versionadded:: 2.14 %End @@ -519,8 +468,6 @@ Adds a new OrderByClause, appending it as the least important one. %Docstring Return a list of order by clauses specified for this feature request. -:rtype: OrderBy - .. versionadded:: 2.14 %End @@ -528,17 +475,14 @@ Return a list of order by clauses specified for this feature request. %Docstring Set a list of order by clauses. -:rtype: QgsFeatureRequest - .. versionadded:: 2.14 %End QgsFeatureRequest &setLimit( long limit ); %Docstring Set the maximum number of features to request. -:param limit: maximum number of features, or -1 to request all features. -:rtype: QgsFeatureRequest +:param limit: maximum number of features, or -1 to request all features. .. seealso:: :py:func:`limit()` @@ -549,8 +493,6 @@ Set the maximum number of features to request. %Docstring Returns the maximum number of features to request, or -1 if no limit set. -:rtype: long - .. seealso:: :py:func:`setLimit` .. versionadded:: 2.14 @@ -559,21 +501,13 @@ Returns the maximum number of features to request, or -1 if no limit set. QgsFeatureRequest &setFlags( QgsFeatureRequest::Flags flags ); %Docstring Set flags that affect how features will be fetched - -:rtype: QgsFeatureRequest %End const Flags &flags() const; -%Docstring - -:rtype: Flags -%End QgsFeatureRequest &setSubsetOfAttributes( const QgsAttributeList &attrs ); %Docstring Set a subset of attributes that will be fetched. Empty list means that all attributes are used. To disable fetching attributes, reset the FetchAttributes flag (which is set by default) - -:rtype: QgsFeatureRequest %End QgsAttributeList subsetOfAttributes() const; @@ -581,30 +515,22 @@ To disable fetching attributes, reset the FetchAttributes flag (which is set by Return the subset of attributes which at least need to be fetched :return: A list of attributes to be fetched -:rtype: QgsAttributeList - %End QgsFeatureRequest &setSubsetOfAttributes( const QStringList &attrNames, const QgsFields &fields ); %Docstring Set a subset of attributes by names that will be fetched - -:rtype: QgsFeatureRequest %End QgsFeatureRequest &setSubsetOfAttributes( const QSet &attrNames, const QgsFields &fields ); %Docstring Set a subset of attributes by names that will be fetched - -:rtype: QgsFeatureRequest %End QgsFeatureRequest &setSimplifyMethod( const QgsSimplifyMethod &simplifyMethod ); %Docstring Set a simplification method for geometries that will be fetched -:rtype: QgsFeatureRequest - .. versionadded:: 2.2 %End @@ -612,8 +538,6 @@ Set a simplification method for geometries that will be fetched %Docstring Get simplification method for geometries that will be fetched -:rtype: QgsSimplifyMethod - .. versionadded:: 2.2 %End @@ -623,8 +547,6 @@ Returns the destination coordinate reference system for feature's geometries, or an invalid QgsCoordinateReferenceSystem if no reprojection will be done and all features will be left with their original geometry. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setDestinationCrs()` .. versionadded:: 3.0 @@ -651,8 +573,6 @@ destination CRS. Similarly, virtual field values will be calculated using the original geometry in the source CRS, so these values are not affected by any destination CRS transform present in the feature request. -:rtype: QgsFeatureRequest - .. seealso:: :py:func:`destinationCrs()` .. versionadded:: 3.0 @@ -664,8 +584,6 @@ Sets a callback function to use when encountering a transform error when iterati features and a destinationCrs() is set. This function will be called using the feature which encountered the transform error as a parameter. -:rtype: QgsFeatureRequest - .. versionadded:: 3.0 .. seealso:: :py:func:`transformErrorCallback()` @@ -696,7 +614,6 @@ Check if a feature is accepted by this requests filter :param feature: The feature which will be tested :return: true, if the filter accepts the feature -:rtype: bool .. versionadded:: 2.1 @@ -707,8 +624,6 @@ Check if a feature is accepted by this requests filter The timeout for how long we should wait for a connection if none is available from the pool at this moment. A negative value (which is set by default) will wait forever. -:rtype: int - .. note:: Only works if the provider supports this option. @@ -753,11 +668,10 @@ Base class that can be used for any class that is capable of returning features virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) = 0; %Docstring Get an iterator for features matching the specified request + :param request: The request :return: A feature iterator -:rtype: QgsFeatureIterator - %End protected: diff --git a/python/core/qgsfeaturesink.sip b/python/core/qgsfeaturesink.sip index 2e562b60093a..ca1900ecd98b 100644 --- a/python/core/qgsfeaturesink.sip +++ b/python/core/qgsfeaturesink.sip @@ -36,8 +36,6 @@ An interface for objects which accept features via addFeature(s) methods. %Docstring Adds a single ``feature`` to the sink. Feature addition behavior is controlled by the specified ``flags``. -:rtype: bool - .. seealso:: :py:func:`addFeatures()` :return: true in case of success and false in case of failure @@ -47,8 +45,6 @@ Adds a single ``feature`` to the sink. Feature addition behavior is controlled b %Docstring Adds a list of ``features`` to the sink. Feature addition behavior is controlled by the specified ``flags``. -:rtype: bool - .. seealso:: :py:func:`addFeature()` :return: true in case of success and false in case of failure @@ -59,8 +55,6 @@ Adds a list of ``features`` to the sink. Feature addition behavior is controlled Adds all features from the specified ``iterator`` to the sink. Feature addition behavior is controlled by the specified ``flags``. :return: true if all features were added successfully, or false if any feature could not be added -:rtype: bool - %End virtual bool flushBuffer(); @@ -68,8 +62,6 @@ Adds all features from the specified ``iterator`` to the sink. Feature addition Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination. :return: false if any buffered features could not be added to the sink. -:rtype: bool - %End }; @@ -107,8 +99,6 @@ Constructs a new QgsProxyFeatureSink which forwards features onto a destination QgsFeatureSink *destinationSink(); %Docstring Returns the destination QgsFeatureSink which the proxy will forward features to. - -:rtype: QgsFeatureSink %End }; diff --git a/python/core/qgsfeaturesource.sip b/python/core/qgsfeaturesource.sip index 5380abfce53d..391443705228 100644 --- a/python/core/qgsfeaturesource.sip +++ b/python/core/qgsfeaturesource.sip @@ -30,36 +30,26 @@ An interface for objects which provide features via a getFeatures method. Returns an iterator for the features in the source. An optional ``request`` can be used to optimise the returned iterator, eg by restricting the returned attributes or geometry. - -:rtype: QgsFeatureIterator %End virtual QString sourceName() const = 0; %Docstring Returns a friendly display name for the source. The returned value can be an empty string. - -:rtype: str %End virtual QgsCoordinateReferenceSystem sourceCrs() const = 0; %Docstring Returns the coordinate reference system for features in the source. - -:rtype: QgsCoordinateReferenceSystem %End virtual QgsFields fields() const = 0; %Docstring Returns the fields associated with features in the source. - -:rtype: QgsFields %End virtual QgsWkbTypes::Type wkbType() const = 0; %Docstring Returns the geometry type for features returned by this source. - -:rtype: QgsWkbTypes.Type %End @@ -67,8 +57,6 @@ Returns the geometry type for features returned by this source. %Docstring Returns the number of features contained in the source, or -1 if the feature count is unknown. - -:rtype: int %End %MethodCode sipRes = sipCpp->featureCount(); @@ -78,8 +66,6 @@ if the feature count is unknown. %Docstring Returns the number of features contained in the source, or -1 if the feature count is unknown. - -:rtype: long %End virtual QSet uniqueValues( int fieldIndex, int limit = -1 ) const; @@ -89,8 +75,6 @@ If specified, the ``limit`` option can be used to limit the number of returned v The base class implementation uses a non-optimised approach of looping through all features in the source. -:rtype: set of QVariant - .. seealso:: :py:func:`minimumValue()` .. seealso:: :py:func:`maximumValue()` @@ -102,8 +86,6 @@ Returns the minimum value for an attribute column or an invalid variant in case The base class implementation uses a non-optimised approach of looping through all features in the source. -:rtype: QVariant - .. seealso:: :py:func:`maximumValue()` .. seealso:: :py:func:`uniqueValues()` @@ -115,8 +97,6 @@ Returns the maximum value for an attribute column or an invalid variant in case The base class implementation uses a non-optimised approach of looping through all features in the source. -:rtype: QVariant - .. seealso:: :py:func:`minimumValue()` .. seealso:: :py:func:`uniqueValues()` @@ -127,15 +107,11 @@ all features in the source. Returns the extent of all geometries from the source. The base class implementation uses a non-optimised approach of looping through all features in the source. - -:rtype: QgsRectangle %End virtual QgsFeatureIds allFeatureIds() const; %Docstring Returns a list of all feature IDs for features present in the source. - -:rtype: QgsFeatureIds %End QgsVectorLayer *materialize( const QgsFeatureRequest &request, @@ -161,8 +137,6 @@ before it has fully completed. The returned value is a new instance and the caller takes responsibility for its ownership. -:rtype: QgsVectorLayer - .. versionadded:: 3.0 %End diff --git a/python/core/qgsfeaturestore.sip b/python/core/qgsfeaturestore.sip index cb22f2eba767..1c45baf607bc 100644 --- a/python/core/qgsfeaturestore.sip +++ b/python/core/qgsfeaturestore.sip @@ -31,8 +31,6 @@ Constructor %Docstring Returns the store's field list. -:rtype: QgsFields - .. seealso:: :py:func:`setFields()` %End @@ -47,8 +45,6 @@ Sets the store's ``fields``. Every contained feature's fields will be reset to m %Docstring Returns the store's coordinate reference system. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs()` %End @@ -67,16 +63,12 @@ Sets the store's ``crs``. int count() const; %Docstring Returns the number of features contained in the store. - -:rtype: int %End int __len__() const; %Docstring Returns the number of features contained in the store. - -:rtype: int %End %MethodCode sipRes = sipCpp->count(); @@ -85,8 +77,6 @@ Returns the number of features contained in the store. QgsFeatureList features() const; %Docstring Returns the list of features contained in the store. - -:rtype: QgsFeatureList %End void setParams( const QMap ¶meters ); @@ -100,8 +90,6 @@ Sets a map of optional ``parameters`` for the store. %Docstring Returns the map of optional parameters. -:rtype: QMap - .. seealso:: :py:func:`setParams()` %End diff --git a/python/core/qgsfeedback.sip b/python/core/qgsfeedback.sip index d3bb38fa5655..d7c37a491b33 100644 --- a/python/core/qgsfeedback.sip +++ b/python/core/qgsfeedback.sip @@ -43,8 +43,6 @@ Construct a feedback object bool isCanceled() const; %Docstring Tells whether the operation has been canceled already - -:rtype: bool %End void setProgress( double progress ); @@ -65,8 +63,6 @@ Returns the current progress reported by the feedback object. Depending on how t feedback object is used progress reporting may not be supported. The returned value is in percentage and ranges from 0-100. -:rtype: float - .. seealso:: :py:func:`setProgress()` .. seealso:: :py:func:`progressChanged()` diff --git a/python/core/qgsfield.sip b/python/core/qgsfield.sip index 35597295d7cf..b955c82d6ca4 100644 --- a/python/core/qgsfield.sip +++ b/python/core/qgsfield.sip @@ -38,6 +38,7 @@ length, and if applicable, precision. QVariant::Type subType = QVariant::Invalid ); %Docstring Constructor. Constructs a new QgsField object. + :param name: Field name :param type: Field variant type, currently supported: String / Int / Double :param typeName: Field type (e.g., char, varchar, text, int, serial, double). @@ -62,17 +63,11 @@ Copy constructor bool operator==( const QgsField &other ) const; bool operator!=( const QgsField &other ) const; -%Docstring - -:rtype: bool -%End QString name() const; %Docstring Returns the name of the field. -:rtype: str - .. seealso:: :py:func:`setName()` .. seealso:: :py:func:`displayName()` @@ -83,8 +78,6 @@ Returns the name of the field. Returns the name to use when displaying this field. This will be the field alias if set, otherwise the field name. -:rtype: str - .. seealso:: :py:func:`name()` .. seealso:: :py:func:`alias()` @@ -95,8 +88,6 @@ field alias if set, otherwise the field name. QVariant::Type type() const; %Docstring Gets variant type of the field as it will be retrieved from data source - -:rtype: QVariant.Type %End QVariant::Type subType() const; @@ -105,8 +96,6 @@ If the field is a collection, gets its element's type. When all the elements don't need to have the same type, this returns QVariant.Invalid. -:rtype: QVariant.Type - .. versionadded:: 3.0 %End @@ -117,8 +106,6 @@ are char, int, double, blob, geometry, etc. The type is stored exactly as the data store reports it, with no attempt to standardize the value. :return: QString containing the field type -:rtype: str - %End int length() const; @@ -126,8 +113,6 @@ the data store reports it, with no attempt to standardize the value. Gets the length of the field. :return: int containing the length of the field -:rtype: int - %End int precision() const; @@ -135,15 +120,11 @@ Gets the length of the field. Gets the precision of the field. Not all field types have a related precision. :return: int containing the precision or zero if not applicable to the field type. -:rtype: int - %End QString comment() const; %Docstring Returns the field comment - -:rtype: str %End bool isNumeric() const; @@ -151,14 +132,13 @@ Returns the field comment Returns if this field is numeric. Any integer or floating point type will return true for this. -:rtype: bool - .. versionadded:: 2.18 %End void setName( const QString &name ); %Docstring Set the field name. + :param name: Name of the field %End @@ -179,18 +159,21 @@ QVariant.Invalid. void setTypeName( const QString &typeName ); %Docstring Set the field type. + :param typeName: Field type %End void setLength( int len ); %Docstring Set the field length. + :param len: Length of the field %End void setPrecision( int precision ); %Docstring Set the field precision. + :param precision: Precision of the field %End @@ -204,8 +187,6 @@ Set the field comment Returns the expression used when calculating the default value for the field. :return: expression evaluated when calculating default values for field, or an -:rtype: QgsDefaultValue - empty string if no default is set .. versionadded:: 3.0 @@ -216,6 +197,7 @@ empty string if no default is set void setDefaultValueDefinition( const QgsDefaultValue &defaultValueDefinition ); %Docstring Sets an expression to use when calculating the default value for the field. + :param defaultValueDefinition: expression to evaluate when calculating default values for field. Pass a default constructed QgsDefaultValue() to reset. @@ -228,8 +210,6 @@ a default constructed QgsDefaultValue() to reset. %Docstring Returns constraints which are present for the field. -:rtype: QgsFieldConstraints - .. versionadded:: 3.0 .. seealso:: :py:func:`setConstraints()` @@ -249,8 +229,6 @@ Sets constraints which are present for the field. Returns the alias for the field (the friendly displayed name of the field ), or an empty string if there is no alias. -:rtype: str - .. seealso:: :py:func:`setAlias()` .. versionadded:: 3.0 @@ -259,6 +237,7 @@ or an empty string if there is no alias. void setAlias( const QString &alias ); %Docstring Sets the alias for the field (the friendly displayed name of the field ). + :param alias: field alias, or empty string to remove an existing alias .. seealso:: :py:func:`alias()` @@ -269,8 +248,6 @@ Sets the alias for the field (the friendly displayed name of the field ). QString displayString( const QVariant &v ) const; %Docstring Formats string for display - -:rtype: str %End bool convertCompatible( QVariant &v ) const; @@ -280,8 +257,6 @@ Converts the provided variant to a compatible format :param v: The value to convert :return: True if the conversion was successful -:rtype: bool - %End %MethodCode PyObject *sipParseErr = NULL; @@ -353,8 +328,6 @@ Defaults may be set by the provider and can be overridden by manual field configuration. :return: the value -:rtype: QgsEditorWidgetSetup - %End }; // class QgsField diff --git a/python/core/qgsfieldconstraints.sip b/python/core/qgsfieldconstraints.sip index a679fa42cb3e..a5312986230c 100644 --- a/python/core/qgsfieldconstraints.sip +++ b/python/core/qgsfieldconstraints.sip @@ -55,8 +55,6 @@ Constructor for QgsFieldConstraints. %Docstring Returns any constraints which are present for the field. -:rtype: Constraints - .. seealso:: :py:func:`setConstraints()` .. seealso:: :py:func:`constraintOrigin()` @@ -67,8 +65,6 @@ Returns any constraints which are present for the field. Returns the origin of a field constraint, or ConstraintOriginNotSet if the constraint is not present on this field. -:rtype: ConstraintOrigin - .. seealso:: :py:func:`constraints()` %End @@ -77,8 +73,6 @@ is not present on this field. Returns the strength of a field constraint, or ConstraintStrengthNotSet if the constraint is not present on this field. -:rtype: ConstraintStrength - .. seealso:: :py:func:`constraints()` .. seealso:: :py:func:`setConstraintStrength()` @@ -115,8 +109,6 @@ Removes a constraint from the field. %Docstring Returns the constraint expression for the field, if set. -:rtype: str - .. seealso:: :py:func:`constraints()` .. seealso:: :py:func:`constraintDescription()` @@ -128,8 +120,6 @@ Returns the constraint expression for the field, if set. %Docstring Returns the descriptive name for the constraint expression. -:rtype: str - .. seealso:: :py:func:`constraints()` .. seealso:: :py:func:`constraintExpression()` diff --git a/python/core/qgsfieldformatter.sip b/python/core/qgsfieldformatter.sip index efbbaac9637d..f0b02340186e 100644 --- a/python/core/qgsfieldformatter.sip +++ b/python/core/qgsfieldformatter.sip @@ -39,8 +39,6 @@ Return a unique id for this field formatter. This id will later be used to identify this field formatter in the registry with QgsFieldFormatterRegistry.fieldFormatter(). This id matches the id of a QgsEditorWidgetFactory. - -:rtype: str %End virtual QString representValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const; @@ -48,8 +46,6 @@ This id matches the id of a QgsEditorWidgetFactory. Create a pretty String representation of the value. :return: By default the string representation of the provided value as implied by the field definition is returned. -:rtype: str - .. versionadded:: 3.0 %End @@ -59,8 +55,6 @@ Create a pretty String representation of the value. If the default sort order should be overwritten for this widget, you can transform the value in here. :return: an unmodified value by default. -:rtype: QVariant - .. versionadded:: 3.0 %End @@ -70,8 +64,6 @@ If the default sort order should be overwritten for this widget, you can transfo Return the alignment for a particular field. By default this will consider the field type but can be overwritten if mapped values are represented. -:rtype: Qt.AlignmentFlag - .. versionadded:: 3.0 %End @@ -87,8 +79,6 @@ cache for representation. The QgsValueRelationFieldFormatter and QgsValueRelatio implement this functionality to create a lookuptable once (a QVariantMap / dict) and are make use of a cache if present. -:rtype: QVariant - .. versionadded:: 3.0 %End }; diff --git a/python/core/qgsfieldformatterregistry.sip b/python/core/qgsfieldformatterregistry.sip index 8fb1ab7df5cf..293750023dee 100644 --- a/python/core/qgsfieldformatterregistry.sip +++ b/python/core/qgsfieldformatterregistry.sip @@ -55,16 +55,12 @@ Remove the field formatter with the specified id. %Docstring Get a field formatter by its id. If there is no such id registered, a default QgsFallbackFieldFormatter with a null id will be returned instead. - -:rtype: QgsFieldFormatter %End QgsFieldFormatter *fallbackFieldFormatter() const; %Docstring Returns a basic fallback field formatter which can be used to represent any field in an unspectacular manner. - -:rtype: QgsFieldFormatter %End signals: diff --git a/python/core/qgsfieldmodel.sip b/python/core/qgsfieldmodel.sip index dc83e94c9ae1..10c71ba04546 100644 --- a/python/core/qgsfieldmodel.sip +++ b/python/core/qgsfieldmodel.sip @@ -46,8 +46,6 @@ Constructor for QgsFieldModel - creates a model to display the fields of a given QModelIndex indexFromName( const QString &fieldName ); %Docstring Returns the index corresponding to a given fieldName. - -:rtype: QModelIndex %End void setAllowExpression( bool allowExpression ); @@ -63,8 +61,6 @@ Sets whether custom expressions are accepted and displayed in the model. %Docstring Returns true if the model allows custom expressions to be created and displayed. -:rtype: bool - .. seealso:: :py:func:`setAllowExpression()` %End @@ -81,8 +77,6 @@ Sets whether an optional empty field ("not set") option is present in the model. %Docstring Returns true if the model allows the empty field ("not set") choice. -:rtype: bool - .. seealso:: :py:func:`setAllowEmptyFieldName()` .. versionadded:: 3.0 @@ -92,8 +86,6 @@ Returns true if the model allows the empty field ("not set") choice. %Docstring Returns true if a string represents a field reference, or false if it is an expression consisting of more than direct field reference. - -:rtype: bool %End void setExpression( const QString &expression ); @@ -120,8 +112,6 @@ Removes any custom expression from the model. %Docstring Returns the layer associated with the model. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer()` %End diff --git a/python/core/qgsfieldproxymodel.sip b/python/core/qgsfieldproxymodel.sip index 7a8bfb5bb6a6..335ae4581c97 100644 --- a/python/core/qgsfieldproxymodel.sip +++ b/python/core/qgsfieldproxymodel.sip @@ -48,16 +48,13 @@ It can be used to filter the fields based on their types. QgsFieldModel *sourceFieldModel(); %Docstring Returns the QgsFieldModel used in this QSortFilterProxyModel - -:rtype: QgsFieldModel %End QgsFieldProxyModel *setFilters( QgsFieldProxyModel::Filters filters ); %Docstring Set flags that affect how fields are filtered in the model. -:param filters: are Filter flags -:rtype: QgsFieldProxyModel +:param filters: are Filter flags .. seealso:: :py:func:`filters()` %End @@ -66,8 +63,6 @@ Set flags that affect how fields are filtered in the model. %Docstring Returns the filters controlling displayed fields. -:rtype: Filters - .. seealso:: :py:func:`setFilters()` %End diff --git a/python/core/qgsfields.sip b/python/core/qgsfields.sip index e27c9144cda6..a6e1dfed8de2 100644 --- a/python/core/qgsfields.sip +++ b/python/core/qgsfields.sip @@ -60,15 +60,11 @@ Remove all fields bool append( const QgsField &field, FieldOrigin origin = OriginProvider, int originIndex = -1 ); %Docstring Append a field. The field must have unique name, otherwise it is rejected (returns false) - -:rtype: bool %End bool appendExpressionField( const QgsField &field, int originIndex ); %Docstring Append an expression field. The field must have unique name, otherwise it is rejected (returns false) - -:rtype: bool %End void remove( int fieldIdx ); @@ -95,22 +91,14 @@ Extend with fields from another QgsFields container bool isEmpty() const; %Docstring Check whether the container is empty - -:rtype: bool %End int count() const; %Docstring Return number of items - -:rtype: int %End int __len__() const; -%Docstring - -:rtype: int -%End %MethodCode sipRes = sipCpp->count(); %End @@ -118,27 +106,22 @@ Return number of items int size() const; %Docstring Return number of items - -:rtype: int %End QStringList names() const; %Docstring Returns a list with field names -:rtype: list of str - .. versionadded:: 3.0 %End bool exists( int i ) const; %Docstring Return if a field index is valid + :param i: Index of the field which needs to be checked :return: True if the field exists -:rtype: bool - %End @@ -154,8 +137,6 @@ Return if a field index is valid QgsField at( int i ) const /Factory/; %Docstring Get field at particular index (must be in range 0..N-1) - -:rtype: QgsField %End %MethodCode if ( a0 < 0 || a0 >= sipCpp->count() ) @@ -172,8 +153,6 @@ Get field at particular index (must be in range 0..N-1) QgsField field( int fieldIdx ) const /Factory/; %Docstring Get field at particular index (must be in range 0..N-1) - -:rtype: QgsField %End %MethodCode if ( a0 < 0 || a0 >= sipCpp->count() ) @@ -190,8 +169,6 @@ Get field at particular index (must be in range 0..N-1) QgsField field( const QString &name ) const /Factory/; %Docstring Get field with matching name - -:rtype: QgsField %End %MethodCode int fieldIdx = sipCpp->indexFromName( *a0 ); @@ -209,8 +186,6 @@ Get field with matching name FieldOrigin fieldOrigin( int fieldIdx ) const; %Docstring Get field's origin (value from an enumeration) - -:rtype: FieldOrigin %End %MethodCode if ( a0 < 0 || a0 >= sipCpp->count() ) @@ -227,8 +202,6 @@ Get field's origin (value from an enumeration) int fieldOriginIndex( int fieldIdx ) const; %Docstring Get field's origin index (its meaning is specific to each type of origin) - -:rtype: int %End %MethodCode if ( a0 < 0 || a0 >= sipCpp->count() ) @@ -252,8 +225,6 @@ Alias for indexOf :param fieldName: The name of the field. :return: The field index if found or -1 in case it cannot be found. -:rtype: int - .. seealso:: :py:func:`lookupField` %End @@ -267,8 +238,6 @@ name of the field. :param fieldName: The name of the field. :return: The field index if found or -1 in case it cannot be found. -:rtype: int - .. seealso:: :py:func:`lookupField` @@ -287,8 +256,6 @@ This method matches in the following order: :param fieldName: The name to look for. :return: The field index if found or -1 in case it cannot be found. -:rtype: int - .. seealso:: :py:func:`indexFromName` @@ -299,24 +266,18 @@ This method matches in the following order: %Docstring Utility function to get list of attribute indexes -:rtype: QgsAttributeList - .. versionadded:: 2.4 %End QList toList() const; %Docstring Utility function to return a list of QgsField instances - -:rtype: list of QgsField %End bool operator==( const QgsFields &other ) const; bool operator!=( const QgsFields &other ) const; %Docstring -:rtype: bool - .. versionadded:: 2.6 %End @@ -324,8 +285,6 @@ Utility function to return a list of QgsField instances %Docstring Returns an icon corresponding to a field index, based on the field's type and source -:rtype: QIcon - .. versionadded:: 2.14 %End %MethodCode diff --git a/python/core/qgsfiledownloader.sip b/python/core/qgsfiledownloader.sip index c9f833ae243e..75783ae02522 100644 --- a/python/core/qgsfiledownloader.sip +++ b/python/core/qgsfiledownloader.sip @@ -37,6 +37,7 @@ An optional authentication configuration can be specified. QgsFileDownloader( const QUrl &url, const QString &outputFileName, const QString &authcfg = QString(), bool delayStart = false ); %Docstring QgsFileDownloader + :param url: the download url :param outputFileName: file name where the downloaded content will be stored :param authcfg: optionally apply this authentication configuration diff --git a/python/core/qgsfileutils.sip b/python/core/qgsfileutils.sip index ee484aa3d622..c5016dfea5f8 100644 --- a/python/core/qgsfileutils.sip +++ b/python/core/qgsfileutils.sip @@ -25,8 +25,6 @@ class QgsFileUtils static QString representFileSize( qint64 bytes ); %Docstring Return the human size from bytes - -:rtype: str %End }; diff --git a/python/core/qgsfontutils.sip b/python/core/qgsfontutils.sip index 2a49e9ce9438..ff83b398d045 100644 --- a/python/core/qgsfontutils.sip +++ b/python/core/qgsfontutils.sip @@ -21,19 +21,17 @@ class QgsFontUtils static bool fontMatchOnSystem( const QFont &f ); %Docstring Check whether exact font is on system -:param f: The font to test for match -:rtype: bool +:param f: The font to test for match %End static bool fontFamilyOnSystem( const QString &family ); %Docstring Check whether font family is on system in a quick manner, which does not compare [foundry] + :param family: The family to test :return: Whether family was found on system -:rtype: bool - .. note:: @@ -43,12 +41,11 @@ Check whether font family is on system in a quick manner, which does not compare static bool fontFamilyHasStyle( const QString &family, const QString &style ); %Docstring Check whether font family on system has specific style + :param family: The family to test :param style: The style to test for :return: Whether family has style -:rtype: bool - .. versionadded:: 2.1 %End @@ -56,25 +53,23 @@ Check whether font family on system has specific style static bool fontFamilyMatchOnSystem( const QString &family, QString *chosen = 0, bool *match = 0 ); %Docstring Check whether font family is on system + :param family: The family to test :param chosen: The actual family (possibly from different foundry) returned by system :param match: Whether the family [foundry] returned by system is a match :return: Whether family was found on system -:rtype: bool - %End static bool updateFontViaStyle( QFont &f, const QString &fontstyle, bool fallback = false ); %Docstring Updates font with named style and retain all font properties + :param f: The font to update :param fontstyle: The style to try and switch the font to :param fallback: If no matching fontstyle found for font, assign most similar or first style found to font :return: Whether the font was updated (also returns true if the requested style matches font's current style) -:rtype: bool - .. note:: @@ -85,19 +80,16 @@ Updates font with named style and retain all font properties %Docstring Get standard test font family -:rtype: str - .. versionadded:: 2.1 %End static bool loadStandardTestFonts( const QStringList &loadstyles ); %Docstring Loads standard test fonts from filesystem or qrc resource + :param loadstyles: List of styles to load, e.g. All, Roman, Oblique, Bold, Bold Oblique :return: Whether any font was loaded -:rtype: bool - .. note:: @@ -109,12 +101,11 @@ Loads standard test fonts from filesystem or qrc resource static QFont getStandardTestFont( const QString &style = "Roman", int pointsize = 12 ); %Docstring Get standard test font with specific style + :param style: Style to load, e.g. Roman, Oblique, Bold, Bold Oblique :param pointsize: Font point size to set :return: QFont -:rtype: QFont - .. versionadded:: 2.1 %End @@ -122,13 +113,12 @@ Get standard test font with specific style static QDomElement toXmlElement( const QFont &font, QDomDocument &document, const QString &elementName ); %Docstring Returns a DOM element containing the properties of the font. + :param font: font :param document: DOM document :param elementName: name for DOM element :return: DOM element containing font settings -:rtype: QDomElement - .. versionadded:: 2.10 @@ -139,12 +129,11 @@ Returns a DOM element containing the properties of the font. %Docstring Sets the properties of a font to match the properties stored in an XML element. Calling this will overwrite the current properties of the font. + :param font: font to update :param element: DOM element :return: true if properties were successfully read from element -:rtype: bool - .. versionadded:: 2.10 @@ -157,13 +146,12 @@ this will overwrite the current properties of the font. %Docstring Sets the properties of a font to match the properties stored in an XML child node. Calling this will overwrite the current properties of the font. + :param font: font to update :param element: DOM element :param childNode: name of child node :return: true if child node exists and properties were successfully read from node -:rtype: bool - .. versionadded:: 2.10 @@ -177,8 +165,6 @@ this will overwrite the current properties of the font. Returns new mime data representing the specified ``font`` settings. Caller takes responsibility for deleting the returned object. -:rtype: QMimeData - .. seealso:: :py:func:`fromMimeData()` .. versionadded:: 3.0 @@ -189,8 +175,6 @@ Caller takes responsibility for deleting the returned object. Attempts to parse the provided mime ``data`` as a QFont. If data can be parsed as a QFont, ``ok`` will be set to true. -:rtype: QFont - .. seealso:: :py:func:`toMimeData()` .. versionadded:: 3.0 @@ -199,11 +183,10 @@ If data can be parsed as a QFont, ``ok`` will be set to true. static QString translateNamedStyle( const QString &namedStyle ); %Docstring Returns the localized named style of a font, if such a translation is available. + :param namedStyle: a named style, i.e. "Bold", "Italic", etc :return: The localized named style -:rtype: str - .. versionadded:: 2.12 @@ -213,11 +196,10 @@ Returns the localized named style of a font, if such a translation is available. static QString untranslateNamedStyle( const QString &namedStyle ); %Docstring Returns the english named style of a font, if possible. + :param namedStyle: a localized named style, i.e. "Fett", "Kursiv", etc :return: The english named style -:rtype: str - .. versionadded:: 2.12 @@ -227,6 +209,7 @@ Returns the english named style of a font, if possible. static QString asCSS( const QFont &font, double pointToPixelMultiplier = 1.0 ); %Docstring Returns a CSS string representing the specified font as closely as possible. + :param font: QFont to convert :param pointToPixelMultiplier: scaling factor to apply to convert point sizes to pixel font sizes. The CSS returned by this function will always use pixels for font sizes, so this parameter @@ -234,8 +217,6 @@ should be set to a suitable value to convert point sizes to pixels (e.g., taking destination DPI) :return: partial CSS string, e.g., "font-family: Comic Sans; font-size: 12px;" -:rtype: str - .. versionadded:: 2.16 %End @@ -253,8 +234,6 @@ Adds a font ``family`` to the list of recently used font families. %Docstring Returns a list of recently used font families. -:rtype: list of str - .. seealso:: :py:func:`addRecentFontFamily()` .. versionadded:: 3.0 diff --git a/python/core/qgsgeometrysimplifier.sip b/python/core/qgsgeometrysimplifier.sip index 8177fccde10a..24863e89ee47 100644 --- a/python/core/qgsgeometrysimplifier.sip +++ b/python/core/qgsgeometrysimplifier.sip @@ -25,22 +25,16 @@ Abstract base class for simplify geometries using a specific algorithm virtual QgsGeometry simplify( const QgsGeometry &geometry ) const = 0; %Docstring Returns a simplified version the specified geometry - -:rtype: QgsGeometry %End public: static bool isGeneralizableByDeviceBoundingBox( const QgsRectangle &envelope, float mapToPixelTol = 1.0f ); %Docstring Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance - -:rtype: bool %End static bool isGeneralizableByDeviceBoundingBox( const QVector &points, float mapToPixelTol = 1.0f ); %Docstring Returns whether the device-geometry can be replaced by its BBOX when is applied the specified tolerance - -:rtype: bool %End }; diff --git a/python/core/qgsgml.sip b/python/core/qgsgml.sip index 7e256bd66e96..2bffc943b4f5 100644 --- a/python/core/qgsgml.sip +++ b/python/core/qgsgml.sip @@ -38,6 +38,7 @@ request is finished * %Docstring Does the Http GET request to the wfs server Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. + :param uri: GML URL :param wkbType: wkbType to retrieve :param extent: retrieved extents @@ -46,8 +47,6 @@ Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. :param authcfg: authentication configuration id :return: 0 in case of success -:rtype: int - .. note:: @@ -58,30 +57,22 @@ Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. %Docstring Read from GML data. Constructor uri param is ignored Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. - -:rtype: int %End QMap featuresMap() const; %Docstring Get parsed features for given type name - -:rtype: QMap %End QMap idsMap() const; %Docstring Get feature ids map - -:rtype: QMap %End QgsCoordinateReferenceSystem crs() const; %Docstring Returns features spatial reference system -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 2.1 %End diff --git a/python/core/qgsgmlschema.sip b/python/core/qgsgmlschema.sip index 04d2148d9d59..b628dcf09276 100644 --- a/python/core/qgsgmlschema.sip +++ b/python/core/qgsgmlschema.sip @@ -26,28 +26,12 @@ Constructor for QgsGmlFeatureClass. QgsGmlFeatureClass( const QString &name, const QString &path ); QList &fields(); -%Docstring - -:rtype: list of QgsField -%End int fieldIndex( const QString &name ); -%Docstring - -:rtype: int -%End QString path() const; -%Docstring - -:rtype: str -%End QStringList &geometryAttributes(); -%Docstring - -:rtype: list of str -%End }; @@ -63,8 +47,6 @@ class QgsGmlSchema : QObject bool parseXSD( const QByteArray &xml ); %Docstring Get fields info from XSD - -:rtype: bool %End bool guessSchema( const QByteArray &data ); @@ -72,39 +54,30 @@ Get fields info from XSD Guess GML schema from data if XSD does not exist. Currently only recognizes UMN Mapserver GetFeatureInfo GML response. Supports only UTF-8, UTF-16, ISO-8859-1, US-ASCII XML encodings. + :param data: GML data :return: true in case of success * -:rtype: bool - %End QStringList typeNames() const; %Docstring Get list of dot separated paths to feature classes parsed from GML or XSD - -:rtype: list of str %End QList fields( const QString &typeName ); %Docstring Get fields for type/class name parsed from GML or XSD - -:rtype: list of QgsField %End QStringList geometryAttributes( const QString &typeName ); %Docstring Get list of geometry attributes for type/class name - -:rtype: list of str %End QgsError error() const; %Docstring Get error if parseXSD() or guessSchema() failed - -:rtype: QgsError %End }; diff --git a/python/core/qgshistogram.sip b/python/core/qgshistogram.sip index aa8604ce3081..7cc509dc2929 100644 --- a/python/core/qgshistogram.sip +++ b/python/core/qgshistogram.sip @@ -36,6 +36,7 @@ Constructor for QgsHistogram. void setValues( const QList &values ); %Docstring Assigns numeric source values for the histogram. + :param values: list of doubles %End @@ -43,13 +44,12 @@ Assigns numeric source values for the histogram. %Docstring Assigns numeric source values for the histogram from a vector layer's field or as the result of an expression. + :param layer: vector layer :param fieldOrExpression: field name or expression to be evaluated :param feedback: optional feedback object to allow cancelation of calculation :return: true if values were successfully set -:rtype: bool - %End double optimalBinWidth() const; @@ -58,8 +58,6 @@ Calculates the optimal bin width using the Freedman-Diaconis rule. Bins widths a determined by the inter-quartile range of values and the number of values. :return: optimal width for bins -:rtype: float - .. seealso:: :py:func:`optimalNumberBins` @@ -75,8 +73,6 @@ Freedman-Diaconis rule. The number of bins are determined by the inter-quartile of values and the number of values. :return: optimal number of bins -:rtype: int - .. seealso:: :py:func:`optimalBinWidth` @@ -89,11 +85,10 @@ of values and the number of values. %Docstring Returns a list of edges for the histogram for a specified number of bins. This list will be length bins + 1, as both the first and last value are also included. + :param bins: number of bins :return: list of bin edges -:rtype: list of float - .. note:: @@ -103,11 +98,10 @@ will be length bins + 1, as both the first and last value are also included. QList counts( int bins ) const; %Docstring Returns the calculated list of the counts for the histogram bins. + :param bins: number of histogram bins :return: list of histogram counts -:rtype: list of int - .. note:: diff --git a/python/core/qgshtmlutils.sip b/python/core/qgshtmlutils.sip index f18403140179..a47253670c27 100644 --- a/python/core/qgshtmlutils.sip +++ b/python/core/qgshtmlutils.sip @@ -26,8 +26,6 @@ class QgsHtmlUtils %Docstring Build a bullet list. This will return a HTML "ul" element. - -:rtype: str %End }; diff --git a/python/core/qgsinterval.sip b/python/core/qgsinterval.sip index fd4023e1cbb0..9c471bce3b9e 100644 --- a/python/core/qgsinterval.sip +++ b/python/core/qgsinterval.sip @@ -58,6 +58,7 @@ Default constructor for QgsInterval. Creates an invalid interval. QgsInterval( double seconds ); %Docstring Constructor for QgsInterval. + :param seconds: duration of interval in seconds %End @@ -65,14 +66,13 @@ Constructor for QgsInterval. %Docstring Returns the interval duration in years (based on an average year length) -:rtype: float - .. seealso:: :py:func:`setYears()` %End void setYears( double years ); %Docstring Sets the interval duration in years. + :param years: duration in years (based on average year length) .. seealso:: :py:func:`years()` @@ -82,14 +82,13 @@ Sets the interval duration in years. %Docstring Returns the interval duration in months (based on a 30 day month). -:rtype: float - .. seealso:: :py:func:`setMonths()` %End void setMonths( double months ); %Docstring Sets the interval duration in months. + :param months: duration in months (based on a 30 day month) .. seealso:: :py:func:`months()` @@ -99,14 +98,13 @@ Sets the interval duration in months. %Docstring Returns the interval duration in weeks. -:rtype: float - .. seealso:: :py:func:`setWeeks()` %End void setWeeks( double weeks ); %Docstring Sets the interval duration in weeks. + :param weeks: duration in weeks .. seealso:: :py:func:`weeks()` @@ -116,14 +114,13 @@ Sets the interval duration in weeks. %Docstring Returns the interval duration in days. -:rtype: float - .. seealso:: :py:func:`setDays()` %End void setDays( double days ); %Docstring Sets the interval duration in days. + :param days: duration in days .. seealso:: :py:func:`days()` @@ -133,14 +130,13 @@ Sets the interval duration in days. %Docstring Returns the interval duration in hours. -:rtype: float - .. seealso:: :py:func:`setHours()` %End void setHours( double hours ); %Docstring Sets the interval duration in hours. + :param hours: duration in hours .. seealso:: :py:func:`hours()` @@ -150,14 +146,13 @@ Sets the interval duration in hours. %Docstring Returns the interval duration in minutes. -:rtype: float - .. seealso:: :py:func:`setMinutes()` %End void setMinutes( double minutes ); %Docstring Sets the interval duration in minutes. + :param minutes: duration in minutes .. seealso:: :py:func:`minutes()` @@ -167,14 +162,13 @@ Sets the interval duration in minutes. %Docstring Returns the interval duration in seconds. -:rtype: float - .. seealso:: :py:func:`setSeconds()` %End void setSeconds( double seconds ); %Docstring Sets the interval duration in seconds. + :param seconds: duration in seconds .. seealso:: :py:func:`seconds()` @@ -184,14 +178,13 @@ Sets the interval duration in seconds. %Docstring Returns true if the interval is valid. -:rtype: bool - .. seealso:: :py:func:`setValid()` %End void setValid( bool valid ); %Docstring Sets whether the interval is valid. + :param valid: set to true to set the interval as valid. .. seealso:: :py:func:`isValid()` @@ -202,11 +195,10 @@ Sets whether the interval is valid. static QgsInterval fromString( const QString &string ); %Docstring Converts a string to an interval + :param string: string to parse :return: interval, or invalid interval if string could not be parsed -:rtype: QgsInterval - %End operator QVariant() const; diff --git a/python/core/qgsjsonutils.sip b/python/core/qgsjsonutils.sip index 228cfc0446b2..a47cc2f89d2b 100644 --- a/python/core/qgsjsonutils.sip +++ b/python/core/qgsjsonutils.sip @@ -29,6 +29,7 @@ if either the source vector layer or source CRS is set. QgsJsonExporter( QgsVectorLayer *vectorLayer = 0, int precision = 6 ); %Docstring Constructor for QgsJsonExporter. + :param vectorLayer: associated vector layer (required for related attribute export) :param precision: maximum number of decimal places to use for geometry coordinates, the RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6 @@ -38,6 +39,7 @@ the RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6 %Docstring Sets the maximum number of decimal places to use in geometry coordinates. The RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6 + :param precision: number of decimal places .. seealso:: :py:func:`precision()` @@ -47,14 +49,13 @@ The RFC 7946 GeoJSON specification recommends limiting coordinate precision to 6 %Docstring Returns the maximum number of decimal places to use in geometry coordinates. -:rtype: int - .. seealso:: :py:func:`setPrecision()` %End void setIncludeGeometry( bool includeGeometry ); %Docstring Sets whether to include geometry in the JSON exports. + :param includeGeometry: set to false to prevent geometry inclusion .. seealso:: :py:func:`includeGeometry()` @@ -64,14 +65,13 @@ Sets whether to include geometry in the JSON exports. %Docstring Returns whether geometry will be included in the JSON exports. -:rtype: bool - .. seealso:: :py:func:`setIncludeGeometry()` %End void setIncludeAttributes( bool includeAttributes ); %Docstring Sets whether to include attributes in the JSON exports. + :param includeAttributes: set to false to prevent attribute inclusion .. seealso:: :py:func:`includeAttributes()` @@ -81,14 +81,13 @@ Sets whether to include attributes in the JSON exports. %Docstring Returns whether attributes will be included in the JSON exports. -:rtype: bool - .. seealso:: :py:func:`setIncludeAttributes()` %End void setIncludeRelated( bool includeRelated ); %Docstring Sets whether to include attributes of features linked via references in the JSON exports. + :param includeRelated: set to true to include attributes for any related child features within the exported properties element. @@ -103,8 +102,6 @@ within the exported properties element. %Docstring Returns whether attributes of related (child) features will be included in the JSON exports. -:rtype: bool - .. seealso:: :py:func:`setIncludeRelated()` %End @@ -112,6 +109,7 @@ Returns whether attributes of related (child) features will be included in the J %Docstring Sets the associated vector layer (required for related attribute export). This will automatically update the sourceCrs() to match. + :param vectorLayer: vector layer .. seealso:: :py:func:`vectorLayer()` @@ -121,8 +119,6 @@ update the sourceCrs() to match. %Docstring Returns the associated vector layer, if set. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setVectorLayer()` %End @@ -130,6 +126,7 @@ Returns the associated vector layer, if set. %Docstring Sets the source CRS for feature geometries. The source CRS must be set if geometries are to be correctly automatically reprojected to WGS 84, to match GeoJSON specifications. + :param crs: source CRS for input feature geometries .. note:: @@ -144,14 +141,13 @@ correctly automatically reprojected to WGS 84, to match GeoJSON specifications. Returns the source CRS for feature geometries. The source CRS must be set if geometries are to be correctly automatically reprojected to WGS 84, to match GeoJSON specifications. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setSourceCrs()` %End void setAttributes( const QgsAttributeList &attributes ); %Docstring Sets the list of attributes to include in the JSON exports. + :param attributes: list of attribute indexes, or an empty list to include all attributes @@ -170,8 +166,6 @@ attributes specified by this method. Returns the list of attributes which will be included in the JSON exports, or an empty list if all attributes will be included. -:rtype: QgsAttributeList - .. seealso:: :py:func:`setAttributes()` .. seealso:: :py:func:`excludedAttributes()` @@ -186,6 +180,7 @@ attributes returned by this method. %Docstring Sets a list of attributes to specifically exclude from the JSON exports. Excluded attributes take precedence over attributes included via setAttributes(). + :param attributes: list of attribute indexes to exclude .. seealso:: :py:func:`excludedAttributes()` @@ -198,8 +193,6 @@ take precedence over attributes included via setAttributes(). Returns a list of attributes which will be specifically excluded from the JSON exports. Excluded attributes take precedence over attributes included via attributes(). -:rtype: QgsAttributeList - .. seealso:: :py:func:`setExcludedAttributes()` .. seealso:: :py:func:`attributes()` @@ -210,14 +203,13 @@ take precedence over attributes included via attributes(). const QVariant &id = QVariant() ) const; %Docstring Returns a GeoJSON string representation of a feature. + :param feature: feature to convert :param extraProperties: map of extra attributes to include in feature's properties :param id: optional ID to use as GeoJSON feature's ID instead of input feature's ID. If omitted, feature's ID is used. :return: GeoJSON string -:rtype: str - .. seealso:: :py:func:`exportFeatures()` %End @@ -226,11 +218,10 @@ ID is used. QString exportFeatures( const QgsFeatureList &features ) const; %Docstring Returns a GeoJSON string representation of a list of features (feature collection). + :param features: features to convert :return: GeoJSON string -:rtype: str - .. seealso:: :py:func:`exportFeature()` %End @@ -254,13 +245,12 @@ class QgsJsonUtils static QgsFeatureList stringToFeatureList( const QString &string, const QgsFields &fields, QTextCodec *encoding ); %Docstring Attempts to parse a GeoJSON string to a collection of features. + :param string: GeoJSON string to parse :param fields: fields collection to use for parsed features :param encoding: text encoding :return: list of parsed features, or an empty list if no features could be parsed -:rtype: QgsFeatureList - .. seealso:: :py:func:`stringToFields()` @@ -272,12 +262,11 @@ Attempts to parse a GeoJSON string to a collection of features. static QgsFields stringToFields( const QString &string, QTextCodec *encoding ); %Docstring Attempts to retrieve the fields from a GeoJSON string representing a collection of features. + :param string: GeoJSON string to parse :param encoding: text encoding :return: retrieved fields collection, or an empty list if no fields could be determined from the string -:rtype: QgsFields - .. seealso:: :py:func:`stringToFeatureList()` @@ -290,34 +279,31 @@ Attempts to retrieve the fields from a GeoJSON string representing a collection %Docstring Encodes a value to a JSON string representation, adding appropriate quotations and escaping where required. + :param value: value to encode :return: encoded value -:rtype: str - %End static QString exportAttributes( const QgsFeature &feature, QgsVectorLayer *layer = 0, const QVector &attributeWidgetCaches = QVector() ); %Docstring Exports all attributes from a QgsFeature as a JSON map type. + :param feature: feature to export :param layer: optional associated vector layer. If specified, this allows richer export utilising settings like the layer's fields widget configuration. :param attributeWidgetCaches: optional widget configuration cache. Can be used to speed up exporting the attributes for multiple features from the same layer. - -:rtype: str %End static QVariantList parseArray( const QString &json, QVariant::Type type ); %Docstring Parse a simple array (depth=1). + :param json: the JSON to parse :param type: the type of the elements -:rtype: QVariantList - .. versionadded:: 3.0 %End }; diff --git a/python/core/qgslabelingenginesettings.sip b/python/core/qgslabelingenginesettings.sip index 00718e89ceeb..198ddcb5f1e0 100644 --- a/python/core/qgslabelingenginesettings.sip +++ b/python/core/qgslabelingenginesettings.sip @@ -55,14 +55,10 @@ Set flags of the labeling engine Flags flags() const; %Docstring Get flags of the labeling engine - -:rtype: Flags %End bool testFlag( Flag f ) const; %Docstring Test whether a particular flag is enabled - -:rtype: bool %End void setFlag( Flag f, bool enabled = true ); %Docstring @@ -85,8 +81,6 @@ Set which search method to use for removal collisions between labels Search searchMethod() const; %Docstring Which search method to use for removal collisions between labels - -:rtype: Search %End void readSettingsFromProject( QgsProject *project ); diff --git a/python/core/qgslabelsearchtree.sip b/python/core/qgslabelsearchtree.sip index 8738f053aa6a..8066783c2958 100644 --- a/python/core/qgslabelsearchtree.sip +++ b/python/core/qgslabelsearchtree.sip @@ -41,10 +41,6 @@ Removes and deletes all the entries QgsLabelSearchTree( const QgsLabelSearchTree &rh ); //! QgsLabelSearchTree cannot be copied. QgsLabelSearchTree &operator=( const QgsLabelSearchTree & ); -%Docstring - -:rtype: QgsLabelSearchTree -%End }; /************************************************************************ diff --git a/python/core/qgslayerdefinition.sip b/python/core/qgslayerdefinition.sip index 5b73d1c3308d..6a789b607a31 100644 --- a/python/core/qgslayerdefinition.sip +++ b/python/core/qgslayerdefinition.sip @@ -28,26 +28,18 @@ files also store the layer tree info for the exported layers, including group in static bool loadLayerDefinition( const QString &path, QgsProject *project, QgsLayerTreeGroup *rootGroup, QString &errorMessage /Out/ ); %Docstring Loads the QLR at path into QGIS. New layers are added to given project into layer tree specified by rootGroup - -:rtype: bool %End static bool loadLayerDefinition( QDomDocument doc, QgsProject *project, QgsLayerTreeGroup *rootGroup, QString &errorMessage /Out/, const QgsReadWriteContext &context ); %Docstring Loads the QLR from the XML document. New layers are added to given project into layer tree specified by rootGroup - -:rtype: bool %End static bool exportLayerDefinition( QString path, const QList &selectedTreeNodes, QString &errorMessage /Out/ ); %Docstring Export the selected layer tree nodes to a QLR file - -:rtype: bool %End static bool exportLayerDefinition( QDomDocument doc, const QList &selectedTreeNodes, QString &errorMessage /Out/, const QgsReadWriteContext &context ); %Docstring Export the selected layer tree nodes to a QLR-XML document - -:rtype: bool %End static QDomDocument exportLayerDefinitionLayers( const QList &layers, const QgsReadWriteContext &context ); @@ -59,8 +51,6 @@ Layer definitions can be used to load a layer and styling all from a single file This is a low-level routine that does not write layer tree. -:rtype: QDomDocument - .. seealso:: :py:func:`exportLayerDefinition()` %End @@ -69,8 +59,6 @@ This is a low-level routine that does not write layer tree. Creates new layers from a layer definition document. This is a low-level routine that does not resolve layer ID conflicts, dependencies and joins -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`loadLayerDefinition()` %End @@ -79,8 +67,6 @@ This is a low-level routine that does not resolve layer ID conflicts, dependenci Creates new layers from a layer definition file (.QLR) This is a low-level routine that does not resolve layer ID conflicts, dependencies and joins -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`loadLayerDefinition()` %End @@ -98,41 +84,35 @@ Class used to work with layer dependencies stored in a XML project or layer defi DependencySorter( const QDomDocument &doc ); %Docstring Constructor + :param doc: The XML document containing maplayer elements %End DependencySorter( const QString &fileName ); %Docstring Constructor + :param fileName: The filename where the XML document is stored %End QVector sortedLayerNodes() const; %Docstring Get the layer nodes in an order where they can be loaded incrementally without dependency break - -:rtype: list of QDomNode %End QStringList sortedLayerIds() const; %Docstring Get the layer IDs in an order where they can be loaded incrementally without dependency break - -:rtype: list of str %End bool hasCycle() const; %Docstring Whether some cyclic dependency has been detected - -:rtype: bool %End bool hasMissingDependency() const; %Docstring Whether some dependency is missing - -:rtype: bool %End }; diff --git a/python/core/qgslegendrenderer.sip b/python/core/qgslegendrenderer.sip index f80fc25cbef1..042f6f19eecd 100644 --- a/python/core/qgslegendrenderer.sip +++ b/python/core/qgslegendrenderer.sip @@ -35,8 +35,6 @@ Construct legend renderer. The ownership of legend model does not change QSizeF minimumSize(); %Docstring Run the layout algorithm and determine the size required for legend - -:rtype: QSizeF %End void setLegendSize( QSizeF s ); @@ -47,8 +45,6 @@ Set the preferred resulting legend size. QSizeF legendSize() const; %Docstring Find out preferred legend size set by the client. If null, the legend will be drawn with the minimum size - -:rtype: QSizeF %End void drawLegend( QPainter *painter ); @@ -60,10 +56,6 @@ Painter should be scaled beforehand so that units correspond to millimeters. static void setNodeLegendStyle( QgsLayerTreeNode *node, QgsLegendStyle::Style style ); static QgsLegendStyle::Style nodeLegendStyle( QgsLayerTreeNode *node, QgsLayerTreeModel *model ); -%Docstring - -:rtype: QgsLegendStyle.Style -%End }; diff --git a/python/core/qgslegendsettings.sip b/python/core/qgslegendsettings.sip index c61941944046..13a3fae176cb 100644 --- a/python/core/qgslegendsettings.sip +++ b/python/core/qgslegendsettings.sip @@ -29,18 +29,12 @@ in QgsLegendModel class. void setTitle( const QString &t ); QString title() const; -%Docstring - -:rtype: str -%End Qt::AlignmentFlag titleAlignment() const; %Docstring Returns the alignment of the legend title :return: Qt.AlignmentFlag for the legend title -:rtype: Qt.AlignmentFlag - .. seealso:: :py:func:`setTitleAlignment` %End @@ -48,6 +42,7 @@ Returns the alignment of the legend title void setTitleAlignment( Qt::AlignmentFlag alignment ); %Docstring Sets the alignment of the legend title + :param alignment: Text alignment for drawing the legend title .. seealso:: :py:func:`titleAlignment` @@ -56,73 +51,37 @@ Sets the alignment of the legend title QgsLegendStyle style( QgsLegendStyle::Style s ) const; %Docstring Returns style - -:rtype: QgsLegendStyle %End void setStyle( QgsLegendStyle::Style s, const QgsLegendStyle &style ); double boxSpace() const; -%Docstring - -:rtype: float -%End void setBoxSpace( double s ); void setWrapChar( const QString &t ); QString wrapChar() const; -%Docstring - -:rtype: str -%End double columnSpace() const; -%Docstring - -:rtype: float -%End void setColumnSpace( double s ); int columnCount() const; -%Docstring - -:rtype: int -%End void setColumnCount( int c ); bool splitLayer() const; -%Docstring - -:rtype: bool -%End void setSplitLayer( bool s ); bool equalColumnWidth() const; -%Docstring - -:rtype: bool -%End void setEqualColumnWidth( bool s ); QColor fontColor() const; -%Docstring - -:rtype: QColor -%End void setFontColor( const QColor &c ); QSizeF symbolSize() const; -%Docstring - -:rtype: QSizeF -%End void setSymbolSize( QSizeF s ); bool drawRasterStroke() const; %Docstring Returns whether a stroke will be drawn around raster symbol items. -:rtype: bool - .. seealso:: :py:func:`setDrawRasterStroke()` .. seealso:: :py:func:`rasterStrokeColor()` @@ -135,6 +94,7 @@ Returns whether a stroke will be drawn around raster symbol items. void setDrawRasterStroke( bool enabled ); %Docstring Sets whether a stroke will be drawn around raster symbol items. + :param enabled: set to true to draw borders .. seealso:: :py:func:`drawRasterStroke()` @@ -151,8 +111,6 @@ Sets whether a stroke will be drawn around raster symbol items. Returns the stroke color for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. -:rtype: QColor - .. seealso:: :py:func:`setRasterStrokeColor()` .. seealso:: :py:func:`drawRasterStroke()` @@ -166,6 +124,7 @@ only drawn if drawRasterStroke() is true. %Docstring Sets the stroke color for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. + :param color: stroke color .. seealso:: :py:func:`rasterStrokeColor()` @@ -182,8 +141,6 @@ only drawn if drawRasterStroke() is true. Returns the stroke width (in millimeters) for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. -:rtype: float - .. seealso:: :py:func:`setRasterStrokeWidth()` .. seealso:: :py:func:`drawRasterStroke()` @@ -197,6 +154,7 @@ only drawn if drawRasterStroke() is true. %Docstring Sets the stroke width for the stroke drawn around raster symbol items. The stroke is only drawn if drawRasterStroke() is true. + :param width: stroke width in millimeters .. seealso:: :py:func:`rasterStrokeWidth()` @@ -209,31 +167,15 @@ only drawn if drawRasterStroke() is true. %End QSizeF wmsLegendSize() const; -%Docstring - -:rtype: QSizeF -%End void setWmsLegendSize( QSizeF s ); double lineSpacing() const; -%Docstring - -:rtype: float -%End void setLineSpacing( double s ); double mmPerMapUnit() const; -%Docstring - -:rtype: float -%End void setMmPerMapUnit( double mmPerMapUnit ); bool useAdvancedEffects() const; -%Docstring - -:rtype: bool -%End void setUseAdvancedEffects( bool use ); double mapScale() const; @@ -241,8 +183,6 @@ only drawn if drawRasterStroke() is true. Returns the legend map scale. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setMapScale()` %End @@ -255,10 +195,6 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma %End int dpi() const; -%Docstring - -:rtype: int -%End void setDpi( int dpi ); @@ -266,8 +202,6 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma %Docstring Splits a string using the wrap char taking into account handling empty wrap char which means no wrapping - -:rtype: list of str %End void drawText( QPainter *p, double x, double y, const QString &text, const QFont &font ) const; @@ -279,6 +213,7 @@ pixel, scaling of font and painter to work around the Qt font bug) void drawText( QPainter *p, const QRectF &rect, const QString &text, const QFont &font, Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::AlignmentFlag valignment = Qt::AlignTop, int flags = Qt::TextWordWrap ) const; %Docstring Like the above, but with a rectangle for multiline text + :param p: painter to use :param rect: rectangle to draw into :param text: text to draw @@ -291,43 +226,31 @@ Like the above, but with a rectangle for multiline text QFont scaledFontPixelSize( const QFont &font ) const; %Docstring Returns a font where size is in pixel and font size is upscaled with FONT_WORKAROUND_SCALE - -:rtype: QFont %End double pixelFontSize( double pointSize ) const; %Docstring Calculates font to from point size to pixel size - -:rtype: float %End double textWidthMillimeters( const QFont &font, const QString &text ) const; %Docstring Returns the font width in millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE - -:rtype: float %End double fontHeightCharacterMM( const QFont &font, QChar c ) const; %Docstring Returns the font height of a character in millimeters - -:rtype: float %End double fontAscentMillimeters( const QFont &font ) const; %Docstring Returns the font ascent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE - -:rtype: float %End double fontDescentMillimeters( const QFont &font ) const; %Docstring Returns the font descent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE - -:rtype: float %End }; diff --git a/python/core/qgslegendstyle.sip b/python/core/qgslegendstyle.sip index a3782b8e12c9..519d2e0486f7 100644 --- a/python/core/qgslegendstyle.sip +++ b/python/core/qgslegendstyle.sip @@ -44,8 +44,6 @@ Composer legend components style QFont font() const; %Docstring The font for this style. - -:rtype: QFont %End void setFont( const QFont &font ); @@ -55,10 +53,6 @@ The font for this style. double margin( Side side ); -%Docstring - -:rtype: float -%End void setMargin( Side side, double margin ); void setMargin( double margin ); @@ -73,22 +67,16 @@ set all margins static QString styleName( Style s ); %Docstring Get name for style, used in project file - -:rtype: str %End static Style styleFromName( const QString &styleName ); %Docstring Get style from name, used in project file - -:rtype: Style %End static QString styleLabel( Style s ); %Docstring Get style label, translated, used in UI - -:rtype: str %End }; diff --git a/python/core/qgslogger.sip b/python/core/qgslogger.sip index 5d4761a90a4f..4b61238482fc 100644 --- a/python/core/qgslogger.sip +++ b/python/core/qgslogger.sip @@ -39,6 +39,7 @@ to this file rather than to stdout. static void debug( const QString &msg, int debuglevel = 1, const char *file = 0, const char *function = 0, int line = -1 ); %Docstring Goes to qDebug. + :param msg: the message to be printed :param debuglevel: :param file: file name where the message comes from @@ -72,8 +73,6 @@ Goes to qFatal %Docstring Reads the environment variable QGIS_DEBUG and converts it to int. If QGIS_DEBUG is not set, the function returns 1 if QGISDEBUG is defined and 0 if not* - -:rtype: int %End static void logMessageToFile( const QString &message ); @@ -85,8 +84,6 @@ Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. * %Docstring Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set, otherwise returns a file name for writing log messages to.* - -:rtype: str %End }; diff --git a/python/core/qgsmaphittest.sip b/python/core/qgsmaphittest.sip index f5b8a60a0855..9e2e944c047e 100644 --- a/python/core/qgsmaphittest.sip +++ b/python/core/qgsmaphittest.sip @@ -26,6 +26,7 @@ will be visible on the map - this is useful for content based legend. QgsMapHitTest( const QgsMapSettings &settings, const QgsGeometry &polygon = QgsGeometry(), const QgsMapHitTest::LayerFilterExpression &layerFilterExpression = QgsMapHitTest::LayerFilterExpression() ); %Docstring + :param settings: Map settings used to evaluate symbols :param polygon: Polygon geometry to refine the hit test :param layerFilterExpression: Expression string for each layer id to evaluate in order to refine the symbol selection @@ -44,11 +45,10 @@ Runs the map hit test bool symbolVisible( QgsSymbol *symbol, QgsVectorLayer *layer ) const; %Docstring Tests whether a symbol is visible for a specified layer. + :param symbol: symbol to find :param layer: vector layer -:rtype: bool - .. versionadded:: 2.12 .. seealso:: :py:func:`legendKeyVisible()` @@ -57,11 +57,10 @@ Tests whether a symbol is visible for a specified layer. bool legendKeyVisible( const QString &ruleKey, QgsVectorLayer *layer ) const; %Docstring Tests whether a given legend key is visible for a specified layer. + :param ruleKey: legend rule key :param layer: vector layer -:rtype: bool - .. versionadded:: 2.14 .. seealso:: :py:func:`symbolVisible()` diff --git a/python/core/qgsmaplayer.sip b/python/core/qgsmaplayer.sip index 60723c88f4a9..51f14e35df86 100644 --- a/python/core/qgsmaplayer.sip +++ b/python/core/qgsmaplayer.sip @@ -58,6 +58,7 @@ This is the base class for all map layer types (vector, raster). QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString(), const QString &source = QString() ); %Docstring Constructor for QgsMapLayer + :param type: layer type :param name: display name for the layer :param source: datasource of layer @@ -72,8 +73,6 @@ Returns a new instance equivalent to this one except for the id which is still unique. :return: a new layer instance -:rtype: QgsMapLayer - .. versionadded:: 3.0 %End @@ -81,15 +80,11 @@ is still unique. QgsMapLayer::LayerType type() const; %Docstring Returns the type of the layer. - -:rtype: QgsMapLayer.LayerType %End QString id() const; %Docstring Returns the layer's unique ID, which is used to access this layer from QgsProject. - -:rtype: str %End void setName( const QString &name ); @@ -105,16 +100,12 @@ Set the display ``name`` of the layer. %Docstring Returns the display name of the layer. -:rtype: str - .. seealso:: :py:func:`setName()` %End virtual QgsDataProvider *dataProvider(); %Docstring Returns the layer's data provider. - -:rtype: QgsDataProvider %End @@ -133,8 +124,6 @@ used by QGIS Server to identify the layer. Returns the short name of the layer used by QGIS Server to identify the layer. -:rtype: str - .. seealso:: :py:func:`setShortName()` %End @@ -152,8 +141,6 @@ Returns the title of the layer used by QGIS Server in GetCapabilities request. :return: the layer title -:rtype: str - .. seealso:: :py:func:`setTitle()` %End @@ -174,8 +161,6 @@ Returns the abstract of the layer used by QGIS Server in GetCapabilities request. :return: the layer abstract -:rtype: str - .. seealso:: :py:func:`setAbstract()` %End @@ -196,8 +181,6 @@ Returns the keyword list of the layer used by QGIS Server in GetCapabilities request. :return: the layer keyword list -:rtype: str - .. seealso:: :py:func:`setKeywordList()` %End @@ -221,8 +204,6 @@ used by QGIS Server in GetCapabilities request. DataUrl is a a link to the underlying data represented by a particular layer. :return: the layer DataUrl -:rtype: str - .. seealso:: :py:func:`setDataUrl()` %End @@ -245,8 +226,6 @@ used by QGIS Server in GetCapabilities request. DataUrl is a a link to the underlying data represented by a particular layer. :return: the layer DataUrl format -:rtype: str - .. seealso:: :py:func:`setDataUrlFormat()` %End @@ -270,8 +249,6 @@ used by QGIS Server in GetCapabilities request. Attribution indicates the provider of a layer or collection of layers. :return: the layer attribution -:rtype: str - .. seealso:: :py:func:`setAttribution()` %End @@ -294,8 +271,6 @@ used by QGIS Server in GetCapabilities request. Attribution indicates the provider of a layer or collection of layers. :return: the layer attribution URL -:rtype: str - .. seealso:: :py:func:`setAttributionUrl()` %End @@ -319,8 +294,6 @@ used by QGIS Server in GetCapabilities request. MetadataUrl is a a link to the detailed, standardized metadata about the data. :return: the layer metadata URL -:rtype: str - .. seealso:: :py:func:`setMetadataUrl()` %End @@ -343,8 +316,6 @@ used by QGIS Server in GetCapabilities request. MetadataUrlType indicates the standard to which the metadata complies. :return: the layer metadata type -:rtype: str - .. seealso:: :py:func:`setMetadataUrlType()` %End @@ -367,8 +338,6 @@ used by QGIS Server in GetCapabilities request. MetadataUrlType indicates how the metadata is structured. :return: the layer metadata format -:rtype: str - .. seealso:: :py:func:`setMetadataUrlFormat()` %End @@ -376,6 +345,7 @@ MetadataUrlType indicates how the metadata is structured. void setBlendMode( QPainter::CompositionMode blendMode ); %Docstring Set the blending mode used for rendering a layer. + :param blendMode: new blending mode .. seealso:: :py:func:`blendMode()` @@ -385,16 +355,12 @@ Set the blending mode used for rendering a layer. %Docstring Returns the current blending mode for a layer. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End bool readOnly() const; %Docstring Returns if this layer is read only. - -:rtype: bool %End virtual void reload(); @@ -406,16 +372,12 @@ Synchronises with changes in the datasource %Docstring Return new instance of QgsMapLayerRenderer that will be used for rendering of given context -:rtype: QgsMapLayerRenderer - .. versionadded:: 2.4 %End virtual QgsRectangle extent() const; %Docstring Returns the extent of the layer. - -:rtype: QgsRectangle %End bool isValid() const; @@ -424,8 +386,6 @@ Return the status of the layer. An invalid layer is one which has a bad datasour or other problem. Child classes set this flag when initialized. :return: true if the layer is valid and can be accessed -:rtype: bool - %End QString publicSource() const; @@ -434,8 +394,6 @@ Gets a version of the internal layer definition that has sensitive bits removed (for example, the password). This function should be used when displaying the source name for general viewing. -:rtype: str - .. seealso:: :py:func:`source()` %End @@ -444,8 +402,6 @@ be used when displaying the source name for general viewing. Returns the source for the layer. This source may contain usernames, passwords and other sensitive information. -:rtype: str - .. seealso:: :py:func:`publicSource()` %End @@ -453,8 +409,6 @@ and other sensitive information. %Docstring Returns the sublayers of this layer. (Useful for providers that manage their own layers, such as WMS). - -:rtype: list of str %End virtual void setLayerOrder( const QStringList &layers ); @@ -466,6 +420,7 @@ Reorders the *previously selected* sublayers of this layer from bottom to top. virtual void setSubLayerVisibility( const QString &name, bool visible ); %Docstring Set the visibility of the given sublayer name. + :param name: sublayer name :param visible: sublayer visibility %End @@ -473,22 +428,19 @@ Set the visibility of the given sublayer name. virtual bool isEditable() const; %Docstring Returns true if the layer can be edited. - -:rtype: bool %End virtual bool isSpatial() const; %Docstring Returns true if the layer is considered a spatial layer, ie it has some form of geometry associated with it. -:rtype: bool - .. versionadded:: 2.16 %End bool readLayerXml( const QDomElement &layerElement, const QgsReadWriteContext &context ); %Docstring Sets state from Dom document + :param layerElement: The Dom element corresponding to ``maplayer'' tag :param context: writing context (e.g. for conversion between relative and absolute paths) \note @@ -502,13 +454,12 @@ that they can read their own specific state from the given Dom node. Invoked by QgsProject.read(). :return: true if successful -:rtype: bool - %End bool writeLayerXml( QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Stores state in Dom node + :param layerElement: is a Dom element corresponding to ``maplayer'' tag :param document: is a the dom document being written :param context: reading context (e.g. for conversion between relative and absolute paths) @@ -523,8 +474,6 @@ that they can write their own specific state to the given Dom node. Invoked by QgsProject.write(). :return: true if successful -:rtype: bool - %End virtual void resolveReferences( QgsProject *project ); @@ -538,8 +487,6 @@ Resolve references to other layers (kept as layer IDs after reading XML) into la %Docstring Returns list of all keys within custom properties. Properties are stored in a map and saved in project file. -:rtype: list of str - .. seealso:: :py:func:`customProperty()` .. versionadded:: 3.0 @@ -558,8 +505,6 @@ Set a custom property for layer. Properties are stored in a map and saved in pro %Docstring Read a custom property from layer. Properties are stored in a map and saved in project file. -:rtype: QVariant - .. seealso:: :py:func:`setCustomProperty()` %End @@ -582,16 +527,12 @@ Remove a custom property from layer. Properties are stored in a map and saved in Get current status error. This error describes some principal problem for which layer cannot work and thus is not valid. It is not last error after accessing data by draw() etc. - -:rtype: QgsError %End QgsCoordinateReferenceSystem crs() const; %Docstring Returns the layer's spatial reference system. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 1.4 %End @@ -604,8 +545,6 @@ Sets layer's spatial reference system %Docstring A convenience function to capitalize and format a layer ``name``. -:rtype: str - .. versionadded:: 3.0 %End @@ -616,8 +555,6 @@ Retrieve the style URI for this layer record in the users style table in their personal qgis.db) :return: a QString with the style file name -:rtype: str - .. seealso:: :py:func:`also` %End @@ -627,12 +564,11 @@ record in the users style table in their personal qgis.db) Retrieve the default style for this layer if one exists (either as a .qml file on disk or as a record in the users style table in their personal qgis.db) + :param resultFlag: a reference to a flag that will be set to false if we did not manage to load the default style. :return: a QString with any status messages -:rtype: str - .. seealso:: :py:func:`also` %End @@ -642,6 +578,7 @@ we did not manage to load the default style. Retrieve a named style for this layer if one exists (either as a .qml file on disk or as a record in the users style table in their personal qgis.db) + :param uri: - the file name or other URI for the style file. First an attempt will be made to see if this is a file and load that, if that fails the qgis.db styles @@ -651,8 +588,6 @@ key matches the URI. we did not manage to load the default style. :return: a QString with any status messages -:rtype: str - .. seealso:: :py:func:`also` %End @@ -660,25 +595,23 @@ we did not manage to load the default style. virtual bool loadNamedStyleFromDatabase( const QString &db, const QString &uri, QString &qml /Out/ ); %Docstring Retrieve a named style for this layer from a sqlite database. + :param db: path to sqlite database :param uri: uri for table :param qml: will be set to QML style content from database :return: true if style was successfully loaded -:rtype: bool - %End virtual bool importNamedStyle( QDomDocument &doc, QString &errorMsg /Out/ ); %Docstring Import the properties of this layer from a QDomDocument + :param doc: source QDomDocument :param errorMsg: this QString will be initialized on error during the execution of readSymbology :return: true on success -:rtype: bool - .. versionadded:: 2.8 %End @@ -686,6 +619,7 @@ during the execution of readSymbology virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg ) const; %Docstring Export the properties of this layer as named style in a QDomDocument + :param doc: the target QDomDocument :param errorMsg: this QString will be initialized on error during the execution of writeSymbology @@ -695,6 +629,7 @@ during the execution of writeSymbology virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg ) const; %Docstring Export the properties of this layer as SLD style in a QDomDocument + :param doc: the target QDomDocument :param errorMsg: this QString will be initialized on error during the execution of writeSymbology @@ -705,12 +640,11 @@ during the execution of writeSymbology Save the properties of this layer as the default style (either as a .qml file on disk or as a record in the users style table in their personal qgis.db) + :param resultFlag: a reference to a flag that will be set to false if we did not manage to save the default style. :return: a QString with any status messages -:rtype: str - .. seealso:: :py:func:`loadNamedStyle()` %End @@ -720,6 +654,7 @@ we did not manage to save the default style. Save the properties of this layer as a named style (either as a .qml file on disk or as a record in the users style table in their personal qgis.db) + :param uri: the file name or other URI for the style file. First an attempt will be made to see if this is a file and save to that, if that fails the qgis.db styles @@ -729,8 +664,6 @@ key matches the URI. we did not manage to save the default style. :return: a QString with any status messages -:rtype: str - .. seealso:: :py:func:`saveDefaultStyle()` %End @@ -738,13 +671,12 @@ we did not manage to save the default style. virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const; %Docstring Saves the properties of this layer to an SLD format file. + :param uri: uri of destination for exported SLD file. :param resultFlag: a reference to a flag that will be set to false if the SLD file could not be generated :return: a string with any status or error messages -:rtype: str - .. seealso:: :py:func:`loadSldStyle()` %End @@ -752,47 +684,40 @@ the SLD file could not be generated virtual QString loadSldStyle( const QString &uri, bool &resultFlag ); %Docstring Attempts to style the layer using the formatting from an SLD type file. + :param uri: uri of source SLD file :param resultFlag: a reference to a flag that will be set to false if the SLD file could not be loaded :return: a string with any status or error messages -:rtype: str - .. seealso:: :py:func:`saveSldStyle()` %End virtual bool readSld( const QDomNode &node, QString &errorMessage ); -%Docstring - -:rtype: bool -%End virtual bool readSymbology( const QDomNode &node, QString &errorMessage, const QgsReadWriteContext &context ) = 0; %Docstring Read the symbology for the current layer from the Dom node supplied. + :param node: node that will contain the symbology definition for this layer. :param errorMessage: reference to string that will be updated with any error messages :param context: reading context (used for transform from relative to absolute paths) :return: true in case of success. -:rtype: bool - %End virtual bool readStyle( const QDomNode &node, QString &errorMessage, const QgsReadWriteContext &context ); %Docstring Read the style for the current layer from the Dom node supplied. + :param node: node that will contain the style definition for this layer. :param errorMessage: reference to string that will be updated with any error messages :param context: reading context (used for transform from relative to absolute paths) :return: true in case of success. -:rtype: bool - .. versionadded:: 2.16 @@ -804,27 +729,25 @@ Read the style for the current layer from the Dom node supplied. virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context ) const = 0; %Docstring Write the symbology for the layer into the docment provided. + :param node: the node that will have the style element added to it. :param doc: the document that will have the QDomNode added. :param errorMessage: reference to string that will be updated with any error messages :param context: writing context (used for transform from absolute to relative paths) :return: true in case of success. -:rtype: bool - %End virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context ) const; %Docstring Write just the style information for the layer into the document + :param node: the node that will have the style element added to it. :param doc: the document that will have the QDomNode added. :param errorMessage: reference to string that will be updated with any error messages :param context: writing context (used for transform from absolute to relative paths) :return: true in case of success. -:rtype: bool - .. versionadded:: 2.16 @@ -836,16 +759,12 @@ Write just the style information for the layer into the document QUndoStack *undoStack(); %Docstring Return pointer to layer's undo stack - -:rtype: QUndoStack %End QUndoStack *undoStackStyles(); %Docstring Return pointer to layer's style undo stack -:rtype: QUndoStack - .. versionadded:: 2.16 %End @@ -857,8 +776,6 @@ Sets the URL for the layer's legend. QString legendUrl() const; %Docstring Returns the URL for the layer's legend. - -:rtype: str %End void setLegendUrlFormat( const QString &legendUrlFormat ); @@ -869,13 +786,12 @@ Sets the format for a URL based layer legend. QString legendUrlFormat() const; %Docstring Returns the format for a URL based layer legend. - -:rtype: str %End void setLegend( QgsMapLayerLegend *legend /Transfer/ ); %Docstring Assign a legend controller to the map layer. The object will be responsible for providing legend items. + :param legend: Takes ownership of the object. Can be null pointer .. versionadded:: 2.6 @@ -885,8 +801,6 @@ Assign a legend controller to the map layer. The object will be responsible for %Docstring Can be null. -:rtype: QgsMapLayerLegend - .. versionadded:: 2.6 %End @@ -894,8 +808,6 @@ Can be null. %Docstring Get access to the layer's style manager. Style manager allows switching between multiple styles. -:rtype: QgsMapLayerStyleManager - .. versionadded:: 2.8 %End @@ -910,8 +822,6 @@ Sets 3D renderer for the layer. Takes ownership of the renderer. %Docstring Returns 3D renderer associated with the layer. May be null. -:rtype: QgsAbstract3DRenderer - .. versionadded:: 3.0 %End @@ -921,8 +831,6 @@ Tests whether the layer should be visible at the specified ``scale``. The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. :return: true if the layer is visible at the given scale. -:rtype: bool - .. versionadded:: 2.16 @@ -939,8 +847,6 @@ Returns the minimum map scale (i.e. most "zoomed out" scale) at which the layer The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility. -:rtype: float - .. note:: Scale based visibility is only used if setScaleBasedVisibility() is set to true. @@ -960,8 +866,6 @@ Returns the maximum map scale (i.e. most "zoomed in" scale) at which the layer w The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility. -:rtype: float - .. note:: Scale based visibility is only used if setScaleBasedVisibility() is set to true. @@ -980,8 +884,6 @@ A scale of 0 indicates no maximum scale visibility. Returns whether scale based visibility is enabled for the layer. :return: true if scale based visibility is enabled -:rtype: bool - .. seealso:: :py:func:`minimumScale()` @@ -996,8 +898,6 @@ Returns whether scale based visibility is enabled for the layer. %Docstring Returns true if auto refresh is enabled for the layer. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`autoRefreshInterval()` @@ -1010,8 +910,6 @@ Returns true if auto refresh is enabled for the layer. Returns the auto refresh interval (in milliseconds). Note that auto refresh is only active when hasAutoRefreshEnabled() is true. -:rtype: int - .. versionadded:: 3.0 .. seealso:: :py:func:`autoRefreshEnabled()` @@ -1050,8 +948,6 @@ Sets whether auto refresh is enabled for the layer. %Docstring Returns a reference to the layer's metadata store. -:rtype: QgsLayerMetadata - .. versionadded:: 3.0 .. seealso:: :py:func:`setMetadata()` @@ -1074,23 +970,17 @@ Sets the layer's ``metadata`` store. %Docstring Obtain a formatted HTML string containing assorted metadata for this layer. -:rtype: str - .. versionadded:: 3.0 %End virtual QDateTime timestamp() const; %Docstring Time stamp of data source in the moment when data/metadata were loaded by provider - -:rtype: QDateTime %End virtual QSet dependencies() const; %Docstring -:rtype: set of QgsMapLayerDependency - .. seealso:: :py:func:`setDataDependencies` as well as dependencies given by the provider @@ -1103,8 +993,6 @@ as well as dependencies given by the provider %Docstring Returns the message that should be notified by the provider to triggerRepaint -:rtype: str - .. versionadded:: 3.0 %End @@ -1112,8 +1000,6 @@ Returns the message that should be notified by the provider to triggerRepaint %Docstring Returns true if the refresh on provider nofification is enabled -:rtype: bool - .. versionadded:: 3.0 %End @@ -1156,6 +1042,7 @@ A ``scale`` of 0 indicates no maximum scale visibility. void setScaleBasedVisibility( const bool enabled ); %Docstring Sets whether scale based visibility is enabled for the layer. + :param enabled: set to true to enable scale based visibility .. seealso:: :py:func:`setMinimumScale` @@ -1188,8 +1075,6 @@ Triggers an emission of the styleChanged() signal. %Docstring Sets the list of dependencies. -:rtype: bool - .. seealso:: :py:func:`dependencies()` :param layers: set of QgsMapLayerDependency. Only user-defined dependencies will be added @@ -1335,6 +1220,7 @@ Emitted when the layer's metadata is changed. void clone( QgsMapLayer *layer ) const; %Docstring Copies attributes like name, short name, ... into another layer. + :param layer: The copy recipient .. versionadded:: 3.0 @@ -1354,21 +1240,18 @@ Set whether layer is valid or not - should be used in constructor. %Docstring Called by readLayerXML(), used by children to read state specific to them from project files. - -:rtype: bool %End virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context ) const; %Docstring Called by writeLayerXML(), used by children to write state specific to them to project files. - -:rtype: bool %End void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() ); %Docstring Read custom properties from project file. + :param layerNode: note to read from :param keyStartsWith: reads only properties starting with the specified string (or all if the string is empty)* %End @@ -1426,8 +1309,6 @@ Set error message bool hasDependencyCycle( const QSet &layers ) const; %Docstring Checks whether a new set of dependencies will introduce a cycle - -:rtype: bool %End diff --git a/python/core/qgsmaplayerdependency.sip b/python/core/qgsmaplayerdependency.sip index 721c989ddbcc..7a1a0b27b942 100644 --- a/python/core/qgsmaplayerdependency.sip +++ b/python/core/qgsmaplayerdependency.sip @@ -46,32 +46,22 @@ Standard constructor Type type() const; %Docstring Return the dependency type - -:rtype: Type %End Origin origin() const; %Docstring Return the dependency origin - -:rtype: Origin %End QString layerId() const; %Docstring Return the ID of the layer this dependency depends on - -:rtype: str %End bool operator==( const QgsMapLayerDependency &other ) const; //! hash operator long __hash__() const; -%Docstring - -:rtype: long -%End %MethodCode sipRes = qHash( *sipCpp ); %End diff --git a/python/core/qgsmaplayerlegend.sip b/python/core/qgsmaplayerlegend.sip index 86ef02929853..1cb1d37eda61 100644 --- a/python/core/qgsmaplayerlegend.sip +++ b/python/core/qgsmaplayerlegend.sip @@ -35,23 +35,17 @@ Constructor for QgsMapLayerLegend %Docstring Return list of legend nodes to be used for a particular layer tree layer node. Ownership is transferred to the caller. - -:rtype: list of QgsLayerTreeModelLegendNode %End static QgsMapLayerLegend *defaultVectorLegend( QgsVectorLayer *vl ) /Factory/; %Docstring Create new legend implementation for vector layer - -:rtype: QgsMapLayerLegend %End static QgsMapLayerLegend *defaultRasterLegend( QgsRasterLayer *rl ) /Factory/; %Docstring Create new legend implementation for raster layer - -:rtype: QgsMapLayerLegend %End signals: @@ -76,27 +70,11 @@ Miscellaneous utility functions for handling of map layer legend public: static void setLegendNodeOrder( QgsLayerTreeLayer *nodeLayer, const QList &order ); static QList legendNodeOrder( QgsLayerTreeLayer *nodeLayer ); -%Docstring - -:rtype: list of int -%End static bool hasLegendNodeOrder( QgsLayerTreeLayer *nodeLayer ); -%Docstring - -:rtype: bool -%End static void setLegendNodeUserLabel( QgsLayerTreeLayer *nodeLayer, int originalIndex, const QString &newLabel ); static QString legendNodeUserLabel( QgsLayerTreeLayer *nodeLayer, int originalIndex ); -%Docstring - -:rtype: str -%End static bool hasLegendNodeUserLabel( QgsLayerTreeLayer *nodeLayer, int originalIndex ); -%Docstring - -:rtype: bool -%End static void applyLayerNodeProperties( QgsLayerTreeLayer *nodeLayer, QList &nodes ); %Docstring diff --git a/python/core/qgsmaplayermodel.sip b/python/core/qgsmaplayermodel.sip index 8ada13994a66..61c4f458254d 100644 --- a/python/core/qgsmaplayermodel.sip +++ b/python/core/qgsmaplayermodel.sip @@ -69,8 +69,6 @@ Sets whether an optional empty layer ("not set") option is present in the model. %Docstring Returns true if the model allows the empty layer ("not set") choice. -:rtype: bool - .. seealso:: :py:func:`setAllowEmptyLayer()` .. versionadded:: 3.0 @@ -89,8 +87,6 @@ Sets whether the CRS of layers is also included in the model's display role. %Docstring Returns true if the model includes layer's CRS in the display role. -:rtype: bool - .. seealso:: :py:func:`setShowCrs()` .. versionadded:: 3.0 @@ -99,22 +95,16 @@ Returns true if the model includes layer's CRS in the display role. QList layersChecked( Qt::CheckState checkState = Qt::Checked ); %Docstring layersChecked returns the list of layers which are checked (or unchecked) - -:rtype: list of QgsMapLayer %End bool itemsCheckable() const; %Docstring returns if the items can be checked or not - -:rtype: bool %End QModelIndex indexFromLayer( QgsMapLayer *layer ) const; %Docstring indexFromLayer returns the model index for a given layer -:rtype: QModelIndex - .. seealso:: :py:func:`layerFromIndex()` %End @@ -122,8 +112,6 @@ returns if the items can be checked or not %Docstring Returns the map layer corresponding to the specified ``index``. -:rtype: QgsMapLayer - .. versionadded:: 3.0 .. seealso:: :py:func:`indexFromLayer()` @@ -144,8 +132,6 @@ layer registry, or paths to layers which have not yet been loaded into QGIS. %Docstring Return the list of additional (non map layer) items included at the end of the model. -:rtype: list of str - .. seealso:: :py:func:`setAdditionalItems()` .. versionadded:: 3.0 @@ -172,8 +158,6 @@ Return the list of additional (non map layer) items included at the end of the m %Docstring Returns the icon corresponding to a specified map ``layer``. -:rtype: QIcon - .. versionadded:: 3.0 %End diff --git a/python/core/qgsmaplayerproxymodel.sip b/python/core/qgsmaplayerproxymodel.sip index 4dcbe2660980..b1e9110c818c 100644 --- a/python/core/qgsmaplayerproxymodel.sip +++ b/python/core/qgsmaplayerproxymodel.sip @@ -47,24 +47,17 @@ It can be used to filter the layers list in a widget. QgsMapLayerModel *sourceLayerModel() const; %Docstring layerModel returns the QgsMapLayerModel used in this QSortFilterProxyModel - -:rtype: QgsMapLayerModel %End QgsMapLayerProxyModel *setFilters( QgsMapLayerProxyModel::Filters filters ); %Docstring setFilters set flags that affect how layers are filtered -:param filters: are Filter flags -:rtype: QgsMapLayerProxyModel +:param filters: are Filter flags .. versionadded:: 2.3 %End const Filters &filters() const; -%Docstring - -:rtype: Filters -%End void setExceptedLayerList( const QList &exceptList ); %Docstring @@ -73,8 +66,6 @@ offer the possibility to except some layers to be listed QList exceptedLayerList(); %Docstring Get the list of maplayers which are excluded from the list - -:rtype: list of QgsMapLayer %End void setExceptedLayerIds( const QStringList &ids ); @@ -84,8 +75,6 @@ Set the list of maplayer ids which are excluded from the list QStringList exceptedLayerIds() const; %Docstring Get the list of maplayer ids which are excluded from the list - -:rtype: list of str %End void setExcludedProviders( const QStringList &providers ); @@ -101,8 +90,6 @@ Sets a list of data providers which should be excluded from the model. %Docstring Returns the list of data providers which are excluded from the model. -:rtype: list of str - .. seealso:: :py:func:`setExcludedProviders()` .. versionadded:: 3.0 diff --git a/python/core/qgsmaplayerrenderer.sip b/python/core/qgsmaplayerrenderer.sip index 087d21199c94..5cc9ed8a4343 100644 --- a/python/core/qgsmaplayerrenderer.sip +++ b/python/core/qgsmaplayerrenderer.sip @@ -45,31 +45,23 @@ additional calls to QgsVectorLayer. virtual bool render() = 0; %Docstring Do the rendering (based on data stored in the class) - -:rtype: bool %End virtual QgsFeedback *feedback() const; %Docstring Access to feedback object of the layer renderer (may be null) -:rtype: QgsFeedback - .. versionadded:: 3.0 %End QStringList errors() const; %Docstring Return list of errors (problems) that happened during the rendering - -:rtype: list of str %End QString layerId() const; %Docstring Get access to the ID of the layer rendered by this class - -:rtype: str %End protected: diff --git a/python/core/qgsmaplayerstore.sip b/python/core/qgsmaplayerstore.sip index 89fe64e7aa8a..6586c07c09de 100644 --- a/python/core/qgsmaplayerstore.sip +++ b/python/core/qgsmaplayerstore.sip @@ -35,16 +35,12 @@ Constructor for QgsMapLayerStore. int count() const; %Docstring Returns the number of layers contained in the store. - -:rtype: int %End int __len__() const; %Docstring Returns the number of layers contained in the store. - -:rtype: int %End %MethodCode sipRes = sipCpp->count(); @@ -53,11 +49,10 @@ Returns the number of layers contained in the store. QgsMapLayer *mapLayer( const QString &id ) const; %Docstring Retrieve a pointer to a layer by layer ``id``. + :param id: ID of layer to retrieve :return: matching layer, or None if no matching layer found -:rtype: QgsMapLayer - .. seealso:: :py:func:`mapLayersByName()` @@ -67,11 +62,10 @@ Retrieve a pointer to a layer by layer ``id``. QList mapLayersByName( const QString &name ) const; %Docstring Retrieve a list of matching layers by layer ``name``. + :param name: name of layers to match :return: list of matching layers -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`mapLayer()` @@ -82,8 +76,6 @@ Retrieve a list of matching layers by layer ``name``. %Docstring Returns a map of all layers by layer ID. -:rtype: QMap - .. seealso:: :py:func:`mapLayer()` .. seealso:: :py:func:`mapLayersByName()` @@ -107,11 +99,10 @@ If you specify false here you have take care of deleting the layers yourself. Not available in Python. :return: a list of the map layers that were added -:rtype: list of QgsMapLayer - successfully. If a layer is invalid, or already exists in the store, it will not be part of the returned list. + .. seealso:: :py:func:`addMapLayer()` %End @@ -132,7 +123,6 @@ If you specify false here you have take care of deleting the layers yourself. Not available in Python. :return: None if unable to add layer, otherwise pointer to newly added layer -:rtype: QgsMapLayer .. seealso:: :py:func:`addMapLayers` @@ -221,8 +211,6 @@ Takes a ``layer`` from the store. If the layer was owned by the store, the layer will be returned without deleting it. The caller takes ownership of the layer and is responsible for deleting it. -:rtype: QgsMapLayer - .. seealso:: :py:func:`removeMapLayer()` %End diff --git a/python/core/qgsmaplayerstylemanager.sip b/python/core/qgsmaplayerstylemanager.sip index f448c38450ff..a1db96a643d1 100644 --- a/python/core/qgsmaplayerstylemanager.sip +++ b/python/core/qgsmaplayerstylemanager.sip @@ -40,8 +40,6 @@ construct style from QML definition (XML) bool isValid() const; %Docstring Tell whether the style is valid (i.e. there is something stored in it) - -:rtype: bool %End void clear(); @@ -52,8 +50,6 @@ Remove any stored style data (will get invalid) QString xmlData() const; %Docstring Return XML content of the style - -:rtype: str %End void readFromLayer( QgsMapLayer *layer ); @@ -113,8 +109,6 @@ Construct a style manager associated with a map layer (must not be null) QgsMapLayer *layer() const; %Docstring Get pointer to the associated map layer - -:rtype: QgsMapLayer %End void reset(); @@ -134,8 +128,6 @@ Write configuration (for project saving) QStringList styles() const; %Docstring Return list of all defined style names - -:rtype: list of str %End QMap mapLayerStyles() const; @@ -143,8 +135,6 @@ Return list of all defined style names Gets available styles for the associated map layer. :return: A map of map layer style by style name -:rtype: QMap - .. versionadded:: 3.0 %End @@ -152,8 +142,6 @@ Gets available styles for the associated map layer. QgsMapLayerStyle style( const QString &name ) const; %Docstring Return data of a stored style - accessed by its unique name - -:rtype: QgsMapLayerStyle %End bool addStyle( const QString &name, const QgsMapLayerStyle &style ); @@ -161,8 +149,6 @@ Return data of a stored style - accessed by its unique name Add a style with given name and data :return: true on success (name is unique and style is valid) -:rtype: bool - %End bool addStyleFromLayer( const QString &name ); @@ -170,8 +156,6 @@ Add a style with given name and data Add style by cloning the current one :return: true on success -:rtype: bool - %End bool removeStyle( const QString &name ); @@ -179,8 +163,6 @@ Add style by cloning the current one Remove a stored style :return: true on success (style exists and it is not the last one) -:rtype: bool - %End bool renameStyle( const QString &name, const QString &newName ); @@ -188,15 +170,11 @@ Remove a stored style Rename a stored style to a different name :return: true on success (style exists and new name is unique) -:rtype: bool - %End QString currentStyle() const; %Docstring Return name of the current style - -:rtype: str %End bool setCurrentStyle( const QString &name ); @@ -204,8 +182,6 @@ Return name of the current style Set a different style as the current style - will apply it to the layer :return: true on success -:rtype: bool - %End bool setOverrideStyle( const QString &styleDef ); @@ -213,14 +189,10 @@ Set a different style as the current style - will apply it to the layer Temporarily apply a different style to the layer. The argument can be either a style name or a full QML style definition. Each call must be paired with restoreOverrideStyle() - -:rtype: bool %End bool restoreOverrideStyle(); %Docstring Restore the original store after a call to setOverrideStyle() - -:rtype: bool %End signals: diff --git a/python/core/qgsmaprenderercache.sip b/python/core/qgsmaprenderercache.sip index 2e65ad116643..61aeb028bc0e 100644 --- a/python/core/qgsmaprenderercache.sip +++ b/python/core/qgsmaprenderercache.sip @@ -46,8 +46,6 @@ Initialize cache: set new parameters and clears the cache if any parameters have changed since last initialization. :return: flag whether the parameters are the same as last time -:rtype: bool - %End void setCacheImage( const QString &cacheKey, const QImage &image, const QList< QgsMapLayer * > &dependentLayers = QList< QgsMapLayer * >() ); @@ -65,8 +63,6 @@ repaint then the cache image will be cleared. %Docstring Returns true if the cache contains an image with the specified ``cacheKey``. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`cacheImage()` @@ -78,8 +74,6 @@ Returns the cached image for the specified ``cacheKey``. The ``cacheKey`` usuall matches the QgsMapLayer.id() which the image is a render of. Returns a null image if it is not cached. -:rtype: QImage - .. seealso:: :py:func:`setCacheImage()` .. seealso:: :py:func:`hasCacheImage()` @@ -89,8 +83,6 @@ Returns a null image if it is not cached. %Docstring Returns a list of map layers on which an image in the cache depends. -:rtype: list of QgsMapLayer - .. versionadded:: 3.0 %End diff --git a/python/core/qgsmaprendererjob.sip b/python/core/qgsmaprendererjob.sip index 2b16a93befd6..448272b74576 100644 --- a/python/core/qgsmaprendererjob.sip +++ b/python/core/qgsmaprendererjob.sip @@ -74,8 +74,6 @@ Block until the job has finished. virtual bool isActive() const = 0; %Docstring Tell whether the rendering job is currently running in background. - -:rtype: bool %End virtual bool usedCachedLabels() const = 0; @@ -84,8 +82,6 @@ Returns true if the render job was able to use a cached labeling solution. If so, any previously stored labeling results (see takeLabelingResults()) should be retained. -:rtype: bool - .. seealso:: :py:func:`takeLabelingResults()` .. versionadded:: 3.0 @@ -96,8 +92,6 @@ should be retained. Get pointer to internal labeling engine (in order to get access to the results). This should not be used if cached labeling was redrawn - see usedCachedLabels(). -:rtype: QgsLabelingResults - .. seealso:: :py:func:`usedCachedLabels()` %End @@ -114,8 +108,6 @@ before the render job. const QgsFeatureFilterProvider *featureFilterProvider() const; %Docstring -:rtype: QgsFeatureFilterProvider - .. versionadded:: 3.0 Returns the feature filter provider used by the QgsRenderContext of each LayerRenderJob. @@ -134,8 +126,6 @@ each LayerRenderJob. Errors errors() const; %Docstring List of errors that happened during the rendering job - available when the rendering has been finished - -:rtype: Errors %End @@ -149,8 +139,6 @@ Does not take ownership of the object. %Docstring Returns the total time it took to finish the job (in milliseconds). -:rtype: int - .. seealso:: :py:func:`perLayerRenderingTime()` %End @@ -160,8 +148,6 @@ Returns the total time it took to finish the job (in milliseconds). Return map settings with which this job was started. :return: A QgsMapSettings instance with render settings -:rtype: QgsMapSettings - .. versionadded:: 2.8 %End @@ -218,8 +204,6 @@ The image can be queried even while the rendering is still in progress to get in virtual QImage renderedImage() = 0; %Docstring Get a preview/resulting image - -:rtype: QImage %End }; diff --git a/python/core/qgsmapsettings.sip b/python/core/qgsmapsettings.sip index 43ae30ef558f..6ee61b348b16 100644 --- a/python/core/qgsmapsettings.sip +++ b/python/core/qgsmapsettings.sip @@ -41,8 +41,6 @@ Return geographical coordinates of the rectangle that should be rendered. The actual visible extent used for rendering could be slightly different since the given extent may be expanded in order to fit the aspect ratio of output size. Use visibleExtent() to get the resulting extent. - -:rtype: QgsRectangle %End void setExtent( const QgsRectangle &rect, bool magnified = true ); @@ -56,8 +54,6 @@ of output size. Use visibleExtent() to get the resulting extent. QSize outputSize() const; %Docstring Return the size of the resulting map image - -:rtype: QSize %End void setOutputSize( QSize size ); %Docstring @@ -68,8 +64,6 @@ Set the size of the resulting map image %Docstring Returns the rotation of the resulting map image, in degrees clockwise. -:rtype: float - .. versionadded:: 2.8 .. seealso:: :py:func:`setRotation()` @@ -88,8 +82,6 @@ Sets the ``rotation`` of the resulting map image, in degrees clockwise. %Docstring Return DPI used for conversion between real world units (e.g. mm) and pixels Default value is 96 - -:rtype: float %End void setOutputDpi( double dpi ); %Docstring @@ -99,6 +91,7 @@ Set DPI used for conversion between real world units (e.g. mm) and pixels void setMagnificationFactor( double factor ); %Docstring Set the magnification factor. + :param factor: the factor of magnification .. versionadded:: 2.16 @@ -110,8 +103,6 @@ Set the magnification factor. %Docstring Return the magnification factor. -:rtype: float - .. versionadded:: 2.16 .. seealso:: :py:func:`setMagnificationFactor()` @@ -121,16 +112,12 @@ Return the magnification factor. %Docstring Get list of layer IDs for map rendering The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top) - -:rtype: list of str %End QList layers() const; %Docstring Get list of layers for map rendering The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top) - -:rtype: list of QgsMapLayer %End void setLayers( const QList &layers ); @@ -143,8 +130,6 @@ The layers are stored in the reverse order of how they are rendered (layer with %Docstring Get map of map layer style overrides (key: layer ID, value: style name) where a different style should be used instead of the current one -:rtype: QMap - .. versionadded:: 2.8 %End @@ -160,8 +145,6 @@ Set map of map layer style overrides (key: layer ID, value: style name) where a Get custom rendering flags. Layers might honour these to alter their rendering. :return: custom flags strings, separated by ';' -:rtype: str - .. versionadded:: 2.16 @@ -171,6 +154,7 @@ Get custom rendering flags. Layers might honour these to alter their rendering. void setCustomRenderFlags( const QString &customRenderFlags ); %Docstring Sets the custom rendering flags. Layers might honour these to alter their rendering. + :param customRenderFlags: custom flags strings, separated by ';' .. versionadded:: 2.16 @@ -185,15 +169,11 @@ sets destination coordinate reference system QgsCoordinateReferenceSystem destinationCrs() const; %Docstring returns CRS of destination coordinate reference system - -:rtype: QgsCoordinateReferenceSystem %End QgsUnitTypes::DistanceUnit mapUnits() const; %Docstring Get units of map's geographical coordinates - used for scale calculation - -:rtype: QgsUnitTypes.DistanceUnit %End bool setEllipsoid( const QString &ellipsoid ); @@ -203,8 +183,6 @@ retrieved using QgsEllipsoidUtils.acronyms(). Calculations will only use the ellipsoid if a valid ellipsoid has been set. :return: true if ellipsoid was successfully set -:rtype: bool - .. versionadded:: 3.0 @@ -216,8 +194,6 @@ Calculations will only use the ellipsoid if a valid ellipsoid has been set. Returns ellipsoid's acronym. Calculations will only use the ellipsoid if a valid ellipsoid has been set. -:rtype: str - .. versionadded:: 3.0 .. seealso:: :py:func:`setEllipsoid()` @@ -230,8 +206,6 @@ Set the background color of the map QColor backgroundColor() const; %Docstring Get the background color of the map - -:rtype: QColor %End void setSelectionColor( const QColor &color ); @@ -241,8 +215,6 @@ Set color that is used for drawing of selected vector features QColor selectionColor() const; %Docstring Get color that is used for drawing of selected vector features - -:rtype: QColor %End enum Flag @@ -274,14 +246,10 @@ Enable or disable a particular flag (other flags are not affected) Flags flags() const; %Docstring Return combination of flags used for rendering - -:rtype: Flags %End bool testFlag( Flag flag ) const; %Docstring Check whether a particular flag is enabled - -:rtype: bool %End void setOutputImageFormat( QImage::Format format ); @@ -291,44 +259,32 @@ sets format of internal QImage QImage::Format outputImageFormat() const; %Docstring format of internal QImage, default QImage.Format_ARGB32_Premultiplied - -:rtype: QImage.Format %End bool hasValidSettings() const; %Docstring Check whether the map settings are valid and can be used for rendering - -:rtype: bool %End QgsRectangle visibleExtent() const; %Docstring Return the actual extent derived from requested extent that takes takes output image size into account - -:rtype: QgsRectangle %End QPolygonF visiblePolygon() const; %Docstring Return the visible area as a polygon (may be rotated) -:rtype: QPolygonF - .. versionadded:: 2.8 %End double mapUnitsPerPixel() const; %Docstring Return the distance in geographical coordinates that equals to one pixel in the map - -:rtype: float %End double scale() const; %Docstring Returns the calculated map scale. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. - -:rtype: float %End void setExpressionContext( const QgsExpressionContext &context ); @@ -346,8 +302,6 @@ associated with this map settings. Gets the expression context. This context should be used for all expression evaluation associated with this map settings. -:rtype: QgsExpressionContext - .. seealso:: :py:func:`setExpressionContext()` .. versionadded:: 2.12 @@ -359,8 +313,6 @@ Returns the coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system. -:rtype: QgsCoordinateTransformContext - .. versionadded:: 3.0 .. seealso:: :py:func:`setTransformContext()` @@ -378,19 +330,14 @@ from a source to destination coordinate reference system. %End const QgsMapToPixel &mapToPixel() const; -%Docstring - -:rtype: QgsMapToPixel -%End double layerToMapUnits( const QgsMapLayer *layer, const QgsRectangle &referenceExtent = QgsRectangle() ) const; %Docstring Computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits + :param layer: The layer :param referenceExtent: A reference extent based on which to perform the computation. If not specified, the layer extent is used -:rtype: float - .. versionadded:: 2.12 %End @@ -398,8 +345,6 @@ Computes an *estimated* conversion factor between layer and map units: layerUnit %Docstring transform bounding box from layer's CRS to output CRS -:rtype: QgsRectangle - .. seealso:: :py:func:`layerToMapCoordinates` :return: a bounding box (aligned rectangle) containing the transformed extent @@ -409,8 +354,6 @@ Computes an *estimated* conversion factor between layer and map units: layerUnit %Docstring transform bounding box from output CRS to layer's CRS -:rtype: QgsRectangle - .. seealso:: :py:func:`mapToLayerCoordinates` :return: a bounding box (aligned rectangle) containing the transformed extent @@ -421,16 +364,12 @@ Computes an *estimated* conversion factor between layer and map units: layerUnit transform point coordinates from layer's CRS to output CRS :return: the transformed point -:rtype: QgsPointXY - %End QgsRectangle layerToMapCoordinates( const QgsMapLayer *layer, QgsRectangle rect ) const; %Docstring transform rectangle from layer's CRS to output CRS -:rtype: QgsRectangle - .. seealso:: :py:func:`layerExtentToOutputExtent()` :return: the transformed rectangle @@ -441,16 +380,12 @@ Computes an *estimated* conversion factor between layer and map units: layerUnit transform point coordinates from output CRS to layer's CRS :return: the transformed point -:rtype: QgsPointXY - %End QgsRectangle mapToLayerCoordinates( const QgsMapLayer *layer, QgsRectangle rect ) const; %Docstring transform rectangle from output CRS to layer's CRS -:rtype: QgsRectangle - .. seealso:: :py:func:`outputExtentToLayerExtent()` :return: the transformed rectangle @@ -459,18 +394,15 @@ Computes an *estimated* conversion factor between layer and map units: layerUnit QgsCoordinateTransform layerTransform( const QgsMapLayer *layer ) const; %Docstring Return coordinate transform from layer's CRS to destination CRS + :param layer: :return: transform - may be invalid if the transform is not needed -:rtype: QgsCoordinateTransform - %End QgsRectangle fullExtent() const; %Docstring returns current extent of layer set - -:rtype: QgsRectangle %End @@ -484,25 +416,23 @@ serialization */ void setSegmentationTolerance( double tolerance ); %Docstring Sets the segmentation tolerance applied when rendering curved geometries + :param tolerance: the segmentation tolerance* %End double segmentationTolerance() const; %Docstring Gets the segmentation tolerance applied when rendering curved geometries - -:rtype: float %End void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type ); %Docstring Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) + :param type: the segmentation tolerance typename* %End QgsAbstractGeometry::SegmentationToleranceType segmentationToleranceType() const; %Docstring Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) - -:rtype: QgsAbstractGeometry.SegmentationToleranceType %End void setLabelingEngineSettings( const QgsLabelingEngineSettings &settings ); @@ -516,8 +446,6 @@ Sets global configuration of the labeling engine %Docstring Returns global configuration of the labeling engine -:rtype: QgsLabelingEngineSettings - .. versionadded:: 3.0 %End diff --git a/python/core/qgsmapsettingsutils.sip b/python/core/qgsmapsettingsutils.sip index 6b16c84456e3..dacff46fb2d9 100644 --- a/python/core/qgsmapsettingsutils.sip +++ b/python/core/qgsmapsettingsutils.sip @@ -26,17 +26,15 @@ Utilities for map settings. static const QStringList containsAdvancedEffects( const QgsMapSettings &mapSettings ); %Docstring Checks whether any of the layers attached to a map settings object contain advanced effects -:param mapSettings: map settings -:rtype: list of str +:param mapSettings: map settings %End static QString worldFileContent( const QgsMapSettings &mapSettings ); %Docstring Creates the content of a world file. -:param mapSettings: map settings -:rtype: str +:param mapSettings: map settings .. note:: diff --git a/python/core/qgsmapthemecollection.sip b/python/core/qgsmapthemecollection.sip index 8f89b426001a..65e1a1b9d4fa 100644 --- a/python/core/qgsmapthemecollection.sip +++ b/python/core/qgsmapthemecollection.sip @@ -44,16 +44,10 @@ Initialize layer record with a map layer - it will be stored as a weak pointer bool operator==( const QgsMapThemeCollection::MapThemeLayerRecord &other ) const; bool operator!=( const QgsMapThemeCollection::MapThemeLayerRecord &other ) const; -%Docstring - -:rtype: bool -%End QgsMapLayer *layer() const; %Docstring Returns map layer or null if the layer does not exist anymore - -:rtype: QgsMapLayer %End void setLayer( QgsMapLayer *layer ); @@ -94,16 +88,10 @@ Individual map theme record of visible layers and styles. bool operator==( const QgsMapThemeCollection::MapThemeRecord &other ) const; bool operator!=( const QgsMapThemeCollection::MapThemeRecord &other ) const; -%Docstring - -:rtype: bool -%End QList layerRecords() const; %Docstring Returns a list of records for all visible layer belonging to the theme. - -:rtype: list of QgsMapThemeCollection.MapThemeLayerRecord %End void setLayerRecords( const QList &records ); @@ -133,8 +121,6 @@ Create map theme collection that handles themes of the given project. %Docstring Returns whether a map theme with a matching name exists. -:rtype: bool - .. versionadded:: 3.0 %End @@ -148,6 +134,7 @@ Inserts a new map theme to the collection. void update( const QString &name, const QgsMapThemeCollection::MapThemeRecord &state ); %Docstring Updates a map theme within the collection. + :param name: name of map theme to update :param state: map theme record to replace existing map theme @@ -170,8 +157,6 @@ Remove all map themes from the collection. %Docstring Returns a list of existing map theme names. -:rtype: list of str - .. versionadded:: 3.0 %End @@ -179,8 +164,6 @@ Returns a list of existing map theme names. %Docstring Returns the recorded state of a map theme. -:rtype: QgsMapThemeCollection.MapThemeRecord - .. versionadded:: 3.0 %End @@ -188,8 +171,6 @@ Returns the recorded state of a map theme. %Docstring Returns the list of layer IDs that are visible for the specified map theme. -:rtype: list of str - .. note:: The order of the returned list is not guaranteed to reflect the order of layers @@ -202,8 +183,6 @@ in the canvas. %Docstring Returns the list of layers that are visible for the specified map theme. -:rtype: list of QgsMapLayer - .. note:: The order of the returned list is not guaranteed to reflect the order of layers @@ -216,14 +195,13 @@ in the canvas. %Docstring Get layer style overrides (for QgsMapSettings) of the visible layers for given map theme. -:rtype: QMap - .. versionadded:: 3.0 %End void readXml( const QDomDocument &doc ); %Docstring Reads the map theme collection state from XML + :param doc: DOM document .. seealso:: :py:func:`writeXml` @@ -232,6 +210,7 @@ Reads the map theme collection state from XML void writeXml( QDomDocument &doc ); %Docstring Writes the map theme collection state to XML. + :param doc: DOM document .. seealso:: :py:func:`readXml` @@ -242,8 +221,6 @@ Writes the map theme collection state to XML. Static method to create theme from the current state of layer visibilities in layer tree, current style of layers and check state of legend items (from a layer tree model). -:rtype: QgsMapThemeCollection.MapThemeRecord - .. versionadded:: 3.0 %End @@ -259,8 +236,6 @@ legend items of passed layer tree model. %Docstring The QgsProject on which this map theme collection works. -:rtype: QgsProject - .. versionadded:: 3.0 %End @@ -276,8 +251,6 @@ The QgsProject on which this map theme collection works. Returns the master layer order (this will always match the project's QgsProject.layerOrder() ). All map themes will maintain the same layer order as the master layer order. -:rtype: list of QgsMapLayer - .. versionadded:: 3.0 .. seealso:: :py:func:`masterVisibleLayers()` @@ -289,8 +262,6 @@ Returns the master list of visible layers. The order of returned layers will alw of masterLayerOrder(), but the returned layers are filtered to only include those visible in the project's layer tree. -:rtype: list of QgsMapLayer - .. versionadded:: 3.0 .. seealso:: :py:func:`masterLayerOrder()` diff --git a/python/core/qgsmaptopixel.sip b/python/core/qgsmaptopixel.sip index a2c6863e41c7..0cd5ef155a3f 100644 --- a/python/core/qgsmaptopixel.sip +++ b/python/core/qgsmaptopixel.sip @@ -25,6 +25,7 @@ This class can convert device coordinates to map coordinates and vice versa. QgsMapToPixel( double mapUnitsPerPixel, double centerX, double centerY, int widthPixels, int heightPixels, double rotation ); %Docstring Constructor + :param mapUnitsPerPixel: Map units per pixel :param centerX: X coordinate of map center, in geographical units :param centerY: Y coordinate of map center, in geographical units @@ -38,19 +39,19 @@ Constructor QgsMapToPixel( double mapUnitsPerPixel ); %Docstring Constructor + :param mapUnitsPerPixel: Map units per pixel %End static QgsMapToPixel fromScale( double scale, QgsUnitTypes::DistanceUnit mapUnits, double dpi = 96 ); %Docstring Returns a new QgsMapToPixel created using a specified ``scale`` and distance unit. + :param scale: map scale denominator, e.g. 1000.0 for a 1:1000 map. :param dpi: screen DPI :param mapUnits: map units :return: matching QgsMapToPixel -:rtype: QgsMapToPixel - .. versionadded:: 3.0 %End @@ -65,11 +66,10 @@ Use setParameters to fill QgsPointXY transform( const QgsPointXY &p ) const; %Docstring Transform the point from map (world) coordinates to device coordinates + :param p: Point to transform :return: QgsPointXY in device coordinates -:rtype: QgsPointXY - %End void transform( QgsPointXY *p ) const; @@ -78,12 +78,11 @@ Transform the point from map (world) coordinates to device coordinates %Docstring Transform the point specified by x,y from map (world) coordinates to device coordinates + :param x: x cordinate o point to transform :param y: y coordinate of point to transform :return: QgsPointXY in device coordinates -:rtype: QgsPointXY - %End void transformInPlace( double &x, double &y ) const; @@ -96,45 +95,33 @@ transform. QgsPointXY toMapCoordinates( int x, int y ) const; -%Docstring - -:rtype: QgsPointXY -%End QgsPointXY toMapCoordinatesF( double x, double y ) const; %Docstring Transform device coordinates to map (world) coordinates - -:rtype: QgsPointXY %End QgsPointXY toMapCoordinates( QPoint p ) const; %Docstring Transform device coordinates to map (world) coordinates + :param p: Point to be converted to map cooordinates :return: QgsPointXY in map coorndiates -:rtype: QgsPointXY - %End QgsPointXY toMapPoint( double x, double y ) const; -%Docstring - -:rtype: QgsPointXY -%End void setMapUnitsPerPixel( double mapUnitsPerPixel ); %Docstring Set map units per pixel + :param mapUnitsPerPixel: Map units per pixel %End double mapUnitsPerPixel() const; %Docstring Return current map units per pixel - -:rtype: float %End int mapWidth() const; @@ -142,8 +129,6 @@ Return current map units per pixel Return current map width in pixels The information is only known if setRotation was used -:rtype: int - .. versionadded:: 2.8 %End @@ -151,14 +136,13 @@ The information is only known if setRotation was used %Docstring Return current map height in pixels -:rtype: int - .. versionadded:: 2.8 %End void setMapRotation( double degrees, double cx, double cy ); %Docstring Set map rotation in degrees (clockwise) + :param degrees: clockwise rotation in degrees :param cx: X ordinate of map center in geographical units :param cy: Y ordinate of map center in geographical units @@ -170,14 +154,13 @@ Set map rotation in degrees (clockwise) %Docstring Return current map rotation in degrees -:rtype: float - .. versionadded:: 2.8 %End void setParameters( double mapUnitsPerPixel, double centerX, double centerY, int widthPixels, int heightPixels, double rotation ); %Docstring Set parameters for use in transforming coordinates + :param mapUnitsPerPixel: Map units per pixel :param centerX: X coordinate of map center, in geographical units :param centerY: Y coordinate of map center, in geographical units @@ -191,22 +174,14 @@ Set parameters for use in transforming coordinates QString showParameters() const; %Docstring String representation of the parameters used in the transform - -:rtype: str %End QTransform transform() const; -%Docstring - -:rtype: QTransform -%End double xCenter() const; %Docstring Returns the center x-coordinate for the transform. -:rtype: float - .. seealso:: :py:func:`yCenter()` .. versionadded:: 3.0 @@ -216,8 +191,6 @@ Returns the center x-coordinate for the transform. %Docstring Returns the center y-coordinate for the transform. -:rtype: float - .. seealso:: :py:func:`xCenter()` .. versionadded:: 3.0 diff --git a/python/core/qgsmaptopixelgeometrysimplifier.sip b/python/core/qgsmaptopixelgeometrysimplifier.sip index 8067d448bfeb..b7040835cc7a 100644 --- a/python/core/qgsmaptopixelgeometrysimplifier.sip +++ b/python/core/qgsmaptopixelgeometrysimplifier.sip @@ -49,23 +49,17 @@ Constructor static float calculateLengthSquared2D( double x1, double y1, double x2, double y2 ); %Docstring Returns the squared 2D-distance of the vector defined by the two points specified - -:rtype: float %End static bool equalSnapToGrid( double x1, double y1, double x2, double y2, double gridOriginX, double gridOriginY, float gridInverseSizeXY ); %Docstring Returns whether the points belong to the same grid - -:rtype: bool %End public: int simplifyFlags() const; %Docstring Gets the simplification hints of the vector layer managed - -:rtype: int %End void setSimplifyFlags( int simplifyFlags ); %Docstring @@ -75,8 +69,6 @@ Sets the simplification hints of the vector layer managed SimplifyAlgorithm simplifyAlgorithm() const; %Docstring Gets the local simplification algorithm of the vector layer managed - -:rtype: SimplifyAlgorithm %End void setSimplifyAlgorithm( SimplifyAlgorithm simplifyAlgorithm ); %Docstring @@ -87,8 +79,6 @@ Sets the local simplification algorithm of the vector layer managed %Docstring Returns a simplified version the specified geometry - -:rtype: QgsGeometry %End void setTolerance( double value ); @@ -101,15 +91,11 @@ Sets the tolerance of the vector layer managed static bool isGeneralizableByMapBoundingBox( const QgsRectangle &envelope, double map2pixelTol ); %Docstring Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context - -:rtype: bool %End bool isGeneralizableByMapBoundingBox( const QgsRectangle &envelope ) const; %Docstring Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context - -:rtype: bool %End }; diff --git a/python/core/qgsmapunitscale.sip b/python/core/qgsmapunitscale.sip index 89c08376835b..d3a5aea0f854 100644 --- a/python/core/qgsmapunitscale.sip +++ b/python/core/qgsmapunitscale.sip @@ -28,6 +28,7 @@ the map scale. explicit QgsMapUnitScale( double minScale = 0.0, double maxScale = 0.0 ); %Docstring Constructor for QgsMapUnitScale + :param minScale: minimum allowed scale, or 0.0 if no minimum scale set :param maxScale: maximum allowed scale, or 0.0 if no maximum scale set The scale values indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. @@ -66,20 +67,15 @@ The maximum size in millimeters, or 0.0 if unset %Docstring Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the object. + :param c: render context :return: map units per pixel, limited between minimum and maximum scales -:rtype: float - %End bool operator==( const QgsMapUnitScale &other ) const; bool operator!=( const QgsMapUnitScale &other ) const; -%Docstring - -:rtype: bool -%End }; diff --git a/python/core/qgsmargins.sip b/python/core/qgsmargins.sip index 507ff474294b..b25abe9f6f49 100644 --- a/python/core/qgsmargins.sip +++ b/python/core/qgsmargins.sip @@ -39,16 +39,12 @@ Constructs margins with the given ``left``, ``top``, ``right``, ``bottom`` bool isNull() const; %Docstring Returns \c true if all margins are is 0; otherwise returns false. - -:rtype: bool %End double left() const; %Docstring Returns the left margin. -:rtype: float - .. seealso:: :py:func:`setLeft()` %End @@ -56,8 +52,6 @@ Returns the left margin. %Docstring Returns the top margin. -:rtype: float - .. seealso:: :py:func:`setTop()` %End @@ -65,8 +59,6 @@ Returns the top margin. %Docstring Returns the right margin. -:rtype: float - .. seealso:: :py:func:`setRight()` %End @@ -74,8 +66,6 @@ Returns the right margin. %Docstring Returns the bottom margin. -:rtype: float - .. seealso:: :py:func:`setBottom()` %End @@ -111,55 +101,41 @@ Sets the bottom margin to ``bottom``. %Docstring Add each component of ``margins`` to the respective component of this object and returns a reference to it. - -:rtype: QgsMargins %End QgsMargins &operator-=( const QgsMargins &margins ); %Docstring Subtract each component of ``margins`` from the respective component of this object and returns a reference to it. - -:rtype: QgsMargins %End QgsMargins &operator+=( double addend ); %Docstring Adds the ``addend`` to each component of this object and returns a reference to it. - -:rtype: QgsMargins %End QgsMargins &operator-=( double subtrahend ); %Docstring Subtracts the ``subtrahend`` from each component of this object and returns a reference to it. - -:rtype: QgsMargins %End QgsMargins &operator*=( double factor ); %Docstring Multiplies each component of this object by ``factor`` and returns a reference to it. - -:rtype: QgsMargins %End QgsMargins &operator/=( double divisor ); %Docstring Multiplies each component of this object by ``factor`` and returns a reference to it. - -:rtype: QgsMargins %End QString toString() const; %Docstring Returns the margins encoded to a string. -:rtype: str - .. seealso:: :py:func:`fromString()` %End @@ -168,8 +144,6 @@ Returns the margins encoded to a string. Returns a QgsMargins object decoded from a string, or a null QgsMargins if the string could not be interpreted as margins. -:rtype: QgsMargins - .. seealso:: :py:func:`toString()` %End diff --git a/python/core/qgsmessageoutput.sip b/python/core/qgsmessageoutput.sip index 0b0789899365..f6fcfca878fd 100644 --- a/python/core/qgsmessageoutput.sip +++ b/python/core/qgsmessageoutput.sip @@ -70,8 +70,6 @@ Display the blocking message to the user. %Docstring function that returns new class derived from QgsMessageOutput (don't forget to delete it then if showMessage(bool) is not used showMessage(bool) deletes the instance) - -:rtype: QgsMessageOutput %End }; diff --git a/python/core/qgsmimedatautils.sip b/python/core/qgsmimedatautils.sip index 19ce6eed031d..b8ecbe0c3ed6 100644 --- a/python/core/qgsmimedatautils.sip +++ b/python/core/qgsmimedatautils.sip @@ -32,34 +32,28 @@ Constructs URI from encoded data %Docstring Returns whether the object contains valid data -:rtype: bool - .. versionadded:: 3.0 %End QString data() const; %Docstring Returns encoded representation of the object - -:rtype: str %End QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const; %Docstring Get vector layer from uri if possible, otherwise returns 0 and error is set + :param owner: set to true if caller becomes owner :param error: set to error message if cannot get vector - -:rtype: QgsVectorLayer %End QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const; %Docstring Get raster layer from uri if possible, otherwise returns 0 and error is set + :param owner: set to true if caller becomes owner :param error: set to error message if cannot get raster - -:rtype: QgsRasterLayer %End QString layerType; @@ -87,29 +81,15 @@ Identifier of the data source recognized by its providerKey typedef QList UriList; static QMimeData *encodeUriList( const UriList &layers ); -%Docstring - -:rtype: QMimeData -%End static bool isUriList( const QMimeData *data ); -%Docstring - -:rtype: bool -%End static UriList decodeUriList( const QMimeData *data ); -%Docstring - -:rtype: UriList -%End static QByteArray layerTreeNodesToUriList( const QList &nodes ); %Docstring Returns encoded URI list from a list of layer tree nodes. -:rtype: QByteArray - .. versionadded:: 3.0 %End diff --git a/python/core/qgsmultirenderchecker.sip b/python/core/qgsmultirenderchecker.sip index d9533078eca1..31fbae8781a7 100644 --- a/python/core/qgsmultirenderchecker.sip +++ b/python/core/qgsmultirenderchecker.sip @@ -98,8 +98,6 @@ are allowed to be different from the control image. In some cases rendering may be non-deterministic. This parameter allows you to account for that by providing a tolerance. -:rtype: bool - .. note:: make sure to call setExpectedImage and setMapSettings first @@ -110,8 +108,6 @@ for that by providing a tolerance. Returns a report for this test :return: A report -:rtype: str - %End QString controlImagePath() const; @@ -119,8 +115,6 @@ Returns a report for this test controlImagePath :return: -:rtype: str - %End static void drawBackground( QImage *image ); @@ -150,10 +144,6 @@ Renders a composition to an image and compares with an expected output void setSize( QSize size ); bool testComposition( QString &checkedReport, int page = 0, int pixelDiff = 0 ); -%Docstring - -:rtype: bool -%End }; @@ -191,8 +181,6 @@ The page number is specified via ``page``, where 0 corresponds to the first page in the layout. Returns false if the rendered layout differs from the expected reference image. - -:rtype: bool %End }; diff --git a/python/core/qgsnetworkaccessmanager.sip b/python/core/qgsnetworkaccessmanager.sip index 507e74e980ae..4787fb937eef 100644 --- a/python/core/qgsnetworkaccessmanager.sip +++ b/python/core/qgsnetworkaccessmanager.sip @@ -33,10 +33,6 @@ that the fallback proxy should not be used for, then no proxy will be used. %End public: static QgsNetworkAccessManager *instance(); -%Docstring - -:rtype: QgsNetworkAccessManager -%End QgsNetworkAccessManager( QObject *parent = 0 ); @@ -53,22 +49,16 @@ remove a factory from the proxy factories list const QList proxyFactories() const; %Docstring retrieve proxy factory list - -:rtype: list of QNetworkProxyFactory %End const QNetworkProxy &fallbackProxy() const; %Docstring retrieve fall back proxy (for urls that no factory returned proxies for) - -:rtype: QNetworkProxy %End QStringList excludeList() const; %Docstring retrieve exclude list (urls shouldn't use the fallback proxy) - -:rtype: list of str %End void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes ); @@ -79,15 +69,11 @@ set fallback proxy and URL that shouldn't use it. static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl control ); %Docstring Get name for QNetworkRequest.CacheLoadControl - -:rtype: str %End static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &name ); %Docstring Get QNetworkRequest.CacheLoadControl from name - -:rtype: QNetworkRequest.CacheLoadControl %End void setupDefaultProxyAndCache(); @@ -98,8 +84,6 @@ Setup the NAM according to the user's settings bool useSystemProxy() const; %Docstring return whether the system proxy should be used - -:rtype: bool %End signals: diff --git a/python/core/qgsnetworkcontentfetcher.sip b/python/core/qgsnetworkcontentfetcher.sip index bab1d42470e5..7b7d39626ba2 100644 --- a/python/core/qgsnetworkcontentfetcher.sip +++ b/python/core/qgsnetworkcontentfetcher.sip @@ -38,6 +38,7 @@ Constructor for QgsNetworkContentFetcher. %Docstring Fetches content from a remote URL and handles redirects. The finished() signal will be emitted when content has been fetched. + :param url: URL to fetch %End @@ -46,8 +47,6 @@ signal will be emitted when content has been fetched. Returns a reference to the network reply :return: QNetworkReply for fetched URL content -:rtype: QNetworkReply - %End QString contentAsString() const; @@ -55,8 +54,6 @@ Returns a reference to the network reply Returns the fetched content as a string :return: string containing network content -:rtype: str - %End signals: diff --git a/python/core/qgsobjectcustomproperties.sip b/python/core/qgsobjectcustomproperties.sip index 10159b70a31e..f3fc00006d95 100644 --- a/python/core/qgsobjectcustomproperties.sip +++ b/python/core/qgsobjectcustomproperties.sip @@ -32,8 +32,6 @@ Constructor for QgsObjectCustomProperties. QStringList keys() const; %Docstring Return list of stored keys - -:rtype: list of str %End void setValue( const QString &key, const QVariant &value ); @@ -44,8 +42,6 @@ Add an entry to the store. If the entry with the keys exists already, it will be QVariant value( const QString &key, const QVariant &defaultValue = QVariant() ) const; %Docstring Return value for the given key. If the key is not stored, default value will be used - -:rtype: QVariant %End void remove( const QString &key ); @@ -57,6 +53,7 @@ Remove a key (entry) from the store void readXml( const QDomNode &parentNode, const QString &keyStartsWith = QString() ); %Docstring Read store contents from XML + :param parentNode: node to read from :param keyStartsWith: reads only properties starting with the specified string (or all if the string is empty) %End diff --git a/python/core/qgsofflineediting.sip b/python/core/qgsofflineediting.sip index 8739667beb00..e87ea53fb619 100644 --- a/python/core/qgsofflineediting.sip +++ b/python/core/qgsofflineediting.sip @@ -33,19 +33,16 @@ class QgsOfflineEditing : QObject bool convertToOfflineProject( const QString &offlineDataPath, const QString &offlineDbFile, const QStringList &layerIds, bool onlySelected = false ); %Docstring Convert current project for offline editing + :param offlineDataPath: Path to offline db file :param offlineDbFile: Offline db file name :param layerIds: List of layer names to convert :param onlySelected: Only copy selected features from layers where a selection is present - -:rtype: bool %End bool isOfflineProject() const; %Docstring Return true if current project is offline - -:rtype: bool %End void synchronize(); @@ -72,6 +69,7 @@ comparing the index of the current ``layer`` to the total amount %Docstring Is emitted when the mode for the progress of the current operation is set. + :param mode: progress mode :param maximum: total number of entities to process in the current operation %End @@ -79,6 +77,7 @@ set. void progressUpdated( int progress ); %Docstring Emitted with the progress of the current mode + :param progress: current index of processed entities %End @@ -90,6 +89,7 @@ Emitted when the processing of all layers has finished void warning( const QString &title, const QString &message ); %Docstring Emitted when a warning needs to be displayed. + :param title: title string for message :param message: A descriptive message for the warning %End diff --git a/python/core/qgsogcutils.sip b/python/core/qgsogcutils.sip index 3f5f89a1d974..318a6737eb35 100644 --- a/python/core/qgsogcutils.sip +++ b/python/core/qgsogcutils.sip @@ -35,32 +35,25 @@ Currently supported standards: static QgsGeometry geometryFromGML( const QString &xmlString ); %Docstring Static method that creates geometry from GML + :param xmlString: xml representation of the geometry. GML elements are expected to be in default namespace (\verbatim {... \endverbatim) or in "gml" namespace (\verbatim ... \endverbatim) - -:rtype: QgsGeometry %End static QgsGeometry geometryFromGML( const QDomNode &geometryNode ); %Docstring Static method that creates geometry from GML - -:rtype: QgsGeometry %End static QgsRectangle rectangleFromGMLBox( const QDomNode &boxNode ); %Docstring Read rectangle from GML2 Box - -:rtype: QgsRectangle %End static QgsRectangle rectangleFromGMLEnvelope( const QDomNode &envelopeNode ); %Docstring Read rectangle from GML3 Envelope - -:rtype: QgsRectangle %End static QDomElement geometryToGML( const QgsGeometry &geometry, QDomDocument &doc, @@ -73,8 +66,6 @@ Read rectangle from GML3 Envelope Exports the geometry to GML :return: QDomElement -:rtype: QDomElement - .. versionadded:: 2.16 %End @@ -84,8 +75,6 @@ Exports the geometry to GML Exports the geometry to GML2 or GML3 :return: QDomElement -:rtype: QDomElement - %End static QDomElement geometryToGML( const QgsGeometry &geometry, QDomDocument &doc, int precision = 17 ); @@ -93,8 +82,6 @@ Exports the geometry to GML2 or GML3 Exports the geometry to GML2 :return: QDomElement -:rtype: QDomElement - %End static QDomElement rectangleToGMLBox( QgsRectangle *box, QDomDocument &doc, int precision = 17 ); @@ -102,8 +89,6 @@ Exports the geometry to GML2 Exports the rectangle to GML2 Box :return: QDomElement -:rtype: QDomElement - %End static QDomElement rectangleToGMLBox( QgsRectangle *box, QDomDocument &doc, @@ -114,8 +99,6 @@ Exports the rectangle to GML2 Box Exports the rectangle to GML2 Box :return: QDomElement -:rtype: QDomElement - .. versionadded:: 2.16 %End @@ -125,8 +108,6 @@ Exports the rectangle to GML2 Box Exports the rectangle to GML3 Envelope :return: QDomElement -:rtype: QDomElement - %End static QDomElement rectangleToGMLEnvelope( QgsRectangle *env, QDomDocument &doc, @@ -137,8 +118,6 @@ Exports the rectangle to GML3 Envelope Exports the rectangle to GML3 Envelope :return: QDomElement -:rtype: QDomElement - .. versionadded:: 2.16 %End @@ -147,15 +126,11 @@ Exports the rectangle to GML3 Envelope static QColor colorFromOgcFill( const QDomElement &fillElement ); %Docstring Parse XML with OGC fill into QColor - -:rtype: QColor %End static QgsExpression *expressionFromOgcFilter( const QDomElement &element ) /Factory/; %Docstring Parse XML with OGC filter into QGIS expression - -:rtype: QgsExpression %End static QDomElement expressionToOgcFilter( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage = 0 ); @@ -164,8 +139,6 @@ Creates OGC filter XML element. Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT) :return: valid \verbatim \endverbatim QDomElement on success, -:rtype: QDomElement - otherwise null QDomElement %End @@ -182,8 +155,6 @@ otherwise null QDomElement Creates an OGC expression XML element. :return: valid OGC expression QDomElement on success, -:rtype: QDomElement - otherwise null QDomElement %End @@ -200,8 +171,6 @@ otherwise null QDomElement Creates an OGC expression XML element. :return: valid OGC expression QDomElement on success, -:rtype: QDomElement - otherwise null QDomElement %End diff --git a/python/core/qgsoptional.sip b/python/core/qgsoptional.sip index 316685f58aa9..edff662657fd 100644 --- a/python/core/qgsoptional.sip +++ b/python/core/qgsoptional.sip @@ -60,8 +60,6 @@ Boolean operator. Will return true if this optional is enabled. %Docstring Check if this optional is enabled -:rtype: bool - .. versionadded:: 3.0 %End @@ -77,8 +75,6 @@ Set if this optional is enabled %Docstring Access the payload data -:rtype: T - .. versionadded:: 3.0 %End diff --git a/python/core/qgsowsconnection.sip b/python/core/qgsowsconnection.sip index d6dcef8aeb87..bd37a503a54c 100644 --- a/python/core/qgsowsconnection.sip +++ b/python/core/qgsowsconnection.sip @@ -24,6 +24,7 @@ class QgsOwsConnection : QObject QgsOwsConnection( const QString &service, const QString &connName ); %Docstring Constructor + :param service: service name: WMS,WFS,WCS :param connName: connection name %End @@ -32,8 +33,6 @@ Constructor %Docstring Returns the connection name. -:rtype: str - .. versionadded:: 3.0 %End @@ -41,8 +40,6 @@ Returns the connection name. %Docstring Returns connection info string. -:rtype: str - .. versionadded:: 3.0 %End @@ -50,16 +47,12 @@ Returns connection info string. %Docstring Returns a string representing the service type, e.g. "WMS". -:rtype: str - .. versionadded:: 3.0 %End QgsDataSourceUri uri() const; %Docstring Returns the connection uri. - -:rtype: QgsDataSourceUri %End static QgsDataSourceUri &addWmsWcsConnectionSettings( QgsDataSourceUri &uri, const QString &settingsKey ); @@ -67,8 +60,6 @@ Returns the connection uri. Adds uri parameters relating to the settings for a WMS or WCS connection to a QgsDataSourceUri ``uri``. Connection settings are taken from the specified QSettings ``settingsKey``. -:rtype: QgsDataSourceUri - .. versionadded:: 3.0 %End @@ -77,16 +68,12 @@ Connection settings are taken from the specified QSettings ``settingsKey``. Adds uri parameters relating to the settings for a WFS connection to a QgsDataSourceUri ``uri``. Connection settings are taken from the specified QSettings ``settingsKey``. -:rtype: QgsDataSourceUri - .. versionadded:: 3.0 %End static QStringList connectionList( const QString &service ); %Docstring Returns the list of connections for the specified service - -:rtype: list of str %End static void deleteConnection( const QString &service, const QString &name ); @@ -97,8 +84,6 @@ Deletes the connection for the specified service with the specified name static QString selectedConnection( const QString &service ); %Docstring Retrieves the selected connection for the specified service - -:rtype: str %End static void setSelectedConnection( const QString &service, const QString &name ); %Docstring diff --git a/python/core/qgspainting.sip b/python/core/qgspainting.sip index 2184b9e6e9f8..1cf5ed999b59 100644 --- a/python/core/qgspainting.sip +++ b/python/core/qgspainting.sip @@ -52,14 +52,10 @@ Misc painting enums and functions. static QPainter::CompositionMode getCompositionMode( QgsPainting::BlendMode blendMode ); %Docstring Returns a QPainter.CompositionMode corresponding to a BlendMode - -:rtype: QPainter.CompositionMode %End static QgsPainting::BlendMode getBlendModeEnum( QPainter::CompositionMode blendMode ); %Docstring Returns a BlendMode corresponding to a QPainter.CompositionMode - -:rtype: QgsPainting.BlendMode %End }; diff --git a/python/core/qgspallabeling.sip b/python/core/qgspallabeling.sip index 66b03a3a13ed..61dce5a5574f 100644 --- a/python/core/qgspallabeling.sip +++ b/python/core/qgspallabeling.sip @@ -264,8 +264,6 @@ class QgsPalLayerSettings %Docstring Returns the labeling property definitions. -:rtype: QgsPropertiesDefinition - .. versionadded:: 3.0 %End @@ -299,8 +297,6 @@ True if this label is made from a expression string, e.g., FieldName || 'mm' QgsExpression *getLabelExpression(); %Docstring Returns the QgsExpression for this label settings. May be None if isExpression is false. - -:rtype: QgsExpression %End QColor previewBkgrdColor; @@ -703,6 +699,7 @@ Z-Index of label, where labels with a higher z-index are rendered on top of labe %Docstring Register a feature for labeling. + :param f: feature to label :param context: render context. The QgsExpressionContext contained within the render context must have already had the feature and fields sets prior to calling this method. @@ -726,8 +723,6 @@ Read settings from a DOM element %Docstring Write settings into a DOM element -:rtype: QDomElement - .. versionadded:: 2.12 %End @@ -735,8 +730,6 @@ Write settings into a DOM element %Docstring Returns a reference to the label's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. versionadded:: 3.0 .. seealso:: :py:func:`setDataDefinedProperties()` @@ -746,6 +739,7 @@ Returns a reference to the label's property collection, used for data defined ov void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the label's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. versionadded:: 3.0 @@ -757,8 +751,6 @@ Sets the label's property collection, used for data defined overrides. %Docstring Returns the label text formatting settings, e.g., font settings, buffer settings, etc. -:rtype: QgsTextFormat - .. seealso:: :py:func:`setFormat()` .. versionadded:: 3.0 @@ -767,6 +759,7 @@ Returns the label text formatting settings, e.g., font settings, buffer settings void setFormat( const QgsTextFormat &format ); %Docstring Sets the label text formatting settings, e.g., font settings, buffer settings, etc. + :param format: label text format .. seealso:: :py:func:`format()` @@ -824,14 +817,10 @@ Class that stores computed placement from labeling engine. QList labelsAtPosition( const QgsPointXY &p ) const; %Docstring return infos about labels at a given (map) position - -:rtype: list of QgsLabelPosition %End QList labelsWithinRect( const QgsRectangle &r ) const; %Docstring return infos about labels within a given (map) rectangle - -:rtype: list of QgsLabelPosition %End private: @@ -850,8 +839,6 @@ class QgsPalLabeling %Docstring called to find out whether the layer is used for labeling -:rtype: bool - .. versionadded:: 2.4 %End @@ -859,14 +846,13 @@ called to find out whether the layer is used for labeling static QgsGeometry prepareGeometry( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry() ) /Factory/; %Docstring Prepares a geometry for registration with PAL. Handles reprojection, rotation, clipping, etc. + :param geometry: geometry to prepare :param context: render context :param ct: coordinate transform, or invalid transform if no transformation required :param clipGeometry: geometry to clip features to, if applicable :return: prepared geometry -:rtype: QgsGeometry - .. versionadded:: 2.9 %End @@ -874,14 +860,13 @@ Prepares a geometry for registration with PAL. Handles reprojection, rotation, c static bool geometryRequiresPreparation( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry() ); %Docstring Checks whether a geometry requires preparation before registration with PAL + :param geometry: geometry to prepare :param context: render context :param ct: coordinate transform, or invalid transform if no transformation required :param clipGeometry: geometry to clip features to, if applicable :return: true if geometry requires preparation -:rtype: bool - .. versionadded:: 2.9 %End @@ -890,12 +875,11 @@ Checks whether a geometry requires preparation before registration with PAL %Docstring Splits a text string to a list of separate lines, using a specified wrap character. The text string will be split on either newline characters or the wrap character. + :param text: text string to split :param wrapCharacter: additional character to wrap on :return: list of text split to lines -:rtype: list of str - .. versionadded:: 2.9 %End @@ -905,11 +889,10 @@ The text string will be split on either newline characters or the wrap character Splits a text string to a list of graphemes, which are the smallest allowable character divisions in the string. This accounts for scripts were individual characters are not allowed to be split apart (e.g., Arabic and Indic based scripts) + :param text: string to split :return: list of graphemes -:rtype: list of str - .. versionadded:: 2.10 %End diff --git a/python/core/qgspathresolver.sip b/python/core/qgspathresolver.sip index 49a7a58e118a..e79aa2e45965 100644 --- a/python/core/qgspathresolver.sip +++ b/python/core/qgspathresolver.sip @@ -32,15 +32,11 @@ Initialize path resolver with a base filename. Null filename means no conversion Prepare a filename to save it to the project file. Creates an absolute or relative path according to the project settings. Paths written to the project file should be prepared with this method. - -:rtype: str %End QString readPath( const QString &filename ) const; %Docstring Turn filename read from the project file to an absolute path - -:rtype: str %End }; diff --git a/python/core/qgspluginlayer.sip b/python/core/qgspluginlayer.sip index ddfea8446bfa..1fa8fb208d3e 100644 --- a/python/core/qgspluginlayer.sip +++ b/python/core/qgspluginlayer.sip @@ -32,8 +32,6 @@ In order to be readable from project files, they should set these attributes in Returns a new instance equivalent to this one. :return: a new layer instance -:rtype: QgsPluginLayer - .. versionadded:: 3.0 %End @@ -41,8 +39,6 @@ Returns a new instance equivalent to this one. QString pluginLayerType(); %Docstring Return plugin layer type (the same as used in QgsPluginLayerRegistry) - -:rtype: str %End virtual void setExtent( const QgsRectangle &extent ); diff --git a/python/core/qgspluginlayerregistry.sip b/python/core/qgspluginlayerregistry.sip index 538ceb19f0ea..a1867b105703 100644 --- a/python/core/qgspluginlayerregistry.sip +++ b/python/core/qgspluginlayerregistry.sip @@ -26,32 +26,22 @@ class for creating plugin specific layers virtual ~QgsPluginLayerType(); QString name(); -%Docstring - -:rtype: str -%End virtual QgsPluginLayer *createLayer() /Factory/; %Docstring Return new layer of this type. Return NULL on error - -:rtype: QgsPluginLayer %End virtual QgsPluginLayer *createLayer( const QString &uri ) /Factory/; %Docstring Return new layer of this type, using layer URI (specific to this plugin layer type). Return NULL on error. -:rtype: QgsPluginLayer - .. versionadded:: 2.10 %End virtual bool showLayerProperties( QgsPluginLayer *layer ); %Docstring Show plugin layer properties dialog. Return false if the dialog cannot be shown. - -:rtype: bool %End protected: @@ -83,37 +73,27 @@ Constructor for QgsPluginLayerRegistry. %Docstring List all known layer types \since QGIS * - -:rtype: list of str %End bool addPluginLayerType( QgsPluginLayerType *pluginLayerType /Transfer/ ); %Docstring Add plugin layer type (take ownership) and return true on success - -:rtype: bool %End bool removePluginLayerType( const QString &typeName ); %Docstring Remove plugin layer type and return true on success - -:rtype: bool %End QgsPluginLayerType *pluginLayerType( const QString &typeName ); %Docstring Return plugin layer type metadata or NULL if doesn't exist - -:rtype: QgsPluginLayerType %End QgsPluginLayer *createLayer( const QString &typeName, const QString &uri = QString() ) /Factory/; %Docstring Returns new layer if corresponding plugin has been found else returns a None. -:rtype: QgsPluginLayer - .. note:: parameter uri has been added in QGIS 2.10 diff --git a/python/core/qgspointlocator.sip b/python/core/qgspointlocator.sip index 8bc04e45fbae..447fb07f6d7d 100644 --- a/python/core/qgspointlocator.sip +++ b/python/core/qgspointlocator.sip @@ -46,8 +46,6 @@ If ``extent`` is not null, the locator will index only a subset of the layer whi %Docstring Get associated layer -:rtype: QgsVectorLayer - .. versionadded:: 2.14 %End @@ -55,8 +53,6 @@ Get associated layer %Docstring Get destination CRS - may be an invalid QgsCoordinateReferenceSystem if not doing OTF reprojection -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 2.14 %End @@ -64,8 +60,6 @@ Get destination CRS - may be an invalid QgsCoordinateReferenceSystem if not doin %Docstring Get extent of the area point locator covers - if null then it caches the whole layer -:rtype: QgsRectangle - .. versionadded:: 2.14 %End @@ -94,15 +88,11 @@ Prepare the index for queries. Does nothing if the index already exists. If the number of features is greater than the value of maxFeaturesToIndex, creation of index is stopped to make sure we do not run out of memory. If maxFeaturesToIndex is -1, no limits are used. Returns false if the creation of index has been prematurely stopped due to the limit of features, otherwise true * - -:rtype: bool %End bool hasIndex() const; %Docstring Indicate whether the data have been already indexed - -:rtype: bool %End struct Match @@ -115,68 +105,38 @@ construct invalid match Match( QgsPointLocator::Type t, QgsVectorLayer *vl, QgsFeatureId fid, double dist, const QgsPointXY &pt, int vertexIndex = 0, QgsPointXY *edgePoints = 0 ); QgsPointLocator::Type type() const; -%Docstring - -:rtype: QgsPointLocator.Type -%End bool isValid() const; -%Docstring - -:rtype: bool -%End bool hasVertex() const; -%Docstring - -:rtype: bool -%End bool hasEdge() const; -%Docstring - -:rtype: bool -%End bool hasArea() const; -%Docstring - -:rtype: bool -%End double distance() const; %Docstring for vertex / edge match units depending on what class returns it (geom.cache: layer units, map canvas snapper: dest crs units) - -:rtype: float %End QgsPointXY point() const; %Docstring for vertex / edge match coords depending on what class returns it (geom.cache: layer coords, map canvas snapper: dest coords) - -:rtype: QgsPointXY %End int vertexIndex() const; %Docstring for vertex / edge match (first vertex of the edge) - -:rtype: int %End QgsVectorLayer *layer() const; %Docstring The vector layer where the snap occurred. Will be null if the snap happened on an intersection. - -:rtype: QgsVectorLayer %End QgsFeatureId featureId() const; %Docstring The id of the feature to which the snapped geometry belongs. - -:rtype: QgsFeatureId %End void edgePoints( QgsPointXY &pt1 /Out/, QgsPointXY &pt2 /Out/ ) const; @@ -195,10 +155,6 @@ Only for a valid edge match - obtain endpoints of the edge { virtual ~MatchFilter(); virtual bool acceptMatch( const QgsPointLocator::Match &match ) = 0; -%Docstring - -:rtype: bool -%End }; @@ -206,38 +162,28 @@ Only for a valid edge match - obtain endpoints of the edge %Docstring Find nearest vertex to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. - -:rtype: Match %End Match nearestEdge( const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter = 0 ); %Docstring Find nearest edge to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. - -:rtype: Match %End MatchList edgesInRect( const QgsRectangle &rect, QgsPointLocator::MatchFilter *filter = 0 ); %Docstring Find edges within a specified recangle Optional filter may discard unwanted matches. - -:rtype: MatchList %End MatchList edgesInRect( const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter = 0 ); %Docstring Override of edgesInRect that construct rectangle from a center point and tolerance - -:rtype: MatchList %End MatchList pointInPolygon( const QgsPointXY &point ); %Docstring find out if the point is in any polygons - -:rtype: MatchList %End @@ -245,17 +191,11 @@ find out if the point is in any polygons %Docstring Return how many geometries are cached in the index -:rtype: int - .. versionadded:: 2.14 %End protected: bool rebuildIndex( int maxFeaturesToIndex = -1 ); -%Docstring - -:rtype: bool -%End protected slots: void destroyIndex(); }; diff --git a/python/core/qgspointxy.sip b/python/core/qgspointxy.sip index d1aa37794017..f7235b24a77b 100644 --- a/python/core/qgspointxy.sip +++ b/python/core/qgspointxy.sip @@ -38,6 +38,7 @@ Create a point from another point QgsPointXY( double x, double y ); %Docstring Create a point from x,y coordinates + :param x: x coordinate :param y: y coordinate %End @@ -45,6 +46,7 @@ Create a point from x,y coordinates QgsPointXY( QPointF point ); %Docstring Create a point from a QPointF + :param point: QPointF source .. versionadded:: 2.7 @@ -53,6 +55,7 @@ Create a point from a QPointF QgsPointXY( QPoint point ); %Docstring Create a point from a QPoint + :param point: QPoint source .. versionadded:: 2.7 @@ -71,12 +74,14 @@ Z and M values will be dropped. void setX( double x ); %Docstring Sets the x value of the point + :param x: x coordinate %End void setY( double y ); %Docstring Sets the y value of the point + :param y: y coordinate %End @@ -90,8 +95,6 @@ Sets the x and y value of the point Get the x value of the point :return: x coordinate -:rtype: float - %End double y() const; @@ -99,8 +102,6 @@ Get the x value of the point Get the y value of the point :return: y coordinate -:rtype: float - %End QPointF toQPointF() const; @@ -108,8 +109,6 @@ Get the y value of the point Converts a point to a QPointF :return: QPointF with same x and y values -:rtype: QPointF - .. versionadded:: 2.7 %End @@ -118,24 +117,18 @@ Converts a point to a QPointF %Docstring Returns a string representation of the point (x, y) with a preset ``precision``. If ``precision`` is -1, then a default precision will be used. - -:rtype: str %End QString asWkt() const; %Docstring Return the well known text representation for the point (e.g. "POINT(x y)"). The wkt is created without an SRID. - -:rtype: str %End double sqrDist( double x, double y ) const; %Docstring Returns the squared distance between this point a specified x, y coordinate. -:rtype: float - .. seealso:: :py:func:`distance()` %End @@ -143,19 +136,16 @@ Returns the squared distance between this point a specified x, y coordinate. %Docstring Returns the squared distance between this point another point. -:rtype: float - .. seealso:: :py:func:`distance()` %End double distance( double x, double y ) const; %Docstring Returns the distance between this point and a specified x, y coordinate. + :param x: x-coordniate :param y: y-coordinate -:rtype: float - .. seealso:: :py:func:`sqrDist()` .. versionadded:: 2.16 @@ -164,9 +154,8 @@ Returns the distance between this point and a specified x, y coordinate. double distance( const QgsPointXY &other ) const; %Docstring Returns the distance between this point and another point. -:param other: other point -:rtype: float +:param other: other point .. seealso:: :py:func:`sqrDist()` @@ -176,38 +165,32 @@ Returns the distance between this point and another point. double sqrDistToSegment( double x1, double y1, double x2, double y2, QgsPointXY &minDistPoint /Out/, double epsilon = DEFAULT_SEGMENT_EPSILON ) const; %Docstring Returns the minimum distance between this point and a segment - -:rtype: float %End double azimuth( const QgsPointXY &other ) const; %Docstring Calculates azimuth between this point and other one (clockwise in degree, starting from north) - -:rtype: float %End QgsPointXY project( double distance, double bearing ) const; %Docstring Returns a new point which corresponds to this point projected by a specified distance in a specified bearing. + :param distance: distance to project :param bearing: angle to project in, clockwise in degrees starting from north -:rtype: QgsPointXY - .. versionadded:: 2.16 %End bool compare( const QgsPointXY &other, double epsilon = 4 * DBL_EPSILON ) const; %Docstring Compares this point with another point with a fuzzy tolerance + :param other: point to compare with :param epsilon: maximum difference for coordinates between the points :return: true if points are equal within specified tolerance -:rtype: bool - .. versionadded:: 2.9 %End @@ -217,8 +200,6 @@ Compares this point with another point with a fuzzy tolerance bool operator!=( const QgsPointXY &other ) const; %Docstring Inequality operator - -:rtype: bool %End void multiply( double scalar ); @@ -230,64 +211,46 @@ Multiply x and y by the given value QgsVector operator-( const QgsPointXY &p ) const; %Docstring Calculates the vector obtained by subtracting a point from this point - -:rtype: QgsVector %End QgsPointXY &operator+=( QgsVector v ); %Docstring Adds a vector to this point in place - -:rtype: QgsPointXY %End QgsPointXY &operator-=( QgsVector v ); %Docstring Subtracts a vector from this point in place - -:rtype: QgsPointXY %End QgsPointXY operator+( QgsVector v ) const; %Docstring Adds a vector to this point - -:rtype: QgsPointXY %End QgsPointXY operator-( QgsVector v ) const; %Docstring Subtracts a vector from this point - -:rtype: QgsPointXY %End QgsPointXY operator*( double scalar ) const; %Docstring Multiplies the coordinates in this point by a scalar quantity - -:rtype: QgsPointXY %End QgsPointXY operator/( double scalar ) const; %Docstring Divides the coordinates in this point by a scalar quantity - -:rtype: QgsPointXY %End QgsPointXY &operator*=( double scalar ); %Docstring Multiplies the coordinates in this point by a scalar quantity in place - -:rtype: QgsPointXY %End QgsPointXY &operator/=( double scalar ); %Docstring Divides the coordinates in this point by a scalar quantity in place - -:rtype: QgsPointXY %End operator QVariant() const; @@ -303,10 +266,6 @@ Allows direct construction of QVariants from points. %End int __len__(); -%Docstring - -:rtype: int -%End %MethodCode sipRes = 2; %End @@ -330,10 +289,6 @@ Allows direct construction of QVariants from points. %End long __hash__() const; -%Docstring - -:rtype: long -%End %MethodCode sipRes = qHash( *sipCpp ); %End diff --git a/python/core/qgsproject.sip b/python/core/qgsproject.sip index 3043eccdc39e..f04b2d835f7d 100644 --- a/python/core/qgsproject.sip +++ b/python/core/qgsproject.sip @@ -35,8 +35,6 @@ properties. static QgsProject *instance(); %Docstring Returns the QgsProject singleton instance - -:rtype: QgsProject %End explicit QgsProject( QObject *parent /TransferThis/ = 0 ); @@ -51,6 +49,7 @@ Most of the time you want to use QgsProject.instance() instead as many component void setTitle( const QString &title ); %Docstring Sets the project's title. + :param title: new title .. versionadded:: 2.4 @@ -62,22 +61,19 @@ Sets the project's title. %Docstring Returns the project's title. -:rtype: str - .. seealso:: :py:func:`setTitle()` %End bool isDirty() const; %Docstring Returns true if the project has been modified since the last write() - -:rtype: bool %End void setFileName( const QString &name ); %Docstring Sets the file name associated with the project. This is the file which contains the project's XML representation. + :param name: project file name .. seealso:: :py:func:`fileName()` @@ -88,8 +84,6 @@ representation. Returns the project's file name. This is the file which contains the project's XML representation. -:rtype: str - .. seealso:: :py:func:`setFileName()` .. seealso:: :py:func:`fileInfo()` @@ -99,8 +93,6 @@ representation. %Docstring Returns QFileInfo object for the project's associated file. -:rtype: QFileInfo - .. seealso:: :py:func:`fileName()` .. versionadded:: 2.9 @@ -110,8 +102,6 @@ Returns QFileInfo object for the project's associated file. %Docstring Returns the project's native coordinate reference system. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 .. seealso:: :py:func:`setCrs()` @@ -134,8 +124,6 @@ Sets the project's native coordinate reference system. %Docstring Returns a proj string representing the project's ellipsoid setting, e.g., "WGS84". -:rtype: str - .. seealso:: :py:func:`setEllipsoid()` .. seealso:: :py:func:`crs()` @@ -161,8 +149,6 @@ Returns a copy of the project's coordinate transform context, which stores vario information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system. -:rtype: QgsCoordinateTransformContext - .. versionadded:: 3.0 .. seealso:: :py:func:`setTransformContext()` @@ -193,11 +179,10 @@ Clear the project - removes all settings and resets it back to an empty, default bool read( const QString &filename ); %Docstring Reads given project file from the given file. + :param filename: name of project file to read :return: true if project file has been read successfully -:rtype: bool - %End bool read(); @@ -205,16 +190,12 @@ Reads given project file from the given file. Reads the project from its currently associated file (see fileName() ). :return: true if project file has been read successfully -:rtype: bool - %End bool readLayer( const QDomNode &layerNode ); %Docstring Reads the layer described in the associated DOM node. -:rtype: bool - .. note:: This method is mainly for use by QgsProjectBadLayerHandler subclasses @@ -227,9 +208,8 @@ this method with corrected DOM node adds the layer back to the project. bool write( const QString &filename ); %Docstring Writes the project to a file. -:param filename: destination file -:rtype: bool +:param filename: destination file .. note:: @@ -248,8 +228,6 @@ Writes the project to a file. %Docstring Writes the project to its current associated file (see fileName() ). -:rtype: bool - .. note:: isDirty() will be set to false if project is successfully written @@ -264,8 +242,6 @@ Write a boolean entry to the project file. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values -:rtype: bool - .. note:: The key string must be valid xml tag names in order to be saved to the file. @@ -282,8 +258,6 @@ Write a double entry to the project file. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values -:rtype: bool - .. note:: The key string must be valid xml tag names in order to be saved to the file. @@ -300,8 +274,6 @@ Write an integer entry to the project file. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values -:rtype: bool - .. note:: The key string must be valid xml tag names in order to be saved to the file. @@ -314,8 +286,6 @@ Write a string entry to the project file. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values -:rtype: bool - .. note:: The key string must be valid xml tag names in order to be saved to the file. @@ -328,8 +298,6 @@ Write a string list entry to the project file. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values -:rtype: bool - .. note:: The key string must be valid xml tag names in order to be saved to the file. @@ -341,37 +309,17 @@ Key value accessors keys would be the familiar QgsSettings-like '/' delimited entries, implying a hierarchy of keys and corresponding values - -:rtype: list of str %End QString readEntry( const QString &scope, const QString &key, const QString &def = QString(), bool *ok = 0 ) const; -%Docstring - -:rtype: str -%End int readNumEntry( const QString &scope, const QString &key, int def = 0, bool *ok = 0 ) const; -%Docstring - -:rtype: int -%End double readDoubleEntry( const QString &scope, const QString &key, double def = 0, bool *ok = 0 ) const; -%Docstring - -:rtype: float -%End bool readBoolEntry( const QString &scope, const QString &key, bool def = false, bool *ok = 0 ) const; -%Docstring - -:rtype: bool -%End bool removeEntry( const QString &scope, const QString &key ); %Docstring Remove the given key - -:rtype: bool %End @@ -379,8 +327,6 @@ Remove the given key %Docstring Return keys with values -- do not return keys that contain other keys -:rtype: list of str - .. note:: equivalent to QgsSettings entryList() @@ -390,8 +336,6 @@ Return keys with values -- do not return keys that contain other keys %Docstring Return keys with keys -- do not return keys that contain only values -:rtype: list of str - .. note:: equivalent to QgsSettings subkeyList() @@ -405,8 +349,6 @@ Return keys with keys -- do not return keys that contain only values Return path resolver object with considering whether the project uses absolute or relative paths and using current project's path. -:rtype: QgsPathResolver - .. versionadded:: 3.0 %End @@ -415,22 +357,16 @@ or relative paths and using current project's path. Prepare a filename to save it to the project file. Creates an absolute or relative path according to the project settings. Paths written to the project file should be prepared with this method. - -:rtype: str %End QString readPath( const QString &filename ) const; %Docstring Turn filename read from the project file to an absolute path - -:rtype: str %End QString error() const; %Docstring Return error message from previous read/write - -:rtype: str %End void setBadLayerHandler( QgsProjectBadLayerHandler *handler /Transfer/ ); @@ -442,8 +378,6 @@ Deletes old handler and takes ownership of the new one. QString layerIsEmbedded( const QString &id ) const; %Docstring Returns project file path if layer is embedded from other project file. Returns empty string if layer is not embedded - -:rtype: str %End @@ -451,8 +385,6 @@ Returns project file path if layer is embedded from other project file. Returns %Docstring Create layer group instance defined in an arbitrary project file. -:rtype: QgsLayerTreeGroup - .. versionadded:: 2.4 %End @@ -464,16 +396,12 @@ Convenience function to set topological editing bool topologicalEditing() const; %Docstring Convenience function to query topological editing status - -:rtype: bool %End QgsUnitTypes::DistanceUnit distanceUnits() const; %Docstring Convenience function to query default distance measurement units for project. -:rtype: QgsUnitTypes.DistanceUnit - .. versionadded:: 2.14 .. seealso:: :py:func:`setDistanceUnits()` @@ -496,8 +424,6 @@ Sets the default distance measurement units for the project. %Docstring Convenience function to query default area measurement units for project. -:rtype: QgsUnitTypes.AreaUnit - .. versionadded:: 2.14 .. seealso:: :py:func:`distanceUnits()` @@ -519,15 +445,9 @@ Sets the default area measurement units for the project. Return project's home path :return: home path of project (or null QString if not set) * -:rtype: str - %End QgsRelationManager *relationManager() const; -%Docstring - -:rtype: QgsRelationManager -%End QgsLayoutManager *layoutManager(); @@ -535,8 +455,6 @@ Return project's home path Returns the project's layout manager, which manages compositions within the project. -:rtype: QgsLayoutManager - .. versionadded:: 3.0 %End @@ -544,8 +462,6 @@ the project. %Docstring Return pointer to the root (invisible) node of the project's layer tree -:rtype: QgsLayerTree - .. versionadded:: 2.4 %End @@ -553,8 +469,6 @@ Return pointer to the root (invisible) node of the project's layer tree %Docstring Return pointer to the helper class that synchronizes map layer registry with layer tree -:rtype: QgsLayerTreeRegistryBridge - .. versionadded:: 2.4 %End @@ -562,8 +476,6 @@ Return pointer to the helper class that synchronizes map layer registry with lay %Docstring Returns pointer to the project's map theme collection. -:rtype: QgsMapThemeCollection - .. versionadded:: 2.12 .. note:: @@ -575,8 +487,6 @@ Returns pointer to the project's map theme collection. %Docstring Returns pointer to the project's annotation manager. -:rtype: QgsAnnotationManager - .. versionadded:: 3.0 %End @@ -594,8 +504,6 @@ Set a list of layers which should not be taken into account on map identificatio QStringList nonIdentifiableLayers() const; %Docstring Get the list of layers which currently should not be taken into account on map identification - -:rtype: list of str %End bool autoTransaction() const; @@ -604,8 +512,6 @@ Transactional editing means that on supported datasources (postgres databases) t all tables that originate from the same database are synchronized and executed in a server side transaction. -:rtype: bool - .. versionadded:: 2.16 %End @@ -625,8 +531,6 @@ Make sure that this is only called when all layers are not in edit mode. %Docstring Should default values be evaluated on provider side when requested and not when committed. -:rtype: bool - .. versionadded:: 2.16 %End @@ -645,8 +549,6 @@ Defines if default values should be evaluated on provider side when requested an %Docstring The snapping configuration for this project. -:rtype: QgsSnappingConfig - .. versionadded:: 3.0 %End @@ -654,8 +556,6 @@ The snapping configuration for this project. %Docstring A list of layers with which intersections should be avoided. -:rtype: list of QgsVectorLayer - .. versionadded:: 3.0 %End @@ -671,8 +571,6 @@ A list of layers with which intersections should be avoided. A map of custom project variables. To get all available variables including generated ones use QgsExpressionContextUtils.projectScope() instead. - -:rtype: QVariantMap %End void setCustomVariables( const QVariantMap &customVariables ); @@ -692,8 +590,6 @@ Sets project's global labeling engine settings %Docstring Returns project's global labeling engine settings -:rtype: QgsLabelingEngineSettings - .. versionadded:: 3.0 %End @@ -702,26 +598,21 @@ Returns project's global labeling engine settings %Docstring Returns a pointer to the project's internal layer store. /since QGIS 3.0 - -:rtype: QgsMapLayerStore %End int count() const; %Docstring Returns the number of registered layers. - -:rtype: int %End QgsMapLayer *mapLayer( const QString &layerId ) const; %Docstring Retrieve a pointer to a registered layer by layer ID. + :param layerId: ID of layer to retrieve :return: matching layer, or None if no matching layer found -:rtype: QgsMapLayer - .. seealso:: :py:func:`mapLayersByName()` @@ -731,11 +622,10 @@ Retrieve a pointer to a registered layer by layer ID. QList mapLayersByName( const QString &layerName ) const; %Docstring Retrieve a list of matching registered layers by layer name. + :param layerName: name of layers to match :return: list of matching layers -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`mapLayer()` @@ -746,8 +636,6 @@ Retrieve a list of matching registered layers by layer name. %Docstring Returns a map of all registered layers by layer ID. -:rtype: QMap - .. seealso:: :py:func:`mapLayer()` .. seealso:: :py:func:`mapLayersByName()` @@ -758,8 +646,6 @@ Returns a map of all registered layers by layer ID. bool isZipped() const; %Docstring Returns true if the project comes from a zip archive, false otherwise. - -:rtype: bool %End @@ -782,11 +668,10 @@ If you specify false here you have take care of deleting the layers yourself. Not available in Python. :return: a list of the map layers that were added -:rtype: list of QgsMapLayer - successfully. If a layer is invalid, or already exists in the registry, it will not be part of the returned QList. + .. note:: As a side-effect QgsProject is made dirty. @@ -822,7 +707,6 @@ If you specify false here you have take care of deleting the layer yourself. Not available in Python. :return: None if unable to add layer, otherwise pointer to newly added layer -:rtype: QgsMapLayer .. seealso:: :py:func:`addMapLayers` @@ -911,8 +795,6 @@ Takes a layer from the registry. If the layer was owned by the project, the layer will be returned without deleting it. The caller takes ownership of the layer and is responsible for deleting it. -:rtype: QgsMapLayer - .. seealso:: :py:func:`removeMapLayer()` .. versionadded:: 3.0 @@ -949,8 +831,6 @@ with any changes in the datasource. %Docstring Returns the default CRS for new layers based on the settings and the current project CRS - -:rtype: QgsCoordinateReferenceSystem %End void setTrustLayerMetadata( bool trust ); @@ -975,8 +855,6 @@ to determine it. Moreover, when this option is activated, primary key unicity is not checked for views and materialized views with Postgres provider. -:rtype: bool - .. versionadded:: 3.0 %End @@ -985,8 +863,6 @@ provider. %Docstring Returns the current auxiliary storage. -:rtype: QgsAuxiliaryStorage - .. versionadded:: 3.0 %End @@ -1034,6 +910,7 @@ emitted when an old project file is read. void layerLoaded( int i, int n ); %Docstring Emitted when a layer from a projects was read. + :param i: current layer :param n: number of layers %End diff --git a/python/core/qgsprojectbadlayerhandler.sip b/python/core/qgsprojectbadlayerhandler.sip index 4c1b607148f7..685aceab4b64 100644 --- a/python/core/qgsprojectbadlayerhandler.sip +++ b/python/core/qgsprojectbadlayerhandler.sip @@ -58,8 +58,6 @@ Returns data type associated with the given QgsProject file Dom node The Dom node should represent the state associated with a specific layer. -:rtype: DataType - .. versionadded:: 3.0 %End @@ -71,8 +69,6 @@ The QDomNode is a QgsProject Dom node corresponding to a map layer state. Essentially dumps datasource tag. -:rtype: str - .. versionadded:: 3.0 %End @@ -91,8 +87,6 @@ If the layer doesn't fall into either of the previous two categories, then it's either a database or URL. If the datasource tag has "url=", then it's URL based and if it has "dbname=">, then the layer data is in a database. -:rtype: ProviderType - .. versionadded:: 3.0 %End diff --git a/python/core/qgsprojectfiletransform.sip b/python/core/qgsprojectfiletransform.sip index e3e8e7489306..48195c62cb61 100644 --- a/python/core/qgsprojectfiletransform.sip +++ b/python/core/qgsprojectfiletransform.sip @@ -25,16 +25,13 @@ class QgsProjectFileTransform const QgsProjectVersion &version ); %Docstring Create an instance from a Dom and a supplied version + :param domDocument: The Dom document to use as content :param version: Version number %End bool updateRevision( const QgsProjectVersion &version ); -%Docstring - -:rtype: bool -%End void dump(); %Docstring diff --git a/python/core/qgsprojectproperty.sip b/python/core/qgsprojectproperty.sip index 5076d6ff1959..f8c807c39545 100644 --- a/python/core/qgsprojectproperty.sip +++ b/python/core/qgsprojectproperty.sip @@ -48,8 +48,6 @@ Dumps out the keys and values %Docstring Returns true if the property is a QgsProjectPropertyKey. -:rtype: bool - .. seealso:: :py:func:`isValue()` .. seealso:: :py:func:`isLeaf()` @@ -59,8 +57,6 @@ Returns true if the property is a QgsProjectPropertyKey. %Docstring Returns true if the property is a QgsProjectPropertyValue. -:rtype: bool - .. seealso:: :py:func:`isKey()` .. seealso:: :py:func:`isLeaf()` @@ -74,8 +70,6 @@ A leaf node is a key node that has either no value or only a single value. A non-leaf node would be a key node with key sub-nodes. This is used for entryList() and subkeyList() implementation. - -:rtype: bool %End virtual bool readXml( const QDomNode &keyNode ) = 0; @@ -83,8 +77,6 @@ This is used for entryList() and subkeyList() implementation. Restores the property hierarchy from a specified DOM node. Used for restoring properties from project file - -:rtype: bool %End virtual bool writeXml( const QString &nodeName, @@ -98,8 +90,6 @@ Used for saving properties to project file. :param nodeName: the tag name associated with this element :param element: the parent (or encompassing) property element :param document: the overall project file Dom document - -:rtype: bool %End virtual QVariant value() const = 0; @@ -111,8 +101,6 @@ embedded QVariant, _value. For QgsProjectPropertyKey, this means returning the QgsProjectPropertyValue _value that is keyed by its name, if it exists; i.e., QgsProjectPropertyKey "foo" will return the property value mapped to its name, "foo", in its QHash of QProperties. - -:rtype: QVariant %End }; @@ -194,8 +182,6 @@ Create a new QgsProjectPropertyKey with the specified identifier. %Docstring The name of the property is used as identifier. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -213,15 +199,11 @@ The name of the property is used as identifier. %Docstring If this key has a value, it will be stored by its name in its properties - -:rtype: QVariant %End QgsProjectPropertyKey *addKey( const QString &keyName ); %Docstring Adds the specified property key as a sub-key. - -:rtype: QgsProjectPropertyKey %End void removeKey( const QString &keyName ); @@ -232,20 +214,17 @@ Removes the specified key. QgsProjectPropertyValue *setValue( const QString &name, const QVariant &value ); %Docstring Sets the value associated with this key. + :param name: is the key name :param value: is the value to set :return: pointer to property value -:rtype: QgsProjectPropertyValue - %End QgsProjectPropertyValue *setValue( const QVariant &value ); %Docstring Set the value associated with this key -:rtype: QgsProjectPropertyValue - .. note:: that the single value node associated with each key is always @@ -262,15 +241,11 @@ stored keyed by the current key name int count() const; %Docstring Returns the number of sub-keys contained by this property. - -:rtype: int %End bool isEmpty() const; %Docstring Returns true if this property contains no sub-keys. - -:rtype: bool %End virtual bool isKey() const; @@ -305,8 +280,6 @@ Deletes any sub-nodes from the property. QgsProjectProperty *find( const QString &propertyName ) const; %Docstring Attempts to find a property with a matching sub-key name. - -:rtype: QgsProjectProperty %End }; diff --git a/python/core/qgsprojectversion.sip b/python/core/qgsprojectversion.sip index 9b607dfdd3f8..1634883375d8 100644 --- a/python/core/qgsprojectversion.sip +++ b/python/core/qgsprojectversion.sip @@ -31,31 +31,13 @@ Creates a new NULL version QgsProjectVersion( int major, int minor, int sub, const QString &name = "" ); QgsProjectVersion( const QString &string ); int majorVersion(); -%Docstring - -:rtype: int -%End int minorVersion(); -%Docstring - -:rtype: int -%End int subVersion(); -%Docstring - -:rtype: int -%End QString text(); -%Docstring - -:rtype: str -%End bool isNull() const; %Docstring Returns true if this is a NULL project version. - -:rtype: bool %End bool operator==( const QgsProjectVersion &other ) const; @@ -63,22 +45,16 @@ Returns true if this is a NULL project version. bool operator!=( const QgsProjectVersion &other ) const; %Docstring Boolean not equal operator - -:rtype: bool %End bool operator>=( const QgsProjectVersion &other ) const; %Docstring Boolean >= operator - -:rtype: bool %End bool operator>( const QgsProjectVersion &other ) const; %Docstring Boolean > operator - -:rtype: bool %End }; diff --git a/python/core/qgsproperty.sip b/python/core/qgsproperty.sip index 6cc49fca4fe3..983ed3e8802e 100644 --- a/python/core/qgsproperty.sip +++ b/python/core/qgsproperty.sip @@ -76,6 +76,7 @@ Constructs an empty property. QgsPropertyDefinition( const QString &name, const QString &description, StandardPropertyTemplate type, const QString &origin = QString(), const QString &comment = QString() ); %Docstring Constructor for QgsPropertyDefinition, using a standard property template. + :param name: is used internally and should be a unique, alphanumeric string. :param description: can be any localised string describing what the property is used for. :param type: one of the predefined standard property template @@ -86,6 +87,7 @@ Constructor for QgsPropertyDefinition, using a standard property template. QgsPropertyDefinition( const QString &name, DataType dataType, const QString &description, const QString &helpText, const QString &origin = QString(), const QString &comment = QString() ); %Docstring Constructor for custom QgsPropertyDefinitions. + :param name: is used internally and should be a unique, alphanumeric string. :param dataType: the data type for the property :param description: can be any localised string describing what the property is used for. @@ -98,8 +100,6 @@ of value acceptable by the property (eg 'dashed' or 'solid' for a line style pro QString name() const; %Docstring Returns the name of the property. This is used internally and should be a unique, alphanumeric string. - -:rtype: str %End void setName( const QString &name ); @@ -112,8 +112,6 @@ Sets the name of the property Returns the origin of the property. For example, a PAL property has an origin set to "labeling" while a diagram property has an origin set to "diagram". - -:rtype: str %End void setOrigin( const QString &origin ); @@ -126,15 +124,11 @@ origin set to "labeling" while a diagram property has an origin set to QString description() const; %Docstring Descriptive name of the property. - -:rtype: str %End QString comment() const; %Docstring Returns the comment of the property - -:rtype: str %End void setComment( const QString &comment ); @@ -145,8 +139,6 @@ Sets comment of the property QString helpText() const; %Docstring Helper text for using the property, including a description of the valid values for the property. - -:rtype: str %End void setDataType( DataType type ); @@ -157,24 +149,18 @@ Sets the data type DataType dataType() const; %Docstring Returns the allowable field/value data type for the property. - -:rtype: DataType %End StandardPropertyTemplate standardTemplate() const; %Docstring Returns the property's standard template, if applicable. Non standard types will return the Custom template. - -:rtype: StandardPropertyTemplate %End bool supportsAssistant() const; %Docstring Returns true if the property is of a type which is compatible with property override assistants. - -:rtype: bool %End }; @@ -218,22 +204,16 @@ Constructor for a QgsAbstractProperty. The property will be set to an InvalidPro static QgsProperty fromExpression( const QString &expression, bool isActive = true ); %Docstring Returns a new ExpressionBasedProperty created from the specified expression. - -:rtype: QgsProperty %End static QgsProperty fromField( const QString &fieldName, bool isActive = true ); %Docstring Returns a new FieldBasedProperty created from the specified field name. - -:rtype: QgsProperty %End static QgsProperty fromValue( const QVariant &value, bool isActive = true ); %Docstring Returns a new StaticProperty created from the specified value. - -:rtype: QgsProperty %End QgsProperty( const QgsProperty &other ); @@ -249,24 +229,16 @@ Returns true if the property is not an invalid type. bool operator==( const QgsProperty &other ) const; bool operator!=( const QgsProperty &other ) const; -%Docstring - -:rtype: bool -%End Type propertyType() const; %Docstring Returns the property type. - -:rtype: Type %End bool isActive() const; %Docstring Returns whether the property is currently active. -:rtype: bool - .. seealso:: :py:func:`setActive()` %End @@ -290,8 +262,6 @@ transform the property into an StaticProperty. Returns the current static value for the property. If the property is not a StaticProperty this will return an invalid variant. -:rtype: QVariant - .. seealso:: :py:func:`setStaticValue()` %End @@ -308,8 +278,6 @@ transform the property into an FieldBasedProperty. Returns the current field name the property references. If the property is not a FieldBasedProperty this will return an empty string. -:rtype: str - .. seealso:: :py:func:`setField()` %End @@ -326,8 +294,6 @@ transform the property into an ExpressionBasedProperty. Returns the expression used for the property value. If the property is not a ExpressionBasedProperty this will return an empty string. -:rtype: str - .. seealso:: :py:func:`setExpressionString()` %End @@ -335,8 +301,6 @@ is not a ExpressionBasedProperty this will return an empty string. %Docstring Returns an expression string representing the state of the property, or an empty string if the property could not be converted to an expression - -:rtype: str %End bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const; @@ -344,21 +308,18 @@ string if the property could not be converted to an expression Prepares the property against a specified expression context. Calling prepare before evaluating the property multiple times allows precalculation of expensive setup tasks such as parsing expressions. Returns true if preparation was successful. - -:rtype: bool %End QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const; %Docstring Returns the set of any fields referenced by the property for a specified expression context. - -:rtype: set of str %End QVariant value( const QgsExpressionContext &context, const QVariant &defaultValue = QVariant(), bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property, including any transforms which are set for the property + :param context: QgsExpressionContext to evaluate the property for. The variables and functions contained in the expression context can be used to alter the calculated value for the property, so that a property is able to respond to the current environment, layers and features within QGIS. @@ -366,8 +327,6 @@ is able to respond to the current environment, layers and features within QGIS. :param ok: if specified, will be set to true if conversion was successful :return: calculated value for property -:rtype: QVariant - .. seealso:: :py:func:`valueAsString()` @@ -383,13 +342,12 @@ is able to respond to the current environment, layers and features within QGIS. QString valueAsString( const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property and interprets it as a string. + :param context: QgsExpressionContext to evaluate the property for. :param defaultString: default string to return if the property cannot be calculated as a string :param ok: if specified, will be set to true if conversion was successful :return: value parsed to string -:rtype: str - .. seealso:: :py:func:`value()` @@ -405,13 +363,12 @@ Calculates the current value of the property and interprets it as a string. QColor valueAsColor( const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property and interprets it as a color. + :param context: QgsExpressionContext to evaluate the property for. :param defaultColor: default color to return if the property cannot be calculated as a color :param ok: if specified, will be set to true if conversion was successful :return: value parsed to color -:rtype: QColor - .. seealso:: :py:func:`value()` @@ -427,13 +384,12 @@ Calculates the current value of the property and interprets it as a color. double valueAsDouble( const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property and interprets it as a double. + :param context: QgsExpressionContext to evaluate the property for. :param defaultValue: default double to return if the property cannot be calculated as a double :param ok: if specified, will be set to true if conversion was successful :return: value parsed to double -:rtype: float - .. seealso:: :py:func:`value()` @@ -449,13 +405,12 @@ Calculates the current value of the property and interprets it as a double. int valueAsInt( const QgsExpressionContext &context, int defaultValue = 0, bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property and interprets it as an integer. + :param context: QgsExpressionContext to evaluate the property for. :param defaultValue: default integer to return if the property cannot be calculated as an integer :param ok: if specified, will be set to true if conversion was successful :return: value parsed to integer -:rtype: int - .. seealso:: :py:func:`value()` @@ -471,13 +426,12 @@ Calculates the current value of the property and interprets it as an integer. bool valueAsBool( const QgsExpressionContext &context, bool defaultValue = false, bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property and interprets it as an boolean. + :param context: QgsExpressionContext to evaluate the property for. :param defaultValue: default boolean to return if the property cannot be calculated as an boolean :param ok: if specified, will be set to true if conversion was successful :return: value parsed to boolean -:rtype: bool - .. seealso:: :py:func:`value()` @@ -495,8 +449,6 @@ Calculates the current value of the property and interprets it as an boolean. Saves this property to a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to save it to an XML document. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -505,14 +457,13 @@ You can use QgsXmlUtils.writeVariant to save it to an XML document. Loads this property from a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.readVariant to load it from an XML document. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End void setTransformer( QgsPropertyTransformer *transformer /Transfer/ ); %Docstring Sets an optional transformer to use for manipulating the calculated values for the property. + :param transformer: transformer to install. Ownership is transferred to the property, and any existing transformer will be deleted. Set to null to remove an existing transformer. @@ -523,8 +474,6 @@ existing transformer will be deleted. Set to null to remove an existing transfor %Docstring Returns the existing transformer used for manipulating the calculated values for the property, if set. -:rtype: QgsPropertyTransformer - .. seealso:: :py:func:`setTransformer()` %End @@ -534,8 +483,6 @@ Attempts to convert an existing expression based property to a base expression w corresponding transformer. Returns true if conversion was successful. Note that calling this method requires multiple parsing of expressions, so it should only be called in non-performance critical code. - -:rtype: bool %End operator QVariant() const; diff --git a/python/core/qgspropertycollection.sip b/python/core/qgspropertycollection.sip index a4c6581ff8ce..af10dc61f8c2 100644 --- a/python/core/qgspropertycollection.sip +++ b/python/core/qgspropertycollection.sip @@ -44,8 +44,6 @@ parameter should be set to a descriptive name for the collection. %Docstring Returns the descriptive name of the property collection. -:rtype: str - .. seealso:: :py:func:`setName()` %End @@ -59,8 +57,6 @@ Sets the descriptive name for the property collection. virtual QSet propertyKeys() const = 0; %Docstring Returns a list of property keys contained within the collection. - -:rtype: set of int %End virtual void clear() = 0; @@ -71,23 +67,21 @@ Removes all properties from the collection. virtual bool hasProperty( int key ) const = 0; %Docstring Returns true if the collection contains a property with the specified key. + :param key: integer key for property. The intended use case is that a context specific enum is cast to int and used for the key value. -:rtype: bool - .. seealso:: :py:func:`property()` %End virtual QgsProperty property( int key ) const = 0; %Docstring Returns a matching property from the collection, if one exists. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :return: matching property, or null if no matching, active property found. -:rtype: QgsProperty - .. seealso:: :py:func:`hasProperty()` %End @@ -95,6 +89,7 @@ int and used for the key value. virtual QVariant value( int key, const QgsExpressionContext &context, const QVariant &defaultValue = QVariant() ) const = 0; %Docstring Returns the calculated value of the property with the specified key from within the collection. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: expression context to evaluate property against @@ -102,8 +97,6 @@ int and used for the key value. cannot be calculated :return: calculated property value, or default value if property could not be evaluated -:rtype: QVariant - .. seealso:: :py:func:`valueAsString()` @@ -119,6 +112,7 @@ cannot be calculated QString valueAsString( int key, const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property with the specified key and interprets it as a string. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: QgsExpressionContext to evaluate the property for. @@ -126,8 +120,6 @@ int and used for the key value. :param ok: if specified, will be set to true if conversion was successful :return: value parsed to string -:rtype: str - .. seealso:: :py:func:`value()` @@ -143,6 +135,7 @@ int and used for the key value. QColor valueAsColor( int key, const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property with the specified key and interprets it as a color. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: QgsExpressionContext to evaluate the property for. @@ -150,8 +143,6 @@ int and used for the key value. :param ok: if specified, will be set to true if conversion was successful :return: value parsed to color -:rtype: QColor - .. seealso:: :py:func:`value()` @@ -167,6 +158,7 @@ int and used for the key value. double valueAsDouble( int key, const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property with the specified key and interprets it as a double. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: QgsExpressionContext to evaluate the property for. @@ -174,8 +166,6 @@ int and used for the key value. :param ok: if specified, will be set to true if conversion was successful :return: value parsed to double -:rtype: float - .. seealso:: :py:func:`value()` @@ -191,6 +181,7 @@ int and used for the key value. int valueAsInt( int key, const QgsExpressionContext &context, int defaultValue = 0, bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property with the specified key and interprets it as an integer. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: QgsExpressionContext to evaluate the property for. @@ -198,8 +189,6 @@ int and used for the key value. :param ok: if specified, will be set to true if conversion was successful :return: value parsed to integer -:rtype: int - .. seealso:: :py:func:`value()` @@ -215,6 +204,7 @@ int and used for the key value. bool valueAsBool( int key, const QgsExpressionContext &context, bool defaultValue = false, bool *ok /Out/ = 0 ) const; %Docstring Calculates the current value of the property with the specified key and interprets it as an boolean. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: QgsExpressionContext to evaluate the property for. @@ -222,8 +212,6 @@ int and used for the key value. :param ok: if specified, will be set to true if conversion was successful :return: value parsed to bool -:rtype: bool - .. seealso:: :py:func:`value()` @@ -241,25 +229,21 @@ int and used for the key value. Prepares the collection against a specified expression context. Calling prepare before evaluating the collection's properties multiple times allows precalculation of expensive setup tasks such as parsing expressions. Returns true if preparation was successful. - -:rtype: bool %End virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const = 0; %Docstring Returns the set of any fields referenced by the active properties from the collection. -:param context: expression context the properties will be evaluated against. -:rtype: set of str +:param context: expression context the properties will be evaluated against. %End virtual bool isActive( int key ) const = 0; %Docstring Returns true if the collection contains an active property with the specified key. + :param key: integer key for property to test. The intended use case is that a context specific enum is cast to int and used for the key value. - -:rtype: bool %End virtual bool hasActiveProperties() const = 0; @@ -267,8 +251,6 @@ int and used for the key value. Returns true if the collection has any active properties, or false if all properties within the collection are deactivated. -:rtype: bool - .. seealso:: :py:func:`hasDynamicProperties()` %End @@ -277,30 +259,26 @@ within the collection are deactivated. Returns true if the collection has any active, non-static properties, or false if either all non-static properties within the collection are deactivated or if the collection only contains static properties. -:rtype: bool - .. seealso:: :py:func:`hasActiveProperties()` %End virtual bool writeXml( QDomElement &collectionElem, const QgsPropertiesDefinition &definitions ) const; %Docstring Writes the current state of the property collection into an XML element + :param collectionElem: destination element for the property collection's state :param definitions: property definitions -:rtype: bool - .. seealso:: :py:func:`readXml()` %End virtual bool readXml( const QDomElement &collectionElem, const QgsPropertiesDefinition &definitions ); %Docstring Reads property collection state from an XML element. + :param collectionElem: source DOM element for property collection's state :param definitions: property definitions -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End @@ -309,8 +287,6 @@ Reads property collection state from an XML element. Saves this property collection to a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to save it to an XML document. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -319,8 +295,6 @@ You can use QgsXmlUtils.writeVariant to save it to an XML document. Loads this property collection from a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.readVariant to save it to an XML document. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End @@ -347,6 +321,7 @@ a context specific enum is cast to int and used for the key value. QgsPropertyCollection( const QString &name = QString() ); %Docstring Constructor for QgsPropertyCollection + :param name: collection name %End @@ -359,8 +334,6 @@ Copy constructor. int count() const; %Docstring Returns the number of properties contained within the collection. - -:rtype: int %End virtual QSet propertyKeys() const; @@ -373,12 +346,11 @@ Returns the number of properties contained within the collection. virtual QgsProperty &property( int key ); %Docstring Returns a reference to a matching property from the collection, if one exists. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :return: matching property, or null if no matching, active property found. -:rtype: QgsProperty - .. seealso:: :py:func:`hasProperty()` %End @@ -404,6 +376,7 @@ int and used for the key value. void setProperty( int key, const QgsProperty &property ); %Docstring Adds a property to the collection and takes ownership of it. + :param key: integer key for property. Any existing property with the same key will be removed and replaced by this property. The intended use case is that a context specific enum is cast to int and used for the key value. @@ -414,6 +387,7 @@ will remove the property from the collection. void setProperty( int key, const QVariant &value ); %Docstring Convience method, creates a QgsStaticProperty and stores it within the collection. + :param key: integer key for property. Any existing property with the same key will be deleted and replaced by this property. The intended use case is that a context specific enum is cast to int and used for the key value. @@ -454,8 +428,6 @@ Copy constructor int count() const; %Docstring Returns the number of collections contained within the stack. - -:rtype: int %End virtual void clear(); @@ -468,28 +440,27 @@ Removes all collections from the stack. %Docstring Appends a collection to the end of the stack, and transfers ownership of the collection to the stack. Properties 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. %End QgsPropertyCollection *at( int index ); %Docstring Returns the collection at the corresponding index from the stack. + :param index: position of collection, 0 based :return: collection if one exists at the specified index -:rtype: QgsPropertyCollection - %End QgsPropertyCollection *collection( const QString &name ); %Docstring Returns the first collection with a matching name from the stack. + :param name: name of collection to find :return: collection if one exists with the specified name -:rtype: QgsPropertyCollection - %End virtual bool hasActiveProperties() const; @@ -498,8 +469,6 @@ Returns the first collection with a matching name from the stack. Returns true if the collection has any active properties, or false if all properties within the collection are deactivated. -:rtype: bool - .. seealso:: :py:func:`isActive()` .. seealso:: :py:func:`hasDynamicProperties()` @@ -511,8 +480,6 @@ within the collection are deactivated. Returns true if the collection has any active, non-static properties, or false if either all non-static properties within the collection are deactivated or if the collection only contains static properties. -:rtype: bool - .. seealso:: :py:func:`hasActiveProperties()` %End @@ -520,11 +487,10 @@ within the collection are deactivated or if the collection only contains static %Docstring Returns true if the stack contains an active property with the specified key. + :param key: integer key for property to test. The intended use case is that a context specific enum is cast to int and used for the key value. -:rtype: bool - .. seealso:: :py:func:`hasActiveProperties()` %End @@ -532,12 +498,11 @@ int and used for the key value. %Docstring Returns the highest priority property with a matching key from within the stack. + :param key: integer key for property to return. The intended use case is that a context specific enum is cast to int and used for the key value. :return: matching property, or null if no matching, active property found. -:rtype: QgsProperty - .. seealso:: :py:func:`hasActiveProperty()` %End @@ -546,6 +511,7 @@ int and used for the key value. %Docstring Returns the calculated value of the highest priority property with the specified key from within the stack. + :param key: integer key for property to calculate. The intended use case is that a context specific enum is cast to int and used for the key value. :param context: expression context to evaluate property against @@ -553,17 +519,14 @@ int and used for the key value. cannot be calculated :return: calculated property value, or default value if property could not be evaluated -:rtype: QVariant - %End virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const; %Docstring Returns the set of any fields referenced by the active properties from the stack. -:param context: expression context the properties will be evaluated against. -:rtype: set of str +:param context: expression context the properties will be evaluated against. %End virtual bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const; diff --git a/python/core/qgspropertytransformer.sip b/python/core/qgspropertytransformer.sip index 4658d01ee8a4..0cd477cf60cf 100644 --- a/python/core/qgspropertytransformer.sip +++ b/python/core/qgspropertytransformer.sip @@ -61,8 +61,6 @@ Copy constructor %Docstring Returns a list of the control points for the transform. -:rtype: list of QgsPointXY - .. seealso:: :py:func:`setControlPoints()` %End @@ -93,8 +91,6 @@ matching control point does not exist. double y( double x ) const; %Docstring Returns the mapped y value corresponding to the specified ``x`` value. - -:rtype: float %End QVector< double > y( const QVector< double > &x ) const; @@ -102,29 +98,25 @@ Returns the mapped y value corresponding to the specified ``x`` value. Returns a list of y values corresponding to a list of ``x`` values. Calling this method is faster then calling the double variant multiple times. - -:rtype: list of float %End bool readXml( const QDomElement &elem, const QDomDocument &doc ); %Docstring Reads the curve's state from an XML element. + :param elem: source DOM element for transform's state :param doc: DOM document -:rtype: bool - .. seealso:: :py:func:`writeXml()` %End bool writeXml( QDomElement &transformElem, QDomDocument &doc ) const; %Docstring Writes the current state of the transform into an XML element + :param transformElem: destination element for the transform's state :param doc: DOM document -:rtype: bool - .. seealso:: :py:func:`readXml()` %End @@ -133,8 +125,6 @@ Writes the current state of the transform into an XML element Saves this curve transformer to a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to save it to an XML document. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -143,8 +133,6 @@ You can use QgsXmlUtils.writeVariant to save it to an XML document. Load this curve transformer from a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to load it from an XML document. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End @@ -185,14 +173,14 @@ Possible uses include transformers which map a value into a scaled size or color static QgsPropertyTransformer *create( Type type ) /Factory/; %Docstring Factory method for creating a new property transformer of the specified type. -:param type: transformer type to create -:rtype: QgsPropertyTransformer +:param type: transformer type to create %End QgsPropertyTransformer( double minValue = 0.0, double maxValue = 1.0 ); %Docstring Constructor for QgsPropertyTransformer + :param minValue: minimum expected value from source property :param maxValue: maximum expected value from source property %End @@ -207,15 +195,11 @@ Copy constructor. virtual Type transformerType() const = 0; %Docstring Returns the transformer type. - -:rtype: Type %End virtual QgsPropertyTransformer *clone() const = 0 /Factory/; %Docstring Returns a clone of the transformer. - -:rtype: QgsPropertyTransformer %End virtual bool loadVariant( const QVariant &transformer ); @@ -223,8 +207,6 @@ Returns a clone of the transformer. Loads this transformer from a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.readVariant to read it from an XML document. -:rtype: bool - .. seealso:: :py:func:`toVariant()` %End @@ -233,8 +215,6 @@ You can use QgsXmlUtils.readVariant to read it from an XML document. Saves this transformer to a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to save it to an XML document. -:rtype: QVariant - .. seealso:: :py:func:`loadVariant()` %End @@ -242,8 +222,6 @@ You can use QgsXmlUtils.writeVariant to save it to an XML document. %Docstring Returns the minimum value expected by the transformer. -:rtype: float - .. seealso:: :py:func:`maxValue()` .. seealso:: :py:func:`setMinValue()` @@ -252,6 +230,7 @@ Returns the minimum value expected by the transformer. void setMinValue( double min ); %Docstring Sets the minimum value expected by the transformer. + :param min: minimum value .. seealso:: :py:func:`setMaxValue()` @@ -263,8 +242,6 @@ Sets the minimum value expected by the transformer. %Docstring Returns the maximum value expected by the transformer. -:rtype: float - .. seealso:: :py:func:`minValue()` .. seealso:: :py:func:`setMaxValue()` @@ -273,6 +250,7 @@ Returns the maximum value expected by the transformer. void setMaxValue( double max ); %Docstring Sets the maximum value expected by the transformer. + :param max: maximum value .. seealso:: :py:func:`setMinValue()` @@ -285,8 +263,6 @@ Sets the maximum value expected by the transformer. Returns the curve transform applied to input values before they are transformed by the individual transform subclasses. -:rtype: QgsCurveTransform - .. seealso:: :py:func:`setCurveTransform()` %End @@ -303,23 +279,21 @@ to the property transformer. %Docstring Calculates the transform of a value. Derived classes must implement this to perform their transformations on input values + :param context: expression context :param value: input value to transform - -:rtype: QVariant %End virtual QString toExpression( const QString &baseExpression ) const = 0; %Docstring Converts the transformer to a QGIS expression string. The ``baseExpression`` string consists of a sub-expression reflecting the parent property's state. - -:rtype: str %End static QgsPropertyTransformer *fromExpression( const QString &expression, QString &baseExpression /Out/, QString &fieldName /Out/ ) /Factory/; %Docstring Attempts to parse an expression into a corresponding property transformer. + :param expression: expression to parse :param baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an @@ -329,8 +303,6 @@ to the property transformer. This will be set to an empty string if an expression is the transformer input. :return: corresponding property transformer, or None if expression could not -:rtype: QgsPropertyTransformer - be parsed to a transformer. %End @@ -341,8 +313,6 @@ be parsed to a transformer. Applies base class numeric transformations. Derived classes should call this to transform an ``input`` numeric value before they apply any transform to the result. This applies any curve transforms which may exist on the transformer. - -:rtype: float %End }; @@ -368,6 +338,7 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer double exponent = 1.0 ); %Docstring Constructor for QgsGenericNumericTransformer. + :param minValue: minimum expected input value :param maxValue: maximum expected input value :param minOutput: minimum value to return @@ -391,6 +362,7 @@ Constructor for QgsGenericNumericTransformer. static QgsGenericNumericTransformer *fromExpression( const QString &expression, QString &baseExpression /Out/, QString &fieldName /Out/ ) /Factory/; %Docstring Attempts to parse an expression into a corresponding QgsSizeScaleTransformer. + :param expression: expression to parse :param baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an @@ -400,8 +372,6 @@ to the property transformer. This will be set to an empty string if an expression is the transformer input. :return: corresponding QgsSizeScaleTransformer, or None if expression could not -:rtype: QgsGenericNumericTransformer - be parsed to a size scale transformer. %End @@ -410,16 +380,12 @@ be parsed to a size scale transformer. Calculates the size corresponding to a specific ``input`` value. :return: calculated size using size scale transformer's parameters and type -:rtype: float - %End double minOutputValue() const; %Docstring Returns the minimum calculated size. -:rtype: float - .. seealso:: :py:func:`setMinSize()` .. seealso:: :py:func:`maxSize()` @@ -428,6 +394,7 @@ Returns the minimum calculated size. void setMinOutputValue( double size ); %Docstring Sets the minimum calculated size. + :param size: minimum size .. seealso:: :py:func:`minSize()` @@ -439,14 +406,13 @@ Sets the minimum calculated size. %Docstring Returns the maximum calculated size. -:rtype: float - .. seealso:: :py:func:`minSize()` %End void setMaxOutputValue( double size ); %Docstring Sets the maximum calculated size. + :param size: maximum size .. seealso:: :py:func:`maxSize()` @@ -458,14 +424,13 @@ Sets the maximum calculated size. %Docstring Returns the size value when an expression evaluates to NULL. -:rtype: float - .. seealso:: :py:func:`setNullSize()` %End void setNullOutputValue( double size ); %Docstring Sets the size value for when an expression evaluates to NULL. + :param size: null size .. seealso:: :py:func:`nullSize()` @@ -475,8 +440,6 @@ Sets the size value for when an expression evaluates to NULL. %Docstring Returns the exponent for an exponential expression. -:rtype: float - .. seealso:: :py:func:`setExponent()` .. seealso:: :py:func:`type()` @@ -485,6 +448,7 @@ Returns the exponent for an exponential expression. void setExponent( double exponent ); %Docstring Sets the exponent for an exponential expression. + :param exponent: exponent .. seealso:: :py:func:`exponent()` @@ -524,6 +488,7 @@ scaling methods. double exponent = 1.0 ); %Docstring Constructor for QgsSizeScaleTransformer. + :param type: scaling type :param minValue: minimum expected value :param maxValue: maximum expected value @@ -548,6 +513,7 @@ Constructor for QgsSizeScaleTransformer. static QgsSizeScaleTransformer *fromExpression( const QString &expression, QString &baseExpression /Out/, QString &fieldName /Out/ ) /Factory/; %Docstring Attempts to parse an expression into a corresponding QgsSizeScaleTransformer. + :param expression: expression to parse :param baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an @@ -557,27 +523,22 @@ to the property transformer. This will be set to an empty string if an expression is the transformer input. :return: corresponding QgsSizeScaleTransformer, or None if expression could not -:rtype: QgsSizeScaleTransformer - be parsed to a size scale transformer. %End double size( double value ) const; %Docstring Calculates the size corresponding to a specific value. + :param value: value to calculate size for :return: calculated size using size scale transformer's parameters and type -:rtype: float - %End double minSize() const; %Docstring Returns the minimum calculated size. -:rtype: float - .. seealso:: :py:func:`setMinSize()` .. seealso:: :py:func:`maxSize()` @@ -586,6 +547,7 @@ Returns the minimum calculated size. void setMinSize( double size ); %Docstring Sets the minimum calculated size. + :param size: minimum size .. seealso:: :py:func:`minSize()` @@ -597,14 +559,13 @@ Sets the minimum calculated size. %Docstring Returns the maximum calculated size. -:rtype: float - .. seealso:: :py:func:`minSize()` %End void setMaxSize( double size ); %Docstring Sets the maximum calculated size. + :param size: maximum size .. seealso:: :py:func:`maxSize()` @@ -616,14 +577,13 @@ Sets the maximum calculated size. %Docstring Returns the size value when an expression evaluates to NULL. -:rtype: float - .. seealso:: :py:func:`setNullSize()` %End void setNullSize( double size ); %Docstring Sets the size value for when an expression evaluates to NULL. + :param size: null size .. seealso:: :py:func:`nullSize()` @@ -633,8 +593,6 @@ Sets the size value for when an expression evaluates to NULL. %Docstring Returns the exponent for an exponential expression. -:rtype: float - .. seealso:: :py:func:`setExponent()` .. seealso:: :py:func:`type()` @@ -643,6 +601,7 @@ Returns the exponent for an exponential expression. void setExponent( double exponent ); %Docstring Sets the exponent for an exponential expression. + :param exponent: exponent .. seealso:: :py:func:`exponent()` @@ -653,8 +612,6 @@ Sets the exponent for an exponential expression. Returns the size transformer's scaling type (the method used to calculate the size from a value). -:rtype: ScaleType - .. seealso:: :py:func:`setType()` %End @@ -662,6 +619,7 @@ the size from a value). %Docstring Sets the size transformer's scaling type (the method used to calculate the size from a value). + :param type: scale type .. seealso:: :py:func:`type()` @@ -690,6 +648,7 @@ color ramp. const QColor &nullColor = QColor( 0, 0, 0, 0 ) ); %Docstring Constructor for QgsColorRampTransformer. + :param minValue: minimum expected value :param maxValue: maximum expected value :param ramp: source color ramp. Ownership is transferred to the transformer. @@ -717,11 +676,10 @@ Copy constructor QColor color( double value ) const; %Docstring Calculates the color corresponding to a specific value. + :param value: value to calculate color for :return: calculated color using transformer's parameters and type -:rtype: QColor - %End QgsColorRamp *colorRamp() const; @@ -729,8 +687,6 @@ Calculates the color corresponding to a specific value. Returns the color ramp used for calculating property colors. :return: color ramp -:rtype: QgsColorRamp - .. seealso:: :py:func:`setColorRamp()` %End @@ -738,6 +694,7 @@ Returns the color ramp used for calculating property colors. void setColorRamp( QgsColorRamp *ramp /Transfer/ ); %Docstring Sets the color ramp to use for calculating property colors. + :param ramp: color ramp, ownership of ramp is transferred to the transformer. .. seealso:: :py:func:`colorRamp()` @@ -747,14 +704,13 @@ Sets the color ramp to use for calculating property colors. %Docstring Returns the color corresponding to a null value. -:rtype: QColor - .. seealso:: :py:func:`setNullColor()` %End void setNullColor( const QColor &color ); %Docstring Sets the color corresponding to a null value. + :param color: null color .. seealso:: :py:func:`nullSize()` @@ -764,8 +720,6 @@ Sets the color corresponding to a null value. %Docstring Returns the color ramp's name. -:rtype: str - .. seealso:: :py:func:`setRampName()` %End diff --git a/python/core/qgsprovidermetadata.sip b/python/core/qgsprovidermetadata.sip index e9aef2d9f7fd..0e75ecf47123 100644 --- a/python/core/qgsprovidermetadata.sip +++ b/python/core/qgsprovidermetadata.sip @@ -43,8 +43,6 @@ library object. This returns the unique key associated with the provider This key string is used for the associative container in QgsProviderRegistry - -:rtype: str %End QString description() const; @@ -52,8 +50,6 @@ This key string is used for the associative container in QgsProviderRegistry This returns descriptive text for the provider This is used to provide a descriptive list of available data providers. - -:rtype: str %End QString library() const; @@ -61,8 +57,6 @@ This is used to provide a descriptive list of available data providers. This returns the library file name This is used to QLibrary calls to load the data provider. - -:rtype: str %End diff --git a/python/core/qgsproviderregistry.sip b/python/core/qgsproviderregistry.sip index 1990b28a4161..112f38f1743f 100644 --- a/python/core/qgsproviderregistry.sip +++ b/python/core/qgsproviderregistry.sip @@ -45,8 +45,6 @@ ogr and postgres. static QgsProviderRegistry *instance( const QString &pluginPath = QString() ); %Docstring Means of accessing canonical single instance - -:rtype: QgsProviderRegistry %End virtual ~QgsProviderRegistry(); @@ -57,22 +55,16 @@ Return path for the library of the provider. If the provider uses direct provider function pointers instead of a library an empty string will be returned. - -:rtype: str %End QString pluginList( bool asHtml = false ) const; %Docstring Return list of provider plugins found - -:rtype: str %End QDir libraryDirectory() const; %Docstring Returns the library directory where plugins are found. - -:rtype: QDir %End void setLibraryDirectory( const QDir &path ); @@ -84,20 +76,18 @@ Set library directory where to search for plugins const QString &dataSource ) /Factory/; %Docstring Creates a new instance of a provider. + :param providerKey: identificator of the provider :param dataSource: string containing data source for the provider :return: new instance of provider or NULL on error -:rtype: QgsDataProvider - %End int providerCapabilities( const QString &providerKey ) const; %Docstring Return the provider capabilities -:param providerKey: identificator of the provider -:rtype: int +:param providerKey: identificator of the provider .. versionadded:: 2.6 %End @@ -110,20 +100,17 @@ Return the provider capabilities Returns a new widget for selecting layers from a provider. Either the ``parent`` widget must be set or the caller becomes responsible for deleting the returned widget. - -:rtype: QWidget %End QFunctionPointer function( const QString &providerKey, const QString &functionName ); %Docstring Get pointer to provider function + :param providerKey: identificator of the provider :param functionName: name of function :return: pointer to function or NULL on error. If the provider uses direct provider -:rtype: QFunctionPointer - function pointers instead of a library None will be returned. %End @@ -134,22 +121,16 @@ object is transferred to the caller and the caller is responsible for deleting i If the provider uses direct provider function pointers instead of a library None will be returned. - -:rtype: QLibrary %End QStringList providerList() const; %Docstring Return list of available providers by their keys - -:rtype: list of str %End const QgsProviderMetadata *providerMetadata( const QString &providerKey ) const; %Docstring Return metadata of the provider or NULL if not found - -:rtype: QgsProviderMetadata %End virtual QString fileVectorFilters() const; @@ -165,8 +146,6 @@ fileVectorFilters to a string, which is then returned. \note It'd be nice to eventually be raster/vector neutral. - -:rtype: str %End virtual QString fileRasterFilters() const; @@ -179,8 +158,6 @@ supported by all data providers. This walks through all data providers appending calls to their buildSupportedRasterFileFilter to a string, which is then returned. -:rtype: str - .. note:: This replaces QgsRasterLayer.buildSupportedRasterFileFilter() @@ -188,20 +165,14 @@ buildSupportedRasterFileFilter to a string, which is then returned. virtual QString databaseDrivers() const; %Docstring Return a string containing the available database drivers - -:rtype: str %End virtual QString directoryDrivers() const; %Docstring Return a string containing the available directory drivers - -:rtype: str %End virtual QString protocolDrivers() const; %Docstring Return a string containing the available protocol drivers - -:rtype: str %End void registerGuis( QWidget *widget ); diff --git a/python/core/qgspythonrunner.sip b/python/core/qgspythonrunner.sip index fef5f8d4b158..a2b5e5d1a6d8 100644 --- a/python/core/qgspythonrunner.sip +++ b/python/core/qgspythonrunner.sip @@ -29,22 +29,16 @@ Added in QGIS v? %Docstring Returns true if the runner has an instance (and thus is able to run commands) * - -:rtype: bool %End static bool run( const QString &command, const QString &messageOnError = QString() ); %Docstring Execute a Python statement - -:rtype: bool %End static bool eval( const QString &command, QString &result /Out/ ); %Docstring Eval a Python statement - -:rtype: bool %End static void setInstance( QgsPythonRunner *runner /Transfer/ ); @@ -62,16 +56,8 @@ Protected constructor: can be instantiated only from children virtual ~QgsPythonRunner(); virtual bool runCommand( QString command, QString messageOnError = QString() ) = 0; -%Docstring - -:rtype: bool -%End virtual bool evalCommand( QString command, QString &result ) = 0; -%Docstring - -:rtype: bool -%End }; diff --git a/python/core/qgsrange.sip b/python/core/qgsrange.sip index 35a8a0520bf2..adf645559960 100644 --- a/python/core/qgsrange.sip +++ b/python/core/qgsrange.sip @@ -48,8 +48,6 @@ and optionally whether or not these bounds are included in the range. %Docstring Returns the lower bound of the range. -:rtype: T - .. seealso:: :py:func:`upper()` .. seealso:: :py:func:`includeLower()` @@ -59,8 +57,6 @@ Returns the lower bound of the range. %Docstring Returns the upper bound of the range. -:rtype: T - .. seealso:: :py:func:`lower()` .. seealso:: :py:func:`includeUpper()` @@ -71,8 +67,6 @@ Returns the upper bound of the range. Returns true if the lower bound is inclusive, or false if the lower bound is exclusive. -:rtype: bool - .. seealso:: :py:func:`lower()` .. seealso:: :py:func:`includeUpper()` @@ -83,8 +77,6 @@ bound is exclusive. Returns true if the upper bound is inclusive, or false if the upper bound is exclusive. -:rtype: bool - .. seealso:: :py:func:`upper()` .. seealso:: :py:func:`includeLower()` @@ -95,8 +87,6 @@ bound is exclusive. Returns true if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either the bounds are exclusive. -:rtype: bool - .. seealso:: :py:func:`isSingleton()` %End @@ -104,8 +94,6 @@ and either the bounds are exclusive. %Docstring Returns true if the range consists only of a single value or instant. -:rtype: bool - .. seealso:: :py:func:`isEmpty()` %End @@ -113,24 +101,18 @@ Returns true if the range consists only of a single value or instant. %Docstring Returns true if this range contains another range. -:rtype: bool - .. seealso:: :py:func:`overlaps()` %End bool contains( T element ) const; %Docstring Returns true if this range contains a specified ``element``. - -:rtype: bool %End bool overlaps( const QgsRange &other ) const; %Docstring Returns true if this range overlaps another range. -:rtype: bool - .. seealso:: :py:func:`contains()` %End @@ -188,8 +170,6 @@ and optionally whether or not these bounds are included in the range. %Docstring Returns the beginning of the range. -:rtype: T - .. seealso:: :py:func:`end()` .. seealso:: :py:func:`includeBeginning()` @@ -199,8 +179,6 @@ Returns the beginning of the range. %Docstring Returns the upper bound of the range. -:rtype: T - .. seealso:: :py:func:`begin()` .. seealso:: :py:func:`includeEnd()` @@ -211,8 +189,6 @@ Returns the upper bound of the range. Returns true if the beginning is inclusive, or false if the beginning is exclusive. -:rtype: bool - .. seealso:: :py:func:`begin()` .. seealso:: :py:func:`includeEnd()` @@ -222,8 +198,6 @@ is exclusive. %Docstring Returns true if the end is inclusive, or false if the end is exclusive. -:rtype: bool - .. seealso:: :py:func:`end()` .. seealso:: :py:func:`includeBeginning()` @@ -233,8 +207,6 @@ Returns true if the end is inclusive, or false if the end is exclusive. %Docstring Returns true if the range consists only of a single instant. -:rtype: bool - .. seealso:: :py:func:`isEmpty()` .. seealso:: :py:func:`isInfinite()` @@ -244,8 +216,6 @@ Returns true if the range consists only of a single instant. %Docstring Returns true if the range consists of all possible values. -:rtype: bool - .. seealso:: :py:func:`isEmpty()` .. seealso:: :py:func:`isInstant()` @@ -256,29 +226,21 @@ Returns true if the range consists of all possible values. Returns true if the range is empty, ie the beginning equals (or exceeds) the end and either of the bounds are exclusive. A range with both invalid beginning and end is considered infinite and not empty. - -:rtype: bool %End bool contains( const QgsTemporalRange &other ) const; %Docstring Returns true if this range contains another range. - -:rtype: bool %End bool contains( const T &element ) const; %Docstring Returns true if this range contains a specified ``element``. - -:rtype: bool %End bool overlaps( const QgsTemporalRange &other ) const; %Docstring Returns true if this range overlaps another range. - -:rtype: bool %End }; diff --git a/python/core/qgsreadwritecontext.sip b/python/core/qgsreadwritecontext.sip index 32d7a5ab66b4..a92aed4bce26 100644 --- a/python/core/qgsreadwritecontext.sip +++ b/python/core/qgsreadwritecontext.sip @@ -30,8 +30,6 @@ Constructor for QgsReadWriteContext. const QgsPathResolver &pathResolver() const; %Docstring Returns path resolver for conversion between relative and absolute paths - -:rtype: QgsPathResolver %End void setPathResolver( const QgsPathResolver &resolver ); diff --git a/python/core/qgsrelation.sip b/python/core/qgsrelation.sip index 120e17c0bc9e..175e60ff1436 100644 --- a/python/core/qgsrelation.sip +++ b/python/core/qgsrelation.sip @@ -39,8 +39,6 @@ Creates a relation from an XML structure. Used for reading .qgs projects. :param node: The dom node containing the relation information :return: A relation -:rtype: QgsRelation - %End void writeXml( QDomNode &node, QDomDocument &doc ) const; @@ -97,8 +95,6 @@ which have a foreign key pointing to the provided feature. :param feature: A feature from the referenced (parent) layer :return: An iterator with all the referenced features -:rtype: QgsFeatureIterator - .. seealso:: :py:func:`getRelatedFeaturesRequest()` @@ -113,8 +109,6 @@ which have a foreign key pointing to the provided feature. :param feature: A feature from the referenced (parent) layer :return: A request for all the referencing features -:rtype: QgsFeatureRequest - .. seealso:: :py:func:`getRelatedFeatures()` @@ -125,11 +119,10 @@ which have a foreign key pointing to the provided feature. %Docstring Returns a filter expression which returns all the features on the referencing (child) layer which have a foreign key pointing to the provided feature. + :param feature: A feature from the referenced (parent) layer :return: expression filter string for all the referencing features -:rtype: str - .. versionadded:: 2.16 @@ -146,8 +139,6 @@ which is referenced by the provided feature. :param attributes: An attribute vector containing the foreign key :return: A request the referenced feature -:rtype: QgsFeatureRequest - .. note:: @@ -162,8 +153,6 @@ which is referenced by the provided feature. :param feature: A feature from the referencing (child) layer :return: A request the referenced feature -:rtype: QgsFeatureRequest - %End QgsFeature getReferencedFeature( const QgsFeature &feature ) const; @@ -174,16 +163,12 @@ which is referenced by the provided feature. :param feature: A feature from the referencing (child) layer :return: A request the referenced feature -:rtype: QgsFeature - %End QString name() const; %Docstring Returns a human readable name for this relation. Mostly used as title for the children. -:rtype: str - .. seealso:: :py:func:`id()` :return: A name @@ -194,8 +179,6 @@ Returns a human readable name for this relation. Mostly used as title for the ch Returns the relation strength as a string :return: strength -:rtype: RelationStrength - .. versionadded:: 3.0 %End @@ -205,8 +188,6 @@ Returns the relation strength as a string A (project-wide) unique id for this relation :return: The id -:rtype: str - %End void generateId(); @@ -222,8 +203,6 @@ Access the referencing (child) layer's id This is the layer which has the field(s) which point to another layer :return: The id of the referencing layer -:rtype: str - %End QgsVectorLayer *referencingLayer() const; @@ -232,8 +211,6 @@ Access the referencing (child) layer This is the layer which has the field(s) which point to another layer :return: The referencing layer -:rtype: QgsVectorLayer - %End QString referencedLayerId() const; @@ -241,8 +218,6 @@ This is the layer which has the field(s) which point to another layer Access the referenced (parent) layer's id :return: The id of the referenced layer -:rtype: str - %End QgsVectorLayer *referencedLayer() const; @@ -250,8 +225,6 @@ Access the referenced (parent) layer's id Access the referenced (parent) layer :return: referenced layer -:rtype: QgsVectorLayer - %End QMap< QString, QString > fieldPairs() const; @@ -261,8 +234,6 @@ The first element of each pair are the field names of the foreign key. The second element of each pair are the field names of the matching primary key. :return: The fields forming the relation -:rtype: QMap< str, QString > - %End %MethodCode const QList< QgsRelation::FieldPair > &pairs = sipCpp->fieldPairs(); @@ -279,8 +250,6 @@ Returns a list of attributes used to form the referenced fields (most likely primary key) on the referenced (parent) layer. :return: A list of attributes -:rtype: QgsAttributeList - %End QgsAttributeList referencingFields() const; @@ -289,8 +258,6 @@ Returns a list of attributes used to form the referencing fields (foreign key) on the referencing (child) layer. :return: A list of attributes -:rtype: QgsAttributeList - %End bool isValid() const; @@ -298,8 +265,6 @@ Returns a list of attributes used to form the referencing fields Returns the validity of this relation. Don't use the information if it's not valid. :return: true if the relation is valid -:rtype: bool - %End bool hasEqualDefinition( const QgsRelation &other ) const; @@ -309,8 +274,6 @@ Compares the two QgsRelation, ignoring the name and the ID. :param other: The other relation :return: true if they are similar -:rtype: bool - .. versionadded:: 3.0 %End @@ -319,8 +282,6 @@ Compares the two QgsRelation, ignoring the name and the ID. %Docstring Get the referenced field counterpart given a referencing field. -:rtype: str - .. versionadded:: 3.0 %End @@ -328,8 +289,6 @@ Get the referenced field counterpart given a referencing field. %Docstring Get the referencing field counterpart given a referenced field. -:rtype: str - .. versionadded:: 3.0 %End diff --git a/python/core/qgsrelationmanager.sip b/python/core/qgsrelationmanager.sip index 7e640c07abe1..b1df9dffa438 100644 --- a/python/core/qgsrelationmanager.sip +++ b/python/core/qgsrelationmanager.sip @@ -24,6 +24,7 @@ This class manages a set of relations between layers. explicit QgsRelationManager( QgsProject *project = 0 ); %Docstring Constructor for QgsRelationManager. + :param project: associated project (used to notify project of changes) %End @@ -39,8 +40,6 @@ Will set the specified relations and remove any relation currently set. Get access to the relations managed by this class. :return: A QMap where the key is the relation id, the value the relation object. -:rtype: QMap - %End void addRelation( const QgsRelation &relation ); @@ -71,8 +70,6 @@ Get access to a relation by its id. :param id: The id to search for :return: A relation. Invalid if not found. -:rtype: QgsRelation - .. seealso:: :py:func:`relationsByName()` %End @@ -80,11 +77,10 @@ Get access to a relation by its id. QList relationsByName( const QString &name ) const; %Docstring Returns a list of relations with matching names. + :param name: relation name to search for. Searching is case insensitive. :return: a list of matching relations -:rtype: list of QgsRelation - .. versionadded:: 2.16 @@ -104,8 +100,6 @@ Get all relations where the specified layer (and field) is the referencing part :param fieldIdx: The field which should be part of the foreign key. If not set will return all relations. :return: A list of relations matching the given layer and fieldIdx. -:rtype: list of QgsRelation - %End QList referencedRelations( QgsVectorLayer *layer = 0 ) const; @@ -115,8 +109,6 @@ Get all relations where this layer is the referenced part (i.e. the parent table :param layer: The layer which should be searched for. :return: A list of relations where the specified layer is the referenced part. -:rtype: list of QgsRelation - %End static QList discoverRelations( const QList &existingRelations, const QList &layers ); @@ -127,8 +119,6 @@ Discover all the relations available from the current layers. :param layers: the current layers :return: the list of discovered relations -:rtype: list of QgsRelation - .. versionadded:: 3.0 %End diff --git a/python/core/qgsrenderchecker.sip b/python/core/qgsrenderchecker.sip index 0834b22e6d93..ace030fc30f2 100644 --- a/python/core/qgsrenderchecker.sip +++ b/python/core/qgsrenderchecker.sip @@ -29,29 +29,13 @@ Constructor for QgsRenderChecker. %End QString controlImagePath() const; -%Docstring - -:rtype: str -%End QString report(); -%Docstring - -:rtype: str -%End float matchPercent(); -%Docstring - -:rtype: float -%End unsigned int mismatchCount(); unsigned int matchTarget(); int elapsedTime(); -%Docstring - -:rtype: int -%End void setElapsedTimeTarget( int target ); void setControlName( const QString &name ); @@ -72,8 +56,6 @@ This will be appended to controlImagePath QString imageToHash( const QString &imageFile ); %Docstring Get an md5 hash that uniquely identifies an image - -:rtype: str %End void setRenderedImage( const QString &imageFileName ); @@ -84,8 +66,6 @@ The path of the rendered image can be retrieved through that method. Will return the path set with setRenderedImage() or generated in runTest() :return: The path to the rendered image -:rtype: str - %End void setMapSettings( const QgsMapSettings &mapSettings ); @@ -98,6 +78,7 @@ Will return the path set with setRenderedImage() or generated in runTest() %Docstring Set tolerance for color components used by runTest() and compareImages(). Default value is 0. + :param colorTolerance: is maximum difference for each color component including alpha to be considered correct. @@ -107,6 +88,7 @@ including alpha to be considered correct. void setSizeTolerance( int xTolerance, int yTolerance ); %Docstring Sets the largest allowable difference in size between the rendered and the expected image. + :param xTolerance: x tolerance in pixels :param yTolerance: y tolerance in pixels @@ -116,6 +98,7 @@ Sets the largest allowable difference in size between the rendered and the expec bool runTest( const QString &testName, unsigned int mismatchCount = 0 ); %Docstring Test using renderer to generate the image to be compared. + :param testName: - to be used as the basis for writing a file to e.g. /tmp/theTestName.png :param mismatchCount: - defaults to 0 - the number of pixels that @@ -123,8 +106,6 @@ are allowed to be different from the control image. In some cases rendering may be non-deterministic. This parameter allows you to account for that by providing a tolerance. -:rtype: bool - .. note:: make sure to call setExpectedImage and setMapRenderer first @@ -133,6 +114,7 @@ for that by providing a tolerance. bool compareImages( const QString &testName, unsigned int mismatchCount = 0, const QString &renderedImageFile = QString() ); %Docstring Test using two arbitrary images (map renderer will not be used) + :param testName: - to be used as the basis for writing a file to e.g. /tmp/theTestName.png :param mismatchCount: - defaults to 0 - the number of pixels that @@ -141,8 +123,6 @@ rendering may be non-deterministic. This parameter allows you to account for that by providing a tolerance. :param renderedImageFile: to optionally override the output filename \note: make sure to call setExpectedImage and setRenderedImage first. - -:rtype: bool %End bool isKnownAnomaly( const QString &diffImageFile ); @@ -154,8 +134,6 @@ diff matches one of these anomalies we will still consider it to be acceptable. :return: a bool indicating if the diff matched one of the anomaly files -:rtype: bool - %End static void drawBackground( QImage *image ); @@ -169,8 +147,6 @@ without requiring a transparent background for the image Returns the path to the expected image file :return: Path to the expected image file -:rtype: str - %End void enableDashBuffering( bool enable ); @@ -188,8 +164,6 @@ Get access to buffered dash messages. Only will return something if you call enableDashBuffering( true ); before. :return: buffered dash messages -:rtype: list of QgsDartMeasurement - .. note:: @@ -205,13 +179,12 @@ Only will return something if you call enableDashBuffering( true ); before. bool compareWkt( const QString &a, const QString &b, double tolerance = 0.000001 ); %Docstring Compare two WKT strings with some tolerance + :param a: first WKT string :param b: second WKT string :param tolerance: tolerance to use (optional, defaults to 0.000001) :return: bool indicating if the WKT are sufficiently equal -:rtype: bool - %End /************************************************************************ diff --git a/python/core/qgsrendercontext.sip b/python/core/qgsrendercontext.sip index 1c062a5c247b..7b6af88c2a03 100644 --- a/python/core/qgsrendercontext.sip +++ b/python/core/qgsrendercontext.sip @@ -64,8 +64,6 @@ Enable or disable a particular flag (other flags are not affected) %Docstring Return combination of flags used for rendering. -:rtype: Flags - .. versionadded:: 2.14 %End @@ -73,8 +71,6 @@ Return combination of flags used for rendering. %Docstring Check whether a particular flag is enabled. -:rtype: bool - .. versionadded:: 2.14 %End @@ -82,8 +78,6 @@ Check whether a particular flag is enabled. %Docstring create initialized QgsRenderContext instance from given QgsMapSettings -:rtype: QgsRenderContext - .. versionadded:: 2.4 %End @@ -93,8 +87,6 @@ Creates a default render context given a pixel based QPainter destination. If no painter is specified or the painter has no device, then a default DPI of 88 will be assumed. -:rtype: QgsRenderContext - .. versionadded:: 3.0 %End @@ -103,8 +95,6 @@ DPI of 88 will be assumed. %Docstring Returns the destination QPainter for the render operation. -:rtype: QPainter - .. seealso:: :py:func:`setPainter()` %End @@ -112,16 +102,12 @@ Returns the destination QPainter for the render operation. %Docstring Returns the current coordinate transform for the context, or an invalid transform is no coordinate transformation is required. - -:rtype: QgsCoordinateTransform %End const QgsDistanceArea &distanceArea() const; %Docstring A general purpose distance and area calculator, capable of performing ellipsoid based calculations. -:rtype: QgsDistanceArea - .. versionadded:: 3.0 %End @@ -131,8 +117,6 @@ Returns the context's coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system. -:rtype: QgsCoordinateTransformContext - .. versionadded:: 3.0 .. seealso:: :py:func:`setTransformContext()` @@ -150,16 +134,8 @@ from a source to destination coordinate reference system. %End const QgsRectangle &extent() const; -%Docstring - -:rtype: QgsRectangle -%End const QgsMapToPixel &mapToPixel() const; -%Docstring - -:rtype: QgsMapToPixel -%End double scaleFactor() const; %Docstring @@ -167,28 +143,16 @@ Returns the scaling factor for the render to convert painter units to physical sizes. This is usually equal to the number of pixels per millimeter. -:rtype: float - .. seealso:: :py:func:`setScaleFactor()` %End bool renderingStopped() const; -%Docstring - -:rtype: bool -%End bool forceVectorOutput() const; -%Docstring - -:rtype: bool -%End bool useAdvancedEffects() const; %Docstring Returns true if advanced effects such as blend modes such be used - -:rtype: bool %End void setUseAdvancedEffects( bool enabled ); @@ -197,35 +161,23 @@ Used to enable or disable advanced effects such as blend modes %End bool drawEditingInformation() const; -%Docstring - -:rtype: bool -%End double rendererScale() const; %Docstring Returns the renderer map scale. This will match the desired scale denominator for the rendered map, eg 1000.0 for a 1:1000 map render. -:rtype: float - .. seealso:: :py:func:`setRendererScale()` %End QColor selectionColor() const; -%Docstring - -:rtype: QColor -%End bool showSelection() const; %Docstring Returns true if vector selections should be shown in the rendered map :return: true if selections should be shown -:rtype: bool - .. seealso:: :py:func:`setShowSelection` @@ -287,6 +239,7 @@ of any rendering operations. void setShowSelection( const bool showSelection ); %Docstring Sets whether vector selections should be shown in the rendered map + :param showSelection: set to true if selections should be shown .. seealso:: :py:func:`showSelection` @@ -299,8 +252,6 @@ Sets whether vector selections should be shown in the rendered map bool useRenderingOptimization() const; %Docstring Returns true if the rendering optimization (geometry simplification) can be executed - -:rtype: bool %End void setUseRenderingOptimization( bool enabled ); @@ -308,8 +259,6 @@ Returns true if the rendering optimization (geometry simplification) can be exec const QgsVectorSimplifyMethod &vectorSimplifyMethod() const; %Docstring Added in QGIS v2.4 - -:rtype: QgsVectorSimplifyMethod %End void setVectorSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ); @@ -328,8 +277,6 @@ associated with this render context. Gets the expression context. This context should be used for all expression evaluation associated with this render context. -:rtype: QgsExpressionContext - .. seealso:: :py:func:`setExpressionContext()` .. versionadded:: 2.12 @@ -339,8 +286,6 @@ associated with this render context. const QgsAbstractGeometry *geometry() const; %Docstring Returns pointer to the unsegmentized geometry - -:rtype: QgsAbstractGeometry %End void setGeometry( const QgsAbstractGeometry *geometry ); %Docstring @@ -350,6 +295,7 @@ Sets pointer to original (unsegmentized) geometry void setFeatureFilterProvider( const QgsFeatureFilterProvider *ffp ); %Docstring Set a filter feature provider used for additional filtering of rendered features. + :param ffp: the filter feature provider .. versionadded:: 2.14 @@ -362,8 +308,6 @@ Set a filter feature provider used for additional filtering of rendered features Get the filter feature provider used for additional filtering of rendered features. :return: the filter feature provider -:rtype: QgsFeatureFilterProvider - .. versionadded:: 2.14 @@ -373,25 +317,23 @@ Get the filter feature provider used for additional filtering of rendered featur void setSegmentationTolerance( double tolerance ); %Docstring Sets the segmentation tolerance applied when rendering curved geometries + :param tolerance: the segmentation tolerance* %End double segmentationTolerance() const; %Docstring Gets the segmentation tolerance applied when rendering curved geometries - -:rtype: float %End void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type ); %Docstring Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) + :param type: the segmentation tolerance typename* %End QgsAbstractGeometry::SegmentationToleranceType segmentationToleranceType() const; %Docstring Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) - -:rtype: QgsAbstractGeometry.SegmentationToleranceType %End @@ -400,8 +342,6 @@ Gets segmentation tolerance type (maximum angle or maximum difference between cu Converts a size from the specified units to painter units (pixels). The conversion respects the limits specified by the optional scale parameter. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`convertToMapUnits()` @@ -412,8 +352,6 @@ specified by the optional scale parameter. Converts a size from the specified units to map units. The conversion respects the limits specified by the optional scale parameter. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`convertToPainterUnits()` @@ -423,8 +361,6 @@ specified by the optional scale parameter. %Docstring Converts a size from map units to the specified units. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`convertToMapUnits()` @@ -436,8 +372,6 @@ Convert meter distances to active MapUnit values for QgsUnitTypes.RenderMetersIn \note When the sourceCrs() is geographic, the center of the Extent will be used -:rtype: float - .. versionadded:: 3.0 %End diff --git a/python/core/qgsrulebasedlabeling.sip b/python/core/qgsrulebasedlabeling.sip index fb4d5c39e847..9268cac56234 100644 --- a/python/core/qgsrulebasedlabeling.sip +++ b/python/core/qgsrulebasedlabeling.sip @@ -52,8 +52,6 @@ takes ownership of settings QgsPalLayerSettings *settings() const; %Docstring Get the labeling settings. May return a null pointer. - -:rtype: QgsPalLayerSettings %End bool dependsOnScale() const; @@ -61,8 +59,6 @@ Get the labeling settings. May return a null pointer. Determines if scale based labeling is active :return: True if scale based labeling is active -:rtype: bool - %End double maximumScale() const; @@ -71,8 +67,6 @@ Returns the maximum map scale (i.e. most "zoomed in" scale) at which the label r The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility. -:rtype: float - .. seealso:: :py:func:`minimumScale()` .. seealso:: :py:func:`setMaximumScale()` @@ -86,8 +80,6 @@ Returns the minimum map scale (i.e. most "zoomed out" scale) at which the label The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility. -:rtype: float - .. seealso:: :py:func:`maximumScale()` .. seealso:: :py:func:`setMinimumScale()` @@ -100,8 +92,6 @@ A scale of 0 indicates no minimum scale visibility. A filter that will check if this rule applies :return: An expression -:rtype: str - %End QString description() const; @@ -109,8 +99,6 @@ A filter that will check if this rule applies A human readable description for this rule :return: Description -:rtype: str - %End bool active() const; @@ -118,8 +106,6 @@ A human readable description for this rule Returns if this rule is active :return: True if the rule is active -:rtype: bool - %End bool isElse() const; @@ -127,15 +113,11 @@ Returns if this rule is active Check if this rule is an ELSE rule :return: True if this rule is an else rule -:rtype: bool - %End QString ruleKey() const; %Docstring Unique rule identifier (for identification of rule within labeling, used as provider ID) - -:rtype: str %End void setSettings( QgsPalLayerSettings *settings /Transfer/ ); @@ -182,6 +164,7 @@ Set a human readable description for this rule void setActive( bool state ); %Docstring Sets if this rule is active + :param state: Determines if the rule should be activated or deactivated %End @@ -203,8 +186,6 @@ Override the assigned rule key (should be used just internally by rule-based lab Return all children rules of this rule :return: A list of rules -:rtype: QgsRuleBasedLabeling.RuleList - %End @@ -213,8 +194,6 @@ Return all children rules of this rule Returns all children, grand-children, grand-grand-children, grand-gra... you get it :return: A list of descendant rules -:rtype: QgsRuleBasedLabeling.RuleList - %End @@ -223,8 +202,6 @@ Returns all children, grand-children, grand-grand-children, grand-gra... you get The parent rule :return: Parent rule -:rtype: QgsRuleBasedLabeling.Rule - %End void appendChild( QgsRuleBasedLabeling::Rule *rule /Transfer/ ); @@ -245,35 +222,28 @@ delete child rule const QgsRuleBasedLabeling::Rule *findRuleByKey( const QString &key ) const; %Docstring Try to find a rule given its unique key - -:rtype: QgsRuleBasedLabeling.Rule %End QgsRuleBasedLabeling::Rule *clone() const /Factory/; %Docstring clone this rule, return new instance - -:rtype: QgsRuleBasedLabeling.Rule %End static QgsRuleBasedLabeling::Rule *create( const QDomElement &ruleElem, const QgsReadWriteContext &context ) /Factory/; %Docstring Create a rule from an XML definition + :param ruleElem: The XML rule element :param context: reading context :return: A new rule -:rtype: QgsRuleBasedLabeling.Rule - %End QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const; %Docstring store labeling info to XML element - -:rtype: QDomElement %End @@ -285,8 +255,6 @@ store labeling info to XML element %Docstring Returns true if this rule or any of its children requires advanced composition effects to render. - -:rtype: bool %End private: @@ -301,16 +269,10 @@ Constructs the labeling from given tree of rules (takes ownership) ~QgsRuleBasedLabeling(); QgsRuleBasedLabeling::Rule *rootRule(); -%Docstring - -:rtype: QgsRuleBasedLabeling.Rule -%End static QgsRuleBasedLabeling *create( const QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Create the instance from a DOM element with saved configuration - -:rtype: QgsRuleBasedLabeling %End diff --git a/python/core/qgsrunprocess.sip b/python/core/qgsrunprocess.sip index 39b0541c5f1b..b18721a53663 100644 --- a/python/core/qgsrunprocess.sip +++ b/python/core/qgsrunprocess.sip @@ -25,10 +25,6 @@ process and displays them in a dialog box. public: static QgsRunProcess *create( const QString &action, bool capture ) /Factory/; -%Docstring - -:rtype: QgsRunProcess -%End public slots: void stdoutAvailable(); diff --git a/python/core/qgsruntimeprofiler.sip b/python/core/qgsruntimeprofiler.sip index 54650df8bcc0..1d74da77393d 100644 --- a/python/core/qgsruntimeprofiler.sip +++ b/python/core/qgsruntimeprofiler.sip @@ -25,6 +25,7 @@ Constructor to create a new runtime profiler. %Docstring Begin the group for the profiler. Groups will append {GroupName}/ to the front of the profile tag set using start. + :param name: The name of the group. %End @@ -36,6 +37,7 @@ front of the profile tag set using start. void start( const QString &name ); %Docstring Start a profile event with the given name. + :param name: The name of the profile event. Will have the name of the active group appended after ending. %End @@ -56,8 +58,6 @@ the active group appended after ending. The current total time collected in the profiler. :return: The current total time collected in the profiler. -:rtype: float - %End }; diff --git a/python/core/qgsscalecalculator.sip b/python/core/qgsscalecalculator.sip index b3fd5214ba3e..927e7eff0452 100644 --- a/python/core/qgsscalecalculator.sip +++ b/python/core/qgsscalecalculator.sip @@ -26,6 +26,7 @@ and monitor dpi. QgsUnitTypes::DistanceUnit mapUnits = QgsUnitTypes::DistanceMeters ); %Docstring Constructor + :param dpi: Monitor resolution in dots per inch :param mapUnits: Units of the data on the map %End @@ -33,6 +34,7 @@ Constructor void setDpi( double dpi ); %Docstring Set the dpi to be used in scale calculations + :param dpi: Dots per inch of monitor resolution %End @@ -41,32 +43,28 @@ Set the dpi to be used in scale calculations Accessor for dpi used in scale calculations :return: int the dpi used for scale calculations. -:rtype: float - %End void setMapUnits( QgsUnitTypes::DistanceUnit mapUnits ); %Docstring Set the map units + :param mapUnits: Units of the data on the map. Must match a value from the %End QgsUnitTypes::DistanceUnit mapUnits() const; %Docstring Returns current map units - -:rtype: QgsUnitTypes.DistanceUnit %End double calculate( const QgsRectangle &mapExtent, int canvasWidth ); %Docstring Calculate the scale denominator + :param mapExtent: QgsRectangle containing the current map extent :param canvasWidth: Width of the map canvas in pixel (physical) units :return: scale denominator of current map view, e.g. 1000.0 for a 1:1000 map. -:rtype: float - %End double calculateGeographicDistance( const QgsRectangle &mapExtent ); @@ -74,9 +72,8 @@ Calculate the scale denominator Calculate the distance between two points in geographic coordinates. Used to calculate scale for map views with geographic (decimal degree) data. -:param mapExtent: QgsRectangle containing the current map extent -:rtype: float +:param mapExtent: QgsRectangle containing the current map extent %End }; diff --git a/python/core/qgsscaleutils.sip b/python/core/qgsscaleutils.sip index fd2083ca6862..887a6e520f9a 100644 --- a/python/core/qgsscaleutils.sip +++ b/python/core/qgsscaleutils.sip @@ -20,27 +20,25 @@ class QgsScaleUtils static bool saveScaleList( const QString &fileName, const QStringList &scales, QString &errorMessage ); %Docstring Save scales to the given file + :param fileName: the name of the output file :param scales: the list of scales to save :param errorMessage: it will contain the error message if something went wrong :return: true on success and false if failed -:rtype: bool - %End static bool loadScaleList( const QString &fileName, QStringList &scales, QString &errorMessage ); %Docstring Load scales from the given file + :param fileName: the name of the file to process :param scales: it will contain loaded scales :param errorMessage: it will contain the error message if something went wrong :return: true on success and false if failed -:rtype: bool - %End }; diff --git a/python/core/qgssettings.sip b/python/core/qgssettings.sip index b056056e797b..eacfd8b80b3b 100644 --- a/python/core/qgssettings.sip +++ b/python/core/qgssettings.sip @@ -144,44 +144,30 @@ Resets the group to what it was before the corresponding beginGroup() call. QStringList allKeys() const; %Docstring Returns a list of all keys, including subkeys, that can be read using the QSettings object. - -:rtype: list of str %End QStringList childKeys() const; %Docstring Returns a list of all top-level keys that can be read using the QSettings object. - -:rtype: list of str %End QStringList childGroups() const; %Docstring Returns a list of all key top-level groups that contain keys that can be read using the QSettings object. - -:rtype: list of str %End QStringList globalChildGroups() const; %Docstring Returns a list of all key top-level groups (same as childGroups) but only for groups defined in global settings. - -:rtype: list of str %End static QString globalSettingsPath(); %Docstring Return the path to the Global Settings QSettings storage file - -:rtype: str %End static bool setGlobalSettingsPath( const QString &path ); %Docstring Set the Global Settings QSettings storage file - -:rtype: bool %End int beginReadArray( const QString &prefix ); %Docstring Adds prefix to the current group and starts reading from an array. Returns the size of the array. - -:rtype: int %End void beginWriteArray( const QString &prefix, int size = -1 ); @@ -238,14 +224,10 @@ An optional Section argument can be used to get a value from a specific Section. %Docstring Returns true if there exists a setting called key; returns false otherwise. If a group is set using beginGroup(), key is taken to be relative to that group. - -:rtype: bool %End QString fileName() const; %Docstring Returns the path where settings written using this QSettings object are stored. - -:rtype: str %End void sync(); @@ -262,8 +244,6 @@ Removes the setting key and any sub-settings of key in a section. QString prefixedKey( const QString &key, const QgsSettings::Section section ) const; %Docstring Return the sanitized and prefixed key - -:rtype: str %End void clear(); %Docstring diff --git a/python/core/qgssimplifymethod.sip b/python/core/qgssimplifymethod.sip index a0c403fa4d9b..1144743273f7 100644 --- a/python/core/qgssimplifymethod.sip +++ b/python/core/qgssimplifymethod.sip @@ -40,8 +40,6 @@ Sets the simplification type MethodType methodType() const; %Docstring Gets the simplification type - -:rtype: MethodType %End void setTolerance( double tolerance ); @@ -51,8 +49,6 @@ Sets the tolerance of simplification in map units. Represents the maximum distan double tolerance() const; %Docstring Gets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal. - -:rtype: float %End void setThreshold( float threshold ); @@ -62,8 +58,6 @@ Sets the simplification threshold in pixels. Represents the maximum distance in float threshold() const; %Docstring Gets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal. - -:rtype: float %End void setForceLocalOptimization( bool localOptimization ); @@ -73,15 +67,11 @@ Sets whether the simplification executes after fetch the geometries from provide bool forceLocalOptimization() const; %Docstring Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries - -:rtype: bool %End static QgsAbstractGeometrySimplifier *createGeometrySimplifier( const QgsSimplifyMethod &simplifyMethod ); %Docstring Creates a geometry simplifier according to specified method - -:rtype: QgsAbstractGeometrySimplifier %End protected: diff --git a/python/core/qgssnappingconfig.sip b/python/core/qgssnappingconfig.sip index baacbb40ac37..f999eebe54a4 100644 --- a/python/core/qgssnappingconfig.sip +++ b/python/core/qgssnappingconfig.sip @@ -52,6 +52,7 @@ This is a container of advanced configuration (per layer) of the snapping of the IndividualLayerSettings( bool enabled, QgsSnappingConfig::SnappingType type, double tolerance, QgsTolerance::UnitType units ); %Docstring IndividualLayerSettings + :param enabled: :param type: :param tolerance: @@ -66,15 +67,11 @@ Constructs an invalid setting bool valid() const; %Docstring return if settings are valid - -:rtype: bool %End bool enabled() const; %Docstring return if snapping is enabled - -:rtype: bool %End void setEnabled( bool enabled ); @@ -85,8 +82,6 @@ enables the snapping QgsSnappingConfig::SnappingType type() const; %Docstring return the type (vertices and/or segments) - -:rtype: QgsSnappingConfig.SnappingType %End void setType( QgsSnappingConfig::SnappingType type ); @@ -97,8 +92,6 @@ define the type of snapping double tolerance() const; %Docstring return the tolerance - -:rtype: float %End void setTolerance( double tolerance ); @@ -109,8 +102,6 @@ set the tolerance QgsTolerance::UnitType units() const; %Docstring return the type of units - -:rtype: QgsTolerance.UnitType %End void setUnits( QgsTolerance::UnitType units ); @@ -142,8 +133,6 @@ reset to default values bool enabled() const; %Docstring return if snapping is enabled - -:rtype: bool %End void setEnabled( bool enabled ); @@ -154,8 +143,6 @@ enables the snapping SnappingMode mode() const; %Docstring return the mode (all layers, active layer, per layer settings) - -:rtype: SnappingMode %End void setMode( SnappingMode mode ); @@ -166,8 +153,6 @@ define the mode of snapping SnappingType type() const; %Docstring return the type (vertices and/or segments) - -:rtype: SnappingType %End void setType( SnappingType type ); @@ -178,8 +163,6 @@ define the type of snapping double tolerance() const; %Docstring return the tolerance - -:rtype: float %End void setTolerance( double tolerance ); @@ -190,8 +173,6 @@ set the tolerance QgsTolerance::UnitType units() const; %Docstring return the type of units - -:rtype: QgsTolerance.UnitType %End void setUnits( QgsTolerance::UnitType units ); @@ -202,8 +183,6 @@ set the type of units bool intersectionSnapping() const; %Docstring return if the snapping on intersection is enabled - -:rtype: bool %End void setIntersectionSnapping( bool enabled ); @@ -214,8 +193,6 @@ set if the snapping on intersection is enabled SIP_PYDICT individualLayerSettings() const; %Docstring return individual snapping settings for all layers - -:rtype: SIP_PYDICT %End %MethodCode // Create the dictionary. @@ -260,8 +237,6 @@ return individual snapping settings for all layers QgsSnappingConfig::IndividualLayerSettings individualLayerSettings( QgsVectorLayer *vl ) const; %Docstring return individual layer snappings settings (applied if mode is AdvancedConfiguration) - -:rtype: QgsSnappingConfig.IndividualLayerSettings %End void setIndividualLayerSettings( QgsVectorLayer *vl, const QgsSnappingConfig::IndividualLayerSettings &individualLayerSettings ); @@ -296,8 +271,6 @@ When implementing a long-living QgsSnappingConfig (like the one in QgsProject) it is best to directly feed this with information from the layer registry. :return: True if changes have been done. -:rtype: bool - .. versionadded:: 3.0 %End @@ -310,8 +283,6 @@ When implementing a long-living QgsSnappingConfig (like the one in QgsProject) it is best to directly feed this with information from the layer registry. :return: True if changes have been done. -:rtype: bool - .. versionadded:: 3.0 %End @@ -320,8 +291,6 @@ it is best to directly feed this with information from the layer registry. %Docstring The project from which the snapped layers should be retrieved -:rtype: QgsProject - .. versionadded:: 3.0 %End diff --git a/python/core/qgssnappingutils.sip b/python/core/qgssnappingutils.sip index 8585a1af49a5..4c2c9b516fb1 100644 --- a/python/core/qgssnappingutils.sip +++ b/python/core/qgssnappingutils.sip @@ -45,27 +45,17 @@ Constructor for QgsSnappingUtils QgsPointLocator *locatorForLayer( QgsVectorLayer *vl ); %Docstring Get a point locator for the given layer. If such locator does not exist, it will be created - -:rtype: QgsPointLocator %End QgsPointLocator::Match snapToMap( QPoint point, QgsPointLocator::MatchFilter *filter = 0 ); %Docstring Snap to map according to the current configuration. Optional filter allows discarding unwanted matches. - -:rtype: QgsPointLocator.Match %End QgsPointLocator::Match snapToMap( const QgsPointXY &pointMap, QgsPointLocator::MatchFilter *filter = 0 ); -%Docstring - -:rtype: QgsPointLocator.Match -%End QgsPointLocator::Match snapToCurrentLayer( QPoint point, QgsPointLocator::Types type, QgsPointLocator::MatchFilter *filter = 0 ); %Docstring Snap to current layer - -:rtype: QgsPointLocator.Match %End @@ -74,10 +64,6 @@ Snap to current layer Assign current map settings to the utils - used for conversion between screen coords to map coords %End QgsMapSettings mapSettings() const; -%Docstring - -:rtype: QgsMapSettings -%End void setCurrentLayer( QgsVectorLayer *layer ); %Docstring @@ -86,8 +72,6 @@ Set current layer so that if mode is SnapCurrentLayer we know which layer to use QgsVectorLayer *currentLayer() const; %Docstring The current layer used if mode is SnapCurrentLayer - -:rtype: QgsVectorLayer %End @@ -106,8 +90,6 @@ Set a strategy for indexing geometry data - determines how fast and memory consu IndexingStrategy indexingStrategy() const; %Docstring Find out which strategy is used for indexing - by default hybrid indexing is used - -:rtype: IndexingStrategy %End struct LayerConfig @@ -134,10 +116,6 @@ snapper.setLayers([snapping_layer1, snapping_layer2]) bool operator==( const QgsSnappingUtils::LayerConfig &other ) const; bool operator!=( const QgsSnappingUtils::LayerConfig &other ) const; -%Docstring - -:rtype: bool -%End QgsVectorLayer *layer; %Docstring @@ -160,24 +138,18 @@ The units in which the tolerance is specified. QList layers() const; %Docstring Query layers used for snapping - -:rtype: list of QgsSnappingUtils.LayerConfig %End QString dump(); %Docstring Get extra information about the instance -:rtype: str - .. versionadded:: 2.14 %End QgsSnappingConfig config() const; %Docstring The snapping configuration controls the behavior of this object - -:rtype: QgsSnappingConfig %End public slots: diff --git a/python/core/qgsspatialindex.sip b/python/core/qgsspatialindex.sip index fed2731ead06..3f92fea2af46 100644 --- a/python/core/qgsspatialindex.sip +++ b/python/core/qgsspatialindex.sip @@ -67,8 +67,6 @@ Destructor finalizes work with spatial index bool insertFeature( const QgsFeature &f ); %Docstring Add feature to index - -:rtype: bool %End bool insertFeature( QgsFeatureId id, const QgsRectangle &bounds ); @@ -76,8 +74,6 @@ Add feature to index Add a feature ``id`` to the index with a specified bounding box. :return: true if feature was successfully added to index. -:rtype: bool - .. versionadded:: 3.0 %End @@ -85,8 +81,6 @@ Add a feature ``id`` to the index with a specified bounding box. bool deleteFeature( const QgsFeature &f ); %Docstring Remove feature from index - -:rtype: bool %End @@ -94,23 +88,17 @@ Remove feature from index QList intersects( const QgsRectangle &rect ) const; %Docstring Returns features that intersect the specified rectangle - -:rtype: list of QgsFeatureId %End QList nearestNeighbor( const QgsPointXY &point, int neighbors ) const; %Docstring Returns nearest neighbors (their count is specified by second parameter) - -:rtype: list of QgsFeatureId %End int refs() const; %Docstring get reference count - just for debugging! - -:rtype: QAtomicInt %End }; diff --git a/python/core/qgssqlstatement.sip b/python/core/qgssqlstatement.sip index 5062a9360ed9..a5d55f2c7343 100644 --- a/python/core/qgssqlstatement.sip +++ b/python/core/qgssqlstatement.sip @@ -41,14 +41,10 @@ Create a copy of this statement. bool hasParserError() const; %Docstring Returns true if an error occurred when parsing the input statement - -:rtype: bool %End QString parserErrorString() const; %Docstring Returns parser error - -:rtype: str %End bool doBasicValidationChecks( QString &errorMsgOut /Out/ ) const; @@ -56,16 +52,12 @@ Returns parser error Performs basic validity checks. Basically checking that columns referencing a table, references a specified table. Returns true if the validation is successful * - -:rtype: bool %End const QgsSQLStatement::Node *rootNode() const; %Docstring Returns root node of the statement. Root node is null is parsing has failed - -:rtype: QgsSQLStatement.Node %End QString statement() const; @@ -73,8 +65,6 @@ Returns root node of the statement. Root node is null is parsing has failed Return the original, unmodified statement string. If there was none supplied because it was constructed by sole API calls, dump() will be used to create one instead. - -:rtype: str %End QString dump() const; @@ -83,16 +73,12 @@ Return statement string, constructed from the internal abstract syntax tree. This does not contain any nice whitespace formatting or comments. In general it is preferable to use statement() instead. - -:rtype: str %End static QString quotedIdentifier( QString name ); %Docstring Returns a quoted column reference (in double quotes) -:rtype: str - .. seealso:: :py:func:`quotedString()` %End @@ -101,8 +87,6 @@ Returns a quoted column reference (in double quotes) Returns a quoted column reference (in double quotes) if needed, or otherwise the original string. -:rtype: str - .. seealso:: :py:func:`quotedString()` %End @@ -110,8 +94,6 @@ otherwise the original string. %Docstring Remove double quotes from an identifier. -:rtype: str - .. seealso:: :py:func:`quotedIdentifier()` %End @@ -119,8 +101,6 @@ Remove double quotes from an identifier. %Docstring Returns a quoted version of a string (in single quotes) -:rtype: str - .. seealso:: :py:func:`quotedIdentifier()` %End @@ -233,8 +213,6 @@ Abstract node class * Abstract virtual that returns the type of this node. :return: The type of this node -:rtype: QgsSQLStatement.NodeType - %End virtual QString dump() const = 0; @@ -242,8 +220,6 @@ Abstract virtual that returns the type of this node. Abstract virtual dump method :return: A statement which represents this node as string -:rtype: str - %End virtual QgsSQLStatement::Node *clone() const = 0 /Factory/; @@ -254,8 +230,6 @@ generated in prepare and context related. Ownership is transferred to the caller. :return: a deep copy of this node. -:rtype: QgsSQLStatement.Node - %End virtual void accept( QgsSQLStatement::Visitor &v ) const = 0; @@ -300,15 +274,11 @@ Takes ownership of the provided node QList list(); %Docstring Return list - -:rtype: list of QgsSQLStatement.Node %End int count() const; %Docstring Returns the number of nodes in the list. - -:rtype: int %End void accept( QgsSQLStatement::Visitor &v ) const; @@ -319,15 +289,11 @@ Accept visitor QgsSQLStatement::NodeList *clone() const /Factory/; %Docstring Creates a deep copy of this list. Ownership is transferred to the caller - -:rtype: QgsSQLStatement.NodeList %End virtual QString dump() const; %Docstring Dump list - -:rtype: str %End protected: @@ -352,15 +318,11 @@ Constructor QgsSQLStatement::UnaryOperator op() const; %Docstring Operator - -:rtype: QgsSQLStatement.UnaryOperator %End QgsSQLStatement::Node *operand() const; %Docstring Operand - -:rtype: QgsSQLStatement.Node %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -393,22 +355,16 @@ Constructor QgsSQLStatement::BinaryOperator op() const; %Docstring Operator - -:rtype: QgsSQLStatement.BinaryOperator %End QgsSQLStatement::Node *opLeft() const; %Docstring Left operand - -:rtype: QgsSQLStatement.Node %End QgsSQLStatement::Node *opRight() const; %Docstring Right operand - -:rtype: QgsSQLStatement.Node %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -422,15 +378,11 @@ Right operand int precedence() const; %Docstring Precedence - -:rtype: int %End bool leftAssociative() const; %Docstring Is left associative ? - -:rtype: bool %End protected: @@ -456,22 +408,16 @@ Constructor QgsSQLStatement::Node *node() const; %Docstring Variable at the left of IN - -:rtype: QgsSQLStatement.Node %End bool isNotIn() const; %Docstring Whether this is a NOT IN operator - -:rtype: bool %End QgsSQLStatement::NodeList *list() const; %Docstring Values list - -:rtype: QgsSQLStatement.NodeList %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -503,29 +449,21 @@ Constructor QgsSQLStatement::Node *node() const; %Docstring Variable at the left of BETWEEN - -:rtype: QgsSQLStatement.Node %End bool isNotBetween() const; %Docstring Whether this is a NOT BETWEEN operator - -:rtype: bool %End QgsSQLStatement::Node *minVal() const; %Docstring Minimum bound - -:rtype: QgsSQLStatement.Node %End QgsSQLStatement::Node *maxVal() const; %Docstring Maximum bound - -:rtype: QgsSQLStatement.Node %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -558,15 +496,11 @@ Constructor QString name() const; %Docstring Return function name - -:rtype: str %End QgsSQLStatement::NodeList *args() const; %Docstring Return arguments - -:rtype: QgsSQLStatement.NodeList %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -599,8 +533,6 @@ Constructor QVariant value() const; %Docstring The value of the literal. - -:rtype: QVariant %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -641,29 +573,21 @@ Set whether this is prefixed by DISTINCT QString tableName() const; %Docstring The name of the table. May be empty. - -:rtype: str %End QString name() const; %Docstring The name of the column. - -:rtype: str %End bool star() const; %Docstring Whether this is the * column - -:rtype: bool %End bool distinct() const; %Docstring Whether this is prefixed by DISTINCT - -:rtype: bool %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -676,8 +600,6 @@ Whether this is prefixed by DISTINCT QgsSQLStatement::NodeColumnRef *cloneThis() const /Factory/; %Docstring Clone with same type return - -:rtype: QgsSQLStatement.NodeColumnRef %End protected: @@ -707,15 +629,11 @@ Set alias name QgsSQLStatement::Node *column() const; %Docstring Column that is referred to - -:rtype: QgsSQLStatement.Node %End QString alias() const; %Docstring Alias name - -:rtype: str %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -728,8 +646,6 @@ Alias name QgsSQLStatement::NodeSelectedColumn *cloneThis() const /Factory/; %Docstring Clone with same type return - -:rtype: QgsSQLStatement.NodeSelectedColumn %End protected: @@ -754,15 +670,11 @@ Constructor QgsSQLStatement::Node *node() const; %Docstring Node that is referred to - -:rtype: QgsSQLStatement.Node %End QString type() const; %Docstring Type - -:rtype: str %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -798,15 +710,11 @@ Constructor with table name and alias QString name() const; %Docstring Table name - -:rtype: str %End QString alias() const; %Docstring Table alias - -:rtype: str %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -819,8 +727,6 @@ Table alias QgsSQLStatement::NodeTableDef *cloneThis() const /Factory/; %Docstring Clone with same type return - -:rtype: QgsSQLStatement.NodeTableDef %End protected: @@ -849,29 +755,21 @@ Constructor with table definition and USING columns QgsSQLStatement::NodeTableDef *tableDef() const; %Docstring Table definition - -:rtype: QgsSQLStatement.NodeTableDef %End QgsSQLStatement::Node *onExpr() const; %Docstring On expression. Will be None if usingColumns() is not empty - -:rtype: QgsSQLStatement.Node %End QList usingColumns() const; %Docstring Columns referenced by USING - -:rtype: list of str %End QgsSQLStatement::JoinType type() const; %Docstring Join type - -:rtype: QgsSQLStatement.JoinType %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -884,8 +782,6 @@ Join type QgsSQLStatement::NodeJoin *cloneThis() const /Factory/; %Docstring Clone with same type return - -:rtype: QgsSQLStatement.NodeJoin %End protected: @@ -910,15 +806,11 @@ Constructor QgsSQLStatement::NodeColumnRef *column() const; %Docstring The name of the column. - -:rtype: QgsSQLStatement.NodeColumnRef %End bool ascending() const; %Docstring Whether the column is sorted in ascending order - -:rtype: bool %End virtual QgsSQLStatement::NodeType nodeType() const; @@ -931,8 +823,6 @@ Whether the column is sorted in ascending order QgsSQLStatement::NodeColumnSorted *cloneThis() const /Factory/; %Docstring Clone with same type return - -:rtype: QgsSQLStatement.NodeColumnSorted %End protected: @@ -974,38 +864,26 @@ Set order by columns QList tables() const; %Docstring Return the list of tables - -:rtype: list of QgsSQLStatement.NodeTableDef %End QList columns() const; %Docstring Return the list of columns - -:rtype: list of QgsSQLStatement.NodeSelectedColumn %End bool distinct() const; %Docstring Return if the SELECT is DISTINCT - -:rtype: bool %End QList joins() const; %Docstring Return the list of joins - -:rtype: list of QgsSQLStatement.NodeJoin %End QgsSQLStatement::Node *where() const; %Docstring Return the where clause - -:rtype: QgsSQLStatement.Node %End QList orderBy() const; %Docstring Return the list of order by columns - -:rtype: list of QgsSQLStatement.NodeColumnSorted %End virtual QgsSQLStatement::NodeType nodeType() const; diff --git a/python/core/qgsstatisticalsummary.sip b/python/core/qgsstatisticalsummary.sip index 56aa8d60c82e..d40901dd4a24 100644 --- a/python/core/qgsstatisticalsummary.sip +++ b/python/core/qgsstatisticalsummary.sip @@ -54,6 +54,7 @@ specifying the statistic in the constructor or via setStatistics(). QgsStatisticalSummary( QgsStatisticalSummary::Statistics stats = QgsStatisticalSummary::All ); %Docstring Constructor for QgsStatisticalSummary + :param stats: flags for statistics to calculate %End @@ -64,8 +65,6 @@ Constructor for QgsStatisticalSummary Returns flags which specify which statistics will be calculated. Some statistics are always calculated (e.g., sum, min and max). -:rtype: Statistics - .. seealso:: :py:func:`setStatistics` %End @@ -73,6 +72,7 @@ are always calculated (e.g., sum, min and max). %Docstring Sets flags which specify which statistics will be calculated. Some statistics are always calculated (e.g., sum, min and max). + :param stats: flags for statistics to calculate .. seealso:: :py:func:`statistics` @@ -86,6 +86,7 @@ Resets the calculated values void calculate( const QList &values ); %Docstring Calculates summary statistics for a list of values + :param values: list of doubles %End @@ -95,6 +96,7 @@ Adds a single value to the statistics calculation. Calling this method allows values to be added to the calculation one at a time. For large quantities of values this may be more efficient then first adding all the values to a list and calling calculate(). + :param value: value to add .. note:: @@ -122,6 +124,7 @@ Adds a single value to the statistics calculation. Calling this method allows values to be added to the calculation one at a time. For large quantities of values this may be more efficient then first adding all the values to a list and calling calculate(). + :param value: variant containing to add. Non-numeric values are treated as null. .. note:: @@ -158,43 +161,34 @@ any calculated statistics. double statistic( QgsStatisticalSummary::Statistic stat ) const; %Docstring Returns the value of a specified statistic + :param stat: statistic to return :return: calculated value of statistic. A NaN value may be returned for invalid -:rtype: float - statistics. %End int count() const; %Docstring Returns calculated count of values - -:rtype: int %End int countMissing() const; %Docstring Returns the number of missing (null) values -:rtype: int - .. versionadded:: 2.16 %End double sum() const; %Docstring Returns calculated sum of values - -:rtype: float %End double mean() const; %Docstring Returns calculated mean of values. A NaN value may be returned if the mean cannot be calculated. - -:rtype: float %End double median() const; @@ -202,32 +196,24 @@ be calculated. Returns calculated median of values. This is only calculated if Statistic.Median has been specified in the constructor or via setStatistics. A NaN value may be returned if the median cannot be calculated. - -:rtype: float %End double min() const; %Docstring Returns calculated minimum from values. A NaN value may be returned if the minimum cannot be calculated. - -:rtype: float %End double max() const; %Docstring Returns calculated maximum from values. A NaN value may be returned if the maximum cannot be calculated. - -:rtype: float %End double range() const; %Docstring Returns calculated range (difference between maximum and minimum values). A NaN value may be returned if the range cannot be calculated. - -:rtype: float %End double stDev() const; @@ -236,8 +222,6 @@ Returns population standard deviation. This is only calculated if Statistic.StDe been specified in the constructor or via setStatistics. A NaN value may be returned if the standard deviation cannot be calculated. -:rtype: float - .. seealso:: :py:func:`sampleStDev` %End @@ -247,8 +231,6 @@ Returns sample standard deviation. This is only calculated if Statistic.StDev ha been specified in the constructor or via setStatistics. A NaN value may be returned if the standard deviation cannot be calculated. -:rtype: float - .. seealso:: :py:func:`stDev` %End @@ -257,8 +239,6 @@ be calculated. Returns variety of values. The variety is the count of unique values from the list. This is only calculated if Statistic.Variety has been specified in the constructor or via setStatistics. - -:rtype: int %End double minority() const; @@ -268,8 +248,6 @@ This is only calculated if Statistic.Minority has been specified in the construc or via setStatistics. A NaN value may be returned if the minority cannot be calculated. -:rtype: float - .. seealso:: :py:func:`majority` %End @@ -280,8 +258,6 @@ This is only calculated if Statistic.Majority has been specified in the construc or via setStatistics. A NaN value may be returned if the majority cannot be calculated. -:rtype: float - .. seealso:: :py:func:`minority` %End @@ -291,8 +267,6 @@ Returns the first quartile of the values. The quartile is calculated using the "Tukey's hinges" method. A NaN value may be returned if the first quartile cannot be calculated. -:rtype: float - .. seealso:: :py:func:`thirdQuartile` .. seealso:: :py:func:`interQuartileRange` @@ -304,8 +278,6 @@ Returns the third quartile of the values. The quartile is calculated using the "Tukey's hinges" method. A NaN value may be returned if the third quartile cannot be calculated. -:rtype: float - .. seealso:: :py:func:`firstQuartile` .. seealso:: :py:func:`interQuartileRange` @@ -317,8 +289,6 @@ Returns the inter quartile range of the values. The quartiles are calculated usi "Tukey's hinges" method. A NaN value may be returned if the IQR cannot be calculated. -:rtype: float - .. seealso:: :py:func:`firstQuartile` .. seealso:: :py:func:`thirdQuartile` @@ -327,9 +297,8 @@ be calculated. static QString displayName( QgsStatisticalSummary::Statistic statistic ); %Docstring Returns the friendly display name for a statistic -:param statistic: statistic to return name for -:rtype: str +:param statistic: statistic to return name for %End }; diff --git a/python/core/qgsstringstatisticalsummary.sip b/python/core/qgsstringstatisticalsummary.sip index 92a34363aa23..c7c35a0823e8 100644 --- a/python/core/qgsstringstatisticalsummary.sip +++ b/python/core/qgsstringstatisticalsummary.sip @@ -47,6 +47,7 @@ specifying the statistic in the constructor or via setStatistics(). QgsStringStatisticalSummary( QgsStringStatisticalSummary::Statistics stats = QgsStringStatisticalSummary::All ); %Docstring Constructor for QgsStringStatistics + :param stats: flags for statistics to calculate %End @@ -55,8 +56,6 @@ Constructor for QgsStringStatistics Returns flags which specify which statistics will be calculated. Some statistics are always calculated (e.g., count). -:rtype: Statistics - .. seealso:: :py:func:`setStatistics` %End @@ -64,6 +63,7 @@ are always calculated (e.g., count). %Docstring Sets flags which specify which statistics will be calculated. Some statistics are always calculated (e.g., count). + :param stats: flags for statistics to calculate .. seealso:: :py:func:`statistics` @@ -77,6 +77,7 @@ Resets the calculated values void calculate( const QStringList &values ); %Docstring Calculates summary statistics for an entire list of strings at once. + :param values: list of strings .. seealso:: :py:func:`calculateFromVariants()` @@ -88,6 +89,7 @@ Calculates summary statistics for an entire list of strings at once. %Docstring Calculates summary statistics for an entire list of variants at once. Any non-string variants will be ignored. + :param values: list of variants .. seealso:: :py:func:`calculate()` @@ -101,6 +103,7 @@ Adds a single string to the statistics calculation. Calling this method allows strings to be added to the calculation one at a time. For large quantities of strings this may be more efficient then first adding all the strings to a list and calling calculate(). + :param string: string to add .. note:: @@ -126,6 +129,7 @@ Adds a single variant to the statistics calculation. Calling this method allows variants to be added to the calculation one at a time. For large quantities of variants this may be more efficient then first adding all the variants to a list and calling calculateFromVariants(). + :param value: variant to add .. note:: @@ -154,26 +158,21 @@ any calculated string statistics. QVariant statistic( QgsStringStatisticalSummary::Statistic stat ) const; %Docstring Returns the value of a specified statistic + :param stat: statistic to return :return: calculated value of statistic -:rtype: QVariant - %End int count() const; %Docstring Returns the calculated count of values. - -:rtype: int %End int countDistinct() const; %Docstring Returns the number of distinct string values. -:rtype: int - .. seealso:: :py:func:`distinctValues()` %End @@ -181,61 +180,46 @@ Returns the number of distinct string values. %Docstring Returns the set of distinct string values. -:rtype: set of str - .. seealso:: :py:func:`countDistinct()` %End int countMissing() const; %Docstring Returns the number of missing (null) string values. - -:rtype: int %End QString min() const; %Docstring Returns the minimum (non-null) string value. - -:rtype: str %End QString max() const; %Docstring Returns the maximum (non-null) string value. - -:rtype: str %End int minLength() const; %Docstring Returns the minimum length of strings. - -:rtype: int %End int maxLength() const; %Docstring Returns the maximum length of strings. - -:rtype: int %End double meanLength() const; %Docstring Returns the mean length of strings. -:rtype: float - .. versionadded:: 3.0 %End static QString displayName( QgsStringStatisticalSummary::Statistic statistic ); %Docstring Returns the friendly display name for a statistic -:param statistic: statistic to return name for -:rtype: str +:param statistic: statistic to return name for %End }; diff --git a/python/core/qgsstringutils.sip b/python/core/qgsstringutils.sip index 490820c03188..41f64ead672c 100644 --- a/python/core/qgsstringutils.sip +++ b/python/core/qgsstringutils.sip @@ -29,6 +29,7 @@ class QgsStringReplacement bool wholeWordOnly = false ); %Docstring Constructor for QgsStringReplacement. + :param match: string to match :param replacement: string to replace match with :param caseSensitive: set to true for a case sensitive match @@ -38,39 +39,30 @@ Constructor for QgsStringReplacement. QString match() const; %Docstring Returns the string matched by this object - -:rtype: str %End QString replacement() const; %Docstring Returns the string to replace matches with - -:rtype: str %End bool caseSensitive() const; %Docstring Returns true if match is case sensitive - -:rtype: bool %End bool wholeWordOnly() const; %Docstring Returns true if match only applies to whole words, or false if partial word matches are permitted - -:rtype: bool %End QString process( const QString &input ) const; %Docstring Processes a given input string, applying any valid replacements which should be made. + :param input: input string :return: input string with any matches replaced by replacement string -:rtype: str - %End bool operator==( const QgsStringReplacement &other ); @@ -79,8 +71,6 @@ Processes a given input string, applying any valid replacements which should be %Docstring Returns a map of the replacement properties. -:rtype: QgsStringMap - .. seealso:: :py:func:`fromProperties()` %End @@ -88,8 +78,6 @@ Returns a map of the replacement properties. %Docstring Creates a new QgsStringReplacement from an encoded properties map. -:rtype: QgsStringReplacement - .. seealso:: :py:func:`properties()` %End @@ -113,6 +101,7 @@ class QgsStringReplacementCollection QgsStringReplacementCollection( const QList< QgsStringReplacement > &replacements = QList< QgsStringReplacement >() ); %Docstring Constructor for QgsStringReplacementCollection + :param replacements: initial list of string replacements %End @@ -120,14 +109,13 @@ Constructor for QgsStringReplacementCollection %Docstring Returns the list of string replacements in this collection. -:rtype: list of QgsStringReplacement - .. seealso:: :py:func:`setReplacements()` %End void setReplacements( const QList< QgsStringReplacement > &replacements ); %Docstring Sets the list of string replacements in this collection. + :param replacements: list of string replacements to apply. Replacements are applied in the order they are specified here. @@ -139,16 +127,16 @@ order they are specified here. Processes a given input string, applying any valid replacements which should be made using QgsStringReplacement objects contained by this collection. Replacements are made in order of the QgsStringReplacement objects contained in the collection. + :param input: input string :return: input string with any matches replaced by replacement string -:rtype: str - %End void writeXml( QDomElement &elem, QDomDocument &doc ) const; %Docstring Writes the collection state to an XML element. + :param elem: target DOM element :param doc: DOM document @@ -158,6 +146,7 @@ Writes the collection state to an XML element. void readXml( const QDomElement &elem ); %Docstring Reads the collection state from an XML element. + :param elem: DOM element .. seealso:: :py:func:`writeXml()` @@ -190,12 +179,11 @@ class QgsStringUtils static QString capitalize( const QString &string, Capitalization capitalization ); %Docstring Converts a string by applying capitalization rules to the string. + :param string: input string :param capitalization: capitalization type to apply :return: capitalized string -:rtype: str - .. versionadded:: 3.0 %End @@ -205,13 +193,12 @@ Converts a string by applying capitalization rules to the string. Returns the Levenshtein edit distance between two strings. This equates to the minimum number of character edits (insertions, deletions or substitutions) required to change one string to another. + :param string1: first string :param string2: second string :param caseSensitive: set to true for case sensitive comparison :return: edit distance. Lower distances indicate more similar strings. -:rtype: int - %End static QString longestCommonSubstring( const QString &string1, const QString &string2, bool caseSensitive = false ); @@ -219,13 +206,12 @@ one string to another. Returns the longest common substring between two strings. This substring is the longest string that is a substring of the two input strings. For example, the longest common substring of "ABABC" and "BABCA" is "ABC". + :param string1: first string :param string2: second string :param caseSensitive: set to true for case sensitive comparison :return: longest common substring -:rtype: str - %End static int hammingDistance( const QString &string1, const QString &string2, bool caseSensitive = false ); @@ -233,36 +219,33 @@ of "ABABC" and "BABCA" is "ABC". Returns the Hamming distance between two strings. This equates to the number of characters at corresponding positions within the input strings where the characters are different. The input strings must be the same length. + :param string1: first string :param string2: second string :param caseSensitive: set to true for case sensitive comparison :return: Hamming distance between strings, or -1 if strings are different lengths. -:rtype: int - %End static QString soundex( const QString &string ); %Docstring Returns the Soundex representation of a string. Soundex is a phonetic matching algorithm, so strings with similar sounds should be represented by the same Soundex code. + :param string: input string :return: 4 letter Soundex code -:rtype: str - %End static QString insertLinks( const QString &string, bool *foundLinks = 0 ); %Docstring Returns a string with any URL (e.g., http(s)/ftp) and mailto: text converted to valid HTML links. + :param string: string to insert links into :param foundLinks: if specified, will be set to true if any links were inserted into the string :return: string with inserted links -:rtype: str - .. versionadded:: 3.0 %End diff --git a/python/core/qgstaskmanager.sip b/python/core/qgstaskmanager.sip index 801bf2e2868e..1cc587ced5ef 100644 --- a/python/core/qgstaskmanager.sip +++ b/python/core/qgstaskmanager.sip @@ -55,6 +55,7 @@ clean up and terminate at the earliest possible convenience. QgsTask( const QString &description = QString(), const Flags &flags = AllFlags ); %Docstring Constructor for QgsTask. + :param description: text description of task :param flags: task flags %End @@ -64,44 +65,32 @@ Constructor for QgsTask. Flags flags() const; %Docstring Returns the flags associated with the task. - -:rtype: Flags %End bool canCancel() const; %Docstring Returns true if the task can be canceled. - -:rtype: bool %End bool isActive() const; %Docstring Returns true if the task is active, ie it is not complete and has not been canceled. - -:rtype: bool %End TaskStatus status() const; %Docstring Returns the current task status. - -:rtype: TaskStatus %End QString description() const; %Docstring Returns the task's description. - -:rtype: str %End double progress() const; %Docstring Returns the task's progress (between 0.0 and 100.0) - -:rtype: float %End virtual void cancel(); @@ -177,8 +166,6 @@ be canceled if any of these layers are about to be removed. Returns the list of layers on which the task depends. The task will automatically be canceled if any of these layers are about to be removed. -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`setDependentLayers()` %End @@ -191,8 +178,6 @@ In case the task already is finished, the method will return immediately while returning ``true``. The result will be false if the wait timed out and true in any other case. - -:rtype: bool %End signals: @@ -200,6 +185,7 @@ The result will be false if the wait timed out and true in any other case. void progressChanged( double progress ); %Docstring Will be emitted by task when its progress changes. + :param progress: percent of progress, from 0.0 - 100.0 .. note:: @@ -211,6 +197,7 @@ setProgress() void statusChanged( int status ); %Docstring Will be emitted by task when its status changes. + :param status: new task status .. note:: @@ -261,8 +248,6 @@ wish to perform in the background within this method. A task must return a boolean value to indicate whether the task was completed successfully or terminated before completion. - -:rtype: bool %End virtual void finished( bool result ); @@ -282,8 +267,6 @@ lengthy operations here. Will return true if task should terminate ASAP. If the task reports the CanCancel flag, then derived classes' run() methods should periodically check this and terminate in a safe manner. - -:rtype: bool %End protected slots: @@ -292,6 +275,7 @@ terminate in a safe manner. %Docstring Sets the task's current progress. The derived class should call this method whenever the task wants to update its progress. Calling will automatically emit the progressChanged signal. + :param progress: percent of progress, from 0.0 - 100.0 %End @@ -318,6 +302,7 @@ or accessed via QgsApplication.taskManager(). QgsTaskManager( QObject *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsTaskManager. + :param parent: parent QObject %End @@ -355,8 +340,6 @@ order of execution, with larger numbers taking precedence over lower priority numbers. :return: unique task ID -:rtype: long - %End long addTask( const TaskDefinition &task /Transfer/, int priority = 0 ); @@ -368,42 +351,34 @@ be used to control the run queue's order of execution, with larger numbers taking precedence over lower priority numbers. :return: unique task ID -:rtype: long - %End QgsTask *task( long id ) const; %Docstring Returns the task with matching ID. + :param id: task ID :return: task if found, or None -:rtype: QgsTask - %End QList tasks() const; %Docstring Returns all tasks tracked by the manager. - -:rtype: list of QgsTask %End int count() const; %Docstring Returns the number of tasks tracked by the manager. - -:rtype: int %End long taskId( QgsTask *task ) const; %Docstring Returns the unique task ID corresponding to a task managed by the class. + :param task: task to find :return: task ID, or -1 if task not found -:rtype: long - %End void cancelAll(); @@ -416,8 +391,6 @@ but will instead signal the tasks to cancel and then return immediately. bool dependenciesSatisfied( long taskId ) const; %Docstring Returns true if all dependencies for the specified task are satisfied - -:rtype: bool %End @@ -425,11 +398,10 @@ Returns true if all dependencies for the specified task are satisfied %Docstring Returns a list of layers on which as task is dependent. The task will automatically be canceled if any of these layers are above to be removed. + :param taskId: task ID :return: list of layers -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`tasksDependentOnLayer()` %End @@ -438,8 +410,6 @@ be canceled if any of these layers are above to be removed. %Docstring Returns a list of tasks which depend on a layer. -:rtype: list of QgsTask - .. seealso:: :py:func:`dependentLayers()` %End @@ -447,8 +417,6 @@ Returns a list of tasks which depend on a layer. %Docstring Returns a list of the active (queued or running) tasks. -:rtype: list of QgsTask - .. seealso:: :py:func:`countActiveTasks()` %End @@ -456,8 +424,6 @@ Returns a list of the active (queued or running) tasks. %Docstring Returns the number of active (queued or running) tasks. -:rtype: int - .. seealso:: :py:func:`activeTasks()` .. seealso:: :py:func:`countActiveTasksChanged()` @@ -468,6 +434,7 @@ Returns the number of active (queued or running) tasks. void progressChanged( long taskId, double progress ); %Docstring Will be emitted when a task reports a progress change + :param taskId: ID of task :param progress: percent of progress, from 0.0 - 100.0 %End @@ -476,12 +443,14 @@ Will be emitted when a task reports a progress change %Docstring Will be emitted when only a single task remains to complete and that task has reported a progress change + :param progress: percent of progress, from 0.0 - 100.0 %End void statusChanged( long taskId, int status ); %Docstring Will be emitted when a task reports a status change + :param taskId: ID of task :param status: new task status %End @@ -489,12 +458,14 @@ Will be emitted when a task reports a status change void taskAdded( long taskId ); %Docstring Emitted when a new task has been added to the manager + :param taskId: ID of task %End void taskAboutToBeDeleted( long taskId ); %Docstring Emitted when a task is about to be deleted + :param taskId: ID of task %End diff --git a/python/core/qgstextrenderer.sip b/python/core/qgstextrenderer.sip index 629fc5a4ff8a..69b14530c622 100644 --- a/python/core/qgstextrenderer.sip +++ b/python/core/qgstextrenderer.sip @@ -33,6 +33,7 @@ Container for settings relating to a text buffer. QgsTextBufferSettings( const QgsTextBufferSettings &other ); %Docstring Copy constructor. + :param other: source settings %End @@ -40,6 +41,7 @@ Copy constructor. ~QgsTextBufferSettings(); %Docstring Copy constructor. + :param other: source QgsTextBufferSettings %End @@ -47,14 +49,13 @@ Copy constructor. %Docstring Returns whether the buffer is enabled. -:rtype: bool - .. seealso:: :py:func:`setEnabled()` %End void setEnabled( bool enabled ); %Docstring Sets whether the text buffer will be drawn. + :param enabled: set to true to draw buffer .. seealso:: :py:func:`enabled()` @@ -64,8 +65,6 @@ Sets whether the text buffer will be drawn. %Docstring Returns the size of the buffer. -:rtype: float - .. seealso:: :py:func:`sizeUnit()` .. seealso:: :py:func:`setSize()` @@ -74,6 +73,7 @@ Returns the size of the buffer. void setSize( double size ); %Docstring Sets the size of the buffer. The size units are specified using setSizeUnit(). + :param size: buffer size .. seealso:: :py:func:`size()` @@ -85,8 +85,6 @@ Sets the size of the buffer. The size units are specified using setSizeUnit(). %Docstring Returns the units for the buffer size. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`size()` .. seealso:: :py:func:`setSizeUnit()` @@ -95,6 +93,7 @@ Returns the units for the buffer size. void setSizeUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units used for the buffer size. + :param unit: size unit .. seealso:: :py:func:`setSize()` @@ -107,8 +106,6 @@ Sets the units used for the buffer size. Returns the map unit scale object for the buffer size. This is only used if the buffer size is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setSizeMapUnitScale()` .. seealso:: :py:func:`sizeUnit()` @@ -118,6 +115,7 @@ buffer size is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the buffer size. This is only used if the buffer size is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for buffer size .. seealso:: :py:func:`sizeMapUnitScale()` @@ -129,14 +127,13 @@ buffer size is set to QgsUnitTypes.RenderMapUnit. %Docstring Returns the color of the buffer. -:rtype: QColor - .. seealso:: :py:func:`setColor()` %End void setColor( const QColor &color ); %Docstring Sets the color for the buffer. + :param color: buffer color .. seealso:: :py:func:`color()` @@ -148,14 +145,13 @@ Returns whether the interior of the buffer will be filled in. If false, only the of the text will be drawn as the buffer. The effect of this setting is only visible for semi-transparent text. -:rtype: bool - .. seealso:: :py:func:`setFillBufferInterior()` %End void setFillBufferInterior( bool fill ); %Docstring Sets whether the interior of the buffer will be filled in. + :param fill: set to false to drawn only the stroke of the text as the buffer, or true to also shade the area inside the text. The effect of this setting is only visible for semi-transparent text. @@ -167,14 +163,13 @@ shade the area inside the text. The effect of this setting is only visible for s Returns the buffer opacity. The opacity is a double value between 0 (fully transparent) and 1 (totally opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` %End void setOpacity( double opacity ); %Docstring Sets the buffer opacity. + :param opacity: opacity as a double value between 0 (fully transparent) and 1 (totally opaque) @@ -185,14 +180,13 @@ opaque) %Docstring Returns the buffer join style. -:rtype: Qt.PenJoinStyle - .. seealso:: :py:func:`setJoinStyle` %End void setJoinStyle( Qt::PenJoinStyle style ); %Docstring Sets the join style used for drawing the buffer. + :param style: join style .. seealso:: :py:func:`joinStyle()` @@ -202,14 +196,13 @@ Sets the join style used for drawing the buffer. %Docstring Returns the blending mode used for drawing the buffer. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End void setBlendMode( QPainter::CompositionMode mode ); %Docstring Sets the blending mode used for drawing the buffer. + :param mode: blending mode .. seealso:: :py:func:`blendMode()` @@ -218,6 +211,7 @@ Sets the blending mode used for drawing the buffer. void readFromLayer( QgsVectorLayer *layer ); %Docstring Reads settings from a layer's custom properties (for QGIS 2.x projects). + :param layer: source vector layer %End @@ -232,8 +226,6 @@ Read settings from a DOM element. %Docstring Write settings into a DOM element. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End @@ -242,8 +234,6 @@ Write settings into a DOM element. Returns the current paint effect for the buffer. :return: paint effect -:rtype: QgsPaintEffect - .. seealso:: :py:func:`setPaintEffect()` %End @@ -251,6 +241,7 @@ Returns the current paint effect for the buffer. void setPaintEffect( QgsPaintEffect *effect /Transfer/ ); %Docstring Sets the current paint ``effect`` for the buffer. + :param effect: paint effect. Ownership is transferred to the buffer settings. .. seealso:: :py:func:`paintEffect()` @@ -304,6 +295,7 @@ Container for settings relating to a text background object. QgsTextBackgroundSettings( const QgsTextBackgroundSettings &other ); %Docstring Copy constructor. + :param other: source QgsTextBackgroundSettings %End @@ -314,14 +306,13 @@ Copy constructor. %Docstring Returns whether the background is enabled. -:rtype: bool - .. seealso:: :py:func:`setEnabled()` %End void setEnabled( bool enabled ); %Docstring Sets whether the text background will be drawn. + :param enabled: set to true to draw background .. seealso:: :py:func:`enabled()` @@ -331,14 +322,13 @@ Sets whether the text background will be drawn. %Docstring Returns the type of background shape (e.g., square, ellipse, SVG). -:rtype: ShapeType - .. seealso:: :py:func:`setType()` %End void setType( ShapeType type ); %Docstring Sets the type of background shape to draw (e.g., square, ellipse, SVG). + :param type: shape type .. seealso:: :py:func:`type()` @@ -348,8 +338,6 @@ Sets the type of background shape to draw (e.g., square, ellipse, SVG). %Docstring Returns the absolute path to the background SVG file, if set. -:rtype: str - .. seealso:: :py:func:`setSvgFile()` %End @@ -357,6 +345,7 @@ Returns the absolute path to the background SVG file, if set. %Docstring Sets the path to the background SVG file. This is only used if type() is set to QgsTextBackgroundSettings.ShapeSVG. The path must be absolute. + :param file: Absolute SVG file path .. seealso:: :py:func:`svgFile()` @@ -367,8 +356,6 @@ QgsTextBackgroundSettings.ShapeSVG. The path must be absolute. Returns the method used to determine the size of the background shape (e.g., fixed size or buffer around text). -:rtype: SizeType - .. seealso:: :py:func:`setSizeType()` .. seealso:: :py:func:`size()` @@ -378,6 +365,7 @@ around text). %Docstring Sets the method used to determine the size of the background shape (e.g., fixed size or buffer around text). + :param type: size method .. seealso:: :py:func:`sizeType()` @@ -392,8 +380,6 @@ e.g., for size types of QgsTextBackgroundSettings.SizeFixed the size will repres height of the shape, for QgsTextBackgroundSettings.SizeBuffer the size will represent the horizontal and vertical margins to add to the text when calculating the size of the shape. -:rtype: QSizeF - .. seealso:: :py:func:`setSize()` .. seealso:: :py:func:`sizeType()` @@ -405,6 +391,7 @@ Sets the size of the background shape. The meaning of the size depends on the cu e.g., for size types of QgsTextBackgroundSettings.SizeFixed the size will represent the actual width and height of the shape, for QgsTextBackgroundSettings.SizeBuffer the size will represent the horizontal and vertical margins to add to the text when calculating the size of the shape. + :param size: QSizeF representing horizontal and vertical size components for shape .. seealso:: :py:func:`size()` @@ -417,8 +404,6 @@ and vertical margins to add to the text when calculating the size of the shape. Returns the units used for the shape's size. This value has no meaning if the sizeType() is set to QgsTextBackgroundSettings.SizePercent. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setSizeUnit()` .. seealso:: :py:func:`sizeType()` @@ -430,6 +415,7 @@ QgsTextBackgroundSettings.SizePercent. %Docstring Sets the units used for the shape's size. This value has no meaning if the sizeType() is set to QgsTextBackgroundSettings.SizePercent. + :param unit: size units .. seealso:: :py:func:`sizeUnit()` @@ -444,8 +430,6 @@ QgsTextBackgroundSettings.SizePercent. Returns the map unit scale object for the shape size. This is only used if the sizeUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setSizeMapUnitScale()` .. seealso:: :py:func:`sizeUnit()` @@ -455,6 +439,7 @@ sizeUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the shape size. This is only used if the sizeUnit() is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for shape size .. seealso:: :py:func:`sizeMapUnitScale()` @@ -466,8 +451,6 @@ sizeUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Returns the method used for rotating the background shape. -:rtype: RotationType - .. seealso:: :py:func:`setRotationType()` .. seealso:: :py:func:`rotation()` @@ -476,6 +459,7 @@ Returns the method used for rotating the background shape. void setRotationType( RotationType type ); %Docstring Sets the method used for rotating the background shape. + :param type: rotation method .. seealso:: :py:func:`rotationType()` @@ -487,8 +471,6 @@ Sets the method used for rotating the background shape. %Docstring Returns the rotation for the background shape, in degrees clockwise. -:rtype: float - .. seealso:: :py:func:`rotationType()` .. seealso:: :py:func:`setRotation()` @@ -508,8 +490,6 @@ Sets the ``rotation`` for the background shape, in degrees clockwise. Returns the offset used for drawing the background shape. Units are determined via offsetUnit(). -:rtype: QPointF - .. seealso:: :py:func:`setOffset()` .. seealso:: :py:func:`offsetUnit()` @@ -519,6 +499,7 @@ via offsetUnit(). %Docstring Sets the offset used for drawing the background shape. Units are specified using setOffsetUnit(). + :param offset: offset for shape .. seealso:: :py:func:`offset()` @@ -530,8 +511,6 @@ setOffsetUnit(). %Docstring Returns the units used for the shape's offset. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit()` .. seealso:: :py:func:`offset()` @@ -540,6 +519,7 @@ Returns the units used for the shape's offset. void setOffsetUnit( QgsUnitTypes::RenderUnit units ); %Docstring Sets the units used for the shape's offset. + :param units: offset units .. seealso:: :py:func:`offsetUnit()` @@ -552,8 +532,6 @@ Sets the units used for the shape's offset. Returns the map unit scale object for the shape offset. This is only used if the offsetUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setOffsetMapUnitScale()` .. seealso:: :py:func:`offsetUnit()` @@ -563,6 +541,7 @@ offsetUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the shape offset. This is only used if the offsetUnit() is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for shape offset .. seealso:: :py:func:`offsetMapUnitScale()` @@ -575,8 +554,6 @@ offsetUnit() is set to QgsUnitTypes.RenderMapUnit. Returns the radii used for rounding the corners of shapes. Units are retrieved through radiiUnit(). -:rtype: QSizeF - .. seealso:: :py:func:`setRadii()` .. seealso:: :py:func:`radiiUnit()` @@ -586,6 +563,7 @@ through radiiUnit(). %Docstring Sets the radii used for rounding the corners of shapes. This is only used if type() is set to QgsTextBackgroundSettings.ShapeRectangle or QgsTextBackgroundSettings.ShapeSquare. + :param radii: QSizeF representing horizontal and vertical radii for rounded corners. Units are specified through setRadiiUnit() @@ -598,8 +576,6 @@ specified through setRadiiUnit() %Docstring Returns the units used for the shape's radii. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setRadiiUnit()` .. seealso:: :py:func:`radii()` @@ -608,6 +584,7 @@ Returns the units used for the shape's radii. void setRadiiUnit( QgsUnitTypes::RenderUnit units ); %Docstring Sets the units used for the shape's radii. + :param units: radii units .. seealso:: :py:func:`radiiUnit()` @@ -620,8 +597,6 @@ Sets the units used for the shape's radii. Returns the map unit scale object for the shape radii. This is only used if the radiiUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setRadiiMapUnitScale()` .. seealso:: :py:func:`radiiUnit()` @@ -631,6 +606,7 @@ radiiUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the shape radii. This is only used if the radiiUnit() is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for shape radii .. seealso:: :py:func:`radiiMapUnitScale()` @@ -643,14 +619,13 @@ radiiUnit() is set to QgsUnitTypes.RenderMapUnit. Returns the background shape's opacity. The opacity is a double value between 0 (fully transparent) and 1 (totally opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` %End void setOpacity( double opacity ); %Docstring Sets the background shape's opacity. + :param opacity: opacity as a double value between 0 (fully transparent) and 1 (totally opaque) @@ -661,14 +636,13 @@ opaque) %Docstring Returns the blending mode used for drawing the background shape. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End void setBlendMode( QPainter::CompositionMode mode ); %Docstring Sets the blending mode used for drawing the background shape. + :param mode: blending mode .. seealso:: :py:func:`blendMode()` @@ -678,8 +652,6 @@ Sets the blending mode used for drawing the background shape. %Docstring Returns the color used for filing the background shape. -:rtype: QColor - .. seealso:: :py:func:`setFillColor()` .. seealso:: :py:func:`strokeColor()` @@ -688,6 +660,7 @@ Returns the color used for filing the background shape. void setFillColor( const QColor &color ); %Docstring Sets the color used for filing the background shape. + :param color: background color .. seealso:: :py:func:`fillColor()` @@ -699,8 +672,6 @@ Sets the color used for filing the background shape. %Docstring Returns the color used for outlining the background shape. -:rtype: QColor - .. seealso:: :py:func:`setStrokeColor()` .. seealso:: :py:func:`fillColor()` @@ -709,6 +680,7 @@ Returns the color used for outlining the background shape. void setStrokeColor( const QColor &color ); %Docstring Sets the color used for outlining the background shape. + :param color: stroke color .. seealso:: :py:func:`strokeColor()` @@ -721,8 +693,6 @@ Sets the color used for outlining the background shape. Returns the width of the shape's stroke (stroke). Units are retrieved through strokeWidthUnit(). -:rtype: float - .. seealso:: :py:func:`setStrokeWidth()` .. seealso:: :py:func:`strokeWidthUnit()` @@ -742,8 +712,6 @@ setStrokeWidthUnit(). %Docstring Returns the units used for the shape's stroke width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setStrokeWidthUnit()` .. seealso:: :py:func:`strokeWidth()` @@ -752,6 +720,7 @@ Returns the units used for the shape's stroke width. void setStrokeWidthUnit( QgsUnitTypes::RenderUnit units ); %Docstring Sets the units used for the shape's stroke width. + :param units: stroke width units .. seealso:: :py:func:`strokeWidthUnit()` @@ -764,8 +733,6 @@ Sets the units used for the shape's stroke width. Returns the map unit scale object for the shape stroke width. This is only used if the strokeWidthUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setStrokeWidthMapUnitScale()` .. seealso:: :py:func:`strokeWidthUnit()` @@ -775,6 +742,7 @@ strokeWidthUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the shape stroke width. This is only used if the strokeWidthUnit() is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for shape stroke width .. seealso:: :py:func:`strokeWidthMapUnitScale()` @@ -786,14 +754,13 @@ strokeWidthUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Returns the join style used for drawing the background shape. -:rtype: Qt.PenJoinStyle - .. seealso:: :py:func:`setJoinStyle` %End void setJoinStyle( Qt::PenJoinStyle style ); %Docstring Sets the join style used for drawing the background shape. + :param style: join style .. seealso:: :py:func:`joinStyle()` @@ -804,8 +771,6 @@ Sets the join style used for drawing the background shape. Returns the current paint effect for the background shape. :return: paint effect -:rtype: QgsPaintEffect - .. seealso:: :py:func:`setPaintEffect()` %End @@ -813,6 +778,7 @@ Returns the current paint effect for the background shape. void setPaintEffect( QgsPaintEffect *effect /Transfer/ ); %Docstring Sets the current paint ``effect`` for the background shape. + :param effect: paint effect. Ownership is transferred to the background settings. .. seealso:: :py:func:`paintEffect()` @@ -821,6 +787,7 @@ Sets the current paint ``effect`` for the background shape. void readFromLayer( QgsVectorLayer *layer ); %Docstring Reads settings from a layer's custom properties (for QGIS 2.x projects). + :param layer: source vector layer %End @@ -835,8 +802,6 @@ Read settings from a DOM element. %Docstring Write settings into a DOM element. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End @@ -873,6 +838,7 @@ Container for settings relating to a text shadow. QgsTextShadowSettings( const QgsTextShadowSettings &other ); %Docstring Copy constructor. + :param other: source QgsTextShadowSettings %End @@ -883,14 +849,13 @@ Copy constructor. %Docstring Returns whether the shadow is enabled. -:rtype: bool - .. seealso:: :py:func:`setEnabled()` %End void setEnabled( bool enabled ); %Docstring Sets whether the text shadow will be drawn. + :param enabled: set to true to draw shadow .. seealso:: :py:func:`enabled()` @@ -902,8 +867,6 @@ Returns the placement for the drop shadow. The placement determines both the z-order stacking position for the shadow and the what shape (e.g., text, background shape) is used for casting the shadow. -:rtype: QgsTextShadowSettings.ShadowPlacement - .. seealso:: :py:func:`setShadowPlacement()` %End @@ -912,6 +875,7 @@ background shape) is used for casting the shadow. Sets the placement for the drop shadow. The placement determines both the z-order stacking position for the shadow and the what shape (e.g., text, background shape) is used for casting the shadow. + :param placement: shadow placement .. seealso:: :py:func:`shadowPlacement()` @@ -921,8 +885,6 @@ background shape) is used for casting the shadow. %Docstring Returns the angle for offsetting the position of the shadow from the text. -:rtype: int - .. seealso:: :py:func:`setOffsetAngle` .. seealso:: :py:func:`offsetDistance()` @@ -931,6 +893,7 @@ Returns the angle for offsetting the position of the shadow from the text. void setOffsetAngle( int angle ); %Docstring Sets the angle for offsetting the position of the shadow from the text. + :param angle: offset angle in degrees .. seealso:: :py:func:`offsetAngle()` @@ -943,8 +906,6 @@ Sets the angle for offsetting the position of the shadow from the text. Returns the distance for offsetting the position of the shadow from the text. Offset units are retrieved via offsetUnit(). -:rtype: float - .. seealso:: :py:func:`setOffsetDistance()` .. seealso:: :py:func:`offsetUnit()` @@ -954,6 +915,7 @@ are retrieved via offsetUnit(). %Docstring Sets the distance for offsetting the position of the shadow from the text. Offset units are specified via setOffsetUnit(). + :param distance: offset distance .. seealso:: :py:func:`offsetDistance()` @@ -965,8 +927,6 @@ are specified via setOffsetUnit(). %Docstring Returns the units used for the shadow's offset. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit()` .. seealso:: :py:func:`offsetDistance()` @@ -975,6 +935,7 @@ Returns the units used for the shadow's offset. void setOffsetUnit( QgsUnitTypes::RenderUnit units ); %Docstring Sets the units used for the shadow's offset. + :param units: shadow distance units .. seealso:: :py:func:`offsetUnit()` @@ -987,8 +948,6 @@ Sets the units used for the shadow's offset. Returns the map unit scale object for the shadow offset distance. This is only used if the offsetUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setOffsetMapUnitScale()` .. seealso:: :py:func:`offsetUnit()` @@ -998,6 +957,7 @@ offsetUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the shadow offset distance. This is only used if the offsetUnit() is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for shadow offset .. seealso:: :py:func:`offsetMapUnitScale()` @@ -1009,14 +969,13 @@ offsetUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Returns true if the global shadow offset will be used. -:rtype: bool - .. seealso:: :py:func:`setOffsetGlobal()` %End void setOffsetGlobal( bool global ); %Docstring Sets whether the global shadow offset should be used. + :param global: set to true to use global shadow offset. %End @@ -1024,8 +983,6 @@ Sets whether the global shadow offset should be used. %Docstring Returns the blur radius for the shadow. Radius units are retrieved via blurRadiusUnits(). -:rtype: float - .. seealso:: :py:func:`setBlurRadius()` .. seealso:: :py:func:`blurRadiusUnit()` @@ -1034,6 +991,7 @@ Returns the blur radius for the shadow. Radius units are retrieved via blurRadiu void setBlurRadius( double blurRadius ); %Docstring Sets the blur radius for the shadow. Radius units are specified via setBlurRadiusUnits(). + :param blurRadius: blur radius .. seealso:: :py:func:`blurRadius()` @@ -1045,8 +1003,6 @@ Sets the blur radius for the shadow. Radius units are specified via setBlurRadiu %Docstring Returns the units used for the shadow's blur radius. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setBlurRadiusUnit()` .. seealso:: :py:func:`blurRadius()` @@ -1055,6 +1011,7 @@ Returns the units used for the shadow's blur radius. void setBlurRadiusUnit( QgsUnitTypes::RenderUnit units ); %Docstring Sets the units used for the shadow's blur radius. + :param units: shadow blur radius units .. seealso:: :py:func:`blurRadiusUnit()` @@ -1067,8 +1024,6 @@ Sets the units used for the shadow's blur radius. Returns the map unit scale object for the shadow blur radius. This is only used if the blurRadiusUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setBlurRadiusMapUnitScale()` .. seealso:: :py:func:`blurRadiusUnit()` @@ -1078,6 +1033,7 @@ blurRadiusUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Sets the map unit scale object for the shadow blur radius. This is only used if the blurRadiusUnit() is set to QgsUnitTypes.RenderMapUnit. + :param scale: scale for shadow blur radius .. seealso:: :py:func:`blurRadiusMapUnitScale()` @@ -1089,14 +1045,13 @@ blurRadiusUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Returns whether only the alpha channel for the shadow will be blurred. -:rtype: bool - .. seealso:: :py:func:`setBlurAlphaOnly()` %End void setBlurAlphaOnly( bool alphaOnly ); %Docstring Sets whether only the alpha channel for the shadow should be blurred. + :param alphaOnly: set to true to blur only the alpha channel. If false, all channels (including red, green and blue channel) will be blurred. @@ -1108,14 +1063,13 @@ red, green and blue channel) will be blurred. Returns the shadow's opacity. The opacity is a double value between 0 (fully transparent) and 1 (totally opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` %End void setOpacity( double opacity ); %Docstring Sets the shadow's opacity. + :param opacity: opacity as a double value between 0 (fully transparent) and 1 (totally opaque) @@ -1126,14 +1080,13 @@ opaque) %Docstring Returns the scaling used for the drop shadow (in percentage of original size). -:rtype: int - .. seealso:: :py:func:`setScale()` %End void setScale( int scale ); %Docstring Sets the scaling used for the drop shadow (in percentage of original size). + :param scale: scale percent for drop shadow .. seealso:: :py:func:`scale()` @@ -1143,14 +1096,13 @@ Sets the scaling used for the drop shadow (in percentage of original size). %Docstring Returns the color of the drop shadow. -:rtype: QColor - .. seealso:: :py:func:`setColor()` %End void setColor( const QColor &color ); %Docstring Sets the color for the drop shadow. + :param color: shadow color .. seealso:: :py:func:`color()` @@ -1160,14 +1112,13 @@ Sets the color for the drop shadow. %Docstring Returns the blending mode used for drawing the drop shadow. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End void setBlendMode( QPainter::CompositionMode mode ); %Docstring Sets the blending mode used for drawing the drop shadow. + :param mode: blending mode .. seealso:: :py:func:`blendMode()` @@ -1176,6 +1127,7 @@ Sets the blending mode used for drawing the drop shadow. void readFromLayer( QgsVectorLayer *layer ); %Docstring Reads settings from a layer's custom properties (for QGIS 2.x projects). + :param layer: source vector layer %End @@ -1190,8 +1142,6 @@ Read settings from a DOM element. %Docstring Write settings into a DOM element. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End @@ -1221,6 +1171,7 @@ Container for all settings relating to text rendering. QgsTextFormat( const QgsTextFormat &other ); %Docstring Copy constructor. + :param other: source QgsTextFormat %End @@ -1231,8 +1182,6 @@ Copy constructor. %Docstring Returns a reference to the text buffer settings. -:rtype: QgsTextBufferSettings - .. seealso:: :py:func:`setBuffer()` %End @@ -1240,6 +1189,7 @@ Returns a reference to the text buffer settings. void setBuffer( const QgsTextBufferSettings &bufferSettings ); %Docstring Sets the text's buffer settings. + :param bufferSettings: buffer settings .. seealso:: :py:func:`buffer()` @@ -1249,8 +1199,6 @@ Sets the text's buffer settings. %Docstring Returns a reference to the text background settings. -:rtype: QgsTextBackgroundSettings - .. seealso:: :py:func:`setBackground()` %End @@ -1258,6 +1206,7 @@ Returns a reference to the text background settings. void setBackground( const QgsTextBackgroundSettings &backgroundSettings ); %Docstring Sets the text's background settings.q + :param backgroundSettings: background settings .. seealso:: :py:func:`background()` @@ -1267,8 +1216,6 @@ Sets the text's background settings.q %Docstring Returns a reference to the text drop shadow settings. -:rtype: QgsTextShadowSettings - .. seealso:: :py:func:`setShadow()` %End @@ -1276,6 +1223,7 @@ Returns a reference to the text drop shadow settings. void setShadow( const QgsTextShadowSettings &shadowSettings ); %Docstring Sets the text's drop shadow settings. + :param shadowSettings: shadow settings .. seealso:: :py:func:`shadow()` @@ -1287,8 +1235,6 @@ Returns the font used for rendering text. Note that the size of the font is not used, and size() should be called instead to determine the size of rendered text. -:rtype: QFont - .. seealso:: :py:func:`scaledFont()` .. seealso:: :py:func:`setFont()` @@ -1300,11 +1246,10 @@ of rendered text. %Docstring Returns a font with the size scaled to match the format's size settings (including units and map unit scale) for a specified render context. + :param context: destination render context :return: font with scaled size -:rtype: QFont - .. seealso:: :py:func:`font()` @@ -1316,6 +1261,7 @@ units and map unit scale) for a specified render context. Sets the font used for rendering text. Note that the size of the font is not used, and setSize() should be called instead to explicitly set the size of rendered text. + :param font: desired font .. seealso:: :py:func:`font()` @@ -1327,8 +1273,6 @@ of rendered text. %Docstring Returns the named style for the font used for rendering text (e.g., "bold"). -:rtype: str - .. seealso:: :py:func:`setNamedStyle()` .. seealso:: :py:func:`font()` @@ -1337,6 +1281,7 @@ Returns the named style for the font used for rendering text (e.g., "bold"). void setNamedStyle( const QString &style ); %Docstring Sets the named style for the font used for rendering text. + :param style: named style, e.g., "bold" .. seealso:: :py:func:`namedStyle()` @@ -1348,8 +1293,6 @@ Sets the named style for the font used for rendering text. %Docstring Returns the size for rendered text. Units are retrieved using sizeUnit(). -:rtype: float - .. seealso:: :py:func:`setSize()` .. seealso:: :py:func:`sizeUnit()` @@ -1358,6 +1301,7 @@ Returns the size for rendered text. Units are retrieved using sizeUnit(). void setSize( double size ); %Docstring Sets the size for rendered text. + :param size: size of rendered text. Units are set using setSizeUnit() .. seealso:: :py:func:`size()` @@ -1369,8 +1313,6 @@ Sets the size for rendered text. %Docstring Returns the units for the size of rendered text. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`size()` .. seealso:: :py:func:`setSizeUnit()` @@ -1381,6 +1323,7 @@ Returns the units for the size of rendered text. void setSizeUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the size of rendered text. + :param unit: size units .. seealso:: :py:func:`setSize()` @@ -1395,8 +1338,6 @@ Sets the units for the size of rendered text. Returns the map unit scale object for the size. This is only used if the sizeUnit() is set to QgsUnitTypes.RenderMapUnit. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setSizeMapUnitScale()` .. seealso:: :py:func:`sizeUnit()` @@ -1416,14 +1357,13 @@ sizeUnit() is set to QgsUnitTypes.RenderMapUnit. %Docstring Returns the color that text will be rendered in. -:rtype: QColor - .. seealso:: :py:func:`setColor()` %End void setColor( const QColor &color ); %Docstring Sets the color that text will be rendered in. + :param color: text color .. seealso:: :py:func:`color()` @@ -1434,14 +1374,13 @@ Sets the color that text will be rendered in. Returns the text's opacity. The opacity is a double value between 0 (fully transparent) and 1 (totally opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` %End void setOpacity( double opacity ); %Docstring Sets the text's opacity. + :param opacity: opacity as a double value between 0 (fully transparent) and 1 (totally opaque) @@ -1452,14 +1391,13 @@ opaque) %Docstring Returns the blending mode used for drawing the text. -:rtype: QPainter.CompositionMode - .. seealso:: :py:func:`setBlendMode()` %End void setBlendMode( QPainter::CompositionMode mode ); %Docstring Sets the blending mode used for drawing the text. + :param mode: blending mode .. seealso:: :py:func:`blendMode()` @@ -1471,14 +1409,13 @@ Returns the line height for text. This is a number between 0.0 and 10.0 representing the leading between lines as a multiplier of line height. -:rtype: float - .. seealso:: :py:func:`setLineHeight()` %End void setLineHeight( double height ); %Docstring Sets the line height for text. + :param height: a number between 0.0 and 10.0 representing the leading between lines as a multiplier of line height. @@ -1489,6 +1426,7 @@ multiplier of line height. void readFromLayer( QgsVectorLayer *layer ); %Docstring Reads settings from a layer's custom properties (for QGIS 2.x projects). + :param layer: source vector layer %End @@ -1503,8 +1441,6 @@ Read settings from a DOM element. %Docstring Write settings into a DOM element. -:rtype: QDomElement - .. seealso:: :py:func:`readXml()` %End @@ -1513,8 +1449,6 @@ Write settings into a DOM element. Returns new mime data representing the text format settings. Caller takes responsibility for deleting the returned object. -:rtype: QMimeData - .. seealso:: :py:func:`fromMimeData()` %End @@ -1523,8 +1457,6 @@ Caller takes responsibility for deleting the returned object. Attempts to parse the provided mime ``data`` as a QgsTextFormat. If data can be parsed as a text format, ``ok`` will be set to true. -:rtype: QgsTextFormat - .. seealso:: :py:func:`toMimeData()` %End @@ -1532,8 +1464,6 @@ If data can be parsed as a text format, ``ok`` will be set to true. %Docstring Returns true if any component of the font format requires advanced effects such as blend modes, which require output in raster formats to be fully respected. - -:rtype: bool %End bool fontFound() const; @@ -1541,8 +1471,6 @@ such as blend modes, which require output in raster formats to be fully respecte Returns true if the specified font was found on the system, or false if the font was not found and a replacement was used instead. -:rtype: bool - .. seealso:: :py:func:`resolvedFontFamily()` %End @@ -1552,8 +1480,6 @@ Returns the family for the resolved font, ie if the specified font was not found on the system this will return the name of the replacement font. -:rtype: str - .. seealso:: :py:func:`fontFound()` %End @@ -1592,14 +1518,13 @@ and background shapes. static int sizeToPixel( double size, const QgsRenderContext &c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale &mapUnitScale = QgsMapUnitScale() ); %Docstring Calculates pixel size (considering output size should be in pixel or map units, scale factors and optionally oversampling) + :param size: size to convert :param c: rendercontext :param unit: size units :param mapUnitScale: a mapUnitScale clamper :return: font pixel size -:rtype: int - %End static void drawText( const QRectF &rect, double rotation, HAlignment alignment, const QStringList &textLines, @@ -1607,6 +1532,7 @@ Calculates pixel size (considering output size should be in pixel or map units, bool drawAsOutlines = true ); %Docstring Draws text within a rectangle using the specified settings. + :param rect: destination rectangle for text :param rotation: text rotation :param alignment: horizontal alignment @@ -1623,6 +1549,7 @@ rendering and may result in side effects like misaligned text buffers. bool drawAsOutlines = true ); %Docstring Draws text at a point origin using the specified settings. + :param point: origin of text :param rotation: text rotation :param alignment: horizontal alignment @@ -1639,6 +1566,7 @@ rendering and may result in side effects like misaligned text buffers. TextPart part, bool drawAsOutlines = true ); %Docstring Draws a single component of rendered text using the specified settings. + :param rect: destination rectangle for text :param rotation: text rotation :param alignment: horizontal alignment @@ -1658,6 +1586,7 @@ rendering and may result in side effects like misaligned text buffers. TextPart part, bool drawAsOutlines = true ); %Docstring Draws a single component of rendered text using the specified settings. + :param origin: origin for start of text. Y coordinate will be used as baseline. :param rotation: text rotation :param alignment: horizontal alignment diff --git a/python/core/qgstolerance.sip b/python/core/qgstolerance.sip index 4eb8cac3ede0..b66f4a3d8bb4 100644 --- a/python/core/qgstolerance.sip +++ b/python/core/qgstolerance.sip @@ -36,8 +36,6 @@ Static function to get vertex tolerance value. The value is read from settings and transformed if necessary. :return: value of vertex tolerance in map units (not layer units) -:rtype: float - .. versionadded:: 2.8 %End @@ -48,8 +46,6 @@ Static function to get vertex tolerance value for a layer. The value is read from settings and transformed if necessary. :return: value of vertex tolerance in layer units -:rtype: float - %End static double defaultTolerance( QgsMapLayer *layer, const QgsMapSettings &mapSettings ); @@ -58,21 +54,18 @@ Static function to get default tolerance value for a layer. The value is read from settings and transformed if necessary. :return: value of default tolerance in layer units -:rtype: float - %End static double toleranceInProjectUnits( double tolerance, QgsMapLayer *layer, const QgsMapSettings &mapSettings, QgsTolerance::UnitType units ); %Docstring Static function to translate tolerance value into map units + :param tolerance: tolerance value to be translated :param layer: source layer necessary in case tolerance is in layer units :param mapSettings: settings of the map :param units: type of units to be translated :return: value of tolerance in map units -:rtype: float - .. versionadded:: 2.8 %End @@ -80,14 +73,13 @@ Static function to translate tolerance value into map units static double toleranceInMapUnits( double tolerance, QgsMapLayer *layer, const QgsMapSettings &mapSettings, UnitType units = LayerUnits ); %Docstring Static function to translate tolerance value into layer units + :param tolerance: tolerance value to be translated :param layer: reference layer :param mapSettings: settings of the map :param units: type of units to be translated :return: value of tolerance in layer units -:rtype: float - %End }; diff --git a/python/core/qgstracer.sip b/python/core/qgstracer.sip index f2dea7114915..f6621e2992b3 100644 --- a/python/core/qgstracer.sip +++ b/python/core/qgstracer.sip @@ -35,8 +35,6 @@ Constructor for QgsTracer. QList layers() const; %Docstring Get layers used for tracing - -:rtype: list of QgsVectorLayer %End void setLayers( const QList &layers ); %Docstring @@ -46,8 +44,6 @@ Set layers used for tracing QgsCoordinateReferenceSystem destinationCrs() const; %Docstring Get CRS used for tracing - -:rtype: QgsCoordinateReferenceSystem %End void setDestinationCrs( const QgsCoordinateReferenceSystem &crs ); %Docstring @@ -57,8 +53,6 @@ Set CRS used for tracing QgsRectangle extent() const; %Docstring Get extent to which graph's features will be limited (empty extent means no limit) - -:rtype: QgsRectangle %End void setExtent( const QgsRectangle &extent ); %Docstring @@ -70,8 +64,6 @@ Set extent to which graph's features will be limited (empty extent means no limi Get offset in map units that should be applied to the traced paths returned from findShortestPath(). Positive offset for right side, negative offset for left side. -:rtype: float - .. versionadded:: 3.0 %End @@ -100,8 +92,6 @@ Set extra parameters for offset curve algorithm (used when offset is non-zero) int maxFeatureCount() const; %Docstring Get maximum possible number of features in graph. If the number is exceeded, graph is not created. - -:rtype: int %End void setMaxFeatureCount( int count ); %Docstring @@ -114,15 +104,11 @@ Build the internal data structures. This may take some time depending on how big the input layers are. It is not necessary to call this method explicitly - it will be called by findShortestPath() if necessary. - -:rtype: bool %End bool isInitialized() const; %Docstring Whether the internal data structures have been initialized - -:rtype: bool %End bool hasTopologyProblem() const; @@ -130,8 +116,6 @@ Whether the internal data structures have been initialized Whether there was an error during graph creation due to noding exception, indicating some input data topology problems -:rtype: bool - .. versionadded:: 2.16 %End @@ -150,15 +134,11 @@ Given two points, find the shortest path and return points on the way. The optional "error" argument may receive error code (PathError enum) if it is not null :return: array of points - trace of linestrings of other features (empty array one error) -:rtype: list of QgsPointXY - %End bool isPointSnapped( const QgsPointXY &pt ); %Docstring Find out whether the point is snapped to a vertex or edge (i.e. it can be used for tracing start/stop) - -:rtype: bool %End protected: diff --git a/python/core/qgstransaction.sip b/python/core/qgstransaction.sip index 0c80e6a3f484..a6f2da757997 100644 --- a/python/core/qgstransaction.sip +++ b/python/core/qgstransaction.sip @@ -45,8 +45,6 @@ Edits on features can get rejected if another conflicting transaction is active. %Docstring Create a transaction for the specified connection string ``connString`` and provider with ``providerKey``. - -:rtype: QgsTransaction %End static QgsTransaction *create( const QSet &layers ) /Factory/; @@ -54,8 +52,6 @@ and provider with ``providerKey``. Create a transaction which includes the ``layers``. All layers are expected to have the same connection string and data provider. - -:rtype: QgsTransaction %End ~QgsTransaction(); @@ -64,8 +60,6 @@ provider. %Docstring Add the ``layer`` to the transaction. The layer must not be in edit mode and the connection string must match. - -:rtype: bool %End bool begin( QString &errorMsg /Out/, int statementTimeout = 20 ); @@ -78,22 +72,16 @@ statement would produce a conflicting state. In these cases, the statements block until the conflicting transaction is committed or rolled back. Some providers might not honour the statement timeout. - -:rtype: bool %End bool commit( QString &errorMsg /Out/ ); %Docstring Commit transaction. - -:rtype: bool %End bool rollback( QString &errorMsg /Out/ ); %Docstring Roll back transaction. - -:rtype: bool %End virtual bool executeSql( const QString &sql, QString &error /Out/, bool isDirty = false ) = 0; @@ -105,15 +93,11 @@ Execute the ``sql`` string. :param isDirty: Flag to indicate if the underlying data will be modified :return: true if everything is OK, false otherwise -:rtype: bool - %End static bool supportsTransaction( const QgsVectorLayer *layer ); %Docstring Checks if the provider of a given ``layer`` supports transactions. - -:rtype: bool %End QString createSavepoint( QString &error /Out/ ); @@ -122,8 +106,6 @@ creates a save point returns empty string on error returns the last created savepoint if it's not dirty -:rtype: str - .. versionadded:: 3.0 %End @@ -132,8 +114,6 @@ returns the last created savepoint if it's not dirty creates a save point returns empty string on error -:rtype: str - .. versionadded:: 3.0 %End @@ -141,8 +121,6 @@ returns empty string on error %Docstring rollback to save point, the save point is maintained and is "undertied" -:rtype: bool - .. versionadded:: 3.0 %End @@ -157,8 +135,6 @@ dirty save point such that next call to createSavepoint will create a new one %Docstring returns savepoints -:rtype: list of str - .. versionadded:: 3.0 %End @@ -166,8 +142,6 @@ returns savepoints %Docstring returns the last created savepoint -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/core/qgstransactiongroup.sip b/python/core/qgstransactiongroup.sip index 571af5040d9c..54ff5db1ea70 100644 --- a/python/core/qgstransactiongroup.sip +++ b/python/core/qgstransactiongroup.sip @@ -26,8 +26,6 @@ Constructor for QgsTransactionGroup Add a layer to this transaction group. Will return true if it is compatible and has been added. - -:rtype: bool %End QSet layers() const; @@ -35,38 +33,28 @@ Will return true if it is compatible and has been added. Get the set of layers currently managed by this transaction group. :return: Layer set -:rtype: set of QgsVectorLayer - %End bool modified() const; %Docstring Returns true if any of the layers in this group reports a modification. - -:rtype: bool %End QString connString() const; %Docstring Return the connection string used by this transaction group. Layers need be compatible when added. - -:rtype: str %End QString providerKey() const; %Docstring Return the provider key used by this transaction group. Layers need be compatible when added. - -:rtype: str %End bool isEmpty() const; %Docstring Returns true if there are no layers in this transaction group. - -:rtype: bool %End signals: diff --git a/python/core/qgsunittypes.sip b/python/core/qgsunittypes.sip index 4dfe3d189b1d..4bd72c2bf2ba 100644 --- a/python/core/qgsunittypes.sip +++ b/python/core/qgsunittypes.sip @@ -135,18 +135,15 @@ The value part of the distance. For 3.7 square meters, this will be QgsUnitTypes static DistanceUnitType unitType( QgsUnitTypes::DistanceUnit unit ); %Docstring Returns the type for a distance unit. - -:rtype: DistanceUnitType %End static QString encodeUnit( QgsUnitTypes::DistanceUnit unit ); %Docstring Encodes a distance unit to a string. + :param unit: unit to encode :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeDistanceUnit()` %End @@ -154,12 +151,11 @@ Encodes a distance unit to a string. static QgsUnitTypes::DistanceUnit decodeDistanceUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Decodes a distance unit from a string. + :param string: string to decode :param ok: optional boolean, will be set to true if string was converted successfully :return: decoded units -:rtype: QgsUnitTypes.DistanceUnit - .. seealso:: :py:func:`encodeUnit()` %End @@ -167,9 +163,8 @@ Decodes a distance unit from a string. static QString toString( QgsUnitTypes::DistanceUnit unit ); %Docstring Returns a translated string representing a distance unit. -:param unit: unit to convert to string -:rtype: str +:param unit: unit to convert to string .. seealso:: :py:func:`stringToDistanceUnit()` %End @@ -177,9 +172,8 @@ Returns a translated string representing a distance unit. static QString toAbbreviatedString( QgsUnitTypes::DistanceUnit unit ); %Docstring Returns a translated abbreviation representing a distance unit. -:param unit: unit to convert to string -:rtype: str +:param unit: unit to convert to string .. seealso:: :py:func:`stringToDistanceUnit()` @@ -189,41 +183,36 @@ Returns a translated abbreviation representing a distance unit. static QgsUnitTypes::DistanceUnit stringToDistanceUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Converts a translated string to a distance unit. + :param string: string representing a distance unit :param ok: optional boolean, will be set to true if string was converted successfully -:rtype: QgsUnitTypes.DistanceUnit - .. seealso:: :py:func:`toString()` %End static double fromUnitToUnitFactor( QgsUnitTypes::DistanceUnit fromUnit, QgsUnitTypes::DistanceUnit toUnit ); %Docstring Returns the conversion factor between the specified distance units. + :param fromUnit: distance unit to convert from :param toUnit: distance unit to convert to :return: multiplication factor to convert between units -:rtype: float - %End static DistanceUnitType unitType( AreaUnit unit ); %Docstring Returns the type for an areal unit. - -:rtype: DistanceUnitType %End static QString encodeUnit( AreaUnit unit ); %Docstring Encodes an areal unit to a string. + :param unit: unit to encode :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeAreaUnit()` %End @@ -231,12 +220,11 @@ Encodes an areal unit to a string. static AreaUnit decodeAreaUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Decodes an areal unit from a string. + :param string: string to decode :param ok: optional boolean, will be set to true if string was converted successfully :return: decoded units -:rtype: AreaUnit - .. seealso:: :py:func:`encodeUnit()` %End @@ -244,9 +232,8 @@ Decodes an areal unit from a string. static QString toString( AreaUnit unit ); %Docstring Returns a translated string representing an areal unit. -:param unit: unit to convert to string -:rtype: str +:param unit: unit to convert to string .. seealso:: :py:func:`stringToAreaUnit()` %End @@ -254,9 +241,8 @@ Returns a translated string representing an areal unit. static QString toAbbreviatedString( AreaUnit unit ); %Docstring Returns a translated abbreviation representing an areal unit. -:param unit: unit to convert to string -:rtype: str +:param unit: unit to convert to string .. seealso:: :py:func:`stringToAreaUnit()` @@ -266,44 +252,40 @@ Returns a translated abbreviation representing an areal unit. static AreaUnit stringToAreaUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Converts a translated string to an areal unit. + :param string: string representing an areal unit :param ok: optional boolean, will be set to true if string was converted successfully -:rtype: AreaUnit - .. seealso:: :py:func:`toString()` %End static double fromUnitToUnitFactor( AreaUnit fromUnit, AreaUnit toUnit ); %Docstring Returns the conversion factor between the specified areal units. + :param fromUnit: area unit to convert from :param toUnit: area unit to convert to :return: multiplication factor to convert between units -:rtype: float - %End static AreaUnit distanceToAreaUnit( QgsUnitTypes::DistanceUnit distanceUnit ); %Docstring Converts a distance unit to its corresponding area unit, e.g., meters to square meters + :param distanceUnit: distance unit to convert :return: matching areal unit -:rtype: AreaUnit - %End static QString encodeUnit( AngleUnit unit ); %Docstring Encodes an angular unit to a string. + :param unit: unit to encode :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeAngleUnit()` %End @@ -311,12 +293,11 @@ Encodes an angular unit to a string. static AngleUnit decodeAngleUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Decodes an angular unit from a string. + :param string: string to decode :param ok: optional boolean, will be set to true if string was converted successfully :return: decoded units -:rtype: AngleUnit - .. seealso:: :py:func:`encodeUnit()` %End @@ -324,32 +305,29 @@ Decodes an angular unit from a string. static QString toString( AngleUnit unit ); %Docstring Returns a translated string representing an angular unit. -:param unit: unit to convert to string -:rtype: str +:param unit: unit to convert to string %End static double fromUnitToUnitFactor( AngleUnit fromUnit, AngleUnit toUnit ); %Docstring Returns the conversion factor between the specified angular units. + :param fromUnit: angle unit to convert from :param toUnit: angle unit to convert to :return: multiplication factor to convert between units -:rtype: float - %End static QString formatAngle( double angle, int decimals, AngleUnit unit ); %Docstring Returns an angle formatted as a friendly string. + :param angle: angle to format :param decimals: number of decimal places to show :param unit: unit of angle :return: formatted angle string -:rtype: str - %End @@ -361,8 +339,6 @@ if appropriate, unless forced otherwise with ``keepBaseUnit``. The value will also be rounded to ``decimals`` (be prepared that the returned value is still a double so it will require further formatting when converting to a string). -:rtype: QgsUnitTypes.DistanceValue - .. versionadded:: 3.0 %End @@ -374,14 +350,13 @@ if appropriate, unless forced otherwise with ``keepBaseUnit``. The value will also be rounded to ``decimals`` (be prepared that the returned value is still a double so it will require further formatting when converting to a string). -:rtype: QgsUnitTypes.AreaValue - .. versionadded:: 3.0 %End static QString formatDistance( double distance, int decimals, QgsUnitTypes::DistanceUnit unit, bool keepBaseUnit = false ); %Docstring Returns an distance formatted as a friendly string. + :param distance: distance to format :param decimals: number of decimal places to show :param unit: unit of distance @@ -389,8 +364,6 @@ Returns an distance formatted as a friendly string. kilometers :return: formatted distance string -:rtype: str - .. versionadded:: 3.0 @@ -400,6 +373,7 @@ kilometers static QString formatArea( double area, int decimals, QgsUnitTypes::AreaUnit unit, bool keepBaseUnit = false ); %Docstring Returns an area formatted as a friendly string. + :param area: area to format :param decimals: number of decimal places to show :param unit: unit of area @@ -407,8 +381,6 @@ Returns an area formatted as a friendly string. square kilometers :return: formatted area string -:rtype: str - .. versionadded:: 3.0 @@ -419,11 +391,10 @@ square kilometers static QString encodeUnit( RenderUnit unit ); %Docstring Encodes a render unit to a string. + :param unit: unit to encode :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeRenderUnit()` %End @@ -431,12 +402,11 @@ Encodes a render unit to a string. static RenderUnit decodeRenderUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Decodes a render unit from a string. + :param string: string to decode :param ok: optional boolean, will be set to true if string was converted successfully :return: decoded units -:rtype: RenderUnit - .. seealso:: :py:func:`encodeUnit()` %End @@ -445,8 +415,6 @@ Decodes a render unit from a string. %Docstring Returns a translated string representing a render ``unit``. -:rtype: str - .. versionadded:: 3.0 %End @@ -455,11 +423,10 @@ Returns a translated string representing a render ``unit``. static QString encodeUnit( LayoutUnit unit ); %Docstring Encodes a layout unit to a string. + :param unit: unit to encode :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeLayoutUnit()` @@ -469,12 +436,11 @@ Encodes a layout unit to a string. static LayoutUnit decodeLayoutUnit( const QString &string, bool *ok /Out/ = 0 ); %Docstring Decodes a layout unit from a string. + :param string: string to decode :param ok: optional boolean, will be set to true if string was converted successfully :return: decoded units -:rtype: LayoutUnit - .. seealso:: :py:func:`encodeUnit()` @@ -485,8 +451,6 @@ Decodes a layout unit from a string. %Docstring Returns the type for a unit of measurement. -:rtype: LayoutUnitType - .. versionadded:: 3.0 %End @@ -494,8 +458,6 @@ Returns the type for a unit of measurement. %Docstring Returns a translated abbreviation representing a layout ``unit`` (e.g. "mm"). -:rtype: str - .. versionadded:: 3.0 %End @@ -503,8 +465,6 @@ Returns a translated abbreviation representing a layout ``unit`` (e.g. "mm"). %Docstring Returns a translated string representing a layout ``unit``. -:rtype: str - .. versionadded:: 3.0 %End diff --git a/python/core/qgsuserprofile.sip b/python/core/qgsuserprofile.sip index e414bcebbf9c..f5764d5390e3 100644 --- a/python/core/qgsuserprofile.sip +++ b/python/core/qgsuserprofile.sip @@ -30,28 +30,23 @@ A user profile is all settings and anything that used to be found in .qgis3 in t %Docstring Reference to a existing user profile folder. Profile folder should be created using QgsProfileManager. + :param folder: An existing profile folder as the base of the user profile. %End const QString folder() const; %Docstring The base folder for the user profile. - -:rtype: str %End QgsError validate() const; %Docstring Check of the profile is in a valid state. - -:rtype: QgsError %End const QString name() const; %Docstring The name for the user profile. - -:rtype: str %End void initSettings() const; @@ -64,18 +59,15 @@ Init the settings from the user folder. Return the alias for the user profile. :return: If no alias is set name() is returned. -:rtype: str - %End QgsError setAlias( const QString &alias ); %Docstring Set the alias of the profile. The alias is a user friendly name. + :param alias: A user friendly name for the profile. :return: True of setting the alias was successful. -:rtype: QgsError - %End const QIcon icon() const; @@ -83,8 +75,6 @@ Set the alias of the profile. The alias is a user friendly name. The icon for the user profile. :return: A QIcon for the users -:rtype: QIcon - %End }; diff --git a/python/core/qgsuserprofilemanager.sip b/python/core/qgsuserprofilemanager.sip index 172155cb709f..f2f8952469ae 100644 --- a/python/core/qgsuserprofilemanager.sip +++ b/python/core/qgsuserprofilemanager.sip @@ -37,11 +37,10 @@ User profile manager used to manage user profiles for the instance of QGIS. static QString resolveProfilesFolder( const QString &basePath = QString() ); %Docstring Resolves the profiles folder for the given path. Path will have \\profiles appended to the path + :param basePath: The base path to resolve the path from to append the \\profiles folder to. :return: The root path to store user profiles. -:rtype: str - %End QgsUserProfile *getProfile( const QString &defaultProfile = "default", bool createNew = true, bool initSettings = true ) /Factory/; @@ -51,11 +50,10 @@ If no name is given it returns a profile called "default". By default will create the profile folder if not found. By default will init the user settings. -:rtype: QgsUserProfile - .. note:: Returns a new QgsUserProfile. Ownership transferred to caller. + :param defaultProfile: The profile name to find. Empty profile name will return "default" for the name. :param createNew: Create the profile folder if it doesn't exist. :param initSettings: if the settings should be initialized @@ -67,6 +65,7 @@ By default will init the user settings. %Docstring Set the root profile location for the profile manager. All profiles are loaded from this location. Will also contain a profiles.ini for holding profile settings. + :param rootProfileLocation: Path to the top level profile folder which contains folders for each profile. %End @@ -75,8 +74,6 @@ location. Will also contain a profiles.ini for holding profile settings. Returns the path to the root profiles location. :return: The root path to the profiles folder. -:rtype: str - %End void setNewProfileNotificationEnabled( bool enabled ); @@ -97,8 +94,6 @@ Returns whether the manager is watching for the creation of new user profiles an the profilesChanged() signal when this occurs. By default new profile notification is disabled. -:rtype: bool - .. seealso:: :py:func:`setNewProfileNotificationEnabled()` %End @@ -107,8 +102,6 @@ is disabled. Check if the root location has been set for the manager. :return: True if the root location has been set. -:rtype: bool - %End QStringList allProfiles() const; @@ -116,8 +109,6 @@ Check if the root location has been set for the manager. A list of all found profile names. :return: -:rtype: list of str - %End bool profileExists( const QString &name ) const; @@ -125,8 +116,6 @@ A list of all found profile names. Check if a profile exists. :return: False if the profile can't be found. -:rtype: bool - %End QString defaultProfileName() const; @@ -136,8 +125,6 @@ First checks profile.ini in \\profiles folder Then checks defaultProfile in global settings Finally returns "default" if all else fails -:rtype: str - .. note:: Setting overrideLocalProfile in global settings will always ignore profiles.ini @@ -149,6 +136,7 @@ Finally returns "default" if all else fails %Docstring Sets the default profile name. The default profile name is used when loading QGIS with no arguments. + :param name: The name of the profile to save. %End @@ -160,32 +148,29 @@ Set the default profile name from the current active profile. QgsUserProfile *profileForName( const QString &name ) const /Factory/; %Docstring Return the profile found for a given name. + :param name: The name of the profile to return. :return: A QgsUserprofile pointing to the location of the user profile. -:rtype: QgsUserProfile - %End QgsError createUserProfile( const QString &name ); %Docstring Create a user profile given by the name + :param name: :return: A QgsError which report if there was any error creating the user profile. -:rtype: QgsError - %End QgsError deleteProfile( const QString &name ); %Docstring Deletes a profile from the root profiles folder. -:rtype: QgsError - .. note:: There is no undo on this as it deletes the folder from the machine. + :param name: The name of the profile to delete. :return: A QgsError with a message if the profile failed to be deleted. @@ -196,8 +181,6 @@ Deletes a profile from the root profiles folder. The currently active user profile. :return: The currently active user profile. -:rtype: QgsUserProfile - %End void setActiveUserProfile( const QString &profile ); @@ -212,6 +195,7 @@ Setting this again does nothing. void loadUserProfile( const QString &name ); %Docstring Starts a new instance of QGIS for the given profile. + :param name: The profile to start QGIS with. %End diff --git a/python/core/qgsvector.sip b/python/core/qgsvector.sip index 23b1d8e0beb1..9750f1484d8f 100644 --- a/python/core/qgsvector.sip +++ b/python/core/qgsvector.sip @@ -28,6 +28,7 @@ Default constructor for QgsVector. Creates a vector with length of 0.0. QgsVector( double x, double y ); %Docstring Constructor for QgsVector taking x and y component values. + :param x: x-component :param y: y-component %End @@ -35,24 +36,20 @@ Constructor for QgsVector taking x and y component values. QgsVector operator-() const; %Docstring Swaps the sign of the x and y components of the vector. - -:rtype: QgsVector %End QgsVector operator*( double scalar ) const; %Docstring Returns a vector where the components have been multiplied by a scalar value. -:param scalar: factor to multiply by -:rtype: QgsVector +:param scalar: factor to multiply by %End QgsVector operator/( double scalar ) const; %Docstring Returns a vector where the components have been divided by a scalar value. -:param scalar: factor to divide by -:rtype: QgsVector +:param scalar: factor to divide by %End double operator*( QgsVector v ) const; @@ -60,16 +57,12 @@ Returns a vector where the components have been divided by a scalar value. Returns the dot product of two vectors, which is the sum of the x component of this vector multiplied by the x component of another vector plus the y component of this vector multiplied by the y component of another vector. - -:rtype: float %End QgsVector operator+( QgsVector other ) const; %Docstring Adds another vector to this vector. -:rtype: QgsVector - .. versionadded:: 3.0 %End @@ -77,8 +70,6 @@ Adds another vector to this vector. %Docstring Adds another vector to this vector in place. -:rtype: QgsVector - .. versionadded:: 3.0 %End @@ -86,8 +77,6 @@ Adds another vector to this vector in place. %Docstring Subtracts another vector to this vector. -:rtype: QgsVector - .. versionadded:: 3.0 %End @@ -95,24 +84,18 @@ Subtracts another vector to this vector. %Docstring Subtracts another vector to this vector in place. -:rtype: QgsVector - .. versionadded:: 3.0 %End double length() const; %Docstring Returns the length of the vector. - -:rtype: float %End double x() const; %Docstring Returns the vector's x-component. -:rtype: float - .. seealso:: y() %End @@ -120,46 +103,35 @@ Returns the vector's x-component. %Docstring Returns the vector's y-component. -:rtype: float - .. seealso:: x() %End QgsVector perpVector() const; %Docstring Returns the perpendicular vector to this vector (rotated 90 degrees counter-clockwise) - -:rtype: QgsVector %End double angle() const; %Docstring Returns the angle of the vector in radians. - -:rtype: float %End double angle( QgsVector v ) const; %Docstring Returns the angle between this vector and another vector in radians. - -:rtype: float %End QgsVector rotateBy( double rot ) const; %Docstring Rotates the vector by a specified angle. -:param rot: angle in radians -:rtype: QgsVector +:param rot: angle in radians %End QgsVector normalized() const; %Docstring Returns the vector's normalized (or "unit") vector (ie same angle but length of 1.0). Will throw a QgsException if called on a vector with length of 0. - -:rtype: QgsVector %End bool operator==( QgsVector other ) const; @@ -167,8 +139,6 @@ Will throw a QgsException if called on a vector with length of 0. bool operator!=( QgsVector other ) const; %Docstring Inequality operator - -:rtype: bool %End }; diff --git a/python/core/qgsvectordataprovider.sip b/python/core/qgsvectordataprovider.sip index ccb1f7a66f1c..fb9039bd0fa4 100644 --- a/python/core/qgsvectordataprovider.sip +++ b/python/core/qgsvectordataprovider.sip @@ -69,6 +69,7 @@ Bitmask of all provider's editing capabilities QgsVectorDataProvider( const QString &uri = QString() ); %Docstring Constructor of the vector provider + :param uri: uniform resource locator (URI) for a dataset %End @@ -86,8 +87,6 @@ In such cases, the implementation must ensure that the data is not susceptible t if it is possible that both feature source and provider may need reading/writing to some shared data at the same time, some synchronization mechanisms must be used (e.g. mutexes) to prevent data corruption. -:rtype: QgsAbstractFeatureSource - .. versionadded:: 2.4 :return: new instance of QgsAbstractFeatureSource (caller is responsible for deleting it) @@ -96,27 +95,22 @@ same time, some synchronization mechanisms must be used (e.g. mutexes) to preven virtual QString storageType() const; %Docstring Returns the permanent storage type for this layer as a friendly name. - -:rtype: str %End virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const = 0; %Docstring Query the provider for features specified in request. + :param request: feature request describing parameters of features to return :return: iterator for matching features from provider -:rtype: QgsFeatureIterator - %End virtual QgsWkbTypes::Type wkbType() const = 0; %Docstring Returns the geometry type which is returned by this layer - -:rtype: QgsWkbTypes.Type %End virtual long featureCount() const = 0; @@ -125,16 +119,12 @@ Returns the geometry type which is returned by this layer Number of features in the layer :return: long containing number of features -:rtype: long - %End virtual QgsFields fields() const = 0; %Docstring Returns the fields associated with this data provider. - -:rtype: QgsFields %End virtual QgsCoordinateReferenceSystem sourceCrs() const; @@ -147,34 +137,30 @@ Returns the fields associated with this data provider. %Docstring Return a short comment for the data that this provider is providing access to (e.g. the comment for postgres table). - -:rtype: str %End virtual QVariant minimumValue( int index ) const; %Docstring Returns the minimum value of an attribute + :param index: the index of the attribute Default implementation walks all numeric attributes and caches minimal and maximal values. If provider has facilities to retrieve minimal value directly, override this function. - -:rtype: QVariant %End virtual QVariant maximumValue( int index ) const; %Docstring Returns the maximum value of an attribute + :param index: the index of the attribute Default implementation walks all numeric attributes and caches minimal and maximal values. If provider has facilities to retrieve maximal value directly, override this function. - -:rtype: QVariant %End virtual QStringList uniqueStringsMatching( int index, const QString &substring, int limit = -1, @@ -182,14 +168,13 @@ value directly, override this function. %Docstring Returns unique string values of an attribute which contain a specified subset string. Subset matching is done in a case-insensitive manner. + :param index: the index of the attribute :param substring: substring to match (case insensitive) :param limit: maxmum number of the values to return, or -1 to return all unique values :param feedback: optional feedback object for canceling request :return: list of unique strings containing substring -:rtype: list of str - %End virtual QVariant aggregate( QgsAggregateCalculator::Aggregate aggregate, @@ -200,6 +185,7 @@ matching is done in a case-insensitive manner. %Docstring Calculates an aggregated value from the layer's features. The base implementation does nothing, but subclasses can override this method to handoff calculation of aggregates to the provider. + :param aggregate: aggregate to calculate :param index: the index of the attribute to calculate aggregate over :param parameters: parameters controlling aggregate calculation @@ -207,8 +193,6 @@ but subclasses can override this method to handoff calculation of aggregates to :param ok: will be set to true if calculation was successfully performed by the data provider :return: calculated aggregate value -:rtype: QVariant - .. versionadded:: 2.16 %End @@ -217,6 +201,7 @@ but subclasses can override this method to handoff calculation of aggregates to %Docstring Returns the possible enum values of an attribute. Returns an empty stringlist if a provider does not support enum types or if the given attribute is not an enum type. + :param index: the index of the attribute :param enumList: reference to the list to fill %End @@ -227,11 +212,10 @@ or if the given attribute is not an enum type. virtual bool deleteFeatures( const QgsFeatureIds &id ); %Docstring Deletes one or more features from the provider. This requires the DeleteFeatures capability. + :param id: list containing feature ids to delete :return: true in case of success and false in case of failure -:rtype: bool - .. seealso:: :py:func:`truncate()` %End @@ -242,8 +226,6 @@ Removes all features from the layer. This requires either the FastTruncate or De Providers with the FastTruncate capability will use an optimised method to truncate the layer. :return: true in case of success and false in case of failure. -:rtype: bool - .. versionadded:: 3.0 @@ -255,8 +237,6 @@ Providers with the FastTruncate capability will use an optimised method to trunc Adds new ``attributes`` to the provider. Returns true in case of success and false in case of failure. If attributes are added using this method then QgsVectorLayer.updateFields() must be called manually to ensure that the layer's field are correctly reported. - -:rtype: bool %End virtual bool deleteAttributes( const QgsAttributeIds &attributes ); @@ -264,11 +244,10 @@ manually to ensure that the layer's field are correctly reported. Deletes existing ``attributes`` from the provider. If attributes are deleted using this method then QgsVectorLayer.updateFields() must be called manually to ensure that the layer's field are correctly reported. + :param attributes: a set containing indices of attributes :return: true in case of success and false in case of failure -:rtype: bool - %End virtual bool renameAttributes( const QgsFieldNameMap &renamedAttributes ); @@ -276,11 +255,10 @@ manually to ensure that the layer's field are correctly reported. Renames existing attributes. If attributes are renamed using this method then QgsVectorLayer.updateFields() must be called manually to ensure that the layer's field are correctly reported. + :param renamedAttributes: map of attribute index to new attribute name :return: true in case of success and false in case of failure -:rtype: bool - .. versionadded:: 2.16 %End @@ -289,11 +267,10 @@ manually to ensure that the layer's field are correctly reported. %Docstring Changes attribute values of existing features. This should succeed if the provider reports the ChangeAttributeValues capability. + :param attr_map: a map containing changed attributes :return: true in case of success and false in case of failure -:rtype: bool - %End virtual bool changeFeatures( const QgsChangedAttributesMap &attr_map, @@ -303,14 +280,13 @@ Changes attribute values and geometries of existing features. This should succeed if the provider reports both the ChangeAttributeValues and ChangeGeometries capabilities. Providers which report the ChangeFeatures capability implement an optimised version of this method. + :param attr_map: a map containing changed attributes :param geometry_map: A QgsGeometryMap whose index contains the feature IDs that will have their geometries changed. The second map parameter being the new geometries themselves :return: true in case of success and false in case of failure -:rtype: bool - %End virtual QVariant defaultValue( int fieldIndex ) const; @@ -324,8 +300,6 @@ is calculated as a result of a sequence). It is recommended that you instead use in QgsVectorLayerUtils such as QgsVectorLayerUtils.createFeature() so that default value handling and validation is automatically carried out. -:rtype: QVariant - .. seealso:: :py:func:`defaultValueClause()` %End @@ -335,8 +309,6 @@ Returns any default value clauses which are present at the provider for a specif field index. These clauses are usually SQL fragments which must be evaluated by the provider, e.g., sequence values. -:rtype: str - .. seealso:: :py:func:`defaultValue()` .. versionadded:: 3.0 @@ -347,8 +319,6 @@ provider, e.g., sequence values. Returns any constraints which are present at the provider for a specified field index. -:rtype: QgsFieldConstraints.Constraints - .. versionadded:: 3.0 .. seealso:: :py:func:`skipConstraintCheck()` @@ -360,8 +330,6 @@ Returns true if a constraint check should be skipped for a specified field (e.g. the value returned by defaultValue() is trusted implicitly. An optional attribute value can be passed which can help refine the skip constraint check. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`fieldConstraints()` @@ -370,13 +338,12 @@ passed which can help refine the skip constraint check. virtual bool changeGeometryValues( const QgsGeometryMap &geometry_map ); %Docstring Changes geometries of existing features + :param geometry_map: A QgsGeometryMap whose index contains the feature IDs that will have their geometries changed. The second map parameter being the new geometries themselves :return: True in case of success and false in case of failure -:rtype: bool - %End virtual bool createSpatialIndex(); @@ -384,15 +351,11 @@ The second map parameter being the new geometries themselves Creates a spatial index on the datasource (if supported by the provider type). :return: true in case of success -:rtype: bool - %End virtual bool createAttributeIndex( int field ); %Docstring Create an attribute index on the datasource - -:rtype: bool %End virtual QgsVectorDataProvider::Capabilities capabilities() const; @@ -401,15 +364,11 @@ Returns flags containing the supported capabilities \note, some capabilities may change depending on whether a spatial filter is active on this provider, so it may be prudent to check this value per intended operation. - -:rtype: QgsVectorDataProvider.Capabilities %End QString capabilitiesString() const; %Docstring Returns the above in friendly format. - -:rtype: str %End virtual void setEncoding( const QString &e ); @@ -420,50 +379,36 @@ Set encoding used for accessing data from layer QString encoding() const; %Docstring Get encoding which is used for accessing data - -:rtype: str %End int fieldNameIndex( const QString &fieldName ) const; %Docstring Returns the index of a field name or -1 if the field does not exist - -:rtype: int %End QMap fieldNameMap() const; %Docstring Return a map where the key is the name of the field and the value is its index - -:rtype: QMap %End virtual QgsAttributeList attributeIndexes() const; %Docstring Return list of indexes to fetch all attributes in nextFeature() - -:rtype: QgsAttributeList %End virtual QgsAttributeList pkAttributeIndexes() const; %Docstring Return list of indexes of fields that make up the primary key - -:rtype: QgsAttributeList %End virtual QgsAttrPalIndexNameHash palAttributeIndexNames() const; %Docstring Return list of indexes to names for QgsPalLabeling fix - -:rtype: QgsAttrPalIndexNameHash %End bool supportedType( const QgsField &field ) const; %Docstring check if provider supports type of field - -:rtype: bool %End struct NativeType @@ -483,30 +428,22 @@ check if provider supports type of field QList< QgsVectorDataProvider::NativeType > nativeTypes() const; %Docstring Returns the names of the supported types - -:rtype: list of QgsVectorDataProvider.NativeType %End virtual bool doesStrictFeatureTypeCheck() const; %Docstring Returns true if the provider is strict about the type of inserted features (e.g. no multipolygon in a polygon layer) - -:rtype: bool %End static QStringList availableEncodings(); %Docstring Returns a list of available encodings - -:rtype: list of str %End bool hasErrors() const; %Docstring Provider has errors to report - -:rtype: bool %End void clearErrors(); @@ -517,37 +454,25 @@ Clear recorded errors QStringList errors() const; %Docstring Get recorded errors - -:rtype: list of str %End virtual bool isSaveAndLoadStyleToDatabaseSupported() const; %Docstring It returns false by default. Must be implemented by providers that support saving and loading styles to db returning true - -:rtype: bool %End virtual bool isDeleteStyleFromDatabaseSupported() const; %Docstring It returns false by default. Must be implemented by providers that support delete styles from db returning true - -:rtype: bool %End static QVariant convertValue( QVariant::Type type, const QString &value ); -%Docstring - -:rtype: QVariant -%End virtual QgsTransaction *transaction() const; %Docstring Returns the transaction this data provider is included in, if any. - -:rtype: QgsTransaction %End virtual void forceReload(); @@ -562,19 +487,16 @@ This can be required if the underlying file is replaced. virtual QSet dependencies() const; %Docstring Get the list of layer ids on which this layer depends. This in particular determines the order of layer loading. - -:rtype: set of QgsMapLayerDependency %End virtual QList discoverRelations( const QgsVectorLayer *self, const QList &layers ) const; %Docstring Discover the available relations with the given layers. + :param self: the layer using this data provider. :param layers: the other layers. :return: the list of N-1 relations from this provider. -:rtype: list of QgsRelation - .. versionadded:: 3.0 %End @@ -584,29 +506,25 @@ Discover the available relations with the given layers. Get metadata, dependent on the provider type, that will be display in the metadata tab of the layer properties. :return: The provider metadata -:rtype: QVariantMap - %End virtual QString translateMetadataKey( const QString &mdKey ) const; %Docstring Get the translated metadata key. + :param mdKey: The metadata key :return: The translated metadata value -:rtype: str - %End virtual QString translateMetadataValue( const QString &mdKey, const QVariant &value ) const; %Docstring Get the translated metadata value. + :param mdKey: The metadata key :param value: The metadata value :return: The translated metadata value -:rtype: str - %End virtual bool hasMetadata() const; @@ -614,8 +532,6 @@ Get the translated metadata value. Returns true if the data source has metadata, false otherwise. :return: true if data source has metadata, false otherwise. -:rtype: bool - .. versionadded:: 3.0 %End @@ -658,8 +574,6 @@ For general debug information use QgsMessageLog.logMessage() instead. Converts the geometry to the provider type if possible / necessary :return: the converted geometry or None if no conversion was necessary or possible -:rtype: QgsGeometry - %End void setNativeTypes( const QList &nativeTypes ); @@ -674,8 +588,6 @@ Usually done in the constructor. %Docstring Get this providers encoding -:rtype: QTextCodec - .. versionadded:: 3.0 %End diff --git a/python/core/qgsvectorfilewriter.sip b/python/core/qgsvectorfilewriter.sip index f7b083e61e59..fe687345ff57 100644 --- a/python/core/qgsvectorfilewriter.sip +++ b/python/core/qgsvectorfilewriter.sip @@ -177,29 +177,25 @@ Constructor virtual QgsField fieldDefinition( const QgsField &field ); %Docstring Return a possibly modified field definition. Default implementation will return provided field unmodified. + :param field: original field definition :return: possibly modified field definition -:rtype: QgsField - %End virtual QVariant convert( int fieldIdxInLayer, const QVariant &value ); %Docstring Convert the provided value, for field fieldIdxInLayer. Default implementation will return provided value unmodified. + :param fieldIdxInLayer: field index :param value: original raw value :return: possibly modified value. -:rtype: QVariant - %End virtual QgsVectorFileWriter::FieldValueConverter *clone() const /Factory/; %Docstring Creates a clone of the FieldValueConverter. - -:rtype: QgsVectorFileWriter.FieldValueConverter %End }; @@ -258,6 +254,7 @@ Creates a clone of the FieldValueConverter. ); %Docstring Write contents of vector layer to an (OGR supported) vector formt + :param layer: layer to write :param fileName: file name to write to :param fileEncoding: encoding to use @@ -278,8 +275,6 @@ allows for conversion of geometryless tables to null geometries, etc (added in Q :param includeZ: set to true to include z dimension in output. This option is only valid if overrideGeometryType is set. (added in QGIS 2.14) :param attributes: attributes to export (empty means all unless skipAttributeCreation is set) :param fieldValueConverter: field value converter (added in QGIS 2.16) - -:rtype: QgsVectorFileWriter.WriterError %End static QgsVectorFileWriter::WriterError writeAsVectorFormat( QgsVectorLayer *layer, @@ -304,6 +299,7 @@ allows for conversion of geometryless tables to null geometries, etc (added in Q ); %Docstring Writes a layer out to a vector file. + :param layer: layer to write :param fileName: file name to write to :param fileEncoding: encoding to use @@ -326,8 +322,6 @@ allows for conversion of geometryless tables to null geometries, etc (added in Q :param attributes: attributes to export (empty means all unless skipAttributeCreation is set) :param fieldValueConverter: field value converter (added in QGIS 2.16) -:rtype: QgsVectorFileWriter.WriterError - .. versionadded:: 2.2 %End @@ -454,14 +448,13 @@ Optional feedback object allowing cancelation of layer save QString *errorMessage /Out/ = 0 ); %Docstring Writes a layer out to a vector file. + :param layer: source layer to write :param fileName: file name to write to :param options: options. :param newFilename: QString pointer which will contain the new file name created (in case it is different to fileName). :param errorMessage: pointer to buffer fo error message -:rtype: QgsVectorFileWriter.WriterError - .. versionadded:: 3.0 %End @@ -502,8 +495,6 @@ Returns a list or pairs, with format filter string as first element and OGR form The ``options`` argument can be used to control the sorting and filtering of returned formats. -:rtype: list of QgsVectorFileWriter.FilterFormatDetails - .. seealso:: :py:func:`supportedOutputVectorLayerExtensions()` %End @@ -514,8 +505,6 @@ Returns a list of file extensions for supported formats. The ``options`` argument can be used to control the sorting and filtering of returned formats. -:rtype: list of str - .. versionadded:: 3.0 .. seealso:: :py:func:`supportedFiltersAndFormats()` @@ -527,8 +516,6 @@ Returns true if the specified ``driverName`` supports feature styles. The ``driverName`` argument must be a valid GDAL driver name. -:rtype: bool - .. versionadded:: 3.0 %End @@ -556,8 +543,6 @@ display name for the format) and internal driver short name. The ``options`` argument can be used to control the sorting and filtering of returned drivers. - -:rtype: list of QgsVectorFileWriter.DriverDetails %End static QString driverForExtension( const QString &extension ); @@ -566,8 +551,6 @@ Returns the OGR driver name for a specified file ``extension``. E.g. the driver name for the ".shp" extension is "ESRI Shapefile". If no suitable drivers are found then an empty string is returned. -:rtype: str - .. versionadded:: 3.0 %End @@ -577,36 +560,26 @@ Returns filter string that can be used for dialogs. The ``options`` argument can be used to control the sorting and filtering of returned drivers. - -:rtype: str %End static QString filterForDriver( const QString &driverName ); %Docstring Creates a filter for an OGR driver key - -:rtype: str %End static QString convertCodecNameForEncodingOption( const QString &codecName ); %Docstring Converts codec name to string passed to ENCODING layer creation option of OGR Shapefile - -:rtype: str %End QgsVectorFileWriter::WriterError hasError(); %Docstring Checks whether there were any errors in constructor - -:rtype: QgsVectorFileWriter.WriterError %End QString errorMessage(); %Docstring Retrieves error message - -:rtype: str %End virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 ); @@ -618,8 +591,6 @@ Retrieves error message %Docstring Adds a ``feature`` to the currently opened data source, using the style from a specified ``renderer``. -:rtype: bool - .. versionadded:: 3.0 %End @@ -632,18 +603,13 @@ Close opened shapefile for writing static bool deleteShapeFile( const QString &fileName ); %Docstring Delete a shapefile (and its accompanying shx / dbf / prf) + :param fileName: /path/to/file.shp :return: bool true if the file was deleted successfully -:rtype: bool - %End QgsVectorFileWriter::SymbologyExport symbologyExport() const; -%Docstring - -:rtype: QgsVectorFileWriter.SymbologyExport -%End void setSymbologyExport( QgsVectorFileWriter::SymbologyExport symExport ); double symbologyScale() const; @@ -651,8 +617,6 @@ Delete a shapefile (and its accompanying shx / dbf / prf) Returns the reference scale for output. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. versionadded:: 3.0 .. seealso:: :py:func:`setSymbologyScale()` @@ -669,17 +633,12 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma %End static bool driverMetadata( const QString &driverName, MetaData &driverMetadata ); -%Docstring - -:rtype: bool -%End static QStringList defaultDatasetOptions( const QString &driverName ); %Docstring Returns a list of the default dataset options for a specified driver. -:param driverName: name of OGR driver -:rtype: list of str +:param driverName: name of OGR driver .. versionadded:: 3.0 @@ -689,9 +648,8 @@ Returns a list of the default dataset options for a specified driver. static QStringList defaultLayerOptions( const QString &driverName ); %Docstring Returns a list of the default layer options for a specified driver. -:param driverName: name of OGR driver -:rtype: list of str +:param driverName: name of OGR driver .. versionadded:: 3.0 @@ -703,8 +661,6 @@ Returns a list of the default layer options for a specified driver. %Docstring Return edition capabilities for an existing dataset name. -:rtype: QgsVectorFileWriter.EditionCapabilities - .. versionadded:: 3.0 %End @@ -713,8 +669,6 @@ Return edition capabilities for an existing dataset name. %Docstring Returns whether the target layer already exists. -:rtype: bool - .. versionadded:: 3.0 %End @@ -725,8 +679,6 @@ Returns whether the target layer already exists. %Docstring Returns whether there are among the attributes specified some that do not exist yet in the layer -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 981df49670f2..548a675ddbcf 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -365,8 +365,6 @@ are cloned too. Moreover, each attributes (transparency, extent, selected features and so on) are identicals. :return: a new layer instance -:rtype: QgsVectorLayer - .. versionadded:: 3.0 %End @@ -375,22 +373,16 @@ features and so on) are identicals. %Docstring Returns the permanent storage type for this layer as a friendly name. This is obtained from the data provider and does not follow any standard. - -:rtype: str %End QString capabilitiesString() const; %Docstring Capabilities for this layer, comma separated and translated. - -:rtype: str %End QString dataComment() const; %Docstring Returns a description for this layer as defined in the data provider. - -:rtype: str %End QString displayField() const; @@ -399,8 +391,6 @@ This is a shorthand for accessing the displayExpression if it is a simple field. If the displayExpression is more complex than a simple field, a null string will be returned. -:rtype: str - .. seealso:: :py:func:`displayExpression` %End @@ -419,8 +409,6 @@ Get the preview expression, used to create a human readable preview string. Uses QgsExpression :return: The expression which will be used to preview features for this layer -:rtype: str - %End virtual QgsVectorDataProvider *dataProvider(); @@ -439,9 +427,8 @@ Setup the coordinate system transformation for the layer bool addJoin( const QgsVectorLayerJoinInfo &joinInfo ); %Docstring Joins another vector layer to this layer -:param joinInfo: join object containing join layer id, target and source field -:rtype: bool +:param joinInfo: join object containing join layer id, target and source field .. note:: @@ -453,31 +440,21 @@ Joins another vector layer to this layer Removes a vector layer join :return: true if join was found and successfully removed * -:rtype: bool - %End QgsVectorLayerJoinBuffer *joinBuffer(); %Docstring Accessor to the join buffer object -:rtype: QgsVectorLayerJoinBuffer - .. versionadded:: 2.14.7 %End const QList vectorJoins() const; -%Docstring - -:rtype: list of QgsVectorLayerJoinInfo -%End virtual bool setDependencies( const QSet &layers ); %Docstring Sets the list of dependencies. -:rtype: bool - .. seealso:: :py:func:`dependencies()` :param layers: set of QgsMapLayerDependency. Only user-defined dependencies will be added @@ -491,8 +468,6 @@ Sets the list of dependencies. %Docstring -:rtype: set of QgsMapLayerDependency - .. seealso:: :py:func:`setDataDependencies` as well as dependencies given by the provider @@ -509,7 +484,6 @@ Add a new field which is calculated by the expression specified :param fld: The field to calculate :return: The index of the new field -:rtype: int .. versionadded:: 2.9 @@ -531,7 +505,6 @@ Returns the expression used for a given expression field :param index: An index of an epxression based (virtual) field :return: The expression for the field at index -:rtype: str .. versionadded:: 2.9 @@ -554,8 +527,6 @@ Get all layer actions defined on this layer. The pointer which is returned directly points to the actions object which is used by the layer, so any changes are immediately applied. - -:rtype: QgsActionManager %End @@ -564,13 +535,12 @@ which is used by the layer, so any changes are immediately applied. The number of features that are selected in this layer :return: See description -:rtype: int - %End void selectByRect( QgsRectangle &rect, SelectBehavior behavior = SetSelection ); %Docstring Select features found within the search rectangle (in layer's coordinates) + :param rect: search rectangle :param behavior: selection type, allows adding to current selection, removing from selection, etc. @@ -585,6 +555,7 @@ from selection, etc. void selectByExpression( const QString &expression, SelectBehavior behavior = SetSelection ); %Docstring Select matching features using an expression. + :param expression: expression to evaluate to select features :param behavior: selection type, allows adding to current selection, removing from selection, etc. @@ -600,6 +571,7 @@ from selection, etc. %Docstring Select matching features using a list of feature IDs. Will emit the selectionChanged() signal with the clearAndSelect flag set. + :param ids: feature IDs to select :param behavior: selection type, allows adding to current selection, removing from selection, etc. @@ -653,8 +625,6 @@ Invert selection of features found within the search rectangle (in layer's coord Get a copy of the user-selected features :return: A list of QgsFeature -:rtype: QgsFeatureList - .. seealso:: :py:func:`selectedFeatureIds()` @@ -669,7 +639,6 @@ Get an iterator of the selected features Any filter on the request will be discarded. :return: Iterator over the selected features -:rtype: QgsFeatureIterator .. seealso:: :py:func:`selectedFeatureIds()` @@ -682,8 +651,6 @@ Any filter on the request will be discarded. Return reference to identifiers of selected features :return: A list of QgsFeatureId -:rtype: QgsFeatureIds - .. seealso:: :py:func:`selectedFeatures()` %End @@ -691,8 +658,6 @@ Return reference to identifiers of selected features QgsRectangle boundingBoxOfSelected() const; %Docstring Returns the bounding box of the selected features. If there is no selection, QgsRectangle(0,0,0,0) is returned - -:rtype: QgsRectangle %End bool labelsEnabled() const; @@ -700,8 +665,6 @@ Returns the bounding box of the selected features. If there is no selection, Qgs Returns whether the layer contains labels which are enabled and should be drawn. :return: true if layer contains enabled labels -:rtype: bool - .. versionadded:: 2.9 %End @@ -711,8 +674,6 @@ Returns whether the layer contains labels which are enabled and should be drawn. Returns whether the layer contains diagrams which are enabled and should be drawn. :return: true if layer contains enabled diagrams -:rtype: bool - .. versionadded:: 2.9 %End @@ -722,23 +683,13 @@ Returns whether the layer contains diagrams which are enabled and should be draw Sets diagram rendering object (takes ownership) %End const QgsDiagramRenderer *diagramRenderer() const; -%Docstring - -:rtype: QgsDiagramRenderer -%End void setDiagramLayerSettings( const QgsDiagramLayerSettings &s ); const QgsDiagramLayerSettings *diagramLayerSettings() const; -%Docstring - -:rtype: QgsDiagramLayerSettings -%End QgsFeatureRenderer *renderer(); %Docstring Return renderer. - -:rtype: QgsFeatureRenderer %End @@ -751,23 +702,17 @@ Ownership is transferred. QgsWkbTypes::GeometryType geometryType() const; %Docstring Returns point, line or polygon - -:rtype: QgsWkbTypes.GeometryType %End virtual QgsWkbTypes::Type wkbType() const; %Docstring Returns the WKBType or WKBUnknown in case of error - -:rtype: QgsWkbTypes.Type %End QString providerType() const; %Docstring Return the provider type for this layer - -:rtype: str %End virtual QgsCoordinateReferenceSystem sourceCrs() const; @@ -780,8 +725,6 @@ Return the provider type for this layer %Docstring Reads vector layer specific state from project file Dom node. -:rtype: bool - .. note:: Called by QgsMapLayer.readXml(). @@ -792,8 +735,6 @@ Reads vector layer specific state from project file Dom node. %Docstring Write vector layer specific state to project file Dom node. -:rtype: bool - .. note:: Called by QgsMapLayer.writeXml(). @@ -812,6 +753,7 @@ Resolve references to other layers (kept as layer IDs after reading XML) into la QString &msgError /Out/ ); %Docstring Save named and sld style of the layer to the style table in the db. + :param name: :param description: :param useAsDefault: @@ -823,30 +765,26 @@ Save named and sld style of the layer to the style table in the db. QStringList &descriptions /Out/, QString &msgError /Out/ ); %Docstring Lists all the style in db split into related to the layer and not related to + :param ids: the list in which will be stored the style db ids :param names: the list in which will be stored the style names :param descriptions: the list in which will be stored the style descriptions :param msgError: :return: the number of styles related to current layer -:rtype: int - %End virtual QString getStyleFromDatabase( const QString &styleId, QString &msgError /Out/ ); %Docstring Will return the named style corresponding to style id provided - -:rtype: str %End virtual bool deleteStyleFromDatabase( const QString &styleId, QString &msgError /Out/ ); %Docstring Delete a style from the database -:rtype: bool - .. versionadded:: 3.0 + :param styleId: the provider's layer_styles table id of the style to delete :param msgError: reference to string that will be updated with any error messages @@ -856,11 +794,10 @@ Delete a style from the database virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/, bool loadFromLocalDb ); %Docstring Load a named style from file/local db/datasource db + :param theURI: the URI of the style or the URI of the layer :param resultFlag: will be set to true if a named style is correctly loaded :param loadFromLocalDb: if true forces to load from local db instead of datasource one - -:rtype: str %End virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/ ); @@ -868,8 +805,6 @@ Load a named style from file/local db/datasource db %Docstring Calls loadNamedStyle( theURI, resultFlag, false ); Retained for backward compatibility - -:rtype: str %End bool loadAuxiliaryLayer( const QgsAuxiliaryStorage &storage, const QString &key = QString() ); @@ -883,7 +818,6 @@ a XML document, then the key read in this document is used by default. :param key: The key to use for joining. :return: true if the auxiliary layer is well loaded, false otherwise -:rtype: bool .. versionadded:: 3.0 @@ -903,8 +837,6 @@ transferred. %Docstring Returns the current auxiliary layer. -:rtype: QgsAuxiliaryLayer - .. versionadded:: 3.0 %End @@ -913,67 +845,62 @@ Returns the current auxiliary layer. %Docstring Read the symbology for the current layer from the Dom node supplied. + :param layerNode: node that will contain the symbology definition for this layer. :param errorMessage: reference to string that will be updated with any error messages :param context: reading context (used for transform from relative to absolute paths) :return: true in case of success. -:rtype: bool - %End virtual bool readStyle( const QDomNode &node, QString &errorMessage, const QgsReadWriteContext &context ); %Docstring Read the style for the current layer from the Dom node supplied. + :param node: node that will contain the style definition for this layer. :param errorMessage: reference to string that will be updated with any error messages :param context: reading context (used for transform from relative to absolute paths) :return: true in case of success. -:rtype: bool - %End virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context ) const; %Docstring Write the symbology for the layer into the docment provided. + :param node: the node that will have the style element added to it. :param doc: the document that will have the QDomNode added. :param errorMessage: reference to string that will be updated with any error messages :param context: writing context (used for transform from absolute to relative paths) :return: true in case of success. -:rtype: bool - %End virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context ) const; %Docstring Write just the style information for the layer into the document + :param node: the node that will have the style element added to it. :param doc: the document that will have the QDomNode added. :param errorMessage: reference to string that will be updated with any error messages :param context: writing context (used for transform from absolute to relative paths) :return: true in case of success. -:rtype: bool - %End bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsStringMap &props = QgsStringMap() ) const; %Docstring Writes the symbology of the layer into the document provided in SLD 1.1 format + :param node: the node that will have the style element added to it. :param doc: the document that will have the QDomNode added. :param errorMessage: reference to string that will be updated with any error messages :param props: a open ended set of properties that can drive/inform the SLD encoding :return: true in case of success -:rtype: bool - %End virtual bool readSld( const QDomNode &node, QString &errorMessage ); @@ -985,14 +912,13 @@ Number of features rendered with specified legend key. Features must be first calculated by countSymbolFeatures() :return: number of features rendered by symbol or -1 if failed or counts are not available -:rtype: long - %End void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, bool loadDefaultStyleFlag = false ); %Docstring Update the data source of the layer. The layer's renderer and legend will be preserved only if the geometry type of the new data source matches the current geometry type of the layer. + :param dataSource: new layer data source :param baseName: base name of the layer :param provider: provider string @@ -1009,8 +935,6 @@ The method will return the feature counter task. You will need to connect to the symbolFeatureCountMapChanged() signal to be notified when the freshly updated feature counts are ready. -:rtype: QgsVectorLayerFeatureCounter - .. note:: If the count features for symbols has been already done a @@ -1023,13 +947,12 @@ you can call waitForFinished() on the feature counter. virtual bool setSubsetString( const QString &subset ); %Docstring Set the string (typically sql) used to define a subset of the layer + :param subset: The subset string. This may be the where clause of a sql statement or other definition string specific to the underlying dataprovider and data store. :return: true, when setting the subset string was successful, false otherwise -:rtype: bool - %End virtual QString subsetString() const; @@ -1037,48 +960,37 @@ and data store. Get the string (typically sql) used to define a subset of the layer :return: The subset string or null QString if not implemented by the provider -:rtype: str - %End virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const; %Docstring Query the layer for features specified in request. + :param request: feature request describing parameters of features to return :return: iterator for matching features from provider -:rtype: QgsFeatureIterator - %End QgsFeatureIterator getFeatures( const QString &expression ); %Docstring Query the layer for features matching a given expression. - -:rtype: QgsFeatureIterator %End QgsFeature getFeature( QgsFeatureId fid ) const; %Docstring Query the layer for the feature with the given id. If there is no such feature, the returned feature will be invalid. - -:rtype: QgsFeature %End QgsFeatureIterator getFeatures( const QgsFeatureIds &fids ); %Docstring Query the layer for the features with the given ids. - -:rtype: QgsFeatureIterator %End QgsFeatureIterator getFeatures( const QgsRectangle &rectangle ); %Docstring Query the layer for the features which intersect the specified rectangle. - -:rtype: QgsFeatureIterator %End virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 ); @@ -1095,8 +1007,6 @@ an existing feature. :param skipDefaultValues: Default values will not be updated if this is true. False by default. :return: True in case of success and False in case of error -:rtype: bool - %End bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex ); @@ -1104,8 +1014,6 @@ an existing feature. Insert a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature Not meaningful for Point geometries - -:rtype: bool %End bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex ); @@ -1113,8 +1021,6 @@ Not meaningful for Point geometries Insert a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature Not meaningful for Point geometries - -:rtype: bool %End bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex ); @@ -1122,8 +1028,6 @@ Not meaningful for Point geometries Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates - -:rtype: bool %End bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) /PyName=moveVertexV2/; @@ -1132,8 +1036,6 @@ Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates -:rtype: bool - .. note:: available in Python as moveVertexV2 @@ -1142,11 +1044,10 @@ to the given coordinates EditResult deleteVertex( QgsFeatureId featureId, int vertex ); %Docstring Deletes a vertex from a feature. + :param featureId: ID of feature to remove vertex from :param vertex: index of vertex to delete -:rtype: EditResult - .. versionadded:: 2.14 %End @@ -1155,19 +1056,16 @@ Deletes a vertex from a feature. Deletes the selected features :return: true in case of success and false otherwise -:rtype: bool - %End QgsGeometry::OperationResult addRing( const QVector &ring, QgsFeatureId *featureId = 0 ); %Docstring Adds a ring to polygon/multipolygon features + :param ring: ring to add :param featureId: if specified, feature ID for feature ring was added to will be stored in this parameter :return: QgsGeometry.OperationResult -:rtype: QgsGeometry.OperationResult - - Success - LayerNotEditable - AddRingNotInExistingFeature @@ -1180,12 +1078,11 @@ Adds a ring to polygon/multipolygon features QgsGeometry::OperationResult addRing( QgsCurve *ring /Transfer/, QgsFeatureId *featureId = 0 ) /PyName=addCurvedRing/; %Docstring Adds a ring to polygon/multipolygon features (takes ownership) + :param ring: ring to add :param featureId: if specified, feature ID for feature ring was added to will be stored in this parameter :return: QgsGeometry.OperationResult -:rtype: QgsGeometry.OperationResult - - Success - LayerNotEditable - AddRingNotInExistingFeature @@ -1204,8 +1101,6 @@ Adds a ring to polygon/multipolygon features (takes ownership) Adds a new part polygon to a multipart feature :return: QgsGeometry.OperationResult -:rtype: QgsGeometry.OperationResult - - Success - LayerNotEditable - SelectionIsEmpty @@ -1221,8 +1116,6 @@ Adds a new part polygon to a multipart feature Adds a new part polygon to a multipart feature :return: QgsGeometry.OperationResult -:rtype: QgsGeometry.OperationResult - - Success - LayerNotEditable - SelectionIsEmpty @@ -1240,8 +1133,6 @@ Adds a new part polygon to a multipart feature QgsGeometry::OperationResult addPart( QgsCurve *ring /Transfer/ ) /PyName=addCurvedPart/; %Docstring -:rtype: QgsGeometry.OperationResult - .. note:: available in Python as addCurvedPart @@ -1250,24 +1141,22 @@ Adds a new part polygon to a multipart feature int translateFeature( QgsFeatureId featureId, double dx, double dy ); %Docstring Translates feature by dx, dy + :param featureId: id of the feature to translate :param dx: translation of x-coordinate :param dy: translation of y-coordinate :return: 0 in case of success -:rtype: int - %End QgsGeometry::OperationResult splitParts( const QVector &splitLine, bool topologicalEditing = false ); %Docstring Splits parts cut by the given line + :param splitLine: line that splits the layer features :param topologicalEditing: true if topological editing is enabled :return: QgsGeometry.OperationResult -:rtype: QgsGeometry.OperationResult - - Success - NothingHappened - LayerNotEditable @@ -1280,12 +1169,11 @@ Splits parts cut by the given line QgsGeometry::OperationResult splitFeatures( const QVector &splitLine, bool topologicalEditing = false ); %Docstring Splits features cut by the given line + :param splitLine: line that splits the layer features :param topologicalEditing: true if topological editing is enabled :return: QgsGeometry.OperationResult -:rtype: QgsGeometry.OperationResult - - Success - NothingHappened - LayerNotEditable @@ -1298,9 +1186,8 @@ Splits features cut by the given line int addTopologicalPoints( const QgsGeometry &geom ); %Docstring Adds topological points for every vertex of the geometry. -:param geom: the geometry where each vertex is added to segments of other features -:rtype: int +:param geom: the geometry where each vertex is added to segments of other features .. note:: @@ -1315,11 +1202,10 @@ Adds a vertex to segments which intersect point p but don't already have a vertex there. If a feature already has a vertex at position p, no additional vertex is inserted. This method is useful for topological editing. + :param p: position of the vertex :return: 0 in case of success -:rtype: int - %End @@ -1327,8 +1213,6 @@ editing. %Docstring Access to labeling configuration. May be null if labeling is not used. -:rtype: QgsAbstractVectorLayerLabeling - .. versionadded:: 3.0 %End @@ -1343,23 +1227,17 @@ Set labeling configuration. Takes ownership of the object. %Docstring Returns true if the provider is in editing mode - -:rtype: bool %End virtual bool isSpatial() const; %Docstring Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry - -:rtype: bool %End virtual bool isModified() const; %Docstring Returns true if the provider has been modified since the last commit - -:rtype: bool %End bool isAuxiliaryField( int index, int &srcIndex ) const; @@ -1367,8 +1245,6 @@ Returns true if the provider has been modified since the last commit Returns true if the field comes from the auxiliary layer, false otherwise. -:rtype: bool - .. versionadded:: 3.0 %End @@ -1383,8 +1259,6 @@ Synchronises with changes in the datasource %Docstring Return new instance of QgsMapLayerRenderer that will be used for rendering of given context -:rtype: QgsMapLayerRenderer - .. versionadded:: 2.4 %End @@ -1399,8 +1273,6 @@ Returns the list of fields of this layer. This also includes fields which have not yet been saved to the provider. :return: A list of fields -:rtype: QgsFields - %End QgsFields pendingFields() const; @@ -1410,47 +1282,35 @@ This also includes fields which have not yet been saved to the provider. Alias for fields() :return: A list of fields -:rtype: QgsFields - %End QgsAttributeList pendingAllAttributesList() const; %Docstring Returns list of attribute indexes. i.e. a list from 0 ... fieldCount() Alias for attributeList() - -:rtype: QgsAttributeList %End QgsAttributeList attributeList() const; %Docstring Returns list of attribute indexes. i.e. a list from 0 ... fieldCount() Alias for attributeList() - -:rtype: QgsAttributeList %End QgsAttributeList pendingPkAttributesList() const; %Docstring Returns list of attributes making up the primary key Alias for pkAttributeList() - -:rtype: QgsAttributeList %End QgsAttributeList pkAttributeList() const; %Docstring Returns list of attributes making up the primary key - -:rtype: QgsAttributeList %End long pendingFeatureCount() const; %Docstring Returns feature count including changes which have not yet been committed Alias for featureCount() - -:rtype: long %End virtual long featureCount() const; @@ -1458,8 +1318,6 @@ Alias for featureCount() %Docstring Returns feature count including changes which have not yet been committed If you need only the count of committed features call this method on this layer's provider. - -:rtype: long %End bool setReadOnly( bool readonly = true ); @@ -1467,15 +1325,11 @@ If you need only the count of committed features call this method on this layer' Make layer read-only (editing disabled) or not :return: false if the layer is in editing yet -:rtype: bool - %End bool changeGeometry( QgsFeatureId fid, const QgsGeometry &geom, bool skipDefaultValue = false ); %Docstring Change feature's geometry - -:rtype: bool %End bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant(), bool skipDefaultValues = false ); @@ -1490,16 +1344,12 @@ Changes an attribute value (but does not commit it) be updated. This can be used to override default values. Defaults to false. :return: true in case of success -:rtype: bool - %End bool addAttribute( const QgsField &field ); %Docstring Add an attribute field (but does not commit it) returns true if the field was added - -:rtype: bool %End void setFieldAlias( int index, const QString &aliasString ); @@ -1519,11 +1369,10 @@ Removes an alias (a display name) for attributes to display in dialogs bool renameAttribute( int index, const QString &newName ); %Docstring Renames an attribute field (but does not commit it). + :param index: attribute index :param newName: new name of field -:rtype: bool - .. versionadded:: 2.16 %End @@ -1533,29 +1382,21 @@ Returns the alias of an attribute name or a null string if there is no alias. \see {attributeDisplayName( int attributeIndex )} which returns the field name if no alias is defined. - -:rtype: str %End QString attributeDisplayName( int index ) const; %Docstring Convenience function that returns the attribute alias if defined or the field name else - -:rtype: str %End QgsStringMap attributeAliases() const; %Docstring Returns a map of field name to attribute alias - -:rtype: QgsStringMap %End QSet excludeAttributesWms() const; %Docstring A set of attributes that are not advertised in WMS requests with QGIS server. - -:rtype: set of str %End void setExcludeAttributesWms( const QSet &att ); @@ -1566,8 +1407,6 @@ A set of attributes that are not advertised in WMS requests with QGIS server. QSet excludeAttributesWfs() const; %Docstring A set of attributes that are not advertised in WFS requests with QGIS server. - -:rtype: set of str %End void setExcludeAttributesWfs( const QSet &att ); @@ -1578,8 +1417,6 @@ A set of attributes that are not advertised in WFS requests with QGIS server. virtual bool deleteAttribute( int attr ); %Docstring Delete an attribute field (but does not commit it) - -:rtype: bool %End bool deleteAttributes( QList attrs ); @@ -1589,8 +1426,6 @@ Deletes a list of attribute fields (but does not commit it) \param attrs the indices of the attributes to delete :return: true if at least one attribute has been deleted -:rtype: bool - %End virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 ); @@ -1599,18 +1434,15 @@ Deletes a list of attribute fields (but does not commit it) bool deleteFeature( QgsFeatureId fid ); %Docstring Delete a feature from the layer (but does not commit it) - -:rtype: bool %End bool deleteFeatures( const QgsFeatureIds &fids ); %Docstring Deletes a set of features from the layer (but does not commit it) + :param fids: The feature ids to delete :return: false if the layer is not in edit mode or does not support deleting -:rtype: bool - in case of an active transaction depends on the provider implementation %End @@ -1630,8 +1462,6 @@ so if a stage fails, it's difficult to roll back cleanly. Therefore any error message also includes which stage failed so that the user has some chance of repairing the damage cleanly. -:rtype: bool - .. seealso:: :py:func:`commitErrors()` %End @@ -1640,17 +1470,14 @@ that the user has some chance of repairing the damage cleanly. Returns a list containing any error messages generated when attempting to commit changes to the layer. -:rtype: list of str - .. seealso:: :py:func:`commitChanges()` %End bool rollBack( bool deleteBuffer = true ); %Docstring Stop editing and discard the edits -:param deleteBuffer: whether to delete editing buffer -:rtype: bool +:param deleteBuffer: whether to delete editing buffer %End QList referencingRelations( int idx ) const; @@ -1660,21 +1487,18 @@ Get relations, where the foreign key is on this layer :param idx: Only get relations, where idx forms part of the foreign key :return: A list of relations -:rtype: list of QgsRelation - %End QgsVectorLayerEditBuffer *editBuffer(); %Docstring Buffer with uncommitted editing operations. Only valid after editing has been turned on. - -:rtype: QgsVectorLayerEditBuffer %End void beginEditCommand( const QString &text ); %Docstring Create edit command for undo/redo operations + :param text: text which is to be displayed in undo window %End @@ -1718,6 +1542,7 @@ no reason to call this method. Returns the calculated default value for the specified field index. The default value may be taken from a client side default value expression (see setDefaultValueDefinition()) or taken from the underlying data provider. + :param index: field index :param feature: optional feature to use for default value evaluation. If passed, then properties from the feature (such as geometry) can be used when calculating @@ -1726,8 +1551,6 @@ the default value. specified, a default context will be created :return: calculated default value -:rtype: QVariant - .. versionadded:: 3.0 @@ -1737,6 +1560,7 @@ specified, a default context will be created void setDefaultValueDefinition( int index, const QgsDefaultValue &definition ); %Docstring Sets the definition of the expression to use when calculating the default value for a field. + :param index: field index :param definition: default value definition to use and evaluate when calculating default values for field. Pass @@ -1752,11 +1576,10 @@ an empty expression to clear the default. QgsDefaultValue defaultValueDefinition( int index ) const; %Docstring Returns the definition of the expression used when calculating the default value for a field. + :param index: field index :return: definition of the default value with the expression evaluated -:rtype: QgsDefaultValue - when calculating default values for field, or definition with an empty string if no default is set @@ -1773,8 +1596,6 @@ Returns any constraints which are present for a specified field index. These constraints may be inherited from the layer's data provider or may be set manually on the vector layer from within QGIS. -:rtype: QgsFieldConstraints.Constraints - .. versionadded:: 3.0 .. seealso:: :py:func:`setFieldConstraint()` @@ -1783,9 +1604,8 @@ or may be set manually on the vector layer from within QGIS. QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( int fieldIndex ) const; %Docstring Returns a map of constraint with their strength for a specific field of the layer. -:param fieldIndex: field index -:rtype: QMap< QgsFieldConstraints.Constraint, QgsFieldConstraints.ConstraintStrength> +:param fieldIndex: field index .. versionadded:: 3.0 %End @@ -1819,8 +1639,6 @@ data provider will be kept intact and cannot be removed. %Docstring Returns the constraint expression for for a specified field index, if set. -:rtype: str - .. versionadded:: 3.0 .. seealso:: :py:func:`fieldConstraints()` @@ -1834,8 +1652,6 @@ Returns the constraint expression for for a specified field index, if set. %Docstring Returns the descriptive name for the constraint expression for a specified field index. -:rtype: str - .. versionadded:: 3.0 .. seealso:: :py:func:`constraints()` @@ -1869,8 +1685,6 @@ can also be set. Setting an empty expression will clear any existing expression The editor widget setup defines which QgsFieldFormatter and editor widget will be used for the field at `index`. -:rtype: QgsEditorWidgetSetup - .. versionadded:: 3.0 %End @@ -1882,11 +1696,10 @@ in some circumstances when unsaved changes are present for the layer then the re may contain outdated values (for instance when the attribute value in a saved feature has been changed inside the edit buffer then the previous saved value will be included in the returned list). + :param fieldIndex: column index for attribute :param limit: maximum number of values to return (or -1 if unlimited) -:rtype: set of QVariant - .. seealso:: :py:func:`minimumValue()` .. seealso:: :py:func:`maximumValue()` @@ -1901,14 +1714,13 @@ in some circumstances when unsaved changes are present for the layer then the re may contain outdated values (for instance when the attribute value in a saved feature has been changed inside the edit buffer then the previous saved value will be included in the returned list). + :param index: column index for attribute :param substring: substring to match (case insensitive) :param limit: maxmum number of the values to return, or -1 to return all unique values :param feedback: optional feedback object for canceling request :return: list of unique strings containing substring -:rtype: list of str - %End virtual QVariant minimumValue( int index ) const; @@ -1919,8 +1731,6 @@ Note that in some circumstances when unsaved changes are present for the layer t returned value may be outdated (for instance when the attribute value in a saved feature has been changed inside the edit buffer then the previous saved value may be returned as the minimum). -:rtype: QVariant - .. seealso:: :py:func:`maximumValue()` .. seealso:: :py:func:`uniqueValues()` @@ -1934,8 +1744,6 @@ Note that in some circumstances when unsaved changes are present for the layer t returned value may be outdated (for instance when the attribute value in a saved feature has been changed inside the edit buffer then the previous saved value may be returned as the maximum). -:rtype: QVariant - .. seealso:: :py:func:`minimumValue()` .. seealso:: :py:func:`uniqueValues()` @@ -1948,6 +1756,7 @@ been changed inside the edit buffer then the previous saved value may be returne bool *ok = 0 ) const; %Docstring Calculates an aggregated value from the layer's features. + :param aggregate: aggregate to calculate :param fieldOrExpression: source field or expression to use as basis for aggregated values. :param parameters: parameters controlling aggregate calculation @@ -1955,8 +1764,6 @@ Calculates an aggregated value from the layer's features. :param ok: if specified, will be set to true if aggregate calculation was successful :return: calculated aggregate value -:rtype: QVariant - .. versionadded:: 2.16 %End @@ -1964,14 +1771,13 @@ Calculates an aggregated value from the layer's features. QList< QVariant > getValues( const QString &fieldOrExpression, bool &ok, bool selectedOnly = false, QgsFeedback *feedback = 0 ) const; %Docstring Fetches all values from a specified field name or expression. + :param fieldOrExpression: field name or an expression string :param ok: will be set to false if field or expression is invalid, otherwise true :param selectedOnly: set to true to get values from selected features only :param feedback: optional feedback object to allow cancelation :return: list of fetched values -:rtype: list of QVariant - .. versionadded:: 2.9 @@ -1982,6 +1788,7 @@ Fetches all values from a specified field name or expression. %Docstring Fetches all double values from a specified field name or expression. Null values or invalid expression results are skipped. + :param fieldOrExpression: field name or an expression string evaluating to a double value :param ok: will be set to false if field or expression is invalid, otherwise true :param selectedOnly: set to true to get values from selected features only @@ -1989,8 +1796,6 @@ invalid expression results are skipped. :param feedback: optional feedback object to allow cancelation :return: list of fetched values -:rtype: list of float - .. versionadded:: 2.9 @@ -2004,8 +1809,6 @@ Set the blending mode used for rendering each feature QPainter::CompositionMode featureBlendMode() const; %Docstring Returns the current blending mode for features - -:rtype: QPainter.CompositionMode %End void setOpacity( double opacity ); @@ -2025,8 +1828,6 @@ and 1.0 (fully opaque). Returns the opacity for the vector layer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` .. seealso:: :py:func:`opacityChanged()` @@ -2048,8 +1849,6 @@ Set the simplification settings for fast rendering of features %Docstring Returns the simplification settings for fast rendering of features -:rtype: QgsVectorSimplifyMethod - .. versionadded:: 2.2 %End @@ -2057,8 +1856,6 @@ Returns the simplification settings for fast rendering of features %Docstring Returns whether the VectorLayer can apply the specified simplification hint -:rtype: bool - .. note:: Do not use in 3rd party code - may be removed in future version! @@ -2072,8 +1869,6 @@ Returns whether the VectorLayer can apply the specified simplification hint used to render conditional formatting in the attribute table. :return: Return a QgsConditionalLayerStyles object holding the conditional attribute -:rtype: QgsConditionalLayerStyles - style information. Style information is generic and can be used for anything. .. versionadded:: 2.12 @@ -2083,8 +1878,6 @@ style information. Style information is generic and can be used for anything. %Docstring Get the attribute table configuration object. This defines the appearance of the attribute table. - -:rtype: QgsAttributeTableConfig %End void setAttributeTableConfig( const QgsAttributeTableConfig &attributeTableConfig ); @@ -2099,8 +1892,6 @@ The mapTip is a pretty, html representation for feature information. It may also contain embedded expressions. -:rtype: str - .. versionadded:: 3.0 %End @@ -2125,8 +1916,6 @@ Get the configuration of the form used to represent this vector layer. This is a writable configuration that can directly be changed in place. :return: The configuration of this layers' form -:rtype: QgsEditFormConfig - .. versionadded:: 2.14 %End @@ -2156,8 +1945,6 @@ Returns true if the extent is read from the XML document when data source has no metadata, false if it's the data provider which determines it. -:rtype: bool - .. versionadded:: 3.0 %End @@ -2165,8 +1952,6 @@ it. %Docstring Test if an edit command is active -:rtype: bool - .. versionadded:: 3.0 %End @@ -2229,8 +2014,6 @@ Make layer editable. This starts an edit session on this layer. Changes made in this edit session will not be made persistent until commitChanges() is called and can be reverted by calling rollBack(). - -:rtype: bool %End signals: diff --git a/python/core/qgsvectorlayercache.sip b/python/core/qgsvectorlayercache.sip index a14e72816695..293921acd63b 100644 --- a/python/core/qgsvectorlayercache.sip +++ b/python/core/qgsvectorlayercache.sip @@ -46,8 +46,6 @@ Returns the maximum number of features this cache will hold. In case full caching is enabled, this number can change, as new features get added. :return: int -:rtype: int - %End void setCacheGeometry( bool cacheGeometry ); @@ -63,8 +61,6 @@ Enable or disable the caching of geometries %Docstring Returns true if the cache will fetch and cache feature geometries. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setCacheGeometry()` @@ -110,8 +106,6 @@ Returns true if the cache is complete, ie it contains all features. This may hap a result of a call to setFullCache() or by through a feature request which resulted in all available features being cached. -:rtype: bool - .. seealso:: :py:func:`setFullCache()` .. versionadded:: 3.0 @@ -134,40 +128,31 @@ If the VectorLayerCache (and moreover any of its indices) is able to satisfy the request, the returned QgsFeatureIterator will iterate over cached features. If it's not possible to fully satisfy the request from the cache, part or all of the features will be requested from the data provider. + :param featureRequest: The request specifying filter and required data. :return: An iterator over the requested data. -:rtype: QgsFeatureIterator - %End QgsFeatureIterator getFeatures( const QString &expression ); %Docstring Query the layer for features matching a given expression. - -:rtype: QgsFeatureIterator %End QgsFeature getFeature( QgsFeatureId fid ); %Docstring Query the layer for the feature with the given id. If there is no such feature, the returned feature will be invalid. - -:rtype: QgsFeature %End QgsFeatureIterator getFeatures( const QgsFeatureIds &fids ); %Docstring Query the layer for the features with the given ids. - -:rtype: QgsFeatureIterator %End QgsFeatureIterator getFeatures( const QgsRectangle &rectangle ); %Docstring Query the layer for the features which intersect the specified rectangle. - -:rtype: QgsFeatureIterator %End bool isFidCached( const QgsFeatureId fid ) const; @@ -177,8 +162,6 @@ Check if a certain feature id is cached. \param fid The feature id to look for :return: True if this id is in the cache -:rtype: bool - .. seealso:: :py:func:`cachedFeatureIds()` %End @@ -187,8 +170,6 @@ Check if a certain feature id is cached. %Docstring Returns the set of feature IDs for features which are cached. -:rtype: QgsFeatureIds - .. versionadded:: 3.0 .. seealso:: :py:func:`isFidCached()` @@ -197,51 +178,41 @@ Returns the set of feature IDs for features which are cached. bool featureAtId( QgsFeatureId featureId, QgsFeature &feature, bool skipCache = false ); %Docstring Gets the feature at the given feature id. Considers the changed, added, deleted and permanent features + :param featureId: The id of the feature to query :param feature: The result of the operation will be written to this feature :param skipCache: Will query the layer regardless if the feature is in the cache already :return: true in case of success -:rtype: bool - %End bool removeCachedFeature( QgsFeatureId fid ); %Docstring Removes the feature identified by fid from the cache if present. + :param fid: The id of the feature to delete :return: true if the feature was removed, false if the feature id was not found in the cache -:rtype: bool - %End QgsVectorLayer *layer(); %Docstring Returns the layer to which this cache belongs - -:rtype: QgsVectorLayer %End QgsCoordinateReferenceSystem sourceCrs() const; %Docstring Returns the coordinate reference system for features in the cache. - -:rtype: QgsCoordinateReferenceSystem %End QgsFields fields() const; %Docstring Returns the fields associated with features in the cache. - -:rtype: QgsFields %End QgsWkbTypes::Type wkbType() const; %Docstring Returns the geometry type for features in the cache. - -:rtype: QgsWkbTypes.Type %End @@ -249,8 +220,6 @@ Returns the geometry type for features in the cache. %Docstring Returns the number of features contained in the source, or -1 if the feature count is unknown. - -:rtype: int %End %MethodCode sipRes = sipCpp->featureCount(); @@ -260,8 +229,6 @@ if the feature count is unknown. %Docstring Returns the number of features contained in the source, or -1 if the feature count is unknown. - -:rtype: long %End protected: @@ -295,8 +262,6 @@ Please note, that this does not check, if the requested features are cached. :param featureRequest: The QgsFeatureRequest to be answered :return: True if the information is being cached, false if not -:rtype: bool - %End diff --git a/python/core/qgsvectorlayereditbuffer.sip b/python/core/qgsvectorlayereditbuffer.sip index 4a5c8f4751fa..b3ac6880c300 100644 --- a/python/core/qgsvectorlayereditbuffer.sip +++ b/python/core/qgsvectorlayereditbuffer.sip @@ -23,79 +23,61 @@ class QgsVectorLayerEditBuffer : QObject virtual bool isModified() const; %Docstring Returns true if the provider has been modified since the last commit - -:rtype: bool %End virtual bool addFeature( QgsFeature &f ); %Docstring Adds a feature + :param f: feature to add :return: True in case of success and False in case of error -:rtype: bool - %End virtual bool addFeatures( QgsFeatureList &features ); %Docstring Insert a copy of the given features into the layer (but does not commit it) - -:rtype: bool %End virtual bool deleteFeature( QgsFeatureId fid ); %Docstring Delete a feature from the layer (but does not commit it) - -:rtype: bool %End virtual bool deleteFeatures( const QgsFeatureIds &fid ); %Docstring Deletes a set of features from the layer (but does not commit it) - -:rtype: bool %End virtual bool changeGeometry( QgsFeatureId fid, const QgsGeometry &geom ); %Docstring Change feature's geometry - -:rtype: bool %End virtual bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() ); %Docstring Changed an attribute value (but does not commit it) - -:rtype: bool %End virtual bool addAttribute( const QgsField &field ); %Docstring Add an attribute field (but does not commit it) returns true if the field was added * - -:rtype: bool %End virtual bool deleteAttribute( int attr ); %Docstring Delete an attribute field (but does not commit it) - -:rtype: bool %End virtual bool renameAttribute( int attr, const QString &newName ); %Docstring Renames an attribute field (but does not commit it) + :param attr: attribute index :param newName: new name of field -:rtype: bool - .. versionadded:: 2.16 %End @@ -114,8 +96,6 @@ geometries, delete features, delete attributes) so if a stage fails, it's difficult to roll back cleanly. Therefore any error message also includes which stage failed so that the user has some chance of repairing the damage cleanly. - -:rtype: bool %End virtual void rollBack(); @@ -127,17 +107,14 @@ Stop editing and discard the edits %Docstring Returns a map of new features which are not committed. -:rtype: QgsFeatureMap - .. seealso:: :py:func:`isFeatureAdded()` %End bool isFeatureAdded( QgsFeatureId id ) const; %Docstring Returns true if the specified feature ID has been added but not committed. -:param id: feature ID -:rtype: bool +:param id: feature ID .. versionadded:: 3.0 @@ -148,17 +125,14 @@ Returns true if the specified feature ID has been added but not committed. %Docstring Returns a map of features with changed attributes values which are not committed. -:rtype: QgsChangedAttributesMap - .. seealso:: :py:func:`isFeatureAttributesChanged()` %End bool isFeatureAttributesChanged( QgsFeatureId id ) const; %Docstring Returns true if the specified feature ID has had an attribute changed but not committed. -:param id: feature ID -:rtype: bool +:param id: feature ID .. versionadded:: 3.0 @@ -169,17 +143,14 @@ Returns true if the specified feature ID has had an attribute changed but not co %Docstring Returns a list of deleted attributes fields which are not committed. The list is kept sorted. -:rtype: QgsAttributeList - .. seealso:: :py:func:`isAttributeDeleted()` %End bool isAttributeDeleted( int index ) const; %Docstring Returns true if the specified attribute has been deleted but not committed. -:param index: attribute index -:rtype: bool +:param index: attribute index .. versionadded:: 3.0 @@ -189,25 +160,20 @@ Returns true if the specified attribute has been deleted but not committed. QList addedAttributes() const; %Docstring Returns a list of added attributes fields which are not committed. - -:rtype: list of QgsField %End QgsGeometryMap changedGeometries() const; %Docstring Returns a map of features with changed geometries which are not committed. -:rtype: QgsGeometryMap - .. seealso:: :py:func:`hasFeatureGeometryChange()` %End bool isFeatureGeometryChanged( QgsFeatureId id ) const; %Docstring Returns true if the specified feature ID has had its geometry changed but not committed. -:param id: feature ID -:rtype: bool +:param id: feature ID .. versionadded:: 3.0 @@ -218,17 +184,14 @@ Returns true if the specified feature ID has had its geometry changed but not co %Docstring Returns a list of deleted feature IDs which are not committed. -:rtype: QgsFeatureIds - .. seealso:: :py:func:`isFeatureDeleted()` %End bool isFeatureDeleted( QgsFeatureId id ) const; %Docstring Returns true if the specified feature ID has been deleted but not committed. -:param id: feature ID -:rtype: bool +:param id: feature ID .. versionadded:: 3.0 @@ -251,6 +214,7 @@ This signal is emitted when modifications has been done on layer void geometryChanged( QgsFeatureId fid, const QgsGeometry &geom ); %Docstring Emitted when a feature's geometry is changed. + :param fid: feature ID :param geom: new feature geometry %End @@ -262,6 +226,7 @@ Emitted when a feature's geometry is changed. void attributeRenamed( int idx, const QString &newName ); %Docstring Emitted when an attribute has been renamed + :param idx: attribute index :param newName: new attribute name @@ -277,6 +242,7 @@ Signals emitted after committing changes void committedAttributesRenamed( const QString &layerId, const QgsFieldNameMap &renamedAttributes ); %Docstring Emitted after committing an attribute rename + :param layerId: ID of layer :param renamedAttributes: map of field index to new name diff --git a/python/core/qgsvectorlayereditpassthrough.sip b/python/core/qgsvectorlayereditpassthrough.sip index 91ec8128f6d5..097b1baba271 100644 --- a/python/core/qgsvectorlayereditpassthrough.sip +++ b/python/core/qgsvectorlayereditpassthrough.sip @@ -49,7 +49,6 @@ Update underlying data with a SQL query embedded in a transaction. :param sql: The SQL query updating data :return: true if the undo/redo command is well added to the stack, false otherwise -:rtype: bool .. versionadded:: 3.0 diff --git a/python/core/qgsvectorlayereditutils.sip b/python/core/qgsvectorlayereditutils.sip index 53df92fac765..6d1af636472f 100644 --- a/python/core/qgsvectorlayereditutils.sip +++ b/python/core/qgsvectorlayereditutils.sip @@ -23,8 +23,6 @@ class QgsVectorLayerEditUtils Insert a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature Not meaningful for Point geometries - -:rtype: bool %End bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex ); @@ -32,8 +30,6 @@ Not meaningful for Point geometries Inserts a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature Not meaningful for Point geometries - -:rtype: bool %End bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex ); @@ -41,8 +37,6 @@ Not meaningful for Point geometries Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates - -:rtype: bool %End bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) /PyName=moveVertexV2/; @@ -51,8 +45,6 @@ Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates -:rtype: bool - .. note:: available in Python bindings as moveVertexV2 @@ -61,38 +53,35 @@ to the given coordinates QgsVectorLayer::EditResult deleteVertex( QgsFeatureId featureId, int vertex ); %Docstring Deletes a vertex from a feature. + :param featureId: ID of feature to remove vertex from :param vertex: index of vertex to delete -:rtype: QgsVectorLayer.EditResult - .. versionadded:: 2.14 %End QgsGeometry::OperationResult addRing( const QVector &ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 ); %Docstring Adds a ring to polygon/multipolygon features + :param ring: ring to add :param targetFeatureIds: if specified, only these features will be the candidates for adding a ring. Otherwise all intersecting features are tested and the ring is added to the first valid feature. :param modifiedFeatureId: if specified, feature ID for feature that ring was added to will be stored in this parameter :return: OperationResult result code: success or reason of failure -:rtype: QgsGeometry.OperationResult - %End QgsGeometry::OperationResult addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 ) /PyName=addCurvedRing/; %Docstring Adds a ring to polygon/multipolygon features + :param ring: ring to add :param targetFeatureIds: if specified, only these features will be the candidates for adding a ring. Otherwise all intersecting features are tested and the ring is added to the first valid feature. :param modifiedFeatureId: if specified, feature ID for feature that ring was added to will be stored in this parameter :return: OperationResult result code: success or reason of failure -:rtype: QgsGeometry.OperationResult - .. note:: @@ -104,8 +93,6 @@ all intersecting features are tested and the ring is added to the first valid fe Adds a new part polygon to a multipart feature :return: -:rtype: QgsGeometry.OperationResult - - QgsGeometry.Success - QgsGeometry.AddPartSelectedGeometryNotFound - QgsGeometry.AddPartNotMultiGeometry @@ -118,8 +105,6 @@ Adds a new part polygon to a multipart feature Adds a new part polygon to a multipart feature :return: -:rtype: QgsGeometry.OperationResult - - QgsGeometry.Success - QgsGeometry.AddPartSelectedGeometryNotFound - QgsGeometry.AddPartNotMultiGeometry @@ -136,8 +121,6 @@ Adds a new part polygon to a multipart feature Adds a new part polygon to a multipart feature :return: -:rtype: QgsGeometry.OperationResult - - QgsGeometry.Success - QgsGeometry.AddPartSelectedGeometryNotFound - QgsGeometry.AddPartNotMultiGeometry @@ -152,24 +135,22 @@ Adds a new part polygon to a multipart feature int translateFeature( QgsFeatureId featureId, double dx, double dy ); %Docstring Translates feature by dx, dy + :param featureId: id of the feature to translate :param dx: translation of x-coordinate :param dy: translation of y-coordinate :return: 0 in case of success -:rtype: int - %End QgsGeometry::OperationResult splitParts( const QVector &splitLine, bool topologicalEditing = false ); %Docstring Splits parts cut by the given line + :param splitLine: line that splits the layer feature parts :param topologicalEditing: true if topological editing is enabled :return: -:rtype: QgsGeometry.OperationResult - - QgsGeometry.InvalidBaseGeometry - QgsGeometry.Success - QgsGeometry.InvalidInput @@ -182,12 +163,11 @@ Splits parts cut by the given line QgsGeometry::OperationResult splitFeatures( const QVector &splitLine, bool topologicalEditing = false ); %Docstring Splits features cut by the given line + :param splitLine: line that splits the layer features :param topologicalEditing: true if topological editing is enabled :return: -:rtype: QgsGeometry.OperationResult - 0 in case of success, 4 if there is a selection but no feature split %End @@ -195,9 +175,8 @@ Splits features cut by the given line int addTopologicalPoints( const QgsGeometry &geom ); %Docstring Adds topological points for every vertex of the geometry. -:param geom: the geometry where each vertex is added to segments of other features -:rtype: int +:param geom: the geometry where each vertex is added to segments of other features .. note:: @@ -212,11 +191,10 @@ Adds a vertex to segments which intersect point p but don't already have a vertex there. If a feature already has a vertex at position p, no additional vertex is inserted. This method is useful for topological editing. + :param p: position of the vertex :return: 0 in case of success -:rtype: int - %End }; diff --git a/python/core/qgsvectorlayerexporter.sip b/python/core/qgsvectorlayerexporter.sip index 5c3616f448b6..2492c0b174cc 100644 --- a/python/core/qgsvectorlayerexporter.sip +++ b/python/core/qgsvectorlayerexporter.sip @@ -57,6 +57,7 @@ entire layer to the destination provider. ); %Docstring Writes the contents of vector layer to a different datasource. + :param layer: source layer :param uri: URI for destination data source :param providerKey: string key for destination data provider @@ -68,8 +69,6 @@ not available :param feedback: optional feedback object to show progress and cancelation of export :return: NoError for a successful export, or encountered error -:rtype: ExportError - %End QgsVectorLayerExporter( const QString &uri, @@ -81,6 +80,7 @@ not available const QMap &options = QMap() ); %Docstring Constructor for QgsVectorLayerExporter. + :param uri: URI for destination data source :param provider: string key for destination data provider :param fields: fields to include in created layer @@ -96,8 +96,6 @@ not available %Docstring Returns any encountered error code, or false if no error was encountered. -:rtype: ExportError - .. seealso:: :py:func:`errorMessage()` .. seealso:: :py:func:`errorCount()` @@ -107,8 +105,6 @@ Returns any encountered error code, or false if no error was encountered. %Docstring Returns any error message encountered during the export. -:rtype: str - .. seealso:: :py:func:`errorCount()` .. seealso:: :py:func:`errorCode()` @@ -118,8 +114,6 @@ Returns any error message encountered during the export. %Docstring Returns the number of error messages encountered during the export. -:rtype: int - .. seealso:: :py:func:`errorMessage()` .. seealso:: :py:func:`errorCode()` @@ -185,8 +179,6 @@ Creates a new QgsVectorLayerExporterTask which has ownership over a source ``lay When the export task has completed (successfully or otherwise) ``layer`` will be deleted. The destination ``uri`` and ``providerKey``, and various export related parameters such as destination CRS and export ``options`` must be specified. - -:rtype: QgsVectorLayerExporterTask %End virtual void cancel(); diff --git a/python/core/qgsvectorlayerfeaturecounter.sip b/python/core/qgsvectorlayerfeaturecounter.sip index 3141c03cd3ba..a2c684d54b90 100644 --- a/python/core/qgsvectorlayerfeaturecounter.sip +++ b/python/core/qgsvectorlayerfeaturecounter.sip @@ -37,8 +37,6 @@ Create a new feature counter for ``layer``. %Docstring Get the feature count for a particular ``legendKey``. If the key has not been found, -1 will be returned. - -:rtype: long %End signals: diff --git a/python/core/qgsvectorlayerfeatureiterator.sip b/python/core/qgsvectorlayerfeatureiterator.sip index 04a0faf26c11..dbffca73d8ce 100644 --- a/python/core/qgsvectorlayerfeatureiterator.sip +++ b/python/core/qgsvectorlayerfeatureiterator.sip @@ -29,6 +29,7 @@ Partial snapshot of vector layer's state (only the members necessary for access explicit QgsVectorLayerFeatureSource( const QgsVectorLayer *layer ); %Docstring Constructor for QgsVectorLayerFeatureSource. + :param layer: source layer %End @@ -43,8 +44,6 @@ Constructor for QgsVectorLayerFeatureSource. Returns the fields that will be available for features that are retrieved from this source. -:rtype: QgsFields - .. versionadded:: 3.0 %End @@ -52,8 +51,6 @@ this source. %Docstring Returns the coordinate reference system for features retrieved from this source. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 %End @@ -88,16 +85,12 @@ typedef QgsAbstractFeatureIteratorFromSource QgsAbs %Docstring reset the iterator to the starting position - -:rtype: bool %End virtual bool close(); %Docstring end of iterating: free the resources / lock - -:rtype: bool %End @@ -123,24 +116,18 @@ end of iterating: free the resources / lock %Docstring fetch next feature, return true on success - -:rtype: bool %End virtual bool nextFeatureFilterExpression( QgsFeature &f ); %Docstring Overrides default method as we only need to filter features in the edit buffer while for others filtering is left to the provider implementation. - -:rtype: bool %End virtual bool prepareSimplification( const QgsSimplifyMethod &simplifyMethod ); %Docstring Setup the simplification of geometries to fetch using the specified simplify method - -:rtype: bool %End diff --git a/python/core/qgsvectorlayerjoinbuffer.sip b/python/core/qgsvectorlayerjoinbuffer.sip index 4b0b5c683764..5e9050b65e1e 100644 --- a/python/core/qgsvectorlayerjoinbuffer.sip +++ b/python/core/qgsvectorlayerjoinbuffer.sip @@ -29,11 +29,10 @@ Manages joined fields for a vector layer* bool addJoin( const QgsVectorLayerJoinInfo &joinInfo ); %Docstring Joins another vector layer to this layer + :param joinInfo: join object containing join layer id, target and source field :return: (since 2.6) whether the join was successfully added * -:rtype: bool - %End bool removeJoin( const QString &joinLayerId ); @@ -41,13 +40,12 @@ Joins another vector layer to this layer Removes a vector layer join :return: true if join was found and successfully removed * -:rtype: bool - %End void updateFields( QgsFields &fields ); %Docstring Updates field map with joined attributes + :param fields: map to append joined attributes %End @@ -77,32 +75,23 @@ Resolves layer IDs of joined layers using given project's available layers bool containsJoins() const; %Docstring Quick way to test if there is any join at all - -:rtype: bool %End const QgsVectorJoinList &vectorJoins() const; -%Docstring - -:rtype: QgsVectorJoinList -%End const QgsVectorLayerJoinInfo *joinForFieldIndex( int index, const QgsFields &fields, int &sourceFieldIndex /Out/ ) const; %Docstring Finds the vector join for a layer field index. + :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 * - -:rtype: QgsVectorLayerJoinInfo %End int joinedFieldsOffset( const QgsVectorLayerJoinInfo *info, const QgsFields &fields ); %Docstring Find out what is the first index of the join within fields. Returns -1 if join is not present -:rtype: int - .. versionadded:: 2.6 %End @@ -110,19 +99,16 @@ Find out what is the first index of the join within fields. Returns -1 if join i %Docstring Return a vector of indices for use in join based on field names from the layer -:rtype: list of int - .. versionadded:: 2.6 %End QList joinsWhereFieldIsId( const QgsField &field ) const; %Docstring Returns joins where the field of a target layer is considered as an id. + :param field: the field of a target layer :return: a list of vector joins -:rtype: list of const QgsVectorLayerJoinInfo - .. versionadded:: 3.0 %End @@ -130,22 +116,20 @@ Returns joins where the field of a target layer is considered as an id. QgsFeature joinedFeatureOf( const QgsVectorLayerJoinInfo *info, const QgsFeature &feature ) const; %Docstring Returns the joined feature corresponding to the feature. + :param info: the vector join information :param feature: the feature of the target layer -:rtype: QgsFeature - .. versionadded:: 3.0 %End QgsFeature targetedFeatureOf( const QgsVectorLayerJoinInfo *info, const QgsFeature &feature ) const; %Docstring Returns the targeted feature corresponding to the joined feature. + :param info: the vector join information :param feature: the feature of the joined layer -:rtype: QgsFeature - .. versionadded:: 3.0 %End @@ -156,7 +140,6 @@ Returns true if the join information is about auxiliary layer, false otherwise :param info: The join information :return: true if the join information is about auxiliary layer, false otherwise -:rtype: bool .. versionadded:: 3.0 @@ -166,8 +149,6 @@ Returns true if the join information is about auxiliary layer, false otherwise %Docstring Create a copy of the join buffer -:rtype: QgsVectorLayerJoinBuffer - .. versionadded:: 2.6 %End @@ -184,7 +165,6 @@ created nor added. :param flags: Unused parameter :return: false if an error happened, true otherwise -:rtype: bool .. versionadded:: 3.0 @@ -203,7 +183,6 @@ created if its fields are not empty. :param oldValue: The old value of the attribute :return: false if an error happened, true otherwise -:rtype: bool .. versionadded:: 3.0 @@ -217,7 +196,6 @@ parameter is the one coming from the target layer. :param fid: The feature id from the target layer to delete :return: false if an error happened, true otherwise -:rtype: bool .. versionadded:: 3.0 @@ -231,7 +209,6 @@ in aprameter are those coming from the target layer. :param fids: Feature ids from the target layer to delete :return: false if an error happened, true otherwise -:rtype: bool .. versionadded:: 3.0 diff --git a/python/core/qgsvectorlayerjoininfo.sip b/python/core/qgsvectorlayerjoininfo.sip index 8d79388bfeae..a5c0bdc76277 100644 --- a/python/core/qgsvectorlayerjoininfo.sip +++ b/python/core/qgsvectorlayerjoininfo.sip @@ -35,8 +35,6 @@ Sets weak reference to the joined layer QgsVectorLayer *joinLayer() const; %Docstring Returns joined layer (may be null if the reference was set by layer ID and not resolved yet) - -:rtype: QgsVectorLayer %End void setJoinLayerId( const QString &layerId ); @@ -46,8 +44,6 @@ Sets ID of the joined layer. It will need to be overwritten by setJoinLayer() to QString joinLayerId() const; %Docstring ID of the joined layer - may be used to resolve reference to the joined layer - -:rtype: str %End void setTargetFieldName( const QString &fieldName ); @@ -57,8 +53,6 @@ Sets name of the field of our layer that will be used for join QString targetFieldName() const; %Docstring Returns name of the field of our layer that will be used for join - -:rtype: str %End void setJoinFieldName( const QString &fieldName ); @@ -68,8 +62,6 @@ Sets name of the field of joined layer that will be used for join QString joinFieldName() const; %Docstring Returns name of the field of joined layer that will be used for join - -:rtype: str %End void setPrefix( const QString &prefix ); @@ -79,8 +71,6 @@ Sets prefix of fields from the joined layer. If null, joined layer's name will b QString prefix() const; %Docstring Returns prefix of fields from the joined layer. If null, joined layer's name will be used. - -:rtype: str %End void setUsingMemoryCache( bool enabled ); @@ -90,8 +80,6 @@ Sets whether values from the joined layer should be cached in memory to speed up bool isUsingMemoryCache() const; %Docstring Returns whether values from the joined layer should be cached in memory to speed up lookups - -:rtype: bool %End bool isDynamicFormEnabled() const; @@ -99,8 +87,6 @@ Returns whether values from the joined layer should be cached in memory to speed Returns whether the form has to be dynamically updated with joined fields when a feature is being created in the target layer. -:rtype: bool - .. versionadded:: 3.0 %End @@ -117,8 +103,6 @@ when a feature is being created in the target layer. Returns whether joined fields may be edited through the form of the target layer. -:rtype: bool - .. versionadded:: 3.0 %End @@ -134,8 +118,6 @@ Sets whether the form of the target layer allows editing joined fields. Returns whether a feature created on the target layer has to impact the joined layer by creating a new feature if necessary. -:rtype: bool - .. versionadded:: 3.0 %End @@ -152,8 +134,6 @@ the joined layer by creating a new feature if necessary. Returns whether a feature deleted on the target layer has to impact the joined layer by deleting the corresponding joined feature. -:rtype: bool - .. versionadded:: 3.0 %End @@ -168,11 +148,10 @@ joined layer by deleting the corresponding joined feature. QString prefixedFieldName( const QgsField &field ) const; %Docstring Returns the prefixed name of the field. + :param field: the field :return: the prefixed name of the field -:rtype: str - .. versionadded:: 3.0 %End @@ -181,11 +160,10 @@ Returns the prefixed name of the field. %Docstring Extract the join feature from the target feature for the current join layer information. + :param feature: A feature from the target layer :return: the corresponding joined feature -:rtype: QgsFeature - .. versionadded:: 3.0 %End @@ -201,8 +179,6 @@ Sets a list of fields to ignore whatever happens. %Docstring Returns the list of fields to ignore. -:rtype: list of str - .. versionadded:: 3.0 %End @@ -211,8 +187,6 @@ Returns the list of fields to ignore. Returns true if blacklisted fields is not empty or if a subset of names has been set. -:rtype: bool - .. versionadded:: 3.0 %End @@ -221,8 +195,6 @@ has been set. Returns the list of field names to use for joining considering blacklisted fields and subset. -:rtype: list of str - .. versionadded:: 3.0 %End @@ -239,8 +211,6 @@ Set subset of fields to be used from joined layer. Takes ownership of the passed %Docstring Get subset of fields to be used from joined layer. All fields will be used if null is returned. -:rtype: list of str - .. versionadded:: 2.6 %End diff --git a/python/core/qgsvectorlayerlabeling.sip b/python/core/qgsvectorlayerlabeling.sip index 3864795dc59a..462b5687ae6c 100644 --- a/python/core/qgsvectorlayerlabeling.sip +++ b/python/core/qgsvectorlayerlabeling.sip @@ -32,38 +32,28 @@ Default constructor virtual QString type() const = 0; %Docstring Unique type string of the labeling configuration implementation - -:rtype: str %End virtual QgsAbstractVectorLayerLabeling *clone() const = 0 /Factory/; %Docstring Return a new copy of the object - -:rtype: QgsAbstractVectorLayerLabeling %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0; %Docstring Return labeling configuration as XML element - -:rtype: QDomElement %End virtual QStringList subProviders() const; %Docstring Get list of sub-providers within the layer's labeling. - -:rtype: list of str %End virtual QgsPalLayerSettings settings( const QString &providerId = QString() ) const = 0; %Docstring Get associated label settings. In case of multiple sub-providers with different settings, they are identified by their ID (e.g. in case of rule-based labeling, provider ID == rule key) - -:rtype: QgsPalLayerSettings %End virtual void setSettings( QgsPalLayerSettings *settings /Transfer/, const QString &providerId = QString() ) = 0; @@ -82,8 +72,6 @@ Returns true if drawing labels requires advanced effects like composition modes, which could prevent it being used as an isolated cached image or exported to a vector format. -:rtype: bool - .. versionadded:: 3.0 %End @@ -91,8 +79,6 @@ or exported to a vector format. static QgsAbstractVectorLayerLabeling *create( const QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Try to create instance of an implementation based on the XML data - -:rtype: QgsAbstractVectorLayerLabeling %End virtual void toSld( QDomNode &parent, const QgsStringMap &props ) const; @@ -105,6 +91,7 @@ Writes the SE 1.1 TextSymbolizer element based on the current layer labeling set virtual void writeTextSymbolizer( QDomNode &parent, QgsPalLayerSettings &settings, const QgsStringMap &props ) const; %Docstring Writes a TextSymbolizer element contents based on the provided labeling settings + :param parent: the node that will have the text symbolizer element added to it :param settings: the settings getting translated to a TextSymbolizer :param props: a open ended set of properties that can drive/inform the SLD encoding @@ -161,8 +148,6 @@ Set pal settings (takes ownership). static QgsVectorLayerSimpleLabeling *create( const QDomElement &element, const QgsReadWriteContext &context ); %Docstring Create the instance from a DOM element with saved configuration - -:rtype: QgsVectorLayerSimpleLabeling %End }; diff --git a/python/core/qgsvectorlayertools.sip b/python/core/qgsvectorlayertools.sip index 5a871c2965b8..8d71dfd22ae4 100644 --- a/python/core/qgsvectorlayertools.sip +++ b/python/core/qgsvectorlayertools.sip @@ -37,8 +37,6 @@ This method should/will be called, whenever a new feature will be added to the l :param feature: Updated feature after adding will be written back to this :return: True in case of success, False if the operation failed/was aborted -:rtype: bool - TODO QGIS 3: remove const qualifier %End @@ -52,8 +50,6 @@ If successful layer->startEditing() will be called and true returned. :param layer: The layer on which to start an edit session :return: True, if the editing session was started -:rtype: bool - TODO QGIS 3: remove const qualifier %End @@ -67,8 +63,6 @@ Appropriate dialogs should be shown like :param allowCancel: True if a cancel button should be offered :return: True if successful -:rtype: bool - TODO QGIS 3: remove const qualifier %End @@ -80,8 +74,6 @@ Should be called, when the features should be committed but the editing session :param layer: The layer to commit :return: True if successful -:rtype: bool - TODO QGIS 3: remove const qualifier %End @@ -97,8 +89,6 @@ Copy and move features with defined translation. :param errorMsg: If given, it will contain the error message :return: True if all features could be copied. -:rtype: bool - TODO QGIS 3: remove const qualifier %End diff --git a/python/core/qgsvectorlayerundocommand.sip b/python/core/qgsvectorlayerundocommand.sip index e0a9cc7fbc0a..61e338dc9307 100644 --- a/python/core/qgsvectorlayerundocommand.sip +++ b/python/core/qgsvectorlayerundocommand.sip @@ -27,14 +27,13 @@ class QgsVectorLayerUndoCommand : QUndoCommand QgsVectorLayerUndoCommand( QgsVectorLayerEditBuffer *buffer /Transfer/ ); %Docstring Constructor for QgsVectorLayerUndoCommand + :param buffer: associated edit buffer %End QgsVectorLayer *layer(); %Docstring Returns the layer associated with the undo command - -:rtype: QgsVectorLayer %End virtual int id() const; @@ -59,6 +58,7 @@ class QgsVectorLayerUndoCommandAddFeature : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandAddFeature( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsFeature &f ); %Docstring Constructor for QgsVectorLayerUndoCommandAddFeature + :param buffer: associated edit buffer :param f: feature to add to layer %End @@ -86,6 +86,7 @@ class QgsVectorLayerUndoCommandDeleteFeature : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandDeleteFeature( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsFeatureId fid ); %Docstring Constructor for QgsVectorLayerUndoCommandDeleteFeature + :param buffer: associated edit buffer :param fid: feature ID of feature to delete from layer %End @@ -112,6 +113,7 @@ class QgsVectorLayerUndoCommandChangeGeometry : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandChangeGeometry( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsFeatureId fid, const QgsGeometry &newGeom ); %Docstring Constructor for QgsVectorLayerUndoCommandChangeGeometry + :param buffer: associated edit buffer :param fid: feature ID of feature to modify geometry of :param newGeom: new geometry for feature @@ -144,6 +146,7 @@ class QgsVectorLayerUndoCommandChangeAttribute : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandChangeAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsFeatureId fid, int fieldIndex, const QVariant &newValue, const QVariant &oldValue ); %Docstring Constructor for QgsVectorLayerUndoCommandChangeAttribute + :param buffer: associated edit buffer :param fid: feature ID of feature to modify :param fieldIndex: index of field to modify @@ -172,6 +175,7 @@ class QgsVectorLayerUndoCommandAddAttribute : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandAddAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, const QgsField &field ); %Docstring Constructor for QgsVectorLayerUndoCommandAddAttribute + :param buffer: associated edit buffer :param field: definition of new field to add %End @@ -198,6 +202,7 @@ class QgsVectorLayerUndoCommandDeleteAttribute : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandDeleteAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, int fieldIndex ); %Docstring Constructor for QgsVectorLayerUndoCommandDeleteAttribute + :param buffer: associated edit buffer :param fieldIndex: index of field to delete %End @@ -227,6 +232,7 @@ class QgsVectorLayerUndoCommandRenameAttribute : QgsVectorLayerUndoCommand QgsVectorLayerUndoCommandRenameAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, int fieldIndex, const QString &newName ); %Docstring Constructor for QgsVectorLayerUndoCommandRenameAttribute + :param buffer: associated edit buffer :param fieldIndex: index of field to rename :param newName: new name for field diff --git a/python/core/qgsvectorlayerundopassthroughcommand.sip b/python/core/qgsvectorlayerundopassthroughcommand.sip index 47d7885244eb..8798f4b8afc0 100644 --- a/python/core/qgsvectorlayerundopassthroughcommand.sip +++ b/python/core/qgsvectorlayerundopassthroughcommand.sip @@ -27,6 +27,7 @@ class QgsVectorLayerUndoPassthroughCommand : QgsVectorLayerUndoCommand QgsVectorLayerUndoPassthroughCommand( QgsVectorLayerEditBuffer *buffer, const QString &text, bool autocreate = true ); %Docstring Constructor for QgsVectorLayerUndoPassthroughCommand + :param buffer: associated edit buffer :param text: text associated with command :param autocreate: flag allowing to automatically create a savepoint if necessary @@ -35,8 +36,6 @@ Constructor for QgsVectorLayerUndoPassthroughCommand bool hasError() const; %Docstring Returns error status - -:rtype: bool %End protected: @@ -46,8 +45,6 @@ Returns error status Rollback command, release savepoint or set error status save point must be set prior to call error satus should be false prior to call - -:rtype: bool %End bool setSavePoint( const QString &savePointId = QString() ); @@ -56,8 +53,6 @@ Set the command savepoint or set error status. Error satus should be false prior to call. If the savepoint given in parameter is empty, then a new one is created if none is currently available in the transaction. - -:rtype: bool %End void setError(); @@ -76,8 +71,6 @@ Sets the error message. %Docstring Returns the error message or an empty string if there's none. -:rtype: str - .. versionadded:: 3.0 %End @@ -100,6 +93,7 @@ class QgsVectorLayerUndoPassthroughCommandAddFeatures : QgsVectorLayerUndoPassth QgsVectorLayerUndoPassthroughCommandAddFeatures( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsFeatureList &features ); %Docstring Constructor for QgsVectorLayerUndoPassthroughCommandAddFeatures + :param buffer: associated edit buffer :param features: features to add to layer %End @@ -112,8 +106,6 @@ Constructor for QgsVectorLayerUndoPassthroughCommandAddFeatures QgsFeatureList features() const; %Docstring List of features (added feaures can be modified by default values from database) - -:rtype: QgsFeatureList %End }; @@ -136,6 +128,7 @@ class QgsVectorLayerUndoPassthroughCommandDeleteFeatures : QgsVectorLayerUndoPas QgsVectorLayerUndoPassthroughCommandDeleteFeatures( QgsVectorLayerEditBuffer *buffer /Transfer/, const QgsFeatureIds &fids ); %Docstring Constructor for QgsVectorLayerUndoPassthroughCommandDeleteFeatures + :param buffer: associated edit buffer :param fids: feature IDs of features to delete from layer %End @@ -164,6 +157,7 @@ class QgsVectorLayerUndoPassthroughCommandChangeGeometry : QgsVectorLayerUndoPas QgsVectorLayerUndoPassthroughCommandChangeGeometry( QgsVectorLayerEditBuffer *buffer /Transfer/, const QgsFeatureId &fid, const QgsGeometry &geom ); %Docstring Constructor for QgsVectorLayerUndoPassthroughCommandChangeGeometry + :param buffer: associated edit buffer :param fid: feature ID of feature to change :param geom: new geometru @@ -193,6 +187,7 @@ class QgsVectorLayerUndoPassthroughCommandChangeAttribute: QgsVectorLayerUndoPas QgsVectorLayerUndoPassthroughCommandChangeAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsFeatureId fid, int field, const QVariant &newValue ); %Docstring Constructor for QgsVectorLayerUndoPassthroughCommandChangeAttribute + :param buffer: associated edit buffer :param fid: feature ID of feature :param field: @@ -223,6 +218,7 @@ class QgsVectorLayerUndoPassthroughCommandAddAttribute : QgsVectorLayerUndoPasst QgsVectorLayerUndoPassthroughCommandAddAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, const QgsField &field ); %Docstring Constructor for QgsVectorLayerUndoPassthroughCommandAddAttribute + :param buffer: associated edit buffer :param field: %End @@ -251,6 +247,7 @@ class QgsVectorLayerUndoPassthroughCommandDeleteAttribute : QgsVectorLayerUndoPa QgsVectorLayerUndoPassthroughCommandDeleteAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, int attr ); %Docstring Constructor for QgsVectorLayerUndoCommandDeleteAttribute + :param buffer: associated edit buffer :param attr: %End @@ -279,6 +276,7 @@ class QgsVectorLayerUndoPassthroughCommandRenameAttribute : QgsVectorLayerUndoPa QgsVectorLayerUndoPassthroughCommandRenameAttribute( QgsVectorLayerEditBuffer *buffer /Transfer/, int attr, const QString &newName ); %Docstring Constructor for QgsVectorLayerUndoCommandRenameAttribute + :param buffer: associated edit buffer :param attr: :param newName: @@ -308,6 +306,7 @@ class QgsVectorLayerUndoPassthroughCommandUpdate : QgsVectorLayerUndoPassthrough QgsVectorLayerUndoPassthroughCommandUpdate( QgsVectorLayerEditBuffer *buffer /Transfer/, QgsTransaction *transaction, const QString &sql ); %Docstring Constructor for QgsVectorLayerUndoCommandUpdate + :param buffer: associated edit buffer :param transaction: transaction running the sql query :param sql: the query diff --git a/python/core/qgsvectorlayerutils.sip b/python/core/qgsvectorlayerutils.sip index 8aec1a469aff..ec7cf76f4fec 100644 --- a/python/core/qgsvectorlayerutils.sip +++ b/python/core/qgsvectorlayerutils.sip @@ -44,8 +44,6 @@ Constructor for QgsDuplicateFeatureContext %Docstring Returns all the layers on which features have been duplicated -:rtype: list of QgsVectorLayer - .. versionadded:: 3.0 %End @@ -53,8 +51,6 @@ Returns all the layers on which features have been duplicated %Docstring Returns the duplicated features in the given layer -:rtype: QgsFeatureIds - .. versionadded:: 3.0 %End @@ -67,8 +63,6 @@ Returns true if the specified value already exists within a field. This method c of values inside a layer's attributes. An optional list of ignored feature IDs can be provided, if so, any features with IDs within this list are ignored when testing for existence of the value. -:rtype: bool - .. seealso:: :py:func:`createUniqueValue()` %End @@ -77,8 +71,6 @@ with IDs within this list are ignored when testing for existence of the value. Returns a new attribute value for the specified field index which is guaranteed to be unique. The optional seed value can be used as a basis for generated values. -:rtype: QVariant - .. seealso:: :py:func:`valueExists()` %End @@ -89,8 +81,6 @@ value can be used as a basis for generated values. Tests an attribute value to check whether it passes all constraints which are present on the corresponding field. Returns true if the attribute value is valid for the field. Any constraint failures will be reported in the errors argument. If the strength or origin parameter is set then only constraints with a matching strength/origin will be checked. - -:rtype: bool %End static QgsFeature createFeature( QgsVectorLayer *layer, @@ -103,8 +93,6 @@ Creates a new feature ready for insertion into a layer. Default values and const passed for the new feature to copy as many attribute values as possible from the map, assuming that they respect the layer's constraints. Note that the created feature is not automatically inserted into the layer. - -:rtype: QgsFeature %End static QgsFeature duplicateFeature( QgsVectorLayer *layer, const QgsFeature &feature, QgsProject *project, int depth, QgsDuplicateFeatureContext &duplicateFeatureContext /Out/ ); @@ -115,8 +103,6 @@ The duplicated feature will be automatically inserted into the layer. ``depth`` the higher this number the deeper the level - With depth > 0 the children of the feature are not duplicated ``duplicateFeatureContext`` stores all the layers and the featureids of the duplicated features (incl. children) -:rtype: QgsFeature - .. versionadded:: 3.0 %End diff --git a/python/core/qgsvectorsimplifymethod.sip b/python/core/qgsvectorsimplifymethod.sip index 114d6a31c29a..b65432e97ddc 100644 --- a/python/core/qgsvectorsimplifymethod.sip +++ b/python/core/qgsvectorsimplifymethod.sip @@ -42,8 +42,6 @@ Sets the simplification hints of the vector layer managed SimplifyHints simplifyHints() const; %Docstring Gets the simplification hints of the vector layer managed - -:rtype: SimplifyHints %End enum SimplifyAlgorithm @@ -60,8 +58,6 @@ Sets the local simplification algorithm of the vector layer managed SimplifyAlgorithm simplifyAlgorithm() const; %Docstring Gets the local simplification algorithm of the vector layer managed - -:rtype: SimplifyAlgorithm %End void setTolerance( double tolerance ); @@ -71,8 +67,6 @@ Sets the tolerance of simplification in map units. Represents the maximum distan double tolerance() const; %Docstring Gets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal - -:rtype: float %End void setThreshold( float threshold ); @@ -82,8 +76,6 @@ Sets the simplification threshold of the vector layer managed float threshold() const; %Docstring Gets the simplification threshold of the vector layer managed - -:rtype: float %End void setForceLocalOptimization( bool localOptimization ); @@ -93,8 +85,6 @@ Sets where the simplification executes, after fetch the geometries from provider bool forceLocalOptimization() const; %Docstring Gets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries - -:rtype: bool %End void setMaximumScale( float maximumScale ); @@ -104,8 +94,6 @@ Sets the maximum scale at which the layer should be simplified float maximumScale() const; %Docstring Gets the maximum scale at which the layer should be simplified - -:rtype: float %End }; diff --git a/python/core/qgsvirtuallayerdefinition.sip b/python/core/qgsvirtuallayerdefinition.sip index d80e7ad699d6..680be0643743 100644 --- a/python/core/qgsvirtuallayerdefinition.sip +++ b/python/core/qgsvirtuallayerdefinition.sip @@ -46,43 +46,31 @@ Constructor variant to build a layer with a provider and a source bool isReferenced() const; %Docstring Is it a live layer or not ? - -:rtype: bool %End QString reference() const; %Docstring The reference (id) of the live layer - -:rtype: str %End QString name() const; %Docstring Name of the layer - -:rtype: str %End QString provider() const; %Docstring Provider key - -:rtype: str %End QString source() const; %Docstring The source url used by the provider to build the layer - -:rtype: str %End QString encoding() const; %Docstring Optional encoding for the provider - -:rtype: str %End }; @@ -106,22 +94,16 @@ uid=column_name is the name of a column with unique inte nogeometry is a flag to force the layer to be a non-geometry layer query=sql represents the SQL query. Must be URL-encoded field=column_name:[int|real|text] represents a field with its name and its type - -:rtype: QgsVirtualLayerDefinition %End QUrl toUrl() const; %Docstring Convert the definition into a QUrl - -:rtype: QUrl %End QString toString() const; %Docstring Convert into a QString that can be read by the virtual layer provider - -:rtype: str %End void addSource( const QString &name, const QString &ref ); @@ -139,15 +121,11 @@ Add a layer with a source, a provider and an encoding const QgsVirtualLayerDefinition::SourceLayers &sourceLayers() const; %Docstring Get access to the source layers - -:rtype: QgsVirtualLayerDefinition.SourceLayers %End QString query() const; %Docstring Get the SQL query - -:rtype: str %End void setQuery( const QString &query ); %Docstring @@ -157,8 +135,6 @@ Set the SQL query QString filePath() const; %Docstring Get the file path. May be empty - -:rtype: str %End void setFilePath( const QString &filePath ); %Docstring @@ -168,8 +144,6 @@ Set the file path QString uid() const; %Docstring Get the name of the field with unique identifiers - -:rtype: str %End void setUid( const QString &uid ); %Docstring @@ -179,8 +153,6 @@ Set the name of the field with unique identifiers QString geometryField() const; %Docstring Get the name of the geometry field. Empty if no geometry field - -:rtype: str %End void setGeometryField( const QString &geometryField ); %Docstring @@ -192,8 +164,6 @@ Set the name of the geometry field Get the type of the geometry QgsWkbTypes.NoGeometry to hide any geometry QgsWkbTypes.Unknown for unknown types - -:rtype: QgsWkbTypes.Type %End void setGeometryWkbType( QgsWkbTypes::Type t ); %Docstring @@ -203,8 +173,6 @@ Set the type of the geometry long geometrySrid() const; %Docstring Get the SRID of the geometry - -:rtype: long %End void setGeometrySrid( long srid ); %Docstring @@ -214,8 +182,6 @@ Set the SRID of the geometry QgsFields fields() const; %Docstring Get field definitions - -:rtype: QgsFields %End void setFields( const QgsFields &fields ); %Docstring @@ -225,22 +191,16 @@ Set field definitions bool hasSourceLayer( const QString &name ) const; %Docstring Convenience method to test if a given source layer is part of the definition - -:rtype: bool %End bool hasReferencedLayers() const; %Docstring Convenience method to test whether the definition has referenced (live) layers - -:rtype: bool %End bool hasDefinedGeometry() const; %Docstring Convenient method to test if the geometry is defined (not NoGeometry and not Unknown) - -:rtype: bool %End }; diff --git a/python/core/qgsvirtuallayerdefinitionutils.sip b/python/core/qgsvirtuallayerdefinitionutils.sip index d0630b9c02d1..65304ddefab5 100644 --- a/python/core/qgsvirtuallayerdefinitionutils.sip +++ b/python/core/qgsvirtuallayerdefinitionutils.sip @@ -23,8 +23,6 @@ Utils class for QgsVirtualLayerDefinition static QgsVirtualLayerDefinition fromJoinedLayer( QgsVectorLayer *joinedLayer ); %Docstring Get a virtual layer definition from a vector layer where vector joins are replaced by SQL LEFT JOINs - -:rtype: QgsVirtualLayerDefinition %End }; diff --git a/python/core/qgsxmlutils.sip b/python/core/qgsxmlutils.sip index 1c3da9dbfa0a..d74932b95d60 100644 --- a/python/core/qgsxmlutils.sip +++ b/python/core/qgsxmlutils.sip @@ -24,40 +24,30 @@ Assorted helper methods for reading and writing chunks of XML static QgsUnitTypes::DistanceUnit readMapUnits( const QDomElement &element ); %Docstring Decodes a distance unit from a DOM element. + :param element: DOM element to decode :return: distance units -:rtype: QgsUnitTypes.DistanceUnit - .. seealso:: :py:func:`writeMapUnits()` %End static QgsRectangle readRectangle( const QDomElement &element ); -%Docstring - -:rtype: QgsRectangle -%End static QDomElement writeMapUnits( QgsUnitTypes::DistanceUnit units, QDomDocument &doc ); %Docstring Encodes a distance unit to a DOM element. + :param units: units to encode :param doc: DOM document :return: element containing encoded units -:rtype: QDomElement - .. seealso:: :py:func:`readMapUnits()` %End static QDomElement writeRectangle( const QgsRectangle &rect, QDomDocument &doc ); -%Docstring - -:rtype: QDomElement -%End static QDomElement writeVariant( const QVariant &value, QDomDocument &doc ); %Docstring @@ -69,15 +59,11 @@ Supported types are - QVariant.Int - QVariant.Double - QVariant.String - -:rtype: QDomElement %End static QVariant readVariant( const QDomElement &element ); %Docstring Read a QVariant from a QDomElement. - -:rtype: QVariant %End }; diff --git a/python/core/qgsziputils.sip b/python/core/qgsziputils.sip index 7d2f60c09dff..610887d6c8e8 100644 --- a/python/core/qgsziputils.sip +++ b/python/core/qgsziputils.sip @@ -19,11 +19,10 @@ namespace QgsZipUtils %Docstring Returns true if the file name is a zipped file ( i.e with a '.qgz' extension, false otherwise. + :param filename: The name of the file :return: true if the file is zipped, false otherwise -:rtype: bool - %End bool unzip( const QString &zip, const QString &dir, QStringList &files /Out/ ); @@ -31,12 +30,11 @@ extension, false otherwise. Unzip a zip file in an output directory. An error is returned if the zip filename does not exist, the output directory does not exist or is not writable. + :param zip: The zip filename :param dir: The output directory :param files: The absolute path of unzipped files -:rtype: bool - .. versionadded:: 3.0 %End @@ -45,11 +43,10 @@ not writable. Zip the list of files in the zip file. If the zip file already exists or is empty, an error is returned. If an input file does not exist, an error is also returned. + :param zip: The zip filename :param files: The absolute path to files to embed within the zip -:rtype: bool - .. versionadded:: 3.0 %End }; diff --git a/python/core/raster/qgsbrightnesscontrastfilter.sip b/python/core/raster/qgsbrightnesscontrastfilter.sip index 045146c1eeee..ef64347da200 100644 --- a/python/core/raster/qgsbrightnesscontrastfilter.sip +++ b/python/core/raster/qgsbrightnesscontrastfilter.sip @@ -39,17 +39,9 @@ Brightness/contrast filter pipe for rasters. void setBrightness( int brightness ); int brightness() const; -%Docstring - -:rtype: int -%End void setContrast( int contrast ); int contrast() const; -%Docstring - -:rtype: int -%End virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const; diff --git a/python/core/raster/qgscolorrampshader.sip b/python/core/raster/qgscolorrampshader.sip index 57e953ec564b..4199c2932603 100644 --- a/python/core/raster/qgscolorrampshader.sip +++ b/python/core/raster/qgscolorrampshader.sip @@ -38,6 +38,7 @@ A ramp shader will color a raster pixel based on a list of values ranges in a ra QgsColorRampShader( double minimumValue = 0.0, double maximumValue = 255.0, QgsColorRamp *colorRamp = 0, Type type = Interpolated, ClassificationMode classificationMode = Continuous ); %Docstring Creates a new color ramp shader. + :param minimumValue: minimum value for the raster shader :param maximumValue: maximum value for the raster shader :param type: interpolation type used @@ -69,31 +70,21 @@ convenience constructor QColor color; bool operator<( const QgsColorRampShader::ColorRampItem &other ) const; -%Docstring - -:rtype: bool -%End }; QList colorRampItemList() const; %Docstring Get the custom colormap - -:rtype: list of QgsColorRampShader.ColorRampItem %End Type colorRampType() const; %Docstring Get the color ramp type - -:rtype: Type %End QString colorRampTypeAsQString(); %Docstring Get the color ramp type as a string - -:rtype: str %End void setColorRampItemList( const QList &list ); //TODO: sort on set @@ -107,8 +98,6 @@ convenience constructor %Docstring Get the source color ramp -:rtype: QgsColorRamp - .. versionadded:: 3.0 .. seealso:: :py:func:`setSourceColorRamp()` @@ -131,6 +120,7 @@ Set the source color ramp. Ownership is transferred to the renderer. void classifyColorRamp( const int classes = 0, const int band = -1, const QgsRectangle &extent = QgsRectangle(), QgsRasterInterface *input = 0 ); %Docstring Classify color ramp shader + :param classes: number of classes :param band: raster band used in classification (only used in quantile mode) :param extent: extent used in classification (only used in quantile mode) @@ -140,6 +130,7 @@ Classify color ramp shader void classifyColorRamp( const int band = -1, const QgsRectangle &extent = QgsRectangle(), QgsRasterInterface *input = 0 ) /PyName=classifyColorRampV2/; %Docstring Classify color ramp shader + :param band: raster band used in classification (quantile mode only) :param extent: extent used in classification (quantile mode only) :param input: raster input used in classification (quantile mode only) @@ -149,8 +140,6 @@ Classify color ramp shader %Docstring Generates and new RGB value based on one input value - -:rtype: bool %End virtual bool shade( double redValue, double greenValue, @@ -159,8 +148,6 @@ Classify color ramp shader int *returnBlueValue /Out/, int *returnAlphaValue /Out/ ); %Docstring Generates and new RGB value based on original RGB value - -:rtype: bool %End virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems /Out/ ) const; @@ -177,13 +164,12 @@ Sets classification mode ClassificationMode classificationMode() const; %Docstring Returns the classification mode - -:rtype: ClassificationMode %End void setClip( bool clip ); %Docstring Sets whether the shader should not render values out of range. + :param clip: set to true to clip values which are out of range. .. seealso:: :py:func:`clip()` @@ -193,8 +179,6 @@ Sets whether the shader should not render values out of range. %Docstring Returns whether the shader will clip values which are out of range. -:rtype: bool - .. seealso:: :py:func:`setClip()` %End diff --git a/python/core/raster/qgscontrastenhancement.sip b/python/core/raster/qgscontrastenhancement.sip index f207bbe702b4..beebdaf00e74 100644 --- a/python/core/raster/qgscontrastenhancement.sip +++ b/python/core/raster/qgscontrastenhancement.sip @@ -41,63 +41,43 @@ ContrastEnhancementAlgorithm. static double maximumValuePossible( Qgis::DataType ); %Docstring Helper function that returns the maximum possible value for a GDAL data type - -:rtype: float %End static double minimumValuePossible( Qgis::DataType ); %Docstring Helper function that returns the minimum possible value for a GDAL data type - -:rtype: float %End static QString contrastEnhancementAlgorithmString( ContrastEnhancementAlgorithm algorithm ); %Docstring Return a string to serialize ContrastEnhancementAlgorithm - -:rtype: str %End static ContrastEnhancementAlgorithm contrastEnhancementAlgorithmFromString( const QString &contrastEnhancementString ); %Docstring Deserialize ContrastEnhancementAlgorithm - -:rtype: ContrastEnhancementAlgorithm %End double maximumValue() const; %Docstring Return the maximum value for the contrast enhancement range. - -:rtype: float %End double minimumValue() const; %Docstring Return the minimum value for the contrast enhancement range. - -:rtype: float %End ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() const; -%Docstring - -:rtype: ContrastEnhancementAlgorithm -%End int enhanceContrast( double ); %Docstring Apply the contrast enhancement to a value. Return values are 0 - 254, -1 means the pixel was clipped and should not be displayed - -:rtype: int %End bool isValueInDisplayableRange( double ); %Docstring Return true if pixel is in stretable range, false if pixel is outside of range (i.e., clipped) - -:rtype: bool %End void setContrastEnhancementAlgorithm( ContrastEnhancementAlgorithm, bool generateTable = true ); @@ -126,10 +106,6 @@ ContrastEnhancementAlgorithm. private: const QgsContrastEnhancement &operator=( const QgsContrastEnhancement & ); -%Docstring - -:rtype: QgsContrastEnhancement -%End }; /************************************************************************ diff --git a/python/core/raster/qgscontrastenhancementfunction.sip b/python/core/raster/qgscontrastenhancementfunction.sip index 931ad6314c58..d501df42b691 100644 --- a/python/core/raster/qgscontrastenhancementfunction.sip +++ b/python/core/raster/qgscontrastenhancementfunction.sip @@ -29,15 +29,11 @@ a specified bounding range. virtual int enhance( double ); %Docstring A customizable method that takes in a double and returns a int between 0 and 255 - -:rtype: int %End virtual bool isValueInDisplayableRange( double ); %Docstring A customicable method to indicate if the pixels is displayable - -:rtype: bool %End void setMaximumValue( double ); diff --git a/python/core/raster/qgshillshaderenderer.sip b/python/core/raster/qgshillshaderenderer.sip index 921a4a1cbda7..ccd2e17ed61c 100644 --- a/python/core/raster/qgshillshaderenderer.sip +++ b/python/core/raster/qgshillshaderenderer.sip @@ -28,6 +28,7 @@ class QgsHillshadeRenderer : QgsRasterRenderer QgsHillshadeRenderer( QgsRasterInterface *input, int band, double lightAzimuth, double lightAltitude ); %Docstring A renderer for generating live hillshade models. + :param input: The input raster interface :param band: The band in the raster to use :param lightAzimuth: The azimuth of the light source @@ -40,12 +41,11 @@ class QgsHillshadeRenderer : QgsRasterRenderer static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/; %Docstring Factory method to create a new renderer + :param elem: A DOM element to create the renderer from. :param input: The raster input interface. :return: A new QgsHillshadeRenderer. -:rtype: QgsRasterRenderer - %End virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const; @@ -60,8 +60,6 @@ class QgsHillshadeRenderer : QgsRasterRenderer int band() const; %Docstring Returns the band used by the renderer - -:rtype: int %End void setBand( int bandNo ); @@ -75,8 +73,6 @@ Sets the band used by the renderer. %Docstring Returns the direction of the light over the raster between 0-360. -:rtype: float - .. seealso:: :py:func:`setAzimuth()` %End @@ -84,8 +80,6 @@ Returns the direction of the light over the raster between 0-360. %Docstring Returns the angle of the light source over the raster. -:rtype: float - .. seealso:: :py:func:`setAltitude()` %End @@ -93,8 +87,6 @@ Returns the angle of the light source over the raster. %Docstring Returns the Z scaling factor. -:rtype: float - .. seealso:: :py:func:`setZFactor()` %End @@ -102,14 +94,13 @@ Returns the Z scaling factor. %Docstring Returns true if the renderer is using multi-directional hillshading. -:rtype: bool - .. seealso:: :py:func:`setMultiDirectional()` %End void setAzimuth( double azimuth ); %Docstring Set the azimuth of the light source. + :param azimuth: The azimuth of the light source, between 0 and 360.0 .. seealso:: :py:func:`azimuth()` @@ -118,6 +109,7 @@ Returns true if the renderer is using multi-directional hillshading. void setAltitude( double altitude ); %Docstring Set the altitude of the light source + :param altitude: the altitude .. seealso:: :py:func:`altitude()` @@ -126,6 +118,7 @@ Returns true if the renderer is using multi-directional hillshading. void setZFactor( double zfactor ); %Docstring Set the Z scaling factor of the result image. + :param zfactor: The z factor .. seealso:: :py:func:`zFactor()` @@ -134,6 +127,7 @@ Returns true if the renderer is using multi-directional hillshading. void setMultiDirectional( bool isMultiDirectional ); %Docstring Sets whether to render using a multi-directional hillshade algorithm. + :param isMultiDirectional: set to true to use multi directional rendering .. seealso:: :py:func:`multiDirectional()` diff --git a/python/core/raster/qgshuesaturationfilter.sip b/python/core/raster/qgshuesaturationfilter.sip index decb6f068b76..fd5578cf274f 100644 --- a/python/core/raster/qgshuesaturationfilter.sip +++ b/python/core/raster/qgshuesaturationfilter.sip @@ -48,36 +48,16 @@ Color and saturation filter pipe for rasters. void setSaturation( int saturation ); int saturation() const; -%Docstring - -:rtype: int -%End void setGrayscaleMode( QgsHueSaturationFilter::GrayscaleMode grayscaleMode ); QgsHueSaturationFilter::GrayscaleMode grayscaleMode() const; -%Docstring - -:rtype: QgsHueSaturationFilter.GrayscaleMode -%End void setColorizeOn( bool colorizeOn ); bool colorizeOn() const; -%Docstring - -:rtype: bool -%End void setColorizeColor( const QColor &colorizeColor ); QColor colorizeColor() const; -%Docstring - -:rtype: QColor -%End void setColorizeStrength( int colorizeStrength ); int colorizeStrength() const; -%Docstring - -:rtype: int -%End virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const; diff --git a/python/core/raster/qgsmultibandcolorrenderer.sip b/python/core/raster/qgsmultibandcolorrenderer.sip index 9e3c83fd6317..347ebc0f31be 100644 --- a/python/core/raster/qgsmultibandcolorrenderer.sip +++ b/python/core/raster/qgsmultibandcolorrenderer.sip @@ -30,63 +30,33 @@ Renderer for multiband images with the color components %Docstring QgsMultiBandColorRenderer cannot be copied. Use clone() instead. - -:rtype: QgsMultiBandColorRenderer %End static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/; -%Docstring - -:rtype: QgsRasterRenderer -%End virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/; int redBand() const; -%Docstring - -:rtype: int -%End void setRedBand( int band ); int greenBand() const; -%Docstring - -:rtype: int -%End void setGreenBand( int band ); int blueBand() const; -%Docstring - -:rtype: int -%End void setBlueBand( int band ); const QgsContrastEnhancement *redContrastEnhancement() const; -%Docstring - -:rtype: QgsContrastEnhancement -%End void setRedContrastEnhancement( QgsContrastEnhancement *ce /Transfer/ ); %Docstring Takes ownership %End const QgsContrastEnhancement *greenContrastEnhancement() const; -%Docstring - -:rtype: QgsContrastEnhancement -%End void setGreenContrastEnhancement( QgsContrastEnhancement *ce /Transfer/ ); %Docstring Takes ownership %End const QgsContrastEnhancement *blueContrastEnhancement() const; -%Docstring - -:rtype: QgsContrastEnhancement -%End void setBlueContrastEnhancement( QgsContrastEnhancement *ce /Transfer/ ); %Docstring Takes ownership @@ -101,10 +71,6 @@ Takes ownership private: QgsMultiBandColorRenderer( const QgsMultiBandColorRenderer & ); const QgsMultiBandColorRenderer &operator=( const QgsMultiBandColorRenderer & ); -%Docstring - -:rtype: QgsMultiBandColorRenderer -%End }; /************************************************************************ diff --git a/python/core/raster/qgspalettedrasterrenderer.sip b/python/core/raster/qgspalettedrasterrenderer.sip index 41bf02b94801..2b8d81dd0702 100644 --- a/python/core/raster/qgspalettedrasterrenderer.sip +++ b/python/core/raster/qgspalettedrasterrenderer.sip @@ -56,14 +56,8 @@ Constructor for QgsPalettedRasterRenderer. %Docstring QgsPalettedRasterRenderer cannot be copied. Use clone() instead. - -:rtype: QgsPalettedRasterRenderer %End static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/; -%Docstring - -:rtype: QgsRasterRenderer -%End virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/; @@ -71,23 +65,17 @@ QgsPalettedRasterRenderer cannot be copied. Use clone() instead. int nColors() const; %Docstring Returns number of colors - -:rtype: int %End ClassData classes() const; %Docstring Returns a map of value to classes (colors) used by the renderer. - -:rtype: ClassData %End QString label( int idx ) const; %Docstring Return optional category label -:rtype: str - .. versionadded:: 2.1 %End @@ -102,8 +90,6 @@ Set category label %Docstring Returns the raster band used for rendering the raster. -:rtype: int - .. versionadded:: 3.0 %End @@ -129,8 +115,6 @@ Set the source color ``ramp``. Ownership is transferred to the renderer. %Docstring Get the source color ramp -:rtype: QgsColorRamp - .. versionadded:: 3.0 .. seealso:: :py:func:`setSourceColorRamp()` @@ -140,8 +124,6 @@ Get the source color ramp %Docstring Converts a raster color ``table`` to paletted renderer class data. -:rtype: QgsPalettedRasterRenderer.ClassData - .. versionadded:: 3.0 %End @@ -149,8 +131,6 @@ Converts a raster color ``table`` to paletted renderer class data. %Docstring Converts a ``string`` containing a color table or class data to to paletted renderer class data. -:rtype: QgsPalettedRasterRenderer.ClassData - .. versionadded:: 3.0 .. seealso:: :py:func:`classDataFromFile()` @@ -162,8 +142,6 @@ Converts a ``string`` containing a color table or class data to to paletted rend %Docstring Opens a color table file and returns corresponding paletted renderer class data. -:rtype: QgsPalettedRasterRenderer.ClassData - .. versionadded:: 3.0 .. seealso:: :py:func:`classDataFromString()` @@ -173,8 +151,6 @@ Opens a color table file and returns corresponding paletted renderer class data. %Docstring Converts classes to a string representation, using the .clr/gdal color table file format. -:rtype: str - .. versionadded:: 3.0 .. seealso:: :py:func:`classDataFromString()` @@ -186,18 +162,12 @@ Converts classes to a string representation, using the .clr/gdal color table fil Generates class data from a ``raster``, for the specified ``bandNumber``. An optional color ``ramp`` can be specified to automatically assign colors from the ramp. -:rtype: QgsPalettedRasterRenderer.ClassData - .. versionadded:: 3.0 %End private: QgsPalettedRasterRenderer( const QgsPalettedRasterRenderer & ); const QgsPalettedRasterRenderer &operator=( const QgsPalettedRasterRenderer & ); -%Docstring - -:rtype: QgsPalettedRasterRenderer -%End }; /************************************************************************ diff --git a/python/core/raster/qgsraster.sip b/python/core/raster/qgsraster.sip index f82e9af70ae3..04739beb53ed 100644 --- a/python/core/raster/qgsraster.sip +++ b/python/core/raster/qgsraster.sip @@ -94,11 +94,10 @@ Get value representable by given data type. Supported are numerical types Byte, UInt16, Int16, UInt32, Int32, Float32, Float64. This is done through C casting, so you have to be sure that the provided value is representable in the output data type. This can be checked with isRepresentableValue(). + :param value: :param dataType: -:rtype: float - .. versionadded:: 2.1 %End }; diff --git a/python/core/raster/qgsrasterbandstats.sip b/python/core/raster/qgsrasterbandstats.sip index 7d3129bbbd1d..fc770b6a48fb 100644 --- a/python/core/raster/qgsrasterbandstats.sip +++ b/python/core/raster/qgsrasterbandstats.sip @@ -40,8 +40,6 @@ raster band. bool contains( const QgsRasterBandStats &s ) const; %Docstring Compares region, size etc. not collected statistics - -:rtype: bool %End int bandNumber; diff --git a/python/core/raster/qgsrasterblock.sip b/python/core/raster/qgsrasterblock.sip index cddf275f3c3e..aa4929993a1c 100644 --- a/python/core/raster/qgsrasterblock.sip +++ b/python/core/raster/qgsrasterblock.sip @@ -25,6 +25,7 @@ Raster data container. QgsRasterBlock( Qgis::DataType dataType, int width, int height ); %Docstring Constructor which allocates data block in memory + :param dataType: raster data type :param width: width of data matrix :param height: height of data matrix @@ -35,13 +36,12 @@ Raster data container. bool reset( Qgis::DataType dataType, int width, int height ); %Docstring Reset block + :param dataType: raster data type :param width: width of data matrix :param height: height of data matrix :return: true on success -:rtype: bool - %End @@ -50,8 +50,6 @@ Raster data container. Returns true if the block is valid (correctly filled with data). An empty block may still be valid (if zero size block was requested). If the block is not valid, error may be retrieved by error() method. - -:rtype: bool %End void setValid( bool valid ); @@ -64,48 +62,30 @@ If the block is not valid, error may be retrieved by error() method. Returns true if block is empty, i.e. its size is 0 (zero rows or cols). This method does not return true if size is not zero and all values are 'no data' (null). - -:rtype: bool %End static int typeSize( int dataType ); -%Docstring - -:rtype: int -%End int dataTypeSize() const; -%Docstring - -:rtype: int -%End static bool typeIsNumeric( Qgis::DataType type ); %Docstring Returns true if data type is numeric - -:rtype: bool %End static bool typeIsColor( Qgis::DataType type ); %Docstring Returns true if data type is color - -:rtype: bool %End Qgis::DataType dataType() const; %Docstring Returns data type - -:rtype: Qgis.DataType %End static Qgis::DataType typeWithNoDataValue( Qgis::DataType dataType, double *noDataValue ); %Docstring For given data type returns wider type and sets no data value - -:rtype: Qgis.DataType %End bool hasNoDataValue() const; @@ -113,8 +93,6 @@ For given data type returns wider type and sets no data value True if the block has no data value. :return: true if the block has no data value -:rtype: bool - .. seealso:: :py:func:`noDataValue()` %End @@ -126,8 +104,6 @@ that it really contains any no data. It can be used to speed up processing. Not the difference between this method and hasNoDataValue(). :return: true if the block may contain no data * -:rtype: bool - %End void setNoDataValue( double noDataValue ); @@ -155,8 +131,6 @@ Return no data value. If the block does not have a no data value the returned value is undefined. :return: No data value -:rtype: float - .. seealso:: :py:func:`hasNoDataValue()` %End @@ -164,144 +138,131 @@ returned value is undefined. static QByteArray valueBytes( Qgis::DataType dataType, double value ); %Docstring Get byte array representing a value. + :param dataType: data type :param value: value :return: byte array representing the value * -:rtype: QByteArray - %End double value( int row, int column ) const; %Docstring Read a single value if type of block is numeric. If type is color, returned value is undefined. + :param row: row index :param column: column index :return: value * -:rtype: float - %End double value( qgssize index ) const; %Docstring Read a single value if type of block is numeric. If type is color, returned value is undefined. + :param index: data matrix index (long type in Python) :return: value * -:rtype: float - %End QRgb color( int row, int column ) const; %Docstring Read a single color + :param row: row index :param column: column index :return: color * -:rtype: QRgb - %End QRgb color( qgssize index ) const; %Docstring Read a single value + :param index: data matrix index (long type in Python) :return: color * -:rtype: QRgb - %End bool isNoData( int row, int column ); %Docstring Check if value at position is no data + :param row: row index :param column: column index :return: true if value is no data * -:rtype: bool - %End bool isNoData( qgssize index ); %Docstring Check if value at position is no data + :param index: data matrix index (long type in Python) :return: true if value is no data * -:rtype: bool - %End bool setValue( int row, int column, double value ); %Docstring Set value on position + :param row: row index :param column: column index :param value: the value to be set :return: true on success * -:rtype: bool - %End bool setValue( qgssize index, double value ); %Docstring Set value on index (indexed line by line) + :param index: data matrix index (long type in Python) :param value: the value to be set :return: true on success * -:rtype: bool - %End bool setColor( int row, int column, QRgb color ); %Docstring Set color on position + :param row: row index :param column: column index :param color: the color to be set, QRgb value :return: true on success * -:rtype: bool - %End bool setColor( qgssize index, QRgb color ); %Docstring Set color on index (indexed line by line) + :param index: data matrix index (long type in Python) :param color: the color to be set, QRgb value :return: true on success * -:rtype: bool - %End bool setIsNoData( int row, int column ); %Docstring Set no data on pixel + :param row: row index :param column: column index :return: true on success * -:rtype: bool - %End bool setIsNoData( qgssize index ); %Docstring Set no data on pixel + :param index: data matrix index (long type in Python) :return: true on success * -:rtype: bool - %End bool setIsNoData(); @@ -309,8 +270,6 @@ returned value is undefined. Set the whole block to no data :return: true on success * -:rtype: bool - %End bool setIsNoDataExcept( QRect exceptRect ); @@ -318,8 +277,6 @@ returned value is undefined. Set the whole block to no data except specified rectangle :return: true on success * -:rtype: bool - %End void setIsData( int row, int column ); @@ -328,6 +285,7 @@ returned value is undefined. no data value set then an internal map of no data pixels is maintained for the block. In this case it is possible to reset a pixel to flag it as having valid data using this method. This method has no effect for raster blocks with an explicit no data value set. + :param row: row index :param column: column index @@ -340,6 +298,7 @@ method. This method has no effect for raster blocks with an explicit no data val no data value set then an internal map of no data pixels is maintained for the block. In this case it is possible to reset a pixel to flag it as having valid data using this method. This method has no effect for raster blocks with an explicit no data value set. + :param index: data matrix index (long type in Python) .. versionadded:: 2.10 @@ -353,8 +312,6 @@ owned by the QgsRasterBlock, therefore it is only valid while the QgsRasterBlock still exists. Writing to the returned QByteArray will not affect the original data: a deep copy of the data will be made and only the local copy will be modified. -:rtype: QByteArray - .. note:: in Python the method returns ordinary bytes object as the @@ -381,22 +338,20 @@ overwrite data somewhere in the middle of the internal buffer. %Docstring Print double value with all necessary significant digits. It is ensured that conversion back to double gives the same number. + :param value: the value to be printed :return: string representing the value* -:rtype: str - %End bool convert( Qgis::DataType destDataType ); %Docstring Convert data to different type. + :param destDataType: dest data type :return: true on success * -:rtype: bool - %End QImage image() const; @@ -404,18 +359,15 @@ It is ensured that conversion back to double gives the same number. Get image if type is color. :return: image * -:rtype: QImage - %End bool setImage( const QImage *image ); %Docstring set image. + :param image: image :return: true on success * -:rtype: bool - %End @@ -432,8 +384,6 @@ Apply band scale and offset to raster block values QgsError error() const; %Docstring Get error - -:rtype: QgsError %End void setError( const QgsError &error ); @@ -442,32 +392,25 @@ Apply band scale and offset to raster block values %End QString toString() const; -%Docstring - -:rtype: str -%End static QRect subRect( const QgsRectangle &extent, int width, int height, const QgsRectangle &subExtent ); %Docstring For extent and width, height find rectangle covered by subextent. The output rect has x oriented from left to right and y from top to bottom (upper-left to lower-right orientation). + :param extent: extent, usually the larger :param width: numbers of columns in theExtent :param height: numbers of rows in theExtent :param subExtent: extent, usually smaller than theExtent :return: the rectangle covered by sub extent -:rtype: QRect - %End int width() const; %Docstring Returns the width (number of columns) of the raster block. -:rtype: int - .. seealso:: :py:func:`height` .. versionadded:: 2.10 @@ -477,8 +420,6 @@ Returns the width (number of columns) of the raster block. %Docstring Returns the height (number of rows) of the raster block. -:rtype: int - .. seealso:: :py:func:`width` .. versionadded:: 2.10 diff --git a/python/core/raster/qgsrasterchecker.sip b/python/core/raster/qgsrasterchecker.sip index 047dc7a3ea9e..b62bc9bf6fdb 100644 --- a/python/core/raster/qgsrasterchecker.sip +++ b/python/core/raster/qgsrasterchecker.sip @@ -24,21 +24,16 @@ or render time. QgsRasterChecker(); QString report(); -%Docstring - -:rtype: str -%End bool runTest( const QString &verifiedKey, QString verifiedUri, const QString &expectedKey, QString expectedUri ); %Docstring Test using renderer to generate the image to be compared. + :param verifiedKey: verified provider key :param verifiedUri: URI of the raster to be verified :param expectedKey: expected provider key :param expectedUri: URI of the expected (control) raster - -:rtype: bool %End }; // class QgsRasterChecker diff --git a/python/core/raster/qgsrasterdataprovider.sip b/python/core/raster/qgsrasterdataprovider.sip index 5f04a37d48c6..cef6f4808a4a 100644 --- a/python/core/raster/qgsrasterdataprovider.sip +++ b/python/core/raster/qgsrasterdataprovider.sip @@ -45,6 +45,7 @@ Starts the image download void finish( const QImage &legend ); %Docstring Emitted when the download completes + :param legend: The downloaded legend image * %End void progress( qint64 received, qint64 total ); @@ -78,8 +79,6 @@ Base class for raster data providers. virtual bool setInput( QgsRasterInterface *input ); %Docstring It makes no sense to set input on provider */ - -:rtype: bool %End virtual QgsRectangle extent() const = 0; @@ -89,8 +88,6 @@ It makes no sense to set input on provider */ %Docstring Returns data type for the band specified by number - -:rtype: Qgis.DataType %End virtual Qgis::DataType sourceDataType( int bandNo ) const = 0; @@ -98,41 +95,25 @@ Returns data type for the band specified by number %Docstring Returns source data type for the band specified by number, source data type may be shorter than dataType - -:rtype: Qgis.DataType %End virtual int colorInterpretation( int bandNo ) const; %Docstring Returns data type for the band specified by number - -:rtype: int %End QString colorName( int colorInterpretation ) const; -%Docstring - -:rtype: str -%End virtual bool reload(); %Docstring Reload data (data could change) - -:rtype: bool %End virtual QString colorInterpretationName( int bandNo ) const; -%Docstring - -:rtype: str -%End virtual double bandScale( int bandNo ) const; %Docstring Read band scale for raster value -:rtype: float - .. versionadded:: 2.3 %End @@ -140,8 +121,6 @@ Read band scale for raster value %Docstring Read band offset for raster value -:rtype: float - .. versionadded:: 2.3 %End @@ -150,22 +129,16 @@ Read band offset for raster value %Docstring Read block of data using given extent and size. - -:rtype: QgsRasterBlock %End virtual bool sourceHasNoDataValue( int bandNo ) const; %Docstring Return true if source band has no data value - -:rtype: bool %End virtual bool useSourceNoDataValue( int bandNo ) const; %Docstring Get source nodata value usage - -:rtype: bool %End virtual void setUseSourceNoDataValue( int bandNo, bool use ); @@ -176,8 +149,6 @@ Return true if source band has no data value virtual double sourceNoDataValue( int bandNo ) const; %Docstring Value representing no data value. - -:rtype: float %End virtual void setUserNoDataValue( int bandNo, const QgsRasterRangeList &noData ); @@ -185,29 +156,19 @@ Value representing no data value. virtual QgsRasterRangeList userNoDataValues( int bandNo ) const; %Docstring Get list of user no data value ranges - -:rtype: QgsRasterRangeList %End virtual QList colorTable( int bandNo ) const; -%Docstring - -:rtype: list of QgsColorRampShader.ColorRampItem -%End virtual QStringList subLayers() const; %Docstring Returns the sublayers of this layer - useful for providers that manage their own layers, such as WMS * - -:rtype: list of str %End virtual bool supportsLegendGraphic() const; %Docstring Returns whether the provider supplies a legend graphic - -:rtype: bool %End @@ -219,11 +180,10 @@ their own layers, such as WMS * contextual legends. :return: a download handler or null if the provider does not support -:rtype: QgsImageFetcher - legend at all. Ownership of the returned object is transferred to caller. + .. versionadded:: 2.8 %End @@ -234,42 +194,31 @@ to caller. QgsRasterBlockFeedback *feedback = 0 ); %Docstring Create pyramid overviews - -:rtype: str %End virtual QList buildPyramidList( QList overviewList = QList() ); %Docstring Accessor for the raster layers pyramid list. + :param overviewList: used to construct the pyramid list (optional), when empty the list is defined by the provider. A pyramid list defines the POTENTIAL pyramids that can be in a raster. To know which of the pyramid layers ACTUALLY exists you need to look at the existsFlag member in each struct stored in the list. - -:rtype: list of QgsRasterPyramid %End bool hasPyramids(); %Docstring Returns true if raster has at least one populated histogram. - -:rtype: bool %End virtual QString htmlMetadata() = 0; %Docstring Get metadata in a format suitable for feeding directly into a subset of the GUI raster properties "Metadata" tab. - -:rtype: str %End virtual QgsRasterIdentifyResult identify( const QgsPointXY &point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ); -%Docstring - -:rtype: QgsRasterIdentifyResult -%End virtual QString lastErrorTitle() = 0; %Docstring @@ -279,8 +228,6 @@ If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the failure. Interactive users of this provider can then, for example, call a QMessageBox to display the contents. - -:rtype: str %End virtual QString lastError() = 0; @@ -291,22 +238,16 @@ If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the failure. Interactive users of this provider can then, for example, call a QMessageBox to display the contents. - -:rtype: str %End virtual QString lastErrorFormat(); %Docstring Returns the format of the error text for the last error in this provider - -:rtype: str %End int dpi() const; %Docstring Returns the dpi of the output device. - -:rtype: int %End void setDpi( int dpi ); @@ -317,15 +258,11 @@ Sets the output device resolution. virtual QDateTime timestamp() const; %Docstring Time stamp of data source in the moment when data/metadata were loaded by provider - -:rtype: QDateTime %End virtual QDateTime dataTimestamp() const; %Docstring Current time stamp of data source - -:rtype: QDateTime %End virtual bool isEditable() const; @@ -333,8 +270,6 @@ Current time stamp of data source Checks whether the provider is in editing mode, i.e. raster write operations will be accepted. By default providers are not editable. Use setEditable() method to enable/disable editing. -:rtype: bool - .. seealso:: :py:func:`setEditable()` .. versionadded:: 3.0 @@ -345,8 +280,6 @@ By default providers are not editable. Use setEditable() method to enable/disabl Turns on/off editing mode of the provider. When in editing mode, it is possible to overwrite data of the provider using writeBlock() calls. -:rtype: bool - .. note:: Only some providers support editing mode and even those may fail to turn @@ -361,10 +294,6 @@ value whether the operation was successful. %End virtual bool write( void *data, int band, int width, int height, int xOffset, int yOffset ); -%Docstring - -:rtype: bool -%End bool writeBlock( QgsRasterBlock *block, int band, int xOffset = 0, int yOffset = 0 ); %Docstring @@ -380,8 +309,6 @@ xOffset and yOffset values. Writing is supported only by some data providers. Provider has to be in editing mode in order to allow write operations. -:rtype: bool - .. seealso:: :py:func:`isEditable()` :return: true on success @@ -398,40 +325,31 @@ in order to allow write operations. const QStringList &createOptions = QStringList() ); %Docstring Creates a new dataset with mDataSourceURI - -:rtype: QgsRasterDataProvider %End virtual bool setNoDataValue( int bandNo, double noDataValue ); %Docstring Set no data value on created dataset + :param bandNo: band number :param noDataValue: no data value - -:rtype: bool %End virtual bool remove(); %Docstring Remove dataset - -:rtype: bool %End static QList > pyramidResamplingMethods( const QString &providerKey ); %Docstring Returns a list of pyramid resampling method name and label pairs for given provider - -:rtype: list of QPair %End virtual QString validateCreationOptions( const QStringList &createOptions, const QString &format ); %Docstring Validates creation options for a specific dataset and destination format. -:rtype: str - .. note:: used by GDAL provider only @@ -446,40 +364,20 @@ Validates creation options for a specific dataset and destination format. %Docstring Validates pyramid creation options for a specific dataset and destination format -:rtype: str - .. note:: used by GDAL provider only %End static QString identifyFormatName( QgsRaster::IdentifyFormat format ); -%Docstring - -:rtype: str -%End static QgsRaster::IdentifyFormat identifyFormatFromName( const QString &formatName ); -%Docstring - -:rtype: QgsRaster.IdentifyFormat -%End static QString identifyFormatLabel( QgsRaster::IdentifyFormat format ); -%Docstring - -:rtype: str -%End static Capability identifyFormatToCapability( QgsRaster::IdentifyFormat format ); -%Docstring - -:rtype: Capability -%End virtual int stepWidth() const; %Docstring Step width for raster iterations. -:rtype: int - .. seealso:: :py:func:`stepHeight()` .. versionadded:: 3.0 @@ -489,8 +387,6 @@ Step width for raster iterations. %Docstring Step height for raster iterations. -:rtype: int - .. seealso:: :py:func:`stepWidth()` .. versionadded:: 3.0 @@ -512,8 +408,6 @@ Emit a message to be displayed on status bar, usually used by network providers bool userNoDataValuesContains( int bandNo, double value ) const; %Docstring Returns true if user no data contains value - -:rtype: bool %End void copyBaseSettings( const QgsRasterDataProvider &other ); diff --git a/python/core/raster/qgsrasterdrawer.sip b/python/core/raster/qgsrasterdrawer.sip index c5ed82a5d931..0d459a938714 100644 --- a/python/core/raster/qgsrasterdrawer.sip +++ b/python/core/raster/qgsrasterdrawer.sip @@ -25,6 +25,7 @@ The drawing pipe for raster layers. void draw( QPainter *p, QgsRasterViewPort *viewPort, const QgsMapToPixel *qgsMapToPixel, QgsRasterBlockFeedback *feedback = 0 ); %Docstring Draws raster data. + :param p: destination QPainter :param viewPort: viewport to render :param qgsMapToPixel: map to pixel converter diff --git a/python/core/raster/qgsrasterfilewriter.sip b/python/core/raster/qgsrasterfilewriter.sip index 4407b38331c8..2f9195ed8474 100644 --- a/python/core/raster/qgsrasterfilewriter.sip +++ b/python/core/raster/qgsrasterfilewriter.sip @@ -53,8 +53,6 @@ Create a raster file with one band without initializing the pixel data. Returned provider may be used to initialize the raster using writeBlock() calls. Ownership of the returned provider is passed to the caller. -:rtype: QgsRasterDataProvider - .. note:: Does not work with tiled mode enabled. @@ -74,8 +72,6 @@ Create a raster file with given number of bands without initializing the pixel d Returned provider may be used to initialize the raster using writeBlock() calls. Ownership of the returned provider is passed to the caller. -:rtype: QgsRasterDataProvider - .. note:: Does not work with tiled mode enabled. @@ -89,107 +85,58 @@ Ownership of the returned provider is passed to the caller. const QgsCoordinateReferenceSystem &crs, QgsRasterBlockFeedback *feedback = 0 ); %Docstring Write raster file + :param pipe: raster pipe :param nCols: number of output columns :param nRows: number of output rows (or -1 to automatically calculate row number to have square pixels) :param outputExtent: extent to output :param crs: crs to reproject to :param feedback: optional feedback object for progress reports - -:rtype: WriterError %End QString outputUrl() const; %Docstring Returns the output URL for the raster. -:rtype: str - .. versionadded:: 3.0 %End void setOutputFormat( const QString &format ); QString outputFormat() const; -%Docstring - -:rtype: str -%End void setOutputProviderKey( const QString &key ); QString outputProviderKey() const; -%Docstring - -:rtype: str -%End void setTiledMode( bool t ); bool tiledMode() const; -%Docstring - -:rtype: bool -%End void setMaxTileWidth( int w ); int maxTileWidth() const; -%Docstring - -:rtype: int -%End QgsRaster::RasterBuildPyramids buildPyramidsFlag() const; -%Docstring - -:rtype: QgsRaster.RasterBuildPyramids -%End void setBuildPyramidsFlag( QgsRaster::RasterBuildPyramids f ); QList< int > pyramidsList() const; -%Docstring - -:rtype: list of int -%End void setPyramidsList( const QList< int > &list ); QString pyramidsResampling() const; -%Docstring - -:rtype: str -%End void setPyramidsResampling( const QString &str ); QgsRaster::RasterPyramidsFormat pyramidsFormat() const; -%Docstring - -:rtype: QgsRaster.RasterPyramidsFormat -%End void setPyramidsFormat( QgsRaster::RasterPyramidsFormat f ); void setMaxTileHeight( int h ); int maxTileHeight() const; -%Docstring - -:rtype: int -%End void setCreateOptions( const QStringList &list ); QStringList createOptions() const; -%Docstring - -:rtype: list of str -%End void setPyramidsConfigOptions( const QStringList &list ); QStringList pyramidsConfigOptions() const; -%Docstring - -:rtype: list of str -%End static QString filterForDriver( const QString &driverName ); %Docstring Creates a filter for an GDAL driver key - -:rtype: str %End struct FilterFormatDetails @@ -213,8 +160,6 @@ Relies on GDAL_DMD_EXTENSIONS metadata, if it is empty corresponding driver will The ``options`` argument can be used to control the sorting and filtering of returned formats. -:rtype: list of QgsRasterFileWriter.FilterFormatDetails - .. seealso:: :py:func:`supportedOutputRasterLayerExtensions()` %End @@ -225,8 +170,6 @@ Returns a list of file extensions for supported formats. The ``options`` argument can be used to control the sorting and filtering of returned formats. -:rtype: list of str - .. versionadded:: 3.0 .. seealso:: :py:func:`supportedFiltersAndFormats()` @@ -238,8 +181,6 @@ Returns the GDAL driver name for a specified file ``extension``. E.g. the driver name for the ".tif" extension is "GTiff". If no suitable drivers are found then an empty string is returned. -:rtype: str - .. versionadded:: 3.0 %End @@ -250,8 +191,6 @@ E.g. returns "tif", "tiff" for the format "GTiff". If no matching format driver is found an empty list will be returned. -:rtype: list of str - .. versionadded:: 3.0 %End diff --git a/python/core/raster/qgsrasteridentifyresult.sip b/python/core/raster/qgsrasteridentifyresult.sip index d3b322c88d43..fe9209f67b99 100644 --- a/python/core/raster/qgsrasteridentifyresult.sip +++ b/python/core/raster/qgsrasteridentifyresult.sip @@ -28,6 +28,7 @@ Constructor for QgsRasterIdentifyResult. QgsRasterIdentifyResult( QgsRaster::IdentifyFormat format, const QMap &results ); %Docstring Constructor. Creates valid result. + :param format: the result format :param results: the results %End @@ -35,6 +36,7 @@ Constructor for QgsRasterIdentifyResult. QgsRasterIdentifyResult( const QgsError &error ); %Docstring Constructor. Creates invalid result with error. + :param error: the error %End @@ -43,15 +45,11 @@ Constructor for QgsRasterIdentifyResult. bool isValid() const; %Docstring Returns true if valid - -:rtype: bool %End QgsRaster::IdentifyFormat format() const; %Docstring Get results format - -:rtype: QgsRaster.IdentifyFormat %End QMap results() const; @@ -60,8 +58,6 @@ Constructor for QgsRasterIdentifyResult. QgsRaster.IdentifyFormatValue: map of values for each band, keys are band numbers (from 1). QgsRaster.IdentifyFormatFeature: map of QgsRasterFeatureList for each sublayer (WMS) QgsRaster.IdentifyFormatHtml: map of HTML strings for each sublayer (WMS). - -:rtype: QMap %End void setParams( const QMap ¶ms ); @@ -72,15 +68,11 @@ Set map of optional parameters QMap params() const; %Docstring Get map of optional parameters - -:rtype: QMap %End QgsError error() const; %Docstring Get error - -:rtype: QgsError %End void setError( const QgsError &error ); diff --git a/python/core/raster/qgsrasterinterface.sip b/python/core/raster/qgsrasterinterface.sip index 283d3219ef74..d195dfb486b1 100644 --- a/python/core/raster/qgsrasterinterface.sip +++ b/python/core/raster/qgsrasterinterface.sip @@ -39,8 +39,6 @@ and a new preview image may be produced Whether the raster provider should return only data that are already available without waiting for full result. By default this flag is not enabled. -:rtype: bool - .. seealso:: :py:func:`setPreviewOnly()` %End @@ -55,8 +53,6 @@ set flag whether the block request is for preview purposes only %Docstring Whether our painter is drawing to a temporary image used just by this layer -:rtype: bool - .. seealso:: :py:func:`setRenderPartialOutput()` %End @@ -155,37 +151,27 @@ Base class for processing filters like renderers, reprojector, resampler etc. virtual QgsRasterInterface *clone() const = 0 /Factory/; %Docstring Clone itself, create deep copy - -:rtype: QgsRasterInterface %End virtual int capabilities() const; %Docstring Returns a bitmask containing the supported capabilities - -:rtype: int %End QString capabilitiesString() const; %Docstring Returns the above in friendly format. - -:rtype: str %End virtual Qgis::DataType dataType( int bandNo ) const = 0; %Docstring Returns data type for the band specified by number - -:rtype: Qgis.DataType %End virtual Qgis::DataType sourceDataType( int bandNo ) const; %Docstring Returns source data type for the band specified by number, source data type may be shorter than dataType * - -:rtype: Qgis.DataType %End virtual QgsRectangle extent() const; @@ -193,52 +179,30 @@ source data type may be shorter than dataType * Get the extent of the interface. :return: QgsRectangle containing the extent of the layer -:rtype: QgsRectangle - %End int dataTypeSize( int bandNo ); -%Docstring - -:rtype: int -%End virtual int bandCount() const = 0; %Docstring Get number of bands - -:rtype: int %End virtual int xBlockSize() const; %Docstring Get block size - -:rtype: int %End virtual int yBlockSize() const; -%Docstring - -:rtype: int -%End virtual int xSize() const; %Docstring Get raster size - -:rtype: int %End virtual int ySize() const; -%Docstring - -:rtype: int -%End virtual QString generateBandName( int bandNumber ) const; %Docstring helper function to create zero padded band names - -:rtype: str %End virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) = 0 /Factory/; @@ -246,35 +210,28 @@ Get raster size Read block of data using given extent and size. Returns pointer to data. Caller is responsible to free the memory returned. + :param bandNo: band number :param extent: extent of block :param width: pixel width of block :param height: pixel height of block :param feedback: optional raster feedback object for cancelation/preview. Added in QGIS 3.0. - -:rtype: QgsRasterBlock %End virtual bool setInput( QgsRasterInterface *input ); %Docstring Set input. Returns true if set correctly, false if cannot use that input * - -:rtype: bool %End virtual QgsRasterInterface *input() const; %Docstring Current input - -:rtype: QgsRasterInterface %End virtual bool on() const; %Docstring Is on/off - -:rtype: bool %End virtual void setOn( bool on ); @@ -288,8 +245,6 @@ Set on/off Get source / raw input, the first in pipe, usually provider. It may be used to get info about original data, e.g. resolution to decide resampling etc. - -:rtype: QgsRasterInterface %End virtual QgsRasterBandStats bandStatistics( int bandNo, @@ -298,6 +253,7 @@ resampling etc. int sampleSize = 0, QgsRasterBlockFeedback *feedback = 0 ); %Docstring Get band statistics. + :param bandNo: The band (number). :param stats: Requested statistics :param extent: Extent used to calc statistics, if empty, whole raster extent is used. @@ -305,8 +261,6 @@ resampling etc. :param feedback: optional feedback object :return: Band statistics. -:rtype: QgsRasterBandStats - %End virtual bool hasStatistics( int bandNo, @@ -317,8 +271,6 @@ resampling etc. Returns true if histogram is available (cached, already calculated). * The parameters are the same as in bandStatistics() :return: true if statistics are available (ready to use) -:rtype: bool - %End @@ -340,6 +292,7 @@ resampling etc. QgsRasterBlockFeedback *feedback = nullptr )]; %Docstring Get histogram. Histograms are cached in providers. + :param bandNo: The band (number). :param binCount: Number of bins (intervals,buckets). If 0, the number of bins is decided automatically according to data type, raster size etc. :param minimum: Minimum value, if NaN (None for Python), raster minimum value will be used. @@ -350,8 +303,6 @@ resampling etc. :param feedback: optional feedback object :return: Vector of non NULL cell counts for each bin. -:rtype: QgsRasterHistogram - .. note:: @@ -400,8 +351,6 @@ resampling etc. %Docstring Returns true if histogram is available (cached, already calculated) -:rtype: bool - .. seealso:: :py:func:`histogram()` %End %MethodCode @@ -438,6 +387,7 @@ resampling etc. int sampleSize = 0 ); %Docstring Find values for cumulative pixel count cut. + :param bandNo: The band (number). :param lowerCount: The lower count as fraction of 1, e.g. 0.02 = 2% :param upperCount: The upper count as fraction of 1, e.g. 0.98 = 98% @@ -523,10 +473,6 @@ Fill in statistics defaults if not specified private: QgsRasterInterface( const QgsRasterInterface & ); QgsRasterInterface &operator=( const QgsRasterInterface & ); -%Docstring - -:rtype: QgsRasterInterface -%End }; diff --git a/python/core/raster/qgsrasteriterator.sip b/python/core/raster/qgsrasteriterator.sip index 57a84d5f8043..9ec236fe6a65 100644 --- a/python/core/raster/qgsrasteriterator.sip +++ b/python/core/raster/qgsrasteriterator.sip @@ -24,6 +24,7 @@ Iterator for sequentially processing raster cells. void startRasterRead( int bandNumber, int nCols, int nRows, const QgsRectangle &extent, QgsRasterBlockFeedback *feedback = 0 ); %Docstring Start reading of raster band. Raster data can then be retrieved by calling readNextRasterPart until it returns false. + :param bandNumber: number of raster band to read :param nCols: number of columns :param nRows: number of rows @@ -38,6 +39,7 @@ Start reading of raster band. Raster data can then be retrieved by calling readN %Docstring Fetches next part of raster data, caller takes ownership of the block and caller should delete the block. + :param bandNumber: band to read :param nCols: number of columns on output device :param nRows: number of rows on output device @@ -46,31 +48,17 @@ caller should delete the block. :param topLeftRow: top left row :return: false if the last part was already returned* -:rtype: bool - %End void stopRasterRead( int bandNumber ); const QgsRasterInterface *input() const; -%Docstring - -:rtype: QgsRasterInterface -%End void setMaximumTileWidth( int w ); int maximumTileWidth() const; -%Docstring - -:rtype: int -%End void setMaximumTileHeight( int h ); int maximumTileHeight() const; -%Docstring - -:rtype: int -%End static const int DEFAULT_MAXIMUM_TILE_WIDTH; static const int DEFAULT_MAXIMUM_TILE_HEIGHT; diff --git a/python/core/raster/qgsrasterlayer.sip b/python/core/raster/qgsrasterlayer.sip index 7d6afafc3613..b1a823b46675 100644 --- a/python/core/raster/qgsrasterlayer.sip +++ b/python/core/raster/qgsrasterlayer.sip @@ -192,8 +192,6 @@ Returns a new instance equivalent to this one. A new provider is created for the same data source and renderer is cloned too. :return: a new layer instance -:rtype: QgsRasterLayer - .. versionadded:: 3.0 %End @@ -221,20 +219,12 @@ This helper checks to see whether the file name appears to be a valid raster file name. If the file name looks like it could be valid, but some sort of error occurs in processing the file, the error is returned in retError. - -:rtype: bool %End static bool isValidRasterFileName( const QString &fileNameQString ); -%Docstring - -:rtype: bool -%End static QDateTime lastModified( const QString &name ); %Docstring Return time stamp for given file name - -:rtype: QDateTime %End void setDataProvider( const QString &provider ); @@ -245,8 +235,6 @@ Return time stamp for given file name LayerType rasterType(); %Docstring Accessor for raster layer type (which is a read only property) - -:rtype: LayerType %End void setRenderer( QgsRasterRenderer *renderer /Transfer/ ); @@ -254,62 +242,38 @@ Return time stamp for given file name Set raster renderer. Takes ownership of the renderer object %End QgsRasterRenderer *renderer() const; -%Docstring - -:rtype: QgsRasterRenderer -%End QgsRasterResampleFilter *resampleFilter() const; %Docstring Set raster resample filter. Takes ownership of the resample filter object - -:rtype: QgsRasterResampleFilter %End QgsBrightnessContrastFilter *brightnessFilter() const; -%Docstring - -:rtype: QgsBrightnessContrastFilter -%End QgsHueSaturationFilter *hueSaturationFilter() const; -%Docstring - -:rtype: QgsHueSaturationFilter -%End QgsRasterPipe *pipe(); %Docstring Get raster pipe - -:rtype: QgsRasterPipe %End int width() const; %Docstring Accessor that returns the width of the (unclipped) raster - -:rtype: int %End int height() const; %Docstring Accessor that returns the height of the (unclipped) raster - -:rtype: int %End int bandCount() const; %Docstring Get the number of bands in this layer - -:rtype: int %End QString bandName( int bandNoInt ) const; %Docstring Get the name of a band given its number - -:rtype: str %End virtual QgsRasterDataProvider *dataProvider(); @@ -320,8 +284,6 @@ Get raster pipe %Docstring Returns the data provider in a const-correct manner -:rtype: QgsRasterDataProvider - .. note:: available in Python bindings as constDataProvider() @@ -338,8 +300,6 @@ Synchronises with changes in the datasource %Docstring Return new instance of QgsMapLayerRenderer that will be used for rendering of given context -:rtype: QgsMapLayerRenderer - .. versionadded:: 2.4 %End @@ -353,8 +313,6 @@ Return new instance of QgsMapLayerRenderer that will be used for rendering of gi QgsLegendColorList legendSymbologyItems() const; %Docstring Returns a list with classification items (Text and color) - -:rtype: QgsLegendColorList %End virtual bool isSpatial() const; @@ -365,28 +323,20 @@ Returns a list with classification items (Text and color) QPixmap paletteAsPixmap( int bandNumber = 1 ); %Docstring Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned - -:rtype: QPixmap %End QString providerType() const; %Docstring [ data provider interface ] Which provider is being used for this Raster Layer? - -:rtype: str %End double rasterUnitsPerPixelX() const; %Docstring Returns the number of raster units per each raster pixel in X axis. In a world file, this is normally the first row (without the sign) - -:rtype: float %End double rasterUnitsPerPixelY() const; %Docstring Returns the number of raster units per each raster pixel in Y axis. In a world file, this is normally the first row (without the sign) - -:rtype: float %End @@ -398,6 +348,7 @@ Returns a list with classification items (Text and color) bool generateLookupTableFlag = true ); %Docstring Set contrast enhancement algorithm + :param algorithm: Contrast enhancement algorithm :param limits: Limits :param extent: Extent used to calculate limits, if empty, use full layer extent @@ -411,16 +362,12 @@ Returns a list with classification items (Text and color) void setDefaultContrastEnhancement(); %Docstring Set default contrast enhancement - -:rtype: bool %End virtual QStringList subLayers() const; %Docstring Returns the sublayers of this layer - Useful for providers that manage their own layers, such as WMS - -:rtype: list of str %End QImage previewAsImage( QSize size, const QColor &bgColor = Qt::white, @@ -428,8 +375,6 @@ Returns a list with classification items (Text and color) %Docstring Draws a preview of the rasterlayer into a QImage -:rtype: QImage - .. versionadded:: 2.4 %End @@ -451,8 +396,6 @@ Set the visibility of the given sublayer name %Docstring Time stamp of data source in the moment when data/metadata were loaded by provider - -:rtype: QDateTime %End public slots: @@ -463,48 +406,36 @@ Time stamp of data source in the moment when data/metadata were loaded by provid %Docstring Read the symbology for the current layer from the Dom node supplied - -:rtype: bool %End virtual bool readStyle( const QDomNode &node, QString &errorMessage, const QgsReadWriteContext &context ); %Docstring Read the style information for the current layer from the Dom node supplied - -:rtype: bool %End virtual bool readXml( const QDomNode &layer_node, const QgsReadWriteContext &context ); %Docstring Reads layer specific state from project file Dom node - -:rtype: bool %End virtual bool writeSymbology( QDomNode &, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context ) const; %Docstring Write the symbology for the layer into the docment provided - -:rtype: bool %End virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context ) const; %Docstring Write the style for the layer into the docment provided - -:rtype: bool %End virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const; %Docstring Write layer specific state to project file Dom node - -:rtype: bool %End }; diff --git a/python/core/raster/qgsrasterminmaxorigin.sip b/python/core/raster/qgsrasterminmaxorigin.sip index d8f1cc2b2143..ddd41413f36b 100644 --- a/python/core/raster/qgsrasterminmaxorigin.sip +++ b/python/core/raster/qgsrasterminmaxorigin.sip @@ -79,43 +79,31 @@ itself the min/max values. QgsRasterMinMaxOrigin::Limits limits() const; %Docstring Return limits. - -:rtype: QgsRasterMinMaxOrigin.Limits %End QgsRasterMinMaxOrigin::Extent extent() const; %Docstring Return extent. - -:rtype: QgsRasterMinMaxOrigin.Extent %End QgsRasterMinMaxOrigin::StatAccuracy statAccuracy() const; %Docstring Return statistic accuracy. - -:rtype: QgsRasterMinMaxOrigin.StatAccuracy %End double cumulativeCutLower() const; %Docstring Return lower bound of cumulative cut method (between 0 and 1). - -:rtype: float %End double cumulativeCutUpper() const; %Docstring Return upper bound of cumulative cut method (between 0 and 1). - -:rtype: float %End double stdDevFactor() const; %Docstring Return factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ] - -:rtype: float %End @@ -164,43 +152,31 @@ itself the min/max values. static QString limitsString( Limits limits ); %Docstring Return a string to serialize Limits - -:rtype: str %End static Limits limitsFromString( const QString &limits ); %Docstring Deserialize Limits - -:rtype: Limits %End static QString extentString( QgsRasterMinMaxOrigin::Extent extent ); %Docstring Return a string to serialize Extent - -:rtype: str %End static QgsRasterMinMaxOrigin::Extent extentFromString( const QString &extent ); %Docstring Deserialize Extent - -:rtype: QgsRasterMinMaxOrigin.Extent %End static QString statAccuracyString( QgsRasterMinMaxOrigin::StatAccuracy accuracy ); %Docstring Return a string to serialize StatAccuracy - -:rtype: str %End static QgsRasterMinMaxOrigin::StatAccuracy statAccuracyFromString( const QString &accuracy ); %Docstring Deserialize StatAccuracy - -:rtype: QgsRasterMinMaxOrigin.StatAccuracy %End }; diff --git a/python/core/raster/qgsrasternuller.sip b/python/core/raster/qgsrasternuller.sip index 20286679d2fd..11897419a1b2 100644 --- a/python/core/raster/qgsrasternuller.sip +++ b/python/core/raster/qgsrasternuller.sip @@ -43,10 +43,6 @@ Raster pipe that deals with null values. void setNoData( int bandNo, const QgsRasterRangeList &noData ); QgsRasterRangeList noData( int bandNo ) const; -%Docstring - -:rtype: QgsRasterRangeList -%End void setOutputNoDataValue( int bandNo, double noData ); %Docstring diff --git a/python/core/raster/qgsrasterpipe.sip b/python/core/raster/qgsrasterpipe.sip index f23da2bc8199..efc574e5c1e9 100644 --- a/python/core/raster/qgsrasterpipe.sip +++ b/python/core/raster/qgsrasterpipe.sip @@ -46,8 +46,6 @@ Constructor for QgsRasterPipe. %Docstring Try to insert interface at specified index and connect if connection would fail, the interface is not inserted and false is returned * - -:rtype: bool %End %MethodCode sipRes = sipCpp->insert( a0, a1 ); @@ -64,8 +62,6 @@ if connection would fail, the interface is not inserted and false is returned * %Docstring Try to replace interface at specified index and connect if connection would fail, the interface is not inserted and false is returned * - -:rtype: bool %End bool set( QgsRasterInterface *interface /Transfer/ ); @@ -75,90 +71,40 @@ role if it already exists. Known interfaces are: QgsRasterDataProvider, QgsRasterRenderer, QgsRasterResampleFilter, QgsRasterProjector and their subclasses. For unknown interfaces it mus be explicitly specified position where it should be inserted using insert() method. - -:rtype: bool %End bool remove( int idx ); %Docstring Remove and delete interface at given index if possible - -:rtype: bool %End bool remove( QgsRasterInterface *interface ); %Docstring Remove and delete interface from pipe if possible - -:rtype: bool %End int size() const; -%Docstring - -:rtype: int -%End QgsRasterInterface *at( int idx ) const; -%Docstring - -:rtype: QgsRasterInterface -%End QgsRasterInterface *last() const; -%Docstring - -:rtype: QgsRasterInterface -%End bool setOn( int idx, bool on ); %Docstring Set interface at index on/off Returns true on success * - -:rtype: bool %End bool canSetOn( int idx, bool on ); %Docstring Test if interface at index may be swithed on/off - -:rtype: bool %End QgsRasterDataProvider *provider() const; -%Docstring - -:rtype: QgsRasterDataProvider -%End QgsRasterRenderer *renderer() const; -%Docstring - -:rtype: QgsRasterRenderer -%End QgsRasterResampleFilter *resampleFilter() const; -%Docstring - -:rtype: QgsRasterResampleFilter -%End QgsBrightnessContrastFilter *brightnessFilter() const; -%Docstring - -:rtype: QgsBrightnessContrastFilter -%End QgsHueSaturationFilter *hueSaturationFilter() const; -%Docstring - -:rtype: QgsHueSaturationFilter -%End QgsRasterProjector *projector() const; -%Docstring - -:rtype: QgsRasterProjector -%End QgsRasterNuller *nuller() const; -%Docstring - -:rtype: QgsRasterNuller -%End private: QgsRasterPipe( const QgsRasterPipe &pipe ); diff --git a/python/core/raster/qgsrasterprojector.sip b/python/core/raster/qgsrasterprojector.sip index 74e8987ea677..9fc855528c0f 100644 --- a/python/core/raster/qgsrasterprojector.sip +++ b/python/core/raster/qgsrasterprojector.sip @@ -52,28 +52,16 @@ which are used to calculate affine transformation matrices. QgsCoordinateReferenceSystem sourceCrs() const; %Docstring Get source CRS - -:rtype: QgsCoordinateReferenceSystem %End QgsCoordinateReferenceSystem destinationCrs() const; %Docstring Get destination CRS - -:rtype: QgsCoordinateReferenceSystem %End Precision precision() const; -%Docstring - -:rtype: Precision -%End void setPrecision( Precision precision ); static QString precisionLabel( Precision precision ); -%Docstring - -:rtype: str -%End virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/; @@ -82,8 +70,6 @@ which are used to calculate affine transformation matrices. QgsRectangle &destExtent /Out/, int &destXSize /Out/, int &destYSize /Out/ ); %Docstring Calculate destination extent and size from source extent and size - -:rtype: bool %End static bool extentSize( const QgsCoordinateTransform &ct, @@ -91,8 +77,6 @@ Calculate destination extent and size from source extent and size QgsRectangle &destExtent /Out/, int &destXSize /Out/, int &destYSize /Out/ ); %Docstring Calculate destination extent and size from source extent and size - -:rtype: bool %End }; diff --git a/python/core/raster/qgsrasterrange.sip b/python/core/raster/qgsrasterrange.sip index cb98279d02fc..abe19c6ae472 100644 --- a/python/core/raster/qgsrasterrange.sip +++ b/python/core/raster/qgsrasterrange.sip @@ -32,31 +32,16 @@ including min and max value. QgsRasterRange( double min, double max ); %Docstring Constructor + :param min: minimum value :param max: max value %End double min() const; -%Docstring - -:rtype: float -%End double max() const; -%Docstring - -:rtype: float -%End double setMin( double min ); -%Docstring - -:rtype: float -%End double setMax( double max ); -%Docstring - -:rtype: float -%End bool operator==( QgsRasterRange o ) const; diff --git a/python/core/raster/qgsrasterrenderer.sip b/python/core/raster/qgsrasterrenderer.sip index 481e339cb7e5..73dc4197ecd0 100644 --- a/python/core/raster/qgsrasterrenderer.sip +++ b/python/core/raster/qgsrasterrenderer.sip @@ -36,8 +36,6 @@ Constructor for QgsRasterRenderer. %Docstring QgsRasterRenderer cannot be copied. Use clone() instead. - -:rtype: QgsRasterRenderer %End virtual int bandCount() const; @@ -47,10 +45,6 @@ QgsRasterRenderer cannot be copied. Use clone() instead. virtual QString type() const; -%Docstring - -:rtype: str -%End virtual bool setInput( QgsRasterInterface *input ); @@ -62,10 +56,6 @@ QgsRasterRenderer cannot be copied. Use clone() instead. QgsRasterBlockFeedback *feedback = 0 ) = 0 /Factory/; bool usesTransparency() const; -%Docstring - -:rtype: bool -%End void setOpacity( double opacity ); %Docstring @@ -80,24 +70,14 @@ and 1.0 (fully opaque). Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` %End void setRasterTransparency( QgsRasterTransparency *t /Transfer/ ); const QgsRasterTransparency *rasterTransparency() const; -%Docstring - -:rtype: QgsRasterTransparency -%End void setAlphaBand( int band ); int alphaBand() const; -%Docstring - -:rtype: int -%End virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems /Out/ ) const; %Docstring @@ -121,15 +101,11 @@ Useful when cloning renderers. virtual QList usesBands() const; %Docstring Returns a list of band numbers used by the renderer - -:rtype: list of int %End const QgsRasterMinMaxOrigin &minMaxOrigin() const; %Docstring Returns const reference to origin of min/max values - -:rtype: QgsRasterMinMaxOrigin %End void setMinMaxOrigin( const QgsRasterMinMaxOrigin &origin ); @@ -151,10 +127,6 @@ Write upper class info into rasterrenderer element (called by writeXml method of private: QgsRasterRenderer( const QgsRasterRenderer & ); const QgsRasterRenderer &operator=( const QgsRasterRenderer & ); -%Docstring - -:rtype: QgsRasterRenderer -%End }; /************************************************************************ diff --git a/python/core/raster/qgsrasterresamplefilter.sip b/python/core/raster/qgsrasterresamplefilter.sip index 59fd4a8695d8..834a8e980855 100644 --- a/python/core/raster/qgsrasterresamplefilter.sip +++ b/python/core/raster/qgsrasterresamplefilter.sip @@ -42,27 +42,15 @@ Resample filter pipe for rasters. Set resampler for zoomed in scales. Takes ownership of the object %End const QgsRasterResampler *zoomedInResampler() const; -%Docstring - -:rtype: QgsRasterResampler -%End void setZoomedOutResampler( QgsRasterResampler *r /Transfer/ ); %Docstring Set resampler for zoomed out scales. Takes ownership of the object %End const QgsRasterResampler *zoomedOutResampler() const; -%Docstring - -:rtype: QgsRasterResampler -%End void setMaxOversampling( double os ); double maxOversampling() const; -%Docstring - -:rtype: float -%End virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const; diff --git a/python/core/raster/qgsrasterresampler.sip b/python/core/raster/qgsrasterresampler.sip index 67d1c45084fb..f40bc0f14cab 100644 --- a/python/core/raster/qgsrasterresampler.sip +++ b/python/core/raster/qgsrasterresampler.sip @@ -37,8 +37,6 @@ Interface for resampling rasters (e.g. to have a smoother appearance) %Docstring Get a descriptive type identifier for this raster resampler. Needs to be implemented by subclasses. - -:rtype: str %End virtual QgsRasterResampler *clone() const = 0 /Factory/; @@ -46,8 +44,6 @@ Needs to be implemented by subclasses. Get a deep copy of this object. Needs to be reimplemented by subclasses. Ownership is transferred to the caller. - -:rtype: QgsRasterResampler %End }; diff --git a/python/core/raster/qgsrastershader.sip b/python/core/raster/qgsrastershader.sip index 981da18f9170..b5def4247276 100644 --- a/python/core/raster/qgsrastershader.sip +++ b/python/core/raster/qgsrastershader.sip @@ -27,22 +27,14 @@ Interface for all raster shaders. double maximumValue(); %Docstring Return the maximum value for the raster shader - -:rtype: float %End double minimumValue(); %Docstring Return the minimum value for the raster shader - -:rtype: float %End QgsRasterShaderFunction *rasterShaderFunction(); -%Docstring - -:rtype: QgsRasterShaderFunction -%End bool shade( double value, int *returnRedValue /Out/, @@ -51,8 +43,6 @@ Interface for all raster shaders. int *returnAlpha /Out/ ); %Docstring generates and new RGBA value based on one input value - -:rtype: bool %End bool shade( double redValue, @@ -65,8 +55,6 @@ Interface for all raster shaders. int *returnAlpha /Out/ ); %Docstring generates and new RGBA value based on original RGBA value - -:rtype: bool %End void setRasterShaderFunction( QgsRasterShaderFunction *function /Transfer/ ); diff --git a/python/core/raster/qgsrastershaderfunction.sip b/python/core/raster/qgsrastershaderfunction.sip index 67623bbf9ff6..71a22b4d43ba 100644 --- a/python/core/raster/qgsrastershaderfunction.sip +++ b/python/core/raster/qgsrastershaderfunction.sip @@ -49,8 +49,6 @@ typically used to render grayscale images as false color. int *returnAlpha /Out/ ); %Docstring generates and new RGBA value based on one input value - -:rtype: bool %End virtual bool shade( double redValue, @@ -63,26 +61,12 @@ typically used to render grayscale images as false color. int *returnAlpha /Out/ ); %Docstring generates and new RGBA value based on original RGBA value - -:rtype: bool %End double minimumMaximumRange() const; -%Docstring - -:rtype: float -%End double minimumValue() const; -%Docstring - -:rtype: float -%End double maximumValue() const; -%Docstring - -:rtype: float -%End virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems /Out/ ) const; diff --git a/python/core/raster/qgsrastertransparency.sip b/python/core/raster/qgsrastertransparency.sip index 6a5dd758d73a..2ffac5b10b44 100644 --- a/python/core/raster/qgsrastertransparency.sip +++ b/python/core/raster/qgsrastertransparency.sip @@ -43,15 +43,11 @@ Constructor for QgsRasterTransparency. QList transparentSingleValuePixelList() const; %Docstring Accessor for transparentSingleValuePixelList - -:rtype: list of QgsRasterTransparency.TransparentSingleValuePixel %End QList transparentThreeValuePixelList() const; %Docstring Accessor for transparentThreeValuePixelList - -:rtype: list of QgsRasterTransparency.TransparentThreeValuePixel %End void initializeTransparentPixelList( double ); @@ -77,22 +73,16 @@ Constructor for QgsRasterTransparency. int alphaValue( double, int globalTransparency = 255 ) const; %Docstring Returns the transparency value for a single value Pixel - -:rtype: int %End int alphaValue( double, double, double, int globalTransparency = 255 ) const; %Docstring Return the transparency value for a RGB Pixel - -:rtype: int %End bool isEmpty() const; %Docstring True if there are no entries in the pixel lists except the nodata value - -:rtype: bool %End void writeXml( QDomDocument &doc, QDomElement &parentElem ) const; diff --git a/python/core/raster/qgssinglebandcolordatarenderer.sip b/python/core/raster/qgssinglebandcolordatarenderer.sip index e2b16b99e945..bef18aaa8bca 100644 --- a/python/core/raster/qgssinglebandcolordatarenderer.sip +++ b/python/core/raster/qgssinglebandcolordatarenderer.sip @@ -27,15 +27,9 @@ Raster renderer pipe for single band color. %Docstring QgsSingleBandColorDataRenderer cannot be copied. Use clone() instead. - -:rtype: QgsSingleBandColorDataRenderer %End static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/; -%Docstring - -:rtype: QgsRasterRenderer -%End virtual bool setInput( QgsRasterInterface *input ); @@ -52,10 +46,6 @@ QgsSingleBandColorDataRenderer cannot be copied. Use clone() instead. private: QgsSingleBandColorDataRenderer( const QgsSingleBandColorDataRenderer & ); const QgsSingleBandColorDataRenderer &operator=( const QgsSingleBandColorDataRenderer & ); -%Docstring - -:rtype: QgsSingleBandColorDataRenderer -%End }; /************************************************************************ diff --git a/python/core/raster/qgssinglebandgrayrenderer.sip b/python/core/raster/qgssinglebandgrayrenderer.sip index f011863dc884..7470a8d1fd13 100644 --- a/python/core/raster/qgssinglebandgrayrenderer.sip +++ b/python/core/raster/qgssinglebandgrayrenderer.sip @@ -33,30 +33,16 @@ Raster renderer pipe for single band gray. %Docstring QgsSingleBandGrayRenderer cannot be copied. Use clone() instead. - -:rtype: QgsSingleBandGrayRenderer %End static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/; -%Docstring - -:rtype: QgsRasterRenderer -%End virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/; int grayBand() const; -%Docstring - -:rtype: int -%End void setGrayBand( int band ); const QgsContrastEnhancement *contrastEnhancement() const; -%Docstring - -:rtype: QgsContrastEnhancement -%End void setContrastEnhancement( QgsContrastEnhancement *ce /Transfer/ ); %Docstring Takes ownership @@ -64,10 +50,6 @@ Takes ownership void setGradient( Gradient gradient ); Gradient gradient() const; -%Docstring - -:rtype: Gradient -%End virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const; @@ -81,10 +63,6 @@ Takes ownership private: QgsSingleBandGrayRenderer( const QgsSingleBandGrayRenderer & ); const QgsSingleBandGrayRenderer &operator=( const QgsSingleBandGrayRenderer & ); -%Docstring - -:rtype: QgsSingleBandGrayRenderer -%End }; /************************************************************************ diff --git a/python/core/raster/qgssinglebandpseudocolorrenderer.sip b/python/core/raster/qgssinglebandpseudocolorrenderer.sip index 17810fcfc643..25a459c0c0a0 100644 --- a/python/core/raster/qgssinglebandpseudocolorrenderer.sip +++ b/python/core/raster/qgssinglebandpseudocolorrenderer.sip @@ -31,15 +31,9 @@ Note: takes ownership of QgsRasterShader %Docstring QgsSingleBandPseudoColorRenderer cannot be copied. Use clone() instead. - -:rtype: QgsSingleBandPseudoColorRenderer %End static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/; -%Docstring - -:rtype: QgsRasterRenderer -%End virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/; @@ -52,15 +46,11 @@ Takes ownership of the shader QgsRasterShader *shader(); %Docstring Returns the raster shader - -:rtype: QgsRasterShader %End const QgsRasterShader *shader() const /PyName=constShader/; %Docstring -:rtype: QgsRasterShader - .. note:: available in Python as constShader @@ -74,6 +64,7 @@ Returns the raster shader const QgsRectangle &extent = QgsRectangle() ); %Docstring Creates a color ramp shader + :param colorRamp: vector color ramp :param colorRampType: type of color ramp shader :param classificationMode: classification mode @@ -95,8 +86,6 @@ Creates a color ramp shader %Docstring Returns the band used by the renderer -:rtype: int - .. versionadded:: 2.7 %End @@ -110,25 +99,13 @@ Sets the band used by the renderer. %End double classificationMin() const; -%Docstring - -:rtype: float -%End double classificationMax() const; -%Docstring - -:rtype: float -%End void setClassificationMin( double min ); void setClassificationMax( double max ); private: QgsSingleBandPseudoColorRenderer( const QgsSingleBandPseudoColorRenderer & ); const QgsSingleBandPseudoColorRenderer &operator=( const QgsSingleBandPseudoColorRenderer & ); -%Docstring - -:rtype: QgsSingleBandPseudoColorRenderer -%End }; /************************************************************************ diff --git a/python/core/scalebar/qgsscalebarrenderer.sip b/python/core/scalebar/qgsscalebarrenderer.sip index bb77c024116e..963e3e80ddff 100644 --- a/python/core/scalebar/qgsscalebarrenderer.sip +++ b/python/core/scalebar/qgsscalebarrenderer.sip @@ -55,8 +55,6 @@ Constructor for QgsScaleBarRenderer. virtual QString name() const = 0; %Docstring Returns the unique name for this style. - -:rtype: str %End virtual void draw( QgsRenderContext &context, @@ -70,8 +68,6 @@ Draws the scalebar using the specified ``settings`` and ``scaleContext`` to a de const QgsScaleBarRenderer::ScaleBarContext &scaleContext ) const; %Docstring Calculates the required box size (in millimeters) for a scalebar using the specified ``settings`` and ``scaleContext``. - -:rtype: QSizeF %End protected: @@ -86,29 +82,21 @@ Draws default scalebar labels using the specified ``settings`` and ``scaleContex QString firstLabelString( const QgsScaleBarSettings &settings ) const; %Docstring Returns the text used for the first label in the scalebar. - -:rtype: str %End double firstLabelXOffset( const QgsScaleBarSettings &settings ) const; %Docstring Returns the x-offset (in millimeters) used for the first label in the scalebar. - -:rtype: float %End QList segmentPositions( const QgsScaleBarRenderer::ScaleBarContext &scaleContext, const QgsScaleBarSettings &settings ) const; %Docstring Returns a list of positions for each segment within the scalebar. - -:rtype: list of float %End QList segmentWidths( const QgsScaleBarRenderer::ScaleBarContext &scaleContext, const QgsScaleBarSettings &settings ) const; %Docstring Returns a list of widths of each segment of the scalebar. - -:rtype: list of float %End }; diff --git a/python/core/scalebar/qgsscalebarsettings.sip b/python/core/scalebar/qgsscalebarsettings.sip index d9e4948104fa..26c418e770b2 100644 --- a/python/core/scalebar/qgsscalebarsettings.sip +++ b/python/core/scalebar/qgsscalebarsettings.sip @@ -44,8 +44,6 @@ Constructor for QgsScaleBarSettings. %Docstring Returns the number of segments included in the scalebar. -:rtype: int - .. seealso:: :py:func:`setNumberOfSegments()` .. seealso:: :py:func:`numberOfSegmentsLeft()` @@ -64,8 +62,6 @@ Sets the number of ``segments`` included in the scalebar. %Docstring Returns the number of segments included in the left part of the scalebar. -:rtype: int - .. seealso:: :py:func:`setNumberOfSegmentsLeft()` .. seealso:: :py:func:`numberOfSegments()` @@ -84,8 +80,6 @@ Sets the number of ``segments`` included in the left part of the scalebar. %Docstring Returns the number of scalebar units per segment. -:rtype: float - .. seealso:: :py:func:`setUnitsPerSegment()` %End @@ -100,8 +94,6 @@ Sets the number of scalebar ``units`` per segment. %Docstring Returns the size mode for the scale bar segments. -:rtype: SegmentSizeMode - .. seealso:: :py:func:`setSegmentSizeMode()` .. seealso:: :py:func:`minBarWidth()` @@ -126,8 +118,6 @@ Returns the minimum width (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. -:rtype: float - .. seealso:: :py:func:`segmentSizeMode()` .. seealso:: :py:func:`setMinimumBarWidth()` @@ -154,8 +144,6 @@ Returns the maximum width (in millimeters) for scale bar segments. This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth. -:rtype: float - .. seealso:: :py:func:`segmentSizeMode()` .. seealso:: :py:func:`setMaximumBarWidth()` @@ -180,8 +168,6 @@ to SegmentSizeFitWidth. %Docstring Returns the distance units used by the scalebar. -:rtype: QgsUnitTypes.DistanceUnit - .. seealso:: :py:func:`setUnits()` %End @@ -196,8 +182,6 @@ Sets the distance ``units`` used by the scalebar. %Docstring Returns the number of map units per scale bar unit used by the scalebar. -:rtype: float - .. seealso:: :py:func:`setMapUnitsPerScaleBarUnit()` %End @@ -212,8 +196,6 @@ Sets the number of map ``units`` per scale bar unit used by the scalebar. %Docstring Returns the label for units. -:rtype: str - .. seealso:: :py:func:`setUnitLabel()` %End @@ -228,8 +210,6 @@ Sets the ``label`` for units. %Docstring Returns the font used for drawing text in the scalebar. -:rtype: QFont - .. seealso:: :py:func:`setFont()` %End @@ -244,8 +224,6 @@ Sets the ``font`` used for drawing text in the scalebar. %Docstring Returns the color used for drawing text in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFontColor()` .. seealso:: :py:func:`font()` @@ -264,8 +242,6 @@ Sets the ``color`` used for drawing text in the scalebar. %Docstring Returns the color used for fills in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFillColor()` .. seealso:: :py:func:`fillColor2()` @@ -284,8 +260,6 @@ Sets the ``color`` used for fills in the scalebar. %Docstring Returns the secondary color used for fills in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setFillColor2()` .. seealso:: :py:func:`fillColor()` @@ -304,8 +278,6 @@ Sets the secondary ``color`` used for fills in the scalebar. %Docstring Returns the color used for lines in the scalebar. -:rtype: QColor - .. seealso:: :py:func:`setLineColor()` %End @@ -320,8 +292,6 @@ Sets the ``color`` used for lines in the scalebar. %Docstring Returns the line width in millimeters for lines in the scalebar. -:rtype: float - .. seealso:: :py:func:`setLineWidth()` %End @@ -336,8 +306,6 @@ Sets the line ``width`` in millimeters for lines in the scalebar. %Docstring Returns the pen used for drawing outlines in the scalebar. -:rtype: QPen - .. seealso:: :py:func:`setPen()` .. seealso:: :py:func:`brush()` @@ -354,8 +322,6 @@ Sets the pen used for drawing outlines in the scalebar. %Docstring Returns the primary brush used for filling the scalebar. -:rtype: QBrush - .. seealso:: :py:func:`setBrush()` .. seealso:: :py:func:`brush2()` @@ -375,8 +341,6 @@ Sets the primary brush used for filling the scalebar. Returns the secondary brush for the scalebar. This is used for alternating color style scalebars, such as single and double box styles. -:rtype: QBrush - .. seealso:: :py:func:`setBrush2()` .. seealso:: :py:func:`brush()` @@ -393,8 +357,6 @@ Sets the secondary brush used for filling the scalebar. %Docstring Returns the scalebar height (in millimeters). -:rtype: float - .. seealso:: :py:func:`setHeight()` %End @@ -409,8 +371,6 @@ Sets the scalebar ``height`` (in millimeters). %Docstring Returns the spacing (in millimeters) between labels and the scalebar. -:rtype: float - .. seealso:: :py:func:`setLabelBarSpace()` %End @@ -425,8 +385,6 @@ Sets the spacing (in millimeters) between labels and the scalebar. %Docstring Returns the spacing (margin) between the scalebar box and content in millimeters. -:rtype: float - .. seealso:: :py:func:`setBoxContentSpace()` %End @@ -441,8 +399,6 @@ Sets the ``space`` (margin) between the scalebar box and content in millimeters. %Docstring Returns the scalebar alignment. -:rtype: Alignment - .. seealso:: :py:func:`setAlignment()` %End @@ -457,8 +413,6 @@ Sets the scalebar ``alignment``. %Docstring Returns the join style used for drawing lines in the scalebar. -:rtype: Qt.PenJoinStyle - .. seealso:: :py:func:`setLineJoinStyle()` %End @@ -473,8 +427,6 @@ Sets the join ``style`` used when drawing the lines in the scalebar %Docstring Returns the cap style used for drawing lines in the scalebar. -:rtype: Qt.PenCapStyle - .. seealso:: :py:func:`setLineCapStyle()` %End diff --git a/python/core/scalebar/qgsticksscalebarrenderer.sip b/python/core/scalebar/qgsticksscalebarrenderer.sip index 1d0c8d9e0c79..8a89f1f4763b 100644 --- a/python/core/scalebar/qgsticksscalebarrenderer.sip +++ b/python/core/scalebar/qgsticksscalebarrenderer.sip @@ -51,8 +51,6 @@ Sets the ``position`` for tick marks in the scalebar. %Docstring Returns the position for tick marks in the scalebar. -:rtype: TickPosition - .. seealso:: :py:func:`setTickPosition()` %End diff --git a/python/core/symbology/qgs25drenderer.sip b/python/core/symbology/qgs25drenderer.sip index 63da1d25728c..cc89c7188ea9 100644 --- a/python/core/symbology/qgs25drenderer.sip +++ b/python/core/symbology/qgs25drenderer.sip @@ -23,8 +23,6 @@ Create a new 2.5D renderer from XML :param element: XML information :param context: reading context - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); @@ -47,8 +45,6 @@ Create a new 2.5D renderer from XML QColor roofColor() const; %Docstring Get the roof color - -:rtype: QColor %End void setRoofColor( const QColor &roofColor ); @@ -59,8 +55,6 @@ Set the roof color QColor wallColor() const; %Docstring Get the wall color - -:rtype: QColor %End void setWallColor( const QColor &wallColor ); @@ -76,15 +70,11 @@ Set wall shading enabled bool wallShadingEnabled() const; %Docstring Get wall shading enabled - -:rtype: bool %End QColor shadowColor() const; %Docstring Get the shadow's color - -:rtype: QColor %End void setShadowColor( const QColor &shadowColor ); @@ -95,8 +85,6 @@ Set the shadow's color double shadowSpread() const; %Docstring Get the shadow's spread distance in map units - -:rtype: float %End void setShadowSpread( double shadowSpread ); @@ -109,15 +97,11 @@ Set the shadow's spread distance in map units Try to convert from an existing renderer. If it is not of the same type we assume that the internals are not compatible and create a new default 2.5D renderer. - -:rtype: Qgs25DRenderer %End bool shadowEnabled() const; %Docstring Is the shadow enabled - -:rtype: bool %End void setShadowEnabled( bool value ); diff --git a/python/core/symbology/qgsarrowsymbollayer.sip b/python/core/symbology/qgsarrowsymbollayer.sip index c9d7bce14db7..61af395148d9 100644 --- a/python/core/symbology/qgsarrowsymbollayer.sip +++ b/python/core/symbology/qgsarrowsymbollayer.sip @@ -34,8 +34,6 @@ Create a new QgsArrowSymbolLayer :param properties: A property map to deserialize saved information from properties() :return: A new QgsArrowSymbolLayer -:rtype: QgsSymbolLayer - %End virtual QgsArrowSymbolLayer *clone() const /Factory/; @@ -49,8 +47,6 @@ Create a new QgsArrowSymbolLayer double arrowWidth() const; %Docstring Get current arrow width - -:rtype: float %End void setArrowWidth( double width ); %Docstring @@ -59,8 +55,6 @@ Set the arrow width QgsUnitTypes::RenderUnit arrowWidthUnit() const; %Docstring Get the unit for the arrow width - -:rtype: QgsUnitTypes.RenderUnit %End void setArrowWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring @@ -69,8 +63,6 @@ Set the unit for the arrow width QgsMapUnitScale arrowWidthUnitScale() const; %Docstring Get the scale for the arrow width - -:rtype: QgsMapUnitScale %End void setArrowWidthUnitScale( const QgsMapUnitScale &scale ); %Docstring @@ -80,8 +72,6 @@ Set the scale for the arrow width double arrowStartWidth() const; %Docstring Get current arrow start width. Only meaningful for single headed arrows - -:rtype: float %End void setArrowStartWidth( double width ); %Docstring @@ -90,8 +80,6 @@ Set the arrow start width QgsUnitTypes::RenderUnit arrowStartWidthUnit() const; %Docstring Get the unit for the arrow start width - -:rtype: QgsUnitTypes.RenderUnit %End void setArrowStartWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring @@ -100,8 +88,6 @@ Set the unit for the arrow start width QgsMapUnitScale arrowStartWidthUnitScale() const; %Docstring Get the scale for the arrow start width - -:rtype: QgsMapUnitScale %End void setArrowStartWidthUnitScale( const QgsMapUnitScale &scale ); %Docstring @@ -111,8 +97,6 @@ Set the scale for the arrow start width double headLength() const; %Docstring Get the current arrow head length - -:rtype: float %End void setHeadLength( double length ); %Docstring @@ -121,8 +105,6 @@ Set the arrow head length QgsUnitTypes::RenderUnit headLengthUnit() const; %Docstring Get the unit for the head length - -:rtype: QgsUnitTypes.RenderUnit %End void setHeadLengthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring @@ -131,8 +113,6 @@ Set the unit for the head length QgsMapUnitScale headLengthUnitScale() const; %Docstring Get the scale for the head length - -:rtype: QgsMapUnitScale %End void setHeadLengthUnitScale( const QgsMapUnitScale &scale ); %Docstring @@ -142,8 +122,6 @@ Set the scale for the head length double headThickness() const; %Docstring Get the current arrow head height - -:rtype: float %End void setHeadThickness( double thickness ); %Docstring @@ -152,8 +130,6 @@ Set the arrow head height QgsUnitTypes::RenderUnit headThicknessUnit() const; %Docstring Get the unit for the head height - -:rtype: QgsUnitTypes.RenderUnit %End void setHeadThicknessUnit( QgsUnitTypes::RenderUnit unit ); %Docstring @@ -162,8 +138,6 @@ Set the unit for the head height QgsMapUnitScale headThicknessUnitScale() const; %Docstring Get the scale for the head height - -:rtype: QgsMapUnitScale %End void setHeadThicknessUnitScale( const QgsMapUnitScale &scale ); %Docstring @@ -173,8 +147,6 @@ Set the scale for the head height bool isCurved() const; %Docstring Return whether it is a curved arrow or a straight one - -:rtype: bool %End void setIsCurved( bool isCurved ); %Docstring @@ -184,8 +156,6 @@ Set whether it is a curved arrow or a straight one bool isRepeated() const; %Docstring Return whether the arrow is repeated along the line or not - -:rtype: bool %End void setIsRepeated( bool isRepeated ); %Docstring @@ -202,8 +172,6 @@ Set whether the arrow is repeated along the line HeadType headType() const; %Docstring Get the current head type - -:rtype: HeadType %End void setHeadType( HeadType type ); %Docstring @@ -220,8 +188,6 @@ Set the head type ArrowType arrowType() const; %Docstring Get the current arrow type - -:rtype: ArrowType %End void setArrowType( ArrowType type ); %Docstring diff --git a/python/core/symbology/qgscategorizedsymbolrenderer.sip b/python/core/symbology/qgscategorizedsymbolrenderer.sip index d3aef45446ec..a3a14d35c290 100644 --- a/python/core/symbology/qgscategorizedsymbolrenderer.sip +++ b/python/core/symbology/qgscategorizedsymbolrenderer.sip @@ -37,37 +37,17 @@ copy constructor QVariant value() const; -%Docstring - -:rtype: QVariant -%End QgsSymbol *symbol() const; -%Docstring - -:rtype: QgsSymbol -%End QString label() const; -%Docstring - -:rtype: str -%End void setValue( const QVariant &value ); void setSymbol( QgsSymbol *s /Transfer/ ); void setLabel( const QString &label ); bool renderState() const; -%Docstring - -:rtype: bool -%End void setRenderState( bool render ); QString dump() const; -%Docstring - -:rtype: str -%End void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; @@ -114,63 +94,38 @@ class QgsCategorizedSymbolRenderer : QgsFeatureRenderer %Docstring Update all the symbols but leave categories and colors. This method also sets the source symbol for the renderer. + :param sym: source symbol to use for categories. Ownership is not transferred. .. seealso:: :py:func:`setSourceSymbol()` %End const QgsCategoryList &categories() const; -%Docstring - -:rtype: QgsCategoryList -%End int categoryIndexForValue( const QVariant &val ); %Docstring return index of category with specified value (-1 if not found) - -:rtype: int %End int categoryIndexForLabel( const QString &val ); %Docstring return index of category with specified label (-1 if not found or not unique) -:rtype: int - .. versionadded:: 2.5 %End bool updateCategoryValue( int catIndex, const QVariant &value ); -%Docstring - -:rtype: bool -%End bool updateCategorySymbol( int catIndex, QgsSymbol *symbol /Transfer/ ); -%Docstring - -:rtype: bool -%End bool updateCategoryLabel( int catIndex, const QString &label ); -%Docstring - -:rtype: bool -%End bool updateCategoryRenderState( int catIndex, bool render ); %Docstring -:rtype: bool - .. versionadded:: 2.5 %End void addCategory( const QgsRendererCategory &category ); bool deleteCategory( int catIndex ); -%Docstring - -:rtype: bool -%End void deleteAllCategories(); void moveCategory( int from, int to ); @@ -182,17 +137,11 @@ Moves the category at index position from to index position to. void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder ); QString classAttribute() const; -%Docstring - -:rtype: str -%End void setClassAttribute( const QString &attr ); static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring create renderer from XML element - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); @@ -207,8 +156,6 @@ create renderer from XML element Returns the renderer's source symbol, which is the base symbol used for the each categories' symbol before applying the categories' color. -:rtype: QgsSymbol - .. seealso:: :py:func:`setSourceSymbol()` .. seealso:: :py:func:`sourceColorRamp()` @@ -218,6 +165,7 @@ the categories' color. %Docstring Sets the source symbol for the renderer, which is the base symbol used for the each categories' symbol before applying the categories' color. + :param sym: source symbol, ownership is transferred to the renderer .. seealso:: :py:func:`sourceSymbol()` @@ -229,8 +177,6 @@ the categories' color. %Docstring Returns the source color ramp, from which each categories' color is derived. -:rtype: QgsColorRamp - .. seealso:: :py:func:`setSourceColorRamp()` .. seealso:: :py:func:`sourceSymbol()` @@ -239,6 +185,7 @@ Returns the source color ramp, from which each categories' color is derived. void setSourceColorRamp( QgsColorRamp *ramp /Transfer/ ); %Docstring Sets the source color ramp. + :param ramp: color ramp. Ownership is transferred to the renderer .. seealso:: :py:func:`sourceColorRamp()` @@ -249,6 +196,7 @@ Sets the source color ramp. void updateColorRamp( QgsColorRamp *ramp /Transfer/ ); %Docstring Update the color ramp used and all symbols colors. + :param ramp: color ramp. Ownership is transferred to the renderer .. versionadded:: 2.5 @@ -268,8 +216,6 @@ Update the color ramp used and all symbols colors. %Docstring creates a QgsCategorizedSymbolRenderer from an existing renderer. -:rtype: QgsCategorizedSymbolRenderer - .. versionadded:: 2.5 :return: a new renderer if the conversion was possible, otherwise 0. @@ -293,8 +239,6 @@ size legend. Returns configuration of appearance of legend when using data-defined size for marker symbols. Will return null if the functionality is disabled. -:rtype: QgsDataDefinedSizeLegend - .. versionadded:: 3.0 %End @@ -309,24 +253,12 @@ hashtable for faster access to symbols %End QgsSymbol *skipRender(); -%Docstring - -:rtype: QgsSymbol -%End QgsSymbol *symbolForValue( const QVariant &value ); -%Docstring - -:rtype: QgsSymbol -%End private: QgsCategorizedSymbolRenderer( const QgsCategorizedSymbolRenderer & ); QgsCategorizedSymbolRenderer &operator=( const QgsCategorizedSymbolRenderer & ); -%Docstring - -:rtype: QgsCategorizedSymbolRenderer -%End }; /************************************************************************ diff --git a/python/core/symbology/qgscolorbrewerpalette.sip b/python/core/symbology/qgscolorbrewerpalette.sip index b3cf8529fa1c..19ae602ea42a 100644 --- a/python/core/symbology/qgscolorbrewerpalette.sip +++ b/python/core/symbology/qgscolorbrewerpalette.sip @@ -16,22 +16,10 @@ class QgsColorBrewerPalette %End public: static QList listSchemeColors( const QString &schemeName, int colors ); -%Docstring - -:rtype: list of QColor -%End static QStringList listSchemes(); -%Docstring - -:rtype: list of str -%End static QList listSchemeVariants( const QString &schemeName ); -%Docstring - -:rtype: list of int -%End static const char *BREWER_STRING; }; diff --git a/python/core/symbology/qgscptcityarchive.sip b/python/core/symbology/qgscptcityarchive.sip index d3a2ecefb928..c3498be6b507 100644 --- a/python/core/symbology/qgscptcityarchive.sip +++ b/python/core/symbology/qgscptcityarchive.sip @@ -24,83 +24,27 @@ class QgsCptCityArchive QString baseDir() const; -%Docstring - -:rtype: str -%End static QString baseDir( QString archiveName ); -%Docstring - -:rtype: str -%End static QString defaultBaseDir(); -%Docstring - -:rtype: str -%End void setBaseDir( const QString &dirName ); QString copyingFileName( const QString &dirName ) const; -%Docstring - -:rtype: str -%End QString descFileName( const QString &dirName ) const; -%Docstring - -:rtype: str -%End static QString findFileName( const QString &target, const QString &startDir, const QString &baseDir ); -%Docstring - -:rtype: str -%End static QMap< QString, QString > copyingInfo( const QString &fileName ); -%Docstring - -:rtype: QMap< str, QString > -%End static QMap< QString, QString > description( const QString &fileName ); -%Docstring - -:rtype: QMap< str, QString > -%End bool isEmpty(); -%Docstring - -:rtype: bool -%End QString archiveName() const; -%Docstring - -:rtype: str -%End static void initArchives( bool loadAll = false ); static void initArchive( const QString &archiveName, const QString &archiveBaseDir ); static void initDefaultArchive(); static void clearArchives(); static QgsCptCityArchive *defaultArchive(); -%Docstring - -:rtype: QgsCptCityArchive -%End static QMap< QString, QgsCptCityArchive * > archiveRegistry(); -%Docstring - -:rtype: QMap< str, QgsCptCityArchive * > -%End QVector< QgsCptCityDataItem * > rootItems() const; -%Docstring - -:rtype: list of QgsCptCityDataItem -%End QVector< QgsCptCityDataItem * > selectionItems() const; -%Docstring - -:rtype: list of QgsCptCityDataItem -%End protected: @@ -132,147 +76,55 @@ Base class for all items in the model const QString &name, const QString &path ); bool hasChildren(); -%Docstring - -:rtype: bool -%End int rowCount(); -%Docstring - -:rtype: int -%End virtual int leafCount() const; -%Docstring - -:rtype: int -%End virtual void refresh(); virtual QVector createChildren(); -%Docstring - -:rtype: list of QgsCptCityDataItem -%End virtual void populate(); bool isPopulated(); -%Docstring - -:rtype: bool -%End virtual void addChildItem( QgsCptCityDataItem *child /Transfer/, bool refresh = false ); virtual void deleteChildItem( QgsCptCityDataItem *child ); virtual QgsCptCityDataItem *removeChildItem( QgsCptCityDataItem *child ) /TransferBack/; -%Docstring - -:rtype: QgsCptCityDataItem -%End virtual bool equal( const QgsCptCityDataItem *other ); -%Docstring - -:rtype: bool -%End virtual QWidget *paramWidget() /Factory/; -%Docstring - -:rtype: QWidget -%End virtual QList actions(); -%Docstring - -:rtype: list of QAction -%End virtual bool acceptDrop(); -%Docstring - -:rtype: bool -%End virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*action*/ ); -%Docstring - -:rtype: bool -%End static int findItem( QVector items, QgsCptCityDataItem *item ); -%Docstring - -:rtype: int -%End Type type() const; -%Docstring - -:rtype: Type -%End QgsCptCityDataItem *parent() const; -%Docstring - -:rtype: QgsCptCityDataItem -%End void setParent( QgsCptCityDataItem *parent ); QVector children() const; -%Docstring - -:rtype: list of QgsCptCityDataItem -%End virtual QIcon icon(); -%Docstring - -:rtype: QIcon -%End virtual QIcon icon( QSize size ); -%Docstring - -:rtype: QIcon -%End QString name() const; -%Docstring - -:rtype: str -%End QString path() const; -%Docstring - -:rtype: str -%End QString info() const; -%Docstring - -:rtype: str -%End QString shortInfo() const; -%Docstring - -:rtype: str -%End void setIcon( const QIcon &icon ); void setToolTip( const QString &msg ); QString toolTip() const; -%Docstring - -:rtype: str -%End bool isValid(); -%Docstring - -:rtype: bool -%End protected: @@ -309,10 +161,6 @@ Item that represents a layer that can be opened with one of the providers virtual int leafCount() const; const QgsCptCityColorRamp &ramp() const; -%Docstring - -:rtype: QgsCptCityColorRamp -%End virtual QIcon icon(); virtual QIcon icon( QSize size ); @@ -341,10 +189,6 @@ A Collection: logical collection of subcollections and color ramps void setPopulated(); void addChild( QgsCptCityDataItem *item /Transfer/ ); QVector childrenRamps( bool recursive ); -%Docstring - -:rtype: list of QgsCptCityDataItem -%End protected: }; @@ -370,22 +214,10 @@ A directory: contains subdirectories and color ramps static QgsCptCityDataItem *dataItem( QgsCptCityDataItem *parent, const QString &name, const QString &path ); -%Docstring - -:rtype: QgsCptCityDataItem -%End protected: QMap< QString, QStringList > rampsMap(); -%Docstring - -:rtype: QMap< str, list of str > -%End QStringList dirEntries() const; -%Docstring - -:rtype: list of str -%End }; class QgsCptCitySelectionItem : QgsCptCityCollectionItem @@ -407,10 +239,6 @@ A selection: contains subdirectories and color ramps QStringList selectionsList() const; -%Docstring - -:rtype: list of str -%End protected: void parseXml(); @@ -469,10 +297,6 @@ class QgsCptCityBrowserModel : QAbstractItemModel QModelIndex findItem( QgsCptCityDataItem *item, QgsCptCityDataItem *parent = 0 ) const; -%Docstring - -:rtype: QModelIndex -%End virtual QModelIndex parent( const QModelIndex &index ) const; @@ -483,8 +307,6 @@ class QgsCptCityBrowserModel : QAbstractItemModel QgsCptCityDataItem *dataItem( const QModelIndex &idx ) const; %Docstring virtual bool dropMimeData( const QMimeData * data, Qt.DropAction action, int row, int column, const QModelIndex & parent ); */ - -:rtype: QgsCptCityDataItem %End virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const; @@ -499,8 +321,6 @@ virtual bool dropMimeData( const QMimeData * data, Qt.DropAction action, int row QModelIndex findPath( const QString &path ); %Docstring return index of a path - -:rtype: QModelIndex %End void connectItem( QgsCptCityDataItem *item ); diff --git a/python/core/symbology/qgsellipsesymbollayer.sip b/python/core/symbology/qgsellipsesymbollayer.sip index 733ca8e95113..6eb07069dd29 100644 --- a/python/core/symbology/qgsellipsesymbollayer.sip +++ b/python/core/symbology/qgsellipsesymbollayer.sip @@ -22,15 +22,7 @@ A symbol layer for rendering objects with major and minor axis (e.g. ellipse, re QgsEllipseSymbolLayer(); static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual void renderPoint( QPointF point, QgsSymbolRenderContext &context ); @@ -55,38 +47,20 @@ A symbol layer for rendering objects with major and minor axis (e.g. ellipse, re void setSymbolName( const QString &name ); QString symbolName() const; -%Docstring - -:rtype: str -%End void setSymbolWidth( double w ); double symbolWidth() const; -%Docstring - -:rtype: float -%End void setSymbolHeight( double h ); double symbolHeight() const; -%Docstring - -:rtype: float -%End Qt::PenStyle strokeStyle() const; -%Docstring - -:rtype: Qt.PenStyle -%End void setStrokeStyle( Qt::PenStyle strokeStyle ); Qt::PenJoinStyle penJoinStyle() const; %Docstring Get stroke join style. -:rtype: Qt.PenJoinStyle - .. versionadded:: 2.16 %End @@ -99,10 +73,6 @@ Set stroke join style. void setStrokeWidth( double w ); double strokeWidth() const; -%Docstring - -:rtype: float -%End virtual void setFillColor( const QColor &c ); virtual QColor fillColor() const; @@ -113,6 +83,7 @@ Set stroke join style. void setSymbolWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the symbol's width. + :param unit: symbol units .. seealso:: :py:func:`symbolWidthUnit()` @@ -124,8 +95,6 @@ Sets the units for the symbol's width. %Docstring Returns the units for the symbol's width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setSymbolWidthUnit()` .. seealso:: :py:func:`symbolHeightUnit()` @@ -133,14 +102,11 @@ Returns the units for the symbol's width. void setSymbolWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &symbolWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setSymbolHeightUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the symbol's height. + :param unit: symbol units .. seealso:: :py:func:`symbolHeightUnit()` @@ -152,8 +118,6 @@ Sets the units for the symbol's height. %Docstring Returns the units for the symbol's height. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setSymbolHeightUnit()` .. seealso:: :py:func:`symbolWidthUnit()` @@ -161,14 +125,11 @@ Returns the units for the symbol's height. void setSymbolHeightMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &symbolHeightMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the symbol's stroke width. + :param unit: symbol units .. seealso:: :py:func:`strokeWidthUnit()` @@ -178,17 +139,11 @@ Sets the units for the symbol's stroke width. %Docstring Returns the units for the symbol's stroke width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setStrokeWidthUnit()` %End void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &strokeWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); diff --git a/python/core/symbology/qgsfillsymbollayer.sip b/python/core/symbology/qgsfillsymbollayer.sip index e6d0eb986f7c..747189530aa8 100644 --- a/python/core/symbology/qgsfillsymbollayer.sip +++ b/python/core/symbology/qgsfillsymbollayer.sip @@ -28,15 +28,7 @@ class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -64,10 +56,6 @@ class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer Qt::BrushStyle brushStyle() const; -%Docstring - -:rtype: Qt.BrushStyle -%End void setBrushStyle( Qt::BrushStyle style ); virtual QColor strokeColor() const; @@ -77,36 +65,21 @@ class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer virtual void setFillColor( const QColor &color ); Qt::PenStyle strokeStyle() const; -%Docstring - -:rtype: Qt.PenStyle -%End void setStrokeStyle( Qt::PenStyle strokeStyle ); double strokeWidth() const; -%Docstring - -:rtype: float -%End void setStrokeWidth( double strokeWidth ); Qt::PenJoinStyle penJoinStyle() const; -%Docstring - -:rtype: Qt.PenJoinStyle -%End void setPenJoinStyle( Qt::PenJoinStyle style ); void setOffset( QPointF offset ); QPointF offset(); -%Docstring - -:rtype: QPointF -%End void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the width of the fill's stroke. + :param unit: width units .. seealso:: :py:func:`strokeWidthUnit()` @@ -116,21 +89,16 @@ Sets the units for the width of the fill's stroke. %Docstring Returns the units for the width of the fill's stroke. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setStrokeWidthUnit()` %End void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &strokeWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setOffsetUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the fill's offset. + :param unit: offset units .. seealso:: :py:func:`offsetUnit()` @@ -140,17 +108,11 @@ Sets the units for the fill's offset. %Docstring Returns the units for the fill's offset. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit()` %End void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &offsetMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -231,10 +193,6 @@ class QgsGradientFillSymbolLayer : QgsFillSymbolLayer static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -261,16 +219,12 @@ class QgsGradientFillSymbolLayer : QgsFillSymbolLayer GradientType gradientType() const; %Docstring Type of gradient, e.g., linear or radial - -:rtype: GradientType %End void setGradientType( GradientType gradientType ); GradientColorType gradientColorType() const; %Docstring Gradient color mode, controls how gradient color stops are created - -:rtype: GradientColorType %End void setGradientColorType( GradientColorType gradientColorType ); @@ -279,8 +233,6 @@ Gradient color mode, controls how gradient color stops are created Returns the color ramp used for the gradient fill. This is only used if the gradient color type is set to ColorRamp. -:rtype: QgsColorRamp - .. seealso:: :py:func:`setColorRamp()` .. seealso:: :py:func:`gradientColorType()` @@ -290,6 +242,7 @@ used if the gradient color type is set to ColorRamp. %Docstring Sets the color ramp used for the gradient fill. This is only used if the gradient color type is set to ColorRamp. + :param ramp: color ramp. Ownership is transferred. .. seealso:: :py:func:`colorRamp()` @@ -300,24 +253,18 @@ used if the gradient color type is set to ColorRamp. QColor color2() const; %Docstring Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor - -:rtype: QColor %End void setColor2( const QColor &color2 ); GradientCoordinateMode coordinateMode() const; %Docstring Coordinate mode for gradient. Controls how the gradient stops are positioned. - -:rtype: GradientCoordinateMode %End void setCoordinateMode( GradientCoordinateMode coordinateMode ); GradientSpread gradientSpread() const; %Docstring Gradient spread mode. Controls how the gradient behaves outside of the predefined stops - -:rtype: GradientSpread %End void setGradientSpread( GradientSpread gradientSpread ); @@ -326,67 +273,39 @@ Gradient spread mode. Controls how the gradient behaves outside of the predefine Starting point of gradient fill, in the range [0,0] - [1,1] %End QPointF referencePoint1() const; -%Docstring - -:rtype: QPointF -%End void setReferencePoint1IsCentroid( bool isCentroid ); %Docstring Sets the starting point of the gradient to be the feature centroid %End bool referencePoint1IsCentroid() const; -%Docstring - -:rtype: bool -%End void setReferencePoint2( QPointF referencePoint ); %Docstring End point of gradient fill, in the range [0,0] - [1,1] %End QPointF referencePoint2() const; -%Docstring - -:rtype: QPointF -%End void setReferencePoint2IsCentroid( bool isCentroid ); %Docstring Sets the end point of the gradient to be the feature centroid %End bool referencePoint2IsCentroid() const; -%Docstring - -:rtype: bool -%End void setOffset( QPointF offset ); %Docstring Offset for gradient fill %End QPointF offset() const; -%Docstring - -:rtype: QPointF -%End void setOffsetUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Units for gradient fill offset %End QgsUnitTypes::RenderUnit offsetUnit() const; -%Docstring - -:rtype: QgsUnitTypes.RenderUnit -%End void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &offsetMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -427,10 +346,6 @@ class QgsShapeburstFillSymbolLayer : QgsFillSymbolLayer static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -457,6 +372,7 @@ class QgsShapeburstFillSymbolLayer : QgsFillSymbolLayer void setBlurRadius( int blurRadius ); %Docstring Sets the blur radius, which controls the amount of blurring applied to the fill. + :param blurRadius: Radius for fill blur. Values between 0 - 17 are valid, where higher values results in a stronger blur. Set to 0 to disable blur. .. versionadded:: 2.3 @@ -469,8 +385,6 @@ Sets the blur radius, which controls the amount of blurring applied to the fill. Returns the blur radius, which controls the amount of blurring applied to the fill. :return: Integer representing the radius for fill blur. Higher values indicate a stronger blur. A 0 value indicates that blurring is disabled. -:rtype: int - .. versionadded:: 2.3 @@ -480,6 +394,7 @@ Returns the blur radius, which controls the amount of blurring applied to the fi void setUseWholeShape( bool useWholeShape ); %Docstring Sets whether the shapeburst fill should be drawn using the entire shape. + :param useWholeShape: Set to true if shapeburst should cover entire shape. If false, setMaxDistance is used to calculate how far from the boundary of the shape should be shaded @@ -495,8 +410,6 @@ be shaded Returns whether the shapeburst fill is set to cover the entire shape. :return: True if shapeburst fill will cover the entire shape. If false, shapeburst is drawn to a distance of maxDistance from the polygon's boundary. -:rtype: bool - .. versionadded:: 2.3 @@ -508,6 +421,7 @@ Returns whether the shapeburst fill is set to cover the entire shape. void setMaxDistance( double maxDistance ); %Docstring Sets the maximum distance to shape inside of the shape from the polygon's boundary. + :param maxDistance: distance from boundary to shade. setUseWholeShape must be set to false for this parameter to take effect. Distance unit is controlled by setDistanceUnit. .. versionadded:: 2.3 @@ -524,8 +438,6 @@ Sets the maximum distance to shape inside of the shape from the polygon's bounda Returns the maximum distance from the shape's boundary which is shaded. This parameter is only effective if useWholeShape is false. :return: the maximum distance from the polygon's boundary which is shaded. Distance units are indicated by distanceUnit. -:rtype: float - .. versionadded:: 2.3 @@ -539,6 +451,7 @@ Returns the maximum distance from the shape's boundary which is shaded. This par void setDistanceUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary. + :param unit: distance unit for the maximum distance .. versionadded:: 2.3 @@ -553,8 +466,6 @@ Sets the unit for the maximum distance to shade inside of the shape from the pol Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary. :return: distance unit for the maximum distance -:rtype: QgsUnitTypes.RenderUnit - .. versionadded:: 2.3 @@ -565,15 +476,12 @@ Returns the unit for the maximum distance to shade inside of the shape from the void setDistanceMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &distanceMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setColorType( ShapeburstColorType colorType ); %Docstring Sets the color mode to use for the shapeburst fill. Shapeburst can either be drawn using a QgsColorRamp color ramp or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill. + :param colorType: color type to use for shapeburst fill .. versionadded:: 2.3 @@ -593,8 +501,6 @@ Returns the color mode used for the shapeburst fill. Shapeburst can either be dr or by simply specificing a start and end color. :return: current color mode used for the shapeburst fill -:rtype: ShapeburstColorType - .. versionadded:: 2.3 @@ -610,6 +516,7 @@ or by simply specificing a start and end color. void setColorRamp( QgsColorRamp *ramp ); %Docstring Sets the color ramp used to draw the shapeburst fill. Color ramps are only used if setColorType is set ShapeburstColorType.ColorRamp. + :param ramp: color ramp to use for shapeburst fill .. versionadded:: 2.3 @@ -624,8 +531,6 @@ Sets the color ramp used to draw the shapeburst fill. Color ramps are only used Returns the color ramp used for the shapeburst fill. The color ramp is only used if the colorType is set to ShapeburstColorType.ColorRamp :return: a QgsColorRamp color ramp -:rtype: QgsColorRamp - .. versionadded:: 2.3 @@ -637,6 +542,7 @@ Returns the color ramp used for the shapeburst fill. The color ramp is only used void setColor2( const QColor &color2 ); %Docstring Sets the color for the endpoint of the shapeburst fill. This color is only used if setColorType is set ShapeburstColorType.SimpleTwoColor. + :param color2: QColor to use for endpoint of gradient .. versionadded:: 2.3 @@ -651,8 +557,6 @@ Sets the color for the endpoint of the shapeburst fill. This color is only used Returns the color used for the endpoint of the shapeburst fill. This color is only used if the colorType is set to ShapeburstColorType.SimpleTwoColor :return: a QColor indicating the color of the endpoint of the gradient -:rtype: QColor - .. versionadded:: 2.3 @@ -665,6 +569,7 @@ Returns the color used for the endpoint of the shapeburst fill. This color is on %Docstring Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading. + :param ignoreRings: Set to true if buffers should ignore interior rings for polygons. .. versionadded:: 2.3 @@ -677,8 +582,6 @@ the buffered shading. Returns whether the shapeburst fill is set to ignore polygon interior rings. :return: True if the shapeburst fill will ignore interior rings when calculating buffered shading. -:rtype: bool - .. versionadded:: 2.3 @@ -688,6 +591,7 @@ Returns whether the shapeburst fill is set to ignore polygon interior rings. void setOffset( QPointF offset ); %Docstring Sets the offset for the shapeburst fill. + :param offset: QPointF indicating the horizontal/vertical offset amount .. versionadded:: 2.3 @@ -702,8 +606,6 @@ Sets the offset for the shapeburst fill. Returns the offset for the shapeburst fill. :return: a QPointF indicating the horizontal/vertical offset amount -:rtype: QPointF - .. versionadded:: 2.3 @@ -715,6 +617,7 @@ Returns the offset for the shapeburst fill. void setOffsetUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units used for the offset for the shapeburst fill. + :param unit: units for fill offset .. versionadded:: 2.3 @@ -729,8 +632,6 @@ Sets the units used for the offset for the shapeburst fill. Returns the units used for the offset of the shapeburst fill. :return: units used for the fill offset -:rtype: QgsUnitTypes.RenderUnit - .. versionadded:: 2.3 @@ -741,10 +642,6 @@ Returns the units used for the offset of the shapeburst fill. void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &offsetMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -787,6 +684,7 @@ Base class for polygon renderers generating texture images* void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the symbol's stroke width. + :param unit: symbol units .. seealso:: :py:func:`strokeWidthUnit()` @@ -796,17 +694,11 @@ Sets the units for the symbol's stroke width. %Docstring Returns the units for the symbol's stroke width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setStrokeWidthUnit()` %End void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &strokeWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -867,10 +759,6 @@ class QgsRasterFillSymbolLayer: QgsImageFillSymbolLayer QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() ); static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -894,6 +782,7 @@ class QgsRasterFillSymbolLayer: QgsImageFillSymbolLayer void setImageFilePath( const QString &imagePath ); %Docstring Sets the path to the raster image used for the fill. + :param imagePath: path to image file .. seealso:: :py:func:`imageFilePath` @@ -904,8 +793,6 @@ Sets the path to the raster image used for the fill. The path to the raster image used for the fill. :return: path to image file -:rtype: str - .. seealso:: :py:func:`setImageFilePath` %End @@ -914,6 +801,7 @@ The path to the raster image used for the fill. %Docstring Set the coordinate mode for fill. Controls how the top left corner of the image fill is positioned relative to the feature. + :param mode: coordinate mode .. seealso:: :py:func:`coordinateMode` @@ -925,8 +813,6 @@ Coordinate mode for fill. Controls how the top left corner of the image fill is positioned relative to the feature. :return: coordinate mode -:rtype: FillCoordinateMode - .. seealso:: :py:func:`setCoordinateMode` %End @@ -934,6 +820,7 @@ fill is positioned relative to the feature. void setOpacity( const double opacity ); %Docstring Sets the ``opacity`` for the raster image used in the fill. + :param opacity: opacity value between 0 (fully transparent) and 1 (fully opaque) .. seealso:: :py:func:`opacity()` @@ -944,8 +831,6 @@ Sets the ``opacity`` for the raster image used in the fill. Returns the opacity for the raster image used in the fill. :return: opacity value between 0 (fully transparent) and 1 (fully opaque) -:rtype: float - .. seealso:: :py:func:`setOpacity()` %End @@ -953,6 +838,7 @@ Returns the opacity for the raster image used in the fill. void setOffset( QPointF offset ); %Docstring Sets the offset for the fill. + :param offset: offset for fill .. seealso:: :py:func:`offset` @@ -967,8 +853,6 @@ Sets the offset for the fill. Returns the offset for the fill. :return: offset for fill -:rtype: QPointF - .. seealso:: :py:func:`setOffset` @@ -980,6 +864,7 @@ Returns the offset for the fill. void setOffsetUnit( const QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the fill's offset. + :param unit: units for offset .. seealso:: :py:func:`offsetUnit` @@ -994,8 +879,6 @@ Sets the units for the fill's offset. Returns the units for the fill's offset. :return: units for offset -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit` @@ -1007,6 +890,7 @@ Returns the units for the fill's offset. void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale for the fill's offset. + :param scale: map unit scale for offset .. seealso:: :py:func:`offsetMapUnitScale` @@ -1021,8 +905,6 @@ Sets the map unit scale for the fill's offset. Returns the map unit scale for the fill's offset. :return: map unit scale for offset -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setOffsetMapUnitScale` @@ -1035,6 +917,7 @@ Returns the map unit scale for the fill's offset. %Docstring Sets the width for scaling the image used in the fill. The image's height will also be scaled to maintain the image's aspect ratio. + :param width: width for scaling the image .. seealso:: :py:func:`width` @@ -1050,8 +933,6 @@ Returns the width used for scaling the image used in the fill. The image's heigh scaled to maintain the image's aspect ratio. :return: width used for scaling the image -:rtype: float - .. seealso:: :py:func:`setWidth` @@ -1063,6 +944,7 @@ scaled to maintain the image's aspect ratio. void setWidthUnit( const QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the image's width. + :param unit: units for width .. seealso:: :py:func:`widthUnit` @@ -1077,8 +959,6 @@ Sets the units for the image's width. Returns the units for the image's width. :return: units for width -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setWidthUnit` @@ -1090,6 +970,7 @@ Returns the units for the image's width. void setWidthMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale for the image's width. + :param scale: map unit scale for width .. seealso:: :py:func:`widthMapUnitScale` @@ -1104,8 +985,6 @@ Sets the map unit scale for the image's width. Returns the map unit scale for the image's width. :return: map unit scale for width -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setWidthMapUnitScale` @@ -1146,15 +1025,7 @@ Constructs SVG fill symbol layer with picture from given absolute path to a SVG ~QgsSVGFillSymbolLayer(); static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving ); %Docstring @@ -1184,40 +1055,21 @@ Used internally when reading/writing symbols. void setSvgFilePath( const QString &svgPath ); QString svgFilePath() const; -%Docstring - -:rtype: str -%End void setPatternWidth( double width ); double patternWidth() const; -%Docstring - -:rtype: float -%End void setSvgFillColor( const QColor &c ); QColor svgFillColor() const; -%Docstring - -:rtype: QColor -%End void setSvgStrokeColor( const QColor &c ); QColor svgStrokeColor() const; -%Docstring - -:rtype: QColor -%End void setSvgStrokeWidth( double w ); double svgStrokeWidth() const; -%Docstring - -:rtype: float -%End void setPatternWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the width of the SVG images in the pattern. + :param unit: width units .. seealso:: :py:func:`patternWidthUnit()` @@ -1227,21 +1079,16 @@ Sets the units for the width of the SVG images in the pattern. %Docstring Returns the units for the width of the SVG images in the pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setPatternWidthUnit()` %End void setPatternWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &patternWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setSvgStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the stroke width. + :param unit: width units .. seealso:: :py:func:`svgStrokeWidthUnit()` @@ -1251,17 +1098,11 @@ Sets the units for the stroke width. %Docstring Returns the units for the stroke width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setSvgStrokeWidthUnit()` %End void setSvgStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &svgStrokeWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -1293,15 +1134,7 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer ~QgsLinePatternFillSymbolLayer(); static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -1325,21 +1158,14 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer QString ogrFeatureStyleWidth( double widthScaleFactor ) const; -%Docstring - -:rtype: str -%End void setLineAngle( double a ); double lineAngle() const; -%Docstring - -:rtype: float -%End void setDistance( double d ); %Docstring Sets the distance between lines in the fill pattern. + :param d: distance. Units are specified by setDistanceUnit() .. seealso:: :py:func:`distance()` @@ -1351,8 +1177,6 @@ Sets the distance between lines in the fill pattern. %Docstring Returns the distance between lines in the fill pattern. Units are retrieved by distanceUnit(). -:rtype: float - .. seealso:: :py:func:`setDistance()` .. seealso:: :py:func:`distanceUnit()` @@ -1360,24 +1184,17 @@ Returns the distance between lines in the fill pattern. Units are retrieved by d void setLineWidth( double w ); double lineWidth() const; -%Docstring - -:rtype: float -%End virtual void setColor( const QColor &c ); virtual QColor color() const; void setOffset( double offset ); double offset() const; -%Docstring - -:rtype: float -%End void setDistanceUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the distance between lines in the fill pattern. + :param unit: distance units .. seealso:: :py:func:`distanceUnit()` @@ -1389,8 +1206,6 @@ Sets the units for the distance between lines in the fill pattern. %Docstring Returns the units for the distance between lines in the fill pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setDistanceUnit()` .. seealso:: :py:func:`distance()` @@ -1398,14 +1213,11 @@ Returns the units for the distance between lines in the fill pattern. void setDistanceMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &distanceMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setLineWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the line's width. + :param unit: width units .. seealso:: :py:func:`lineWidthUnit()` @@ -1415,21 +1227,16 @@ Sets the units for the line's width. %Docstring Returns the units for the line's width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setLineWidthUnit()` %End void setLineWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &lineWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setOffsetUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the line pattern's offset. + :param unit: offset units .. seealso:: :py:func:`offsetUnit()` @@ -1439,17 +1246,11 @@ Sets the units for the line pattern's offset. %Docstring Returns the units for the line pattern's offset. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit()` %End void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &offsetMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -1492,15 +1293,7 @@ class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer ~QgsPointPatternFillSymbolLayer(); static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -1524,31 +1317,15 @@ class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer double distanceX() const; -%Docstring - -:rtype: float -%End void setDistanceX( double d ); double distanceY() const; -%Docstring - -:rtype: float -%End void setDistanceY( double d ); double displacementX() const; -%Docstring - -:rtype: float -%End void setDisplacementX( double d ); double displacementY() const; -%Docstring - -:rtype: float -%End void setDisplacementY( double d ); virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ ); @@ -1558,6 +1335,7 @@ class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer void setDistanceXUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the horizontal distance between points in the pattern. + :param unit: distance units .. seealso:: :py:func:`distanceXUnit()` @@ -1569,8 +1347,6 @@ Sets the units for the horizontal distance between points in the pattern. %Docstring Returns the units for the horizontal distance between points in the pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setDistanceXUnit()` .. seealso:: :py:func:`distanceYUnit()` @@ -1578,14 +1354,11 @@ Returns the units for the horizontal distance between points in the pattern. void setDistanceXMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &distanceXMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setDistanceYUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the vertical distance between points in the pattern. + :param unit: distance units .. seealso:: :py:func:`distanceYUnit()` @@ -1597,8 +1370,6 @@ Sets the units for the vertical distance between points in the pattern. %Docstring Returns the units for the vertical distance between points in the pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setDistanceYUnit()` .. seealso:: :py:func:`distanceXUnit()` @@ -1606,14 +1377,11 @@ Returns the units for the vertical distance between points in the pattern. void setDistanceYMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &distanceYMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setDisplacementXUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the horizontal displacement between rows in the pattern. + :param unit: displacement units .. seealso:: :py:func:`displacementXUnit()` @@ -1625,8 +1393,6 @@ Sets the units for the horizontal displacement between rows in the pattern. %Docstring Returns the units for the horizontal displacement between rows in the pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setDisplacementXUnit()` .. seealso:: :py:func:`displacementYUnit()` @@ -1634,14 +1400,11 @@ Returns the units for the horizontal displacement between rows in the pattern. void setDisplacementXMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &displacementXMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setDisplacementYUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the vertical displacement between rows in the pattern. + :param unit: displacement units .. seealso:: :py:func:`displacementYUnit()` @@ -1653,8 +1416,6 @@ Sets the units for the vertical displacement between rows in the pattern. %Docstring Returns the units for the vertical displacement between rows in the pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setDisplacementYUnit()` .. seealso:: :py:func:`displacementXUnit()` @@ -1662,10 +1423,6 @@ Returns the units for the vertical displacement between rows in the pattern. void setDisplacementYMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &displacementYMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -1704,15 +1461,7 @@ class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -1761,10 +1510,6 @@ class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer void setPointOnSurface( bool pointOnSurface ); bool pointOnSurface() const; -%Docstring - -:rtype: bool -%End void setPointOnAllParts( bool pointOnAllParts ); %Docstring @@ -1777,8 +1522,6 @@ Sets whether a point is drawn for all parts or only on the biggest part of multi %Docstring Returns whether a point is drawn for all parts or only on the biggest part of multi-part features. -:rtype: bool - .. versionadded:: 2.16 %End diff --git a/python/core/symbology/qgsgeometrygeneratorsymbollayer.sip b/python/core/symbology/qgsgeometrygeneratorsymbollayer.sip index 1f17f028c1e2..28abef176e27 100644 --- a/python/core/symbology/qgsgeometrygeneratorsymbollayer.sip +++ b/python/core/symbology/qgsgeometrygeneratorsymbollayer.sip @@ -18,10 +18,6 @@ class QgsGeometryGeneratorSymbolLayer : QgsSymbolLayer ~QgsGeometryGeneratorSymbolLayer(); static QgsSymbolLayer *create( const QgsStringMap &properties ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -40,8 +36,6 @@ Access the symbol type. This defines the type of geometry that is created by this generator. :return: Symbol type -:rtype: QgsSymbol.SymbolType - %End virtual void startRender( QgsSymbolRenderContext &context ); @@ -67,8 +61,6 @@ Set the expression to generate this geometry. QString geometryExpression() const; %Docstring Get the expression to generate this geometry. - -:rtype: str %End virtual QgsSymbol *subSymbol(); @@ -85,8 +77,6 @@ Get the expression to generate this geometry. Will always return true. This is a hybrid layer, it constructs its own geometry so it does not care about the geometry of its parents. - -:rtype: bool %End virtual void render( QgsSymbolRenderContext &context ); diff --git a/python/core/symbology/qgsgraduatedsymbolrenderer.sip b/python/core/symbology/qgsgraduatedsymbolrenderer.sip index c0b8c8eff439..7d8124f98df7 100644 --- a/python/core/symbology/qgsgraduatedsymbolrenderer.sip +++ b/python/core/symbology/qgsgraduatedsymbolrenderer.sip @@ -26,32 +26,12 @@ Constructor for QgsRendererRange. bool operator<( const QgsRendererRange &other ) const; -%Docstring - -:rtype: bool -%End double lowerValue() const; -%Docstring - -:rtype: float -%End double upperValue() const; -%Docstring - -:rtype: float -%End QgsSymbol *symbol() const; -%Docstring - -:rtype: QgsSymbol -%End QString label() const; -%Docstring - -:rtype: str -%End void setSymbol( QgsSymbol *s /Transfer/ ); void setLabel( const QString &label ); @@ -59,21 +39,14 @@ Constructor for QgsRendererRange. void setUpperValue( double upperValue ); bool renderState() const; -%Docstring - -:rtype: bool -%End void setRenderState( bool render ); QString dump() const; -%Docstring - -:rtype: str -%End void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props, bool firstRange = false ) const; %Docstring Creates a DOM element representing the range in SLD format. + :param doc: DOM document :param element: destination DOM element :param props: graduated renderer properties @@ -105,51 +78,25 @@ class QgsRendererRangeLabelFormat bool operator==( const QgsRendererRangeLabelFormat &other ) const; bool operator!=( const QgsRendererRangeLabelFormat &other ) const; -%Docstring - -:rtype: bool -%End QString format() const; -%Docstring - -:rtype: str -%End void setFormat( const QString &format ); int precision() const; -%Docstring - -:rtype: int -%End void setPrecision( int precision ); bool trimTrailingZeroes() const; -%Docstring - -:rtype: bool -%End void setTrimTrailingZeroes( bool trimTrailingZeroes ); QString labelForRange( double lower, double upper ) const /PyName=labelForLowerUpper/; %Docstring -:rtype: str - .. note:: labelForLowerUpper in Python bindings %End QString labelForRange( const QgsRendererRange &range ) const; -%Docstring - -:rtype: str -%End QString formatNumber( double value ) const; -%Docstring - -:rtype: str -%End void setFromDomElement( QDomElement &element ); void saveToDomElement( QDomElement &element ); @@ -194,43 +141,17 @@ class QgsGraduatedSymbolRenderer : QgsFeatureRenderer QString classAttribute() const; -%Docstring - -:rtype: str -%End void setClassAttribute( const QString &attr ); const QgsRangeList &ranges() const; -%Docstring - -:rtype: QgsRangeList -%End bool updateRangeSymbol( int rangeIndex, QgsSymbol *symbol /Transfer/ ); -%Docstring - -:rtype: bool -%End bool updateRangeLabel( int rangeIndex, const QString &label ); -%Docstring - -:rtype: bool -%End bool updateRangeUpperValue( int rangeIndex, double value ); -%Docstring - -:rtype: bool -%End bool updateRangeLowerValue( int rangeIndex, double value ); -%Docstring - -:rtype: bool -%End bool updateRangeRenderState( int rangeIndex, bool render ); %Docstring -:rtype: bool - .. versionadded:: 2.5 %End @@ -254,6 +175,7 @@ class QgsGraduatedSymbolRenderer : QgsFeatureRenderer %Docstring Add a breakpoint by splitting existing classes so that the specified value becomes a break between two classes. + :param breakValue: position to insert break :param updateSymbols: set to true to reapply ramp colors to the new symbol ranges @@ -274,8 +196,6 @@ Moves the category at index position from to index position to. Tests whether classes assigned to the renderer have ranges which overlap. :return: true if ranges overlap -:rtype: bool - .. versionadded:: 2.10 %End @@ -285,8 +205,6 @@ Tests whether classes assigned to the renderer have ranges which overlap. Tests whether classes assigned to the renderer have gaps between the ranges. :return: true if ranges have gaps -:rtype: bool - .. versionadded:: 2.10 %End @@ -305,15 +223,12 @@ Tests whether classes assigned to the renderer have gaps between the ranges. }; Mode mode() const; -%Docstring - -:rtype: Mode -%End void setMode( Mode mode ); void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses ); %Docstring Recalculate classes for a layer + :param vlayer: The layer being rendered (from which data values are calculated) :param mode: The calculation mode :param nclasses: The number of classes to calculate (approximate for some modes) @@ -325,14 +240,13 @@ Recalculate classes for a layer %Docstring Return the label format used to generate default classification labels -:rtype: QgsRendererRangeLabelFormat - .. versionadded:: 2.6 %End void setLabelFormat( const QgsRendererRangeLabelFormat &labelFormat, bool updateRanges = false ); %Docstring Set the label format used to generate default classification labels + :param labelFormat: The string appended to classification labels :param updateRanges: If true then ranges ending with the old unit string are updated to the new. @@ -342,6 +256,7 @@ Set the label format used to generate default classification labels void calculateLabelPrecision( bool updateRanges = true ); %Docstring Reset the label decimal places to a numberbased on the minimum class interval + :param updateRanges: if true then ranges currently using the default label will be updated .. versionadded:: 2.6 @@ -356,6 +271,7 @@ Reset the label decimal places to a numberbased on the minimum class interval const QgsRendererRangeLabelFormat &legendFormat = QgsRendererRangeLabelFormat() ); %Docstring Creates a new graduated renderer. + :param vlayer: vector layer :param attrName: attribute to classify :param classes: number of classes @@ -365,15 +281,11 @@ Creates a new graduated renderer. :param legendFormat: :return: new QgsGraduatedSymbolRenderer object -:rtype: QgsGraduatedSymbolRenderer - %End static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring create renderer from XML element - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); @@ -388,8 +300,6 @@ create renderer from XML element Returns the renderer's source symbol, which is the base symbol used for the each classes' symbol before applying the classes' color. -:rtype: QgsSymbol - .. seealso:: :py:func:`setSourceSymbol()` .. seealso:: :py:func:`sourceColorRamp()` @@ -399,6 +309,7 @@ the classes' color. %Docstring Sets the source symbol for the renderer, which is the base symbol used for the each classes' symbol before applying the classes' color. + :param sym: source symbol, ownership is transferred to the renderer .. seealso:: :py:func:`sourceSymbol()` @@ -410,8 +321,6 @@ the classes' color. %Docstring Returns the source color ramp, from which each classes' color is derived. -:rtype: QgsColorRamp - .. seealso:: :py:func:`setSourceColorRamp()` .. seealso:: :py:func:`sourceSymbol()` @@ -420,6 +329,7 @@ Returns the source color ramp, from which each classes' color is derived. void setSourceColorRamp( QgsColorRamp *ramp /Transfer/ ); %Docstring Sets the source color ramp. + :param ramp: color ramp. Ownership is transferred to the renderer %End @@ -427,6 +337,7 @@ Sets the source color ramp. %Docstring 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 %End @@ -434,6 +345,7 @@ Doesn't alter current breaks. %Docstring Update all the symbols but leave breaks and colors. This method also sets the source symbol for the renderer. + :param sym: source symbol to use for classes. Ownership is not transferred. .. seealso:: :py:func:`setSourceSymbol()` @@ -454,8 +366,6 @@ set varying symbol size for classes %Docstring return the min symbol size when graduated by size -:rtype: float - .. versionadded:: 2.10 %End @@ -463,8 +373,6 @@ return the min symbol size when graduated by size %Docstring return the max symbol size when graduated by size -:rtype: float - .. versionadded:: 2.10 %End @@ -478,8 +386,6 @@ return the max symbol size when graduated by size %Docstring return the method used for graduation (either size or color) -:rtype: GraduatedMethod - .. versionadded:: 2.10 %End @@ -504,8 +410,6 @@ set the method used for graduation (either size or color) %Docstring creates a QgsGraduatedSymbolRenderer from an existing renderer. -:rtype: QgsGraduatedSymbolRenderer - .. versionadded:: 2.6 :return: a new renderer if the conversion was possible, otherwise 0. @@ -529,8 +433,6 @@ size legend. Returns configuration of appearance of legend when using data-defined size for marker symbols. Will return null if the functionality is disabled. -:rtype: QgsDataDefinedSizeLegend - .. versionadded:: 3.0 %End @@ -541,25 +443,17 @@ Will return null if the functionality is disabled. QgsSymbol *symbolForValue( double value ); %Docstring attribute index (derived from attribute name in startRender) - -:rtype: QgsSymbol %End QString legendKeyForValue( double value ) const; %Docstring Returns the matching legend key for a value. - -:rtype: str %End private: QgsGraduatedSymbolRenderer( const QgsGraduatedSymbolRenderer & ); QgsGraduatedSymbolRenderer &operator=( const QgsGraduatedSymbolRenderer & ); -%Docstring - -:rtype: QgsGraduatedSymbolRenderer -%End }; /************************************************************************ diff --git a/python/core/symbology/qgsheatmaprenderer.sip b/python/core/symbology/qgsheatmaprenderer.sip index 18b664d3500f..3657a4df00d5 100644 --- a/python/core/symbology/qgsheatmaprenderer.sip +++ b/python/core/symbology/qgsheatmaprenderer.sip @@ -37,8 +37,6 @@ class QgsHeatmapRenderer : QgsFeatureRenderer %Docstring -:rtype: QgsSymbol - .. note:: symbolForFeature2 in Python bindings @@ -47,8 +45,6 @@ class QgsHeatmapRenderer : QgsFeatureRenderer %Docstring -:rtype: QgsSymbolList - .. note:: symbol2 in Python bindings @@ -60,16 +56,10 @@ class QgsHeatmapRenderer : QgsFeatureRenderer static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Creates a new heatmap renderer instance from XML - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); static QgsHeatmapRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/; -%Docstring - -:rtype: QgsHeatmapRenderer -%End virtual void modifyRequestExtent( QgsRectangle &extent, QgsRenderContext &context ); @@ -80,8 +70,6 @@ Creates a new heatmap renderer instance from XML Returns the color ramp used for shading the heatmap. :return: color ramp for heatmap -:rtype: QgsColorRamp - .. seealso:: :py:func:`setColorRamp` %End @@ -89,6 +77,7 @@ Returns the color ramp used for shading the heatmap. void setColorRamp( QgsColorRamp *ramp /Transfer/ ); %Docstring Sets the color ramp to use for shading the heatmap. + :param ramp: color ramp for heatmap. Ownership of ramp is transferred to the renderer. .. seealso:: :py:func:`colorRamp` @@ -99,8 +88,6 @@ Sets the color ramp to use for shading the heatmap. Returns the radius for the heatmap :return: heatmap radius -:rtype: float - .. seealso:: :py:func:`setRadius` @@ -112,6 +99,7 @@ Returns the radius for the heatmap void setRadius( const double radius ); %Docstring Sets the radius for the heatmap + :param radius: heatmap radius .. seealso:: :py:func:`radius` @@ -126,8 +114,6 @@ Sets the radius for the heatmap Returns the units used for the heatmap's radius :return: units for heatmap radius -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`radius` @@ -139,6 +125,7 @@ Returns the units used for the heatmap's radius void setRadiusUnit( const QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units used for the heatmap's radius + :param unit: units for heatmap radius .. seealso:: :py:func:`radiusUnit` @@ -153,8 +140,6 @@ Sets the units used for the heatmap's radius Returns the map unit scale used for the heatmap's radius :return: map unit scale for heatmap's radius -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`radius` @@ -166,6 +151,7 @@ Returns the map unit scale used for the heatmap's radius void setRadiusMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale used for the heatmap's radius + :param scale: map unit scale for heatmap's radius .. seealso:: :py:func:`setRadius` @@ -180,8 +166,6 @@ Sets the map unit scale used for the heatmap's radius Returns the maximum value used for shading the heatmap. :return: maximum value for heatmap shading. If 0, then maximum value will be automatically -:rtype: float - calculated. .. seealso:: :py:func:`setMaximumValue` @@ -190,6 +174,7 @@ calculated. void setMaximumValue( const double value ); %Docstring Sets the maximum value used for shading the heatmap. + :param value: maximum value for heatmap shading. Set to 0 for automatic calculation of maximum value. @@ -201,8 +186,6 @@ maximum value. Returns the render quality used for drawing the heatmap. :return: render quality. A value of 1 indicates maximum quality, and increasing the -:rtype: float - value will result in faster drawing but lower quality rendering. .. seealso:: :py:func:`setRenderQuality` @@ -211,6 +194,7 @@ value will result in faster drawing but lower quality rendering. void setRenderQuality( const int quality ); %Docstring Sets the render quality used for drawing the heatmap. + :param quality: render quality. A value of 1 indicates maximum quality, and increasing the value will result in faster drawing but lower quality rendering. @@ -222,8 +206,6 @@ value will result in faster drawing but lower quality rendering. Returns the expression used for weighting points when generating the heatmap. :return: point weight expression. If empty, all points are equally weighted. -:rtype: str - .. seealso:: :py:func:`setWeightExpression` %End @@ -231,6 +213,7 @@ Returns the expression used for weighting points when generating the heatmap. void setWeightExpression( const QString &expression ); %Docstring Sets the expression used for weighting points when generating the heatmap. + :param expression: point weight expression. If set to empty, all points are equally weighted. .. seealso:: :py:func:`weightExpression` diff --git a/python/core/symbology/qgsinvertedpolygonrenderer.sip b/python/core/symbology/qgsinvertedpolygonrenderer.sip index 9effa7faf853..869ef6bf8bcf 100644 --- a/python/core/symbology/qgsinvertedpolygonrenderer.sip +++ b/python/core/symbology/qgsinvertedpolygonrenderer.sip @@ -32,6 +32,7 @@ during renderFeature() and rendered on stopRender(). QgsInvertedPolygonRenderer( QgsFeatureRenderer *embeddedRenderer /Transfer/ = 0 ); %Docstring Constructor + :param embeddedRenderer: optional embeddedRenderer. If null, a default one will be assigned. Ownership will be transferred. %End @@ -41,8 +42,6 @@ Ownership will be transferred. %Docstring Direct copies are forbidden. Use clone() instead. - -:rtype: QgsInvertedPolygonRenderer %End virtual void startRender( QgsRenderContext &context, const QgsFields &fields ); @@ -52,6 +51,7 @@ Direct copies are forbidden. Use clone() instead. %Docstring Renders a given feature. This will here collect features. The actual rendering will be postponed to stopRender() + :param feature: the feature to render :param context: the rendering context :param layer: the symbol layer to render, if that makes sense @@ -59,8 +59,6 @@ This will here collect features. The actual rendering will be postponed to stopR :param drawVertexMarker: whether this feature has vertex markers (in edit mode usually) :return: true if the rendering was OK -:rtype: bool - %End virtual void stopRender( QgsRenderContext &context ); @@ -77,78 +75,58 @@ Features collected during renderFeature() are rendered using the embedded featur %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: set of str %End virtual QgsFeatureRenderer::Capabilities capabilities(); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsFeatureRenderer.Capabilities %End virtual QgsSymbolList symbols( QgsRenderContext &context ); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsSymbolList %End virtual QgsSymbol *symbolForFeature( QgsFeature &feature, QgsRenderContext &context ); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsSymbol %End virtual QgsSymbol *originalSymbolForFeature( QgsFeature &feat, QgsRenderContext &context ); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsSymbol %End virtual QgsSymbolList symbolsForFeature( QgsFeature &feat, QgsRenderContext &context ); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsSymbolList %End virtual QgsSymbolList originalSymbolsForFeature( QgsFeature &feat, QgsRenderContext &context ); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsSymbolList %End virtual QgsLegendSymbolList legendSymbolItems() const; %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: QgsLegendSymbolList %End virtual bool willRenderFeature( QgsFeature &feat, QgsRenderContext &context ); %Docstring Proxy that will call this method on the embedded renderer. - -:rtype: bool %End static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Creates a renderer out of an XML, for loading - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); @@ -173,12 +151,11 @@ Creates a renderer out of an XML, for loading %Docstring :return: true if the geometries are to be preprocessed (merged with an union) before rendering. -:rtype: bool - %End void setPreprocessingEnabled( bool enabled ); %Docstring + :param enabled: enables or disables the preprocessing. When enabled, geometries will be merged with an union before being rendered. It allows fixing some rendering artifacts (when rendering overlapping polygons for instance). @@ -189,8 +166,6 @@ This will involve some CPU-demanding computations and is thus disabled by defaul %Docstring Creates a QgsInvertedPolygonRenderer by a conversion from an existing renderer. -:rtype: QgsInvertedPolygonRenderer - .. versionadded:: 2.5 :return: a new renderer if the conversion was possible, otherwise 0. diff --git a/python/core/symbology/qgslegendsymbolitem.sip b/python/core/symbology/qgslegendsymbolitem.sip index b304d9a2d505..b8ba7411e371 100644 --- a/python/core/symbology/qgslegendsymbolitem.sip +++ b/python/core/symbology/qgslegendsymbolitem.sip @@ -44,71 +44,51 @@ Construct item. Does not take ownership of symbol (makes internal clone) QgsSymbol *symbol() const; %Docstring Return associated symbol. May be null. - -:rtype: QgsSymbol %End QString label() const; %Docstring Return text label - -:rtype: str %End QString ruleKey() const; %Docstring Return unique identifier of the rule for identification of the item within renderer - -:rtype: str %End bool isCheckable() const; %Docstring Return whether the item is user-checkable - whether renderer supports enabling/disabling it - -:rtype: bool %End QgsSymbol *legacyRuleKey() const; %Docstring Used for older code that identifies legend entries from symbol pointer within renderer - -:rtype: QgsSymbol %End bool isScaleOK( double scale ) const; %Docstring Determine whether given scale is within the scale range. Returns true if scale or scale range is invalid (value <= 0) - -:rtype: bool %End int scaleMinDenom() const; %Docstring Min scale denominator of the scale range. For range 1:1000 to 1:2000 this will return 1000. Value <= 0 means the range is unbounded on this side - -:rtype: int %End int scaleMaxDenom() const; %Docstring Max scale denominator of the scale range. For range 1:1000 to 1:2000 this will return 2000. Value <= 0 means the range is unbounded on this side - -:rtype: int %End int level() const; %Docstring Indentation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0 - -:rtype: int %End QString parentRuleKey() const; %Docstring Key of the parent legend node. For legends with tree hierarchy -:rtype: str - .. note:: Parameter parentRuleKey added in QGIS 2.8 @@ -133,8 +113,6 @@ Takes ownership of the settings object. %Docstring Returns extra information for data-defined size legend rendering. Normally it returns null. -:rtype: QgsDataDefinedSizeLegend - .. versionadded:: 3.0 %End diff --git a/python/core/symbology/qgslinesymbollayer.sip b/python/core/symbology/qgslinesymbollayer.sip index 2fe0793395a7..1228d130cf86 100644 --- a/python/core/symbology/qgslinesymbollayer.sip +++ b/python/core/symbology/qgslinesymbollayer.sip @@ -24,15 +24,7 @@ class QgsSimpleLineSymbolLayer : QgsLineSymbolLayer static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -77,36 +69,21 @@ class QgsSimpleLineSymbolLayer : QgsLineSymbolLayer Qt::PenStyle penStyle() const; -%Docstring - -:rtype: Qt.PenStyle -%End void setPenStyle( Qt::PenStyle style ); Qt::PenJoinStyle penJoinStyle() const; -%Docstring - -:rtype: Qt.PenJoinStyle -%End void setPenJoinStyle( Qt::PenJoinStyle style ); Qt::PenCapStyle penCapStyle() const; -%Docstring - -:rtype: Qt.PenCapStyle -%End void setPenCapStyle( Qt::PenCapStyle style ); bool useCustomDashPattern() const; -%Docstring - -:rtype: bool -%End void setUseCustomDashPattern( bool b ); void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for lengths used in the custom dash pattern. + :param unit: length units .. seealso:: :py:func:`customDashPatternUnit()` @@ -116,30 +93,16 @@ Sets the units for lengths used in the custom dash pattern. %Docstring Returns the units for lengths used in the custom dash pattern. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setCustomDashPatternUnit()` %End const QgsMapUnitScale &customDashPatternMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setCustomDashPatternMapUnitScale( const QgsMapUnitScale &scale ); QVector customDashVector() const; -%Docstring - -:rtype: list of qreal -%End void setCustomDashVector( const QVector &vector ); bool drawInsidePolygon() const; -%Docstring - -:rtype: bool -%End void setDrawInsidePolygon( bool drawInsidePolygon ); virtual QVector dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const; @@ -191,8 +154,6 @@ Create a new MarkerLineSymbolLayerV2 :param properties: A property map to deserialize saved information from properties() :return: A new MarkerLineSymbolLayerV2 -:rtype: QgsSymbolLayer - %End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; @@ -202,8 +163,6 @@ Create a new MarkerLineSymbolLayerV2 from SLD :param element: An SLD XML DOM element :return: A new MarkerLineSymbolLayerV2 -:rtype: QgsSymbolLayer - %End @@ -255,8 +214,6 @@ Create a new MarkerLineSymbolLayerV2 from SLD Shall the marker be rotated. :return: True if the marker should be rotated. -:rtype: bool - %End void setRotateMarker( bool rotate ); @@ -268,8 +225,6 @@ Shall the marker be rotated. %Docstring Returns the interval between individual markers. Units are specified through intervalUnits(). -:rtype: float - .. seealso:: :py:func:`setInterval()` .. seealso:: :py:func:`intervalUnit()` @@ -278,6 +233,7 @@ Returns the interval between individual markers. Units are specified through int void setInterval( double interval ); %Docstring Sets the interval between individual markers. + :param interval: interval size. Units are specified through setIntervalUnits() .. seealso:: :py:func:`interval()` @@ -288,8 +244,6 @@ Sets the interval between individual markers. Placement placement() const; %Docstring The placement of the markers. - -:rtype: Placement %End void setPlacement( Placement p ); @@ -305,8 +259,6 @@ distance between the marker and the start of the line or the end of the line res This setting has no effect for Vertex or CentralPoint placements. :return: The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit. -:rtype: float - .. versionadded:: 2.3 @@ -323,6 +275,7 @@ Sets the the offset along the line for the marker placement. For Interval placem between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the distance between the marker and the start of the line or the end of the line respectively. This setting has no effect for Vertex or CentralPoint placements. + :param offsetAlongLine: Distance to offset markers along the line. The offset unit is set via setOffsetAlongLineUnit. @@ -340,8 +293,6 @@ unit is set via setOffsetAlongLineUnit. Returns the unit used for calculating the offset along line for markers. :return: Offset along line unit type. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetAlongLineUnit` @@ -351,6 +302,7 @@ Returns the unit used for calculating the offset along line for markers. void setOffsetAlongLineUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the unit used for calculating the offset along line for markers. + :param unit: Offset along line unit type. .. seealso:: :py:func:`offsetAlongLineUnit` @@ -363,19 +315,19 @@ Sets the unit used for calculating the offset along line for markers. Returns the map unit scale used for calculating the offset in map units along line for markers. :return: Offset along line map unit scale. -:rtype: QgsMapUnitScale - %End void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale used for calculating the offset in map units along line for markers. + :param scale: Offset along line map unit scale. %End void setIntervalUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the interval between markers. + :param unit: interval units .. seealso:: :py:func:`intervalUnit()` @@ -387,8 +339,6 @@ Sets the units for the interval between markers. %Docstring Returns the units for the interval between markers. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setIntervalUnit()` .. seealso:: :py:func:`interval()` @@ -396,10 +346,6 @@ Returns the units for the interval between markers. void setIntervalMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &intervalMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -424,10 +370,6 @@ Returns the units for the interval between markers. void renderPolylineVertex( const QPolygonF &points, QgsSymbolRenderContext &context, Placement placement = Vertex ); void renderPolylineCentral( const QPolygonF &points, QgsSymbolRenderContext &context ); double markerAngle( const QPolygonF &points, bool isRing, int vertex ); -%Docstring - -:rtype: float -%End private: diff --git a/python/core/symbology/qgsmarkersymbollayer.sip b/python/core/symbology/qgsmarkersymbollayer.sip index 9d2578d341cb..0f0c1c60fa29 100644 --- a/python/core/symbology/qgsmarkersymbollayer.sip +++ b/python/core/symbology/qgsmarkersymbollayer.sip @@ -54,18 +54,15 @@ leaves the actual drawing of the symbols to subclasses. static QList< QgsSimpleMarkerSymbolLayerBase::Shape > availableShapes(); %Docstring Returns a list of all available shape types. - -:rtype: list of QgsSimpleMarkerSymbolLayerBase.Shape %End static bool shapeIsFilled( QgsSimpleMarkerSymbolLayerBase::Shape shape ); %Docstring Returns true if a symbol shape has a fill. + :param shape: shape to test :return: true if shape uses a fill, or false if shape uses lines only -:rtype: bool - %End QgsSimpleMarkerSymbolLayerBase( QgsSimpleMarkerSymbolLayerBase::Shape shape = Circle, @@ -74,6 +71,7 @@ Returns true if a symbol shape has a fill. QgsSymbol::ScaleMethod scaleMethod = DEFAULT_SCALE_METHOD ); %Docstring Constructor for QgsSimpleMarkerSymbolLayerBase. + :param shape: symbol shape for markers :param size: symbol size (in mm) :param angle: symbol rotation angle @@ -84,14 +82,13 @@ Constructor for QgsSimpleMarkerSymbolLayerBase. %Docstring Returns the shape for the rendered marker symbol. -:rtype: QgsSimpleMarkerSymbolLayerBase.Shape - .. seealso:: :py:func:`setShape()` %End void setShape( QgsSimpleMarkerSymbolLayerBase::Shape shape ); %Docstring Sets the rendered marker shape. + :param shape: new marker shape .. seealso:: :py:func:`shape()` @@ -101,12 +98,11 @@ Sets the rendered marker shape. %Docstring Attempts to decode a string representation of a shape name to the corresponding shape. + :param name: encoded shape name :param ok: if specified, will be set to true if shape was successfully decoded :return: decoded name -:rtype: QgsSimpleMarkerSymbolLayerBase.Shape - .. seealso:: :py:func:`encodeShape()` %End @@ -114,11 +110,10 @@ shape. static QString encodeShape( QgsSimpleMarkerSymbolLayerBase::Shape shape ); %Docstring Encodes a shape to its string representation. + :param shape: shape to encode :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeShape()` %End @@ -138,8 +133,6 @@ Encodes a shape to its string representation. %Docstring Prepares the layer for drawing the specified shape (QPolygonF version) -:rtype: bool - .. note:: not available in Python bindings @@ -149,8 +142,6 @@ Prepares the layer for drawing the specified shape (QPolygonF version) %Docstring Prepares the layer for drawing the specified shape (QPainterPath version) -:rtype: bool - .. note:: not available in Python bindings @@ -159,12 +150,11 @@ Prepares the layer for drawing the specified shape (QPainterPath version) bool shapeToPolygon( Shape shape, QPolygonF &polygon ) const; %Docstring Creates a polygon representing the specified shape. + :param shape: shape to create :param polygon: destination polygon for shape :return: true if shape was successfully stored in polygon -:rtype: bool - .. note:: @@ -174,12 +164,11 @@ Creates a polygon representing the specified shape. double calculateSize( QgsSymbolRenderContext &context, bool &hasDataDefinedSize ) const; %Docstring Calculates the desired size of the marker, considering data defined size overrides. + :param context: symbol render context :param hasDataDefinedSize: will be set to true if marker uses data defined sizes :return: marker size, in original size units -:rtype: float - .. note:: @@ -189,6 +178,7 @@ Calculates the desired size of the marker, considering data defined size overrid void calculateOffsetAndRotation( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedRotation, QPointF &offset, double &angle ) const; %Docstring Calculates the marker offset and rotation. + :param context: symbol render context :param scaledSize: size of symbol to render :param hasDataDefinedRotation: will be set to true if marker has data defined rotation @@ -207,6 +197,7 @@ Calculates the marker offset and rotation. virtual void draw( QgsSymbolRenderContext &context, QgsSimpleMarkerSymbolLayerBase::Shape shape, const QPolygonF &polygon, const QPainterPath &path ) = 0 ; %Docstring Derived classes must implement draw() to handle drawing the generated shape onto the painter surface. + :param context: symbol render context :param shape: shape to draw :param polygon: polygon representing transformed marker shape. May be empty, in which case the shape will be specified @@ -235,6 +226,7 @@ class QgsSimpleMarkerSymbolLayer : QgsSimpleMarkerSymbolLayerBase Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEMARKER_JOINSTYLE ); %Docstring Constructor for QgsSimpleMarkerSymbolLayer. + :param shape: symbol shape :param size: symbol size (in mm) :param angle: symbol rotation angle @@ -248,21 +240,19 @@ Constructor for QgsSimpleMarkerSymbolLayer. static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; %Docstring Creates a new QgsSimpleMarkerSymbolLayer. + :param properties: a property map containing symbol properties (see properties()) :return: new QgsSimpleMarkerSymbolLayer -:rtype: QgsSymbolLayer - %End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; %Docstring Creates a new QgsSimpleMarkerSymbolLayer from an SLD XML element. + :param element: XML element containing SLD definition of symbol :return: new QgsSimpleMarkerSymbolLayer -:rtype: QgsSymbolLayer - %End @@ -304,8 +294,6 @@ Creates a new QgsSimpleMarkerSymbolLayer from an SLD XML element. %Docstring Returns the marker's stroke color. -:rtype: QColor - .. seealso:: :py:func:`setStrokeColor()` .. seealso:: :py:func:`strokeStyle()` @@ -316,6 +304,7 @@ Returns the marker's stroke color. virtual void setStrokeColor( const QColor &color ); %Docstring Sets the marker's stroke color. + :param color: stroke color .. seealso:: :py:func:`strokeColor()` @@ -329,8 +318,6 @@ Sets the marker's stroke color. %Docstring Returns the marker's stroke style (e.g., solid, dashed, etc) -:rtype: Qt.PenStyle - .. versionadded:: 2.4 .. seealso:: :py:func:`setStrokeStyle()` @@ -343,6 +330,7 @@ Returns the marker's stroke style (e.g., solid, dashed, etc) void setStrokeStyle( Qt::PenStyle strokeStyle ); %Docstring Sets the marker's stroke style (e.g., solid, dashed, etc) + :param strokeStyle: style .. versionadded:: 2.4 @@ -358,8 +346,6 @@ Sets the marker's stroke style (e.g., solid, dashed, etc) %Docstring Returns the marker's stroke join style (e.g., miter, bevel, etc). -:rtype: Qt.PenJoinStyle - .. versionadded:: 2.16 .. seealso:: :py:func:`setPenJoinStyle()` @@ -372,6 +358,7 @@ Returns the marker's stroke join style (e.g., miter, bevel, etc). void setPenJoinStyle( Qt::PenJoinStyle style ); %Docstring Sets the marker's stroke join style (e.g., miter, bevel, etc). + :param style: join style .. versionadded:: 2.16 @@ -387,8 +374,6 @@ Sets the marker's stroke join style (e.g., miter, bevel, etc). %Docstring Returns the width of the marker's stroke. -:rtype: float - .. seealso:: :py:func:`setStrokeWidth()` .. seealso:: :py:func:`strokeWidthUnit()` @@ -399,6 +384,7 @@ Returns the width of the marker's stroke. void setStrokeWidth( double w ); %Docstring Sets the width of the marker's stroke. + :param w: stroke width. See strokeWidthUnit() for units. .. seealso:: :py:func:`strokeWidth()` @@ -411,6 +397,7 @@ Sets the width of the marker's stroke. void setStrokeWidthUnit( QgsUnitTypes::RenderUnit u ); %Docstring Sets the unit for the width of the marker's stroke. + :param u: stroke width unit .. seealso:: :py:func:`strokeWidthUnit()` @@ -424,8 +411,6 @@ Sets the unit for the width of the marker's stroke. %Docstring Returns the unit for the width of the marker's stroke. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setStrokeWidthUnit()` .. seealso:: :py:func:`strokeWidth()` @@ -436,6 +421,7 @@ Returns the unit for the width of the marker's stroke. void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map scale for the width of the marker's stroke. + :param scale: stroke width map unit scale .. seealso:: :py:func:`strokeWidthMapUnitScale()` @@ -449,8 +435,6 @@ Sets the map scale for the width of the marker's stroke. %Docstring Returns the map scale for the width of the marker's stroke. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setStrokeWidthMapUnitScale()` .. seealso:: :py:func:`strokeWidth()` @@ -463,6 +447,7 @@ Returns the map scale for the width of the marker's stroke. void drawMarker( QPainter *p, QgsSymbolRenderContext &context ); %Docstring Draws the marker shape in the specified painter. + :param p: destination QPainter :param context: symbol context @@ -476,8 +461,6 @@ Draws the marker shape in the specified painter. Prepares cache image :return: true in case of success, false if cache image size too large -:rtype: bool - %End @@ -508,6 +491,7 @@ the symbol to support advanced styling of the interior and stroke of the shape. QgsSymbol::ScaleMethod scaleMethod = DEFAULT_SCALE_METHOD ); %Docstring Constructor for QgsFilledMarkerSymbolLayer. + :param shape: symbol shape :param size: symbol size (in mm) :param angle: symbol rotation angle @@ -517,11 +501,10 @@ Constructor for QgsFilledMarkerSymbolLayer. static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; %Docstring Creates a new QgsFilledMarkerSymbolLayer. + :param properties: a property map containing symbol properties (see properties()) :return: new QgsFilledMarkerSymbolLayer -:rtype: QgsSymbolLayer - %End virtual QString layerType() const; @@ -572,15 +555,7 @@ Constructs SVG marker symbol layer with picture from given absolute path to a SV static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving ); %Docstring @@ -616,14 +591,13 @@ Used internally when reading/writing symbols. %Docstring Returns the marker SVG path. -:rtype: str - .. seealso:: :py:func:`setPath()` %End void setPath( const QString &path ); %Docstring Set the marker SVG path. + :param path: SVG path .. seealso:: :py:func:`path()` @@ -633,8 +607,6 @@ Set the marker SVG path. %Docstring Returns the default marker aspect ratio between width and height, 0 if not yet calculated. -:rtype: float - .. seealso:: :py:func:`updateDefaultAspectRatio()` %End @@ -643,8 +615,6 @@ Returns the default marker aspect ratio between width and height, 0 if not yet c Calculates the default marker aspect ratio between width and height. :return: the default aspect ratio value -:rtype: float - .. seealso:: :py:func:`defaultAspectRatio()` %End @@ -653,19 +623,16 @@ Calculates the default marker aspect ratio between width and height. %Docstring Returns the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0. -:rtype: bool - .. seealso:: :py:func:`setPreservedAspectRatio()` %End bool setPreservedAspectRatio( bool par ); %Docstring Set preserved the marker aspect ratio between width and height. + :param par: Preserved Aspect Ratio :return: the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0 -:rtype: bool - .. seealso:: :py:func:`preservedAspectRatio()` %End @@ -675,8 +642,6 @@ Set preserved the marker aspect ratio between width and height. Returns the marker aspect ratio between width and height to be used in rendering, if the value set is lower or equal to 0 the aspect ratio will be preserved in rendering -:rtype: float - .. seealso:: :py:func:`setFixedAspectRatio()` %End @@ -684,6 +649,7 @@ if the value set is lower or equal to 0 the aspect ratio will be preserved in re %Docstring Set the marker aspect ratio between width and height to be used in rendering, if the value set is lower or equal to 0 the aspect ratio will be preserved in rendering + :param ratio: Fixed Aspect Ratio .. seealso:: :py:func:`fixedAspectRatio()` @@ -696,15 +662,12 @@ if the value set is lower or equal to 0 the aspect ratio will be preserved in re virtual void setStrokeColor( const QColor &c ); double strokeWidth() const; -%Docstring - -:rtype: float -%End void setStrokeWidth( double w ); void setStrokeWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the stroke width. + :param unit: width units .. seealso:: :py:func:`strokeWidthUnit()` @@ -714,17 +677,11 @@ Sets the units for the stroke width. %Docstring Returns the units for the stroke width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`strokeWidthUnit()` %End void setStrokeWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &strokeWidthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -747,12 +704,11 @@ Returns the units for the stroke width. double calculateAspectRatio( QgsSymbolRenderContext &context, double scaledSize, bool &hasDataDefinedAspectRatio ) const; %Docstring Calculates the marker aspect ratio between width and height. + :param context: symbol render context :param scaledSize: size of symbol to render :param hasDataDefinedAspectRatio: will be set to true if marker has data defined aspectRatio -:rtype: float - .. note:: not available in Python bindings @@ -783,15 +739,7 @@ class QgsFontMarkerSymbolLayer : QgsMarkerSymbolLayer static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -817,17 +765,9 @@ class QgsFontMarkerSymbolLayer : QgsMarkerSymbolLayer QString fontFamily() const; -%Docstring - -:rtype: str -%End void setFontFamily( const QString &family ); QChar character() const; -%Docstring - -:rtype: QChar -%End void setCharacter( QChar ch ); virtual QColor strokeColor() const; @@ -837,8 +777,6 @@ class QgsFontMarkerSymbolLayer : QgsMarkerSymbolLayer %Docstring Get stroke width. -:rtype: float - .. versionadded:: 2.16 %End @@ -853,8 +791,6 @@ Set stroke width. %Docstring Get stroke width unit. -:rtype: QgsUnitTypes.RenderUnit - .. versionadded:: 2.16 %End @@ -869,8 +805,6 @@ Set stroke width unit. %Docstring Get stroke width map unit scale. -:rtype: QgsMapUnitScale - .. versionadded:: 2.16 %End @@ -885,8 +819,6 @@ Set stroke width map unit scale. %Docstring Get stroke join style. -:rtype: Qt.PenJoinStyle - .. versionadded:: 2.16 %End diff --git a/python/core/symbology/qgsnullsymbolrenderer.sip b/python/core/symbology/qgsnullsymbolrenderer.sip index d108a002f7c9..8bcd89d8671d 100644 --- a/python/core/symbology/qgsnullsymbolrenderer.sip +++ b/python/core/symbology/qgsnullsymbolrenderer.sip @@ -48,12 +48,11 @@ and diagrams for the layer. Selected features will also be drawn with a default static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Creates a null renderer from XML element. + :param element: DOM element :param context: reading context :return: new null symbol renderer -:rtype: QgsFeatureRenderer - %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); @@ -62,11 +61,10 @@ Creates a null renderer from XML element. static QgsNullSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/; %Docstring Creates a QgsNullSymbolRenderer from an existing renderer. + :param renderer: renderer to convert from :return: a new renderer if the conversion was possible, otherwise None. -:rtype: QgsNullSymbolRenderer - %End }; diff --git a/python/core/symbology/qgspointclusterrenderer.sip b/python/core/symbology/qgspointclusterrenderer.sip index 5ad92ee6d14d..78b0e04b84d0 100644 --- a/python/core/symbology/qgspointclusterrenderer.sip +++ b/python/core/symbology/qgspointclusterrenderer.sip @@ -38,22 +38,19 @@ A renderer that automatically clusters points with the same geographic position. static QgsFeatureRenderer *create( QDomElement &symbologyElem, const QgsReadWriteContext &context ) /Factory/; %Docstring Creates a renderer from XML element - -:rtype: QgsFeatureRenderer %End QgsMarkerSymbol *clusterSymbol(); %Docstring Returns the symbol used for rendering clustered groups (but not ownership of the symbol). -:rtype: QgsMarkerSymbol - .. seealso:: :py:func:`setClusterSymbol()` %End void setClusterSymbol( QgsMarkerSymbol *symbol /Transfer/ ); %Docstring Sets the symbol for rendering clustered groups. + :param symbol: new cluster symbol. Ownership is transferred to the renderer. .. seealso:: :py:func:`clusterSymbol()` @@ -64,17 +61,11 @@ Sets the symbol for rendering clustered groups. Creates a QgsPointClusterRenderer from an existing renderer. :return: a new renderer if the conversion was possible, otherwise None. -:rtype: QgsPointClusterRenderer - %End private: QgsPointClusterRenderer( const QgsPointClusterRenderer & ); QgsPointClusterRenderer &operator=( const QgsPointClusterRenderer & ); -%Docstring - -:rtype: QgsPointClusterRenderer -%End virtual void drawGroup( QPointF centerPoint, QgsRenderContext &context, const QgsPointDistanceRenderer::ClusteredGroup &group ) ; }; diff --git a/python/core/symbology/qgspointdisplacementrenderer.sip b/python/core/symbology/qgspointdisplacementrenderer.sip index 50ab8eb6c97d..6e7b739232d9 100644 --- a/python/core/symbology/qgspointdisplacementrenderer.sip +++ b/python/core/symbology/qgspointdisplacementrenderer.sip @@ -30,6 +30,7 @@ A renderer that automatically displaces points with the same geographic location QgsPointDisplacementRenderer( const QString &labelAttributeName = QString() ); %Docstring Constructor for QgsPointDisplacementRenderer. + :param labelAttributeName: optional attribute name for labeling points %End @@ -47,13 +48,12 @@ Constructor for QgsPointDisplacementRenderer. static QgsFeatureRenderer *create( QDomElement &symbologyElem, const QgsReadWriteContext &context ) /Factory/; %Docstring Create a renderer from XML element - -:rtype: QgsFeatureRenderer %End void setCircleWidth( double width ); %Docstring Sets the line width for the displacement group circle. + :param width: line width in mm .. seealso:: :py:func:`circleWidth()` @@ -65,8 +65,6 @@ Sets the line width for the displacement group circle. %Docstring Returns the line width for the displacement group circle in mm. -:rtype: float - .. seealso:: :py:func:`setCircleWidth()` .. seealso:: :py:func:`circleColor()` @@ -75,6 +73,7 @@ Returns the line width for the displacement group circle in mm. void setCircleColor( const QColor &color ); %Docstring Sets the color used for drawing the displacement group circle. + :param color: circle color .. seealso:: :py:func:`circleColor()` @@ -86,8 +85,6 @@ Sets the color used for drawing the displacement group circle. %Docstring Returns the color used for drawing the displacement group circle. -:rtype: QColor - .. seealso:: :py:func:`setCircleColor()` .. seealso:: :py:func:`circleWidth()` @@ -96,6 +93,7 @@ Returns the color used for drawing the displacement group circle. void setCircleRadiusAddition( double distance ); %Docstring Sets a factor for increasing the ring size of displacement groups. + :param distance: addition factor .. seealso:: :py:func:`circleRadiusAddition()` @@ -105,8 +103,6 @@ Sets a factor for increasing the ring size of displacement groups. %Docstring Returns the factor for increasing the ring size of displacement groups. -:rtype: float - .. seealso:: :py:func:`setCircleRadiusAddition()` %End @@ -114,8 +110,6 @@ Returns the factor for increasing the ring size of displacement groups. %Docstring Returns the placement method used for dispersing the points. -:rtype: Placement - .. seealso:: :py:func:`setPlacement()` .. versionadded:: 2.12 @@ -124,6 +118,7 @@ Returns the placement method used for dispersing the points. void setPlacement( Placement placement ); %Docstring Sets the placement method used for dispersing the points. + :param placement: placement method .. seealso:: :py:func:`placement()` @@ -135,14 +130,13 @@ Sets the placement method used for dispersing the points. %Docstring Returns the symbol for the center of a displacement group (but not ownership of the symbol). -:rtype: QgsMarkerSymbol - .. seealso:: :py:func:`setCenterSymbol()` %End void setCenterSymbol( QgsMarkerSymbol *symbol /Transfer/ ); %Docstring Sets the center symbol for a displacement group. + :param symbol: new center symbol. Ownership is transferred to the renderer. .. seealso:: :py:func:`centerSymbol()` @@ -152,8 +146,6 @@ Sets the center symbol for a displacement group. %Docstring Creates a QgsPointDisplacementRenderer from an existing renderer. -:rtype: QgsPointDisplacementRenderer - .. versionadded:: 2.5 :return: a new renderer if the conversion was possible, otherwise None. @@ -162,10 +154,6 @@ Creates a QgsPointDisplacementRenderer from an existing renderer. private: QgsPointDisplacementRenderer( const QgsPointDisplacementRenderer & ); QgsPointDisplacementRenderer &operator=( const QgsPointDisplacementRenderer & ); -%Docstring - -:rtype: QgsPointDisplacementRenderer -%End virtual void drawGroup( QPointF centerPoint, QgsRenderContext &context, const QgsPointDistanceRenderer::ClusteredGroup &group ) ; }; diff --git a/python/core/symbology/qgspointdistancerenderer.sip b/python/core/symbology/qgspointdistancerenderer.sip index 2fab18eec361..c0c82df6ccf1 100644 --- a/python/core/symbology/qgspointdistancerenderer.sip +++ b/python/core/symbology/qgspointdistancerenderer.sip @@ -33,6 +33,7 @@ in the desired style. GroupedFeature( const QgsFeature &feature, QgsMarkerSymbol *symbol /Transfer/, bool isSelected, const QString &label = QString() ); %Docstring Constructor for GroupedFeature. + :param feature: feature :param symbol: base symbol for rendering feature (owned by GroupedFeature) :param isSelected: set to true if feature is selected and should be rendered in a selected state @@ -47,8 +48,6 @@ Feature QgsMarkerSymbol *symbol() const; %Docstring Base symbol for rendering feature - -:rtype: QgsMarkerSymbol %End bool isSelected; @@ -68,6 +67,7 @@ Optional label text QgsPointDistanceRenderer( const QString &rendererName, const QString &labelAttributeName = QString() ); %Docstring Constructor for QgsPointDistanceRenderer. + :param rendererName: name of renderer for registry :param labelAttributeName: optional attribute for labeling points %End @@ -118,6 +118,7 @@ Constructor for QgsPointDistanceRenderer. void setLabelAttributeName( const QString &name ); %Docstring Sets the attribute name for labeling points. + :param name: attribute name, or empty string to avoid labeling features by the renderer .. seealso:: :py:func:`labelAttributeName()` @@ -134,8 +135,6 @@ Sets the attribute name for labeling points. Returns the attribute name used for labeling points, or an empty string if no labeling will be done by the renderer. -:rtype: str - .. seealso:: :py:func:`setLabelAttributeName()` .. seealso:: :py:func:`labelFont()` @@ -148,6 +147,7 @@ will be done by the renderer. void setLabelFont( const QFont &font ); %Docstring Sets the font used for labeling points. + :param font: label font .. seealso:: :py:func:`labelFont()` @@ -161,8 +161,6 @@ Sets the font used for labeling points. %Docstring Returns the font used for labeling points. -:rtype: QFont - .. seealso:: :py:func:`setLabelFont()` .. seealso:: :py:func:`labelAttributeName()` @@ -185,8 +183,6 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma Returns the minimum map scale (i.e. most "zoomed out") at which points should be labeled by the renderer. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setMinimumLabelScale()` .. seealso:: :py:func:`labelAttributeName()` @@ -195,6 +191,7 @@ The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. void setLabelColor( const QColor &color ); %Docstring Sets the color to use for for labeling points. + :param color: label color .. seealso:: :py:func:`labelColor()` @@ -208,8 +205,6 @@ Sets the color to use for for labeling points. %Docstring Returns the color used for for labeling points. -:rtype: QColor - .. seealso:: :py:func:`setLabelColor()` .. seealso:: :py:func:`labelAttributeName()` @@ -221,6 +216,7 @@ Returns the color used for for labeling points. %Docstring Sets the tolerance distance for grouping points. Units are specified using setToleranceUnit(). + :param distance: tolerance distance .. seealso:: :py:func:`tolerance()` @@ -233,8 +229,6 @@ setToleranceUnit(). Returns the tolerance distance for grouping points. Units are retrieved using toleranceUnit(). -:rtype: float - .. seealso:: :py:func:`setTolerance()` .. seealso:: :py:func:`toleranceUnit()` @@ -243,6 +237,7 @@ toleranceUnit(). void setToleranceUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the tolerance distance. + :param unit: tolerance distance units .. seealso:: :py:func:`setTolerance()` @@ -256,8 +251,6 @@ Sets the units for the tolerance distance. %Docstring Returns the units for the tolerance distance. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`tolerance()` .. seealso:: :py:func:`setToleranceUnit()` @@ -269,6 +262,7 @@ Returns the units for the tolerance distance. %Docstring Sets the map unit scale object for the distance tolerance. This is only used if the toleranceUnit() is set to QgsUnitTypes.RenderMapUnits. + :param scale: scale for distance tolerance .. seealso:: :py:func:`toleranceMapUnitScale()` @@ -281,8 +275,6 @@ toleranceUnit() is set to QgsUnitTypes.RenderMapUnits. Returns the map unit scale object for the distance tolerance. This is only used if the toleranceUnit() is set to QgsUnitTypes.RenderMapUnits. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setToleranceMapUnitScale()` .. seealso:: :py:func:`toleranceUnit()` @@ -302,6 +294,7 @@ toleranceUnit() is set to QgsUnitTypes.RenderMapUnits. void drawLabels( QPointF centerPoint, QgsSymbolRenderContext &context, const QList &labelShifts, const ClusteredGroup &group ); %Docstring Renders the labels for a group. + :param centerPoint: center point of group :param context: destination render context :param labelShifts: displacement for individual label positions @@ -316,6 +309,7 @@ Renders the labels for a group. virtual void drawGroup( QPointF centerPoint, QgsRenderContext &context, const ClusteredGroup &group ) = 0 ; %Docstring Draws a group of clustered points. + :param centerPoint: central point (geographic centroid) of all points contained within the cluster :param context: destination render context :param group: contents of group diff --git a/python/core/symbology/qgsrenderer.sip b/python/core/symbology/qgsrenderer.sip index c6adf8877635..72bc2f40ea50 100644 --- a/python/core/symbology/qgsrenderer.sip +++ b/python/core/symbology/qgsrenderer.sip @@ -26,15 +26,7 @@ class QgsSymbolLevelItem public: QgsSymbolLevelItem( QgsSymbol *symbol, int layer ); QgsSymbol *symbol(); -%Docstring - -:rtype: QgsSymbol -%End int layer(); -%Docstring - -:rtype: int -%End protected: }; @@ -79,27 +71,20 @@ class QgsFeatureRenderer static QgsFeatureRenderer *defaultRenderer( QgsWkbTypes::GeometryType geomType ) /Factory/; %Docstring return a new renderer - used by default in vector layers - -:rtype: QgsFeatureRenderer %End QString type() const; -%Docstring - -:rtype: str -%End virtual QgsSymbol *symbolForFeature( QgsFeature &feature, QgsRenderContext &context ) = 0; %Docstring To be overridden Must be called between startRender() and stopRender() calls. + :param feature: feature :param context: render context :return: returns pointer to symbol or 0 if symbol was not found -:rtype: QgsSymbol - .. versionadded:: 2.12 %End @@ -110,8 +95,6 @@ Return symbol for feature. The difference compared to symbolForFeature() is that symbol which can be used as an identifier for renderer's rule - the former may return a temporary replacement of a symbol for use in rendering. -:rtype: QgsSymbol - .. versionadded:: 2.12 %End @@ -119,8 +102,6 @@ of a symbol for use in rendering. %Docstring Return legend keys matching a specified feature. -:rtype: set of str - .. versionadded:: 2.14 %End @@ -161,8 +142,6 @@ You do not need to specify the extent in here, this is taken care of separately will be combined with a filter returned from this method. :return: An expression used as where clause -:rtype: str - %End virtual QSet usedAttributes( const QgsRenderContext &context ) const = 0; @@ -171,15 +150,11 @@ Return a list of attributes required by this renderer. Attributes not listed in not have been requested from the provider at rendering time. :return: A set of attributes -:rtype: set of str - %End virtual bool filterNeedsGeometry() const; %Docstring Returns true if this renderer requires the geometry to apply the filter. - -:rtype: bool %End virtual ~QgsFeatureRenderer(); @@ -190,8 +165,6 @@ Create a deep copy of this renderer. Should be implemented by all subclasses and generate a proper subclass. :return: A copy of this renderer -:rtype: QgsFeatureRenderer - %End virtual bool renderFeature( QgsFeature &feature, QgsRenderContext &context, int layer = -1, bool selected = false, bool drawVertexMarker = false ); @@ -205,8 +178,6 @@ to determine whether the feature may be labelled). If layer is not -1, the renderer should draw only a particula layer from symbols (in order to support symbol level rendering). -:rtype: bool - .. seealso:: :py:func:`startRender()` .. seealso:: :py:func:`stopRender()` @@ -215,8 +186,6 @@ If layer is not -1, the renderer should draw only a particula layer from symbols virtual QString dump() const; %Docstring Returns debug information about this renderer - -:rtype: str %End enum Capability @@ -242,47 +211,34 @@ deal_with_my_feature() else: skip_the_curren_feature() ~~~ - -:rtype: QgsFeatureRenderer.Capabilities %End virtual QgsSymbolList symbols( QgsRenderContext &context ); %Docstring Returns list of symbols used by the renderer. -:param context: render context -:rtype: QgsSymbolList +:param context: render context .. versionadded:: 2.12 %End bool usingSymbolLevels() const; -%Docstring - -:rtype: bool -%End void setUsingSymbolLevels( bool usingSymbolLevels ); static QgsFeatureRenderer *load( QDomElement &symbologyElem, const QgsReadWriteContext &context ) /Factory/; %Docstring create a renderer from XML element - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); %Docstring store renderer info to XML element - -:rtype: QDomElement %End virtual QDomElement writeSld( QDomDocument &doc, const QString &styleName, const QgsStringMap &props = QgsStringMap() ) const; %Docstring create the SLD UserStyle element following the SLD v1.1 specs with the given name -:rtype: QDomElement - .. versionadded:: 2.8 %End @@ -290,6 +246,7 @@ create the SLD UserStyle element following the SLD v1.1 specs with the given nam %Docstring Create a new renderer according to the information contained in the UserStyle element of a SLD style document + :param node: the node in the SLD document whose the UserStyle element is a child :param geomType: the geometry type of the features, used to convert @@ -298,8 +255,6 @@ Symbolizer elements went wrong :return: the renderer -:rtype: QgsFeatureRenderer - %End virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const; @@ -311,8 +266,6 @@ used from subclasses to create SLD Rule elements following SLD v1.1 specs %Docstring items of symbology items in legend should be checkable -:rtype: bool - .. versionadded:: 2.5 %End @@ -320,8 +273,6 @@ items of symbology items in legend should be checkable %Docstring items of symbology items in legend is checked -:rtype: bool - .. versionadded:: 2.5 %End @@ -335,6 +286,7 @@ item in symbology was checked virtual void setLegendSymbolItem( const QString &key, QgsSymbol *symbol /Transfer/ ); %Docstring Sets the symbol to be used for a legend symbol item. + :param key: rule key for legend symbol :param symbol: new symbol for legend item. Ownership is transferred to renderer. @@ -345,8 +297,6 @@ Sets the symbol to be used for a legend symbol item. %Docstring Returns a list of symbology items for the legend -:rtype: QgsLegendSymbolList - .. versionadded:: 2.6 %End @@ -354,8 +304,6 @@ Returns a list of symbology items for the legend %Docstring If supported by the renderer, return classification attribute for the use in legend -:rtype: str - .. versionadded:: 2.6 %End @@ -370,8 +318,6 @@ Returns whether the renderer will render a feature or not. Must be called between startRender() and stopRender() calls. Default implementation uses symbolForFeature(). -:rtype: bool - .. versionadded:: 2.12 %End @@ -381,8 +327,6 @@ Returns list of symbols used for rendering the feature. For renderers that do not support MoreSymbolsPerFeature it is more efficient to use symbolForFeature() -:rtype: QgsSymbolList - .. versionadded:: 2.12 %End @@ -391,14 +335,13 @@ to use symbolForFeature() Equivalent of originalSymbolsForFeature() call extended to support renderers that may use more symbols per feature - similar to symbolsForFeature() -:rtype: QgsSymbolList - .. versionadded:: 2.12 %End virtual void modifyRequestExtent( QgsRectangle &extent, QgsRenderContext &context ); %Docstring Allows for a renderer to modify the extent of a feature request prior to rendering + :param extent: reference to request's filter extent. Modify extent to change the extent of feature request :param context: render context @@ -411,8 +354,6 @@ extent of feature request Returns the current paint effect for the renderer. :return: paint effect -:rtype: QgsPaintEffect - .. versionadded:: 2.9 @@ -422,6 +363,7 @@ Returns the current paint effect for the renderer. void setPaintEffect( QgsPaintEffect *effect ); %Docstring Sets the current paint effect for the renderer. + :param effect: paint effect. Ownership is transferred to the renderer. .. versionadded:: 2.9 @@ -433,8 +375,6 @@ Sets the current paint effect for the renderer. %Docstring Returns whether the renderer must render as a raster. -:rtype: bool - .. versionadded:: 2.12 .. seealso:: :py:func:`setForceRasterRender` @@ -443,6 +383,7 @@ Returns whether the renderer must render as a raster. void setForceRasterRender( bool forceRaster ); %Docstring Sets whether the renderer should be rendered to a raster destination. + :param forceRaster: set to true if renderer must be drawn on a raster surface. This may be desirable for highly detailed layers where rendering as a vector would result in a large, complex vector output. @@ -456,8 +397,6 @@ would result in a large, complex vector output. %Docstring Get the order in which features shall be processed by this renderer. -:rtype: QgsFeatureRequest.OrderBy - .. versionadded:: 2.14 .. note:: @@ -484,8 +423,6 @@ Define the order in which features shall be processed by this renderer. %Docstring Returns whether custom ordering will be applied before features are processed by this renderer. -:rtype: bool - .. versionadded:: 2.14 .. seealso:: :py:func:`orderBy()` @@ -496,6 +433,7 @@ Returns whether custom ordering will be applied before features are processed by void setOrderByEnabled( bool enabled ); %Docstring Sets whether custom ordering should be applied before features are processed by this renderer. + :param enabled: set to true to enable custom feature ordering .. versionadded:: 2.14 @@ -509,6 +447,7 @@ Sets whether custom ordering should be applied before features are processed by %Docstring Sets an embedded renderer (subrenderer) for this feature renderer. The base class implementation does nothing with subrenderers, but individual derived classes can use these to modify their behavior. + :param subRenderer: the embedded renderer. Ownership will be transferred. .. seealso:: :py:func:`embeddedRenderer()` @@ -521,8 +460,6 @@ does nothing with subrenderers, but individual derived classes can use these to Returns the current embedded renderer (subrenderer) for this feature renderer. The base class implementation does not use subrenderers and will always return null. -:rtype: QgsFeatureRenderer - .. seealso:: :py:func:`setEmbeddedRenderer()` .. versionadded:: 2.16 @@ -555,8 +492,6 @@ render editing vertex marker for a polygon %Docstring Creates a point in screen coordinates from a wkb string in map coordinates - -:rtype: QPointF %End void copyRendererData( QgsFeatureRenderer *destRenderer ) const; @@ -597,10 +532,6 @@ level DataDefined angle private: QgsFeatureRenderer( const QgsFeatureRenderer & ); QgsFeatureRenderer &operator=( const QgsFeatureRenderer & ); -%Docstring - -:rtype: QgsFeatureRenderer -%End }; QFlags operator|(QgsFeatureRenderer::Capability f1, QFlags f2); diff --git a/python/core/symbology/qgsrendererregistry.sip b/python/core/symbology/qgsrendererregistry.sip index 1f1d8d4685e9..eb1e85d45919 100644 --- a/python/core/symbology/qgsrendererregistry.sip +++ b/python/core/symbology/qgsrendererregistry.sip @@ -40,29 +40,15 @@ In C++ you can use QgsRendererMetadata convenience class. virtual ~QgsRendererAbstractMetadata(); QString name() const; -%Docstring - -:rtype: str -%End QString visibleName() const; -%Docstring - -:rtype: str -%End QIcon icon() const; -%Docstring - -:rtype: QIcon -%End void setIcon( const QIcon &icon ); virtual QgsRendererAbstractMetadata::LayerTypes compatibleLayerTypes() const; %Docstring Returns flags indicating the types of layer the renderer is compatible with. -:rtype: QgsRendererAbstractMetadata.LayerTypes - .. versionadded:: 2.16 %End @@ -70,8 +56,6 @@ Returns flags indicating the types of layer the renderer is compatible with. %Docstring Return new instance of the renderer given the DOM element. Returns NULL on error. Pure virtual function: must be implemented in derived classes. * - -:rtype: QgsFeatureRenderer %End virtual QgsRendererWidget *createRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *oldRenderer ) /Factory/; @@ -82,15 +66,9 @@ The ``oldRenderer`` argument may refer to previously used renderer (or it is nul If not null, it may be used to initialize GUI of the widget from the previous settings. The old renderer does not have to be of the same type as returned by createRenderer(). When using ``oldRenderer`` make sure to make a copy of it - it will be deleted afterwards. - -:rtype: QgsRendererWidget %End virtual QgsFeatureRenderer *createRendererFromSld( QDomElement &elem, QgsWkbTypes::GeometryType geomType ) /Factory/; -%Docstring - -:rtype: QgsFeatureRenderer -%End protected: }; @@ -151,22 +129,20 @@ QgsApplication.rendererRegistry(). bool addRenderer( QgsRendererAbstractMetadata *metadata /Transfer/ ); %Docstring Adds a renderer to the registry. Takes ownership of the metadata object. + :param metadata: renderer metadata :return: true if renderer was added successfully, or false if renderer could not -:rtype: bool - be added (e.g., a renderer with a duplicate name already exists) %End bool removeRenderer( const QString &rendererName ); %Docstring Removes a renderer from registry. + :param rendererName: name of renderer to remove from registry :return: true if renderer was successfully removed, or false if matching -:rtype: bool - renderer could not be found %End @@ -174,24 +150,20 @@ renderer could not be found %Docstring Returns the metadata for a specified renderer. Returns NULL if a matching renderer was not found in the registry. - -:rtype: QgsRendererAbstractMetadata %End QStringList renderersList( QgsRendererAbstractMetadata::LayerTypes layerTypes = QgsRendererAbstractMetadata::All ) const; %Docstring Returns a list of available renderers. -:param layerTypes: flags to filter the renderers by compatible layer types -:rtype: list of str +:param layerTypes: flags to filter the renderers by compatible layer types %End QStringList renderersList( const QgsVectorLayer *layer ) const; %Docstring Returns a list of available renderers which are compatible with a specified layer. -:param layer: vector layer -:rtype: list of str +:param layer: vector layer .. versionadded:: 2.16 %End diff --git a/python/core/symbology/qgsrulebasedrenderer.sip b/python/core/symbology/qgsrulebasedrenderer.sip index c52256016e59..b0e0992352c4 100644 --- a/python/core/symbology/qgsrulebasedrenderer.sip +++ b/python/core/symbology/qgsrulebasedrenderer.sip @@ -92,11 +92,10 @@ Constructor takes ownership of the symbol QString dump( int indent = 0 ) const; %Docstring Dump for debug purpose + :param indent: How many characters to indent. Will increase by two with every of the recursive calls :return: A string representing this rule -:rtype: str - %End QSet usedAttributes( const QgsRenderContext &context ) const; @@ -104,22 +103,16 @@ Dump for debug purpose Return the attributes used to evaluate the expression of this rule :return: A set of attribute names -:rtype: set of str - %End bool needsGeometry() const; %Docstring Returns true if this rule or one of its chilren needs the geometry to be applied. - -:rtype: bool %End QgsSymbolList symbols( const QgsRenderContext &context = QgsRenderContext() ) const; %Docstring -:rtype: QgsSymbolList - .. note:: available in Python bindings as symbol2 @@ -128,8 +121,6 @@ Returns true if this rule or one of its chilren needs the geometry to be applied QgsLegendSymbolList legendSymbolItems( int currentLevel = -1 ) const; %Docstring -:rtype: QgsLegendSymbolList - .. versionadded:: 2.6 %End @@ -141,8 +132,6 @@ Check if a given feature shall be rendered by this rule :param context: The context in which the rendering happens :return: True if the feature shall be rendered -:rtype: bool - %End bool isScaleOK( double scale ) const; @@ -152,25 +141,11 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma If set to 0, it will always return true. :return: If the rule will be evaluated at this scale -:rtype: bool - %End QgsSymbol *symbol(); -%Docstring - -:rtype: QgsSymbol -%End QString label() const; -%Docstring - -:rtype: str -%End bool dependsOnScale() const; -%Docstring - -:rtype: bool -%End double maximumScale() const; %Docstring @@ -178,8 +153,6 @@ Returns the maximum map scale (i.e. most "zoomed in" scale) at which the rule wi The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility. -:rtype: float - .. seealso:: :py:func:`minimumScale()` .. seealso:: :py:func:`setMaximumScale()` @@ -193,8 +166,6 @@ Returns the minimum map scale (i.e. most "zoomed out" scale) at which the rule w The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility. -:rtype: float - .. seealso:: :py:func:`maximumScale()` .. seealso:: :py:func:`setMinimumScale()` @@ -207,8 +178,6 @@ A scale of 0 indicates no minimum scale visibility. A filter that will check if this rule applies :return: An expression -:rtype: QgsExpression - %End QString filterExpression() const; @@ -216,8 +185,6 @@ A filter that will check if this rule applies A filter that will check if this rule applies :return: An expression -:rtype: str - %End QString description() const; @@ -225,8 +192,6 @@ A filter that will check if this rule applies A human readable description for this rule :return: Description -:rtype: str - %End bool active() const; @@ -234,16 +199,12 @@ A human readable description for this rule Returns if this rule is active :return: True if the rule is active -:rtype: bool - %End QString ruleKey() const; %Docstring Unique rule identifier (for identification of rule within renderer) -:rtype: str - .. versionadded:: 2.6 %End @@ -299,14 +260,13 @@ Set a human readable description for this rule void setActive( bool state ); %Docstring Sets if this rule is active + :param state: Determines if the rule should be activated or deactivated %End QgsRuleBasedRenderer::Rule *clone() const /Factory/; %Docstring clone this rule, return new instance - -:rtype: QgsRuleBasedRenderer.Rule %End void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; @@ -314,28 +274,18 @@ clone this rule, return new instance static QgsRuleBasedRenderer::Rule *createFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType ) /Factory/; %Docstring Create a rule from the SLD provided in element and for the specified geometry type. - -:rtype: QgsRuleBasedRenderer.Rule %End QDomElement save( QDomDocument &doc, QgsSymbolMap &symbolMap ) const; -%Docstring - -:rtype: QDomElement -%End bool startRender( QgsRenderContext &context, const QgsFields &fields, QString &filter ); %Docstring prepare the rule for rendering and its children (build active children array) - -:rtype: bool %End QSet collectZLevels(); %Docstring get all used z-levels from this rule and children - -:rtype: set of int %End @@ -348,39 +298,29 @@ Render a given feature, will recursively call subclasses and only render if the :param renderQueue: The rendering queue to which the feature should be added :return: The result of the rendering. In explicit if the feature is added to the queue or -:rtype: QgsRuleBasedRenderer.Rule.RenderResult - the reason for not rendering the feature. %End bool willRenderFeature( QgsFeature &feat, QgsRenderContext *context = 0 ); %Docstring only tell whether a feature will be rendered without actually rendering it - -:rtype: bool %End QgsSymbolList symbolsForFeature( QgsFeature &feat, QgsRenderContext *context = 0 ); %Docstring tell which symbols will be used to render the feature - -:rtype: QgsSymbolList %End QSet< QString > legendKeysForFeature( QgsFeature &feat, QgsRenderContext *context = 0 ); %Docstring Returns which legend keys match the feature -:rtype: set of str - .. versionadded:: 2.14 %End QgsRuleBasedRenderer::RuleList rulesForFeature( QgsFeature &feat, QgsRenderContext *context = 0 ); %Docstring tell which rules will be used to render the feature - -:rtype: QgsRuleBasedRenderer.RuleList %End void stopRender( QgsRenderContext &context ); @@ -398,8 +338,6 @@ Create a rule from an XML definition :param symbolMap: Symbol map :return: A new rule -:rtype: QgsRuleBasedRenderer.Rule - %End QgsRuleBasedRenderer::RuleList &children(); @@ -407,8 +345,6 @@ Create a rule from an XML definition Return all children rules of this rule :return: A list of rules -:rtype: QgsRuleBasedRenderer.RuleList - %End QgsRuleBasedRenderer::RuleList descendants() const; @@ -416,8 +352,6 @@ Return all children rules of this rule Returns all children, grand-children, grand-grand-children, grand-gra... you get it :return: A list of descendant rules -:rtype: QgsRuleBasedRenderer.RuleList - %End QgsRuleBasedRenderer::Rule *parent(); @@ -425,8 +359,6 @@ Returns all children, grand-children, grand-grand-children, grand-gra... you get The parent rule :return: Parent rule -:rtype: QgsRuleBasedRenderer.Rule - %End void appendChild( QgsRuleBasedRenderer::Rule *rule /Transfer/ ); @@ -452,23 +384,17 @@ delete child rule QgsRuleBasedRenderer::Rule *takeChild( QgsRuleBasedRenderer::Rule *rule ) /TransferBack/; %Docstring take child rule out, set parent as null - -:rtype: QgsRuleBasedRenderer.Rule %End QgsRuleBasedRenderer::Rule *takeChildAt( int i ) /TransferBack/; %Docstring take child rule out, set parent as null - -:rtype: QgsRuleBasedRenderer.Rule %End QgsRuleBasedRenderer::Rule *findRuleByKey( const QString &key ); %Docstring Try to find a rule given its unique key -:rtype: QgsRuleBasedRenderer.Rule - .. versionadded:: 2.6 %End @@ -484,8 +410,6 @@ Sets if this rule is an ELSE rule Check if this rule is an ELSE rule :return: True if this rule is an else rule -:rtype: bool - %End protected: @@ -502,8 +426,6 @@ Check if this rule is an ELSE rule static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Creates a new rule-based renderer instance from XML - -:rtype: QgsFeatureRenderer %End QgsRuleBasedRenderer( QgsRuleBasedRenderer::Rule *root /Transfer/ ); @@ -521,8 +443,6 @@ Constructor for convenience. Creates a root rule and adds a default rule with sy %Docstring return symbol for current feature. Should not be used individually: there could be more symbols for a feature - -:rtype: QgsSymbol %End virtual bool renderFeature( QgsFeature &feature, QgsRenderContext &context, int layer = -1, bool selected = false, bool drawVertexMarker = false ); @@ -550,10 +470,6 @@ return symbol for current feature. Should not be used individually: there could static QgsFeatureRenderer *createFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType ) /Factory/; -%Docstring - -:rtype: QgsFeatureRenderer -%End virtual QgsSymbolList symbols( QgsRenderContext &context ); @@ -585,10 +501,6 @@ return symbol for current feature. Should not be used individually: there could QgsRuleBasedRenderer::Rule *rootRule(); -%Docstring - -:rtype: QgsRuleBasedRenderer.Rule -%End static void refineRuleCategories( QgsRuleBasedRenderer::Rule *initialRule, QgsCategorizedSymbolRenderer *r ); @@ -608,8 +520,6 @@ take a rule and create a list of new rules with intervals of scales given by the %Docstring creates a QgsRuleBasedRenderer from an existing renderer. -:rtype: QgsRuleBasedRenderer - .. versionadded:: 2.5 :return: a new renderer if the conversion was possible, otherwise 0. @@ -627,10 +537,6 @@ helper function to convert the size scale and rotation fields present in some ot private: QgsRuleBasedRenderer( const QgsRuleBasedRenderer & ); QgsRuleBasedRenderer &operator=( const QgsRuleBasedRenderer & ); -%Docstring - -:rtype: QgsRuleBasedRenderer -%End }; /************************************************************************ diff --git a/python/core/symbology/qgssinglesymbolrenderer.sip b/python/core/symbology/qgssinglesymbolrenderer.sip index befe3d0d5e98..43a53a012479 100644 --- a/python/core/symbology/qgssinglesymbolrenderer.sip +++ b/python/core/symbology/qgssinglesymbolrenderer.sip @@ -29,10 +29,6 @@ class QgsSingleSymbolRenderer : QgsFeatureRenderer QgsSymbol *symbol() const; -%Docstring - -:rtype: QgsSymbol -%End void setSymbol( QgsSymbol *s /Transfer/ ); virtual QString dump() const; @@ -44,10 +40,6 @@ class QgsSingleSymbolRenderer : QgsFeatureRenderer virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const; static QgsFeatureRenderer *createFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType ); -%Docstring - -:rtype: QgsFeatureRenderer -%End virtual QgsFeatureRenderer::Capabilities capabilities(); virtual QgsSymbolList symbols( QgsRenderContext &context ); @@ -56,8 +48,6 @@ class QgsSingleSymbolRenderer : QgsFeatureRenderer static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring create renderer from XML element - -:rtype: QgsFeatureRenderer %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); @@ -72,8 +62,6 @@ create renderer from XML element %Docstring creates a QgsSingleSymbolRenderer from an existing renderer. -:rtype: QgsSingleSymbolRenderer - .. versionadded:: 2.5 :return: a new renderer if the conversion was possible, otherwise 0. @@ -97,8 +85,6 @@ size legend. Returns configuration of appearance of legend when using data-defined size for marker symbols. Will return null if the functionality is disabled. -:rtype: QgsDataDefinedSizeLegend - .. versionadded:: 3.0 %End @@ -107,10 +93,6 @@ Will return null if the functionality is disabled. private: QgsSingleSymbolRenderer( const QgsSingleSymbolRenderer & ); QgsSingleSymbolRenderer &operator=( const QgsSingleSymbolRenderer & ); -%Docstring - -:rtype: QgsSingleSymbolRenderer -%End }; diff --git a/python/core/symbology/qgsstyle.sip b/python/core/symbology/qgsstyle.sip index a22c029e18df..7bf7a1a67c19 100644 --- a/python/core/symbology/qgsstyle.sip +++ b/python/core/symbology/qgsstyle.sip @@ -44,11 +44,10 @@ Constructor for QgsStyle. %Docstring Adds a symbol to style and takes symbol's ownership -:rtype: bool - .. note:: Adding a symbol with the name of existing one replaces it. + :param name: is the name of the symbol being added or updated :param symbol: is the Vector symbol :param update: set to true when the style DB has to be updated, by default it is false @@ -60,11 +59,10 @@ Adds a symbol to style and takes symbol's ownership %Docstring Adds a color ramp to the style. Calling this method takes the ramp's ownership. -:rtype: bool - .. note:: Adding a color ramp with the name of existing one replaces it. + :param name: is the name of the color ramp being added or updated :param colorRamp: is the color ramp. Ownership is transferred. :param update: set to true when the style DB has to be updated, by default it is false @@ -79,8 +77,6 @@ Adds a new tag and returns the tag's id :param tagName: the name of the new tag to be created :return: returns an int, which is the DB id of the new tag created, 0 if the tag couldn't be created -:rtype: int - %End int addSmartgroup( const QString &name, const QString &op, const QgsSmartConditionMap &conditions ); @@ -90,16 +86,12 @@ Adds a new smartgroup to the database and returns the id :param name: is the name of the new Smart Group to be added :param op: is the operator between the conditions; AND/OR as QString :param conditions: are the smart group conditions - -:rtype: int %End QStringList tags() const; %Docstring Returns a list of all tags in the style database -:rtype: list of str - .. versionadded:: 2.16 .. seealso:: :py:func:`addTag()` @@ -114,44 +106,32 @@ Removes all contents of the style %Docstring Returns a new copy of the specified color ramp. The caller takes responsibility for deleting the returned object. - -:rtype: QgsColorRamp %End int colorRampCount(); %Docstring Returns count of color ramps - -:rtype: int %End QStringList colorRampNames(); %Docstring Returns a list of names of color ramps - -:rtype: list of str %End const QgsColorRamp *colorRampRef( const QString &name ) const; %Docstring Returns a const pointer to a symbol (doesn't create new instance) - -:rtype: QgsColorRamp %End int colorrampId( const QString &name ); %Docstring Returns the id in the style database for the given colorramp name returns 0 if not found - -:rtype: int %End static QgsStyle *defaultStyle(); %Docstring Returns default application-wide style - -:rtype: QgsStyle %End bool tagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags ); @@ -159,13 +139,12 @@ Returns default application-wide style Tags the symbol with the tags in the list Applies the given tags to the given symbol or colorramp + :param type: is either SymbolEntity or ColorrampEntity :param symbol: is the name of the symbol or colorramp as QString :param tags: is the list of the tags that are to be applied as QStringList :return: returns the success state of the operation -:rtype: bool - %End bool detagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags ); @@ -173,13 +152,12 @@ Applies the given tags to the given symbol or colorramp Detags the symbol with the given list Removes the given tags for the specified symbol or colorramp + :param type: is either SymbolEntity or ColorrampEntity :param symbol: is the name of the symbol or colorramp :param tags: is the list of tags that are to be removed as QStringList :return: returns the success state of the operation -:rtype: bool - %End bool detagSymbol( StyleEntity type, const QString &symbol ); @@ -187,74 +165,55 @@ Removes the given tags for the specified symbol or colorramp Clears the symbol from all attached tags Removes all tags for the specified symbol or colorramp + :param type: is either SymbolEntity or ColorrampEntity :param symbol: is the name of the symbol or colorramp :return: returns the success state of the operation -:rtype: bool - %End bool removeSymbol( const QString &name ); %Docstring Removes symbol from style (and delete it) - -:rtype: bool %End bool renameSymbol( const QString &oldName, const QString &newName ); %Docstring Changessymbol's name - -:rtype: bool %End QgsSymbol *symbol( const QString &name ) /Factory/; %Docstring Returns a NEW copy of symbol - -:rtype: QgsSymbol %End const QgsSymbol *symbolRef( const QString &name ) const; %Docstring Returns a const pointer to a symbol (doesn't create new instance) - -:rtype: QgsSymbol %End int symbolCount(); %Docstring Returns count of symbols in style - -:rtype: int %End QStringList symbolNames(); %Docstring Returns a list of names of symbols - -:rtype: list of str %End int symbolId( const QString &name ); %Docstring Returns the id in the style database for the given symbol name returns 0 if not found - -:rtype: int %End int tagId( const QString &tag ); %Docstring Returns the DB id for the given tag name - -:rtype: int %End int smartgroupId( const QString &smartgroup ); %Docstring Returns the DB id for the given smartgroup name - -:rtype: int %End QStringList symbolsOfFavorite( StyleEntity type ) const; @@ -264,8 +223,6 @@ Returns the symbol names which are flagged as favorite :param type: is either SymbolEntity or ColorampEntity :return: A QStringList of the symbol or colorramp names flagged as favorite -:rtype: list of str - %End QStringList symbolsWithTag( StyleEntity type, int tagid ) const; @@ -276,8 +233,6 @@ Returns the symbol names with which have the given tag :param tagid: is id of the tag which has been applied over the symbol as int :return: A QStringList of the symbol or colorramp names for the given tag id -:rtype: list of str - %End bool addFavorite( StyleEntity type, const QString &name ); @@ -288,8 +243,6 @@ Adds the specified symbol to favorites :param name: is the name of the symbol or coloramp whose is to be added to favorites :return: returns the success state as bool -:rtype: bool - %End bool removeFavorite( StyleEntity type, const QString &name ); @@ -300,8 +253,6 @@ Removes the specified symbol from favorites :param name: is the name of the symbol or coloramp whose is to be removed from favorites :return: returns the success state as bool -:rtype: bool - %End void rename( StyleEntity type, int id, const QString &newName ); @@ -331,8 +282,6 @@ Adds the symbol to the DB with the tags :param tags: is a list of tags that are associated with the symbol as a QStringList. :return: returns the success state of the save operation -:rtype: bool - %End bool saveColorRamp( const QString &name, QgsColorRamp *ramp, bool favorite, const QStringList &tags ); @@ -345,22 +294,16 @@ Adds the colorramp to the DB :param tags: is a list of tags that are associated with the color ramp as a QStringList. :return: returns the success state of the save operation -:rtype: bool - %End bool removeColorRamp( const QString &name ); %Docstring Removes color ramp from style (and delete it) - -:rtype: bool %End bool renameColorRamp( const QString &oldName, const QString &newName ); %Docstring Changes ramp's name - -:rtype: bool %End bool createDatabase( const QString &filename ); @@ -370,8 +313,6 @@ Creates an on-disk database This function creates a new on-disk permanent style database. :return: returns the success state of the database creation -:rtype: bool - .. versionadded:: 3.0 @@ -385,8 +326,6 @@ Creates a temporary memory database This function is used to create a temporary style database in case a permanent on-disk database is not needed. :return: returns the success state of the temporary memory database creation -:rtype: bool - .. versionadded:: 3.0 @@ -411,32 +350,25 @@ This function is used to create the tables structure in a newly-created database Loads a file into the style This function will load an on-disk database and populate styles. + :param filename: location of the database to load styles from :return: returns the success state of the database being loaded -:rtype: bool - %End bool save( QString filename = QString() ); %Docstring Saves style into a file (will use current filename if empty string is passed) - -:rtype: bool %End QString errorString(); %Docstring Returns last error from load/save operation - -:rtype: str %End QString fileName(); %Docstring Returns current file name of the style - -:rtype: str %End QStringList findSymbols( StyleEntity type, const QString &qword ); @@ -447,8 +379,6 @@ Returns the names of the symbols which have a matching 'substring' in its defini :param qword: is the query string to search the symbols or colorramps. :return: A QStringList of the matched symbols or colorramps -:rtype: list of str - * %End @@ -460,8 +390,6 @@ Returns the tags associated with the symbol :param symbol: is the name of the symbol or color ramp :return: A QStringList of the tags that have been applied to that symbol/colorramp -:rtype: list of str - %End bool symbolHasTag( StyleEntity type, const QString &symbol, const QString &tag ); @@ -473,65 +401,47 @@ Returns whether a given tag is associated with the symbol :param tag: the name of the tag to look for :return: A boolean value identicating whether a tag was found attached to the symbol -:rtype: bool - %End QString tag( int id ) const; %Docstring Returns the tag name for the given id - -:rtype: str %End QgsSymbolGroupMap smartgroupsListMap(); %Docstring Returns the smart groups map with id as key and name as value - -:rtype: QgsSymbolGroupMap %End QStringList smartgroupNames(); %Docstring Returns the smart groups list - -:rtype: list of str %End QgsSmartConditionMap smartgroup( int id ); %Docstring Returns the QgsSmartConditionMap for the given id - -:rtype: QgsSmartConditionMap %End QString smartgroupOperator( int id ); %Docstring Returns the operator for the smartgroup clumsy implementation TODO create a class for smartgroups - -:rtype: str %End QStringList symbolsOfSmartgroup( StyleEntity type, int id ); %Docstring Returns the symbols for the smartgroup - -:rtype: list of str %End bool exportXml( const QString &filename ); %Docstring Exports the style as a XML file - -:rtype: bool %End bool importXml( const QString &filename ); %Docstring Imports the symbols and colorramps into the default style database from the given XML file - -:rtype: bool %End signals: @@ -553,8 +463,6 @@ Is emitted every time a tag or smartgroup has been added, removed, or renamed bool openDatabase( const QString &filename ); %Docstring Convenience function to open the DB and return a sqlite3 object - -:rtype: bool %End bool runEmptyQuery( char *query, bool freeQuery = true ); @@ -565,33 +473,26 @@ Convenience function that would run queries which don't generate return values :param freeQuery: release query memory :return: success true on success -:rtype: bool - %End int getId( const QString &table, const QString &name ); %Docstring Gets the id from the table for the given name from the database, 0 if not found - -:rtype: int %End QString getName( const QString &table, int id ) const; %Docstring Gets the name from the table for the given id from the database, empty if not found - -:rtype: str %End bool updateSymbol( StyleEntity type, const QString &name ); %Docstring Updates the properties of an existing symbol/colorramp -:rtype: bool - .. note:: This should not be called separately, only called through addSymbol or addColorRamp + :param type: is either SymbolEntity or ColorrampEntity :param name: is the name of an existing symbol or a color ramp diff --git a/python/core/symbology/qgssvgcache.sip b/python/core/symbology/qgssvgcache.sip index 8f622201e650..eabf9907e486 100644 --- a/python/core/symbology/qgssvgcache.sip +++ b/python/core/symbology/qgssvgcache.sip @@ -39,6 +39,7 @@ Constructor for QgsSvgCache. double widthScaleFactor, bool &fitsInCache, double fixedAspectRatio = 0 ); %Docstring Get SVG as QImage. + :param path: Absolute path to SVG file. :param size: size of cached image :param fill: color of fill @@ -47,14 +48,13 @@ Get SVG as QImage. :param widthScaleFactor: width scale factor :param fitsInCache: :param fixedAspectRatio: fixed aspect ratio (optional) - -:rtype: QImage %End QPicture svgAsPicture( const QString &path, double size, const QColor &fill, const QColor &stroke, double strokeWidth, double widthScaleFactor, bool forceVectorOutput = false, double fixedAspectRatio = 0 ); %Docstring Get SVG as QPicture&. + :param path: Absolute path to SVG file. :param size: size of cached image :param fill: color of fill @@ -63,14 +63,13 @@ Get SVG as QPicture&. :param widthScaleFactor: width scale factor :param forceVectorOutput: :param fixedAspectRatio: fixed aspect ratio (optional) - -:rtype: QPicture %End QSizeF svgViewboxSize( const QString &path, double size, const QColor &fill, const QColor &stroke, double strokeWidth, double widthScaleFactor, double fixedAspectRatio = 0 ); %Docstring Calculates the viewbox size of a (possibly cached) SVG file. + :param path: Absolute path to SVG file. :param size: size of cached image :param fill: color of fill @@ -80,8 +79,6 @@ Calculates the viewbox size of a (possibly cached) SVG file. :param fixedAspectRatio: fixed aspect ratio (optional) :return: viewbox size set in SVG file -:rtype: QSizeF - .. versionadded:: 2.14 %End @@ -101,6 +98,7 @@ default values in the svg file, only the first one is considered* %Docstring Tests if an svg file contains parameters for fill, stroke color, stroke width. If yes, possible default values are returned. If there are several default values in the svg file, only the first one is considered. + :param path: path to SVG file :param hasFillParam: will be true if fill param present in SVG :param hasDefaultFillParam: will be true if fill param has a default value specified @@ -128,16 +126,12 @@ default values in the svg file, only the first one is considered. QByteArray getImageData( const QString &path ) const; %Docstring Get image data - -:rtype: QByteArray %End QByteArray svgContent( const QString &path, double size, const QColor &fill, const QColor &stroke, double strokeWidth, double widthScaleFactor, double fixedAspectRatio = 0 ); %Docstring Get SVG content - -:rtype: QByteArray %End signals: diff --git a/python/core/symbology/qgssymbol.sip b/python/core/symbology/qgssymbol.sip index 777d81ebc9ef..bd8ea3cd8975 100644 --- a/python/core/symbology/qgssymbol.sip +++ b/python/core/symbology/qgssymbol.sip @@ -57,15 +57,9 @@ class QgsSymbol static QgsSymbol *defaultSymbol( QgsWkbTypes::GeometryType geomType ) /Factory/; %Docstring return new default symbol for specified geometry type - -:rtype: QgsSymbol %End SymbolType type() const; -%Docstring - -:rtype: SymbolType -%End QgsSymbolLayerList symbolLayers(); @@ -73,8 +67,6 @@ return new default symbol for specified geometry type Returns list of symbol layers contained in the symbol. :return: symbol layers list -:rtype: QgsSymbolLayerList - .. versionadded:: 2.7 @@ -86,11 +78,10 @@ Returns list of symbol layers contained in the symbol. QgsSymbolLayer *symbolLayer( int layer ); %Docstring Returns a specific symbol layers contained in the symbol. + :param layer: layer number :return: corresponding symbol layer -:rtype: QgsSymbolLayer - .. versionadded:: 2.7 @@ -104,8 +95,6 @@ Returns a specific symbol layers contained in the symbol. Returns total number of symbol layers contained in the symbol. :return: count of symbol layers -:rtype: int - .. versionadded:: 2.7 @@ -118,54 +107,48 @@ Returns total number of symbol layers contained in the symbol. %Docstring Insert symbol layer to specified index Ownership will be transferred. + :param index: The index at which the layer should be added :param layer: The symbol layer to add :return: True if the layer is added, False if the index or the layer is bad -:rtype: bool - %End bool appendSymbolLayer( QgsSymbolLayer *layer /Transfer/ ); %Docstring Append symbol layer at the end of the list Ownership will be transferred. + :param layer: The layer to add :return: True if the layer is added, False if the layer is bad -:rtype: bool - %End bool deleteSymbolLayer( int index ); %Docstring delete symbol layer at specified index - -:rtype: bool %End QgsSymbolLayer *takeSymbolLayer( int index ) /TransferBack/; %Docstring Remove symbol layer from the list and return pointer to it. Ownership is handed to the caller. + :param index: The index of the layer to remove :return: A pointer to the removed layer -:rtype: QgsSymbolLayer - %End bool changeSymbolLayer( int index, QgsSymbolLayer *layer /Transfer/ ); %Docstring delete layer at specified index and set a new one - -:rtype: bool %End void startRender( QgsRenderContext &context, const QgsFields &fields = QgsFields() ); %Docstring Begins the rendering process for the symbol. This must be called before renderFeature(), and should be followed by a call to stopRender(). + :param context: render context which symbol will be drawn using :param fields: fields for features to be rendered (usually the associated vector layer's fields). Required for correct calculation of data defined @@ -177,6 +160,7 @@ overrides. void stopRender( QgsRenderContext &context ); %Docstring Ends the rendering process. This should be called after rendering all desired features. + :param context: render context, must match the context specified when startRender() was called. @@ -185,10 +169,6 @@ was called. void setColor( const QColor &color ); QColor color() const; -%Docstring - -:rtype: QColor -%End void drawPreviewIcon( QPainter *painter, QSize size, QgsRenderContext *customContext = 0 ); %Docstring @@ -206,32 +186,23 @@ export symbol as image format. PNG and SVG supported QImage asImage( QSize size, QgsRenderContext *customContext = 0 ); %Docstring Generate symbol as image - -:rtype: QImage %End QImage bigSymbolPreviewImage( QgsExpressionContext *expressionContext = 0 ); %Docstring Returns a large (roughly 100x100 pixel) preview image for the symbol. + :param expressionContext: optional expression context, for evaluation of data defined symbol properties - -:rtype: QImage %End QString dump() const; -%Docstring - -:rtype: str -%End virtual QgsSymbol *clone() const = 0 /Factory/; %Docstring Get a deep copy of this symbol. Needs to be reimplemented by subclasses. Ownership is transferred to the caller. - -:rtype: QgsSymbol %End void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; @@ -244,8 +215,6 @@ may use it to specify the units for the marker size, while a line symbol may use it to specify the units for the line width. :return: output unit, or QgsUnitTypes.RenderUnknownUnit if the symbol contains mixed units -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOutputUnit()` %End @@ -256,16 +225,13 @@ Sets the units to use for sizes and widths within the symbol. Individual symbol definitions will interpret this in different ways, e.g., a marker symbol may use it to specify the units for the marker size, while a line symbol may use it to specify the units for the line width. + :param unit: output units .. seealso:: :py:func:`outputUnit()` %End QgsMapUnitScale mapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setMapUnitScale( const QgsMapUnitScale &scale ); qreal opacity() const; @@ -273,8 +239,6 @@ may use it to specify the units for the line width. Returns the opacity for the symbol. :return: opacity value between 0 (fully transparent) and 1 (fully opaque) -:rtype: qreal - .. seealso:: :py:func:`setOpacity()` %End @@ -282,6 +246,7 @@ Returns the opacity for the symbol. void setOpacity( qreal opacity ); %Docstring Sets the ``opacity`` for the symbol. + :param opacity: opacity value between 0 (fully transparent) and 1 (fully opaque) .. seealso:: :py:func:`opacity()` @@ -298,8 +263,6 @@ Sets rendering hint flags for the symbol. %Docstring Returns the rendering hint flags for the symbol. -:rtype: RenderHints - .. seealso:: :py:func:`setRenderHints()` %End @@ -309,6 +272,7 @@ Sets whether features drawn by the symbol should be clipped to the render contex extent. If this option is enabled then features which are partially outside the extent will be clipped. This speeds up rendering of the feature, but may have undesirable side effects for certain symbol types. + :param clipFeaturesToExtent: set to true to enable clipping (defaults to true) .. versionadded:: 2.9 @@ -324,8 +288,6 @@ will be clipped. This speeds up rendering of the feature, but may have undesirab side effects for certain symbol types. :return: true if features will be clipped -:rtype: bool - .. versionadded:: 2.9 @@ -337,16 +299,12 @@ side effects for certain symbol types. Return a list of attributes required to render this feature. This should include any attributes required by the symbology including the ones required by expressions. - -:rtype: set of str %End bool hasDataDefinedProperties() const; %Docstring Returns whether the symbol utilizes any data defined properties. -:rtype: bool - .. versionadded:: 2.12 %End @@ -358,10 +316,6 @@ Returns whether the symbol utilizes any data defined properties. the layer will be NULL after stopRender %End const QgsVectorLayer *layer() const; -%Docstring - -:rtype: QgsVectorLayer -%End void renderFeature( const QgsFeature &feature, QgsRenderContext &context, int layer = -1, bool selected = false, bool drawVertexMarker = false, int currentVertexMarkerType = 0, int currentVertexMarkerSize = 0 ); %Docstring @@ -374,8 +328,6 @@ the rendering process. After rendering all features stopRender() must be called. Returns the symbol render context. Only valid between startRender and stopRender calls. :return: The symbol render context -:rtype: QgsSymbolRenderContext - %End protected: @@ -384,22 +336,16 @@ Returns the symbol render context. Only valid between startRender and stopRender static QPointF _getPoint( QgsRenderContext &context, const QgsPoint &point ); %Docstring Creates a point in screen coordinates from a QgsPoint in map coordinates - -:rtype: QPointF %End static QPolygonF _getLineString( QgsRenderContext &context, const QgsCurve &curve, bool clipToExtent = true ); %Docstring Creates a line string in screen coordinates from a QgsCurve in map coordinates - -:rtype: QPolygonF %End static QPolygonF _getPolygonRing( QgsRenderContext &context, const QgsCurve &curve, bool clipToExtent ); %Docstring Creates a polygon ring in screen coordinates from a QgsCurve in map coordinates - -:rtype: QPolygonF %End static void _getPolygon( QPolygonF &pts, QList &holes, QgsRenderContext &context, const QgsPolygon &polygon, bool clipToExtent = true ); @@ -411,8 +357,6 @@ Creates a polygon in screen coordinates from a QgsPolygonXYin map coordinates %Docstring Retrieve a cloned list of all layers that make up this symbol. Ownership is transferred to the caller. - -:rtype: QgsSymbolLayerList %End void renderUsingLayer( QgsSymbolLayer *layer, QgsSymbolRenderContext &context ); @@ -456,6 +400,7 @@ class QgsSymbolRenderContext QgsSymbolRenderContext( QgsRenderContext &c, QgsUnitTypes::RenderUnit u, qreal opacity = 1.0, bool selected = false, QgsSymbol::RenderHints renderHints = 0, const QgsFeature *f = 0, const QgsFields &fields = QgsFields(), const QgsMapUnitScale &mapUnitScale = QgsMapUnitScale() ); %Docstring Constructor for QgsSymbolRenderContext + :param c: :param u: :param opacity: value between 0 (fully transparent) and 1 (fully opaque) @@ -468,14 +413,11 @@ Constructor for QgsSymbolRenderContext QgsRenderContext &renderContext(); -%Docstring - -:rtype: QgsRenderContext -%End void setOriginalValueVariable( const QVariant &value ); %Docstring Sets the original value variable value for data defined symbology + :param value: value for original value variable. This usually represents the symbol property value before any data defined overrides have been applied. @@ -485,8 +427,6 @@ before any data defined overrides have been applied. QgsUnitTypes::RenderUnit outputUnit() const; %Docstring Returns the output unit for the context - -:rtype: QgsUnitTypes.RenderUnit %End void setOutputUnit( QgsUnitTypes::RenderUnit u ); @@ -495,10 +435,6 @@ Sets the output unit for the context %End QgsMapUnitScale mapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setMapUnitScale( const QgsMapUnitScale &scale ); qreal opacity() const; @@ -506,8 +442,6 @@ Sets the output unit for the context Returns the opacity for the symbol. :return: opacity value between 0 (fully transparent) and 1 (fully opaque) -:rtype: qreal - .. seealso:: :py:func:`setOpacity()` %End @@ -515,24 +449,19 @@ Returns the opacity for the symbol. void setOpacity( qreal opacity ); %Docstring Sets the ``opacity`` for the symbol. + :param opacity: opacity value between 0 (fully transparent) and 1 (fully opaque) .. seealso:: :py:func:`opacity()` %End bool selected() const; -%Docstring - -:rtype: bool -%End void setSelected( bool selected ); QgsSymbol::RenderHints renderHints() const; %Docstring Returns the rendering hint flags for the symbol. -:rtype: QgsSymbol.RenderHints - .. seealso:: :py:func:`setRenderHints()` %End @@ -547,8 +476,6 @@ Sets rendering hint flags for the symbol. const QgsFeature *feature() const; %Docstring Current feature being rendered - may be null - -:rtype: QgsFeature %End void setOriginalGeometryType( QgsWkbTypes::GeometryType type ); @@ -567,8 +494,6 @@ useful if symbol layers alter their appearance based on geometry type - eg offse simple line style will look different if the simple line is rendering a polygon feature (a closed buffer) vs a line feature (an unclosed offset line). -:rtype: QgsWkbTypes.GeometryType - .. seealso:: :py:func:`originalGeometryType()` .. versionadded:: 3.0 @@ -580,8 +505,6 @@ Fields of the layer. Currently only available in startRender() calls to allow symbols with data-defined properties prepare the expressions (other times fields() returns null) -:rtype: QgsFields - .. versionadded:: 2.4 %End @@ -589,8 +512,6 @@ to allow symbols with data-defined properties prepare the expressions %Docstring Part count of current geometry -:rtype: int - .. versionadded:: 2.16 %End @@ -605,8 +526,6 @@ Sets the part count of current geometry %Docstring Part number of current geometry -:rtype: int - .. versionadded:: 2.16 %End @@ -618,15 +537,7 @@ Sets the part number of current geometry %End double outputLineWidth( double width ) const; -%Docstring - -:rtype: float -%End double outputPixelSize( double size ) const; -%Docstring - -:rtype: float -%End QgsExpressionContextScope *expressionContextScope(); @@ -634,8 +545,6 @@ Sets the part number of current geometry This scope is always available when a symbol of this type is being rendered. :return: An expression scope for details about this symbol -:rtype: QgsExpressionContextScope - %End void setExpressionContextScope( QgsExpressionContextScope *contextScope /Transfer/ ); @@ -667,8 +576,6 @@ class QgsMarkerSymbol : QgsSymbol %Docstring Create a marker symbol with one symbol layer: SimpleMarker with specified properties. This is a convenience method for easier creation of marker symbols. - -:rtype: QgsMarkerSymbol %End QgsMarkerSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() ); @@ -677,6 +584,7 @@ This is a convenience method for easier creation of marker symbols. %Docstring 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. + :param symbolAngle: new symbol angle .. seealso:: :py:func:`angle()` @@ -688,8 +596,6 @@ Returns the marker angle for the whole symbol. Note that for symbols with multiple symbol layers, this will correspond just to the angle of the first symbol layer. -:rtype: float - .. versionadded:: 2.16 .. seealso:: :py:func:`setAngle()` @@ -709,8 +615,6 @@ Set data defined angle for whole symbol (including all symbol layers). Returns data defined angle for whole symbol (including all symbol layers). :return: data defined angle, or invalid property if angle is not set -:rtype: QgsProperty - at the marker level. .. versionadded:: 3.0 @@ -723,6 +627,7 @@ at the marker level. Sets the line angle modification for the symbol's angle. This angle is added to the marker's rotation and data defined rotation before rendering the symbol, and is usually used for orienting symbols to match a line's angle. + :param lineAngle: Angle in degrees, valid values are between 0 and 360 .. versionadded:: 2.9 @@ -732,6 +637,7 @@ is usually used for orienting symbols to match a line's angle. %Docstring Sets the size for the whole symbol. Individual symbol layer sizes will be scaled to maintain their current relative size to the whole symbol size. + :param size: new symbol size .. seealso:: :py:func:`size()` @@ -746,8 +652,6 @@ will be scaled to maintain their current relative size to the whole symbol size. Returns the size for the whole symbol, which is the maximum size of all marker symbol layers in the symbol. -:rtype: float - .. seealso:: :py:func:`setSize()` .. seealso:: :py:func:`sizeUnit()` @@ -758,6 +662,7 @@ all marker symbol layers in the symbol. void setSizeUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the size units for the whole symbol (including all symbol layers). + :param unit: size units .. versionadded:: 2.16 @@ -774,8 +679,6 @@ Sets the size units for the whole symbol (including all symbol layers). Returns the size units for the whole symbol (including all symbol layers). :return: size units, or mixed units if symbol layers have different units -:rtype: QgsUnitTypes.RenderUnit - .. versionadded:: 2.16 @@ -789,6 +692,7 @@ Returns the size units for the whole symbol (including all symbol layers). void setSizeMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the size map unit scale for the whole symbol (including all symbol layers). + :param scale: map unit scale .. versionadded:: 2.16 @@ -806,8 +710,6 @@ Returns the size map unit scale for the whole symbol. Note that for symbols with multiple symbol layers, this will correspond just to the map unit scale for the first symbol layer. -:rtype: QgsMapUnitScale - .. versionadded:: 2.16 .. seealso:: :py:func:`setSizeMapUnitScale()` @@ -831,8 +733,6 @@ Set data defined size for whole symbol (including all symbol layers). Returns data defined size for whole symbol (including all symbol layers). :return: data defined size, or invalid property if size is not set -:rtype: QgsProperty - at the marker level. .. versionadded:: 3.0 @@ -842,10 +742,6 @@ at the marker level. void setScaleMethod( QgsSymbol::ScaleMethod scaleMethod ); ScaleMethod scaleMethod(); -%Docstring - -:rtype: ScaleMethod -%End void renderPoint( QPointF point, const QgsFeature *f, QgsRenderContext &context, int layer = -1, bool selected = false ); @@ -854,14 +750,13 @@ at the marker level. Returns the approximate bounding box of the marker symbol, which includes the bounding box of all symbol layers for the symbol. It is recommended to use this method only between startRender() and stopRender() calls, or data defined rotation and offset will not be correctly calculated. + :param point: location of rendered point in painter units :param context: render context :param feature: feature being rendered at point (optional). If not specified, the bounds calculation will not include data defined parameters such as offset and rotation :return: approximate symbol bounds, in painter units -:rtype: QRectF - .. versionadded:: 2.14 %End @@ -884,18 +779,12 @@ class QgsLineSymbol : QgsSymbol %Docstring Create a line symbol with one symbol layer: SimpleLine with specified properties. This is a convenience method for easier creation of line symbols. - -:rtype: QgsLineSymbol %End QgsLineSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() ); void setWidth( double width ); double width() const; -%Docstring - -:rtype: float -%End void setDataDefinedWidth( const QgsProperty &property ); %Docstring @@ -911,8 +800,6 @@ Set data defined width for whole symbol (including all symbol layers). Returns data defined width for whole symbol (including all symbol layers). :return: data defined width, or invalid property if size is not set -:rtype: QgsProperty - at the line level. Caller takes responsibility for deleting the returned object. .. versionadded:: 3.0 @@ -940,8 +827,6 @@ class QgsFillSymbol : QgsSymbol %Docstring Create a fill symbol with one symbol layer: SimpleFill with specified properties. This is a convenience method for easier creation of fill symbols. - -:rtype: QgsFillSymbol %End QgsFillSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() ); diff --git a/python/core/symbology/qgssymbollayer.sip b/python/core/symbology/qgssymbollayer.sip index d3b0bcf4dc77..115a69b7ad2e 100644 --- a/python/core/symbology/qgssymbollayer.sip +++ b/python/core/symbology/qgssymbollayer.sip @@ -135,8 +135,6 @@ class QgsSymbolLayer %Docstring Returns the symbol layer property definitions. -:rtype: QgsPropertiesDefinition - .. versionadded:: 3.0 %End @@ -146,8 +144,6 @@ Returns the symbol layer property definitions. %Docstring Returns true if symbol layer is enabled and will be drawn. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setEnabled()` @@ -167,8 +163,6 @@ when desired. virtual QColor color() const; %Docstring The fill color. - -:rtype: QColor %End virtual void setColor( const QColor &color ); @@ -187,8 +181,6 @@ Set stroke color. Supported by marker and fill layers. %Docstring Get stroke color. Supported by marker and fill layers. -:rtype: QColor - .. versionadded:: 2.1 %End @@ -203,8 +195,6 @@ Set fill color. Supported by marker and fill layers. %Docstring Get fill color. Supported by marker and fill layers. -:rtype: QColor - .. versionadded:: 2.1 %End @@ -212,8 +202,6 @@ Get fill color. Supported by marker and fill layers. %Docstring Returns a string that represents this layer type. Used for serialization. Should match with the string used to register this symbol layer in the registry. - -:rtype: str %End virtual void startRender( QgsSymbolRenderContext &context ) = 0; @@ -222,25 +210,17 @@ Should match with the string used to register this symbol layer in the registry. virtual QgsSymbolLayer *clone() const = 0 /Factory/; %Docstring Shall be reimplemented by subclasses to create a deep copy of the instance. - -:rtype: QgsSymbolLayer %End virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const; virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const; -%Docstring - -:rtype: str -%End virtual QgsStringMap properties() const = 0; %Docstring Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer. This is used to serialize a symbol layer perstistently. - -:rtype: QgsStringMap %End virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) = 0; @@ -248,36 +228,22 @@ is used to serialize a symbol layer perstistently. virtual QgsSymbol *subSymbol(); %Docstring Returns the symbol's sub symbol, if present. - -:rtype: QgsSymbol %End virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ ); %Docstring set layer's subsymbol. takes ownership of the passed symbol - -:rtype: bool %End QgsSymbol::SymbolType type() const; -%Docstring - -:rtype: QgsSymbol.SymbolType -%End virtual bool isCompatibleWithSymbol( QgsSymbol *symbol ) const; %Docstring Returns if the layer can be used below the specified symbol - -:rtype: bool %End void setLocked( bool locked ); bool isLocked() const; -%Docstring - -:rtype: bool -%End virtual double estimateMaxBleed( const QgsRenderContext &context ) const; %Docstring @@ -286,8 +252,6 @@ the drawn shape when drawn in the specified /a context. For example, polygons drawn with an stroke will draw half the width of the stroke outside of the polygon. This amount is estimated, since it may be affected by data defined symbology rules.* - -:rtype: float %End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -296,6 +260,7 @@ Sets the units to use for sizes and widths within the symbol layer. Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width. + :param unit: output units .. seealso:: :py:func:`outputUnit()` @@ -309,32 +274,20 @@ layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width. :return: output unit, or QgsUnitTypes.RenderUnknownUnit if the symbol layer contains mixed units -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOutputUnit()` %End virtual void setMapUnitScale( const QgsMapUnitScale &scale ); virtual QgsMapUnitScale mapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setRenderingPass( int renderingPass ); int renderingPass() const; -%Docstring - -:rtype: int -%End virtual QSet usedAttributes( const QgsRenderContext &context ) const; %Docstring Returns the set of attributes referenced by the layer. This includes attributes required by any data defined properties associated with the layer. - -:rtype: set of str %End virtual void setDataDefinedProperty( Property key, const QgsProperty &property ); @@ -352,64 +305,46 @@ will be overwritten. virtual bool writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift = QPointF( 0.0, 0.0 ) ) const; %Docstring write as DXF - -:rtype: bool %End virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const; %Docstring get line width - -:rtype: float %End virtual double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const; %Docstring get offset - -:rtype: float %End virtual QColor dxfColor( QgsSymbolRenderContext &context ) const; %Docstring get color - -:rtype: QColor %End virtual double dxfAngle( QgsSymbolRenderContext &context ) const; %Docstring get angle - -:rtype: float %End virtual QVector dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const; %Docstring get dash pattern - -:rtype: list of qreal %End virtual Qt::PenStyle dxfPenStyle() const; %Docstring get pen style - -:rtype: Qt.PenStyle %End virtual QColor dxfBrushColor( QgsSymbolRenderContext &context ) const; %Docstring get brush/fill color - -:rtype: QColor %End virtual Qt::BrushStyle dxfBrushStyle() const; %Docstring get brush/fill style - -:rtype: Qt.BrushStyle %End QgsPaintEffect *paintEffect() const; @@ -417,8 +352,6 @@ get brush/fill style Returns the current paint effect for the layer. :return: paint effect -:rtype: QgsPaintEffect - .. versionadded:: 2.9 @@ -428,6 +361,7 @@ Returns the current paint effect for the layer. void setPaintEffect( QgsPaintEffect *effect /Transfer/ ); %Docstring Sets the current paint effect for the layer. + :param effect: paint effect. Ownership is transferred to the layer. .. versionadded:: 2.9 @@ -439,6 +373,7 @@ Sets the current paint effect for the layer. %Docstring Prepares all data defined property expressions for evaluation. This should be called prior to evaluating data defined properties. + :param context: symbol render context .. versionadded:: 2.12 @@ -448,8 +383,6 @@ be called prior to evaluating data defined properties. %Docstring Returns a reference to the symbol layer's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. versionadded:: 3.0 .. seealso:: :py:func:`setProperties()` @@ -459,6 +392,7 @@ Returns a reference to the symbol layer's property collection, used for data def void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the symbol layer's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. versionadded:: 3.0 @@ -486,12 +420,14 @@ Restores older data defined properties from string map. void copyDataDefinedProperties( QgsSymbolLayer *destLayer ) const; %Docstring Copies all data defined properties of this layer to another symbol layer. + :param destLayer: destination layer %End void copyPaintEffect( QgsSymbolLayer *destLayer ) const; %Docstring Copies paint effect of this layer to another symbol layer + :param destLayer: destination layer .. versionadded:: 2.9 @@ -532,6 +468,7 @@ class QgsMarkerSymbolLayer : QgsSymbolLayer %Docstring Renders a marker at the specified point. Derived classes must implement this to handle drawing the point. + :param point: position at which to render point, in painter units :param context: symbol render context %End @@ -542,6 +479,7 @@ handle drawing the point. void setAngle( double angle ); %Docstring Sets the rotation angle for the marker. + :param angle: angle in degrees clockwise from north. .. seealso:: :py:func:`angle()` @@ -553,8 +491,6 @@ Sets the rotation angle for the marker. %Docstring Returns the rotation angle for the marker, in degrees clockwise from north. -:rtype: float - .. seealso:: :py:func:`setAngle()` %End @@ -563,6 +499,7 @@ Returns the rotation angle for the marker, in degrees clockwise from north. Sets the line angle modification for the symbol's angle. This angle is added to the marker's rotation and data defined rotation before rendering the symbol, and is usually used for orienting symbols to match a line's angle. + :param lineAngle: Angle in degrees clockwise from north, valid values are between 0 and 360 .. versionadded:: 2.9 @@ -575,6 +512,7 @@ is usually used for orienting symbols to match a line's angle. void setSize( double size ); %Docstring Sets the symbol size. + :param size: symbol size. Units are specified by sizeUnit(). .. seealso:: :py:func:`size()` @@ -588,8 +526,6 @@ Sets the symbol size. %Docstring Returns the symbol size. Units are specified by sizeUnit(). -:rtype: float - .. seealso:: :py:func:`setSize()` .. seealso:: :py:func:`sizeUnit()` @@ -600,6 +536,7 @@ Returns the symbol size. Units are specified by sizeUnit(). void setSizeUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the symbol's size. + :param unit: size units .. seealso:: :py:func:`sizeUnit()` @@ -613,8 +550,6 @@ Sets the units for the symbol's size. %Docstring Returns the units for the symbol's size. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setSizeUnit()` .. seealso:: :py:func:`size()` @@ -625,6 +560,7 @@ Returns the units for the symbol's size. void setSizeMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale for the symbol's size. + :param scale: size map unit scale .. seealso:: :py:func:`sizeMapUnitScale()` @@ -638,8 +574,6 @@ Sets the map unit scale for the symbol's size. %Docstring Returns the map unit scale for the symbol's size. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setSizeMapUnitScale()` .. seealso:: :py:func:`size()` @@ -650,6 +584,7 @@ Returns the map unit scale for the symbol's size. void setScaleMethod( QgsSymbol::ScaleMethod scaleMethod ); %Docstring Sets the method to use for scaling the marker's size. + :param scaleMethod: scale method .. seealso:: :py:func:`scaleMethod()` @@ -659,8 +594,6 @@ Sets the method to use for scaling the marker's size. %Docstring Returns the method to use for scaling the marker's size. -:rtype: QgsSymbol.ScaleMethod - .. seealso:: :py:func:`setScaleMethod()` %End @@ -668,6 +601,7 @@ Returns the method to use for scaling the marker's size. %Docstring Sets the marker's offset, which is the horizontal and vertical displacement which the rendered marker should have from the original feature's geometry. + :param offset: marker offset. Units are specified by offsetUnit() .. seealso:: :py:func:`offset()` @@ -682,8 +616,6 @@ should have from the original feature's geometry. Returns the marker's offset, which is the horizontal and vertical displacement which the rendered marker will have from the original feature's geometry. Units are specified by offsetUnit(). -:rtype: QPointF - .. seealso:: :py:func:`setOffset()` .. seealso:: :py:func:`offsetUnit()` @@ -694,6 +626,7 @@ will have from the original feature's geometry. Units are specified by offsetUni void setOffsetUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the symbol's offset. + :param unit: offset units .. seealso:: :py:func:`offsetUnit()` @@ -707,8 +640,6 @@ Sets the units for the symbol's offset. %Docstring Returns the units for the symbol's offset. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit()` .. seealso:: :py:func:`offset()` @@ -719,6 +650,7 @@ Returns the units for the symbol's offset. void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); %Docstring Sets the map unit scale for the symbol's offset. + :param scale: offset map unit scale .. seealso:: :py:func:`offsetMapUnitScale()` @@ -732,8 +664,6 @@ Sets the map unit scale for the symbol's offset. %Docstring Returns the map unit scale for the symbol's offset. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setOffsetMapUnitScale()` .. seealso:: :py:func:`offset()` @@ -744,6 +674,7 @@ Returns the map unit scale for the symbol's offset. void setHorizontalAnchorPoint( HorizontalAnchorPoint h ); %Docstring Sets the horizontal anchor point for positioning the symbol. + :param h: anchor point. Symbol will be drawn so that the horizontal anchor point is aligned with the marker's desired location. @@ -757,8 +688,6 @@ the marker's desired location. Returns the horizontal anchor point for positioning the symbol. The symbol will be drawn so that the horizontal anchor point is aligned with the marker's desired location. -:rtype: HorizontalAnchorPoint - .. seealso:: :py:func:`setHorizontalAnchorPoint()` .. seealso:: :py:func:`verticalAnchorPoint()` @@ -767,6 +696,7 @@ the horizontal anchor point is aligned with the marker's desired location. void setVerticalAnchorPoint( VerticalAnchorPoint v ); %Docstring Sets the vertical anchor point for positioning the symbol. + :param v: anchor point. Symbol will be drawn so that the vertical anchor point is aligned with the marker's desired location. @@ -780,8 +710,6 @@ the marker's desired location. Returns the vertical anchor point for positioning the symbol. The symbol will be drawn so that the vertical anchor point is aligned with the marker's desired location. -:rtype: VerticalAnchorPoint - .. seealso:: :py:func:`setVerticalAnchorPoint()` .. seealso:: :py:func:`horizontalAnchorPoint()` @@ -793,6 +721,7 @@ the vertical anchor point is aligned with the marker's desired location. virtual void writeSldMarker( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const; %Docstring Writes the symbol layer definition as a SLD XML element. + :param doc: XML document :param element: parent XML element :param props: symbol layer definition (see properties()) @@ -813,8 +742,6 @@ Returns the approximate bounding box of the marker symbol layer, taking into acc any data defined overrides and offsets which are set for the marker layer. :return: approximate symbol bounds, in painter units -:rtype: QRectF - .. versionadded:: 2.14 %End @@ -824,6 +751,7 @@ any data defined overrides and offsets which are set for the marker layer. QgsMarkerSymbolLayer( bool locked = false ); %Docstring Constructor for QgsMarkerSymbolLayer. + :param locked: set to true to lock symbol color %End @@ -831,6 +759,7 @@ Constructor for QgsMarkerSymbolLayer. %Docstring Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point. + :param context: symbol render context :param offsetX: will be set to required horizontal offset (in painter units) :param offsetY: will be set to required vertical offset (in painter units) @@ -840,6 +769,7 @@ and any displacement required to align with the marker's anchor point. %Docstring Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point. + :param context: symbol render context :param width: marker width :param height: marker height @@ -865,12 +795,11 @@ and any displacement required to align with the marker's anchor point. static QPointF _rotatedOffset( QPointF offset, double angle ); %Docstring Adjusts a marker offset to account for rotation. + :param offset: offset prior to rotation :param angle: rotation angle in degrees clockwise from north :return: adjusted offset -:rtype: QPointF - %End @@ -889,21 +818,14 @@ class QgsLineSymbolLayer : QgsSymbolLayer virtual void setWidth( double width ); virtual double width() const; -%Docstring - -:rtype: float -%End double offset() const; -%Docstring - -:rtype: float -%End void setOffset( double offset ); void setWidthUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the line's width. + :param unit: width units .. seealso:: :py:func:`widthUnit()` @@ -913,21 +835,16 @@ Sets the units for the line's width. %Docstring Returns the units for the line's width. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setWidthUnit()` %End void setWidthMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &widthMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End void setOffsetUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the line's offset. + :param unit: offset units .. seealso:: :py:func:`offsetUnit()` @@ -937,17 +854,11 @@ Sets the units for the line's offset. %Docstring Returns the units for the line's offset. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setOffsetUnit()` %End void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &offsetMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -984,10 +895,6 @@ class QgsFillSymbolLayer : QgsSymbolLayer void setAngle( double angle ); double angle() const; -%Docstring - -:rtype: float -%End protected: QgsFillSymbolLayer( bool locked = false ); diff --git a/python/core/symbology/qgssymbollayerregistry.sip b/python/core/symbology/qgssymbollayerregistry.sip index e106ad17a3f7..8a64731aa12f 100644 --- a/python/core/symbology/qgssymbollayerregistry.sip +++ b/python/core/symbology/qgssymbollayerregistry.sip @@ -30,38 +30,20 @@ In C++ you can use QgsSymbolLayerMetadata convenience class. virtual ~QgsSymbolLayerAbstractMetadata(); QString name() const; -%Docstring - -:rtype: str -%End QString visibleName() const; -%Docstring - -:rtype: str -%End QgsSymbol::SymbolType type() const; -%Docstring - -:rtype: QgsSymbol.SymbolType -%End virtual QgsSymbolLayer *createSymbolLayer( const QgsStringMap &map ) = 0 /Factory/; %Docstring Create a symbol layer of this type given the map of properties. - -:rtype: QgsSymbolLayer %End virtual QgsSymbolLayerWidget *createSymbolLayerWidget( QgsVectorLayer * ) /Factory/; %Docstring Create widget for symbol layer of this type. Can return NULL if there's no GUI - -:rtype: QgsSymbolLayerWidget %End virtual QgsSymbolLayer *createSymbolLayerFromSld( QDomElement & ) /Factory/; %Docstring Create a symbol layer of this type given the map of properties. - -:rtype: QgsSymbolLayer %End virtual void resolvePaths( QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving ); @@ -125,29 +107,21 @@ QgsApplication.symbolLayerRegistry(). QgsSymbolLayerAbstractMetadata *symbolLayerMetadata( const QString &name ) const; %Docstring return metadata for specified symbol layer. Returns NULL if not found - -:rtype: QgsSymbolLayerAbstractMetadata %End bool addSymbolLayerType( QgsSymbolLayerAbstractMetadata *metadata /Transfer/ ); %Docstring register a new symbol layer type. Takes ownership of the metadata instance. - -:rtype: bool %End QgsSymbolLayer *createSymbolLayer( const QString &name, const QgsStringMap &properties = QgsStringMap() ) const /Factory/; %Docstring create a new instance of symbol layer given symbol layer name and properties - -:rtype: QgsSymbolLayer %End QgsSymbolLayer *createSymbolLayerFromSld( const QString &name, QDomElement &element ) const /Factory/; %Docstring create a new instance of symbol layer given symbol layer name and SLD - -:rtype: QgsSymbolLayer %End void resolvePaths( const QString &name, QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving ) const; @@ -162,15 +136,11 @@ and converting absolute paths to relative paths when saving. QStringList symbolLayersForType( QgsSymbol::SymbolType type ); %Docstring return a list of available symbol layers for a specified symbol type - -:rtype: list of str %End static QgsSymbolLayer *defaultSymbolLayer( QgsSymbol::SymbolType type ) /Factory/; %Docstring create a new instance of symbol layer for specified symbol type with default settings - -:rtype: QgsSymbolLayer %End private: diff --git a/python/core/symbology/qgssymbollayerutils.sip b/python/core/symbology/qgssymbollayerutils.sip index df4213d0af7c..3c6415310a58 100644 --- a/python/core/symbology/qgssymbollayerutils.sip +++ b/python/core/symbology/qgssymbollayerutils.sip @@ -23,132 +23,42 @@ class QgsSymbolLayerUtils public: static QString encodeColor( const QColor &color ); -%Docstring - -:rtype: str -%End static QColor decodeColor( const QString &str ); -%Docstring - -:rtype: QColor -%End static QString encodeSldAlpha( int alpha ); -%Docstring - -:rtype: str -%End static int decodeSldAlpha( const QString &str ); -%Docstring - -:rtype: int -%End static QString encodeSldFontStyle( QFont::Style style ); -%Docstring - -:rtype: str -%End static QFont::Style decodeSldFontStyle( const QString &str ); -%Docstring - -:rtype: QFont.Style -%End static QString encodeSldFontWeight( int weight ); -%Docstring - -:rtype: str -%End static int decodeSldFontWeight( const QString &str ); -%Docstring - -:rtype: int -%End static QString encodePenStyle( Qt::PenStyle style ); -%Docstring - -:rtype: str -%End static Qt::PenStyle decodePenStyle( const QString &str ); -%Docstring - -:rtype: Qt.PenStyle -%End static QString encodePenJoinStyle( Qt::PenJoinStyle style ); -%Docstring - -:rtype: str -%End static Qt::PenJoinStyle decodePenJoinStyle( const QString &str ); -%Docstring - -:rtype: Qt.PenJoinStyle -%End static QString encodePenCapStyle( Qt::PenCapStyle style ); -%Docstring - -:rtype: str -%End static Qt::PenCapStyle decodePenCapStyle( const QString &str ); -%Docstring - -:rtype: Qt.PenCapStyle -%End static QString encodeSldLineJoinStyle( Qt::PenJoinStyle style ); -%Docstring - -:rtype: str -%End static Qt::PenJoinStyle decodeSldLineJoinStyle( const QString &str ); -%Docstring - -:rtype: Qt.PenJoinStyle -%End static QString encodeSldLineCapStyle( Qt::PenCapStyle style ); -%Docstring - -:rtype: str -%End static Qt::PenCapStyle decodeSldLineCapStyle( const QString &str ); -%Docstring - -:rtype: Qt.PenCapStyle -%End static QString encodeBrushStyle( Qt::BrushStyle style ); -%Docstring - -:rtype: str -%End static Qt::BrushStyle decodeBrushStyle( const QString &str ); -%Docstring - -:rtype: Qt.BrushStyle -%End static QString encodeSldBrushStyle( Qt::BrushStyle style ); -%Docstring - -:rtype: str -%End static Qt::BrushStyle decodeSldBrushStyle( const QString &str ); -%Docstring - -:rtype: Qt.BrushStyle -%End static QString encodePoint( QPointF point ); %Docstring Encodes a QPointF to a string. -:rtype: str - .. seealso:: :py:func:`decodePoint()` .. seealso:: :py:func:`encodeSize()` @@ -158,8 +68,6 @@ Encodes a QPointF to a string. %Docstring Decodes a QSizeF from a string. -:rtype: QPointF - .. seealso:: :py:func:`encodePoint()` .. seealso:: :py:func:`decodeSize()` @@ -169,8 +77,6 @@ Decodes a QSizeF from a string. %Docstring Encodes a QSizeF to a string. -:rtype: str - .. seealso:: :py:func:`decodeSize()` .. seealso:: :py:func:`encodePoint()` @@ -182,8 +88,6 @@ Encodes a QSizeF to a string. %Docstring Decodes a QSizeF from a string. -:rtype: QSizeF - .. seealso:: :py:func:`encodeSize()` .. seealso:: :py:func:`decodePoint()` @@ -192,47 +96,22 @@ Decodes a QSizeF from a string. %End static QString encodeMapUnitScale( const QgsMapUnitScale &mapUnitScale ); -%Docstring - -:rtype: str -%End static QgsMapUnitScale decodeMapUnitScale( const QString &str ); -%Docstring - -:rtype: QgsMapUnitScale -%End static QString encodeRealVector( const QVector &v ); -%Docstring - -:rtype: str -%End static QVector decodeRealVector( const QString &s ); -%Docstring - -:rtype: list of qreal -%End static QString encodeSldRealVector( const QVector &v ); -%Docstring - -:rtype: str -%End static QVector decodeSldRealVector( const QString &s ); -%Docstring - -:rtype: list of qreal -%End static QString encodeSldUom( QgsUnitTypes::RenderUnit unit, double *scaleFactor ); %Docstring Encodes a render unit into an SLD unit of measure string. + :param unit: unit to encode :param scaleFactor: if specified, will be set to scale factor for unit of measure :return: encoded string -:rtype: str - .. seealso:: :py:func:`decodeSldUom()` %End @@ -240,12 +119,11 @@ Encodes a render unit into an SLD unit of measure string. static QgsUnitTypes::RenderUnit decodeSldUom( const QString &str, double *scaleFactor ); %Docstring Decodes a SLD unit of measure string to a render unit. + :param str: string to decode :param scaleFactor: if specified, will be set to scale factor for unit of measure :return: matching render unit -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`encodeSldUom()` %End @@ -253,55 +131,40 @@ Decodes a SLD unit of measure string to a render unit. static double sizeInPixelsFromSldUom( const QString &uom, double size ); %Docstring Returns the size scaled in pixels according to the uom attribute. + :param uom: The uom attribute from SLD 1.1 version :param size: The original size :return: the size in pixels -:rtype: float - .. versionadded:: 3.0 %End static QString encodeScaleMethod( QgsSymbol::ScaleMethod scaleMethod ); -%Docstring - -:rtype: str -%End static QgsSymbol::ScaleMethod decodeScaleMethod( const QString &str ); -%Docstring - -:rtype: QgsSymbol.ScaleMethod -%End static QPainter::CompositionMode decodeBlendMode( const QString &s ); -%Docstring - -:rtype: QPainter.CompositionMode -%End static QIcon symbolPreviewIcon( QgsSymbol *symbol, QSize size, int padding = 0 ); %Docstring Returns an icon preview for a color ramp. + :param symbol: symbol :param size: target pixmap size :param padding: space between icon edge and symbol -:rtype: QIcon - .. seealso:: :py:func:`symbolPreviewPixmap()` %End static QPixmap symbolPreviewPixmap( QgsSymbol *symbol, QSize size, int padding = 0, QgsRenderContext *customContext = 0 ); %Docstring Returns a pixmap preview for a color ramp. + :param symbol: symbol :param size: target pixmap size :param padding: space between icon edge and symbol :param customContext: render context to use when rendering symbol -:rtype: QPixmap - .. note:: Parameter customContext added in QGIS 2.6 @@ -312,14 +175,13 @@ Returns a pixmap preview for a color ramp. static QPicture symbolLayerPreviewPicture( QgsSymbolLayer *layer, QgsUnitTypes::RenderUnit units, QSize size, const QgsMapUnitScale &scale = QgsMapUnitScale() ); %Docstring Draws a symbol layer preview to a QPicture + :param layer: symbol layer to draw :param units: size units :param size: target size of preview picture :param scale: map unit scale for preview :return: QPicture containing symbol layer preview -:rtype: QPicture - .. versionadded:: 2.9 @@ -329,14 +191,13 @@ Draws a symbol layer preview to a QPicture static QIcon symbolLayerPreviewIcon( QgsSymbolLayer *layer, QgsUnitTypes::RenderUnit u, QSize size, const QgsMapUnitScale &scale = QgsMapUnitScale() ); %Docstring Draws a symbol layer preview to an icon. + :param layer: symbol layer to draw :param u: size units :param size: target size of preview icon :param scale: map unit scale for preview :return: icon containing symbol layer preview -:rtype: QIcon - .. seealso:: :py:func:`symbolLayerPreviewPicture()` %End @@ -344,24 +205,22 @@ Draws a symbol layer preview to an icon. static QIcon colorRampPreviewIcon( QgsColorRamp *ramp, QSize size, int padding = 0 ); %Docstring Returns an icon preview for a color ramp. + :param ramp: color ramp :param size: target icon size :param padding: space between icon edge and color ramp -:rtype: QIcon - .. seealso:: :py:func:`colorRampPreviewPixmap()` %End static QPixmap colorRampPreviewPixmap( QgsColorRamp *ramp, QSize size, int padding = 0 ); %Docstring Returns a pixmap preview for a color ramp. + :param ramp: color ramp :param size: target pixmap size :param padding: space between icon edge and color ramp -:rtype: QPixmap - .. seealso:: :py:func:`colorRampPreviewIcon()` %End @@ -370,33 +229,26 @@ Returns a pixmap preview for a color ramp. static double estimateMaxSymbolBleed( QgsSymbol *symbol, const QgsRenderContext &context ); %Docstring Returns the maximum estimated bleed for the symbol - -:rtype: float %End static QgsSymbol *loadSymbol( const QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Attempts to load a symbol from a DOM element + :param element: DOM element representing symbol :param context: object to transform relative to absolute paths :return: decoded symbol, if possible -:rtype: QgsSymbol - %End static QgsSymbolLayer *loadSymbolLayer( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Reads and returns symbol layer from XML. Caller is responsible for deleting the returned object - -:rtype: QgsSymbolLayer %End static QDomElement saveSymbol( const QString &symbolName, QgsSymbol *symbol, QDomDocument &doc, const QgsReadWriteContext &context ); %Docstring Writes a symbol definition to XML - -:rtype: QDomElement %End static QString symbolProperties( QgsSymbol *symbol ); @@ -404,102 +256,36 @@ Writes a symbol definition to XML Returns a string representing the symbol. Can be used to test for equality between symbols. -:rtype: str - .. versionadded:: 2.12 %End static bool createSymbolLayerListFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType, QgsSymbolLayerList &layers ); -%Docstring - -:rtype: bool -%End static QgsSymbolLayer *createFillLayerFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createLineLayerFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createMarkerLayerFromSld( QDomElement &element ) /Factory/; -%Docstring - -:rtype: QgsSymbolLayer -%End static bool convertPolygonSymbolizerToPointMarker( QDomElement &element, QgsSymbolLayerList &layerList ); -%Docstring - -:rtype: bool -%End static bool hasExternalGraphic( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool hasWellKnownMark( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needFontMarker( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needSvgMarker( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needEllipseMarker( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needMarkerLine( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needLinePatternFill( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needPointPatternFill( QDomElement &element ); -%Docstring - -:rtype: bool -%End static bool needSvgFill( QDomElement &element ); -%Docstring - -:rtype: bool -%End static void fillToSld( QDomDocument &doc, QDomElement &element, Qt::BrushStyle brushStyle, const QColor &color = QColor() ); static bool fillFromSld( QDomElement &element, Qt::BrushStyle &brushStyle, QColor &color ); -%Docstring - -:rtype: bool -%End static bool lineFromSld( QDomElement &element, Qt::PenStyle &penStyle, QColor &color, double &width, Qt::PenJoinStyle *penJoinStyle = 0, Qt::PenCapStyle *penCapStyle = 0, QVector *customDashPattern = 0, double *dashOffset = 0 ); -%Docstring - -:rtype: bool -%End static void externalGraphicToSld( QDomDocument &doc, QDomElement &element, const QString &path, const QString &mime, @@ -507,10 +293,6 @@ between symbols. static bool externalGraphicFromSld( QDomElement &element, QString &path, QString &mime, QColor &color, double &size ); -%Docstring - -:rtype: bool -%End static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element, const QString &name, const QColor &color, const QColor &strokeColor, Qt::PenStyle strokeStyle, @@ -521,8 +303,6 @@ between symbols. double &strokeWidth, double &size ) /PyName=wellKnownMarkerFromSld2/; %Docstring -:rtype: bool - .. note:: available in Python as wellKnownMarkerFromSld2 @@ -534,10 +314,6 @@ between symbols. static bool externalMarkerFromSld( QDomElement &element, QString &path, QString &format, int &markIndex, QColor &color, double &size ); -%Docstring - -:rtype: bool -%End static void labelTextToSld( QDomDocument &doc, QDomElement &element, const QString &label, @@ -550,42 +326,28 @@ between symbols. const QVector *dashPattern = 0 ); %Docstring Create ogr feature style string for pen - -:rtype: str %End static QString ogrFeatureStyleBrush( const QColor &fillColr ); %Docstring Create ogr feature style string for brush -:param fillColr: fill color* -:rtype: str +:param fillColr: fill color* %End static void createRotationElement( QDomDocument &doc, QDomElement &element, const QString &rotationFunc ); static bool rotationFromSldElement( QDomElement &element, QString &rotationFunc ); -%Docstring - -:rtype: bool -%End static void createOpacityElement( QDomDocument &doc, QDomElement &element, const QString &alphaFunc ); static bool opacityFromSldElement( QDomElement &element, QString &alphaFunc ); -%Docstring - -:rtype: bool -%End static void createDisplacementElement( QDomDocument &doc, QDomElement &element, QPointF offset ); static bool displacementFromSldElement( QDomElement &element, QPointF &offset ); -%Docstring - -:rtype: bool -%End static void createAnchorPointElement( QDomDocument &doc, QDomElement &element, QPointF anchor ); %Docstring Creates a SE 1.1 anchor point element as a child of the specified element + :param doc: The document :param element: The parent element :param anchor: An anchor specification, with values between 0 and 1 @@ -593,80 +355,39 @@ Create ogr feature style string for brush static void createOnlineResourceElement( QDomDocument &doc, QDomElement &element, const QString &path, const QString &format ); static bool onlineResourceFromSldElement( QDomElement &element, QString &path, QString &format ); -%Docstring - -:rtype: bool -%End static void createGeometryElement( QDomDocument &doc, QDomElement &element, const QString &geomFunc ); static bool geometryFromSldElement( QDomElement &element, QString &geomFunc ); -%Docstring - -:rtype: bool -%End static bool createExpressionElement( QDomDocument &doc, QDomElement &element, const QString &function ); %Docstring Creates a OGC Expression element based on the provided function expression + :param doc: The document owning the element :param element: The element parent :param function: The expression to be encoded :return: -:rtype: bool - %End static bool createFunctionElement( QDomDocument &doc, QDomElement &element, const QString &function ); -%Docstring - -:rtype: bool -%End static bool functionFromSldElement( QDomElement &element, QString &function ); -%Docstring - -:rtype: bool -%End static QDomElement createSvgParameterElement( QDomDocument &doc, const QString &name, const QString &value ); -%Docstring - -:rtype: QDomElement -%End static QgsStringMap getSvgParameterList( QDomElement &element ); -%Docstring - -:rtype: QgsStringMap -%End static QDomElement createVendorOptionElement( QDomDocument &doc, const QString &name, const QString &value ); -%Docstring - -:rtype: QDomElement -%End static QgsStringMap getVendorOptionList( QDomElement &element ); -%Docstring - -:rtype: QgsStringMap -%End static QgsStringMap parseProperties( QDomElement &element ); -%Docstring - -:rtype: QgsStringMap -%End static void saveProperties( QgsStringMap props, QDomDocument &doc, QDomElement &element ); static QgsSymbolMap loadSymbols( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring Reads a collection of symbols from XML and returns them in a map. Caller is responsible for deleting returned symbols. - -:rtype: QgsSymbolMap %End static QDomElement saveSymbols( QgsSymbolMap &symbols, const QString &tagName, QDomDocument &doc, const QgsReadWriteContext &context ); %Docstring Writes a collection of symbols to XML with specified tagName for the top-level element - -:rtype: QDomElement %End static void clearSymbolMap( QgsSymbolMap &symbols ); @@ -677,8 +398,6 @@ Creates new mime data from a ``symbol``. This also sets the mime color data to match the symbol's color, so that copied symbols can be paste in places where a color is expected. -:rtype: QMimeData - .. seealso:: :py:func:`symbolFromMimeData()` .. versionadded:: 3.0 @@ -689,8 +408,6 @@ can be paste in places where a color is expected. Attempts to parse ``mime`` data as a symbol. A new symbol instance will be returned if the data was successfully converted to a symbol. -:rtype: QgsSymbol - .. seealso:: :py:func:`symbolToMimeData()` .. versionadded:: 3.0 @@ -699,11 +416,10 @@ if the data was successfully converted to a symbol. static QgsColorRamp *loadColorRamp( QDomElement &element ) /Factory/; %Docstring Creates a color ramp from the settings encoded in an XML element + :param element: DOM element :return: new color ramp. Caller takes responsibility for deleting the returned value. -:rtype: QgsColorRamp - .. seealso:: :py:func:`saveColorRamp()` %End @@ -711,13 +427,12 @@ Creates a color ramp from the settings encoded in an XML element static QDomElement saveColorRamp( const QString &name, QgsColorRamp *ramp, QDomDocument &doc ); %Docstring Encodes a color ramp's settings to an XML element + :param name: name of ramp :param ramp: color ramp to save :param doc: XML document :return: DOM element representing state of color ramp -:rtype: QDomElement - .. seealso:: :py:func:`loadColorRamp()` %End @@ -727,8 +442,6 @@ Encodes a color ramp's settings to an XML element Saves a color ramp to a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to save it to an XML document. -:rtype: QVariant - .. seealso:: :py:func:`loadColorRamp` %End @@ -737,19 +450,16 @@ You can use QgsXmlUtils.writeVariant to save it to an XML document. Load a color ramp from a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.readVariant to load it from an XML document. -:rtype: QgsColorRamp - .. seealso:: :py:func:`colorRampToVariant()` %End static QString colorToName( const QColor &color ); %Docstring Returns a friendly display name for a color + :param color: source color :return: display name for color -:rtype: str - .. versionadded:: 2.5 %End @@ -758,11 +468,10 @@ Returns a friendly display name for a color %Docstring Attempts to parse a string as a list of colors using a variety of common formats, including hex codes, rgb and rgba strings. + :param colorStr: string representing the color list :return: list of parsed colors -:rtype: list of QColor - .. versionadded:: 2.5 %End @@ -771,9 +480,8 @@ codes, rgb and rgba strings. %Docstring Creates mime data from a color. Sets both the mime data's color data, and the mime data's text with the color's hex code. -:param color: color to encode as mime data -:rtype: QMimeData +:param color: color to encode as mime data .. seealso:: :py:func:`colorFromMimeData` @@ -783,13 +491,12 @@ mime data's text with the color's hex code. static QColor colorFromMimeData( const QMimeData *data, bool &hasAlpha ); %Docstring Attempts to parse mime data as a color + :param data: mime data to parse :param hasAlpha: will be set to true if mime data was interpreted as a color containing an explicit alpha value :return: valid color if mimedata could be interpreted as a color, otherwise an -:rtype: QColor - invalid color .. versionadded:: 2.5 @@ -798,11 +505,10 @@ invalid color static QgsNamedColorList colorListFromMimeData( const QMimeData *data ); %Docstring Attempts to parse mime data as a list of named colors + :param data: mime data to parse :return: list of parsed colors -:rtype: QgsNamedColorList - .. versionadded:: 2.5 %End @@ -810,12 +516,11 @@ Attempts to parse mime data as a list of named colors static QMimeData *colorListToMimeData( const QgsNamedColorList &colorList, const bool allFormats = true ) /Factory/; %Docstring Creates mime data from a list of named colors + :param colorList: list of named colors :param allFormats: set to true to include additional mime formats, include text/plain and application/x-color :return: mime data containing encoded colors -:rtype: QMimeData - .. versionadded:: 2.5 %End @@ -823,13 +528,12 @@ Creates mime data from a list of named colors static bool saveColorsToGpl( QFile &file, const QString &paletteName, const QgsNamedColorList &colors ); %Docstring Exports colors to a gpl GIMP palette file + :param file: destination file :param paletteName: name of palette, which is stored in gpl file :param colors: colors to export :return: true if export was successful -:rtype: bool - .. seealso:: :py:func:`importColorsFromGpl` %End @@ -837,13 +541,12 @@ Exports colors to a gpl GIMP palette file static QgsNamedColorList importColorsFromGpl( QFile &file, bool &ok, QString &name ); %Docstring Imports colors from a gpl GIMP palette file + :param file: source gpl file :param ok: will be true if file was successfully read :param name: will be set to palette name from gpl file, if present :return: list of imported colors -:rtype: QgsNamedColorList - .. seealso:: :py:func:`saveColorsToGpl` %End @@ -852,12 +555,11 @@ Imports colors from a gpl GIMP palette file %Docstring Attempts to parse a string as a color using a variety of common formats, including hex codes, rgb and rgba strings. + :param colorStr: string representing the color :param strictEval: set to true for stricter color parsing rules :return: parsed color -:rtype: QColor - .. versionadded:: 2.3 %End @@ -866,13 +568,12 @@ codes, rgb and rgba strings. %Docstring Attempts to parse a string as a color using a variety of common formats, including hex codes, rgb and rgba strings. + :param colorStr: string representing the color :param containsAlpha: if colorStr contains an explicit alpha value then containsAlpha will be set to true :param strictEval: set to true for stricter color parsing rules :return: parsed color -:rtype: QColor - .. versionadded:: 2.3 %End @@ -901,22 +602,16 @@ Sorts the passed list in requested order static QPointF pointOnLineWithDistance( QPointF startPoint, QPointF directionPoint, double distance ); %Docstring Returns a point on the line from startPoint to directionPoint that is a certain distance away from the starting point - -:rtype: QPointF %End static QStringList listSvgFiles(); %Docstring Return a list of all available svg files - -:rtype: list of str %End static QStringList listSvgFilesAt( const QString &directory ); %Docstring Return a list of svg files at the specified directory - -:rtype: list of str %End static QString svgSymbolNameToPath( QString name, const QgsPathResolver &pathResolver ); @@ -924,36 +619,26 @@ Return a list of svg files at the specified directory Get SVG symbol's path from its name. If the name is not absolute path the file is searched in SVG paths specified in settings svg/searchPathsForSVG. - -:rtype: str %End static QString svgSymbolPathToName( QString path, const QgsPathResolver &pathResolver ); %Docstring Get SVG symbols's name from its path - -:rtype: str %End static QPointF polygonCentroid( const QPolygonF &points ); %Docstring Calculate the centroid point of a QPolygonF - -:rtype: QPointF %End static QPointF polygonPointOnSurface( const QPolygonF &points ); %Docstring Calculate a point within of a QPolygonF - -:rtype: QPointF %End static bool pointInPolygon( const QPolygonF &points, QPointF point ); %Docstring Calculate whether a point is within of a QPolygonF - -:rtype: bool %End static QgsExpression *fieldOrExpressionToExpression( const QString &fieldOrExpression ) /Factory/; @@ -963,8 +648,6 @@ If the input is not a valid expression, it is assumed that it is a field name an If the string is empty, returns null pointer. This is useful when accepting input which could be either a non-quoted field name or expression. -:rtype: QgsExpression - .. versionadded:: 2.2 %End @@ -975,8 +658,6 @@ Returns full expression string if the expression is more complex than just one f Using just expression->expression() method may return quoted field name, but that is not wanted for saving (due to backward compatibility) or display in GUI. -:rtype: str - .. versionadded:: 2.2 %End @@ -986,8 +667,6 @@ Computes a sequence of about 'classes' equally spaced round values which cover the range of values from 'minimum' to 'maximum'. The values are chosen so that they are 1, 2 or 5 times a power of 10. -:rtype: list of float - .. versionadded:: 2.10 %End @@ -996,8 +675,6 @@ The values are chosen so that they are 1, 2 or 5 times a power of 10. Rescales the given size based on the uomScale found in the props, if any is found, otherwise returns the value un-modified -:rtype: float - .. versionadded:: 3.0 %End @@ -1006,8 +683,6 @@ returns the value un-modified Rescales the given point based on the uomScale found in the props, if any is found, otherwise returns a copy of the original point -:rtype: QPointF - .. versionadded:: 3.0 %End @@ -1016,8 +691,6 @@ returns a copy of the original point Rescales the given array based on the uomScale found in the props, if any is found, otherwise returns a copy of the original point -:rtype: list of qreal - .. versionadded:: 3.0 %End @@ -1050,8 +723,6 @@ that cannot do SVG at all %Docstring Encodes a reference to a parametric SVG into a path with parameters according to the SVG Parameters spec -:rtype: str - .. versionadded:: 3.0 %End diff --git a/python/core/symbology/qgsvectorfieldsymbollayer.sip b/python/core/symbology/qgsvectorfieldsymbollayer.sip index 3ba20c5db142..24ba92ae2810 100644 --- a/python/core/symbology/qgsvectorfieldsymbollayer.sip +++ b/python/core/symbology/qgsvectorfieldsymbollayer.sip @@ -41,15 +41,7 @@ A symbol layer class for displaying displacement arrows based on point layer att QgsVectorFieldSymbolLayer(); static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ); -%Docstring - -:rtype: QgsSymbolLayer -%End static QgsSymbolLayer *createFromSld( QDomElement &element ); -%Docstring - -:rtype: QgsSymbolLayer -%End virtual QString layerType() const; @@ -85,40 +77,16 @@ A symbol layer class for displaying displacement arrows based on point layer att void setXAttribute( const QString &attribute ); QString xAttribute() const; -%Docstring - -:rtype: str -%End void setYAttribute( const QString &attribute ); QString yAttribute() const; -%Docstring - -:rtype: str -%End void setScale( double s ); double scale() const; -%Docstring - -:rtype: float -%End void setVectorFieldType( VectorFieldType type ); VectorFieldType vectorFieldType() const; -%Docstring - -:rtype: VectorFieldType -%End void setAngleOrientation( AngleOrientation orientation ); AngleOrientation angleOrientation() const; -%Docstring - -:rtype: AngleOrientation -%End void setAngleUnits( AngleUnits units ); AngleUnits angleUnits() const; -%Docstring - -:rtype: AngleUnits -%End virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit ); @@ -133,6 +101,7 @@ A symbol layer class for displaying displacement arrows based on point layer att void setDistanceUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the units for the distance. + :param unit: distance units .. seealso:: :py:func:`distanceUnit()` @@ -142,17 +111,11 @@ Sets the units for the distance. %Docstring Returns the units for the distance. -:rtype: QgsUnitTypes.RenderUnit - .. seealso:: :py:func:`setDistanceUnit()` %End void setDistanceMapUnitScale( const QgsMapUnitScale &scale ); const QgsMapUnitScale &distanceMapUnitScale() const; -%Docstring - -:rtype: QgsMapUnitScale -%End virtual QRectF bounds( QPointF, QgsSymbolRenderContext & ); diff --git a/python/gui/attributetable/qgsattributetabledelegate.sip b/python/gui/attributetable/qgsattributetabledelegate.sip index bacd27958715..e5364b7cb357 100644 --- a/python/gui/attributetable/qgsattributetabledelegate.sip +++ b/python/gui/attributetable/qgsattributetabledelegate.sip @@ -25,6 +25,7 @@ QItemDelegate). QgsAttributeTableDelegate( QObject *parent /TransferThis/ = 0 ); %Docstring Constructor + :param parent: parent object %End @@ -33,8 +34,6 @@ Constructor %Docstring Used to create an editor for when the user tries to change the contents of a cell - -:rtype: QWidget %End virtual void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const; @@ -47,6 +46,7 @@ Overloads the paint method form the QItemDelegate base class %Docstring Sets data from editor back to model. Overloads default method + :param editor: editor which was created by create editor function in this class :param model: model where data should be updated :param index: index of field which is to be modified @@ -56,6 +56,7 @@ Sets data from editor back to model. Overloads default method %Docstring Sets data from model into the editor. Overloads default method + :param editor: editor which was created by create editor function in this class :param index: index of field which is to be retrieved %End diff --git a/python/gui/attributetable/qgsattributetablefiltermodel.sip b/python/gui/attributetable/qgsattributetablefiltermodel.sip index b1fbd1849028..fb6235fd1cf8 100644 --- a/python/gui/attributetable/qgsattributetablefiltermodel.sip +++ b/python/gui/attributetable/qgsattributetablefiltermodel.sip @@ -70,8 +70,6 @@ will be sorted on top, regardless of the current sort column Returns if selected features are currently shown on top :return: True if selected are shown on top -:rtype: bool - %End virtual void setFilteredFeatures( const QgsFeatureIds &ids ); @@ -87,8 +85,6 @@ The filter mode will automatically be adjusted to show only these features (Show Get a list of currently filtered feature ids :return: A list of feature ids -:rtype: QgsFeatureIds - %End void setFilterMode( FilterMode filterMode ); @@ -101,8 +97,6 @@ Set the filter mode the filter will use. FilterMode filterMode(); %Docstring The current filterModel - -:rtype: FilterMode %End QgsVectorLayer *layer() const; @@ -110,8 +104,6 @@ The current filterModel Returns the layer this filter acts on. :return: Abovementioned layer -:rtype: QgsVectorLayer - %End QgsVectorLayerCache *layerCache() const; @@ -119,8 +111,6 @@ Returns the layer this filter acts on. Returns the layerCache this filter acts on. :return: The layer cache -:rtype: QgsVectorLayerCache - %End QgsAttributeTableModel *masterModel() const; @@ -128,8 +118,6 @@ Returns the layerCache this filter acts on. Returns the table model this filter is using :return: the table model in quesion -:rtype: QgsAttributeTableModel - %End QgsFeatureId rowToId( const QModelIndex &row ); @@ -139,30 +127,16 @@ Returns the feature id for a given model index. :param row: A model index of the row in question :return: The feature id of the feature visible in the provided row -:rtype: QgsFeatureId - %End virtual QModelIndex fidToIndex( QgsFeatureId fid ); QModelIndexList fidToIndexList( QgsFeatureId fid ); -%Docstring - -:rtype: QModelIndexList -%End QModelIndex mapToMaster( const QModelIndex &proxyIndex ) const; -%Docstring - -:rtype: QModelIndex -%End QModelIndex mapFromMaster( const QModelIndex &sourceIndex ) const; -%Docstring - -:rtype: QModelIndex -%End virtual QModelIndex mapToSource( const QModelIndex &proxyIndex ) const; @@ -195,15 +169,11 @@ Prefetches all the data from the layer to speed up sorting. QString sortExpression() const; %Docstring The expression which is used to sort the attribute table. - -:rtype: str %End QgsMapCanvas *mapCanvas() const; %Docstring Returns the map canvas - -:rtype: QgsMapCanvas %End virtual QVariant data( const QModelIndex &index, int role ) const; @@ -216,8 +186,6 @@ Returns the map canvas %Docstring Get the index of the first column that contains an action widget. Returns -1 if none is defined. - -:rtype: int %End virtual int columnCount( const QModelIndex &parent ) const; @@ -235,6 +203,7 @@ is shown. void sortColumnChanged( int column, Qt::SortOrder order ); %Docstring Is emitted whenever the sort column is changed + :param column: The sort column :param order: The sort order %End @@ -248,8 +217,6 @@ Returns true if the source row will be accepted :param sourceRow: row from the source model :param sourceParent: parent index in the source model - -:rtype: bool %End void generateListOfVisibleFeatures(); @@ -263,8 +230,6 @@ Is called automatically when the filter mode is adjusted or the extents changed. %Docstring Used by the sorting algorithm. Compares the two model indices. Will also consider the selection state of the feature in case selected features are to be shown on top. - -:rtype: bool %End public slots: diff --git a/python/gui/attributetable/qgsattributetablemodel.sip b/python/gui/attributetable/qgsattributetablemodel.sip index db82db0e0414..d38b9dbfa7d8 100644 --- a/python/gui/attributetable/qgsattributetablemodel.sip +++ b/python/gui/attributetable/qgsattributetablemodel.sip @@ -40,6 +40,7 @@ Is mostly referred to as "master model" within this doc and the source. QgsAttributeTableModel( QgsVectorLayerCache *layerCache, QObject *parent = 0 ); %Docstring Constructor + :param layerCache: A layer cache to use as backend :param parent: The parent QObject (owner) %End @@ -48,64 +49,59 @@ Constructor %Docstring Returns the number of rows -:param parent: parent index -:rtype: int +:param parent: parent index %End virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const; %Docstring Returns the number of columns -:param parent: parent index -:rtype: int +:param parent: parent index %End virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; %Docstring Returns header data + :param section: required section :param orientation: horizontal or vertical orientation :param role: data role - -:rtype: QVariant %End virtual QVariant data( const QModelIndex &index, int role ) const; %Docstring Returns data on the given index + :param index: model index :param role: data role - -:rtype: QVariant %End virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ); %Docstring Updates data on given index + :param index: model index :param value: new data value :param role: data role - -:rtype: bool %End virtual Qt::ItemFlags flags( const QModelIndex &index ) const; %Docstring Returns item flags for the index -:param index: model index -:rtype: Qt.ItemFlags +:param index: model index %End void reload( const QModelIndex &index1, const QModelIndex &index2 ); %Docstring Reloads the model data between indices + :param index1: start index :param index2: end index %End @@ -114,8 +110,6 @@ Reloads the model data between indices %Docstring Remove rows - -:rtype: bool %End void resetModel(); @@ -128,48 +122,35 @@ Alias to loadLayer() int idToRow( QgsFeatureId id ) const; %Docstring Maps feature id to table row -:param id: feature id -:rtype: int +:param id: feature id %End QModelIndex idToIndex( QgsFeatureId id ) const; -%Docstring - -:rtype: QModelIndex -%End QModelIndexList idToIndexList( QgsFeatureId id ) const; -%Docstring - -:rtype: QModelIndexList -%End int fieldIdx( int col ) const; %Docstring get field index from column - -:rtype: int %End int fieldCol( int idx ) const; %Docstring get column from field index - -:rtype: int %End QgsFeatureId rowToId( int row ) const; %Docstring Maps row to feature id -:param row: row number -:rtype: QgsFeatureId +:param row: row number %End void swapRows( QgsFeatureId a, QgsFeatureId b ); %Docstring Swaps two rows + :param a: first row :param b: second row %End @@ -177,15 +158,11 @@ Swaps two rows QgsVectorLayer *layer() const; %Docstring Returns the layer this model uses as backend. Retrieved from the layer cache. - -:rtype: QgsVectorLayer %End QgsVectorLayerCache *layerCache() const; %Docstring Returns the layer cache this model uses as backend. - -:rtype: QgsVectorLayerCache %End void executeAction( const QUuid &action, const QModelIndex &idx ) const; @@ -203,8 +180,6 @@ Execute a QgsMapLayerAction Return the feature attributes at given model index :return: feature attributes at given model index -:rtype: QgsFeature - %End void prefetchColumnData( int column ); @@ -227,8 +202,6 @@ the sorting can later be done in a performant way. QString sortCacheExpression() const; %Docstring The expression which was used to fill the sorting cache - -:rtype: str %End void setRequest( const QgsFeatureRequest &request ); @@ -241,10 +214,6 @@ to dynamically adjust it. %End const QgsFeatureRequest &request() const; -%Docstring - -:rtype: QgsFeatureRequest -%End void setEditorContext( const QgsAttributeEditorContext &context ); %Docstring @@ -260,16 +229,12 @@ Returns the context in which this table is shown. Will be forwarded to any editor widget created when editing data on this model. :return: The context -:rtype: QgsAttributeEditorContext - %End int extraColumns() const; %Docstring Empty extra columns to announce from this model. Any extra columns need to be implemented by proxy models in front of this model. - -:rtype: int %End void setExtraColumns( int extraColumns ); @@ -289,6 +254,7 @@ Preferably to be called, before using this model as source for any other proxy m void fieldConditionalStyleChanged( const QString &fieldName ); %Docstring Handles updating the model when the conditional style for a field changes. + :param fieldName: name of field whose conditional style has changed .. versionadded:: 2.12 diff --git a/python/gui/attributetable/qgsattributetableview.sip b/python/gui/attributetable/qgsattributetableview.sip index e6a848e22265..a72b6a728848 100644 --- a/python/gui/attributetable/qgsattributetableview.sip +++ b/python/gui/attributetable/qgsattributetableview.sip @@ -36,6 +36,7 @@ Constructor for QgsAttributeTableView void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager /Transfer/ ); %Docstring setFeatureSelectionManager + :param featureSelectionManager: We will take ownership %End @@ -50,8 +51,6 @@ which can be slow due to recurring canvas repaints. :param event: The intercepted event :return: Returns always false, so the event gets processed -:rtype: bool - %End void setAttributeTableConfig( const QgsAttributeTableConfig &config ); @@ -114,6 +113,7 @@ so the menu can be populated by other parts of the application. %Docstring Saves geometry to the settings on close + :param event: not used %End @@ -132,6 +132,7 @@ In most cases, this will be a QgsAttributeTableFilterModel void columnResized( int column, int width ); %Docstring Emitted when a column in the view has been resized. + :param column: column index (starts at 0) :param width: new width in pixel diff --git a/python/gui/attributetable/qgsdualview.sip b/python/gui/attributetable/qgsdualview.sip index 49f993e95828..5d290d66d74b 100644 --- a/python/gui/attributetable/qgsdualview.sip +++ b/python/gui/attributetable/qgsdualview.sip @@ -38,6 +38,7 @@ and the attributes for the currently selected feature are shown in a form. explicit QgsDualView( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor + :param parent: The parent widget %End @@ -68,8 +69,6 @@ Change the current view mode. %Docstring Returns the current view mode. -:rtype: ViewMode - .. seealso:: :py:func:`setView()` .. versionadded:: 2.16 @@ -87,8 +86,6 @@ Set the filter mode Get the filter mode :return: the filter mode -:rtype: QgsAttributeTableFilterModel.FilterMode - %End void setSelectedOnTop( bool selectedOnTop ); @@ -104,8 +101,6 @@ False: Use defined sorting column. Returns the number of features on the layer. :return: Number of features -:rtype: int - %End int filteredFeatureCount(); @@ -114,8 +109,6 @@ Returns the number of features which are currently visible, according to the filter restrictions :return: Number of features -:rtype: int - %End void setFilteredFeatures( const QgsFeatureIds &filteredFeatures ); @@ -128,8 +121,6 @@ Set a list of currently visible features QgsFeatureIds filteredFeatures(); %Docstring Get a list of currently visible feature ids. - -:rtype: QgsFeatureIds %End QgsAttributeTableModel *masterModel() const; @@ -137,8 +128,6 @@ Get a list of currently visible feature ids. Returns the model which has the information about all features (not only filtered) :return: The master model -:rtype: QgsAttributeTableModel - %End void setRequest( const QgsFeatureRequest &request ); @@ -160,8 +149,6 @@ Set the feature selection model Returns the table view :return: The table view -:rtype: QgsAttributeTableView - %End void setAttributeTableConfig( const QgsAttributeTableConfig &config ); @@ -178,8 +165,6 @@ Set the expression used for sorting the table and feature list. QString sortExpression() const; %Docstring Get the expression used for sorting the table and feature list. - -:rtype: str %End public slots: @@ -196,8 +181,6 @@ Get the expression used for sorting the table and feature list. saveEditChanges :return: true if the saving was OK. false is possible due to connected -:rtype: bool - validation logic. %End @@ -213,6 +196,7 @@ Sets whether multi edit mode is enabled. void toggleSearchMode( bool enabled ); %Docstring Toggles whether search mode should be enabled in the form. + :param enabled: set to true to switch on search mode .. versionadded:: 2.16 @@ -237,6 +221,7 @@ Cancel the progress dialog (if any) void displayExpressionChanged( const QString &expression ); %Docstring Is emitted, whenever the display expression is successfully changed + :param expression: The expression that was applied %End @@ -248,6 +233,7 @@ Is emitted, whenever the filter changes void filterExpressionSet( const QString &expression, QgsAttributeForm::FilterType type ); %Docstring Is emitted when a filter expression is set using the view. + :param expression: filter expression :param type: filter type @@ -257,6 +243,7 @@ Is emitted when a filter expression is set using the view. void formModeChanged( QgsAttributeForm::Mode mode ); %Docstring Emitted when the form changes mode. + :param mode: new mode %End diff --git a/python/gui/attributetable/qgsfeaturelistmodel.sip b/python/gui/attributetable/qgsfeaturelistmodel.sip index 1f98a8407cca..5e957925ee57 100644 --- a/python/gui/attributetable/qgsfeaturelistmodel.sip +++ b/python/gui/attributetable/qgsfeaturelistmodel.sip @@ -45,10 +45,6 @@ Constructor for QgsFeatureListModel virtual void setSourceModel( QgsAttributeTableFilterModel *sourceModel ); QgsVectorLayerCache *layerCache(); -%Docstring - -:rtype: QgsVectorLayerCache -%End virtual QVariant data( const QModelIndex &index, int role ) const; virtual Qt::ItemFlags flags( const QModelIndex &index ) const; @@ -57,6 +53,7 @@ Constructor for QgsFeatureListModel void setInjectNull( bool injectNull ); %Docstring If true is specified, a NULL value will be injected + :param injectNull: state of null value injection .. versionadded:: 2.9 @@ -67,17 +64,11 @@ Constructor for QgsFeatureListModel Returns the current state of null value injection :return: If a NULL value is added -:rtype: bool - .. versionadded:: 2.9 %End QgsAttributeTableModel *masterModel(); -%Docstring - -:rtype: QgsAttributeTableModel -%End bool setDisplayExpression( const QString &expression ); %Docstring @@ -85,8 +76,6 @@ Constructor for QgsFeatureListModel \param expression A QgsExpression compatible string. :return: true if the expression could be set, false if there was a parse error. -:rtype: bool - If it fails, the old expression will still be applied. Call parserErrorString() for a meaningful error message. %End @@ -96,30 +85,12 @@ for a meaningful error message. Returns a detailed message about errors while parsing a QgsExpression. :return: A message containing information about the parser error. -:rtype: str - %End QString displayExpression() const; -%Docstring - -:rtype: str -%End bool featureByIndex( const QModelIndex &index, QgsFeature &feat ); -%Docstring - -:rtype: bool -%End QgsFeatureId idxToFid( const QModelIndex &index ) const; -%Docstring - -:rtype: QgsFeatureId -%End QModelIndex fidToIdx( const QgsFeatureId fid ) const; -%Docstring - -:rtype: QModelIndex -%End virtual QModelIndex mapToSource( const QModelIndex &proxyIndex ) const; @@ -127,26 +98,10 @@ for a meaningful error message. virtual QModelIndex mapToMaster( const QModelIndex &proxyIndex ) const; -%Docstring - -:rtype: QModelIndex -%End virtual QModelIndex mapFromMaster( const QModelIndex &sourceIndex ) const; -%Docstring - -:rtype: QModelIndex -%End virtual QItemSelection mapSelectionFromMaster( const QItemSelection &selection ) const; -%Docstring - -:rtype: QItemSelection -%End virtual QItemSelection mapSelectionToMaster( const QItemSelection &selection ) const; -%Docstring - -:rtype: QItemSelection -%End virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; @@ -160,10 +115,6 @@ for a meaningful error message. virtual QModelIndex fidToIndex( QgsFeatureId fid ); QModelIndexList fidToIndexList( QgsFeatureId fid ); -%Docstring - -:rtype: QModelIndexList -%End public slots: void onBeginRemoveRows( const QModelIndex &parent, int first, int last ); diff --git a/python/gui/attributetable/qgsfeaturelistview.sip b/python/gui/attributetable/qgsfeaturelistview.sip index dff7895f9f53..9a8a199c36a0 100644 --- a/python/gui/attributetable/qgsfeaturelistview.sip +++ b/python/gui/attributetable/qgsfeaturelistview.sip @@ -36,8 +36,6 @@ Creates a feature list view Returns the layer cache :return: the layer cache used as backend -:rtype: QgsVectorLayerCache - %End virtual void setModel( QgsFeatureListModel *featureListModel ); @@ -52,8 +50,6 @@ Set the QgsFeatureListModel which is used to retrieve information Get the featureListModel used by this view :return: The model in use -:rtype: QgsFeatureListModel - %End bool setDisplayExpression( const QString &displayExpression ); @@ -63,8 +59,6 @@ which is displaied. :param displayExpression: The expression used to render the feature -:rtype: bool - .. seealso:: :py:class:`QgsExpression` %End @@ -73,8 +67,6 @@ which is displaied. Returns the expression which is currently used to render the features. :return: A string containing the currend display expression -:rtype: str - .. seealso:: :py:class:`QgsExpression` %End @@ -84,8 +76,6 @@ Returns the expression which is currently used to render the features. Returns a detailed message about errors while parsing a QgsExpression. :return: A message containing information about the parser error. -:rtype: str - %End QgsFeatureIds currentEditSelection(); @@ -93,8 +83,6 @@ Returns a detailed message about errors while parsing a QgsExpression. Get the currentEditSelection :return: A list of edited feature ids -:rtype: QgsFeatureIds - %End void setCurrentFeatureEdited( bool state ); @@ -107,6 +95,7 @@ Sets if the currently shown form has received any edit events so far. void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager /Transfer/ ); %Docstring setFeatureSelectionManager + :param featureSelectionManager: We will take ownership %End @@ -134,6 +123,7 @@ Is emitted, whenever the current edit selection has been changed. void displayExpressionChanged( const QString &expression ); %Docstring Is emitted, whenever the display expression is successfully changed + :param expression: The expression that was applied %End diff --git a/python/gui/attributetable/qgsfeaturelistviewdelegate.sip b/python/gui/attributetable/qgsfeaturelistviewdelegate.sip index 6e03a9d93fa9..c6280e4f1577 100644 --- a/python/gui/attributetable/qgsfeaturelistviewdelegate.sip +++ b/python/gui/attributetable/qgsfeaturelistviewdelegate.sip @@ -28,10 +28,6 @@ class QgsFeatureListViewDelegate : QItemDelegate void setEditSelectionModel( QItemSelectionModel *editSelectionModel ); Element positionToElement( QPoint pos ); -%Docstring - -:rtype: Element -%End void setFeatureSelectionModel( QgsFeatureSelectionModel *featureSelectionModel ); diff --git a/python/gui/attributetable/qgsfeaturemodel.sip b/python/gui/attributetable/qgsfeaturemodel.sip index 6e6fab521873..e4b1abaf35fe 100644 --- a/python/gui/attributetable/qgsfeaturemodel.sip +++ b/python/gui/attributetable/qgsfeaturemodel.sip @@ -17,10 +17,6 @@ class QgsFeatureModel virtual ~QgsFeatureModel(); virtual QModelIndex fidToIndex( QgsFeatureId fid ) = 0; -%Docstring - -:rtype: QModelIndex -%End }; /************************************************************************ diff --git a/python/gui/attributetable/qgsfeatureselectionmodel.sip b/python/gui/attributetable/qgsfeatureselectionmodel.sip index a8d8e801f5b5..f921b1c03757 100644 --- a/python/gui/attributetable/qgsfeatureselectionmodel.sip +++ b/python/gui/attributetable/qgsfeatureselectionmodel.sip @@ -37,8 +37,6 @@ Returns the selection status of a given feature id. :param fid: The featureid to determine the selection status of :return: The selection status -:rtype: bool - %End virtual bool isSelected( const QModelIndex &index ); @@ -48,8 +46,6 @@ Returns the selection status of a given QModelIndex. :param index: The index to determine the selection status of :return: The selection status -:rtype: bool - %End signals: diff --git a/python/gui/attributetable/qgsfieldconditionalformatwidget.sip b/python/gui/attributetable/qgsfieldconditionalformatwidget.sip index 2d8240913e3e..5a85e698e0aa 100644 --- a/python/gui/attributetable/qgsfieldconditionalformatwidget.sip +++ b/python/gui/attributetable/qgsfieldconditionalformatwidget.sip @@ -26,6 +26,7 @@ A widget for customising conditional formatting options. explicit QgsFieldConditionalFormatWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsFieldConditionalFormatWidget. + :param parent: parent widget %End @@ -37,18 +38,21 @@ Switches the widget to the rules page. void setLayer( QgsVectorLayer *layer ); %Docstring Sets the vector layer associated with the widget. + :param layer: vector layer %End void editStyle( int index, const QgsConditionalStyle &style ); %Docstring Switches the widget to the edit style mode for the specified style. + :param index: index of conditional style to edit :param style: initial conditional styling options %End void loadStyle( const QgsConditionalStyle &style ); %Docstring + :param style: initial conditional styling options %End @@ -60,6 +64,7 @@ Resets the formatting options to their default state. void setPresets( const QList &styles ); %Docstring Set the presets that can be used for quick pick + :param styles: A list of styles used as presets %End @@ -69,8 +74,6 @@ Resets the formatting options to their default state. created however called setPresets will override the default styles. :return: List of default presets. -:rtype: list of QgsConditionalStyle - %End signals: @@ -78,6 +81,7 @@ created however called setPresets will override the default styles. void rulesUpdated( const QString &fieldName ); %Docstring Emitted when the conditional styling rules are updated. + :param fieldName: name of field whose rules have been modified. %End diff --git a/python/gui/attributetable/qgsifeatureselectionmanager.sip b/python/gui/attributetable/qgsifeatureselectionmanager.sip index b072ed5ccdcf..1b58a329ded7 100644 --- a/python/gui/attributetable/qgsifeatureselectionmanager.sip +++ b/python/gui/attributetable/qgsifeatureselectionmanager.sip @@ -28,8 +28,6 @@ e.g. QgsVectorLayer implements this interface to manage its selections. The number of features that are selected in this layer :return: See description -:rtype: int - %End virtual void select( const QgsFeatureIds &ids ) = 0; @@ -60,8 +58,6 @@ clearAndSelect flag set. Return reference to identifiers of selected features :return: A list of QgsFeatureId's -:rtype: QgsFeatureIds - .. seealso:: :py:func:`selectedFeatures()` %End diff --git a/python/gui/attributetable/qgsorganizetablecolumnsdialog.sip b/python/gui/attributetable/qgsorganizetablecolumnsdialog.sip index 24b91dddc87d..56e57183bbec 100644 --- a/python/gui/attributetable/qgsorganizetablecolumnsdialog.sip +++ b/python/gui/attributetable/qgsorganizetablecolumnsdialog.sip @@ -27,6 +27,7 @@ Dialog for organising (hiding and reordering) columns in the attributes table. QgsOrganizeTableColumnsDialog( const QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::Window ); %Docstring Constructor + :param vl: The concerned vector layer :param parent: parent object :param flags: window flags @@ -37,8 +38,6 @@ Constructor QgsAttributeTableConfig config() const; %Docstring Get the updated configuration - -:rtype: QgsAttributeTableConfig %End public slots: diff --git a/python/gui/auth/qgsauthauthoritieseditor.sip b/python/gui/auth/qgsauthauthoritieseditor.sip index f83b39cb6359..a6ffdec6bc01 100644 --- a/python/gui/auth/qgsauthauthoritieseditor.sip +++ b/python/gui/auth/qgsauthauthoritieseditor.sip @@ -24,6 +24,7 @@ Widget for viewing and editing authentication identities database explicit QgsAuthAuthoritiesEditor( QWidget *parent /TransferThis/ = 0 ); %Docstring Widget for viewing and editing certificate authorities directly in database + :param parent: Parent widget %End diff --git a/python/gui/auth/qgsauthcertificateinfo.sip b/python/gui/auth/qgsauthcertificateinfo.sip index 8f47f6280244..b9633d781151 100644 --- a/python/gui/auth/qgsauthcertificateinfo.sip +++ b/python/gui/auth/qgsauthcertificateinfo.sip @@ -31,10 +31,6 @@ Constructor for QgsAuthCertInfo %End bool trustCacheRebuilt(); -%Docstring - -:rtype: bool -%End }; @@ -56,6 +52,7 @@ Dialog wrapper for widget displaying detailed info on a certificate and its hier const QList &connectionCAs = QList() ); %Docstring Construct a dialog displaying detailed info on a certificate and its hierarchical trust chain + :param cert: Certificate object :param manageCertTrust: Whether to show widgets to manage the trust policy of certs in hierarchy :param parent: Parent widget @@ -65,16 +62,12 @@ Construct a dialog displaying detailed info on a certificate and its hierarchica QgsAuthCertInfo *certInfoWidget(); %Docstring Get access to embedded info widget - -:rtype: QgsAuthCertInfo %End bool trustCacheRebuilt(); %Docstring Whether the trust cache has been rebuilt -:rtype: bool - .. note:: This happens when a trust policy has been adjusted for any cert in the hierarchy diff --git a/python/gui/auth/qgsauthcertificatemanager.sip b/python/gui/auth/qgsauthcertificatemanager.sip index e0407fd79a8a..9eefa46fe78b 100644 --- a/python/gui/auth/qgsauthcertificatemanager.sip +++ b/python/gui/auth/qgsauthcertificatemanager.sip @@ -24,6 +24,7 @@ Wrapper widget to manage available certificate editors explicit QgsAuthCertEditors( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a widget to contain various certificate editors + :param parent: Parent widget %End @@ -50,14 +51,13 @@ Dialog wrapper for widget to manage available certificate editors explicit QgsAuthCertManager( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a dialog wrapper for widget to manage available certificate editors + :param parent: Parent widget %End QgsAuthCertEditors *certEditorsWidget(); %Docstring Get access to embedded editors widget - -:rtype: QgsAuthCertEditors %End }; diff --git a/python/gui/auth/qgsauthcerttrustpolicycombobox.sip b/python/gui/auth/qgsauthcerttrustpolicycombobox.sip index 883441a5ed88..131483b2473d 100644 --- a/python/gui/auth/qgsauthcerttrustpolicycombobox.sip +++ b/python/gui/auth/qgsauthcerttrustpolicycombobox.sip @@ -25,6 +25,7 @@ Widget for editing the trust policy associated with a Certificate (Intermediate) QgsAuthCertUtils::CertTrustPolicy defaultpolicy = QgsAuthCertUtils::DefaultTrust ); %Docstring Construct a combo box for defining certificate trust policy + :param parent: Parent widget :param policy: Defined trust policy :param defaultpolicy: Default trust policy @@ -33,15 +34,11 @@ Construct a combo box for defining certificate trust policy QgsAuthCertUtils::CertTrustPolicy trustPolicy(); %Docstring Get currently set trust policy - -:rtype: QgsAuthCertUtils.CertTrustPolicy %End QgsAuthCertUtils::CertTrustPolicy trustPolicyForIndex( int indx ); %Docstring Get trust policy for a given index of combobox - -:rtype: QgsAuthCertUtils.CertTrustPolicy %End public slots: diff --git a/python/gui/auth/qgsauthconfigeditor.sip b/python/gui/auth/qgsauthconfigeditor.sip index a21639cb0ba0..bf5898b331d8 100644 --- a/python/gui/auth/qgsauthconfigeditor.sip +++ b/python/gui/auth/qgsauthconfigeditor.sip @@ -24,6 +24,7 @@ Widget for editing authentication configuration database explicit QgsAuthConfigEditor( QWidget *parent /TransferThis/ = 0, bool showUtilities = true, bool relayMessages = true ); %Docstring Widget for editing authentication configurations directly in database + :param parent: Parent widget :param showUtilities: Whether to show the widget's utilities button :param relayMessages: Whether to relay auth manager messages to internal message bar diff --git a/python/gui/auth/qgsauthconfigselect.sip b/python/gui/auth/qgsauthconfigselect.sip index a5329f1b6906..11b380719f22 100644 --- a/python/gui/auth/qgsauthconfigselect.sip +++ b/python/gui/auth/qgsauthconfigselect.sip @@ -25,6 +25,7 @@ Selector widget for authentication configs %Docstring Create a dialog for setting an associated authentication config, either from existing configs, or creating/removing them from auth database + :param parent: Parent widget :param dataprovider: The key of the calling layer provider, if applicable %End @@ -37,8 +38,6 @@ Set the authentication config id for the resource const QString configId() const; %Docstring Get the authentication config id for the resource - -:rtype: str %End void setDataProviderKey( const QString &key ); @@ -90,6 +89,7 @@ Dialog wrapper of select widget to edit an authcfg in a data source URI const QString &dataprovider = QString() ); %Docstring Construct wrapper dialog for select widget to edit an authcfg in a data source URI + :param parent: Parent widget :param datauri: URI QString with of without an authcfg=ID string :param dataprovider: The key of the calling layer provider, if applicable @@ -103,15 +103,11 @@ Set the data source URI to parse QString dataSourceUri(); %Docstring The returned, possibly edited data source URI - -:rtype: str %End static bool hasConfigId( const QString &txt ); %Docstring Whether a string contains an authcfg ID - -:rtype: bool %End }; diff --git a/python/gui/auth/qgsautheditorwidgets.sip b/python/gui/auth/qgsautheditorwidgets.sip index 08a5d262008d..974cb82d92d1 100644 --- a/python/gui/auth/qgsautheditorwidgets.sip +++ b/python/gui/auth/qgsautheditorwidgets.sip @@ -22,6 +22,7 @@ Dialog for viewing available authentication method plugins explicit QgsAuthMethodPlugins( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a dialog for viewing available authentication method plugins + :param parent: Parent widget %End @@ -42,6 +43,7 @@ Wrapper widget for available authentication editors explicit QgsAuthEditorWidgets( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a widget to contain various authentication editors + :param parent: Parent widget %End diff --git a/python/gui/auth/qgsauthidentitieseditor.sip b/python/gui/auth/qgsauthidentitieseditor.sip index aebe068c7f3e..07056b860ca3 100644 --- a/python/gui/auth/qgsauthidentitieseditor.sip +++ b/python/gui/auth/qgsauthidentitieseditor.sip @@ -24,6 +24,7 @@ Widget for viewing and editing authentication identities database explicit QgsAuthIdentitiesEditor( QWidget *parent /TransferThis/ = 0 ); %Docstring Widget for editing authentication configurations directly in database + :param parent: Parent widget %End diff --git a/python/gui/auth/qgsauthimportcertdialog.sip b/python/gui/auth/qgsauthimportcertdialog.sip index 59c36a4bb315..423674d5d4f8 100644 --- a/python/gui/auth/qgsauthimportcertdialog.sip +++ b/python/gui/auth/qgsauthimportcertdialog.sip @@ -38,6 +38,7 @@ Widget for importing a certificate into the authentication database QgsAuthImportCertDialog::CertInput input = AllInputs ); %Docstring Construct a dialog for importing certificates + :param parent: Parent widget :param filter: Certificate type filter to apply to dialog :param input: Type of input(s) for certificates @@ -46,36 +47,26 @@ Construct a dialog for importing certificates const QList certificatesToImport(); %Docstring Get list of certificate objects to import - -:rtype: list of QSslCertificate %End const QString certFileToImport(); %Docstring Get the file path to a certificate to import - -:rtype: str %End const QString certTextToImport(); %Docstring Get certificate text to import - -:rtype: str %End bool allowInvalidCerts(); %Docstring Whether to allow importation of invalid certificates (so trust policy can be overridden) - -:rtype: bool %End QgsAuthCertUtils::CertTrustPolicy certTrustPolicy(); %Docstring Defined trust policy for imported certificates - -:rtype: QgsAuthCertUtils.CertTrustPolicy %End }; diff --git a/python/gui/auth/qgsauthimportidentitydialog.sip b/python/gui/auth/qgsauthimportidentitydialog.sip index 2cde5caa1a41..b08d6e8fd384 100644 --- a/python/gui/auth/qgsauthimportidentitydialog.sip +++ b/python/gui/auth/qgsauthimportidentitydialog.sip @@ -42,6 +42,7 @@ Widget for importing an identity certificate/key bundle into the authentication QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a dialog for importing identities + :param identitytype: Type of the identity to import :param parent: Parent widget %End @@ -49,16 +50,12 @@ Construct a dialog for importing identities QgsAuthImportIdentityDialog::IdentityType identityType(); %Docstring Get identity type - -:rtype: QgsAuthImportIdentityDialog.IdentityType %End const QgsPkiBundle pkiBundleToImport(); %Docstring Get certificate/key bundle to be imported as a PKI bundle object - -:rtype: QgsPkiBundle %End }; diff --git a/python/gui/auth/qgsauthmethodedit.sip b/python/gui/auth/qgsauthmethodedit.sip index aed1f4c5669f..e2a01c1947a4 100644 --- a/python/gui/auth/qgsauthmethodedit.sip +++ b/python/gui/auth/qgsauthmethodedit.sip @@ -22,15 +22,11 @@ Abstract base class for the edit widget of authentication method plugins virtual bool validateConfig() = 0; %Docstring Validate the configuration of subclasses - -:rtype: bool %End virtual QgsStringMap configMap() const = 0; %Docstring The configuration key-vale map of subclasses - -:rtype: QgsStringMap %End signals: @@ -44,6 +40,7 @@ Emitted when the configuration validatity changes virtual void loadConfig( const QgsStringMap &configmap ) = 0; %Docstring Load an existing config map into subclassed widget + :param configmap: %End @@ -66,6 +63,7 @@ Construct widget to edit an authentication method configuration .. note:: Non-public since this is an abstract base class + :param parent: Parent widget %End diff --git a/python/gui/auth/qgsauthserverseditor.sip b/python/gui/auth/qgsauthserverseditor.sip index f61f007bab2c..b1defb045632 100644 --- a/python/gui/auth/qgsauthserverseditor.sip +++ b/python/gui/auth/qgsauthserverseditor.sip @@ -24,6 +24,7 @@ Widget for viewing and editing servers in authentication database explicit QgsAuthServersEditor( QWidget *parent /TransferThis/ = 0 ); %Docstring Widget for editing authentication configurations directly in database + :param parent: Parent Widget %End diff --git a/python/gui/auth/qgsauthsettingswidget.sip b/python/gui/auth/qgsauthsettingswidget.sip index 7fbdfcb77090..3f3029ae2a87 100644 --- a/python/gui/auth/qgsauthsettingswidget.sip +++ b/python/gui/auth/qgsauthsettingswidget.sip @@ -40,6 +40,7 @@ to an authentication configuration. %Docstring Create a dialog for setting an associated authentication config, either from existing configs, or creating/removing them from auth database + :param parent: Parent widget :param configId: authentication configuration id :param username: @@ -50,6 +51,7 @@ from existing configs, or creating/removing them from auth database void setWarningText( const QString &warningText ); %Docstring setWarningText set the text of the warning label + :param warningText: the text of the warning label .. seealso:: :py:func:`formattedWarning()` @@ -58,6 +60,7 @@ from existing configs, or creating/removing them from auth database void setBasicText( const QString &basicText ); %Docstring setBasicText set the text of the warning label + :param basicText: the text of the basic tab label %End @@ -66,13 +69,12 @@ from existing configs, or creating/removing them from auth database username :return: basic authentication username -:rtype: str - %End void setUsername( const QString &username ); %Docstring setUsername set the username + :param username: the user name %End @@ -81,13 +83,12 @@ from existing configs, or creating/removing them from auth database password :return: basic authentication password -:rtype: str - %End void setPassword( const QString &password ); %Docstring setPassword set the password + :param password: the password %End @@ -96,8 +97,6 @@ from existing configs, or creating/removing them from auth database configId :return: authentication configuration id -:rtype: str - %End void setConfigId( const QString &configId ); @@ -109,6 +108,7 @@ param configId the authentication configuration id void setDataprovider( const QString &dataprovider ); %Docstring setDataprovider set the data provider key for filtering compatible authentication configurations + :param dataprovider: data provider key %End @@ -117,18 +117,15 @@ param configId the authentication configuration id dataprovider :return: the data provider key used to filter compatible authentication configurations -:rtype: str - %End static const QString formattedWarning( WarningType warning ); %Docstring warning text message based upon where credentials are stored + :param warning: enum of warning type :return: pre-formatted warning text -:rtype: str - %End bool btnConvertToEncryptedIsEnabled( ) const; @@ -136,8 +133,6 @@ param configId the authentication configuration id convertButtonEnabled, mainly useful for unit tests :return: true if the convert button is enabled -:rtype: bool - %End void showStoreCheckboxes( bool enabled ); @@ -146,12 +141,14 @@ param configId the authentication configuration id Some connection configurations allow the user to enter credentials for testing the connection without storing them in the project. "Store" checkboxes are disabled by default. + :param enabled: %End void setStoreUsernameChecked( bool checked ); %Docstring setStoreUsernameChecked check the "Store" checkbox for the username + :param checked: .. seealso:: :py:func:`showStoreCheckboxes` @@ -160,6 +157,7 @@ for testing the connection without storing them in the project. void setStorePasswordChecked( bool checked ); %Docstring setStorePasswordCheched check the "Store" checkbox for the password + :param checked: .. seealso:: :py:func:`showStoreCheckboxes` @@ -170,8 +168,6 @@ for testing the connection without storing them in the project. storePassword :return: true if "Store" checkbox for the password is checked -:rtype: bool - %End bool storeUsernameIsChecked( ) const; @@ -179,8 +175,6 @@ for testing the connection without storing them in the project. storeUsername :return: true if "Store" checkbox for the username is checked -:rtype: bool - %End bool configurationTabIsSelected( ); @@ -188,8 +182,6 @@ for testing the connection without storing them in the project. configurationTabIsSelected :return: true if the configuration tab is the currently selected tab -:rtype: bool - %End public slots: @@ -201,8 +193,6 @@ clicked and it creates a Basic authentication configuration from username and password specified in the Basic tab :return: return true on success -:rtype: bool - %End diff --git a/python/gui/auth/qgsauthsslconfigwidget.sip b/python/gui/auth/qgsauthsslconfigwidget.sip index 793f19f7df64..ddef348982e6 100644 --- a/python/gui/auth/qgsauthsslconfigwidget.sip +++ b/python/gui/auth/qgsauthsslconfigwidget.sip @@ -28,6 +28,7 @@ Widget for editing an SSL server configuration const QList &connectionCAs = QList() ); %Docstring Construct a widget for editing an SSL server certificate configuration + :param parent: Parent widget :param cert: SSL server certificate object :param hostport: Unique host:port to associate with the server certificate @@ -37,64 +38,46 @@ Construct a widget for editing an SSL server certificate configuration QGroupBox *certificateGroupBox(); %Docstring Access to the certificate's group box widget - -:rtype: QGroupBox %End QGroupBox *sslConfigGroupBox(); %Docstring Access to the SSL configuration's group box widget - -:rtype: QGroupBox %End const QgsAuthConfigSslServer sslCustomConfig(); %Docstring Get the SSL configuration - -:rtype: QgsAuthConfigSslServer %End const QSslCertificate sslCertificate(); %Docstring Get the SSL server certificate - -:rtype: QSslCertificate %End const QString sslHost(); %Docstring Get the host:port to associate with the server certificate - -:rtype: str %End QSsl::SslProtocol sslProtocol(); %Docstring Get the SSL protocl used for connections - -:rtype: QSsl.SslProtocol %End const QList sslIgnoreErrorEnums(); %Docstring Get list of the SSL errors (as enums) to be ignored for connections - -:rtype: list of QSslError.SslError %End QSslSocket::PeerVerifyMode sslPeerVerifyMode(); %Docstring Get the client's peer verify mode for connections - -:rtype: QSslSocket.PeerVerifyMode %End int sslPeerVerifyDepth(); %Docstring Get the client's peer verify depth for connections -:rtype: int - .. note:: Value of 0 = unlimited @@ -184,8 +167,6 @@ Parse string for host:port bool readyToSave(); %Docstring Verify if the configuration if ready to save - -:rtype: bool %End signals: @@ -228,6 +209,7 @@ Dialog wrapper of widget for editing an SSL server configuration const QString &hostport = QString() ); %Docstring Construct wrapper dialog for the SSL config widget + :param parent: Parent widget :param cert: SSL server certificate object :param hostport: Unique host:port to associate with the server certificate @@ -236,8 +218,6 @@ Construct wrapper dialog for the SSL config widget QgsAuthSslConfigWidget *sslCustomConfigWidget(); %Docstring Access the embedded SSL server configuration widget - -:rtype: QgsAuthSslConfigWidget %End public slots: diff --git a/python/gui/auth/qgsauthsslerrorsdialog.sip b/python/gui/auth/qgsauthsslerrorsdialog.sip index e03e56a12673..d0de3bd494e0 100644 --- a/python/gui/auth/qgsauthsslerrorsdialog.sip +++ b/python/gui/auth/qgsauthsslerrorsdialog.sip @@ -28,6 +28,7 @@ Widget for reporting SSL errors and offering an option to store an SSL server ex const QString &hostport = QString() ); %Docstring Construct a dialog to handle SSL errors and saving SSL server certificate exceptions + :param reply: Network reply that hand error(s) :param sslErrors: SSL errors that occurred :param parent: Parent widget diff --git a/python/gui/auth/qgsauthsslimportdialog.sip b/python/gui/auth/qgsauthsslimportdialog.sip index c6dc66bd849c..e052834e502f 100644 --- a/python/gui/auth/qgsauthsslimportdialog.sip +++ b/python/gui/auth/qgsauthsslimportdialog.sip @@ -26,6 +26,7 @@ Widget for importing an SSL server certificate exception into the authentication QgsAuthSslImportDialog( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct dialog for importing certificates + :param parent: %End diff --git a/python/gui/auth/qgsauthtrustedcasdialog.sip b/python/gui/auth/qgsauthtrustedcasdialog.sip index 46217fda80fb..9f19a26caed0 100644 --- a/python/gui/auth/qgsauthtrustedcasdialog.sip +++ b/python/gui/auth/qgsauthtrustedcasdialog.sip @@ -26,6 +26,7 @@ Widget for listing trusted Certificate (Intermediate) Authorities used in secure const QList &trustedCAs = QList() ); %Docstring Construct a dialog that will list the trusted Certificate Authorities + :param parent: Parent widget :param trustedCAs: List of trusted Certificate Authorities objects %End diff --git a/python/gui/editorwidgets/core/qgseditorconfigwidget.sip b/python/gui/editorwidgets/core/qgseditorconfigwidget.sip index c973694d369a..ac86448d2343 100644 --- a/python/gui/editorwidgets/core/qgseditorconfigwidget.sip +++ b/python/gui/editorwidgets/core/qgseditorconfigwidget.sip @@ -40,8 +40,6 @@ Create a new configuration widget Create a configuration from the current GUI state :return: A widget configuration -:rtype: QVariantMap - %End virtual void setConfig( const QVariantMap &config ) = 0; @@ -56,8 +54,6 @@ Create a new configuration widget Returns the field for which this configuration widget applies :return: The field index -:rtype: int - %End QgsVectorLayer *layer(); @@ -65,8 +61,6 @@ Returns the field for which this configuration widget applies Returns the layer for which this configuration widget applies :return: The layer -:rtype: QgsVectorLayer - %End virtual QgsExpressionContext createExpressionContext() const; @@ -86,6 +80,7 @@ Emitted when the configuration of the widget is changed. void initializeDataDefinedButton( QgsPropertyOverrideButton *button, QgsWidgetWrapper::Property key ); %Docstring Registers a property override button, setting up its initial value, connections and description. + :param button: button to register :param key: corresponding data defined property key %End diff --git a/python/gui/editorwidgets/core/qgseditorwidgetautoconf.sip b/python/gui/editorwidgets/core/qgseditorwidgetautoconf.sip index 8534bd8aeb3c..e05076752f05 100644 --- a/python/gui/editorwidgets/core/qgseditorwidgetautoconf.sip +++ b/python/gui/editorwidgets/core/qgseditorwidgetautoconf.sip @@ -33,8 +33,6 @@ Typical scores are: :param score: Where the score is returned (default to 0) :return: and integer value rating how good is the setup provided by this plugin. -:rtype: QgsEditorWidgetSetup - %End }; diff --git a/python/gui/editorwidgets/core/qgseditorwidgetfactory.sip b/python/gui/editorwidgets/core/qgseditorwidgetfactory.sip index b6f7404c3172..3392cf47d939 100644 --- a/python/gui/editorwidgets/core/qgseditorwidgetfactory.sip +++ b/python/gui/editorwidgets/core/qgseditorwidgetfactory.sip @@ -47,23 +47,15 @@ instead of calling this method directly. :param parent: The parent for the wrapper class and any created widget. :return: A new widget wrapper -:rtype: QgsEditorWidgetWrapper - %End virtual QgsSearchWidgetWrapper *createSearchWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const /Factory/; -%Docstring - -:rtype: QgsSearchWidgetWrapper -%End QString name(); %Docstring Return The human readable identifier name of this widget type :return: a name -:rtype: str - %End virtual QgsEditorConfigWidget *configWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const = 0 /Factory/; @@ -76,8 +68,6 @@ Create a new configuration widget for this widget type. :param parent: The parent widget of the created config widget :return: A configuration widget -:rtype: QgsEditorConfigWidget - %End bool supportsField( const QgsVectorLayer *vl, int fieldIdx ); @@ -88,8 +78,6 @@ Check if this editor widget type supports a certain field. :param fieldIdx: The field index :return: True if the type is supported for this field -:rtype: bool - .. seealso:: :py:func:`fieldScore` %End diff --git a/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip b/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip index 36450ef055fe..8b5e09611911 100644 --- a/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip +++ b/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip @@ -60,8 +60,6 @@ Find the best editor widget and its configuration for a given field. :param fieldName: The field name on the specified layer for which this widget will be created :return: The id of the widget type to use and its config -:rtype: QgsEditorWidgetSetup - %End QgsEditorWidgetWrapper *create( const QString &widgetId, @@ -84,8 +82,6 @@ The editor may be NULL if you want the widget wrapper to create a default widget :param context: The editor context (not available in Python bindings) :return: A new widget wrapper -:rtype: QgsEditorWidgetWrapper - %End QgsEditorWidgetWrapper *create( QgsVectorLayer *vl, @@ -104,8 +100,6 @@ The editor may be NULL if you want the widget wrapper to create a default widget :param context: The editor context (not available in Python bindings) :return: A new widget wrapper -:rtype: QgsEditorWidgetWrapper - %End QgsSearchWidgetWrapper *createSearchWidget( const QString &widgetId, @@ -114,10 +108,6 @@ The editor may be NULL if you want the widget wrapper to create a default widget const QVariantMap &config, QWidget *parent /TransferThis/ ) /Factory/; -%Docstring - -:rtype: QgsSearchWidgetWrapper -%End QgsEditorConfigWidget *createConfigWidget( const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, QWidget *parent /TransferThis/ ) /Factory/; %Docstring @@ -129,8 +119,6 @@ Creates a configuration widget :param parent: The parent widget for the created widget :return: A new configuration widget -:rtype: QgsEditorConfigWidget - %End QString name( const QString &widgetId ); @@ -140,8 +128,6 @@ Get the human readable name for a widget type :param widgetId: The widget type to get the name for :return: A human readable name -:rtype: str - %End QMap factories(); @@ -149,8 +135,6 @@ Get the human readable name for a widget type Get access to all registered factories :return: All ids and factories -:rtype: QMap - %End QgsEditorWidgetFactory *factory( const QString &widgetId ); @@ -158,8 +142,6 @@ Get access to all registered factories Get a factory for the given widget type id. :return: A factory or Null if not existent -:rtype: QgsEditorWidgetFactory - %End bool registerWidget( const QString &widgetId, QgsEditorWidgetFactory *widgetFactory /Transfer/ ); @@ -170,8 +152,6 @@ Register a new widget factory with the given id :param widgetFactory: The factory which will create this widget type :return: true, if successful, false, if the widgetId is already in use or widgetFactory is NULL -:rtype: bool - %End void registerAutoConfPlugin( QgsEditorWidgetAutoConfPlugin *plugin ); diff --git a/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip b/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip index aedc2e90458e..53810bd562a5 100644 --- a/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip +++ b/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip @@ -54,8 +54,6 @@ If an invalid variant is returned this will be interpreted as no change. Be sure to return a NULL QVariant if it should be set to NULL. :return: The current value the widget represents -:rtype: QVariant - %End int fieldIdx() const; @@ -63,8 +61,6 @@ Be sure to return a NULL QVariant if it should be set to NULL. Access the field index. :return: The index of the field you are working on -:rtype: int - .. seealso:: :py:func:`layer()` %End @@ -74,8 +70,6 @@ Access the field index. Access the field. :return: The field you are working on -:rtype: QgsField - .. seealso:: :py:func:`layer()` %End @@ -85,8 +79,6 @@ Access the field. Access the default value of the field. :return: the default value of the field -:rtype: QVariant - .. seealso:: :py:func:`layer()` %End @@ -94,21 +86,19 @@ Access the default value of the field. static QgsEditorWidgetWrapper *fromWidget( QWidget *widget ); %Docstring Will return a wrapper for a given widget + :param widget: The widget which was created by a wrapper :return: The wrapper for the widget or NULL -:rtype: QgsEditorWidgetWrapper - %End static bool isInTable( const QWidget *parent ); %Docstring Check if the given widget or one of its parent is a QTableView. + :param parent: the widget to check :return: true if yes -:rtype: bool - %End virtual void setEnabled( bool enabled ); @@ -130,6 +120,7 @@ Sets the widget to display in an indeterminate "mixed value" state. void updateConstraint( const QgsFeature &featureContext, QgsFieldConstraints::ConstraintOrigin constraintOrigin = QgsFieldConstraints::ConstraintOriginNotSet ); %Docstring Update constraint. + :param featureContext: the feature to use to evaluate the constraint :param constraintOrigin: optional origin for constraints to check. This can be used to limit the constraints tested to only provider or layer based constraints. @@ -140,6 +131,7 @@ to only provider or layer based constraints. void updateConstraint( const QgsVectorLayer *layer, int index, const QgsFeature &feature, QgsFieldConstraints::ConstraintOrigin constraintOrigin = QgsFieldConstraints::ConstraintOriginNotSet ); %Docstring Update constraint on a feature coming from a specific layer. + :param layer: The vector layer where the feature is defined :param index: The index of the field to check :param feature: The feature to use to evaluate the constraint @@ -155,8 +147,6 @@ based constraints. Get the current constraint status. :return: true if the constraint is valid or if there's no constraint, -:rtype: bool - false otherwise .. versionadded:: 2.16 @@ -171,8 +161,6 @@ false otherwise Returns true if the widget is preventing the feature from being committed. This may be true as a result of attribute values failing enforced field constraints. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`isValidConstraint()` @@ -183,8 +171,6 @@ of attribute values failing enforced field constraints. Returns the reason why a constraint check has failed (or an empty string if constraint check was successful). -:rtype: str - .. seealso:: :py:func:`isValidConstraint()` .. versionadded:: 3.0 @@ -193,6 +179,7 @@ if constraint check was successful). virtual void setHint( const QString &hintText ); %Docstring Add a hint text on the widget + :param hintText: The hint text to display .. versionadded:: 3.0 @@ -203,8 +190,6 @@ Add a hint text on the widget Getter of constraintResult It's the current result of the constraint on the widget influencing it's visualization. -:rtype: ConstraintResult - .. versionadded:: 3.0 %End @@ -214,8 +199,6 @@ Getter of constraintResultVisible Defines if the constraint result should be visualized on the widget (with color). This will be disabled when the form is not editable. -:rtype: bool - .. versionadded:: 3.0 %End @@ -224,6 +207,7 @@ This will be disabled when the form is not editable. Setter of constraintResultVisible Defines if the constraint result should be visualized on the widget (with color). This will be disabled when the form is not editable. + :param constraintResultVisible: if constraintResult should be displayed (mostly editable status) .. versionadded:: 3.0 @@ -242,6 +226,7 @@ Emit this signal, whenever the value changed. %Docstring Emit this signal when the constraint status changed. constraintStatusChanged + :param constraint: represented as a string :param desc: is the constraint description :param err: the error represented as a string. Empty if none. diff --git a/python/gui/editorwidgets/core/qgssearchwidgetwrapper.sip b/python/gui/editorwidgets/core/qgssearchwidgetwrapper.sip index 39152c5e5301..8ae111cc62eb 100644 --- a/python/gui/editorwidgets/core/qgssearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/core/qgssearchwidgetwrapper.sip @@ -94,8 +94,6 @@ Shows a search widget on a filter form. %Docstring Returns a list of exclusive filter flags, which cannot be combined with other flags (e.g., EqualTo/NotEqualTo) -:rtype: list of QgsSearchWidgetWrapper.FilterFlag - .. versionadded:: 2.16 .. seealso:: :py:func:`nonExclusiveFilterFlags()` @@ -105,8 +103,6 @@ Returns a list of exclusive filter flags, which cannot be combined with other fl %Docstring Returns a list of non-exclusive filter flags, which can be combined with other flags (e.g., CaseInsensitive) -:rtype: list of QgsSearchWidgetWrapper.FilterFlag - .. versionadded:: 2.16 .. seealso:: :py:func:`exclusiveFilterFlags()` @@ -115,9 +111,8 @@ Returns a list of non-exclusive filter flags, which can be combined with other f static QString toString( QgsSearchWidgetWrapper::FilterFlag flag ); %Docstring Returns a translated string representing a filter flag. -:param flag: flag to convert to string -:rtype: str +:param flag: flag to convert to string .. versionadded:: 2.16 %End @@ -135,8 +130,6 @@ Create a new widget wrapper %Docstring Returns filter flags supported by the search widget. -:rtype: FilterFlags - .. versionadded:: 2.16 .. seealso:: :py:func:`defaultFlags()` @@ -146,8 +139,6 @@ Returns filter flags supported by the search widget. %Docstring Returns the filter flags which should be set by default for the search widget. -:rtype: FilterFlags - .. versionadded:: 2.16 .. seealso:: :py:func:`supportedFlags()` @@ -162,23 +153,15 @@ If an invalid variant is returned this will be interpreted as no change. Be sure to return a NULL QVariant if it should be set to NULL. :return: The current value the widget represents -:rtype: str - %End virtual bool applyDirectly() = 0; %Docstring If this is true, then this search widget should take effect directly when its expression changes - -:rtype: bool %End virtual QString createExpression( FilterFlags flags ) const; -%Docstring - -:rtype: str -%End QString createFieldIdentifier() const; %Docstring @@ -186,8 +169,6 @@ Get a field name or expression to use as field comparison. If in SearchMode returns a quoted field identifier. If in AggregateSearchMode returns an appropriate aggregate expression. -:rtype: str - .. versionadded:: 3.0 %End @@ -196,8 +177,6 @@ If in AggregateSearchMode returns an appropriate aggregate expression. If in AggregateSearch mode, which aggregate should be used to construct the filter expression. Is a Null String if none. -:rtype: str - .. versionadded:: 3.0 %End @@ -221,6 +200,7 @@ Clears the widget's current value and resets it back to the default state virtual void setEnabled( bool enabled ); %Docstring Toggles whether the search widget is enabled or disabled. + :param enabled: set to true to enable widget %End @@ -229,6 +209,7 @@ Toggles whether the search widget is enabled or disabled. void expressionChanged( const QString &exp ); %Docstring Emitted whenever the expression changes + :param exp: The new search expression %End diff --git a/python/gui/editorwidgets/core/qgswidgetwrapper.sip b/python/gui/editorwidgets/core/qgswidgetwrapper.sip index 2ffa4c49c258..6331e17902ec 100644 --- a/python/gui/editorwidgets/core/qgswidgetwrapper.sip +++ b/python/gui/editorwidgets/core/qgswidgetwrapper.sip @@ -52,8 +52,6 @@ changed status of the widget will be saved. %Docstring Returns the editor widget property definitions. -:rtype: QgsPropertiesDefinition - .. versionadded:: 3.0 %End @@ -71,8 +69,6 @@ Create a new widget wrapper Access the widget managed by this wrapper :return: The widget -:rtype: QWidget - %End @@ -98,8 +94,6 @@ Use this inside your overridden classes to access the configuration. :param defaultVal: Default value :return: the value assigned to this configuration option -:rtype: QVariant - %End QVariantMap config() const; @@ -107,8 +101,6 @@ Use this inside your overridden classes to access the configuration. Returns the whole config :return: The configuration -:rtype: QVariantMap - %End const QgsAttributeEditorContext &context() const; @@ -116,8 +108,6 @@ Returns the whole config Returns information about the context in which this widget is shown :return: context information -:rtype: QgsAttributeEditorContext - %End QgsVectorLayer *layer() const; @@ -125,8 +115,6 @@ Returns information about the context in which this widget is shown Access the QgsVectorLayer, you are working on :return: The layer -:rtype: QgsVectorLayer - .. seealso:: :py:func:`field()` %End @@ -134,11 +122,10 @@ Access the QgsVectorLayer, you are working on static QgsWidgetWrapper *fromWidget( QWidget *widget ); %Docstring Will return a wrapper for a given widget + :param widget: The widget which was created by a wrapper :return: The wrapper for the widget or NULL -:rtype: QgsWidgetWrapper - %End virtual bool valid() const = 0; @@ -150,8 +137,6 @@ If it cannot be used this is a hint to the caller that he may try to find another suitable widget type instead. :return: Validity status of this widget. -:rtype: bool - .. versionadded:: 2.12 %End @@ -162,8 +147,6 @@ another suitable widget type instead. %Docstring Returns a reference to the editor widget's property collection, used for data defined overrides. -:rtype: QgsPropertyCollection - .. versionadded:: 3.0 .. seealso:: :py:func:`setDataDefinedProperties()` @@ -172,6 +155,7 @@ Returns a reference to the editor widget's property collection, used for data de void setDataDefinedProperties( const QgsPropertyCollection &collection ); %Docstring Sets the editor widget's property collection, used for data defined overrides. + :param collection: property collection. Existing properties will be replaced. .. versionadded:: 3.0 @@ -193,8 +177,6 @@ in initWidget(). :param parent: You should set this parent on the created widget. :return: A new widget -:rtype: QWidget - %End virtual void initWidget( QWidget *editor ); diff --git a/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip b/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip index eb9008fe0c69..b4ee9d95f47c 100644 --- a/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip @@ -27,6 +27,7 @@ Wraps a checkbox edit widget for searching. explicit QgsCheckboxSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsCheckboxSearchWidgetWrapper. + :param vl: associated vector layer :param fieldIdx: index of associated field :param parent: parent widget @@ -36,8 +37,6 @@ Constructor for QgsCheckboxSearchWidgetWrapper. %Docstring Returns a variant representing the current state of the widget. -:rtype: QVariant - .. note:: this will not be a boolean true or false value, it will instead diff --git a/python/gui/editorwidgets/qgsdatetimeedit.sip b/python/gui/editorwidgets/qgsdatetimeedit.sip index ebb9129a7a0d..d50a0867741a 100644 --- a/python/gui/editorwidgets/qgsdatetimeedit.sip +++ b/python/gui/editorwidgets/qgsdatetimeedit.sip @@ -30,10 +30,6 @@ Constructor for QgsDateTimeEdit Determines if the widget allows setting null date/time. %End bool allowNull() const; -%Docstring - -:rtype: bool -%End void setDateTime( const QDateTime &dateTime ); %Docstring @@ -48,8 +44,6 @@ Determines if the widget allows setting null date/time. %Docstring dateTime returns the date time which can eventually be a null date/time -:rtype: QDateTime - .. note:: since QDateTimeEdit.dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit. diff --git a/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip b/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip index de4ade8db59c..92771e32786a 100644 --- a/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip @@ -27,6 +27,7 @@ Wraps a date/time edit widget for searching. explicit QgsDateTimeSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsDateTimeSearchWidgetWrapper. + :param vl: associated vector layer :param fieldIdx: index of associated field :param parent: parent widget @@ -36,8 +37,6 @@ Constructor for QgsDateTimeSearchWidgetWrapper. %Docstring Returns a variant representing the current state of the widget, respecting the editor widget's configured field format for date/time values. - -:rtype: QVariant %End virtual bool applyDirectly(); diff --git a/python/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.sip b/python/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.sip index 4157bafc60ac..6872f663c730 100644 --- a/python/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.sip @@ -62,8 +62,6 @@ Constructor for QgsDefaultSearchWidgetWrapper %Docstring Returns a pointer to the line edit part of the widget. -:rtype: QgsFilterLineEdit - .. note:: this method is in place for unit testing only, and is not considered @@ -74,8 +72,6 @@ stable API %Docstring Returns a pointer to the case sensitivity checkbox in the widget. -:rtype: QCheckBox - .. note:: this method is in place for unit testing only, and is not considered diff --git a/python/gui/editorwidgets/qgsdoublespinbox.sip b/python/gui/editorwidgets/qgsdoublespinbox.sip index 1992d4ed1150..23c3ffdea8de 100644 --- a/python/gui/editorwidgets/qgsdoublespinbox.sip +++ b/python/gui/editorwidgets/qgsdoublespinbox.sip @@ -47,6 +47,7 @@ This value can then be handled by a special value text. explicit QgsDoubleSpinBox( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsDoubleSpinBox. + :param parent: parent widget %End @@ -54,6 +55,7 @@ Constructor for QgsDoubleSpinBox. %Docstring Sets whether the widget will show a clear button. The clear button allows users to reset the widget to a default or empty state. + :param showClearButton: set to true to show the clear button, or false to hide it .. seealso:: :py:func:`showClearButton()` @@ -63,8 +65,6 @@ allows users to reset the widget to a default or empty state. %Docstring Returns whether the widget is showing a clear button. -:rtype: bool - .. seealso:: :py:func:`setShowClearButton()` %End @@ -72,6 +72,7 @@ Returns whether the widget is showing a clear button. %Docstring Sets if the widget will allow entry of simple expressions, which are evaluated and then discarded. + :param enabled: set to true to allow expression entry .. versionadded:: 2.7 @@ -83,8 +84,6 @@ Returns whether the widget will allow entry of simple expressions, which are evaluated and then discarded. :return: true if spin box allows expression entry -:rtype: bool - .. versionadded:: 2.7 %End @@ -98,6 +97,7 @@ Set the current value to the value defined by the clear value. void setClearValue( double customValue, const QString &clearValueText = QString() ); %Docstring Defines the clear value as a custom value and will automatically set the clear value mode to CustomValue. + :param customValue: defines the numerical value used as the clear value :param clearValueText: is the text displayed when the spin box is at the clear value. If not specified, no special value text is used. @@ -107,6 +107,7 @@ Defines the clear value as a custom value and will automatically set the clear v void setClearValueMode( ClearValueMode mode, const QString &clearValueText = QString() ); %Docstring Defines if the clear value should be the minimum or maximum values of the widget or a custom value. + :param mode: mode to user for clear value :param clearValueText: is the text displayed when the spin box is at the clear value. If not specified, no special value text is used. %End @@ -115,8 +116,6 @@ Defines if the clear value should be the minimum or maximum values of the widget %Docstring Returns the value used when clear() is called. -:rtype: float - .. seealso:: :py:func:`setClearValue()` %End diff --git a/python/gui/editorwidgets/qgsmultiedittoolbutton.sip b/python/gui/editorwidgets/qgsmultiedittoolbutton.sip index ecac1ec0a10b..5b34435da953 100644 --- a/python/gui/editorwidgets/qgsmultiedittoolbutton.sip +++ b/python/gui/editorwidgets/qgsmultiedittoolbutton.sip @@ -33,20 +33,20 @@ edit mode. explicit QgsMultiEditToolButton( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsMultiEditToolButton. + :param parent: parent object %End State state() const; %Docstring Returns the current displayed state of the button. - -:rtype: State %End void setField( const QgsField &field ); %Docstring Sets the field associated with this button. This is used to customise the widget menu and tooltips to match the field properties. + :param field: associated field %End @@ -55,6 +55,7 @@ and tooltips to match the field properties. void setIsMixed( bool mixed ); %Docstring Sets whether the associated field contains mixed values. + :param mixed: whether field values are mixed .. seealso:: :py:func:`isMixed()` @@ -67,6 +68,7 @@ Sets whether the associated field contains mixed values. void setIsChanged( bool changed ); %Docstring Sets whether the associated field has changed. + :param changed: whether field has changed .. seealso:: :py:func:`isChanged()` diff --git a/python/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip b/python/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip index 2a5a6aab3a21..3a948864195d 100644 --- a/python/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip @@ -27,6 +27,7 @@ Wraps a relation reference search widget. explicit QgsRelationReferenceSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QgsMapCanvas *canvas, QWidget *parent = 0 ); %Docstring Constructor for QgsRelationReferenceSearchWidgetWrapper + :param vl: associated vector layer :param fieldIdx: associated field index :param canvas: optional map canvas @@ -36,8 +37,6 @@ Constructor for QgsRelationReferenceSearchWidgetWrapper QVariant value() const; %Docstring Returns a variant representing the current state of the widget. - -:rtype: QVariant %End virtual bool applyDirectly(); diff --git a/python/gui/editorwidgets/qgsrelationreferencewidget.sip b/python/gui/editorwidgets/qgsrelationreferencewidget.sip index 35eeefe4474a..f28ddfd41a21 100644 --- a/python/gui/editorwidgets/qgsrelationreferencewidget.sip +++ b/python/gui/editorwidgets/qgsrelationreferencewidget.sip @@ -54,8 +54,6 @@ this sets the related feature using from the foreign key QVariant foreignKey() const; %Docstring returns the related feature foreign key - -:rtype: QVariant %End void setEditorContext( const QgsAttributeEditorContext &context, QgsMapCanvas *canvas, QgsMessageBar *messageBar ); @@ -63,32 +61,24 @@ returns the related feature foreign key bool embedForm(); %Docstring determines if the form of the related feature will be shown - -:rtype: bool %End void setEmbedForm( bool display ); bool readOnlySelector(); %Docstring determines if the foreign key is shown in a combox box or a read-only line edit - -:rtype: bool %End void setReadOnlySelector( bool readOnly ); bool allowMapIdentification(); %Docstring determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool) - -:rtype: bool %End void setAllowMapIdentification( bool allowMapIdentification ); bool orderByValue(); %Docstring If the widget will order the combobox entries by value - -:rtype: bool %End void setOrderByValue( bool orderByValue ); %Docstring @@ -102,8 +92,6 @@ Set the fields for which filter comboboxes will be created bool openFormButtonVisible(); %Docstring determines the open form button is visible in the widget - -:rtype: bool %End void setOpenFormButtonVisible( bool openFormButtonVisible ); @@ -112,8 +100,6 @@ determines the open form button is visible in the widget Determines if the filters are chained :return: True if filters are chained -:rtype: bool - %End void setChainFilters( bool chainFilters ); @@ -128,8 +114,6 @@ Chained filters restrict the option of subsequent filters based on the selection %Docstring return the related feature (from the referenced layer) if no feature is related, it returns an invalid feature - -:rtype: QgsFeature %End void showIndeterminateState(); @@ -143,8 +127,6 @@ Sets the widget to display in an indeterminate "mixed value" state. %Docstring Determines if a button for adding new features should be shown. -:rtype: bool - .. versionadded:: 2.16 %End diff --git a/python/gui/editorwidgets/qgsrelationwidgetwrapper.sip b/python/gui/editorwidgets/qgsrelationwidgetwrapper.sip index f604959842d1..87e0be15eab7 100644 --- a/python/gui/editorwidgets/qgsrelationwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgsrelationwidgetwrapper.sip @@ -34,8 +34,6 @@ Constructor for QgsRelationWidgetWrapper Defines if a title lable should be shown for this widget. Only has an effect after widget() has been called at least once. -:rtype: bool - .. versionadded:: 2.18 %End @@ -51,8 +49,6 @@ Only has an effect after widget() has been called at least once. %Docstring Determines if the "link feature" button should be shown -:rtype: bool - .. versionadded:: 2.18 %End @@ -67,8 +63,6 @@ Determines if the "link feature" button should be shown %Docstring Determines if the "unlink feature" button should be shown -:rtype: bool - .. versionadded:: 2.18 %End @@ -83,8 +77,6 @@ Determines if the "unlink feature" button should be shown %Docstring The relation for which this wrapper is created. -:rtype: QgsRelation - .. versionadded:: 3.0 %End @@ -103,6 +95,7 @@ The relation for which this wrapper is created. void setVisible( bool visible ); %Docstring Sets the visibility of the wrapper's widget. + :param visible: set to true to show widget, false to hide widget .. versionadded:: 2.16 diff --git a/python/gui/editorwidgets/qgssearchwidgettoolbutton.sip b/python/gui/editorwidgets/qgssearchwidgettoolbutton.sip index a3a47841f850..6c79e5992835 100644 --- a/python/gui/editorwidgets/qgssearchwidgettoolbutton.sip +++ b/python/gui/editorwidgets/qgssearchwidgettoolbutton.sip @@ -36,6 +36,7 @@ operates. explicit QgsSearchWidgetToolButton( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSearchWidgetToolButton. + :param parent: parent object %End @@ -44,6 +45,7 @@ Constructor for QgsSearchWidgetToolButton. Sets the available filter flags to show in the widget. Any active flags (see activeFlags()) which are not present in the new available filter flags will be cleared; + :param flags: available flags to show in widget .. seealso:: :py:func:`availableFlags()` @@ -56,6 +58,7 @@ flags will be cleared; void setDefaultFlags( QgsSearchWidgetWrapper::FilterFlags flags ); %Docstring Sets the default filter flags to show in the widget. + :param flags: default flags to show in widget .. seealso:: :py:func:`setAvailableFlags()` @@ -67,8 +70,6 @@ Sets the default filter flags to show in the widget. %Docstring Returns the available filter flags shown in the widget. -:rtype: QgsSearchWidgetWrapper.FilterFlags - .. seealso:: :py:func:`setAvailableFlags()` .. seealso:: :py:func:`activeFlags()` @@ -79,6 +80,7 @@ Returns the available filter flags shown in the widget. Sets the current active filter flags for the widget. Any flags which are not present in the available filter flags (see availableFlags()) will not be set. + :param flags: active flags to show in widget .. seealso:: :py:func:`toggleFlag()` @@ -94,6 +96,7 @@ Toggles an individual active filter flag for the widget. Any flags which are not present in the available filter flags (see availableFlags()) will be ignore. Other flags may be cleared if they conflict with the newly toggled flag. + :param flag: flag to toggle .. seealso:: :py:func:`setActiveFlags()` @@ -105,8 +108,6 @@ toggled flag. %Docstring Returns the active filter flags shown in the widget. -:rtype: QgsSearchWidgetWrapper.FilterFlags - .. seealso:: :py:func:`setActiveFlags()` .. seealso:: :py:func:`toggleFlag()` @@ -118,8 +119,6 @@ Returns the active filter flags shown in the widget. %Docstring Returns true if the widget is set to be included in the search. -:rtype: bool - .. seealso:: :py:func:`setInactive()` .. seealso:: :py:func:`setActive()` @@ -150,6 +149,7 @@ Sets the search widget as active by selecting the first available search type. void activeFlagsChanged( QgsSearchWidgetWrapper::FilterFlags flags ); %Docstring Emitted when the active flags selected in the widget is changed + :param flags: active flags %End diff --git a/python/gui/editorwidgets/qgsspinbox.sip b/python/gui/editorwidgets/qgsspinbox.sip index 70eb970a1fda..db8ac6482f50 100644 --- a/python/gui/editorwidgets/qgsspinbox.sip +++ b/python/gui/editorwidgets/qgsspinbox.sip @@ -47,6 +47,7 @@ This value can then be handled by a special value text. explicit QgsSpinBox( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSpinBox. + :param parent: parent widget %End @@ -54,6 +55,7 @@ Constructor for QgsSpinBox. %Docstring Sets whether the widget will show a clear button. The clear button allows users to reset the widget to a default or empty state. + :param showClearButton: set to true to show the clear button, or false to hide it .. seealso:: :py:func:`showClearButton()` @@ -63,8 +65,6 @@ allows users to reset the widget to a default or empty state. %Docstring Returns whether the widget is showing a clear button. -:rtype: bool - .. seealso:: :py:func:`setShowClearButton()` %End @@ -72,6 +72,7 @@ Returns whether the widget is showing a clear button. %Docstring Sets if the widget will allow entry of simple expressions, which are evaluated and then discarded. + :param enabled: set to true to allow expression entry .. versionadded:: 2.7 @@ -83,8 +84,6 @@ Returns whether the widget will allow entry of simple expressions, which are evaluated and then discarded. :return: true if spin box allows expression entry -:rtype: bool - .. versionadded:: 2.7 %End @@ -98,6 +97,7 @@ Set the current value to the value defined by the clear value. void setClearValue( int customValue, const QString &clearValueText = QString() ); %Docstring Defines the clear value as a custom value and will automatically set the clear value mode to CustomValue. + :param customValue: defines the numerical value used as the clear value :param clearValueText: is the text displayed when the spin box is at the clear value. If not specified, no special value text is used. @@ -107,6 +107,7 @@ Defines the clear value as a custom value and will automatically set the clear v void setClearValueMode( ClearValueMode mode, const QString &clearValueText = QString() ); %Docstring Defines if the clear value should be the minimum or maximum values of the widget or a custom value. + :param mode: mode to user for clear value :param clearValueText: is the text displayed when the spin box is at the clear value. If not specified, no special value text is used. %End @@ -115,8 +116,6 @@ Defines if the clear value should be the minimum or maximum values of the widget %Docstring Returns the value used when clear() is called. -:rtype: int - .. seealso:: :py:func:`setClearValue()` %End diff --git a/python/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.sip b/python/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.sip index ddf1c7d3ac22..2fda7a77088f 100644 --- a/python/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.sip @@ -35,10 +35,6 @@ Constructor for QgsValueRelationSearchWidgetWrapper virtual bool valid() const; QVariant value() const; -%Docstring - -:rtype: QVariant -%End virtual QgsSearchWidgetWrapper::FilterFlags supportedFlags() const; virtual QgsSearchWidgetWrapper::FilterFlags defaultFlags() const; diff --git a/python/gui/effects/qgseffectdrawmodecombobox.sip b/python/gui/effects/qgseffectdrawmodecombobox.sip index 47f7d9245f7e..5a2c44b83e7a 100644 --- a/python/gui/effects/qgseffectdrawmodecombobox.sip +++ b/python/gui/effects/qgseffectdrawmodecombobox.sip @@ -29,13 +29,12 @@ class QgsEffectDrawModeComboBox : QComboBox Returns the currently selected draw mode for the combo box :return: current draw mode -:rtype: QgsPaintEffect.DrawMode - %End void setDrawMode( QgsPaintEffect::DrawMode drawMode ); %Docstring Sets the currently selected draw mode for the combo box + :param drawMode: selected draw mode %End diff --git a/python/gui/effects/qgseffectstackpropertieswidget.sip b/python/gui/effects/qgseffectstackpropertieswidget.sip index dff62f96a3b8..b9234d70a87d 100644 --- a/python/gui/effects/qgseffectstackpropertieswidget.sip +++ b/python/gui/effects/qgseffectstackpropertieswidget.sip @@ -34,6 +34,7 @@ and reordering effects within the stack. QgsEffectStackPropertiesWidget( QgsEffectStack *stack, QWidget *parent /TransferThis/ = 0 ); %Docstring QgsEffectStackPropertiesWidget constructor + :param stack: QgsEffectStack to modify in the widget :param parent: parent widget %End @@ -45,13 +46,12 @@ QgsEffectStackPropertiesWidget constructor Returns effect stack attached to the widget :return: QgsEffectStack modified by the widget -:rtype: QgsEffectStack - %End void setPreviewPicture( const QPicture &picture ); %Docstring Sets the picture to use for effect previews for the dialog + :param picture: preview picture %End @@ -90,6 +90,7 @@ Updates the effect preview icon. void changeEffect( QgsPaintEffect *newEffect ); %Docstring Updates the effect stack when the currently selected effect changes properties. + :param newEffect: new effect to replace existing effect at selected position within the stack. %End @@ -104,6 +105,7 @@ Refreshes the widget to reflect the current state of the stack. void loadStack( QgsEffectStack *stack ); %Docstring Refreshes the widget to reflect the current state of a specified stack. + :param stack: QgsEffectStack for widget %End @@ -150,6 +152,7 @@ and reordering effects within the stack. QgsEffectStackPropertiesDialog( QgsEffectStack *stack, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags f = 0 ); %Docstring QgsEffectStackPropertiesDialog constructor + :param stack: QgsEffectStack to modify in the dialog :param parent: parent widget :param f: window flags @@ -160,13 +163,12 @@ QgsEffectStackPropertiesDialog constructor Returns effect stack attached to the dialog :return: QgsEffectStack modified by the dialog -:rtype: QgsEffectStack - %End void setPreviewPicture( const QPicture &picture ); %Docstring Sets the picture to use for effect previews for the dialog + :param picture: preview picture %End @@ -200,6 +202,7 @@ and a button for opening an effect stack customisation dialog. QgsEffectStackCompactWidget( QWidget *parent /TransferThis/ = 0, QgsPaintEffect *effect = 0 ); %Docstring QgsEffectStackCompactWidget constructor + :param parent: parent widget :param effect: QgsPaintEffect for modification by the widget. If the effect is not a QgsEffectStack, it will be automatically converted to an effect @@ -210,6 +213,7 @@ stack consisting of the original effect void setPaintEffect( QgsPaintEffect *effect ); %Docstring Sets paint effect attached to the widget, + :param effect: QgsPaintEffect for modification by the widget. If the effect is not a QgsEffectStack, it will be automatically converted to an effect stack consisting of the original effect @@ -222,8 +226,6 @@ stack consisting of the original effect Returns paint effect attached to the widget :return: QgsPaintEffect modified by the widget -:rtype: QgsPaintEffect - .. seealso:: :py:func:`setPaintEffect` %End @@ -231,6 +233,7 @@ Returns paint effect attached to the widget void setPreviewPicture( const QPicture &picture ); %Docstring Sets the picture to use for effect previews for the dialog + :param picture: preview picture %End diff --git a/python/gui/effects/qgspainteffectpropertieswidget.sip b/python/gui/effects/qgspainteffectpropertieswidget.sip index fc98af142a53..064401866290 100644 --- a/python/gui/effects/qgspainteffectpropertieswidget.sip +++ b/python/gui/effects/qgspainteffectpropertieswidget.sip @@ -27,6 +27,7 @@ class QgsPaintEffectPropertiesWidget : QWidget QgsPaintEffectPropertiesWidget( QgsPaintEffect *effect, QWidget *parent /TransferThis/ = 0 ); %Docstring QgsPaintEffectPropertiesWidget constructor + :param effect: QgsPaintEffect to modify in the widget :param parent: parent widget %End diff --git a/python/gui/effects/qgspainteffectwidget.sip b/python/gui/effects/qgspainteffectwidget.sip index 460f94f47344..143aea00875b 100644 --- a/python/gui/effects/qgspainteffectwidget.sip +++ b/python/gui/effects/qgspainteffectwidget.sip @@ -28,6 +28,7 @@ class QgsPaintEffectWidget : QWidget virtual void setPaintEffect( QgsPaintEffect *effect ) = 0; %Docstring Sets the paint effect to modify with the widget + :param effect: paint effect %End @@ -52,10 +53,6 @@ class QgsDrawSourceWidget : QgsPaintEffectWidget QgsDrawSourceWidget( QWidget *parent /TransferThis/ = 0 ); static QgsPaintEffectWidget *create() /Factory/; -%Docstring - -:rtype: QgsPaintEffectWidget -%End virtual void setPaintEffect( QgsPaintEffect *effect ); @@ -75,10 +72,6 @@ class QgsBlurWidget : QgsPaintEffectWidget QgsBlurWidget( QWidget *parent /TransferThis/ = 0 ); static QgsPaintEffectWidget *create() /Factory/; -%Docstring - -:rtype: QgsPaintEffectWidget -%End virtual void setPaintEffect( QgsPaintEffect *effect ); @@ -98,10 +91,6 @@ class QgsShadowEffectWidget : QgsPaintEffectWidget QgsShadowEffectWidget( QWidget *parent /TransferThis/ = 0 ); static QgsPaintEffectWidget *create() /Factory/; -%Docstring - -:rtype: QgsPaintEffectWidget -%End virtual void setPaintEffect( QgsPaintEffect *effect ); @@ -120,10 +109,6 @@ class QgsGlowWidget : QgsPaintEffectWidget QgsGlowWidget( QWidget *parent /TransferThis/ = 0 ); static QgsPaintEffectWidget *create() /Factory/; -%Docstring - -:rtype: QgsPaintEffectWidget -%End virtual void setPaintEffect( QgsPaintEffect *effect ); @@ -141,10 +126,6 @@ class QgsTransformWidget : QgsPaintEffectWidget QgsTransformWidget( QWidget *parent /TransferThis/ = 0 ); static QgsPaintEffectWidget *create() /Factory/; -%Docstring - -:rtype: QgsPaintEffectWidget -%End virtual void setPaintEffect( QgsPaintEffect *effect ); @@ -163,10 +144,6 @@ class QgsColorEffectWidget : QgsPaintEffectWidget QgsColorEffectWidget( QWidget *parent = 0 ); static QgsPaintEffectWidget *create() /Factory/; -%Docstring - -:rtype: QgsPaintEffectWidget -%End virtual void setPaintEffect( QgsPaintEffect *effect ); diff --git a/python/gui/layertree/qgslayertreeembeddedconfigwidget.sip b/python/gui/layertree/qgslayertreeembeddedconfigwidget.sip index 59520d9e8e91..2868b7e0f892 100644 --- a/python/gui/layertree/qgslayertreeembeddedconfigwidget.sip +++ b/python/gui/layertree/qgslayertreeembeddedconfigwidget.sip @@ -25,6 +25,7 @@ A widget to configure layer tree embedded widgets for a particular map layer. QgsLayerTreeEmbeddedConfigWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring A widget to configure layer tree embedded widgets for a particular map layer. + :param parent: The parent of the widget. %End diff --git a/python/gui/layertree/qgslayertreeembeddedwidgetregistry.sip b/python/gui/layertree/qgslayertreeembeddedwidgetregistry.sip index 43bc89d0cd65..180fa5bb2219 100644 --- a/python/gui/layertree/qgslayertreeembeddedwidgetregistry.sip +++ b/python/gui/layertree/qgslayertreeembeddedwidgetregistry.sip @@ -30,15 +30,11 @@ Embedded widgets are assigned per individual map layers and they are shown befor virtual QString id() const = 0; %Docstring Unique name of the provider (among other providers) - -:rtype: str %End virtual QString name() const = 0; %Docstring Human readable name - may be translatable with tr() - -:rtype: str %End virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0 /Factory/; @@ -46,15 +42,11 @@ Human readable name - may be translatable with tr() 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). - -:rtype: QWidget %End virtual bool supportsLayer( QgsMapLayer *layer ) = 0; %Docstring Whether it makes sense to use this widget for a particular layer - -:rtype: bool %End }; @@ -92,31 +84,23 @@ QgsGui.layerTreeEmbeddedWidgetRegistry(). QStringList providers() const; %Docstring Return list of all registered providers - -:rtype: list of str %End QgsLayerTreeEmbeddedWidgetProvider *provider( const QString &providerId ) const; %Docstring Get provider object from the provider's ID - -:rtype: QgsLayerTreeEmbeddedWidgetProvider %End bool addProvider( QgsLayerTreeEmbeddedWidgetProvider *provider /Transfer/ ); %Docstring Register a provider, takes ownership of the object. Returns true on success, false if the provider is already registered. * - -:rtype: bool %End bool removeProvider( const QString &providerId ); %Docstring Unregister a provider, the provider object is deleted. Returns true on success, false if the provider was not registered. * - -:rtype: bool %End protected: diff --git a/python/gui/layertree/qgslayertreemapcanvasbridge.sip b/python/gui/layertree/qgslayertreemapcanvasbridge.sip index f57a29b700d1..49c355d8bc7f 100644 --- a/python/gui/layertree/qgslayertreemapcanvasbridge.sip +++ b/python/gui/layertree/qgslayertreemapcanvasbridge.sip @@ -38,15 +38,7 @@ Constructor: does not take ownership of the layer tree nor canvas %End QgsLayerTree *rootGroup() const; -%Docstring - -:rtype: QgsLayerTree -%End QgsMapCanvas *mapCanvas() const; -%Docstring - -:rtype: QgsMapCanvas -%End void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas ); %Docstring @@ -59,8 +51,6 @@ Associates overview canvas with the bridge, so the overview will be updated when %Docstring Returns associated overview canvas (may be null) -:rtype: QgsMapOverviewCanvas - .. versionadded:: 3.0 %End @@ -70,10 +60,6 @@ if enabled, will automatically set full canvas extent and destination CRS + map when first layer(s) are added %End bool autoSetupOnFirstLayer() const; -%Docstring - -:rtype: bool -%End void setCanvasLayers(); %Docstring diff --git a/python/gui/layertree/qgslayertreeview.sip b/python/gui/layertree/qgslayertreeview.sip index 29794fc686dd..e3d2b2efb8e9 100644 --- a/python/gui/layertree/qgslayertreeview.sip +++ b/python/gui/layertree/qgslayertreeview.sip @@ -54,15 +54,11 @@ Overridden setModel() from base class. Only QgsLayerTreeModel is an acceptable m QgsLayerTreeModel *layerTreeModel() const; %Docstring Get access to the model casted to QgsLayerTreeModel - -:rtype: QgsLayerTreeModel %End QgsLayerTreeViewDefaultActions *defaultActions(); %Docstring Get access to the default actions that may be used with the tree view - -:rtype: QgsLayerTreeViewDefaultActions %End void setMenuProvider( QgsLayerTreeViewMenuProvider *menuProvider /Transfer/ ); @@ -72,15 +68,11 @@ Set provider for context menu. Takes ownership of the instance QgsLayerTreeViewMenuProvider *menuProvider() const; %Docstring Return pointer to the context menu provider. May be null - -:rtype: QgsLayerTreeViewMenuProvider %End QgsMapLayer *currentLayer() const; %Docstring Get currently selected layer. May be null - -:rtype: QgsMapLayer %End void setCurrentLayer( QgsMapLayer *layer ); %Docstring @@ -90,44 +82,33 @@ Set currently selected layer. Null pointer will deselect any layer. QgsLayerTreeNode *currentNode() const; %Docstring Get current node. May be null - -:rtype: QgsLayerTreeNode %End QgsLayerTreeGroup *currentGroupNode() const; %Docstring Get current group node. If a layer is current node, the function will return parent group. May be null. - -:rtype: QgsLayerTreeGroup %End QgsLayerTreeModelLegendNode *currentLegendNode() const; %Docstring Get current legend node. May be null if current node is not a legend node. -:rtype: QgsLayerTreeModelLegendNode - .. versionadded:: 2.14 %End QList selectedNodes( bool skipInternal = false ) const; %Docstring Return list of selected nodes -:param skipInternal: If true, will ignore nodes which have an ancestor in the selection -:rtype: list of QgsLayerTreeNode +:param skipInternal: If true, will ignore nodes which have an ancestor in the selection %End QList selectedLayerNodes() const; %Docstring Return list of selected nodes filtered to just layer nodes - -:rtype: list of QgsLayerTreeLayer %End QList selectedLayers() const; %Docstring Get list of selected layers - -:rtype: list of QgsMapLayer %End public slots: @@ -163,10 +144,6 @@ Emitted when a current layer is changed void updateExpandedStateFromNode( QgsLayerTreeNode *node ); QgsMapLayer *layerForIndex( const QModelIndex &index ) const; -%Docstring - -:rtype: QgsMapLayer -%End virtual void mouseReleaseEvent( QMouseEvent *event ); @@ -212,8 +189,6 @@ instance to provide custom context menus (opened upon right-click). virtual QMenu *createContextMenu() = 0 /Factory/; %Docstring Return a newly created menu instance (or null pointer on error) - -:rtype: QMenu %End }; diff --git a/python/gui/layertree/qgslayertreeviewdefaultactions.sip b/python/gui/layertree/qgslayertreeviewdefaultactions.sip index 31b2a4e2f37a..1dca79d4d95f 100644 --- a/python/gui/layertree/qgslayertreeviewdefaultactions.sip +++ b/python/gui/layertree/qgslayertreeviewdefaultactions.sip @@ -29,80 +29,36 @@ that can be used together with a layer tree view. QgsLayerTreeViewDefaultActions( QgsLayerTreeView *view ); QAction *actionAddGroup( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionRemoveGroupOrLayer( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionShowInOverview( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionRenameGroupOrLayer( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionShowFeatureCount( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionCheckAndAllChildren( QObject *parent = 0 ); %Docstring Action to check a group and all its children - -:rtype: QAction %End QAction *actionUncheckAndAllChildren( QObject *parent = 0 ); %Docstring Action to uncheck a group and all its children - -:rtype: QAction %End QAction *actionCheckAndAllParents( QObject *parent = 0 ); %Docstring Action to check a group and all its parents - -:rtype: QAction %End QAction *actionZoomToLayer( QgsMapCanvas *canvas, QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionZoomToGroup( QgsMapCanvas *canvas, QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionMakeTopLevel( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionGroupSelected( QObject *parent = 0 ) /Factory/; -%Docstring - -:rtype: QAction -%End QAction *actionMutuallyExclusiveGroup( QObject *parent = 0 ) /Factory/; %Docstring Action to enable/disable mutually exclusive flag of a group (only one child node may be checked) -:rtype: QAction - .. versionadded:: 2.12 %End @@ -133,10 +89,6 @@ Slot to enable/disable mutually exclusive group flag void zoomToLayers( QgsMapCanvas *canvas, const QList &layers ); QString uniqueGroupName( QgsLayerTreeGroup *parentGroup ); -%Docstring - -:rtype: str -%End protected: }; diff --git a/python/gui/layout/qgslayoutcustomdrophandler.sip b/python/gui/layout/qgslayoutcustomdrophandler.sip index 70e5824f561f..2d7d273b1376 100644 --- a/python/gui/layout/qgslayoutcustomdrophandler.sip +++ b/python/gui/layout/qgslayoutcustomdrophandler.sip @@ -34,8 +34,6 @@ is returned, then the handler has accepted this file and it should not be further processed (e.g. by other QgsLayoutCustomDropHandler). The base class implementation does nothing. - -:rtype: bool %End }; diff --git a/python/gui/layout/qgslayoutdesignerinterface.sip b/python/gui/layout/qgslayoutdesignerinterface.sip index e685c8165aea..3084ef064820 100644 --- a/python/gui/layout/qgslayoutdesignerinterface.sip +++ b/python/gui/layout/qgslayoutdesignerinterface.sip @@ -35,8 +35,6 @@ Constructor for QgsLayoutDesignerInterface. %Docstring Returns the layout displayed in the designer. -:rtype: QgsLayout - .. seealso:: :py:func:`view()` %End @@ -45,8 +43,6 @@ Returns the layout displayed in the designer. %Docstring Returns the layout view utilized by the designer. -:rtype: QgsLayoutView - .. seealso:: :py:func:`layout()` %End diff --git a/python/gui/layout/qgslayoutitemcombobox.sip b/python/gui/layout/qgslayoutitemcombobox.sip index 1ca0ad89de07..2bf0cd5adb38 100644 --- a/python/gui/layout/qgslayoutitemcombobox.sip +++ b/python/gui/layout/qgslayoutitemcombobox.sip @@ -38,6 +38,7 @@ Sets the ``layout`` containing the items to list in the combo box. void setItemType( QgsLayoutItemRegistry::ItemType itemType ); %Docstring Sets a filter for the item type to show in the combo box. + :param itemType: type of items to show. Set to QgsLayoutItemRegistry.LayoutItem to show all items. @@ -48,8 +49,6 @@ show all items. %Docstring Returns the filter for the item types to show in the combo box. -:rtype: QgsLayoutItemRegistry.ItemType - .. seealso:: :py:func:`setItemType()` %End @@ -64,8 +63,6 @@ Sets a list of specific items to exclude from the combo box. %Docstring Returns the list of specific items excluded from the combo box. -:rtype: list of QgsLayoutItem - .. seealso:: :py:func:`setExceptedItemList()` %End @@ -73,16 +70,12 @@ Returns the list of specific items excluded from the combo box. %Docstring Return the item currently shown at the specified ``index`` within the combo box. -:rtype: QgsLayoutItem - .. seealso:: :py:func:`currentItem()` %End QgsLayoutItem *currentItem() const; %Docstring Returns the item currently selected in the combo box. - -:rtype: QgsLayoutItem %End public slots: diff --git a/python/gui/layout/qgslayoutitemguiregistry.sip b/python/gui/layout/qgslayoutitemguiregistry.sip index b67791990659..e425c09d332b 100644 --- a/python/gui/layout/qgslayoutitemguiregistry.sip +++ b/python/gui/layout/qgslayoutitemguiregistry.sip @@ -52,50 +52,36 @@ If ``isNodeBased`` is true, then the corresponding item is a node based item. int type() const; %Docstring Returns the unique item type code for the layout item class. - -:rtype: int %End Flags flags() const; %Docstring Returns item flags. - -:rtype: Flags %End QString groupId() const; %Docstring Returns the item group ID, if set. - -:rtype: str %End bool isNodeBased() const; %Docstring Returns true if the associated item is a node based item. - -:rtype: bool %End QString visibleName() const; %Docstring Returns a translated, user visible name identifying the corresponding layout item. - -:rtype: str %End virtual QIcon creationIcon() const; %Docstring Returns an icon representing creation of the layout item type. - -:rtype: QIcon %End virtual QgsLayoutItemBaseWidget *createItemWidget( QgsLayoutItem *item ) /Factory/; %Docstring Creates a configuration widget for an ``item`` of this type. Can return None if no configuration GUI is required. - -:rtype: QgsLayoutItemBaseWidget %End virtual QgsLayoutViewRubberBand *createRubberBand( QgsLayoutView *view ) /Factory/; @@ -103,8 +89,6 @@ Creates a configuration widget for an ``item`` of this type. Can return None if Creates a rubber band for use when creating layout items of this type. Can return None if no rubber band should be created. The default behavior is to create a rectangular rubber band. -:rtype: QgsLayoutViewRubberBand - .. seealso:: :py:func:`createNodeRubberBand()` %End @@ -113,16 +97,12 @@ should be created. The default behavior is to create a rectangular rubber band. Creates a rubber band for use when creating layout node based items of this type. Can return None if no rubber band should be created. The default behavior is to return None. -:rtype: QAbstractGraphicsShapeItem - .. seealso:: :py:func:`createRubberBand()` %End virtual QgsLayoutItem *createItem( QgsLayout *layout ) /Factory/; %Docstring Creates an instance of the corresponding item type. - -:rtype: QgsLayoutItem %End virtual void newItemAddedToLayout( QgsLayoutItem *item ); @@ -218,15 +198,11 @@ QgsGui.layoutItemGuiRegistry(). %Docstring Returns the metadata for the specified item ``metadataId``. Returns None if a corresponding ``metadataId`` was not found in the registry. - -:rtype: QgsLayoutItemAbstractGuiMetadata %End bool addLayoutItemGuiMetadata( QgsLayoutItemAbstractGuiMetadata *metadata /Transfer/ ); %Docstring Registers the gui metadata for a new layout item type. Takes ownership of the metadata instance. - -:rtype: bool %End bool addItemGroup( const QgsLayoutItemGuiGroup &group ); @@ -237,8 +213,6 @@ addLayoutItemGuiMetadata() for any item types associated with the group. Returns true if group was added, or false if group could not be added (e.g. due to duplicate id value). -:rtype: bool - .. seealso:: :py:func:`itemGroup()` %End @@ -246,16 +220,12 @@ duplicate id value). %Docstring Returns a reference to the item group with matching ``id``. -:rtype: QgsLayoutItemGuiGroup - .. seealso:: :py:func:`addItemGroup()` %End QgsLayoutItem *createItem( int metadataId, QgsLayout *layout ) const /Factory/; %Docstring Creates a new instance of a layout item given the item metadata ``metadataId``, target ``layout``. - -:rtype: QgsLayoutItem %End void newItemAddedToLayout( int metadataId, QgsLayoutItem *item ); @@ -269,8 +239,6 @@ called for items added from templates. QgsLayoutItemBaseWidget *createItemWidget( QgsLayoutItem *item ) const /Factory/; %Docstring Creates a new instance of a layout item configuration widget for the specified ``item``. - -:rtype: QgsLayoutItemBaseWidget %End @@ -278,8 +246,6 @@ Creates a new instance of a layout item configuration widget for the specified ` QList< int > itemMetadataIds() const; %Docstring Returns a list of available item metadata ids handled by the registry. - -:rtype: list of int %End signals: diff --git a/python/gui/layout/qgslayoutitemwidget.sip b/python/gui/layout/qgslayoutitemwidget.sip index 2abefa236fc9..5e93bb8b5a5e 100644 --- a/python/gui/layout/qgslayoutitemwidget.sip +++ b/python/gui/layout/qgslayoutitemwidget.sip @@ -48,8 +48,6 @@ Updates a data defined button to reflect the item's current properties. QgsVectorLayer *coverageLayer() const; %Docstring Returns the current layout context coverage layer (if set). - -:rtype: QgsVectorLayer %End @@ -78,8 +76,6 @@ Constructor for QgsLayoutItemBaseWidget, linked with the specified ``layoutObjec QgsLayoutObject *layoutObject(); %Docstring Returns the layout object associated with this widget. - -:rtype: QgsLayoutObject %End bool setItem( QgsLayoutItem *item ); @@ -90,8 +86,6 @@ updated to match ``item``'s properties. If false is returned, then the widget could not be successfully updated to show the properties of ``item``. - -:rtype: bool %End protected: @@ -110,8 +104,6 @@ Updates a previously registered data defined button to reflect the item's curren QgsVectorLayer *coverageLayer() const; %Docstring Returns the current layout context coverage layer (if set). - -:rtype: QgsVectorLayer %End virtual bool setNewItem( QgsLayoutItem *item ); @@ -123,8 +115,6 @@ Subclasses can override this if they support changing items in place. Implementations must return true if the item was accepted and the widget was updated. - -:rtype: bool %End @@ -148,10 +138,6 @@ This widget can be embedded into other layout item widgets. QgsLayoutItemPropertiesWidget( QWidget *parent, QgsLayoutItem *item ); QgsLayoutItem::ReferencePoint positionMode() const; -%Docstring - -:rtype: QgsLayoutItem.ReferencePoint -%End void showBackgroundGroup( bool showGroup ); diff --git a/python/gui/layout/qgslayoutnewitempropertiesdialog.sip b/python/gui/layout/qgslayoutnewitempropertiesdialog.sip index 2e85bdc9f2fe..b83611ea90c2 100644 --- a/python/gui/layout/qgslayoutnewitempropertiesdialog.sip +++ b/python/gui/layout/qgslayoutnewitempropertiesdialog.sip @@ -41,16 +41,12 @@ Sets the item ``position`` to show in the dialog. %Docstring Returns the current item position defined by the dialog. -:rtype: QgsLayoutPoint - .. seealso:: :py:func:`setItemPosition()` %End int page() const; %Docstring Returns the page number for the new item. - -:rtype: int %End void setItemSize( QgsLayoutSize size ); @@ -64,8 +60,6 @@ Sets the item ``size`` to show in the dialog. %Docstring Returns the item size defined by the dialog. -:rtype: QgsLayoutSize - .. seealso:: :py:func:`setItemSize()` %End @@ -73,8 +67,6 @@ Returns the item size defined by the dialog. %Docstring Returns the item reference point defined by the dialog. -:rtype: QgsLayoutItem.ReferencePoint - .. seealso:: :py:func:`setReferencePoint()` %End diff --git a/python/gui/layout/qgslayoutruler.sip b/python/gui/layout/qgslayoutruler.sip index 3f25cc82ea33..b266a01fddd3 100644 --- a/python/gui/layout/qgslayoutruler.sip +++ b/python/gui/layout/qgslayoutruler.sip @@ -42,8 +42,6 @@ the scene with the rulers. %Docstring Returns the current layout view associated with the ruler. -:rtype: QgsLayoutView - .. seealso:: :py:func:`setLayoutView()` %End @@ -58,8 +56,6 @@ Sets the current layout ``view`` to synchronize the ruler with. %Docstring Returns the ruler size (either the height of a horizontal ruler or the width of a vertical rule). - -:rtype: int %End void setContextMenu( QMenu *menu ); diff --git a/python/gui/layout/qgslayoutunitscombobox.sip b/python/gui/layout/qgslayoutunitscombobox.sip index ad1e2fe9c411..2deccbc0aff8 100644 --- a/python/gui/layout/qgslayoutunitscombobox.sip +++ b/python/gui/layout/qgslayoutunitscombobox.sip @@ -30,8 +30,6 @@ Constructor for QgsLayoutUnitsComboBox. %Docstring Returns the unit currently selected in the combo box. -:rtype: QgsUnitTypes.LayoutUnit - .. seealso:: :py:func:`setUnit()` %End @@ -58,8 +56,6 @@ A measurement converter() must be set in order for the automatic unit conversion %Docstring Returns the converter used when automatically converting units for linked widgets. -:rtype: QgsLayoutMeasurementConverter - .. seealso:: :py:func:`setConverter()` %End diff --git a/python/gui/layout/qgslayoutview.sip b/python/gui/layout/qgslayoutview.sip index a00bb9412845..484a6fbf3a1a 100644 --- a/python/gui/layout/qgslayoutview.sip +++ b/python/gui/layout/qgslayoutview.sip @@ -46,8 +46,6 @@ Constructor for QgsLayoutView. %Docstring Returns the current layout associated with the view. -:rtype: QgsLayout - .. seealso:: :py:func:`setCurrentLayout()` .. seealso:: :py:func:`layoutSet()` @@ -67,8 +65,6 @@ Sets the current ``layout`` to edit in the view. %Docstring Returns the currently active tool for the view. -:rtype: QgsLayoutViewTool - .. seealso:: :py:func:`setTool()` %End @@ -93,6 +89,7 @@ You don't have to call it manually, QgsLayoutViewTool takes care of it. void setPreviewModeEnabled( bool enabled ); %Docstring Sets whether a preview effect should be used to alter the view's appearance. + :param enabled: Set to true to enable the preview effect on the view. .. seealso:: :py:func:`setPreviewMode()` @@ -102,8 +99,6 @@ Sets whether a preview effect should be used to alter the view's appearance. %Docstring Returns true if a preview effect is being used to alter the view's appearance. -:rtype: bool - .. seealso:: :py:func:`setPreviewModeEnabled()` %End @@ -122,8 +117,6 @@ if previewModeEnabled() is true. Returns the preview mode which may be used to modify the view's appearance. Preview modes are only used if previewModeEnabled() is true. -:rtype: QgsPreviewEffect.PreviewMode - .. seealso:: :py:func:`setPreviewMode()` .. seealso:: :py:func:`previewModeEnabled()` @@ -165,8 +158,6 @@ Sets a ``provider`` for context menus. Ownership of the provider is transferred %Docstring Returns the provider for context menus. Returned value may be None if no provider is set. -:rtype: QgsLayoutViewMenuProvider - .. seealso:: :py:func:`setMenuProvider()` %End @@ -176,8 +167,6 @@ Returns the page visible in the view. This method considers the page at the center of the view as the current visible page. -:rtype: int - .. seealso:: :py:func:`pageChanged()` %End @@ -185,8 +174,6 @@ page. %Docstring Returns a list of page items which are currently visible in the view. -:rtype: list of QgsLayoutItemPage - .. seealso:: :py:func:`visiblePageNumbers()` %End @@ -194,8 +181,6 @@ Returns a list of page items which are currently visible in the view. %Docstring Returns a list of page numbers for pages which are currently visible in the view. -:rtype: list of int - .. seealso:: :py:func:`visiblePages()` %End @@ -250,8 +235,6 @@ Pastes items from clipboard, using the specified ``mode``. A list of pasted items is returned. -:rtype: list of QgsLayoutItem - .. seealso:: :py:func:`copySelectedItems()` .. seealso:: :py:func:`hasItemsInClipboard()` @@ -264,8 +247,6 @@ in layout units. A list of pasted items is returned. -:rtype: list of QgsLayoutItem - .. seealso:: :py:func:`copySelectedItems()` .. seealso:: :py:func:`hasItemsInClipboard()` @@ -275,8 +256,6 @@ A list of pasted items is returned. %Docstring Returns true if the current clipboard contains layout items. -:rtype: bool - .. seealso:: :py:func:`pasteItems()` %End @@ -284,8 +263,6 @@ Returns true if the current clipboard contains layout items. %Docstring Returns the delta (in layout coordinates) by which to move items for the given key ``event``. - -:rtype: QPointF %End public slots: @@ -607,8 +584,6 @@ instances to provide custom context menus (opened upon right-click). virtual QMenu *createContextMenu( QWidget *parent /Transfer/, QgsLayout *layout, QPointF layoutPoint ) const = 0 /Factory/; %Docstring Return a newly created menu instance (or null pointer on error) - -:rtype: QMenu %End }; diff --git a/python/gui/layout/qgslayoutviewmouseevent.sip b/python/gui/layout/qgslayoutviewmouseevent.sip index 2bb3a2336b6c..6da3bbf74c1e 100644 --- a/python/gui/layout/qgslayoutviewmouseevent.sip +++ b/python/gui/layout/qgslayoutviewmouseevent.sip @@ -35,6 +35,7 @@ In addition to the coordinates in pixel space it also knows the coordinates the QgsLayoutViewMouseEvent( QgsLayoutView *view, QMouseEvent *event, bool snap = false ); %Docstring Constructor for QgsLayoutViewMouseEvent. Should only be required to be called from the QgsLayoutView. + :param view: The view in which the event occurred. :param event: The original mouse event :param snap: set to true to snap the point using the layout's snapping settings @@ -55,8 +56,6 @@ The ``ignoreItems`` argument can be used to specify a list of items to avoid sna %Docstring Returns the event point location in layout coordinates. -:rtype: QPointF - .. seealso:: :py:func:`pos()` %End @@ -65,8 +64,6 @@ Returns the event point location in layout coordinates. Returns the snapped event point location in layout coordinates. The snapped point will consider all possible snapping methods, such as snapping to grid or guide lines. -:rtype: QPointF - .. seealso:: :py:func:`isSnapped()` .. seealso:: :py:func:`pos()` @@ -76,8 +73,6 @@ all possible snapping methods, such as snapping to grid or guide lines. %Docstring Returns true if point was snapped, e.g. to grid or guide lines. -:rtype: bool - .. seealso:: :py:func:`snappedPoint()` %End diff --git a/python/gui/layout/qgslayoutviewrubberband.sip b/python/gui/layout/qgslayoutviewrubberband.sip index 566796e1949d..5df0445318fe 100644 --- a/python/gui/layout/qgslayoutviewrubberband.sip +++ b/python/gui/layout/qgslayoutviewrubberband.sip @@ -40,8 +40,6 @@ Constructor for QgsLayoutViewRubberBand. virtual QgsLayoutViewRubberBand *create( QgsLayoutView *view ) const = 0 /Factory/; %Docstring Creates a new instance of the QgsLayoutViewRubberBand subclass. - -:rtype: QgsLayoutViewRubberBand %End virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0; @@ -61,16 +59,12 @@ ending ``position`` (in layout coordinate space). Called when a rubber band use has finished and the rubber band is no longer required. Returns the final bounding box of the rubber band. - -:rtype: QRectF %End QgsLayoutView *view() const; %Docstring Returns the view associated with the rubber band. -:rtype: QgsLayoutView - .. seealso:: :py:func:`layout()` %End @@ -78,8 +72,6 @@ Returns the view associated with the rubber band. %Docstring Returns the layout associated with the rubber band. -:rtype: QgsLayout - .. seealso:: :py:func:`view()` %End @@ -87,8 +79,6 @@ Returns the layout associated with the rubber band. %Docstring Returns the brush used for drawing the rubber band. -:rtype: QBrush - .. seealso:: :py:func:`setBrush()` .. seealso:: :py:func:`pen()` @@ -107,8 +97,6 @@ Sets the ``brush`` used for drawing the rubber band. %Docstring Returns the pen used for drawing the rubber band. -:rtype: QPen - .. seealso:: :py:func:`setPen()` .. seealso:: :py:func:`brush()` @@ -131,8 +119,6 @@ Calculates an updated bounding box rectangle from a original ``start`` position and new ``position``. If ``constrainSquare`` is true then the bounding box will be forced to a square shape. If ``fromCenter`` is true then the original ``start`` position will form the center point of the returned rectangle. - -:rtype: QRectF %End }; diff --git a/python/gui/layout/qgslayoutviewtool.sip b/python/gui/layout/qgslayoutviewtool.sip index f947aa2e8102..4a15af8a09b9 100644 --- a/python/gui/layout/qgslayoutviewtool.sip +++ b/python/gui/layout/qgslayoutviewtool.sip @@ -47,8 +47,6 @@ to QgsLayoutView widgets. %Docstring Returns the current combination of flags set for the tool. -:rtype: QgsLayoutViewTool.Flags - .. seealso:: :py:func:`setFlags()` %End @@ -109,8 +107,6 @@ the previously used toolbutton to pop out. %Docstring Returns the action associated with the tool or None if no action is associated. -:rtype: QAction - .. seealso:: :py:func:`setAction()` %End @@ -134,16 +130,12 @@ Overridden implementations must take care to call the base class implementation. QString toolName() const; %Docstring Returns a user-visible, translated name for the tool. - -:rtype: str %End QgsLayoutView *view() const; %Docstring Returns the view associated with the tool. -:rtype: QgsLayoutView - .. seealso:: :py:func:`layout()` %End @@ -151,8 +143,6 @@ Returns the view associated with the tool. %Docstring Returns the layout associated with the tool. -:rtype: QgsLayout - .. seealso:: :py:func:`view()` %End @@ -160,8 +150,6 @@ Returns the layout associated with the tool. %Docstring Returns a list of items which should be ignored while snapping events for this tool. - -:rtype: list of QgsLayoutItem %End signals: @@ -203,8 +191,6 @@ Returns true if a mouse press/release operation which started at ``startViewPoint`` and ended at ``endViewPoint`` should be considered a "click and drag". If false is returned, the operation should be instead treated as just a click on ``startViewPoint``. - -:rtype: bool %End }; diff --git a/python/gui/layout/qgslayoutviewtooladditem.sip b/python/gui/layout/qgslayoutviewtooladditem.sip index e0c67725ed20..eb28462fcf0c 100644 --- a/python/gui/layout/qgslayoutviewtooladditem.sip +++ b/python/gui/layout/qgslayoutviewtooladditem.sip @@ -27,8 +27,6 @@ Layout view tool for adding items to a layout. %Docstring Returns the item metadata id for items created by the tool. -:rtype: int - .. seealso:: :py:func:`setItemMetadataId()` %End diff --git a/python/gui/layout/qgslayoutviewtooladdnodeitem.sip b/python/gui/layout/qgslayoutviewtooladdnodeitem.sip index 0bcacfbbc8a2..3862ffcbeb0c 100644 --- a/python/gui/layout/qgslayoutviewtooladdnodeitem.sip +++ b/python/gui/layout/qgslayoutviewtooladdnodeitem.sip @@ -27,8 +27,6 @@ Layout view tool for adding node based items to a layout. %Docstring Returns the item metadata id for items created by the tool. -:rtype: int - .. seealso:: :py:func:`setItemMetadataId()` %End diff --git a/python/gui/locator/qgslocatorwidget.sip b/python/gui/locator/qgslocatorwidget.sip index f567fa8e978a..0bf95098c95d 100644 --- a/python/gui/locator/qgslocatorwidget.sip +++ b/python/gui/locator/qgslocatorwidget.sip @@ -34,8 +34,6 @@ Constructor for QgsLocatorWidget. QgsLocator *locator(); %Docstring Returns a pointer to the locator utilized by this widget. - -:rtype: QgsLocator %End void setMapCanvas( QgsMapCanvas *canvas ); diff --git a/python/gui/processing/qgsprocessingalgorithmdialogbase.sip b/python/gui/processing/qgsprocessingalgorithmdialogbase.sip index 4c319914077e..17a11ffe3ef8 100644 --- a/python/gui/processing/qgsprocessingalgorithmdialogbase.sip +++ b/python/gui/processing/qgsprocessingalgorithmdialogbase.sip @@ -44,8 +44,6 @@ Sets the ``algorithm`` to run in the dialog. %Docstring Returns the algorithm running in the dialog. -:rtype: QgsProcessingAlgorithm - .. seealso:: :py:func:`setAlgorithm()` %End @@ -60,8 +58,6 @@ Sets the main ``widget`` for the dialog, usually a panel for configuring algorit %Docstring Returns the main widget for the dialog, usually a panel for configuring algorithm parameters. -:rtype: QWidget - .. seealso:: :py:func:`setMainWidget()` %End @@ -73,23 +69,17 @@ Switches the dialog to the log page. bool wasExecuted() const; %Docstring Returns true if an algorithm was executed in the dialog. - -:rtype: bool %End QgsProcessingFeedback *createFeedback() /Factory/; %Docstring Creates a new processing feedback object, automatically connected to the appropriate slots in this dialog. - -:rtype: QgsProcessingFeedback %End virtual QVariantMap getParameterValues() const; %Docstring Returns the parameter values for the algorithm to run in the dialog. - -:rtype: QVariantMap %End public slots: @@ -142,29 +132,21 @@ Pushes a console info string to the dialog's log. QPushButton *runButton(); %Docstring Returns the dialog's run button. - -:rtype: QPushButton %End QPushButton *cancelButton(); %Docstring Returns the dialog's cancel button. - -:rtype: QPushButton %End QDialogButtonBox *buttonBox(); %Docstring Returns the dialog's button box. - -:rtype: QDialogButtonBox %End QTabWidget *tabWidget(); %Docstring Returns the dialog's tab widget. - -:rtype: QTabWidget %End void clearProgress(); @@ -190,8 +172,6 @@ Resets the dialog's gui, ready for another algorithm execution. QgsMessageBar *messageBar(); %Docstring Returns the dialog's message bar. - -:rtype: QgsMessageBar %End void hideShortHelp(); diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index f500ca2ddc28..613ed1bef58e 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -38,16 +38,8 @@ Constructor %End virtual QgsPluginManagerInterface *pluginManagerInterface() = 0; -%Docstring - -:rtype: QgsPluginManagerInterface -%End virtual QgsLayerTreeView *layerTreeView() = 0; -%Docstring - -:rtype: QgsLayerTreeView -%End virtual void addCustomActionForLayerType( QAction *action, QString menu, QgsMapLayer::LayerType type, bool allLayers ) = 0; @@ -78,8 +70,6 @@ in order for this method to have any effect. %Docstring Remove action for layers in the layer tree previously added with addCustomActionForLayerType() -:rtype: bool - .. seealso:: :py:func:`addCustomActionForLayerType()` %End @@ -87,8 +77,6 @@ Remove action for layers in the layer tree previously added with addCustomAction %Docstring Returns a list of all map canvases open in the app. -:rtype: list of QgsMapCanvas - .. versionadded:: 3.0 %End @@ -96,8 +84,6 @@ Returns a list of all map canvases open in the app. %Docstring Create a new map canvas with the specified unique ``name``. -:rtype: QgsMapCanvas - .. versionadded:: 3.0 .. seealso:: :py:func:`closeMapCanvas()` @@ -116,63 +102,48 @@ Closes the additional map canvas with matching ``name``. %Docstring Returns the toolbar icon size. If ``dockedToolbar`` is true, the icon size for toolbars contained within docks is returned. - -:rtype: QSize %End virtual QList editableLayers( bool modified = false ) const = 0; %Docstring Return vector layers in edit mode + :param modified: whether to return only layers that have been modified :return: list of layers in legend order, or empty list * -:rtype: list of QgsMapLayer - %End virtual QgsMapLayer *activeLayer() = 0; %Docstring Get pointer to the active layer (layer selected in the legend) - -:rtype: QgsMapLayer %End virtual QgsMapCanvas *mapCanvas() = 0; %Docstring Return a pointer to the map canvas - -:rtype: QgsMapCanvas %End virtual QgsLayerTreeMapCanvasBridge *layerTreeCanvasBridge() = 0; %Docstring Returns a pointer to the layer tree canvas bridge -:rtype: QgsLayerTreeMapCanvasBridge - .. versionadded:: 2.12 %End virtual QWidget *mainWindow() = 0; %Docstring Return a pointer to the main window (instance of QgisApp in case of QGIS) - -:rtype: QWidget %End virtual QgsMessageBar *messageBar() = 0; %Docstring Return the message bar of the main app - -:rtype: QgsMessageBar %End virtual QList openComposers() = 0; %Docstring Returns all currently open composer windows. -:rtype: list of QgsComposerInterface - .. versionadded:: 3.0 %End @@ -180,8 +151,6 @@ Returns all currently open composer windows. %Docstring Returns all currently open layout designers. -:rtype: list of QgsLayoutDesignerInterface - .. versionadded:: 3.0 %End @@ -189,636 +158,228 @@ Returns all currently open layout designers. virtual QMap defaultStyleSheetOptions() = 0; %Docstring Return changeable options built from settings and/or defaults - -:rtype: QMap %End virtual QFont defaultStyleSheetFont() = 0; %Docstring Get reference font for initial qApp (may not be same as QgisApp) - -:rtype: QFont %End virtual QgsAdvancedDigitizingDockWidget *cadDockWidget() = 0; %Docstring Advanced digitizing dock widget -:rtype: QgsAdvancedDigitizingDockWidget - .. versionadded:: 2.12 %End virtual QMenu *projectMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *editMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *viewMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *layerMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *newLayerMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *addLayerMenu() = 0; %Docstring -:rtype: QMenu - .. versionadded:: 2.5 %End virtual QMenu *settingsMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *pluginMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *rasterMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *databaseMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *vectorMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *webMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *firstRightStandardMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *windowMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QMenu *helpMenu() = 0; -%Docstring - -:rtype: QMenu -%End virtual QToolBar *fileToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *layerToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *mapNavToolToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *digitizeToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *advancedDigitizeToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *attributesToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *pluginToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *helpToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *rasterToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *vectorToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *databaseToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QToolBar *webToolBar() = 0; -%Docstring - -:rtype: QToolBar -%End virtual QAction *actionNewProject() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionOpenProject() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSaveProject() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSaveProjectAs() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSaveMapAsImage() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionProjectProperties() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionPrintComposer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionShowComposerManager() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionExit() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionCutFeatures() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionCopyFeatures() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionPasteFeatures() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddFeature() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionDeleteSelected() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionMoveFeature() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSplitFeatures() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSplitParts() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddRing() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddPart() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSimplifyFeature() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionDeleteRing() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionDeletePart() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionNodeTool() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionPan() = 0; %Docstring Get access to the native pan action. Call trigger() on it to set the default pan map tool. - -:rtype: QAction %End virtual QAction *actionPanToSelected() = 0; %Docstring Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection. - -:rtype: QAction %End virtual QAction *actionZoomIn() = 0; %Docstring Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool. - -:rtype: QAction %End virtual QAction *actionZoomOut() = 0; %Docstring Get access to the native zoom out action. Call trigger() on it to set the default zoom out map tool. - -:rtype: QAction %End virtual QAction *actionSelect() = 0; %Docstring Get access to the native select action. Call trigger() on it to set the default select map tool. - -:rtype: QAction %End virtual QAction *actionSelectRectangle() = 0; %Docstring Get access to the native select rectangle action. Call trigger() on it to set the default select rectangle map tool. - -:rtype: QAction %End virtual QAction *actionSelectPolygon() = 0; %Docstring Get access to the native select polygon action. Call trigger() on it to set the default select polygon map tool. - -:rtype: QAction %End virtual QAction *actionSelectFreehand() = 0; %Docstring Get access to the native select freehand action. Call trigger() on it to set the default select freehand map tool. - -:rtype: QAction %End virtual QAction *actionSelectRadius() = 0; %Docstring Get access to the native select radius action. Call trigger() on it to set the default select radius map tool. - -:rtype: QAction %End virtual QAction *actionIdentify() = 0; %Docstring Get access to the native identify action. Call trigger() on it to set the default identify map tool. - -:rtype: QAction %End virtual QAction *actionFeatureAction() = 0; %Docstring Get access to the native run action feature action. Call trigger() on it to set the default run feature action map tool. - -:rtype: QAction %End virtual QAction *actionMeasure() = 0; %Docstring Get access to the native measure action. Call trigger() on it to set the default measure map tool. - -:rtype: QAction %End virtual QAction *actionMeasureArea() = 0; %Docstring Get access to the native measure area action. Call trigger() on it to set the default measure area map tool. - -:rtype: QAction %End virtual QAction *actionZoomFullExtent() = 0; %Docstring Get access to the native zoom full extent action. Call trigger() on it to zoom to the full extent. - -:rtype: QAction %End virtual QAction *actionZoomToLayer() = 0; %Docstring Get access to the native zoom to layer action. Call trigger() on it to zoom to the active layer. - -:rtype: QAction %End virtual QAction *actionZoomToSelected() = 0; %Docstring Get access to the native zoom to selected action. Call trigger() on it to zoom to the current selection. - -:rtype: QAction %End virtual QAction *actionZoomLast() = 0; %Docstring Get access to the native zoom last action. Call trigger() on it to zoom to last. - -:rtype: QAction %End virtual QAction *actionZoomNext() = 0; %Docstring Get access to the native zoom next action. Call trigger() on it to zoom to next. - -:rtype: QAction %End virtual QAction *actionZoomActualSize() = 0; %Docstring Get access to the native zoom resolution (100%) action. Call trigger() on it to zoom to actual size. - -:rtype: QAction %End virtual QAction *actionMapTips() = 0; %Docstring Get access to the native map tips action. Call trigger() on it to toggle map tips. - -:rtype: QAction %End virtual QAction *actionNewBookmark() = 0; %Docstring Get access to the native new bookmark action. Call trigger() on it to open the new bookmark dialog. - -:rtype: QAction %End virtual QAction *actionShowBookmarks() = 0; %Docstring Get access to the native show bookmarks action. Call trigger() on it to open the bookmarks dialog. - -:rtype: QAction %End virtual QAction *actionDraw() = 0; %Docstring Get access to the native draw action. - -:rtype: QAction %End virtual QAction *actionNewVectorLayer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddOgrLayer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddRasterLayer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddPgLayer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddWmsLayer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddAfsLayer() = 0; %Docstring Get access to the native Add ArcGIS FeatureServer action. - -:rtype: QAction %End virtual QAction *actionAddAmsLayer() = 0; %Docstring Get access to the native Add ArcGIS MapServer action. - -:rtype: QAction %End virtual QAction *actionCopyLayerStyle() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionPasteLayerStyle() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionOpenTable() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionOpenFieldCalculator() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionToggleEditing() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSaveActiveLayerEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAllEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSaveEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionSaveAllEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionRollbackEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionRollbackAllEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionCancelEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionCancelAllEdits() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionLayerSaveAs() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionDuplicateLayer() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionLayerProperties() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddToOverview() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAddAllToOverview() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionRemoveAllFromOverview() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionHideAllLayers() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionShowAllLayers() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionHideSelectedLayers() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionHideDeselectedLayers() = 0; %Docstring Returns the Hide Deselected Layers action. -:rtype: QAction - .. versionadded:: 3.0 %End virtual QAction *actionShowSelectedLayers() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionManagePlugins() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionPluginListSeparator() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionShowPythonDialog() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionToggleFullScreen() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionOptions() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionCustomProjection() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionHelpContents() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionQgisHomePage() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionCheckQgisVersion() = 0; -%Docstring - -:rtype: QAction -%End virtual QAction *actionAbout() = 0; -%Docstring - -:rtype: QAction -%End virtual QgsVectorLayerTools *vectorLayerTools() = 0; %Docstring @@ -827,15 +388,11 @@ With the help of this you can access methods like addFeature, startEditing or stopEditing while giving the user the appropriate dialogs. :return: An instance of the vector layer tools -:rtype: QgsVectorLayerTools - %End virtual int messageTimeout() = 0; %Docstring Get timeout for timed messages: default of 5 seconds - -:rtype: int %End virtual QgsStatusBar *statusBarIface() = 0; @@ -844,8 +401,6 @@ Returns a pointer to the app's status bar interface. This should be used for interacting and adding widgets and messages to the app's status bar (do not use the native Qt statusBar() method). -:rtype: QgsStatusBar - .. versionadded:: 3.0 %End @@ -875,29 +430,21 @@ Zoom to extent of the active layer virtual QgsVectorLayer *addVectorLayer( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey ) = 0; %Docstring Add a vector layer - -:rtype: QgsVectorLayer %End virtual QgsRasterLayer *addRasterLayer( const QString &rasterLayerPath, const QString &baseName = QString() ) = 0; %Docstring Add a raster layer given a raster layer file name - -:rtype: QgsRasterLayer %End virtual QgsRasterLayer *addRasterLayer( const QString &url, const QString &layerName, const QString &providerKey ) = 0; %Docstring Add a WMS layer - -:rtype: QgsRasterLayer %End virtual bool addProject( const QString &project ) = 0; %Docstring Add a project - -:rtype: bool %End virtual void newProject( bool promptToSaveFlag = false ) = 0; %Docstring @@ -918,8 +465,6 @@ select dialogs and the browser widgets) %Docstring Set the active layer (layer gets selected in the legend) returns true if the layer exists, false otherwise - -:rtype: bool %End virtual void copySelectionToClipboard( QgsMapLayer * ) = 0; @@ -939,8 +484,6 @@ Paste features from clipboard to the layer virtual int addToolBarIcon( QAction *qAction ) = 0; %Docstring Add an icon to the plugins toolbar - -:rtype: int %End virtual QAction *addToolBarWidget( QWidget *widget /Transfer/ ) = 0; @@ -952,8 +495,6 @@ with the returned QAction. :param widget: widget to add. The toolbar will take ownership of this widget :return: the QAction you can use to remove this widget from the toolbar -:rtype: QAction - %End virtual void removeToolBarIcon( QAction *qAction ) = 0; @@ -970,15 +511,11 @@ with the returned QAction. :param widget: widget to add. The toolbar will take ownership of this widget :return: the QAction you can use to remove this widget from the toolbar -:rtype: QAction - %End virtual int addRasterToolBarIcon( QAction *qAction ) = 0; %Docstring Add an icon to the Raster toolbar - -:rtype: int %End virtual void removeRasterToolBarIcon( QAction *qAction ) = 0; @@ -989,8 +526,6 @@ Remove an action (icon) from the Raster toolbar virtual int addVectorToolBarIcon( QAction *qAction ) = 0; %Docstring Add an icon to the Vector toolbar - -:rtype: int %End virtual QAction *addVectorToolBarWidget( QWidget *widget /Transfer/ ) = 0; @@ -1002,8 +537,6 @@ with the returned QAction. :param widget: widget to add. The toolbar will take ownership of this widget :return: the QAction you can use to remove this widget from the toolbar -:rtype: QAction - %End virtual void removeVectorToolBarIcon( QAction *qAction ) = 0; @@ -1014,8 +547,6 @@ Remove an action (icon) from the Vector toolbar virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0; %Docstring Add an icon to the Database toolbar - -:rtype: int %End virtual QAction *addDatabaseToolBarWidget( QWidget *widget /Transfer/ ) = 0; @@ -1027,8 +558,6 @@ with the returned QAction. :param widget: widget to add. The toolbar will take ownership of this widget :return: the QAction you can use to remove this widget from the toolbar -:rtype: QAction - %End virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0; @@ -1039,8 +568,6 @@ Remove an action (icon) from the Database toolbar virtual int addWebToolBarIcon( QAction *qAction ) = 0; %Docstring Add an icon to the Web toolbar - -:rtype: int %End virtual QAction *addWebToolBarWidget( QWidget *widget /Transfer/ ) = 0; @@ -1052,8 +579,6 @@ with the returned QAction. :param widget: widget to add. The toolbar will take ownership of this widget :return: the QAction you can use to remove this widget from the toolbar -:rtype: QAction - %End virtual void removeWebToolBarIcon( QAction *qAction ) = 0; @@ -1064,8 +589,6 @@ Remove an action (icon) from the Web toolbar virtual QToolBar *addToolBar( const QString &name ) = 0 /Factory/; %Docstring Add toolbar with specified name - -:rtype: QToolBar %End virtual void addToolBar( QToolBar *toolbar /Transfer/, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0; @@ -1091,8 +614,6 @@ Opens a new composer window for the specified ``composition``, or brings an already open composer window to the foreground if one is already created for the composition. -:rtype: QgsComposerInterface - .. versionadded:: 3.0 .. seealso:: :py:func:`closeComposer()` @@ -1121,8 +642,6 @@ Opens a new layout designer dialog for the specified ``layout``, or brings an already open designer window to the foreground if one is already created for the layout. -:rtype: QgsLayoutDesignerInterface - .. versionadded:: 3.0 .. seealso:: :py:func:`closeComposer()` @@ -1139,6 +658,7 @@ the dialog to open at a specific page. virtual void buildStyleSheet( const QMap &opts ) = 0; %Docstring Generate stylesheet + :param opts: generated default option values, or a changed copy of them %End @@ -1225,8 +745,6 @@ Open layer properties dialog virtual QDialog *showAttributeTable( QgsVectorLayer *l, const QString &filterExpression = QString() ) = 0; %Docstring Open attribute table dialog - -:rtype: QDialog %End virtual void addWindow( QAction *action ) = 0; @@ -1244,15 +762,11 @@ windows which are hidden rather than deleted when closed. * virtual bool registerMainWindowAction( QAction *action, const QString &defaultShortcut ) = 0; %Docstring Register action to the shortcuts manager so its shortcut can be changed in GUI - -:rtype: bool %End virtual bool unregisterMainWindowAction( QAction *action ) = 0; %Docstring Unregister a previously registered action. (e.g. when plugin is going to be unloaded) - -:rtype: bool %End virtual void registerMapLayerConfigWidgetFactory( QgsMapLayerConfigWidgetFactory *factory ) = 0; @@ -1353,6 +867,7 @@ Unregister a previously registered custom drop ``handler`` for layout windows. Open a url in the users browser. By default the QGIS doc directory is used as the base for the URL. To open a URL that is not relative to the installed QGIS documentation, set useQgisDocDirectory to false. + :param url: URL to open :param useQgisDocDirectory: If true, the URL will be formed by concatenating url to the QGIS documentation directory path (prefix/share/doc) @@ -1362,12 +877,11 @@ url to the QGIS documentation directory path (prefix/share/doc) virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false, bool showModal = true ) = 0; %Docstring Open feature form + :param l: vector layer :param f: feature to show/modify :param updateFeatureOnly: only update the feature update (don't change any attributes of the layer) [UNUSED] :param showModal: if true, will wait for the dialog to be executed (only shown otherwise) - -:rtype: bool %End virtual QgsAttributeDialog *getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0; @@ -1378,8 +892,6 @@ Returns a feature form for a given feature :param f: The feature for which the dialog will be created :return: A feature form -:rtype: QgsAttributeDialog - %End virtual void preloadForm( const QString &uifile ) = 0; @@ -1427,8 +939,6 @@ Checks available datum transforms and ask user if several are available and none is chosen. Dialog is shown only if global option is set accordingly. :return: true if a datum transform has been specifically chosen by user or only one is available. -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsabstractdatasourcewidget.sip b/python/gui/qgsabstractdatasourcewidget.sip index 6e534d464df1..74ce2761d585 100644 --- a/python/gui/qgsabstractdatasourcewidget.sip +++ b/python/gui/qgsabstractdatasourcewidget.sip @@ -79,6 +79,7 @@ will be used. void addVectorLayers( const QStringList &layerList, const QString &encoding, const QString &dataSourceType ); %Docstring Emitted when one or more OGR supported layers are selected for addition + :param layerList: list of layers protocol URIs :param encoding: encoding :param dataSourceType: string (can be "file" or "database") @@ -87,6 +88,7 @@ Emitted when one or more OGR supported layers are selected for addition void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider ); %Docstring Emitted when a layer needs to be replaced + :param oldId: old layer ID :param source: URI of the layer :param name: of the layer @@ -120,15 +122,11 @@ Constructor QgsProviderRegistry::WidgetMode widgetMode() const; %Docstring Return the widget mode - -:rtype: QgsProviderRegistry.WidgetMode %End const QgsMapCanvas *mapCanvas() const; %Docstring Return the map canvas (can be null) - -:rtype: QgsMapCanvas %End void setupButtons( QDialogButtonBox *buttonBox ); @@ -139,8 +137,6 @@ Connect the ok and apply/add buttons to the slots QPushButton *addButton( ) const; %Docstring Return the add Button - -:rtype: QPushButton %End }; diff --git a/python/gui/qgsactionmenu.sip b/python/gui/qgsactionmenu.sip index 1531ac73551e..83b04558324b 100644 --- a/python/gui/qgsactionmenu.sip +++ b/python/gui/qgsactionmenu.sip @@ -84,8 +84,6 @@ Sets an expression context scope used to resolve underlying actions. %Docstring Returns an expression context scope used to resolve underlying actions. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsadvanceddigitizingdockwidget.sip b/python/gui/qgsadvanceddigitizingdockwidget.sip index 85d3c4b8618e..6d6b662faae5 100644 --- a/python/gui/qgsadvanceddigitizingdockwidget.sip +++ b/python/gui/qgsadvanceddigitizingdockwidget.sip @@ -67,6 +67,7 @@ It contains all values (locked, value, relative) and pointers to corresponding w CadConstraint( QLineEdit *lineEdit, QToolButton *lockerButton, QToolButton *relativeButton = 0, QToolButton *repeatingLockButton = 0 ); %Docstring Constructor for CadConstraint. + :param lineEdit: associated line edit for constraint value :param lockerButton: associated button for locking constraint :param relativeButton: optional button for toggling relative constraint mode @@ -78,15 +79,11 @@ Constructor for CadConstraint. The current lock mode of this constraint :return: Lock mode -:rtype: LockMode - %End bool isLocked() const; %Docstring Is any kind of lock mode enabled - -:rtype: bool %End bool isRepeatingLock() const; @@ -94,8 +91,6 @@ Is any kind of lock mode enabled Returns true if a repeating lock is set for the constraint. Repeating locks are not automatically cleared after a new point is added. -:rtype: bool - .. versionadded:: 2.16 .. seealso:: :py:func:`setRepeatingLock()` @@ -104,22 +99,16 @@ automatically cleared after a new point is added. bool relative() const; %Docstring Is the constraint in relative mode - -:rtype: bool %End double value() const; %Docstring The value of the constraint - -:rtype: float %End QLineEdit *lineEdit() const; %Docstring The line edit that manages the value of the constraint - -:rtype: QLineEdit %End void setLockMode( LockMode mode ); @@ -131,6 +120,7 @@ Set the lock mode %Docstring Sets whether a repeating lock is set for the constraint. Repeating locks are not automatically cleared after a new point is added. + :param repeating: set to true to set the lock to repeat automatically .. versionadded:: 2.16 @@ -146,6 +136,7 @@ Set if the constraint should be treated relative void setValue( double value, bool updateWidget = true ); %Docstring Set the value of the constraint + :param value: new value for constraint :param updateWidget: set to false to prevent automatically updating the associated widget's value %End @@ -165,6 +156,7 @@ Toggle relative mode explicit QgsAdvancedDigitizingDockWidget( QgsMapCanvas *canvas, QWidget *parent = 0 ); %Docstring Create an advanced digitizing dock widget + :param canvas: The map canvas on which the widget operates :param parent: The parent %End @@ -182,8 +174,6 @@ Filter key events to e.g. toggle construction mode or adapt constraints :param e: A mouse event (may be modified) :return: If the event is hidden (construction mode hides events from the maptool) -:rtype: bool - %End bool applyConstraints( QgsMapMouseEvent *e ); @@ -191,8 +181,6 @@ Filter key events to e.g. toggle construction mode or adapt constraints apply the CAD constraints. The will modify the position of the map event in map coordinates by applying the CAD constraints. :return: false if no solution was found (invalid constraints) -:rtype: bool - %End bool alignToSegment( QgsMapMouseEvent *e, QgsAdvancedDigitizingDockWidget::CadConstraint::LockMode lockMode = QgsAdvancedDigitizingDockWidget::CadConstraint::HardLock ); @@ -200,14 +188,13 @@ apply the CAD constraints. The will modify the position of the map event in map align to segment for additional constraint. If additional constraints are used, this will determine the angle to be locked depending on the snapped segment. -:rtype: bool - .. versionadded:: 3.0 %End void releaseLocks( bool releaseRepeatingLocks = true ); %Docstring unlock all constraints + :param releaseRepeatingLocks: set to false to preserve the lock for any constraints set to repeating lock mode .. versionadded:: 3.0 @@ -224,52 +211,36 @@ Clear any cached previous clicks and helper lines bool cadEnabled() const; %Docstring determines if CAD tools are enabled or if map tools behaves "nomally" - -:rtype: bool %End bool constructionMode() const; %Docstring construction mode is used to draw intermediate points. These points won't be given any further (i.e. to the map tools) - -:rtype: bool %End AdditionalConstraint additionalConstraint() const; %Docstring Additional constraints are used to place perpendicular/parallel segments to snapped segments on the canvas - -:rtype: AdditionalConstraint %End const CadConstraint *constraintAngle() const; %Docstring Constraint on the angle - -:rtype: CadConstraint %End const CadConstraint *constraintDistance() const; %Docstring Constraint on the distance - -:rtype: CadConstraint %End const CadConstraint *constraintX() const; %Docstring Constraint on the X coordinate - -:rtype: CadConstraint %End const CadConstraint *constraintY() const; %Docstring Constraint on the Y coordinate - -:rtype: CadConstraint %End bool commonAngleConstraint() const; %Docstring Constraint on a common angle - -:rtype: bool %End void clearPoints(); @@ -301,8 +272,6 @@ automatically populated when user clicks with left mouse button on map canvas. The last point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both "normal" points and intermediate points (construction mode). - -:rtype: QgsPointXY %End QgsPointXY previousPoint( bool *exists = 0 ) const; @@ -310,8 +279,6 @@ currently digitized. It contains both "normal" points and intermediate points ( The previous point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both "normal" points and intermediate points (construction mode). - -:rtype: QgsPointXY %End QgsPointXY penultimatePoint( bool *exists = 0 ) const; @@ -319,36 +286,26 @@ currently digitized. It contains both "normal" points and intermediate points ( The penultimate point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both "normal" points and intermediate points (construction mode). - -:rtype: QgsPointXY %End int pointsCount() const; %Docstring The number of points in the CAD point helper list - -:rtype: int %End bool snappedToVertex() const; %Docstring Is it snapped to a vertex - -:rtype: bool %End QList snappedSegment() const; %Docstring Snapped to a segment - -:rtype: list of QgsPointXY %End QAction *enableAction(); %Docstring return the action used to enable/disable the tools - -:rtype: QAction %End void enable(); @@ -396,10 +353,6 @@ when a constraint is toggled. private: //! event filter for line edits in the dock UI (angle/distance/x/y line edits) bool eventFilter( QObject *obj, QEvent *event ); -%Docstring - -:rtype: bool -%End }; QFlags operator|(QgsAdvancedDigitizingDockWidget::CadCapacity f1, QFlags f2); diff --git a/python/gui/qgsaggregatetoolbutton.sip b/python/gui/qgsaggregatetoolbutton.sip index 6e2f8027d941..2437ec5ac118 100644 --- a/python/gui/qgsaggregatetoolbutton.sip +++ b/python/gui/qgsaggregatetoolbutton.sip @@ -37,8 +37,6 @@ Based on the ``type`` of underlying data, some aggregates will be available or n QVariant::Type type() const; %Docstring Based on the ``type`` of underlying data, some aggregates will be available or not. - -:rtype: QVariant.Type %End void setActive( bool active ); @@ -49,15 +47,11 @@ When this flag is false, the aggregate will be deactivated. I.e. no aggregate is bool active() const; %Docstring When this flag is false, the aggregate will be deactivated. I.e. no aggregate is chosen. - -:rtype: bool %End QString aggregate() const; %Docstring The function name of the selected aggregate or a Null String if none is chosen. - -:rtype: str %End void setAggregate( const QString &aggregate ); diff --git a/python/gui/qgsattributedialog.sip b/python/gui/qgsattributedialog.sip index 37796882b506..9f2266d22b8f 100644 --- a/python/gui/qgsattributedialog.sip +++ b/python/gui/qgsattributedialog.sip @@ -47,33 +47,25 @@ this dialog box was used. void setHighlight( QgsHighlight *h ); %Docstring setHighlight + :param h: The highlight. Ownership is taken. %End QgsAttributeForm *attributeForm(); -%Docstring - -:rtype: QgsAttributeForm -%End const QgsFeature *feature(); -%Docstring - -:rtype: QgsFeature -%End bool editable(); %Docstring Is this dialog editable? :return: returns true, if this dialog was created in an editable manner. -:rtype: bool - %End void setMode( QgsAttributeForm::Mode mode ); %Docstring Toggles the form mode. + :param mode: form mode. For example, if set to QgsAttributeForm.AddFeatureMode, the dialog will be editable even with an invalid feature and will add a new feature when the form is accepted. %End @@ -93,8 +85,6 @@ Intercept window activate/deactive events to show/hide the highlighted feature. :param e: The event :return: The same as the parent QDialog -:rtype: bool - %End public slots: diff --git a/python/gui/qgsattributeeditorcontext.sip b/python/gui/qgsattributeeditorcontext.sip index 0186fe19ef03..c7d7f8bfcaa1 100644 --- a/python/gui/qgsattributeeditorcontext.sip +++ b/python/gui/qgsattributeeditorcontext.sip @@ -50,42 +50,25 @@ Constructor for QgsAttributeEditorContext void setDistanceArea( const QgsDistanceArea &distanceArea ); const QgsDistanceArea &distanceArea() const; -%Docstring - -:rtype: QgsDistanceArea -%End void setVectorLayerTools( QgsVectorLayerTools *vlTools ); const QgsVectorLayerTools *vectorLayerTools() const; -%Docstring - -:rtype: QgsVectorLayerTools -%End void setRelation( const QgsRelation &relation, RelationMode mode ); const QgsRelation &relation() const; -%Docstring - -:rtype: QgsRelation -%End RelationMode relationMode() const; -%Docstring - -:rtype: RelationMode -%End FormMode formMode() const; %Docstring Returns the form mode. -:rtype: FormMode - .. seealso:: :py:func:`setFormMode()` %End void setFormMode( FormMode mode ); %Docstring Sets the form mode. + :param mode: form mode .. seealso:: :py:func:`formMode()` @@ -97,8 +80,6 @@ Sets the form mode. %Docstring Returns true if the attribute editor should permit use of custom UI forms. -:rtype: bool - .. seealso:: :py:func:`setAllowCustomUi()` .. versionadded:: 2.16 @@ -107,6 +88,7 @@ Returns true if the attribute editor should permit use of custom UI forms. void setAllowCustomUi( bool allow ); %Docstring Sets whether the attribute editor should permit use of custom UI forms. + :param allow: set to true to allow custom UI forms, or false to disable them and use default generated QGIS forms @@ -116,10 +98,6 @@ QGIS forms %End const QgsAttributeEditorContext *parentContext() const; -%Docstring - -:rtype: QgsAttributeEditorContext -%End }; diff --git a/python/gui/qgsattributeform.sip b/python/gui/qgsattributeform.sip index c3696166b97d..37546a1963c6 100644 --- a/python/gui/qgsattributeform.sip +++ b/python/gui/qgsattributeform.sip @@ -42,10 +42,6 @@ class QgsAttributeForm : QWidget ~QgsAttributeForm(); const QgsFeature &feature(); -%Docstring - -:rtype: QgsFeature -%End void hideButtonBox(); @@ -56,6 +52,7 @@ class QgsAttributeForm : QWidget void addInterface( QgsAttributeFormInterface *iface /Transfer/ ); %Docstring Takes ownership + :param iface: %End @@ -64,8 +61,6 @@ Takes ownership Returns the layer for which this form is shown :return: Layer -:rtype: QgsVectorLayer - %End bool editable(); @@ -73,16 +68,12 @@ Returns the layer for which this form is shown Returns if the form is currently in editable mode. :return: Editable mode of this form -:rtype: bool - %End Mode mode() const; %Docstring Returns the current mode of the form. -:rtype: Mode - .. versionadded:: 2.16 .. seealso:: :py:func:`setMode()` @@ -91,6 +82,7 @@ Returns the current mode of the form. void setMode( Mode mode ); %Docstring Sets the current mode of the form. + :param mode: form mode .. versionadded:: 2.16 @@ -114,13 +106,12 @@ Intercepts keypress on custom form (escape should not close it) :param event: The event which is being filtered :return: true if the event has been handled (key was ESC) -:rtype: bool - %End void setMultiEditFeatureIds( const QgsFeatureIds &fids ); %Docstring Sets all feature IDs which are to be edited if the form is in multiedit mode + :param fids: feature ID list .. versionadded:: 2.16 @@ -130,6 +121,7 @@ Sets all feature IDs which are to be edited if the form is in multiedit mode %Docstring Sets the message bar to display feedback from the form in. This is used in the search/filter mode to display the count of selected features. + :param messageBar: target message bar .. versionadded:: 2.16 @@ -141,8 +133,6 @@ The aggregate filter is only useful if the form is in AggregateFilter mode. In this case it will return a combined expression according to the chosen filters on all attribute widgets. -:rtype: str - .. versionadded:: 3.0 %End @@ -165,6 +155,7 @@ Is emitted, when a feature is changed or added void filterExpressionSet( const QString &expression, QgsAttributeForm::FilterType type ); %Docstring Is emitted when a filter expression is set using the form. + :param expression: filter expression :param type: filter type @@ -174,6 +165,7 @@ Is emitted when a filter expression is set using the form. void modeChanged( QgsAttributeForm::Mode mode ); %Docstring Emitted when the form changes mode. + :param mode: new mode %End @@ -221,8 +213,6 @@ Update all editors to correspond to a different feature. Save all the values from the editors to the layer. :return: True if successful -:rtype: bool - %End void resetValues(); diff --git a/python/gui/qgsattributeformeditorwidget.sip b/python/gui/qgsattributeformeditorwidget.sip index 79b03503afee..a2d1d4a80e66 100644 --- a/python/gui/qgsattributeformeditorwidget.sip +++ b/python/gui/qgsattributeformeditorwidget.sip @@ -29,6 +29,7 @@ controlling the multi edit results. QgsAttributeForm *form /TransferThis/ ); %Docstring Constructor for QgsAttributeFormEditorWidget. + :param editorWidget: associated editor widget wrapper (for default/edit modes) :param widgetType: the type identifier of the widget passed in the wrapper @@ -43,6 +44,7 @@ wrapper void initialize( const QVariant &initialValue, bool mixedValues = false ); %Docstring Resets the widget to an initial value. + :param initialValue: initial value to show in widget :param mixedValues: set to true to initially show the mixed values state %End @@ -51,16 +53,12 @@ Resets the widget to an initial value. %Docstring Returns true if the widget's value has been changed since it was initialized. -:rtype: bool - .. seealso:: :py:func:`initialize()` %End QVariant currentValue() const; %Docstring Returns the current value of the attached editor widget. - -:rtype: QVariant %End void setConstraintStatus( const QString &constraint, const QString &description, const QString &err, QgsEditorWidgetWrapper::ConstraintResult result ); @@ -78,6 +76,7 @@ Set the constraint result lable visible or invisible according to the layer edit void setIsMixed( bool mixed ); %Docstring Sets whether the widget should be displayed in a "mixed values" mode. + :param mixed: set to true to show in a mixed values state %End @@ -91,6 +90,7 @@ Called when field values have been committed; void valueChanged( const QVariant &value ); %Docstring Emitted when the widget's value changes + :param value: new widget value %End diff --git a/python/gui/qgsattributeforminterface.sip b/python/gui/qgsattributeforminterface.sip index 24ad62424b73..cd99f6db4252 100644 --- a/python/gui/qgsattributeforminterface.sip +++ b/python/gui/qgsattributeforminterface.sip @@ -21,26 +21,14 @@ class QgsAttributeFormInterface virtual ~QgsAttributeFormInterface(); virtual bool acceptChanges( const QgsFeature &feature ); -%Docstring - -:rtype: bool -%End virtual void initForm(); virtual void featureChanged(); QgsAttributeForm *form(); -%Docstring - -:rtype: QgsAttributeForm -%End const QgsFeature &feature(); -%Docstring - -:rtype: QgsFeature -%End }; diff --git a/python/gui/qgsattributeformwidget.sip b/python/gui/qgsattributeformwidget.sip index 9e97d2f207b1..19899067cc00 100644 --- a/python/gui/qgsattributeformwidget.sip +++ b/python/gui/qgsattributeformwidget.sip @@ -50,8 +50,6 @@ search mode. Creates an expression matching the current search filter value and search properties represented in the widget. -:rtype: str - .. versionadded:: 2.16 %End @@ -60,6 +58,7 @@ search properties represented in the widget. %Docstring Sets the current mode for the widget. The widget will adapt its state and visible widgets to reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode. + :param mode: widget mode .. seealso:: :py:func:`mode()` @@ -69,23 +68,17 @@ reflect the updated mode. For example, showing multi edit tool buttons if the mo %Docstring Returns the current mode for the widget. -:rtype: Mode - .. seealso:: :py:func:`setMode()` %End QgsVectorLayer *layer(); %Docstring The layer for which this widget and its form is shown. - -:rtype: QgsVectorLayer %End QgsAttributeForm *form() const; %Docstring The form on which this widget is shown. - -:rtype: QgsAttributeForm %End @@ -94,6 +87,7 @@ The form on which this widget is shown. %Docstring Sets the search widget wrapper for the widget used when the form is in search mode. + :param wrapper: search widget wrapper. .. note:: @@ -118,8 +112,6 @@ Used to register a secondary search widget as used for "between" searches. Returns the search widget wrapper used in this widget. The wrapper must first be created using createSearchWidgetWrapper() -:rtype: list of QgsSearchWidgetWrapper - .. note:: this method is in place for unit testing only, and is not considered @@ -135,8 +127,6 @@ Resets the search/filter value of the widget. %Docstring The visibility of the search widget tool button, that allows (de)activating this search widgte or defines the comparison operator to use. - -:rtype: bool %End void setSearchWidgetToolButtonVisible( bool searchWidgetToolButtonVisible ); diff --git a/python/gui/qgsattributetypeloaddialog.sip b/python/gui/qgsattributetypeloaddialog.sip index ae384a6004c4..7c5025d4db97 100644 --- a/python/gui/qgsattributetypeloaddialog.sip +++ b/python/gui/qgsattributetypeloaddialog.sip @@ -29,6 +29,7 @@ values, then delegate to QDialog.accept() void setVectorLayer( QgsVectorLayer *layer ); %Docstring Sets predefined vector layer for selection of data + :param layer: Vector layer which is to be set as predefined one %End @@ -37,8 +38,6 @@ Sets predefined vector layer for selection of data Getter to value map which is currently active :return: value map of vlues selected from layer -:rtype: QMap - %End bool insertNull(); @@ -46,8 +45,6 @@ Getter to value map which is currently active Returns true if the "Add NULL value" checkbox has been checked. :return: true if the "Add NULL value" checkbox has been checked. -:rtype: bool - %End }; diff --git a/python/gui/qgsblendmodecombobox.sip b/python/gui/qgsblendmodecombobox.sip index dc5ecfefa8cc..07b7d6f81dc6 100644 --- a/python/gui/qgsblendmodecombobox.sip +++ b/python/gui/qgsblendmodecombobox.sip @@ -29,8 +29,6 @@ Constructor for QgsBlendModeComboBox QPainter::CompositionMode blendMode(); %Docstring Function to read the selected blend mode as QPainter.CompositionMode - -:rtype: QPainter.CompositionMode %End void setBlendMode( QPainter::CompositionMode blendMode ); %Docstring diff --git a/python/gui/qgsbrowserdockwidget.sip b/python/gui/qgsbrowserdockwidget.sip index b78ef5f49d48..c23771a77f45 100644 --- a/python/gui/qgsbrowserdockwidget.sip +++ b/python/gui/qgsbrowserdockwidget.sip @@ -25,6 +25,7 @@ The QgsBrowserDockWidget class explicit QgsBrowserDockWidget( const QString &name, QgsBrowserModel *browserModel, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsBrowserDockWidget + :param name: name of the widget :param browserModel: instance of the (shared) browser model :param parent: parent widget diff --git a/python/gui/qgsbrowsertreeview.sip b/python/gui/qgsbrowsertreeview.sip index faadacc6b1bc..dc09b813bc76 100644 --- a/python/gui/qgsbrowsertreeview.sip +++ b/python/gui/qgsbrowsertreeview.sip @@ -38,8 +38,6 @@ Set the browser model QgsBrowserModel *browserModel(); %Docstring Return the browser model - -:rtype: QgsBrowserModel %End virtual void showEvent( QShowEvent *e ); @@ -47,10 +45,6 @@ Return the browser model bool hasExpandedDescendant( const QModelIndex &index ) const; -%Docstring - -:rtype: bool -%End void setSettingsSection( const QString §ion ); diff --git a/python/gui/qgsbusyindicatordialog.sip b/python/gui/qgsbusyindicatordialog.sip index ff65839afdf8..8983cc7cceae 100644 --- a/python/gui/qgsbusyindicatordialog.sip +++ b/python/gui/qgsbusyindicatordialog.sip @@ -26,16 +26,13 @@ A simple dialog to show an indeterminate busy progress indicator. %Docstring Constructor Modal busy indicator dialog with no buttons. + :param message: Text to show above busy progress indicator. :param parent: parent object (owner) :param fl: widget flags %End QString message() const; -%Docstring - -:rtype: str -%End void setMessage( const QString &message ); }; diff --git a/python/gui/qgscharacterselectordialog.sip b/python/gui/qgscharacterselectordialog.sip index 53e42aebd372..fcc2e7f14e75 100644 --- a/python/gui/qgscharacterselectordialog.sip +++ b/python/gui/qgscharacterselectordialog.sip @@ -24,10 +24,6 @@ A dialog for selecting a single character from a single font public slots: const QChar &selectCharacter( bool *gotChar, const QFont &font, const QString &style ); -%Docstring - -:rtype: QChar -%End protected: }; diff --git a/python/gui/qgscheckablecombobox.sip b/python/gui/qgscheckablecombobox.sip index c1949ea43864..0635e614b460 100644 --- a/python/gui/qgscheckablecombobox.sip +++ b/python/gui/qgscheckablecombobox.sip @@ -36,14 +36,13 @@ Constructor for QgsCheckableComboBox. %Docstring Returns separator used to separate items in the display text. -:rtype: str - .. seealso:: :py:func:`setSeparator()` %End void setSeparator( const QString &separator ); %Docstring Set separator used to separate items in the display text. + :param separator: separator to use .. seealso:: :py:func:`separator()` @@ -54,8 +53,6 @@ Set separator used to separate items in the display text. Returns default text which will be displayed in the widget when no items selected. -:rtype: str - .. seealso:: :py:func:`setDefaultText()` %End @@ -63,6 +60,7 @@ when no items selected. %Docstring Set default text which will be displayed in the widget when no items selected. + :param text: default text .. seealso:: :py:func:`defaultText()` @@ -72,17 +70,14 @@ no items selected. %Docstring Returns currently checked items. -:rtype: list of str - .. seealso:: :py:func:`setCheckedItems()` %End Qt::CheckState itemCheckState( int index ) const; %Docstring Returns the checked state of the item identified by index -:param index: item index -:rtype: Qt.CheckState +:param index: item index .. seealso:: :py:func:`setItemCheckState()` @@ -92,6 +87,7 @@ Returns the checked state of the item identified by index void setItemCheckState( int index, Qt::CheckState state ); %Docstring Sets the item check state to state + :param index: item index :param state: check state @@ -103,6 +99,7 @@ Sets the item check state to state void toggleItemCheckState( int index ); %Docstring Toggles the item check state + :param index: item index .. seealso:: :py:func:`itemCheckState()` @@ -121,8 +118,6 @@ visible and resets the internal state. %Docstring Filters events to enable context menu - -:rtype: bool %End signals: @@ -137,6 +132,7 @@ This signal is emitted whenever the checked items list changed. void setCheckedItems( const QStringList &items ); %Docstring Set items which should be checked/selected. + :param items: items to select .. seealso:: :py:func:`checkedItems()` diff --git a/python/gui/qgscodeeditor.sip b/python/gui/qgscodeeditor.sip index fb9962bc76ef..830ecd0ee0cf 100644 --- a/python/gui/qgscodeeditor.sip +++ b/python/gui/qgscodeeditor.sip @@ -44,45 +44,37 @@ Construct a new code editor. void setTitle( const QString &title ); %Docstring Set the widget title + :param title: widget title %End void setMarginVisible( bool margin ); %Docstring Set margin visible state + :param margin: Set margin in the editor %End bool marginVisible(); -%Docstring - -:rtype: bool -%End void setFoldingVisible( bool folding ); %Docstring Set folding visible state + :param folding: Set folding in the editor %End bool foldingVisible(); -%Docstring - -:rtype: bool -%End void insertText( const QString &text ); %Docstring Insert text at cursor position, or replace any selected text if user has made a selection. + :param text: The text to be inserted %End protected: bool isFixedPitch( const QFont &font ); -%Docstring - -:rtype: bool -%End virtual void focusOutEvent( QFocusEvent *event ); @@ -90,10 +82,6 @@ made a selection. QFont getMonospaceFont(); -%Docstring - -:rtype: QFont -%End }; diff --git a/python/gui/qgscodeeditorpython.sip b/python/gui/qgscodeeditorpython.sip index 34f6f4cfddaa..230c635fd7ce 100644 --- a/python/gui/qgscodeeditorpython.sip +++ b/python/gui/qgscodeeditorpython.sip @@ -41,15 +41,15 @@ Construct a new Python editor. void loadAPIs( const QList &filenames ); %Docstring Load APIs from one or more files + :param filenames: The list of apis files to load for the Python lexer %End bool loadScript( const QString &script ); %Docstring Load a script file -:param script: The script file to load -:rtype: bool +:param script: The script file to load %End }; diff --git a/python/gui/qgscollapsiblegroupbox.sip b/python/gui/qgscollapsiblegroupbox.sip index 63b3495e28a1..5e17bd4f3b3c 100644 --- a/python/gui/qgscollapsiblegroupbox.sip +++ b/python/gui/qgscollapsiblegroupbox.sip @@ -21,17 +21,9 @@ class QgsGroupBoxCollapseButton : QToolButton QgsGroupBoxCollapseButton( QWidget *parent /TransferThis/ = 0 ); bool altDown() const; -%Docstring - -:rtype: bool -%End void setAltDown( bool updown ); bool shiftDown() const; -%Docstring - -:rtype: bool -%End void setShiftDown( bool shiftdown ); protected: @@ -64,8 +56,6 @@ bool collapsed, QString syncGroup, bool scrollOnExpand bool isCollapsed() const; %Docstring Returns the current collapsed state of this group box - -:rtype: bool %End void setCollapsed( bool collapse ); @@ -78,8 +68,6 @@ Collapse or uncollapse this groupbox QString syncGroup() const; %Docstring Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key - -:rtype: str %End void setSyncGroup( const QString &grp ); @@ -95,8 +83,6 @@ Set this to false to not automatically scroll parent QScrollArea to this widget' bool scrollOnExpand(); %Docstring If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's contents when expanded - -:rtype: bool %End signals: @@ -129,10 +115,6 @@ Visual fixes for when group box is collapsed/expanded void updateStyle(); QRect titleRect() const; -%Docstring - -:rtype: QRect -%End void clearModifiers(); @@ -180,15 +162,7 @@ Set this to true to save/restore checked state in multiple places or used as options for different parent objects * %End bool saveCollapsedState(); -%Docstring - -:rtype: bool -%End bool saveCheckedState(); -%Docstring - -:rtype: bool -%End void setSettingGroup( const QString &group ); %Docstring @@ -197,8 +171,6 @@ Set this to a defined string to share save/restore states across different paren QString settingGroup() const; %Docstring Returns the name of the setting group in which the collapsed state will be saved - -:rtype: str %End protected slots: @@ -226,10 +198,6 @@ The configuration path to which it is saved is defined by virtual void showEvent( QShowEvent *event ); QString saveKey() const; -%Docstring - -:rtype: str -%End }; diff --git a/python/gui/qgscolorbrewercolorrampdialog.sip b/python/gui/qgscolorbrewercolorrampdialog.sip index a22c12729907..c2db92e63d30 100644 --- a/python/gui/qgscolorbrewercolorrampdialog.sip +++ b/python/gui/qgscolorbrewercolorrampdialog.sip @@ -25,6 +25,7 @@ A widget which allows users to modify the properties of a QgsColorBrewerColorRam QgsColorBrewerColorRampWidget( const QgsColorBrewerColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsColorBrewerColorRampWidget. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -33,14 +34,13 @@ Constructor for QgsColorBrewerColorRampWidget. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsColorBrewerColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsColorBrewerColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` @@ -71,6 +71,7 @@ A dialog which allows users to modify the properties of a QgsColorBrewerColorRam QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsColorBrewerColorRampDialog. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -79,14 +80,13 @@ Constructor for QgsColorBrewerColorRampDialog. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsColorBrewerColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsColorBrewerColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` diff --git a/python/gui/qgscolorbutton.sip b/python/gui/qgscolorbutton.sip index ab199b4b16ef..2e212fa07da0 100644 --- a/python/gui/qgscolorbutton.sip +++ b/python/gui/qgscolorbutton.sip @@ -54,8 +54,6 @@ the button will use the global color scheme registry instead Return the currently selected color. :return: currently selected color -:rtype: QColor - .. seealso:: :py:func:`setColor` %End @@ -64,6 +62,7 @@ Return the currently selected color. %Docstring Sets whether opacity modification (transparency) is permitted for the color. Defaults to false. + :param allowOpacity: set to true to allow opacity modification .. seealso:: :py:func:`allowOpacity()` @@ -77,8 +76,6 @@ Returns whether opacity modification (transparency) is permitted for the color. :return: true if opacity modification is allowed -:rtype: bool - .. seealso:: :py:func:`setAllowOpacity()` @@ -88,6 +85,7 @@ for the color. void setColorDialogTitle( const QString &title ); %Docstring Set the title for the color chooser dialog window. + :param title: Title for the color chooser dialog .. seealso:: :py:func:`colorDialogTitle` @@ -98,8 +96,6 @@ Set the title for the color chooser dialog window. Returns the title for the color chooser dialog window. :return: title for the color chooser dialog -:rtype: str - .. seealso:: :py:func:`setColorDialogTitle` %End @@ -109,8 +105,6 @@ Returns the title for the color chooser dialog window. Returns whether the button accepts live updates from QColorDialog. :return: true if the button will be accepted immediately when the dialog's color changes -:rtype: bool - .. seealso:: :py:func:`setAcceptLiveUpdates` %End @@ -119,6 +113,7 @@ Returns whether the button accepts live updates from QColorDialog. %Docstring Sets whether the button accepts live updates from QColorDialog. Live updates may cause changes that are not undoable on QColorDialog cancel. + :param accept: set to true to enable live updates .. seealso:: :py:func:`acceptLiveUpdates` @@ -128,6 +123,7 @@ that are not undoable on QColorDialog cancel. %Docstring Sets whether the drop-down menu should be shown for the button. The default behavior is to show the menu. + :param showMenu: set to false to hide the drop-down menu .. seealso:: :py:func:`showMenu` @@ -138,8 +134,6 @@ show the menu. Returns whether the drop-down menu is shown for the button. :return: true if drop-down menu is shown -:rtype: bool - .. seealso:: :py:func:`setShowMenu` %End @@ -148,6 +142,7 @@ Returns whether the drop-down menu is shown for the button. %Docstring Sets the behavior for when the button is clicked. The default behavior is to show a color picker dialog. + :param behavior: behavior when button is clicked .. seealso:: :py:func:`behavior` @@ -158,8 +153,6 @@ a color picker dialog. Returns the behavior for when the button is clicked. :return: behavior when button is clicked -:rtype: Behavior - .. seealso:: :py:func:`setBehavior` %End @@ -168,6 +161,7 @@ Returns the behavior for when the button is clicked. %Docstring Sets the default color for the button, which is shown in the button's drop-down menu for the "default color" option. + :param color: default color for the button. Set to an invalid QColor to disable the default color option. @@ -180,8 +174,6 @@ Returns the default color for the button, which is shown in the button's drop-do "default color" option. :return: default color for the button. Returns an invalid QColor if the default color -:rtype: QColor - option is disabled. .. seealso:: :py:func:`setDefaultColor` @@ -191,6 +183,7 @@ option is disabled. %Docstring Sets whether the "no color" option should be shown in the button's drop-down menu. If selected, the "no color" option sets the color button's color to a totally transparent color. + :param showNoColorOption: set to true to show the no color option. This is disabled by default. .. seealso:: :py:func:`showNoColor` @@ -209,8 +202,6 @@ Returns whether the "no color" option is shown in the button's drop-down menu. I the "no color" option sets the color button's color to a totally transparent color. :return: true if the no color option is shown. -:rtype: bool - .. seealso:: :py:func:`setShowNoColor` @@ -225,6 +216,7 @@ dialog (see setColorDialogOptions) void setNoColorString( const QString &noColorString ); %Docstring Sets the string to use for the "no color" option in the button's drop-down menu. + :param noColorString: string to use for the "no color" menu option .. seealso:: :py:func:`noColorString` @@ -240,6 +232,7 @@ dialog (see setColorDialogOptions) void setShowNull( bool showNull ); %Docstring Sets whether a set to null (clear) option is shown in the button's drop-down menu. + :param showNull: set to true to show a null option .. versionadded:: 2.16 @@ -253,8 +246,6 @@ Sets whether a set to null (clear) option is shown in the button's drop-down men %Docstring Returns whether the set to null (clear) option is shown in the button's drop-down menu. -:rtype: bool - .. versionadded:: 2.16 .. seealso:: :py:func:`setShowNull()` @@ -266,8 +257,6 @@ Returns whether the set to null (clear) option is shown in the button's drop-dow %Docstring Returns true if the current color is null. -:rtype: bool - .. versionadded:: 2.16 .. seealso:: :py:func:`setShowNull()` @@ -280,8 +269,6 @@ Returns true if the current color is null. Returns the string used for the "no color" option in the button's drop-down menu. :return: string used for the "no color" menu option -:rtype: str - .. seealso:: :py:func:`setNoColorString` @@ -298,6 +285,7 @@ dialog (see setColorDialogOptions) Sets the context string for the color button. The context string is passed to all color swatch grids shown in the button's drop-down menu, to allow them to customise their display colors based on the context. + :param context: context string for the color button's color swatch grids .. seealso:: :py:func:`context` @@ -310,8 +298,6 @@ grids shown in the button's drop-down menu, to allow them to customise their dis based on the context. :return: context string for the color button's color swatch grids -:rtype: str - .. seealso:: :py:func:`setContext` %End @@ -320,6 +306,7 @@ based on the context. %Docstring Sets the color scheme registry for the button, which controls the color swatch grids that are shown in the button's drop-down menu. + :param registry: color scheme registry for the button. Set to 0 to hide all color swatch grids from the button's drop-down menu. @@ -332,8 +319,6 @@ Returns the color scheme registry for the button, which controls the color swatc that are shown in the button's drop-down menu. :return: color scheme registry for the button. If returned value is 0 then all color -:rtype: QgsColorSchemeRegistry - swatch grids are hidden from the button's drop-down menu. .. seealso:: :py:func:`setColorSchemeRegistry` @@ -345,6 +330,7 @@ swatch grids are hidden from the button's drop-down menu. %Docstring Sets the current color for the button. Will emit a colorChanged signal if the color is different to the previous color. + :param color: new color for the button .. seealso:: :py:func:`color` @@ -356,6 +342,7 @@ Sets the background pixmap for the button based upon color and transparency. Call directly to update background after adding/removing QColorDialog.ShowAlphaChannel option but the color has not changed, i.e. setColor() wouldn't update button and you want the button to retain the set color's alpha component regardless + :param color: Color for button background. If no color is specified, the button's current color will be used %End @@ -420,12 +407,14 @@ Sets color to null. %Docstring Is emitted whenever a new color is set for the button. The color is always valid. In case the new color is the same no signal is emitted, to avoid infinite loops. + :param color: New color %End void colorClicked( const QColor &color ); %Docstring Emitted when the button is clicked, if the button's behavior is set to SignalOnly + :param color: button color .. seealso:: :py:func:`setBehavior` @@ -447,8 +436,6 @@ Emitted when the button is clicked, if the button's behavior is set to SignalOnl static const QPixmap &transparentBackground(); %Docstring Returns a checkboard pattern pixmap for use as a background to transparent colors - -:rtype: QPixmap %End virtual void mousePressEvent( QMouseEvent *e ); diff --git a/python/gui/qgscolordialog.sip b/python/gui/qgscolordialog.sip index 33e3e038d34d..87b2b65de083 100644 --- a/python/gui/qgscolordialog.sip +++ b/python/gui/qgscolordialog.sip @@ -28,6 +28,7 @@ hue wheel supports, color swatches, and a color sampler. const QColor &color = QColor() ); %Docstring Create a new color picker dialog + :param parent: parent widget :param fl: window flags :param color: initial color for dialog @@ -38,13 +39,12 @@ Create a new color picker dialog Returns the current color for the dialog :return: dialog color -:rtype: QColor - %End void setTitle( const QString &title ); %Docstring Sets the title for the color dialog + :param title: title for dialog box %End @@ -52,6 +52,7 @@ Sets the title for the color dialog %Docstring Sets whether opacity modification (transparency) is permitted for the color dialog. Defaults to true. + :param allowOpacity: set to false to disable opacity modification .. versionadded:: 3.0 @@ -63,6 +64,7 @@ for the color dialog. Defaults to true. const bool allowOpacity = true ); %Docstring Return a color selection from a color dialog, with live updating of interim selections. + :param initialColor: the initial color of the selection dialog. :param updateObject: the receiver object of the live updating. :param updateSlot: the receiver object's slot for live updating (e.g. SLOT( setValidColor( const QColor& ) ) ). @@ -71,8 +73,6 @@ Return a color selection from a color dialog, with live updating of interim sele :param allowOpacity: set to true to allow modification of color opacity value (transparency) :return: Selected color on accepted() or initialColor on rejected(). -:rtype: QColor - .. seealso:: :py:func:`getColor` %End @@ -81,14 +81,13 @@ Return a color selection from a color dialog, with live updating of interim sele const bool allowOpacity = false ); %Docstring Return a color selection from a color dialog. + :param initialColor: the initial color of the selection dialog. :param parent: parent widget :param title: the title of the dialog. :param allowOpacity: set to true to allow modification of color opacity value (transparency) :return: Selected color on accepted() or initialColor on rejected(). -:rtype: QColor - .. seealso:: :py:func:`getLiveColor` %End @@ -98,6 +97,7 @@ Return a color selection from a color dialog. void currentColorChanged( const QColor &color ); %Docstring Emitted when the dialog's color changes + :param color: current color %End @@ -106,6 +106,7 @@ Emitted when the dialog's color changes void setColor( const QColor &color ); %Docstring Sets the current color for the dialog + :param color: desired color %End diff --git a/python/gui/qgscolorrampbutton.sip b/python/gui/qgscolorrampbutton.sip index cd06f15f9940..a5fe68c5e8fa 100644 --- a/python/gui/qgscolorrampbutton.sip +++ b/python/gui/qgscolorrampbutton.sip @@ -41,14 +41,13 @@ Use ``dialogTitle`` string to define the title to show in the color ramp dialog %Docstring Return a copy of the current color ramp. -:rtype: QgsColorRamp - .. seealso:: :py:func:`setColorRamp()` %End void setColorRampDialogTitle( const QString &title ); %Docstring Set the title for the color ramp dialog window. + :param title: Title for the color ramp dialog .. seealso:: :py:func:`colorRampDialogTitle` @@ -59,8 +58,6 @@ Set the title for the color ramp dialog window. Returns the title for the color ramp dialog window. :return: title for the color ramp dialog -:rtype: str - .. seealso:: :py:func:`setColorRampDialogTitle` %End @@ -70,8 +67,6 @@ Returns the title for the color ramp dialog window. Returns whether the button accepts live updates from QgsColorRampDialog. :return: true if the button will be accepted immediately when the dialog's color ramp changes -:rtype: bool - .. seealso:: :py:func:`setAcceptLiveUpdates` %End @@ -80,6 +75,7 @@ Returns whether the button accepts live updates from QgsColorRampDialog. %Docstring Sets whether the button accepts live updates from QgsColorRampDialog. Live updates may cause changes that are not undoable on QColorRampDialog cancel. + :param accept: set to true to enable live updates .. seealso:: :py:func:`acceptLiveUpdates` @@ -89,6 +85,7 @@ that are not undoable on QColorRampDialog cancel. %Docstring Sets whether the drop-down menu should be shown for the button. The default behavior is to show the menu. + :param showMenu: set to false to hide the drop-down menu .. seealso:: :py:func:`showMenu` @@ -99,8 +96,6 @@ show the menu. Returns whether the drop-down menu is shown for the button. :return: true if drop-down menu is shown -:rtype: bool - .. seealso:: :py:func:`setShowMenu` %End @@ -109,6 +104,7 @@ Returns whether the drop-down menu is shown for the button. %Docstring Sets the default color ramp for the button, which is shown in the button's drop-down menu for the "default color ramp" option. + :param colorramp: default color ramp for the button. Set to a null pointer to disable the default color ramp option. The ramp will be cloned and ownership is not transferred. @@ -121,8 +117,6 @@ Returns a copy of the default color ramp for the button, which is shown in the b "default color ramp" option. :return: default color ramp for the button. Returns a null pointer if the default color ramp -:rtype: QgsColorRamp - option is disabled. .. seealso:: :py:func:`setDefaultColorRamp` @@ -131,6 +125,7 @@ option is disabled. void setShowRandomColorRamp( bool showRandom ); %Docstring Sets whether a random colors option is shown in the button's drop-down menu. + :param showRandom: set to true to show a random colors option .. seealso:: :py:func:`showRandom()` @@ -140,8 +135,6 @@ Sets whether a random colors option is shown in the button's drop-down menu. %Docstring Returns whether random colors option is shown in the button's drop-down menu. -:rtype: bool - .. seealso:: :py:func:`setShowRandom()` %End @@ -149,8 +142,6 @@ Returns whether random colors option is shown in the button's drop-down menu. %Docstring Returns true if the current color is null. -:rtype: bool - .. seealso:: :py:func:`setShowNull()` .. seealso:: :py:func:`showNull()` @@ -159,6 +150,7 @@ Returns true if the current color is null. void setShowNull( bool showNull ); %Docstring Sets whether a set to null (clear) option is shown in the button's drop-down menu. + :param showNull: set to true to show a null option .. seealso:: :py:func:`showNull()` @@ -170,8 +162,6 @@ Sets whether a set to null (clear) option is shown in the button's drop-down men %Docstring Returns whether the set to null (clear) option is shown in the button's drop-down menu. -:rtype: bool - .. seealso:: :py:func:`setShowNull()` .. seealso:: :py:func:`isNull()` @@ -181,8 +171,6 @@ Returns whether the set to null (clear) option is shown in the button's drop-dow %Docstring Returns true if the current color is null. -:rtype: bool - .. seealso:: :py:func:`setShowNull()` .. seealso:: :py:func:`showNull()` @@ -193,6 +181,7 @@ Returns true if the current color is null. Sets the context string for the color ramp button. The context string is passed to all color ramp preview icons shown in the button's drop-down menu, to (eventually) allow them to customise their display colors based on the context. + :param context: context string for the color dialog button's color ramp preview icons .. seealso:: :py:func:`context` @@ -205,8 +194,6 @@ preview icons shown in the button's drop-down menu, to (eventually) allow them t based on the context. :return: context context string for the color dialog button's color ramp preview icons -:rtype: str - .. seealso:: :py:func:`setContext` %End @@ -214,6 +201,7 @@ based on the context. void setShowGradientOnly( bool gradientonly ); %Docstring Sets whether the color ramp button only shows gradient type ramps + :param gradientonly: set to true to show only gradient type ramps .. seealso:: :py:func:`showGradientOnly` @@ -223,14 +211,13 @@ Sets whether the color ramp button only shows gradient type ramps %Docstring Returns true if the color ramp button only shows gradient type ramps -:rtype: bool - .. seealso:: :py:func:`setShowGradientOnly` %End void setColorRampName( const QString &name ); %Docstring Sets the name of the current color ramp when it's available in the style manager + :param name: Name of the saved color ramp .. seealso:: :py:func:`colorRampName` @@ -240,8 +227,6 @@ Sets the name of the current color ramp when it's available in the style manager %Docstring Returns the name of the current color ramp when it's available in the style manager -:rtype: str - .. seealso:: :py:func:`setColorRampName` %End @@ -251,6 +236,7 @@ Returns the name of the current color ramp when it's available in the style mana %Docstring Sets the current color ramp for the button. Will emit a colorRampChanged() signal if the color ramp is different to the previous color ramp. + :param colorramp: New color ramp for the button. The ramp will be cloned and ownership is not transferred. .. seealso:: :py:func:`setRandomColorRamp` @@ -268,6 +254,7 @@ if the color ramp is different to the previous color ramp. %Docstring Sets the current color ramp for the button using a saved color ramp name. Will emit a colorRampChanged() signal if the color ramp is different to the previous color ramp. + :param name: Name of saved color ramp .. seealso:: :py:func:`setColorRamp` @@ -276,6 +263,7 @@ if the color ramp is different to the previous color ramp. void setButtonBackground( QgsColorRamp *colorramp = 0 ); %Docstring Sets the background pixmap for the button based upon current color ramp. + :param colorramp: Color ramp for button background. If no color ramp is specified, the button's current color ramp will be used %End diff --git a/python/gui/qgscolorschemelist.sip b/python/gui/qgscolorschemelist.sip index 96c4ccd4dc90..8e02c10ea7db 100644 --- a/python/gui/qgscolorschemelist.sip +++ b/python/gui/qgscolorschemelist.sip @@ -51,6 +51,7 @@ A model for colors in a color scheme explicit QgsColorSchemeModel( QgsColorScheme *scheme, const QString &context = QString(), const QColor &baseColor = QColor(), QObject *parent /TransferThis/ = 0 ); %Docstring Constructor + :param scheme: color scheme for list :param context: context string for color scheme :param baseColor: base color for color scheme @@ -91,13 +92,12 @@ Constructor Returns a list of colors shown in the widget :return: colors shown in the widget -:rtype: QgsNamedColorList - %End void setScheme( QgsColorScheme *scheme, const QString &context = QString(), const QColor &baseColor = QColor() ); %Docstring Sets the color scheme to show in the widget + :param scheme: color scheme :param context: context for color scheme :param baseColor: base color for color scheme @@ -108,8 +108,6 @@ Sets the color scheme to show in the widget Get the current color scheme context for the model :return: context string which is passed to scheme for color generation -:rtype: str - .. seealso:: :py:func:`baseColor` %End @@ -119,8 +117,6 @@ Get the current color scheme context for the model Get the base color for the color scheme used by the model :return: base color which is passed to scheme for color generation -:rtype: QColor - .. seealso:: :py:func:`context` %End @@ -128,6 +124,7 @@ Get the base color for the color scheme used by the model void addColor( const QColor &color, const QString &label = QString(), bool allowDuplicate = false ); %Docstring Add a color to the list + :param color: color to add :param label: label for color :param allowDuplicate: set to true to allow duplicate colors to be added (colors which are already present in the list) @@ -138,8 +135,6 @@ Add a color to the list Returns whether the color scheme model has been modified :return: true if colors have been modified -:rtype: bool - %End }; @@ -162,6 +157,7 @@ An editable list of color swatches, taken from an associated QgsColorScheme. QgsColorSchemeList( QWidget *parent /TransferThis/ = 0, QgsColorScheme *scheme = 0, const QString &context = QString(), const QColor &baseColor = QColor() ); %Docstring Construct a new color swatch grid. + :param parent: parent widget :param scheme: QgsColorScheme for colors to show in the list :param context: context string provided to color scheme @@ -173,8 +169,6 @@ Construct a new color swatch grid. Saves the current colors shown in the list back to a color scheme, if supported by the color scheme. -:rtype: bool - .. note:: this method is only effective if the color scheme is editable @@ -183,9 +177,8 @@ by the color scheme. bool importColorsFromGpl( QFile &file ); %Docstring Import colors from a GPL palette file to the list -:param file: file to import -:rtype: bool +:param file: file to import .. seealso:: :py:func:`exportColorsToGpl` %End @@ -193,9 +186,8 @@ Import colors from a GPL palette file to the list bool exportColorsToGpl( QFile &file ); %Docstring Export colors to a GPL palette file from the list -:param file: destination file -:rtype: bool +:param file: destination file .. seealso:: :py:func:`importColorsFromGpl` %End @@ -205,16 +197,12 @@ Export colors to a GPL palette file from the list Returns whether the color scheme list has been modified :return: true if colors have been modified -:rtype: bool - %End QgsColorScheme *scheme(); %Docstring Returns the scheme currently selected in the list. -:rtype: QgsColorScheme - .. versionadded:: 3.0 .. seealso:: :py:func:`setScheme()` @@ -225,6 +213,7 @@ Returns the scheme currently selected in the list. void setScheme( QgsColorScheme *scheme, const QString &context = QString(), const QColor &baseColor = QColor() ); %Docstring Sets the color scheme to show in the list + :param scheme: QgsColorScheme for colors to show in the list :param context: context string provided to color scheme :param baseColor: base color for color scheme @@ -240,6 +229,7 @@ Removes any selected colors from the list void addColor( const QColor &color, const QString &label = QString(), bool allowDuplicate = false ); %Docstring Adds a color to the list + :param color: color to add :param label: optional label for color :param allowDuplicate: set to true to allow duplicate colors to be added, ie colors which already exist in the list @@ -282,6 +272,7 @@ Displays a file picker dialog allowing users to export colors from the list into void colorSelected( const QColor &color ); %Docstring Emitted when a color is selected from the list + :param color: color selected %End diff --git a/python/gui/qgscolorswatchgrid.sip b/python/gui/qgscolorswatchgrid.sip index f411f288374e..a19842f426d2 100644 --- a/python/gui/qgscolorswatchgrid.sip +++ b/python/gui/qgscolorswatchgrid.sip @@ -26,6 +26,7 @@ associated QgsColorScheme. QgsColorSwatchGrid( QgsColorScheme *scheme, const QString &context = QString(), QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a new color swatch grid. + :param scheme: QgsColorScheme for colors to show in grid :param context: context string provided to color scheme :param parent: parent widget @@ -42,8 +43,6 @@ Construct a new color swatch grid. Get the current context for the grid :return: context string which is passed to scheme for color generation -:rtype: str - .. seealso:: :py:func:`setContext` %End @@ -51,6 +50,7 @@ Get the current context for the grid void setContext( const QString &context ); %Docstring Sets the current context for the grid + :param context: string which is passed to scheme for color generation .. seealso:: :py:func:`context` @@ -61,8 +61,6 @@ Sets the current context for the grid Get the base color for the widget :return: base color which is passed to scheme for color generation -:rtype: QColor - .. seealso:: :py:func:`setBaseColor` %End @@ -70,6 +68,7 @@ Get the base color for the widget void setBaseColor( const QColor &baseColor ); %Docstring Sets the base color for the widget + :param baseColor: base color to pass to scheme for color generation .. seealso:: :py:func:`baseColor` @@ -80,8 +79,6 @@ Sets the base color for the widget Gets the list of colors shown in the grid :return: list of colors currently shown in the grid -:rtype: QgsNamedColorList - %End public slots: @@ -96,6 +93,7 @@ Reload colors from scheme and redraws the widget void colorChanged( const QColor &color ); %Docstring Emitted when a color has been selected from the widget + :param color: selected color %End @@ -143,6 +141,7 @@ A color swatch grid which can be embedded into a menu. QgsColorSwatchGridAction( QgsColorScheme *scheme, QMenu *menu = 0, const QString &context = QString(), QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a new color swatch grid action. + :param scheme: QgsColorScheme for colors to show in grid :param menu: parent menu :param context: context string provided to color scheme @@ -152,6 +151,7 @@ Construct a new color swatch grid action. void setBaseColor( const QColor &baseColor ); %Docstring Sets the base color for the color grid + :param baseColor: base color to pass to scheme for color generation .. seealso:: :py:func:`baseColor` @@ -162,8 +162,6 @@ Sets the base color for the color grid Get the base color for the color grid :return: base color which is passed to scheme for color generation -:rtype: QColor - .. seealso:: :py:func:`setBaseColor` %End @@ -173,8 +171,6 @@ Get the base color for the color grid Get the current context for the color grid :return: context string which is passed to scheme for color generation -:rtype: str - .. seealso:: :py:func:`setContext` %End @@ -182,6 +178,7 @@ Get the current context for the color grid void setContext( const QString &context ); %Docstring Sets the current context for the color grid + :param context: string which is passed to scheme for color generation .. seealso:: :py:func:`context` @@ -191,6 +188,7 @@ Sets the current context for the color grid %Docstring Sets whether the parent menu should be dismissed and closed when a color is selected from the action's color widget. + :param dismiss: set to true (default) to immediately close the menu when a color is selected from the widget. If set to false, the colorChanged signal will be emitted but the menu will stay open. @@ -205,8 +203,6 @@ stay open. Returns whether the parent menu will be dismissed after a color is selected from the action's color widget. -:rtype: bool - .. seealso:: :py:func:`setDismissOnColorSelection` .. versionadded:: 2.14 @@ -224,6 +220,7 @@ Reload colors from scheme and redraws the widget void colorChanged( const QColor &color ); %Docstring Emitted when a color has been selected from the widget + :param color: selected color %End diff --git a/python/gui/qgscolorwidgets.sip b/python/gui/qgscolorwidgets.sip index d7f3c2db04ed..96cfd44b3225 100644 --- a/python/gui/qgscolorwidgets.sip +++ b/python/gui/qgscolorwidgets.sip @@ -41,6 +41,7 @@ set to a color with an ambiguous hue (e.g., black or white shades). QgsColorWidget( QWidget *parent /TransferThis/ = 0, const ColorComponent component = Multiple ); %Docstring Construct a new color widget. + :param parent: parent QWidget for the widget :param component: color component the widget alters %End @@ -50,8 +51,6 @@ Construct a new color widget. Returns the current color for the widget :return: current widget color -:rtype: QColor - .. seealso:: :py:func:`setColor` %End @@ -61,8 +60,6 @@ Returns the current color for the widget Returns the color component which the widget controls :return: color component for widget -:rtype: ColorComponent - .. seealso:: :py:func:`setComponent` %End @@ -72,8 +69,6 @@ Returns the color component which the widget controls Returns the current value of the widget's color component :return: value of color component, or -1 if widget has multiple components or an invalid color -:rtype: int - set .. seealso:: :py:func:`setComponentValue` @@ -84,9 +79,8 @@ set static QPixmap createDragIcon( const QColor &color ); %Docstring Create an icon for dragging colors -:param color: for icon -:rtype: QPixmap +:param color: for icon %End public slots: @@ -94,6 +88,7 @@ Create an icon for dragging colors virtual void setColor( const QColor &color, const bool emitSignals = false ); %Docstring Sets the color for the widget + :param color: widget color :param emitSignals: set to true to emit the colorChanged signal after setting color @@ -103,6 +98,7 @@ Sets the color for the widget virtual void setComponent( const ColorComponent component ); %Docstring Sets the color component which the widget controls + :param component: color component for widget .. seealso:: :py:func:`component` @@ -111,6 +107,7 @@ Sets the color component which the widget controls virtual void setComponentValue( const int value ); %Docstring Alters the widget's color by setting the value for the widget's color component + :param value: value for widget's color component. This value is automatically clipped to the range of valid values for the color component. @@ -129,6 +126,7 @@ component void colorChanged( const QColor &color ); %Docstring Emitted when the widget's color changes + :param color: new widget color %End @@ -149,8 +147,6 @@ Emitted when mouse hovers over widget. Returns the range of valid values for the color widget's component :return: maximum value allowed for color component, or -1 if widget has multiple components -:rtype: int - %End int componentRange( const ColorComponent component ) const; @@ -158,19 +154,16 @@ Returns the range of valid values for the color widget's component Returns the range of valid values a color component :return: maximum value allowed for color component -:rtype: int - %End int componentValue( const ColorComponent component ) const; %Docstring Returns the value of a component of the widget's current color. This method correctly handles hue values when the color has an ambiguous hue (e.g., black or white shades) + :param component: color component to return :return: value of color component, or -1 if widget has an invalid color set -:rtype: int - .. seealso:: :py:func:`hue` %End @@ -181,13 +174,12 @@ Returns the hue for the widget. This may differ from the hue for the QColor retu as QColor returns a hue of -1 if the color's hue is ambiguous (e.g., if the saturation is zero). :return: explicitly set hue for widget -:rtype: int - %End void alterColor( QColor &color, const QgsColorWidget::ColorComponent component, const int newValue ) const; %Docstring Alters a color by modifiying the value of a specific color component + :param color: color to alter :param component: color component to alter :param newValue: new value of color component. Values are automatically clipped to a @@ -199,8 +191,6 @@ valid range for the color component. Generates a checkboard pattern pixmap for use as a background to transparent colors :return: checkerboard pixmap -:rtype: QPixmap - %End virtual void dragEnterEvent( QDragEnterEvent *e ); @@ -237,6 +227,7 @@ An action containing a color widget, which can be embedded into a menu. QgsColorWidgetAction( QgsColorWidget *colorWidget, QMenu *menu = 0, QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a new color widget action. + :param colorWidget: QgsColorWidget to show in action :param menu: parent menu :param parent: parent widget @@ -245,14 +236,13 @@ Construct a new color widget action. QgsColorWidget *colorWidget(); %Docstring Returns the color widget contained in the widget action. - -:rtype: QgsColorWidget %End void setDismissOnColorSelection( bool dismiss ); %Docstring Sets whether the parent menu should be dismissed and closed when a color is selected from the action's color widget. + :param dismiss: set to true (default) to immediately close the menu when a color is selected from the widget. If set to false, the colorChanged signal will be emitted but the menu will stay open. @@ -265,8 +255,6 @@ stay open. Returns whether the parent menu will be dismissed after a color is selected from the action's color widget. -:rtype: bool - .. seealso:: :py:func:`setDismissOnColorSelection` %End @@ -275,6 +263,7 @@ action's color widget. void colorChanged( const QColor &color ); %Docstring Emitted when a color has been selected from the widget + :param color: selected color %End @@ -300,6 +289,7 @@ inner rotating triangle which allows for saturation and value selection. QgsColorWheel( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructs a new color wheel widget. + :param parent: parent QWidget for the widget %End @@ -348,6 +338,7 @@ axis. QgsColorBox( QWidget *parent /TransferThis/ = 0, const ColorComponent component = Value ); %Docstring Construct a new color box widget. + :param parent: parent QWidget for the widget :param component: constant color component for the widget. The color components which vary along the horizontal and vertical axis are automatically assigned @@ -406,6 +397,7 @@ its length by a single color component (e.g., varying saturation from 0 to 100%) const Orientation orientation = QgsColorRampWidget::Horizontal ); %Docstring Construct a new color ramp widget. + :param parent: parent QWidget for the widget :param component: color component which varies along the ramp :param orientation: orientation for widget @@ -419,6 +411,7 @@ Construct a new color ramp widget. void setOrientation( const Orientation orientation ); %Docstring Sets the orientation for the color ramp + :param orientation: new orientation for the ramp .. seealso:: :py:func:`orientation` @@ -429,8 +422,6 @@ Sets the orientation for the color ramp Fetches the orientation for the color ramp :return: orientation for the ramp -:rtype: Orientation - .. seealso:: :py:func:`setOrientation` %End @@ -438,6 +429,7 @@ Fetches the orientation for the color ramp void setInteriorMargin( const int margin ); %Docstring Sets the margin between the edge of the widget and the ramp + :param margin: margin around the ramp .. seealso:: :py:func:`interiorMargin` @@ -448,8 +440,6 @@ Sets the margin between the edge of the widget and the ramp Fetches the margin between the edge of the widget and the ramp :return: margin around the ramp -:rtype: int - .. seealso:: :py:func:`setInteriorMargin` %End @@ -457,6 +447,7 @@ Fetches the margin between the edge of the widget and the ramp void setShowFrame( const bool showFrame ); %Docstring Sets whether the ramp should be drawn within a frame + :param showFrame: set to true to draw a frame around the ramp .. seealso:: :py:func:`showFrame` @@ -467,8 +458,6 @@ Sets whether the ramp should be drawn within a frame Fetches whether the ramp is drawn within a frame :return: true if a frame is drawn around the ramp -:rtype: bool - .. seealso:: :py:func:`setShowFrame` %End @@ -476,6 +465,7 @@ Fetches whether the ramp is drawn within a frame void setMarkerSize( const int markerSize ); %Docstring Sets the size for drawing the triangular markers on the ramp + :param markerSize: marker size in pixels %End @@ -484,6 +474,7 @@ Sets the size for drawing the triangular markers on the ramp void valueChanged( const int value ); %Docstring Emitted when the widget's color component value changes + :param value: new value of color component %End @@ -518,6 +509,7 @@ A composite horizontal color ramp widget and associated spinbox for manual value QgsColorSliderWidget( QWidget *parent /TransferThis/ = 0, const ColorComponent component = QgsColorWidget::Red ); %Docstring Construct a new color slider widget. + :param parent: parent QWidget for the widget :param component: color component which is controlled by the slider %End @@ -550,6 +542,7 @@ of colors. QgsColorTextWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a new color line edit widget. + :param parent: parent QWidget for the widget %End @@ -580,6 +573,7 @@ A preview box which displays one or two colors as swatches. QgsColorPreviewWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Construct a new color preview widget. + :param parent: parent QWidget for the widget %End @@ -593,8 +587,6 @@ Construct a new color preview widget. Returns the secondary color for the widget :return: secondary widget color, or an invalid color if the widget -:rtype: QColor - has no secondary color .. seealso:: :py:func:`color` @@ -607,6 +599,7 @@ has no secondary color virtual void setColor2( const QColor &color ); %Docstring Sets the second color for the widget + :param color: secondary widget color. Set to an invalid color to prevent drawing of a secondary color diff --git a/python/gui/qgscomposerinterface.sip b/python/gui/qgscomposerinterface.sip index adf9ac9b3990..ce6fd87cc17e 100644 --- a/python/gui/qgscomposerinterface.sip +++ b/python/gui/qgscomposerinterface.sip @@ -34,15 +34,11 @@ Constructor for QgsComposerInterface. virtual QgsComposerView *view() = 0; %Docstring Returns the composer's QgsComposerView editor widget. - -:rtype: QgsComposerView %End virtual QgsComposition *composition() = 0; %Docstring Returns the composition displated in the composer. - -:rtype: QgsComposition %End virtual void close() = 0; diff --git a/python/gui/qgscomposeritemcombobox.sip b/python/gui/qgscomposeritemcombobox.sip index aa80437b84b7..37e13008cdb0 100644 --- a/python/gui/qgscomposeritemcombobox.sip +++ b/python/gui/qgscomposeritemcombobox.sip @@ -27,6 +27,7 @@ a matching type from a composition. %Docstring QgsComposerItemComboBox creates a combo box to display a list of items in a composition. The items can optionally be filtered by type. + :param parent: parent widget :param composition: composition to show items from. If not set, no items will be shown until setComposition() is called @@ -40,6 +41,7 @@ Sets the composition containing the items to list in the combo box. void setItemType( QgsComposerItem::ItemType itemType ); %Docstring Sets a filter for the item type to show in the combo box. + :param itemType: type of items to show. Set to QgsComposerItem.ComposerItem to show all items. @@ -50,14 +52,13 @@ show all items. %Docstring Returns the filter for the item types to show in the combo box. -:rtype: QgsComposerItem.ItemType - .. seealso:: :py:func:`setItemType()` %End void setExceptedItemList( const QList< QgsComposerItem * > &exceptList ); %Docstring Sets a list of specific items to exclude from the combo box. + :param exceptList: list of items to exclude .. seealso:: :py:func:`exceptedItemList()` @@ -67,17 +68,14 @@ Sets a list of specific items to exclude from the combo box. %Docstring Returns the list of specific items excluded from the combo box. -:rtype: list of QgsComposerItem - .. seealso:: :py:func:`setExceptedItemList()` %End QgsComposerItem *item( int index ) const; %Docstring Return the item currently shown at the specified index within the combo box. -:param index: position of item to return -:rtype: QgsComposerItem +:param index: position of item to return .. seealso:: :py:func:`currentItem()` %End @@ -85,8 +83,6 @@ Return the item currently shown at the specified index within the combo box. QgsComposerItem *currentItem() const; %Docstring Returns the item currently selected in the combo box. - -:rtype: QgsComposerItem %End public slots: @@ -94,6 +90,7 @@ Returns the item currently selected in the combo box. void setItem( const QgsComposerItem *item ); %Docstring Sets the currently selected item in the combo box. + :param item: selected item %End diff --git a/python/gui/qgscomposerruler.sip b/python/gui/qgscomposerruler.sip index 96742fa8e647..660a484c4e06 100644 --- a/python/gui/qgscomposerruler.sip +++ b/python/gui/qgscomposerruler.sip @@ -34,16 +34,8 @@ A class to show paper scale and the current cursor position void setComposition( QgsComposition *c ); QgsComposition *composition(); -%Docstring - -:rtype: QgsComposition -%End int rulerSize(); -%Docstring - -:rtype: int -%End protected: virtual void paintEvent( QPaintEvent *event ); diff --git a/python/gui/qgscomposerview.sip b/python/gui/qgscomposerview.sip index 8509026bd6b3..7d496a32432c 100644 --- a/python/gui/qgscomposerview.sip +++ b/python/gui/qgscomposerview.sip @@ -118,10 +118,6 @@ Inverts current selection %End QgsComposerView::Tool currentTool() const; -%Docstring - -:rtype: QgsComposerView.Tool -%End void setCurrentTool( QgsComposerView::Tool t ); void setComposition( QgsComposition *c /KeepReference/ ); @@ -133,23 +129,15 @@ be set BEFORE adding any items to the composition. QgsComposition *composition(); %Docstring Returns the composition or 0 in case of error - -:rtype: QgsComposition %End QMainWindow *composerWindow(); %Docstring Returns the composer main window - -:rtype: QMainWindow %End void setPaintingEnabled( bool enabled ); bool paintingEnabled() const; -%Docstring - -:rtype: bool -%End void updateRulers(); %Docstring @@ -168,6 +156,7 @@ Set zoom level, where a zoom level of 1.0 corresponds to 100% %Docstring Scales the view in a safe way, by limiting the acceptable range of the scale applied. + :param scale: factor to scale view by .. versionadded:: 2.16 @@ -176,6 +165,7 @@ of the scale applied. void setPreviewModeEnabled( bool enabled ); %Docstring Sets whether a preview effect should be used to alter the view's appearance + :param enabled: Set to true to enable the preview effect on the view .. versionadded:: 2.3 @@ -187,6 +177,7 @@ Sets whether a preview effect should be used to alter the view's appearance %Docstring Sets the preview mode which should be used to modify the view's appearance. Preview modes are only used if setPreviewMode is set to true. + :param mode: PreviewMode to be used to draw the view .. versionadded:: 2.3 @@ -208,8 +199,6 @@ view to retrieve map settings from the canvas. %Docstring Returns the map canvas associated with the view. -:rtype: QgsMapCanvas - .. seealso:: :py:func:`setMapCanvas()` .. versionadded:: 3.0 diff --git a/python/gui/qgscompoundcolorwidget.sip b/python/gui/qgscompoundcolorwidget.sip index b80ca4feaca0..e61be858bb26 100644 --- a/python/gui/qgscompoundcolorwidget.sip +++ b/python/gui/qgscompoundcolorwidget.sip @@ -32,6 +32,7 @@ hue wheel, color swatches, and a color sampler. QgsCompoundColorWidget( QWidget *parent /TransferThis/ = 0, const QColor &color = QColor(), Layout layout = LayoutDefault ); %Docstring Constructor for QgsCompoundColorWidget + :param parent: parent widget :param color: initial color for dialog :param layout: widget layout to use @@ -44,14 +45,13 @@ Constructor for QgsCompoundColorWidget Returns the current color for the dialog :return: dialog color -:rtype: QColor - %End void setAllowOpacity( const bool allowOpacity ); %Docstring Sets whether opacity modification (transparency) is permitted for the color dialog. Defaults to true. + :param allowOpacity: set to false to disable opacity modification .. versionadded:: 3.0 @@ -61,6 +61,7 @@ for the color dialog. Defaults to true. %Docstring Sets whether the widget's color has been "discarded" and the selected color should not be stored in the recent color list. + :param discarded: set to true to avoid adding color to recent color list on widget destruction. .. versionadded:: 3.0 @@ -71,6 +72,7 @@ be stored in the recent color list. void currentColorChanged( const QColor &color ); %Docstring Emitted when the dialog's color changes + :param color: current color %End @@ -79,12 +81,14 @@ Emitted when the dialog's color changes void setColor( const QColor &color ); %Docstring Sets the current color for the dialog + :param color: desired color %End void setPreviousColor( const QColor &color ); %Docstring Sets the color to show in an optional "previous color" section + :param color: previous color %End diff --git a/python/gui/qgsconfigureshortcutsdialog.sip b/python/gui/qgsconfigureshortcutsdialog.sip index 97cf64feb204..0b6b3d6f10a3 100644 --- a/python/gui/qgsconfigureshortcutsdialog.sip +++ b/python/gui/qgsconfigureshortcutsdialog.sip @@ -27,6 +27,7 @@ Reusable dialog for allowing users to configure shortcuts contained in a QgsShor QgsConfigureShortcutsDialog( QWidget *parent /TransferThis/ = 0, QgsShortcutsManager *manager = 0 ); %Docstring Constructor for QgsConfigureShortcutsDialog. + :param parent: parent widget :param manager: associated QgsShortcutsManager, or leave as null to use the default singleton QgsShortcutsManager instance. diff --git a/python/gui/qgscurveeditorwidget.sip b/python/gui/qgscurveeditorwidget.sip index 58d965e0f33b..55cf2700b7cd 100644 --- a/python/gui/qgscurveeditorwidget.sip +++ b/python/gui/qgscurveeditorwidget.sip @@ -35,8 +35,6 @@ Constructor for QgsCurveEditorWidget. %Docstring Returns a curve representing the current curve from the widget. -:rtype: QgsCurveTransform - .. seealso:: :py:func:`setCurve()` %End @@ -62,8 +60,6 @@ the widget responsive. %Docstring Returns the minimum expected value for the range of values shown in the histogram. -:rtype: float - .. seealso:: :py:func:`maxHistogramValueRange()` .. seealso:: :py:func:`setMinHistogramValueRange()` @@ -73,8 +69,6 @@ Returns the minimum expected value for the range of values shown in the histogra %Docstring Returns the maximum expected value for the range of values shown in the histogram. -:rtype: float - .. seealso:: :py:func:`minHistogramValueRange()` .. seealso:: :py:func:`setMaxHistogramValueRange()` diff --git a/python/gui/qgscustomdrophandler.sip b/python/gui/qgscustomdrophandler.sip index a8cb0e2e0f6f..283dbcb9243b 100644 --- a/python/gui/qgscustomdrophandler.sip +++ b/python/gui/qgscustomdrophandler.sip @@ -46,8 +46,6 @@ Type of custom URI recognized by the handler. This must match the URI entry's providerKey in order for handleCustomUriDrop() to be called. -:rtype: str - .. seealso:: :py:func:`handleCustomUriDrop()` %End @@ -89,8 +87,6 @@ The base class implementation does nothing. This method is not called directly while drop handling is occurring, so the limitations described in handleMimeData() about returning quickly do not apply. - -:rtype: bool %End }; diff --git a/python/gui/qgsdetaileditemdata.sip b/python/gui/qgsdetaileditemdata.sip index 9440676983b0..999d9dd6252f 100644 --- a/python/gui/qgsdetaileditemdata.sip +++ b/python/gui/qgsdetaileditemdata.sip @@ -47,45 +47,13 @@ depending on the delegate implementation. %End QString title() const; -%Docstring - -:rtype: str -%End QString detail() const; -%Docstring - -:rtype: str -%End QString category() const; -%Docstring - -:rtype: str -%End QPixmap icon() const; -%Docstring - -:rtype: QPixmap -%End bool isCheckable() const; -%Docstring - -:rtype: bool -%End bool isChecked() const; -%Docstring - -:rtype: bool -%End bool isEnabled() const; -%Docstring - -:rtype: bool -%End bool isRenderedAsWidget() const; -%Docstring - -:rtype: bool -%End }; diff --git a/python/gui/qgsdetaileditemdelegate.sip b/python/gui/qgsdetaileditemdelegate.sip index dd65b91250ad..7ffa23bf71d2 100644 --- a/python/gui/qgsdetaileditemdelegate.sip +++ b/python/gui/qgsdetaileditemdelegate.sip @@ -38,25 +38,15 @@ Reimplement for parent class const QModelIndex &index ) const; %Docstring Reimplement for parent class - -:rtype: QSize %End void setVerticalSpacing( int value ); int verticalSpacing() const; -%Docstring - -:rtype: int -%End void setHorizontalSpacing( int value ); int horizontalSpacing() const; -%Docstring - -:rtype: int -%End }; diff --git a/python/gui/qgsdial.sip b/python/gui/qgsdial.sip index 363b58cca3e6..ef0becf55d54 100644 --- a/python/gui/qgsdial.sip +++ b/python/gui/qgsdial.sip @@ -20,6 +20,7 @@ class QgsDial : QDial QgsDial( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsDial + :param parent: parent object %End @@ -28,10 +29,6 @@ Constructor for QgsDial void setSingleStep( const QVariant &step ); void setValue( const QVariant &value ); QVariant variantValue() const; -%Docstring - -:rtype: QVariant -%End signals: void valueChanged( const QVariant & ); diff --git a/python/gui/qgsdialog.sip b/python/gui/qgsdialog.sip index 2efe425355df..8299628b90d7 100644 --- a/python/gui/qgsdialog.sip +++ b/python/gui/qgsdialog.sip @@ -31,14 +31,10 @@ Constructor for QgsDialog. QVBoxLayout *layout(); %Docstring Returns the central layout. Widgets added to it must have this dialog as parent. - -:rtype: QVBoxLayout %End QDialogButtonBox *buttonBox(); %Docstring Returns the button box. - -:rtype: QDialogButtonBox %End protected: diff --git a/python/gui/qgsdockwidget.sip b/python/gui/qgsdockwidget.sip index 9c23df91278d..0f8762930b22 100644 --- a/python/gui/qgsdockwidget.sip +++ b/python/gui/qgsdockwidget.sip @@ -25,6 +25,7 @@ QgsDockWidget subclass with more fine-grained control over how the widget is clo explicit QgsDockWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 ); %Docstring Constructor for QgsDockWidget. + :param parent: parent widget :param flags: window flags %End @@ -32,6 +33,7 @@ Constructor for QgsDockWidget. explicit QgsDockWidget( const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 ); %Docstring Constructor for QgsDockWidget. + :param title: dock title :param parent: parent widget :param flags: window flags @@ -42,8 +44,6 @@ Constructor for QgsDockWidget. Returns true if the dock is both opened and raised to the front (ie not hidden by any other tabs. -:rtype: bool - .. seealso:: :py:func:`setUserVisible()` %End @@ -52,6 +52,7 @@ any other tabs. void setUserVisible( bool visible ); %Docstring Sets the dock widget as visible to a user, ie both shown and raised to the front. + :param visible: set to true to show the dock to the user, or false to hide the dock. When setting a dock as user visible, the dock will be opened (if it is not already opened) and raised to the front. @@ -86,6 +87,7 @@ Emitted when dock widget is closed. void closedStateChanged( bool wasClosed ); %Docstring Emitted when dock widget is closed (or opened). + :param wasClosed: will be true if dock widget was closed, or false if dock widget was opened .. seealso:: :py:func:`closed()` @@ -105,6 +107,7 @@ Emitted when dock widget is opened. void openedStateChanged( bool wasOpened ); %Docstring Emitted when dock widget is opened (or closed). + :param wasOpened: will be true if dock widget was opened, or false if dock widget was closed .. seealso:: :py:func:`closedStateChanged()` diff --git a/python/gui/qgsencodingfiledialog.sip b/python/gui/qgsencodingfiledialog.sip index fb2b4b33147c..33071383101a 100644 --- a/python/gui/qgsencodingfiledialog.sip +++ b/python/gui/qgsencodingfiledialog.sip @@ -30,8 +30,6 @@ Constructor for QgsEncodingFileDialog QString encoding() const; %Docstring Returns a string describing the chosen encoding - -:rtype: str %End void addCancelAll(); %Docstring @@ -40,8 +38,6 @@ Adds a 'Cancel All' button for the user to click bool cancelAll(); %Docstring Returns true if the user clicked 'Cancel All' - -:rtype: bool %End public slots: @@ -80,8 +76,6 @@ The ``encoding`` argument can be used to specify the encoding initially selected %Docstring Returns the encoding selected within the dialog. -:rtype: str - .. seealso:: :py:func:`setEncoding()` %End diff --git a/python/gui/qgserrordialog.sip b/python/gui/qgserrordialog.sip index ec5535ecf50b..2a00500e3cb1 100644 --- a/python/gui/qgserrordialog.sip +++ b/python/gui/qgserrordialog.sip @@ -25,6 +25,7 @@ Constructor for QgsErrorDialog static void show( const QgsError &error, const QString &title, QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); %Docstring Show dialog with error + :param error: error :param title: title :param parent: parent object diff --git a/python/gui/qgsexpressionbuilderdialog.sip b/python/gui/qgsexpressionbuilderdialog.sip index 0e28a97d2e35..8ae5c5b23dc6 100644 --- a/python/gui/qgsexpressionbuilderdialog.sip +++ b/python/gui/qgsexpressionbuilderdialog.sip @@ -29,25 +29,17 @@ A generic dialog for building expression strings QgsExpressionBuilderWidget *expressionBuilder(); %Docstring The builder widget that is used by the dialog - -:rtype: QgsExpressionBuilderWidget %End void setExpressionText( const QString &text ); QString expressionText(); -%Docstring - -:rtype: str -%End QgsExpressionContext expressionContext() const; %Docstring Returns the expression context for the dialog. The context is used for the expression preview result and for populating the list of available functions and variables. -:rtype: QgsExpressionContext - .. seealso:: :py:func:`setExpressionContext` .. versionadded:: 2.12 @@ -57,6 +49,7 @@ preview result and for populating the list of available functions and variables. %Docstring Sets the expression context for the dialog. The context is used for the expression preview result and for populating the list of available functions and variables. + :param context: expression context .. seealso:: :py:func:`expressionContext` @@ -74,8 +67,6 @@ Sets geometry calculator used in distance/area calculations. Allow accepting invalid expressions. This can be useful when we are not able to provide an expression context of which we are sure it's completely populated. -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsexpressionbuilderwidget.sip b/python/gui/qgsexpressionbuilderwidget.sip index b90506a7928f..fac23a0435b0 100644 --- a/python/gui/qgsexpressionbuilderwidget.sip +++ b/python/gui/qgsexpressionbuilderwidget.sip @@ -37,18 +37,12 @@ An expression item that can be used in the QgsExpressionBuilderWidget tree. QgsExpressionItem::ItemType itemType = ExpressionNode ); QString getExpressionText() const; -%Docstring - -:rtype: str -%End QString getHelpText() const; %Docstring Get the help text that is associated with this expression item. :return: The help text. -:rtype: str - %End void setHelpText( const QString &helpText ); @@ -65,8 +59,6 @@ Set the help text for the current item Get the type of expression item, e.g., header, field, ExpressionNode. :return: The QgsExpressionItem.ItemType -:rtype: QgsExpressionItem.ItemType - %End static const int CUSTOM_SORT_ROLE; @@ -160,8 +152,6 @@ Sets geometry calculator used in distance/area calculations. Gets the expression string that has been set in the expression area. :return: The expression as a string. * -:rtype: str - %End void setExpressionText( const QString &expression ); @@ -174,8 +164,6 @@ Sets the expression string for the widget Returns the expression context for the widget. The context is used for the expression preview result and for populating the list of available functions and variables. -:rtype: QgsExpressionContext - .. seealso:: :py:func:`setExpressionContext` .. versionadded:: 2.12 @@ -185,6 +173,7 @@ preview result and for populating the list of available functions and variables. %Docstring Sets the expression context for the widget. The context is used for the expression preview result and for populating the list of available functions and variables. + :param context: expression context .. seealso:: :py:func:`expressionContext` @@ -198,6 +187,7 @@ preview result and for populating the list of available functions and variables. bool highlightedItem = false, int sortOrder = 1 ); %Docstring Registers a node item for the expression builder. + :param group: The group the item will be show in the tree view. If the group doesn't exsit it will be created. :param label: The label that is show to the user for the item in the tree. :param expressionText: The text that is inserted into the expression area when the user double clicks on the item. @@ -208,10 +198,6 @@ Registers a node item for the expression builder. %End bool isExpressionValid(); -%Docstring - -:rtype: bool -%End void saveToRecent( const QString &collection = "generic" ); %Docstring @@ -255,8 +241,6 @@ Update the list of function files found at the given path Returns a pointer to the dialog's function item model. This method is exposed for testing purposes only - it should not be used to modify the model. -:rtype: QStandardItemModel - .. versionadded:: 3.0 %End @@ -264,8 +248,6 @@ This method is exposed for testing purposes only - it should not be used to modi %Docstring Returns the project currently associated with the widget. -:rtype: QgsProject - .. seealso:: :py:func:`setProject()` .. versionadded:: 3.0 @@ -286,8 +268,6 @@ controls which layers and relations and other project-specific items are shown i Will be set to true if the current expression text reported an eval error with the context. -:rtype: bool - .. versionadded:: 3.0 %End @@ -296,8 +276,6 @@ with the context. Will be set to true if the current expression text reports a parser error with the context. -:rtype: bool - .. versionadded:: 3.0 %End @@ -322,6 +300,7 @@ Auto save the current Python function code. %Docstring Enabled or disable auto saving. When enabled Python scripts will be auto saved when text changes. + :param enabled: True to enable auto saving. %End @@ -332,6 +311,7 @@ when text changes. Emitted when the user changes the expression in the widget. Users of this widget should connect to this signal to decide if to let the user continue. + :param isValid: Is true if the expression the user has typed is valid. %End diff --git a/python/gui/qgsexpressionlineedit.sip b/python/gui/qgsexpressionlineedit.sip index 7acc460046d1..a17d063b81ba 100644 --- a/python/gui/qgsexpressionlineedit.sip +++ b/python/gui/qgsexpressionlineedit.sip @@ -35,12 +35,14 @@ is too complex or large for use. explicit QgsExpressionLineEdit( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsExpressionLineEdit. + :param parent: parent widget %End void setExpressionDialogTitle( const QString &title ); %Docstring Sets the title used in the expression builder dialog + :param title: dialog title .. seealso:: :py:func:`expressionDialogTitle()` @@ -50,14 +52,13 @@ Sets the title used in the expression builder dialog %Docstring Returns the title used for the expression dialog. -:rtype: str - .. seealso:: :py:func:`setExpressionDialogTitle()` %End void setMultiLine( bool multiLine ); %Docstring Sets whether the widget should show a multiline text editor. + :param multiLine: set to true to show multiline editor, or false to show single line editor (the default). %End @@ -65,6 +66,7 @@ to show single line editor (the default). void setGeomCalculator( const QgsDistanceArea &distanceArea ); %Docstring Set the geometry calculator used in the expression dialog. + :param distanceArea: calculator %End @@ -82,23 +84,21 @@ no generator has been set before or the previous layer has been used as generato %Docstring Returns the current expression shown in the widget. -:rtype: str - .. seealso:: :py:func:`setExpression()` %End bool isValidExpression( QString *expressionError /Out/ = 0 ) const; %Docstring Returns true if the current expression is valid. -:param expressionError: will be set to any generated error message if specified -:rtype: bool +:param expressionError: will be set to any generated error message if specified %End void registerExpressionContextGenerator( const QgsExpressionContextGenerator *generator ); %Docstring Register an expression context generator class that will be used to retrieve an expression context for the widget. + :param generator: A QgsExpressionContextGenerator class that will be used to create an expression context when required. %End @@ -108,6 +108,7 @@ create an expression context when required. void expressionChanged( const QString &expression ); %Docstring Emitted when the expression is changed. + :param expression: new expression %End @@ -116,6 +117,7 @@ Emitted when the expression is changed. void setExpression( const QString &expression ); %Docstring Sets the current expression to show in the widget. + :param expression: expression string .. seealso:: :py:func:`expression()` diff --git a/python/gui/qgsexpressionselectiondialog.sip b/python/gui/qgsexpressionselectiondialog.sip index 69e9daca710b..43430f5e15bc 100644 --- a/python/gui/qgsexpressionselectiondialog.sip +++ b/python/gui/qgsexpressionselectiondialog.sip @@ -27,6 +27,7 @@ remove from the current selection or select within the current selection. QgsExpressionSelectionDialog( QgsVectorLayer *layer, const QString &startText = QString(), QWidget *parent /TransferThis/ = 0 ); %Docstring Creates a new selection dialog. + :param layer: The layer on which the selection is to be performed. :param startText: A default expression text to be applied (Defaults to empty) :param parent: parent object (owner) @@ -37,13 +38,12 @@ Creates a new selection dialog. The builder widget that is used by the dialog :return: The builder widget that is used by the dialog -:rtype: QgsExpressionBuilderWidget - %End void setExpressionText( const QString &text ); %Docstring Sets the current expression text + :param text: the expression text to set %End @@ -52,8 +52,6 @@ Sets the current expression text Returns the current expression text :return: The expression text -:rtype: str - %End void setGeomCalculator( const QgsDistanceArea &da ); @@ -65,6 +63,7 @@ Sets geometry calculator used in distance/area calculations. %Docstring Sets the message bar to display feedback from the dialog. This is used when zooming to features to display the count of selected features. + :param messageBar: target message bar .. versionadded:: 3.0 @@ -84,6 +83,7 @@ Sets a map canvas associated with the dialog. %Docstring Implementation for closeEvent Saves the window geometry + :param closeEvent: Event object. Unused. %End @@ -92,6 +92,7 @@ Saves the window geometry %Docstring Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets saved and the object deleted. + :param r: Result value. Unused. %End diff --git a/python/gui/qgsextentgroupbox.sip b/python/gui/qgsextentgroupbox.sip index dbdfc908664b..e481b85a637a 100644 --- a/python/gui/qgsextentgroupbox.sip +++ b/python/gui/qgsextentgroupbox.sip @@ -57,8 +57,6 @@ Sets the original extent and coordinate reference system for the widget. This sh %Docstring Returns the original extent set for the widget. -:rtype: QgsRectangle - .. seealso:: :py:func:`setOriginalExtent()` .. seealso:: :py:func:`originalCrs()` @@ -68,8 +66,6 @@ Returns the original extent set for the widget. %Docstring Returns the original coordinate reference system set for the widget. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`originalExtent()` .. seealso:: :py:func:`setOriginalExtent()` @@ -90,8 +86,6 @@ The current extent is usually set to match the current map canvas extent. Returns the current extent set for the widget. The current extent is usually set to match the current map canvas extent. -:rtype: QgsRectangle - .. seealso:: :py:func:`setCurrentExtent()` .. seealso:: :py:func:`currentCrs()` @@ -102,8 +96,6 @@ current map canvas extent. Returns the coordinate reference system for the current extent set for the widget. The current extent and CRS usually reflects the map canvas extent and CRS. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCurrentExtent()` .. seealso:: :py:func:`currentExtent()` @@ -120,8 +112,6 @@ The current extent will be reprojected into the new output CRS. %Docstring Returns the extent shown in the widget - in output CRS coordinates. -:rtype: QgsRectangle - .. seealso:: :py:func:`outputCrs` %End @@ -129,8 +119,6 @@ Returns the extent shown in the widget - in output CRS coordinates. %Docstring Returns the current output CRS, used in the display. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`outputExtent` .. versionadded:: 3.0 @@ -139,8 +127,6 @@ Returns the current output CRS, used in the display. QgsExtentGroupBox::ExtentState extentState() const; %Docstring Returns the currently selected state for the widget's extent. - -:rtype: QgsExtentGroupBox.ExtentState %End void setTitleBase( const QString &title ); @@ -156,8 +142,6 @@ Sets the base part of ``title`` of the group box (will be appended with extent s %Docstring Returns the base part of title of the group box (will be appended with extent state). -:rtype: str - .. versionadded:: 2.12 .. seealso:: :py:func:`setTitleBase()` @@ -166,6 +150,7 @@ Returns the base part of title of the group box (will be appended with extent st void setMapCanvas( QgsMapCanvas *canvas ); %Docstring Sets the map canvas to enable dragging of extent on a canvas. + :param canvas: the map canvas .. versionadded:: 3.0 @@ -176,8 +161,6 @@ Sets the map canvas to enable dragging of extent on a canvas. Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. If the aspect ratio isn't fixed, the width and height will be set to zero. -:rtype: QSize - .. versionadded:: 3.0 * %End @@ -217,6 +200,7 @@ Sets the output extent by dragging on the canvas. %Docstring Sets a fixed aspect ratio to be used when dragging extent onto the canvas. To unset a fixed aspect ratio, set the width and height to zero. + :param ratio: aspect ratio's width and height .. versionadded:: 3.0 diff --git a/python/gui/qgsexternalresourcewidget.sip b/python/gui/qgsexternalresourcewidget.sip index d478d887a457..f3984010af32 100644 --- a/python/gui/qgsexternalresourcewidget.sip +++ b/python/gui/qgsexternalresourcewidget.sip @@ -55,24 +55,19 @@ Both part of the widget are optional. QVariant documentPath( QVariant::Type type = QVariant::String ) const; %Docstring documentPath returns the path of the current document in the widget -:param type: determines the type of the returned null variant if the document is not defined yet -:rtype: QVariant +:param type: determines the type of the returned null variant if the document is not defined yet %End void setDocumentPath( const QVariant &documentPath ); QgsFileWidget *fileWidget(); %Docstring access the file widget to allow its configuration - -:rtype: QgsFileWidget %End bool fileWidgetVisible() const; %Docstring returns if the file widget is visible in the widget - -:rtype: bool %End void setFileWidgetVisible( bool visible ); %Docstring @@ -82,8 +77,6 @@ set the visiblity of the file widget in the layout QgsExternalResourceWidget::DocumentViewerContent documentViewerContent() const; %Docstring returns the type of content used in the document viewer - -:rtype: QgsExternalResourceWidget.DocumentViewerContent %End void setDocumentViewerContent( QgsExternalResourceWidget::DocumentViewerContent content ); %Docstring @@ -93,25 +86,23 @@ setDocumentViewerContent defines the type of content to be shown. Widget will be int documentViewerHeight() const; %Docstring returns the height of the document viewer - -:rtype: int %End void setDocumentViewerHeight( int height ); %Docstring setDocumentViewerWidth set the height of the document viewer. + :param height: the height. Use 0 for automatic best display. %End int documentViewerWidth() const; %Docstring returns the width of the document viewer - -:rtype: int %End void setDocumentViewerWidth( int width ); %Docstring setDocumentViewerWidth set the width of the document viewer. + :param width: the width. Use 0 for automatic best display. %End @@ -124,8 +115,6 @@ defines if the widget is readonly %Docstring Configures if paths are handled absolute or relative and if relative, which should be the base path. - -:rtype: QgsFileWidget.RelativeStorage %End void setRelativeStorage( QgsFileWidget::RelativeStorage relativeStorage ); @@ -139,8 +128,6 @@ which should be the base path. %Docstring Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget.RelativeDefaultPath. - -:rtype: str %End void setDefaultRoot( const QString &defaultRoot ); diff --git a/python/gui/qgsfeaturelistcombobox.sip b/python/gui/qgsfeaturelistcombobox.sip index 5bee14d76581..16066bc464b8 100644 --- a/python/gui/qgsfeaturelistcombobox.sip +++ b/python/gui/qgsfeaturelistcombobox.sip @@ -33,8 +33,6 @@ Create a new QgsFeatureListComboBox, optionally specifying a ``parent``. QgsVectorLayer *sourceLayer() const; %Docstring The layer from which features should be listed. - -:rtype: QgsVectorLayer %End void setSourceLayer( QgsVectorLayer *sourceLayer ); @@ -46,8 +44,6 @@ The layer from which features should be listed. %Docstring The display expression will be used to display features as well as the the value to match the typed text against. - -:rtype: str %End void setDisplayExpression( const QString &displayExpression ); @@ -60,8 +56,6 @@ the the value to match the typed text against. %Docstring An additional expression to further restrict the available features. This can be used to integrate additional spatial or other constraints. - -:rtype: str %End void setFilterExpression( const QString &filterExpression ); @@ -76,8 +70,6 @@ TODO! %Docstring The identifier value of the currently selected feature. A value from the identifierField. - -:rtype: QVariant %End void setIdentifierValue( const QVariant &identifierValue ); @@ -90,15 +82,11 @@ identifierField. %Docstring Shorthand for getting a feature request to query the currently selected feature. - -:rtype: QgsFeatureRequest %End bool allowNull() const; %Docstring Determines if a NULL value should be available in the list. - -:rtype: bool %End void setAllowNull( bool allowNull ); @@ -110,8 +98,6 @@ Determines if a NULL value should be available in the list. %Docstring Field name that will be used to uniquely identify the current feature. Normally the primary key of the layer. - -:rtype: str %End void setIdentifierField( const QString &identifierField ); @@ -123,8 +109,6 @@ Normally the primary key of the layer. QModelIndex currentModelIndex() const; %Docstring The index of the currently selected item. - -:rtype: QModelIndex %End virtual void focusOutEvent( QFocusEvent *event ); diff --git a/python/gui/qgsfeatureselectiondlg.sip b/python/gui/qgsfeatureselectiondlg.sip index e75b1619dc11..e57d6f747666 100644 --- a/python/gui/qgsfeatureselectiondlg.sip +++ b/python/gui/qgsfeatureselectiondlg.sip @@ -39,13 +39,12 @@ Constructor for QgsFeatureSelectionDlg Get the selected features :return: The selected feature ids -:rtype: QgsFeatureIds - %End void setSelectedFeatures( const QgsFeatureIds &ids ); %Docstring Set the selected features + :param ids: The feature ids to select %End diff --git a/python/gui/qgsfieldcombobox.sip b/python/gui/qgsfieldcombobox.sip index 31536ae4654a..2a3443e72312 100644 --- a/python/gui/qgsfieldcombobox.sip +++ b/python/gui/qgsfieldcombobox.sip @@ -42,8 +42,6 @@ setFilters allows fitering according to the type of field QgsFieldProxyModel::Filters filters() const; %Docstring currently used filter on list of fields - -:rtype: QgsFieldProxyModel.Filters %End void setAllowEmptyFieldName( bool allowEmpty ); @@ -59,8 +57,6 @@ Sets whether an optional empty field ("not set") option is shown in the combo bo %Docstring Returns true if the combo box allows the empty field ("not set") choice. -:rtype: bool - .. seealso:: :py:func:`setAllowEmptyFieldName()` .. versionadded:: 3.0 @@ -69,16 +65,12 @@ Returns true if the combo box allows the empty field ("not set") choice. QString currentField() const; %Docstring return the currently selected field - -:rtype: str %End QgsVectorLayer *layer() const; %Docstring Returns the layer currently associated with the combobox. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer()` %End diff --git a/python/gui/qgsfieldexpressionwidget.sip b/python/gui/qgsfieldexpressionwidget.sip index b1fb3bce7222..6464bb29b9a3 100644 --- a/python/gui/qgsfieldexpressionwidget.sip +++ b/python/gui/qgsfieldexpressionwidget.sip @@ -41,8 +41,6 @@ define the title used in the expression dialog const QString expressionDialogTitle(); %Docstring return the title used for the expression dialog - -:rtype: str %End void setFilters( QgsFieldProxyModel::Filters filters ); @@ -55,8 +53,6 @@ setFilters allows fitering according to the type of field QgsFieldProxyModel::Filters filters() const; %Docstring currently used filter on list of fields - -:rtype: QgsFieldProxyModel.Filters %End void setGeomCalculator( const QgsDistanceArea &da ); @@ -67,31 +63,24 @@ set the geometry calculator used in the expression dialog QString currentField( bool *isExpression = 0, bool *isValid = 0 ) const; %Docstring currentField returns the currently selected field or expression if allowed + :param isExpression: determines if the string returned is the name of a field or an expression :param isValid: determines if the expression (or field) returned is valid - -:rtype: str %End bool isValidExpression( QString *expressionError = 0 ) const; %Docstring Return true if the current expression is valid - -:rtype: bool %End bool isExpression() const; %Docstring If the content is not just a simple field this method will return true. - -:rtype: bool %End QString currentText() const; %Docstring Return the current text that is set in the expression area - -:rtype: str %End QString asExpression() const; @@ -100,8 +89,6 @@ Returns the currently selected field or expression. If a field is currently sele value will be converted to a valid expression referencing this field (ie enclosing the field name with appropriate quotations). -:rtype: str - .. versionadded:: 2.14 %End @@ -113,8 +100,6 @@ appropriate quotations). Alias for asExpression() -:rtype: str - .. versionadded:: 3.0 %End @@ -122,8 +107,6 @@ Alias for asExpression() %Docstring Returns the layer currently associated with the widget. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer()` %End @@ -131,6 +114,7 @@ Returns the layer currently associated with the widget. %Docstring Register an expression context generator class that will be used to retrieve an expression context for the widget. + :param generator: A QgsExpressionContextGenerator class that will be used to create an expression context when required. @@ -142,8 +126,6 @@ create an expression context when required. Allow accepting expressions with evaluation errors. This can be useful when we are not able to provide an expression context of which we are sure it's completely populated. -:rtype: bool - .. versionadded:: 3.0 %End @@ -222,15 +204,12 @@ when expression has been edited (finished) it will be added to the model void updateLineEditStyle( const QString &expression = QString() ); %Docstring updateLineEditStyle will re-style (color/font) the line edit depending on content and status + :param expression: if expression is given it will be evaluated for the given string, otherwise it takes current expression from the model %End bool isExpressionValid( const QString &expressionStr ); -%Docstring - -:rtype: bool -%End protected: virtual void changeEvent( QEvent *event ); diff --git a/python/gui/qgsfieldvalidator.sip b/python/gui/qgsfieldvalidator.sip index a10e1991bd14..97b6c162e7dc 100644 --- a/python/gui/qgsfieldvalidator.sip +++ b/python/gui/qgsfieldvalidator.sip @@ -25,10 +25,6 @@ class QgsFieldValidator : QValidator QString dateFormat() const; -%Docstring - -:rtype: str -%End }; diff --git a/python/gui/qgsfieldvalueslineedit.sip b/python/gui/qgsfieldvalueslineedit.sip index 876dec9a3f09..3e181a25f33c 100644 --- a/python/gui/qgsfieldvalueslineedit.sip +++ b/python/gui/qgsfieldvalueslineedit.sip @@ -28,6 +28,7 @@ interaction with the widget. QgsFieldValuesLineEdit( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsFieldValuesLineEdit + :param parent: parent widget %End @@ -36,6 +37,7 @@ Constructor for QgsFieldValuesLineEdit void setLayer( QgsVectorLayer *layer ); %Docstring Sets the layer containing the field that values will be shown from. + :param layer: vector layer .. seealso:: :py:func:`layer()` @@ -47,8 +49,6 @@ Sets the layer containing the field that values will be shown from. %Docstring Returns the layer containing the field that values will be shown from. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer()` .. seealso:: :py:func:`attributeIndex()` @@ -57,6 +57,7 @@ Returns the layer containing the field that values will be shown from. void setAttributeIndex( int index ); %Docstring Sets the attribute index for the field containing values to show in the widget. + :param index: index of attribute .. seealso:: :py:func:`attributeIndex()` @@ -68,8 +69,6 @@ Sets the attribute index for the field containing values to show in the widget. %Docstring Returns the attribute index for the field containing values shown in the widget. -:rtype: int - .. seealso:: :py:func:`setAttributeIndex()` .. seealso:: :py:func:`layer()` @@ -80,12 +79,14 @@ Returns the attribute index for the field containing values shown in the widget. void layerChanged( QgsVectorLayer *layer ); %Docstring Emitted when the layer associated with the widget changes. + :param layer: vector layer %End void attributeIndexChanged( int index ); %Docstring Emitted when the field associated with the widget changes. + :param index: new attribute index for field %End diff --git a/python/gui/qgsfiledownloaderdialog.sip b/python/gui/qgsfiledownloaderdialog.sip index 006e90d068f4..0b0fa934f080 100644 --- a/python/gui/qgsfiledownloaderdialog.sip +++ b/python/gui/qgsfiledownloaderdialog.sip @@ -34,6 +34,7 @@ cancelation. QgsFileDownloaderDialog( const QUrl &url, const QString &outputFileName, const QString &authcfg = QString() ); %Docstring QgsFileDownloader + :param url: the download url :param outputFileName: file name where the downloaded content will be stored :param authcfg: optionally apply this authentication configuration diff --git a/python/gui/qgsfilewidget.sip b/python/gui/qgsfilewidget.sip index 56fa4cbd874a..32da03f48f2c 100644 --- a/python/gui/qgsfilewidget.sip +++ b/python/gui/qgsfilewidget.sip @@ -52,8 +52,6 @@ class QgsFileWidget : QWidget when multiple files are selected, they are quoted and separated by a single space (for example: '"/path/foo" "path/bar"') -:rtype: str - .. seealso:: :py:func:`filePaths` %End @@ -61,8 +59,6 @@ by a single space (for example: '"/path/foo" "path/bar"') %Docstring Split the the quoted and space separated ``path`` and returns a QString list -:rtype: list of str - .. seealso:: :py:func:`filePath` %End @@ -79,8 +75,6 @@ defines if the widget is readonly QString dialogTitle() const; %Docstring returns the open file dialog title - -:rtype: str %End void setDialogTitle( const QString &title ); @@ -95,13 +89,12 @@ returns the open file dialog title QString filter() const; %Docstring returns the filters used for QDialog.getOpenFileName - -:rtype: str %End void setFilter( const QString &filter ); %Docstring setFilter sets the filter used by the model to filters. The filter is used to specify the kind of files that should be shown. + :param filter: Only files that match the given filter are shown, it may be an empty string. If you want multiple filters, separate them with ';;', %End @@ -109,21 +102,18 @@ returns the filters used for QDialog.getOpenFileName %Docstring Sets whether a confirmation to overwrite an existing file will appear. By default, a confirmation will appear. + :param confirmOverwrite: If set to true, an overwrite confirmation will be shown %End bool confirmOverwrite() const; %Docstring Returns whether a confirmation will be shown when overwriting an existing file - -:rtype: bool %End bool fileWidgetButtonVisible() const; %Docstring determines if the tool button is shown - -:rtype: bool %End void setFileWidgetButtonVisible( bool visible ); %Docstring @@ -133,8 +123,6 @@ determines if the tool button is shown bool useLink() const; %Docstring determines if the file path will be shown as a link - -:rtype: bool %End void setUseLink( bool useLink ); %Docstring @@ -144,8 +132,6 @@ determines if the file path will be shown as a link bool fullUrl() const; %Docstring returns if the links shows the full path or not - -:rtype: bool %End void setFullUrl( bool fullUrl ); %Docstring @@ -155,8 +141,6 @@ determines if the links shows the full path or not QString defaultRoot() const; %Docstring returns the default root path - -:rtype: str %End void setDefaultRoot( const QString &defaultRoot ); %Docstring @@ -166,8 +150,6 @@ determines the default root path used as the first shown location when picking a QgsFileWidget::StorageMode storageMode() const; %Docstring returns the storage mode (i.e. file or directory) - -:rtype: QgsFileWidget.StorageMode %End void setStorageMode( QgsFileWidget::StorageMode storageMode ); %Docstring @@ -177,8 +159,6 @@ determines the storage mode (i.e. file or directory) QgsFileWidget::RelativeStorage relativeStorage() const; %Docstring returns if the relative path is with respect to the project path or the default path - -:rtype: QgsFileWidget.RelativeStorage %End void setRelativeStorage( QgsFileWidget::RelativeStorage relativeStorage ); %Docstring @@ -190,8 +170,6 @@ determines if the relative path is with respect to the project path or the defau Returns a pointer to the widget's line edit, which can be used to customize the appearance and behavior of the line edit portion of the widget. -:rtype: QgsFilterLineEdit - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsfilterlineedit.sip b/python/gui/qgsfilterlineedit.sip index f80429ef0d4d..72e20c05206d 100644 --- a/python/gui/qgsfilterlineedit.sip +++ b/python/gui/qgsfilterlineedit.sip @@ -42,6 +42,7 @@ signal should be used instead of textChanged(). QgsFilterLineEdit( QWidget *parent /TransferThis/ = 0, const QString &nullValue = QString() ); %Docstring Constructor for QgsFilterLineEdit. + :param parent: parent widget :param nullValue: string for representing null values %End @@ -50,8 +51,6 @@ Constructor for QgsFilterLineEdit. %Docstring Returns true if the widget's clear button is visible. -:rtype: bool - .. seealso:: :py:func:`setShowClearButton()` .. versionadded:: 3.0 @@ -60,6 +59,7 @@ Returns true if the widget's clear button is visible. void setShowClearButton( bool visible ); %Docstring Sets whether the widget's clear button is visible. + :param visible: set to false to hide the clear button .. seealso:: :py:func:`showClearButton()` @@ -72,8 +72,6 @@ Sets whether the widget's clear button is visible. Returns the clear mode for the widget. The clear mode defines the behavior of the widget when its value is cleared. This defaults to ClearToNull. -:rtype: ClearMode - .. seealso:: :py:func:`setClearMode()` .. versionadded:: 3.0 @@ -94,6 +92,7 @@ widget when its value is cleared. This defaults to ClearToNull. Sets the string representation for null values in the widget. This does not affect the values returned for null values by value(), rather it only affects the text that is shown to users when the widget's value is null. + :param nullValue: string to show when widget's value is null .. seealso:: :py:func:`nullValue()` @@ -103,8 +102,6 @@ the text that is shown to users when the widget's value is null. %Docstring Returns the string used for representating null values in the widget. -:rtype: str - .. seealso:: :py:func:`setNullValue()` .. seealso:: :py:func:`isNull()` @@ -114,6 +111,7 @@ Returns the string used for representating null values in the widget. %Docstring Define if a search icon shall be shown on the left of the image when no text is entered + :param visible: set to false to hide the search icon .. versionadded:: 3.0 @@ -124,8 +122,6 @@ when no text is entered Returns if a search icon shall be shown on the left of the image when no text is entered -:rtype: bool - .. versionadded:: 3.0 %End @@ -134,6 +130,7 @@ when no text is entered Sets the default value for the widget. The default value is a value which the widget will be reset to if it is cleared and the clearMode() is equal to ClearToDefault. + :param defaultValue: default value .. seealso:: :py:func:`defaultValue()` @@ -149,8 +146,6 @@ Returns the default value for the widget. The default value is a value which the widget will be reset to if it is cleared and the clearMode() is equal to ClearToDefault. -:rtype: str - .. seealso:: :py:func:`setDefaultValue()` .. seealso:: :py:func:`clearMode()` @@ -175,8 +170,6 @@ in the widget matches the current nullValue() then the returned value will be a null string. :return: Current text (or null string if it matches the nullValue() property ) -:rtype: str - .. seealso:: :py:func:`setValue()` %End @@ -186,8 +179,6 @@ a null string. Determine if the current text represents null. :return: True if the widget's value is null. -:rtype: bool - .. seealso:: :py:func:`nullValue()` %End @@ -197,8 +188,6 @@ Determine if the current text represents null. Show a spinner icon. This can be used for search boxes to indicate that something is going on in the background. -:rtype: bool - .. versionadded:: 3.0 %End @@ -214,8 +203,6 @@ something is going on in the background. %Docstring Will select all text when this widget receives the focus. -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsfloatingwidget.sip b/python/gui/qgsfloatingwidget.sip index acdfd58e697d..7d7bce488caf 100644 --- a/python/gui/qgsfloatingwidget.sip +++ b/python/gui/qgsfloatingwidget.sip @@ -40,6 +40,7 @@ within their parent widget. QgsFloatingWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsFloatingWidget. + :param parent: parent widget %End @@ -47,6 +48,7 @@ Constructor for QgsFloatingWidget. %Docstring 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. + :param widget: anchor widget. Both the floating widget and the anchor widget must share some common parent. .. seealso:: :py:func:`anchorWidget()` @@ -57,8 +59,6 @@ anchor widget moves or is resized so that it maintains the same relative positio Returns the widget that the floating widget is "anchored" tto. 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. -:rtype: QWidget - .. seealso:: :py:func:`setAnchorWidget()` %End @@ -67,8 +67,6 @@ anchor widget moves or is resized so that it maintains the same relative positio Returns the floating widget's anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget's parent is resized or moved. -:rtype: AnchorPoint - .. seealso:: :py:func:`setAnchorPoint()` %End @@ -76,6 +74,7 @@ fixed in the same relative position whenever the widget's parent is resized or m %Docstring Sets the floating widget's anchor point, which corresponds to the point on the widget which should remain fixed in the same relative position whenever the widget's parent is resized or moved. + :param point: anchor point .. seealso:: :py:func:`anchorPoint()` @@ -87,8 +86,6 @@ Returns the anchor widget's anchor point, which corresponds to the point on the the floating widget should "attach" to. The floating widget should remain fixed in the same relative position to this anchor widget whenever the widget's parent is resized or moved. -:rtype: AnchorPoint - .. seealso:: :py:func:`setAnchorWidgetPoint()` %End diff --git a/python/gui/qgsfocuswatcher.sip b/python/gui/qgsfocuswatcher.sip index 7d06709bb977..27dbf9fda866 100644 --- a/python/gui/qgsfocuswatcher.sip +++ b/python/gui/qgsfocuswatcher.sip @@ -28,6 +28,7 @@ caught using the emitted signals. explicit QgsFocusWatcher( QObject *parent /TransferThis/ ); %Docstring Constructor for QgsFocusWatcher. + :param parent: parent widget to catch focus events for. This class will automatically be installed as an event filter for parent. %End @@ -40,6 +41,7 @@ installed as an event filter for parent. void focusChanged( bool focused ); %Docstring Emitted when parent object's focus changes. + :param focused: true if object gained focus, false if object lost focus %End diff --git a/python/gui/qgsfontbutton.sip b/python/gui/qgsfontbutton.sip index 382201699661..fb7c55c386c9 100644 --- a/python/gui/qgsfontbutton.sip +++ b/python/gui/qgsfontbutton.sip @@ -54,8 +54,6 @@ Use ``dialogTitle`` string to define the title to show in the text settings dial %Docstring Returns the current button mode. -:rtype: QgsFontButton.Mode - .. seealso:: :py:func:`setMode()` %End @@ -80,8 +78,6 @@ Sets the ``title`` for the text settings dialog window. %Docstring Returns the title for the text settings dialog window. -:rtype: str - .. seealso:: :py:func:`setDialogTitle()` %End @@ -89,8 +85,6 @@ Returns the title for the text settings dialog window. %Docstring Returns the map canvas associated with the widget. -:rtype: QgsMapCanvas - .. seealso:: :py:func:`setMapCanvas()` %End @@ -107,8 +101,6 @@ widget to fetch current settings from the map canvas, such as current scale. Returns the current text formatting set by the widget. This is only used when mode() is ModeTextRenderer. -:rtype: QgsTextFormat - .. seealso:: :py:func:`setTextFormat()` %End @@ -117,8 +109,6 @@ This is only used when mode() is ModeTextRenderer. Returns the current QFont set by the widget. This is only used when mode() is ModeQFont. -:rtype: QFont - .. seealso:: :py:func:`setCurrentFont()` %End diff --git a/python/gui/qgsformannotation.sip b/python/gui/qgsformannotation.sip index 5fe9de293523..327bb2878ca2 100644 --- a/python/gui/qgsformannotation.sip +++ b/python/gui/qgsformannotation.sip @@ -35,8 +35,6 @@ Constructor for QgsFormAnnotation. QSizeF preferredFrameSize() const; %Docstring Returns the optimal frame size - -:rtype: QSizeF %End void setDesignerForm( const QString &uiFile ); @@ -50,8 +48,6 @@ Sets the path to the Qt Designer UI file to show in the annotation. %Docstring Returns the path to the Qt Designer UI file to show in the annotation. -:rtype: str - .. seealso:: :py:func:`setDesignerForm()` %End @@ -66,8 +62,6 @@ Returns the path to the Qt Designer UI file to show in the annotation. static QgsFormAnnotation *create() /Factory/; %Docstring Returns a new QgsFormAnnotation object. - -:rtype: QgsFormAnnotation %End protected: diff --git a/python/gui/qgsgeometryrubberband.sip b/python/gui/qgsgeometryrubberband.sip index d9c5fb253074..f01c7f6b393c 100644 --- a/python/gui/qgsgeometryrubberband.sip +++ b/python/gui/qgsgeometryrubberband.sip @@ -47,8 +47,6 @@ Sets geometry (takes ownership). Geometry is expected to be in map coordinates const QgsAbstractGeometry *geometry(); %Docstring Returns a pointer to the geometry - -:rtype: QgsAbstractGeometry %End void moveVertex( QgsVertexId id, const QgsPoint &newPos ); %Docstring diff --git a/python/gui/qgsgradientcolorrampdialog.sip b/python/gui/qgsgradientcolorrampdialog.sip index 273541dd42d3..11dee4d1f0bf 100644 --- a/python/gui/qgsgradientcolorrampdialog.sip +++ b/python/gui/qgsgradientcolorrampdialog.sip @@ -26,6 +26,7 @@ A dialog which allows users to modify the properties of a QgsGradientColorRamp. QgsGradientColorRampDialog( const QgsGradientColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsGradientColorRampDialog. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -35,14 +36,13 @@ Constructor for QgsGradientColorRampDialog. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsGradientColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsGradientColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` diff --git a/python/gui/qgsgradientstopeditor.sip b/python/gui/qgsgradientstopeditor.sip index de6bd3c6db3c..23be45ff172c 100644 --- a/python/gui/qgsgradientstopeditor.sip +++ b/python/gui/qgsgradientstopeditor.sip @@ -27,6 +27,7 @@ stops along the gradient. QgsGradientStopEditor( QWidget *parent /TransferThis/ = 0, QgsGradientColorRamp *ramp = 0 ); %Docstring Constructor for QgsGradientStopEditor. + :param parent: parent widget :param ramp: optional initial gradient ramp %End @@ -34,6 +35,7 @@ Constructor for QgsGradientStopEditor. void setGradientRamp( const QgsGradientColorRamp &ramp ); %Docstring Sets the current ramp shown in the editor. + :param ramp: color ramp .. seealso:: :py:func:`gradientRamp()` @@ -43,14 +45,13 @@ Sets the current ramp shown in the editor. %Docstring Returns the current ramp created by the editor. -:rtype: QgsGradientColorRamp - .. seealso:: :py:func:`setGradientRamp()` %End void selectStop( int index ); %Docstring Sets the currently selected stop. + :param index: index of stop, where 0 corresponds to the first stop .. seealso:: :py:func:`selectedStop()` @@ -60,8 +61,6 @@ Sets the currently selected stop. %Docstring Returns details about the currently selected stop. -:rtype: QgsGradientStop - .. seealso:: :py:func:`selectStop()` %End @@ -75,6 +74,7 @@ Returns details about the currently selected stop. void setSelectedStopColor( const QColor &color ); %Docstring Sets the color for the current selected stop. + :param color: new stop color .. seealso:: :py:func:`setSelectedStopOffset()` @@ -90,6 +90,7 @@ Sets the color for the current selected stop. %Docstring Sets the offset for the current selected stop. This slot has no effect if either the first or last stop is selected, as they cannot be repositioned. + :param offset: new stop offset .. seealso:: :py:func:`setSelectedStopColor()` @@ -100,6 +101,7 @@ first or last stop is selected, as they cannot be repositioned. void setSelectedStopDetails( const QColor &color, double offset ); %Docstring Sets the color and offset for the current selected stop. + :param color: new stop color :param offset: new stop offset @@ -117,6 +119,7 @@ first or last stop is selected, as they cannot be deleted. void setColor1( const QColor &color ); %Docstring Sets the color for the first stop. + :param color: new stop color .. seealso:: :py:func:`setColor2()` @@ -127,6 +130,7 @@ Sets the color for the first stop. void setColor2( const QColor &color ); %Docstring Sets the color for the last stop. + :param color: new stop color .. seealso:: :py:func:`setColor1()` @@ -144,6 +148,7 @@ Emitted when the gradient ramp is changed by a user void selectedStopChanged( const QgsGradientStop &stop ); %Docstring Emitted when the current selected stop changes. + :param stop: details about newly selected stop %End diff --git a/python/gui/qgsgroupwmsdatadialog.sip b/python/gui/qgsgroupwmsdatadialog.sip index 44cade0446b4..26a8779a36b4 100644 --- a/python/gui/qgsgroupwmsdatadialog.sip +++ b/python/gui/qgsgroupwmsdatadialog.sip @@ -23,22 +23,16 @@ Constructor QString groupTitle(); %Docstring return group WMS title - -:rtype: str %End QString groupShortName(); %Docstring return group WMS short name - -:rtype: str %End QString groupAbstract(); %Docstring return group WMS abstract - -:rtype: str %End diff --git a/python/gui/qgsgui.sip b/python/gui/qgsgui.sip index 219e7877db59..ae5ecc8b5832 100644 --- a/python/gui/qgsgui.sip +++ b/python/gui/qgsgui.sip @@ -29,51 +29,37 @@ related to GUI classes. static QgsGui *instance(); %Docstring Returns a pointer to the singleton instance. - -:rtype: QgsGui %End static QgsEditorWidgetRegistry *editorWidgetRegistry(); %Docstring Returns the global editor widget registry, used for managing all known edit widget factories. - -:rtype: QgsEditorWidgetRegistry %End static QgsSourceSelectProviderRegistry *sourceSelectProviderRegistry(); %Docstring Returns the global source select provider registry, used for managing all known source select widget factories. - -:rtype: QgsSourceSelectProviderRegistry %End static QgsShortcutsManager *shortcutsManager(); %Docstring Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences. - -:rtype: QgsShortcutsManager %End static QgsLayerTreeEmbeddedWidgetRegistry *layerTreeEmbeddedWidgetRegistry(); %Docstring Returns the global layer tree embedded widget registry, used for registering widgets that may be embedded into layer tree view. - -:rtype: QgsLayerTreeEmbeddedWidgetRegistry %End static QgsMapLayerActionRegistry *mapLayerActionRegistry(); %Docstring Returns the global map layer action registry, used for registering map layer actions. - -:rtype: QgsMapLayerActionRegistry %End static QgsLayoutItemGuiRegistry *layoutItemGuiRegistry(); %Docstring Returns the global layout item GUI registry, used for registering the GUI behavior of layout items. - -:rtype: QgsLayoutItemGuiRegistry %End static void enableAutoGeometryRestore( QWidget *widget, const QString &key = QString() ); diff --git a/python/gui/qgshelp.sip b/python/gui/qgshelp.sip index 4e78786d0dca..23c1705cf2f4 100644 --- a/python/gui/qgshelp.sip +++ b/python/gui/qgshelp.sip @@ -38,6 +38,7 @@ help system will be shown. %Docstring Opens help topic for the given help key using default system web browser. If help topic not found, builtin error page shown. + :param key: key which identified help topic .. versionadded:: 3.0 @@ -47,9 +48,8 @@ web browser. If help topic not found, builtin error page shown. %Docstring Returns URI of the help topic for the given key. If help topic not found, URI of the builtin error page returned. -:param key: key which identified help topic -:rtype: QUrl +:param key: key which identified help topic .. versionadded:: 3.0 %End diff --git a/python/gui/qgshighlight.sip b/python/gui/qgshighlight.sip index 5591d25e7ff3..d0f4327d6277 100644 --- a/python/gui/qgshighlight.sip +++ b/python/gui/qgshighlight.sip @@ -34,6 +34,7 @@ highlight.show() QgsHighlight( QgsMapCanvas *mapCanvas, const QgsGeometry &geom, QgsMapLayer *layer ); %Docstring Constructor for QgsHighlight + :param mapCanvas: associated map canvas :param geom: initial geometry of highlight :param layer: associated map layer @@ -43,6 +44,7 @@ Constructor for QgsHighlight %Docstring Constructor for highlighting true feature shape using feature attributes and renderer. + :param mapCanvas: map canvas :param feature: :param layer: vector layer @@ -89,8 +91,6 @@ Set minimum line / stroke width in millimeters. QgsMapLayer *layer() const; %Docstring Return the layer for which this highlight has been created. - -:rtype: QgsMapLayer %End virtual void updatePosition(); diff --git a/python/gui/qgshistogramwidget.sip b/python/gui/qgshistogramwidget.sip index fe4606bf07d3..83aabe6127f8 100644 --- a/python/gui/qgshistogramwidget.sip +++ b/python/gui/qgshistogramwidget.sip @@ -30,6 +30,7 @@ class QgsHistogramWidget : QWidget %Docstring QgsHistogramWidget constructor. If layer and fieldOrExp are specified then the histogram will be initially populated with the corresponding values. + :param parent: parent widget :param layer: source vector layer :param fieldOrExp: field name or expression string @@ -41,8 +42,6 @@ will be initially populated with the corresponding values. %Docstring Returns the layer currently associated with the widget. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer` .. seealso:: :py:func:`sourceFieldExp` @@ -53,8 +52,6 @@ Returns the layer currently associated with the widget. Returns the source field name or expression used to calculate values displayed in the histogram. -:rtype: str - .. seealso:: :py:func:`setSourceFieldExp` .. seealso:: :py:func:`layer` @@ -65,6 +62,7 @@ in the histogram. Sets the pen to use when drawing histogram bars. If set to Qt.NoPen then the pen will be automatically calculated. If ranges have been set using setGraduatedRanges() then the pen and brush will have no effect. + :param pen: histogram pen .. seealso:: :py:func:`pen` @@ -76,8 +74,6 @@ then the pen and brush will have no effect. %Docstring Returns the pen used when drawing histogram bars. -:rtype: QPen - .. seealso:: :py:func:`setPen` .. seealso:: :py:func:`brush` @@ -87,6 +83,7 @@ Returns the pen used when drawing histogram bars. %Docstring Sets the brush used for drawing histogram bars. If ranges have been set using setGraduatedRanges() then the pen and brush will have no effect. + :param brush: histogram brush .. seealso:: :py:func:`brush` @@ -98,8 +95,6 @@ then the pen and brush will have no effect. %Docstring Returns the brush used when drawing histogram bars. -:rtype: QBrush - .. seealso:: :py:func:`setBrush` .. seealso:: :py:func:`pen` @@ -109,6 +104,7 @@ Returns the brush used when drawing histogram bars. %Docstring Sets the graduated ranges associated with the histogram. If set, the ranges will be used to color the histogram bars and for showing vertical dividers at the histogram breaks. + :param ranges: graduated range list .. seealso:: :py:func:`graduatedRanges` @@ -120,8 +116,6 @@ Returns the graduated ranges associated with the histogram. If set, the ranges w bars and for showing vertical dividers at the histogram breaks. :return: graduated range list -:rtype: QgsRangeList - .. seealso:: :py:func:`setGraduatedRanges` %End @@ -130,8 +124,6 @@ bars and for showing vertical dividers at the histogram breaks. %Docstring Returns the title for the histogram's x-axis. -:rtype: str - .. seealso:: :py:func:`setXAxisTitle` .. seealso:: :py:func:`yAxisTitle` @@ -140,6 +132,7 @@ Returns the title for the histogram's x-axis. void setXAxisTitle( const QString &title ); %Docstring Sets the title for the histogram's x-axis. + :param title: x-axis title, or empty string to remove title .. seealso:: :py:func:`xAxisTitle` @@ -151,8 +144,6 @@ Sets the title for the histogram's x-axis. %Docstring Returns the title for the histogram's y-axis. -:rtype: str - .. seealso:: :py:func:`setYAxisTitle` .. seealso:: :py:func:`xAxisTitle` @@ -161,6 +152,7 @@ Returns the title for the histogram's y-axis. void setYAxisTitle( const QString &title ); %Docstring Sets the title for the histogram's y-axis. + :param title: y-axis title, or empty string to remove title .. seealso:: :py:func:`yAxisTitle` @@ -184,6 +176,7 @@ for the histogram, use refreshValues() to do this. void setLayer( QgsVectorLayer *layer ); %Docstring Sets the vector layer associated with the histogram. + :param layer: source vector layer .. seealso:: :py:func:`setSourceFieldExp` @@ -192,6 +185,7 @@ Sets the vector layer associated with the histogram. void setSourceFieldExp( const QString &fieldOrExp ); %Docstring Sets the source field or expression to use for values in the histogram. + :param fieldOrExp: field name or expression string .. seealso:: :py:func:`setLayer` diff --git a/python/gui/qgsidentifymenu.sip b/python/gui/qgsidentifymenu.sip index 0e4b28af6b88..b8dae84a5caa 100644 --- a/python/gui/qgsidentifymenu.sip +++ b/python/gui/qgsidentifymenu.sip @@ -63,20 +63,12 @@ Constructor for ActionData define if the menu executed can return multiple results (e.g. all results or all identified features of a vector layer) %End bool allowMultipleReturn(); -%Docstring - -:rtype: bool -%End void setExecWithSingleResult( bool execWithSingleResult ); %Docstring define if the menu will be shown with a single idetify result %End bool execWithSingleResult(); -%Docstring - -:rtype: bool -%End void setExpressionContextScope( const QgsExpressionContextScope &scope ); %Docstring @@ -89,8 +81,6 @@ Sets an expression context scope used to resolve underlying actions. %Docstring Returns an expression context scope used to resolve underlying actions. -:rtype: QgsExpressionContextScope - .. versionadded:: 3.0 %End @@ -107,10 +97,6 @@ Returns an expression context scope used to resolve underlying actions. .. seealso:: :py:class:`QgsMapLayerActionRegistry` %End bool showFeatureActions(); -%Docstring - -:rtype: bool -%End void setResultsIfExternalAction( bool resultsIfExternalAction ); %Docstring @@ -119,10 +105,6 @@ Returns an expression context scope used to resolve underlying actions. .. seealso:: :py:func:`setShowFeatureActions` %End bool resultsIfExternalAction(); -%Docstring - -:rtype: bool -%End void setMaxLayerDisplay( int maxLayerDisplay ); %Docstring @@ -133,10 +115,6 @@ Defines the maximum number of layers displayed in the menu (default is 10). 0 is unlimited. %End int maxLayerDisplay(); -%Docstring - -:rtype: int -%End void setMaxFeatureDisplay( int maxFeatureDisplay ); %Docstring @@ -147,10 +125,6 @@ Defines the maximum number of features displayed in the menu for vector layers ( 0 is unlimited. %End int maxFeatureDisplay(); -%Docstring - -:rtype: int -%End void addCustomAction( QgsMapLayerAction *action ); %Docstring @@ -165,10 +139,9 @@ remove all custom actions from the menu to be built QList exec( const QList &idResults, QPoint pos ); %Docstring exec + :param idResults: the list of identify results to choose within :param pos: the position where the menu will be executed - -:rtype: list of QgsMapToolIdentify.IdentifyResult %End protected: diff --git a/python/gui/qgskeyvaluewidget.sip b/python/gui/qgskeyvaluewidget.sip index 6fa3df71517a..d3ec299d5299 100644 --- a/python/gui/qgskeyvaluewidget.sip +++ b/python/gui/qgskeyvaluewidget.sip @@ -38,8 +38,6 @@ Set the initial value of the widget. Get the edit value. :return: the QVariantMap -:rtype: QVariantMap - %End }; diff --git a/python/gui/qgslegendfilterbutton.sip b/python/gui/qgslegendfilterbutton.sip index 4a977740a13c..b28b3336e81e 100644 --- a/python/gui/qgslegendfilterbutton.sip +++ b/python/gui/qgslegendfilterbutton.sip @@ -33,8 +33,6 @@ Construct a new filter legend button QString expressionText() const; %Docstring Returns the current text used as filter expression - -:rtype: str %End void setExpressionText( const QString &expression ); @@ -47,8 +45,6 @@ This will update the menu %Docstring Returns the current associated vectorLayer May be null - -:rtype: QgsVectorLayer %End void setVectorLayer( QgsVectorLayer *layer ); diff --git a/python/gui/qgslimitedrandomcolorrampdialog.sip b/python/gui/qgslimitedrandomcolorrampdialog.sip index f9ced9fccfe7..ffa41d516aad 100644 --- a/python/gui/qgslimitedrandomcolorrampdialog.sip +++ b/python/gui/qgslimitedrandomcolorrampdialog.sip @@ -24,6 +24,7 @@ A widget which allows users to modify the properties of a QgsLimitedRandomColorR QgsLimitedRandomColorRampWidget( const QgsLimitedRandomColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsLimitedRandomColorRampWidget. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -32,14 +33,13 @@ Constructor for QgsLimitedRandomColorRampWidget. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsLimitedRandomColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsLimitedRandomColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` @@ -102,6 +102,7 @@ A dialog which allows users to modify the properties of a QgsLimitedRandomColorR QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsLimitedRandomColorRampDialog. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -110,14 +111,13 @@ Constructor for QgsLimitedRandomColorRampDialog. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsLimitedRandomColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsLimitedRandomColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` diff --git a/python/gui/qgslistwidget.sip b/python/gui/qgslistwidget.sip index 7c757fc48383..fb332210b059 100644 --- a/python/gui/qgslistwidget.sip +++ b/python/gui/qgslistwidget.sip @@ -39,8 +39,6 @@ Set the initial value of the widget. Get the edit value. :return: the QVariantList -:rtype: QVariantList - %End bool valid() const; @@ -48,8 +46,6 @@ Get the edit value. Check the content is valid :return: true if valid -:rtype: bool - %End }; diff --git a/python/gui/qgslonglongvalidator.sip b/python/gui/qgslonglongvalidator.sip index 571c132b83e2..c82ffcb66d8c 100644 --- a/python/gui/qgslonglongvalidator.sip +++ b/python/gui/qgslonglongvalidator.sip @@ -28,15 +28,7 @@ class QgsLongLongValidator : QValidator virtual void setRange( qint64 bottom, qint64 top ); qint64 bottom() const; -%Docstring - -:rtype: qint64 -%End qint64 top() const; -%Docstring - -:rtype: qint64 -%End }; diff --git a/python/gui/qgsludialog.sip b/python/gui/qgsludialog.sip index 609a32179f47..d5464f60e637 100644 --- a/python/gui/qgsludialog.sip +++ b/python/gui/qgsludialog.sip @@ -18,16 +18,8 @@ class QgsLUDialog: QDialog public: QgsLUDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); QString lowerValue() const; -%Docstring - -:rtype: str -%End void setLowerValue( const QString &val ); QString upperValue() const; -%Docstring - -:rtype: str -%End void setUpperValue( const QString &val ); }; diff --git a/python/gui/qgsmapcanvas.sip b/python/gui/qgsmapcanvas.sip index 57b53e50f4e8..4c7073ee7b11 100644 --- a/python/gui/qgsmapcanvas.sip +++ b/python/gui/qgsmapcanvas.sip @@ -46,8 +46,6 @@ Constructor %Docstring Returns the magnification factor -:rtype: float - .. versionadded:: 2.16 %End @@ -71,8 +69,6 @@ empty string before setLayers() calls can be made. %Docstring Get access to properties used for map rendering -:rtype: QgsMapSettings - .. versionadded:: 2.4 %End @@ -94,8 +90,6 @@ Resets the ``flags`` for the canvas' map settings. %Docstring Get access to the labeling results (may be null) -:rtype: QgsLabelingResults - .. versionadded:: 2.4 %End @@ -110,8 +104,6 @@ Set whether to cache images of rendered layers %Docstring Check whether images of rendered layers are curerently being cached -:rtype: bool - .. versionadded:: 2.4 %End @@ -151,8 +143,6 @@ Set whether the layers are rendered in parallel or sequentially %Docstring Check whether the layers are rendered in parallel or sequentially -:rtype: bool - .. versionadded:: 2.4 %End @@ -167,8 +157,6 @@ Set how often map preview should be updated while it is being rendered (in milli %Docstring Find out how often map preview should be updated while it is being rendered (in milliseconds) -:rtype: int - .. versionadded:: 2.4 %End @@ -176,28 +164,20 @@ Find out how often map preview should be updated while it is being rendered (in %Docstring Returns the last reported scale of the canvas. The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. - -:rtype: float %End double mapUnitsPerPixel() const; %Docstring Returns the mapUnitsPerPixel (map units per pixel) for the canvas - -:rtype: float %End QgsRectangle extent() const; %Docstring Returns the current zoom extent of the map canvas - -:rtype: QgsRectangle %End QgsRectangle fullExtent() const; %Docstring Returns the combined extent for all layers on the map canvas - -:rtype: QgsRectangle %End void setExtent( const QgsRectangle &r, bool magnified = false ); @@ -209,8 +189,6 @@ Set the extent of the map canvas %Docstring Get the current map canvas rotation in clockwise degrees -:rtype: float - .. versionadded:: 2.8 %End @@ -232,8 +210,6 @@ Set the center of the map canvas, in geographical coordinates %Docstring Get map center, in geographical coordinates -:rtype: QgsPointXY - .. versionadded:: 2.8 %End @@ -257,12 +233,14 @@ Zoom to the next extent (view) void zoomToSelected( QgsVectorLayer *layer = 0 ); %Docstring Zoom to the extent of the selected features of current (vector) layer. + :param layer: optionally specify different than current layer %End void zoomToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids ); %Docstring Set canvas extent to the bounding box of a set of features + :param layer: the vector layer :param ids: the feature ids* %End @@ -270,6 +248,7 @@ Set canvas extent to the bounding box of a set of features void panToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids ); %Docstring Centers canvas extent to feature ids + :param layer: the vector layer :param ids: the feature ids* %End @@ -332,8 +311,6 @@ You don't have to call it manually, QgsMapTool takes care of it. QgsMapTool *mapTool(); %Docstring Returns the currently active tool - -:rtype: QgsMapTool %End void setCanvasColor( const QColor &_newVal ); @@ -343,8 +320,6 @@ Write property of QColor bgColor. QColor canvasColor() const; %Docstring Read property of QColor bgColor. - -:rtype: QColor %End void setSelectionColor( const QColor &color ); @@ -358,8 +333,6 @@ Set color of selected vector features %Docstring Returns color for selected features -:rtype: QColor - .. versionadded:: 3.0 %End @@ -371,23 +344,17 @@ Emits signal scaleChanged to update scale in main window QgsMapLayer *layer( int index ); %Docstring return the map layer at position index in the layer stack - -:rtype: QgsMapLayer %End int layerCount() const; %Docstring return number of layers on the map - -:rtype: int %End QList layers() const; %Docstring Return the list of layers shown within the map canvas. -:rtype: list of QgsMapLayer - .. seealso:: :py:func:`setLayers()` %End @@ -395,6 +362,7 @@ Return the list of layers shown within the map canvas. %Docstring Freeze/thaw the map canvas. This is used to prevent the canvas from responding to events while layers are being added/removed etc. + :param frozen: Boolean specifying if the canvas should be frozen (true) or thawed (false). Default is true. @@ -408,8 +376,6 @@ while setRenderFlag() should only be used when users disable rendering via GUI. %Docstring Returns true if canvas is frozen. -:rtype: bool - .. seealso:: :py:func:`renderFlag()` have been halted programmatically, while renderFlag() should be used to determine whether a user has disabled rendering via GUI. @@ -422,8 +388,6 @@ determine whether a user has disabled rendering via GUI. Returns true if canvas render is disabled as a result of user disabling renders via the GUI. -:rtype: bool - .. seealso:: :py:func:`setRenderFlag()` .. seealso:: :py:func:`isFrozen()` @@ -435,16 +399,12 @@ determine whether a user has disabled rendering via GUI. %Docstring Convience function for returning the current canvas map units. The map units are dictated by the canvas' destinationCrs() map units. - -:rtype: QgsUnitTypes.DistanceUnit %End QMap layerStyleOverrides() const; %Docstring Returns the stored overrides of styles for layers. -:rtype: QMap - .. versionadded:: 2.12 .. seealso:: :py:func:`setLayerStyleOverrides()` @@ -490,8 +450,6 @@ cleared. %Docstring Returns the map's theme shown in the canvas, if set. -:rtype: str - .. versionadded:: 3.0 .. seealso:: :py:func:`setTheme()` @@ -500,22 +458,16 @@ Returns the map's theme shown in the canvas, if set. const QgsMapToPixel *getCoordinateTransform(); %Docstring Get the current coordinate transform - -:rtype: QgsMapToPixel %End bool isDrawing(); %Docstring Find out whether rendering is in progress - -:rtype: bool %End QgsMapLayer *currentLayer(); %Docstring returns current layer (set by legend widget) - -:rtype: QgsMapLayer %End void setWheelFactor( double factor ); @@ -550,8 +502,6 @@ and does a pan if rect is empty (point extent) %Docstring Returns whether the scale is locked, so zooming can be performed using magnication. -:rtype: bool - .. versionadded:: 2.16 .. seealso:: :py:func:`setScaleLocked()` @@ -565,8 +515,6 @@ used to determine if anti-aliasing is enabled or not bool antiAliasingEnabled() const; %Docstring true if antialising is enabled - -:rtype: bool %End void enableMapTileRendering( bool flag ); @@ -587,13 +535,12 @@ Called when mouse is moving and pan is activated QPoint mouseLastXY(); %Docstring returns last position of mouse cursor - -:rtype: QPoint %End void setPreviewModeEnabled( bool previewEnabled ); %Docstring Enables a preview mode for the map canvas + :param previewEnabled: set to true to enable a preview mode .. seealso:: :py:func:`setPreviewMode` @@ -606,8 +553,6 @@ Enables a preview mode for the map canvas Returns whether a preview mode is enabled for the map canvas :return: true if a preview mode is currently enabled -:rtype: bool - .. seealso:: :py:func:`setPreviewModeEnabled` @@ -620,6 +565,7 @@ Returns whether a preview mode is enabled for the map canvas %Docstring Sets a preview mode for the map canvas. This setting only has an effect if previewModeEnabled is true. + :param mode: preview mode for the canvas .. seealso:: :py:func:`previewMode` @@ -637,8 +583,6 @@ Returns the current preview mode for the map canvas. This setting only has an ef previewModeEnabled is true. :return: preview mode for map canvas -:rtype: QgsPreviewEffect.PreviewMode - .. seealso:: :py:func:`setPreviewMode` @@ -655,8 +599,6 @@ If no snapping utils instance has been associated previously, an internal will b Main canvas in QGIS returns an instance which is always up-to-date with the project's snapping configuration. -:rtype: QgsSnappingUtils - .. versionadded:: 2.8 %End @@ -677,6 +619,7 @@ Sets an expression context scope for the map canvas. This scope is injected into context used for rendering the map, and can be used to apply specific variable overrides for expression evaluation for the map canvas render. This method will overwrite the existing expression context scope for the canvas. + :param scope: new expression context scope .. versionadded:: 2.12 @@ -690,8 +633,6 @@ Returns a reference to the expression context scope for the map canvas. This sco into the expression context used for rendering the map, and can be used to apply specific variable overrides for expression evaluation for the map canvas render. -:rtype: QgsExpressionContextScope - .. versionadded:: 2.12 .. seealso:: :py:func:`setExpressionContextScope()` @@ -701,12 +642,14 @@ overrides for expression evaluation for the map canvas render. void setSegmentationTolerance( double tolerance ); %Docstring Sets the segmentation tolerance applied when rendering curved geometries + :param tolerance: the segmentation tolerance* %End void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type ); %Docstring Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) + :param type: the segmentation tolerance typename* %End @@ -714,8 +657,6 @@ Sets segmentation tolerance type (maximum angle or maximum difference between cu %Docstring Returns a list of all annotation items in the canvas. -:rtype: list of QgsMapCanvasAnnotationItem - .. versionadded:: 3.0 %End @@ -723,8 +664,6 @@ Returns a list of all annotation items in the canvas. %Docstring Returns true if annotations are visible within the map canvas. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setAnnotationsVisible()` @@ -750,8 +689,6 @@ Sets global labeling engine settings in the internal map settings %Docstring Returns global labeling engine settings from the internal map settings -:rtype: QgsLabelingEngineSettings - .. versionadded:: 3.0 %End @@ -762,8 +699,6 @@ of the view just outside of the canvas extent, to allow preview of these out-of-canvas areas when panning or zooming out the map) are enabled for the canvas. -:rtype: bool - .. seealso:: :py:func:`setPreviewJobsEnabled()` .. versionadded:: 3.0 @@ -806,6 +741,7 @@ This slot is connected to the visibility change of one or more layers void setRenderFlag( bool flag ); %Docstring Sets whether a user has disabled canvas renders via the GUI. + :param flag: set to false to indicate that user has disabled renders .. seealso:: :py:func:`renderFlag()` @@ -998,8 +934,6 @@ emit a message (usually to be displayed in a message bar) %Docstring Overridden standard event to be gestures aware - -:rtype: bool %End virtual void keyPressEvent( QKeyEvent *e ); diff --git a/python/gui/qgsmapcanvasannotationitem.sip b/python/gui/qgsmapcanvasannotationitem.sip index 599d1a866ab4..ad933c1938e4 100644 --- a/python/gui/qgsmapcanvasannotationitem.sip +++ b/python/gui/qgsmapcanvasannotationitem.sip @@ -47,8 +47,6 @@ Constructor for QgsMapCanvasAnnotationItem. QgsAnnotation *annotation(); %Docstring Returns the item's annotation. - -:rtype: QgsAnnotation %End virtual void updatePosition(); @@ -63,15 +61,11 @@ Returns the item's annotation. MouseMoveAction moveActionForPosition( QPointF pos ) const; %Docstring Returns the mouse move behavior for a given position in scene coordinates - -:rtype: MouseMoveAction %End Qt::CursorShape cursorShapeForAction( MouseMoveAction moveAction ) const; %Docstring Returns matching cursor shape for a mouse move action. - -:rtype: Qt.CursorShape %End }; diff --git a/python/gui/qgsmapcanvasitem.sip b/python/gui/qgsmapcanvasitem.sip index 833be1ab5c04..bfbd8b25c28c 100644 --- a/python/gui/qgsmapcanvasitem.sip +++ b/python/gui/qgsmapcanvasitem.sip @@ -45,12 +45,11 @@ schedules map canvas for repaint bool setRenderContextVariables( QPainter *p, QgsRenderContext &context ) const; %Docstring Sets render context parameters + :param p: painter for rendering :param context: out: configured context :return: true in case of success * -:rtype: bool - %End public: @@ -66,8 +65,6 @@ called on changed extent or resize event to update position of the item QgsRectangle rect() const; %Docstring returns canvas item rectangle in map units - -:rtype: QgsRectangle %End void setRect( const QgsRectangle &r, bool resetRotation = true ); @@ -78,15 +75,11 @@ sets canvas item rectangle in map units QgsPointXY toMapCoordinates( QPoint point ) const; %Docstring transformation from screen coordinates to map coordinates - -:rtype: QgsPointXY %End QPointF toCanvasCoordinates( const QgsPointXY &point ) const; %Docstring transformation from map coordinates to screen coordinates - -:rtype: QPointF %End protected: diff --git a/python/gui/qgsmapcanvastracer.sip b/python/gui/qgsmapcanvastracer.sip index 32ad288770a7..4971e6586922 100644 --- a/python/gui/qgsmapcanvastracer.sip +++ b/python/gui/qgsmapcanvastracer.sip @@ -37,8 +37,6 @@ Create tracer associated with a particular map canvas, optionally message bar fo QAction *actionEnableTracing() const; %Docstring Access to action that user may use to toggle tracing on/off. May be null if no action was associated - -:rtype: QAction %End void setActionEnableTracing( QAction *action ); @@ -52,8 +50,6 @@ The action is used to determine whether tracing is currently enabled by the user Retrieve instance of this class associated with given canvas (if any). The class keeps a simple registry of tracers associated with map canvas instances for easier access to the common tracer by various map tools - -:rtype: QgsMapCanvasTracer %End void reportError( PathError err, bool addingVertex ); diff --git a/python/gui/qgsmaplayeractionregistry.sip b/python/gui/qgsmaplayeractionregistry.sip index 38be7ca98961..0fef4514a3bd 100644 --- a/python/gui/qgsmaplayeractionregistry.sip +++ b/python/gui/qgsmaplayeractionregistry.sip @@ -54,8 +54,6 @@ Creates a map layer action which can run on a specific type of layer bool canRunUsingLayer( QgsMapLayer *layer ) const; %Docstring True if action can run using the specified layer - -:rtype: bool %End void triggerForFeatures( QgsMapLayer *layer, const QList &featureList ); @@ -80,8 +78,6 @@ Define the targets of the action const Targets &targets() const; %Docstring Return availibity of action - -:rtype: Targets %End signals: @@ -135,15 +131,11 @@ Adds a map layer action to the registry QList mapLayerActions( QgsMapLayer *layer, QgsMapLayerAction::Targets targets = QgsMapLayerAction::AllActions ); %Docstring Returns the map layer actions which can run on the specified layer - -:rtype: list of QgsMapLayerAction %End bool removeMapLayerAction( QgsMapLayerAction *action ); %Docstring Removes a map layer action from the registry - -:rtype: bool %End void setDefaultActionForLayer( QgsMapLayer *layer, QgsMapLayerAction *action ); @@ -153,8 +145,6 @@ Sets the default action for a layer QgsMapLayerAction *defaultActionForLayer( QgsMapLayer *layer ); %Docstring Returns the default action for a layer - -:rtype: QgsMapLayerAction %End protected: diff --git a/python/gui/qgsmaplayercombobox.sip b/python/gui/qgsmaplayercombobox.sip index 8fdc10f8b001..b1ed66bf2820 100644 --- a/python/gui/qgsmaplayercombobox.sip +++ b/python/gui/qgsmaplayercombobox.sip @@ -38,8 +38,6 @@ setFilters allows fitering according to layer type and/or geometry type. QgsMapLayerProxyModel::Filters filters() const; %Docstring currently used filter on list layers - -:rtype: QgsMapLayerProxyModel.Filters %End void setExceptedLayerList( const QList &layerList ); @@ -50,8 +48,6 @@ except a list of layers not to be listed QList exceptedLayerList() const; %Docstring returns the list of excepted layers - -:rtype: list of QgsMapLayer %End void setExcludedProviders( const QStringList &providers ); @@ -67,8 +63,6 @@ Sets a list of data providers which should be excluded from the combobox. %Docstring Returns the list of data providers which are excluded from the combobox. -:rtype: list of str - .. seealso:: :py:func:`setExcludedProviders()` .. versionadded:: 3.0 @@ -87,8 +81,6 @@ Sets whether an optional empty layer ("not set") option is shown in the combo bo %Docstring Returns true if the combo box allows the empty layer ("not set") choice. -:rtype: bool - .. seealso:: :py:func:`setAllowEmptyLayer()` .. versionadded:: 3.0 @@ -107,8 +99,6 @@ Sets whether the CRS of layers is also included in the combo box text. %Docstring Returns true if the combo box shows the layer's CRS. -:rtype: bool - .. seealso:: :py:func:`setShowCrs()` .. versionadded:: 3.0 @@ -129,8 +119,6 @@ layer registry, or paths to layers which have not yet been loaded into QGIS. %Docstring Return the list of additional (non map layer) items included at the end of the combo box. -:rtype: list of str - .. seealso:: :py:func:`setAdditionalItems()` .. versionadded:: 3.0 @@ -140,17 +128,14 @@ Return the list of additional (non map layer) items included at the end of the c %Docstring Returns the current layer selected in the combo box. -:rtype: QgsMapLayer - .. seealso:: :py:func:`layer` %End QgsMapLayer *layer( int layerIndex ) const; %Docstring Return the layer currently shown at the specified index within the combo box. -:param layerIndex: position of layer to return -:rtype: QgsMapLayer +:param layerIndex: position of layer to return .. versionadded:: 2.10 diff --git a/python/gui/qgsmaplayerconfigwidget.sip b/python/gui/qgsmaplayerconfigwidget.sip index b9413daee64b..024a47a3f22b 100644 --- a/python/gui/qgsmaplayerconfigwidget.sip +++ b/python/gui/qgsmaplayerconfigwidget.sip @@ -25,6 +25,7 @@ class QgsMapLayerConfigWidget : QgsPanelWidget QgsMapLayerConfigWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = 0 ); %Docstring A panel widget that can be shown in the map style dock + :param layer: The layer active in the dock. :param canvas: The canvas object. :param parent: The parent of the widget. diff --git a/python/gui/qgsmaplayerconfigwidgetfactory.sip b/python/gui/qgsmaplayerconfigwidgetfactory.sip index 7e12f9e5bef5..12bbdc2856d6 100644 --- a/python/gui/qgsmaplayerconfigwidgetfactory.sip +++ b/python/gui/qgsmaplayerconfigwidgetfactory.sip @@ -39,13 +39,12 @@ Constructor The icon that will be shown in the UI for the panel. :return: A QIcon for the panel icon. -:rtype: QIcon - %End void setIcon( const QIcon &icon ); %Docstring Set the icon for the factory object. + :param icon: The icon to show in the interface. %End @@ -53,8 +52,6 @@ Set the icon for the factory object. %Docstring The title of the panel. -:rtype: str - .. note:: This may or may not be shown to the user. @@ -70,6 +67,7 @@ Set the title for the interface Not all users may show this as a label e.g style dock uses this as a tooltip. + :param title: The title to set. %End @@ -79,13 +77,12 @@ Flag if widget is supported for use in style dock. The default implementation returns false. :return: True if supported -:rtype: bool - %End void setSupportsStyleDock( bool supports ); %Docstring Set support flag for style dock + :param supports: True if this widget is supported in the style dock. %End @@ -95,13 +92,12 @@ Flag if widget is supported for use in layer properties dialog. The default implementation returns false. :return: True if supported -:rtype: bool - %End void setSupportLayerPropertiesDialog( bool supports ); %Docstring Set support flag for style dock + :param supports: True if this widget is supported in the style dock. %End @@ -110,19 +106,16 @@ Set support flag for style dock Check if the layer is supported for this widget. :return: True if this layer is supported for this widget -:rtype: bool - %End virtual QgsMapLayerConfigWidget *createWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget = true, QWidget *parent /TransferThis/ = 0 ) const = 0 /Factory/; %Docstring Factory function to create the widget on demand as needed by the dock. -:rtype: QgsMapLayerConfigWidget - .. note:: This function is called each time the panel is selected. Keep it light for better UX. + :param layer: The active layer in the dock. :param canvas: The map canvas. :param dockWidget: True of the widget will be shown a dock style widget. diff --git a/python/gui/qgsmaplayerstylemanagerwidget.sip b/python/gui/qgsmaplayerstylemanagerwidget.sip index d2115fe9ad9f..fb2f4f1828e0 100644 --- a/python/gui/qgsmaplayerstylemanagerwidget.sip +++ b/python/gui/qgsmaplayerstylemanagerwidget.sip @@ -25,6 +25,7 @@ the layer styles. QgsMapLayerStyleManagerWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = 0 ); %Docstring Style manager widget to manage the layers styles. + :param layer: The layer for the widget :param canvas: The canvas object. :param parent: The parent. diff --git a/python/gui/qgsmapmouseevent.sip b/python/gui/qgsmapmouseevent.sip index 88ad3e0958f4..08f93f33def8 100644 --- a/python/gui/qgsmapmouseevent.sip +++ b/python/gui/qgsmapmouseevent.sip @@ -55,8 +55,6 @@ Creates a new QgsMapMouseEvent. Should only be required to be called from the Qg %Docstring snapPoint will snap the points using the map canvas snapping utils configuration -:rtype: QgsPointXY - .. note:: if snapping did not succeeded, the map point will be reset to its original position @@ -68,8 +66,6 @@ Returns true if there is a snapped point cached. Will only be useful after snapPoint has previously been called. :return: True if there is a snapped point cached. -:rtype: bool - %End QgsPointXY mapPoint() const; @@ -77,8 +73,6 @@ Will only be useful after snapPoint has previously been called. mapPoint returns the point in coordinates :return: the point in map coordinates, after snapping if requested in the event. -:rtype: QgsPointXY - %End QgsPointLocator::Match mapPointMatch() const; @@ -86,8 +80,6 @@ Will only be useful after snapPoint has previously been called. Returns the matching data from the most recently snapped point. :return: the snapping data structure -:rtype: QgsPointLocator.Match - .. versionadded:: 2.14 %End @@ -105,8 +97,6 @@ The point in pixel coordinates will be calculated accordingly. Returns the original, unmodified map point of the mouse cursor. :return: The cursor position in map coordinates. -:rtype: QgsPointXY - %End QPoint pixelPoint() const; @@ -114,8 +104,6 @@ Returns the original, unmodified map point of the mouse cursor. The snapped mouse cursor in pixel coordinates. :return: The snapped mouse cursor position in pixel coordinates. -:rtype: QPoint - %End QPoint originalPixelPoint() const; @@ -124,8 +112,6 @@ The unsnapped, real mouse cursor position in pixel coordinates. Alias to pos() :return: Mouse position in pixel coordinates -:rtype: QPoint - %End }; diff --git a/python/gui/qgsmapoverviewcanvas.sip b/python/gui/qgsmapoverviewcanvas.sip index b36279b42dcd..234d1cbd1d16 100644 --- a/python/gui/qgsmapoverviewcanvas.sip +++ b/python/gui/qgsmapoverviewcanvas.sip @@ -42,8 +42,6 @@ updates layer set for overview QList layers() const; %Docstring Returns list of layers visible in the overview - -:rtype: list of QgsMapLayer %End void enableAntiAliasing( bool flag ); diff --git a/python/gui/qgsmaptip.sip b/python/gui/qgsmaptip.sip index 24e73ce2e27f..3a487bf68277 100644 --- a/python/gui/qgsmaptip.sip +++ b/python/gui/qgsmaptip.sip @@ -46,6 +46,7 @@ Default constructor QgsMapCanvas *mpMapCanvas ); %Docstring Show a maptip at a given point on the map canvas + :param thepLayer: a qgis vector map layer pointer that will be used to provide the attribute data for the map tip. :param mapPosition: a reference to the position of the cursor @@ -58,6 +59,7 @@ in pixel coordinates. void clear( QgsMapCanvas *mpMapCanvas = 0 ); %Docstring Clear the current maptip if it exists + :param mpMapCanvas: the canvas from which the tip should be cleared. %End }; diff --git a/python/gui/qgsmaptool.sip b/python/gui/qgsmaptool.sip index e138b736b22f..14e45496f683 100644 --- a/python/gui/qgsmaptool.sip +++ b/python/gui/qgsmaptool.sip @@ -60,8 +60,6 @@ implemented as map tools. %Docstring Returns the flags for the map tool. -:rtype: Flags - .. versionadded:: 2.16 %End @@ -105,8 +103,6 @@ Key event for overriding. Default implementation does nothing. virtual bool gestureEvent( QGestureEvent *e ); %Docstring gesture event for overriding. Default implementation does nothing. - -:rtype: bool %End void setAction( QAction *action ); @@ -120,8 +116,6 @@ the previously used toolbutton to pop out. * QAction *action(); %Docstring Return associated action with map tool or NULL if no action is associated - -:rtype: QAction %End void setButton( QAbstractButton *button ); @@ -133,8 +127,6 @@ as setAction() function except it works with a button instead of an QAction. * QAbstractButton *button(); %Docstring Return associated button with map tool or NULL if no button is associated - -:rtype: QAbstractButton %End virtual void setCursor( const QCursor &cursor ); @@ -160,16 +152,12 @@ convenient method to clean members QgsMapCanvas *canvas(); %Docstring returns pointer to the tool's map canvas - -:rtype: QgsMapCanvas %End QString toolName(); %Docstring Emit map tool changed with the old tool -:rtype: str - .. versionadded:: 2.3 %End @@ -179,8 +167,6 @@ Get search radius in mm. Used by identify, tip etc. The values is currently set in identify tool options (move somewhere else?) and defaults to Qgis.DEFAULT_SEARCH_RADIUS_MM. -:rtype: float - .. versionadded:: 2.3 %End @@ -189,8 +175,6 @@ and defaults to Qgis.DEFAULT_SEARCH_RADIUS_MM. Get search radius in map units for given context. Used by identify, tip etc. The values is calculated from searchRadiusMM(). -:rtype: float - .. versionadded:: 2.3 %End @@ -199,8 +183,6 @@ The values is calculated from searchRadiusMM(). Get search radius in map units for given canvas. Used by identify, tip etc. The values is calculated from searchRadiusMM(). -:rtype: float - .. versionadded:: 2.3 %End @@ -235,37 +217,27 @@ constructor takes map canvas as a parameter QgsPointXY toMapCoordinates( QPoint point ); %Docstring transformation from screen coordinates to map coordinates - -:rtype: QgsPointXY %End QgsPointXY toLayerCoordinates( const QgsMapLayer *layer, QPoint point ); %Docstring transformation from screen coordinates to layer's coordinates - -:rtype: QgsPointXY %End QgsPointXY toLayerCoordinates( const QgsMapLayer *layer, const QgsPointXY &point ); %Docstring transformation from map coordinates to layer's coordinates - -:rtype: QgsPointXY %End QgsPointXY toMapCoordinates( const QgsMapLayer *layer, const QgsPointXY &point ); %Docstring transformation from layer's coordinates to map coordinates (which is different in case reprojection is used) - -:rtype: QgsPointXY %End QgsPoint toMapCoordinates( const QgsMapLayer *layer, const QgsPoint &point ) /PyName=toMapCoordinatesV2/; %Docstring transformation from layer's coordinates to map coordinates (which is different in case reprojection is used) -:rtype: QgsPoint - .. note:: available in Python bindings as toMapCoordinatesV2 @@ -274,15 +246,11 @@ transformation from layer's coordinates to map coordinates (which is different i QgsRectangle toLayerCoordinates( const QgsMapLayer *layer, const QgsRectangle &rect ); %Docstring trnasformation of the rect from map coordinates to layer's coordinates - -:rtype: QgsRectangle %End QPoint toCanvasCoordinates( const QgsPointXY &point ); %Docstring transformation from map coordinates to screen coordinates - -:rtype: QPoint %End diff --git a/python/gui/qgsmaptooladvanceddigitizing.sip b/python/gui/qgsmaptooladvanceddigitizing.sip index c16b9b16fa0b..a1bb78a5e616 100644 --- a/python/gui/qgsmaptooladvanceddigitizing.sip +++ b/python/gui/qgsmaptooladvanceddigitizing.sip @@ -34,6 +34,7 @@ Events are then forwarded to corresponding virtual methods which can be reimplem explicit QgsMapToolAdvancedDigitizing( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget ); %Docstring Creates an advanced digitizing maptool + :param canvas: The map canvas on which the tool works :param cadDockWidget: The cad dock widget which will be used to adjust mouse events %End @@ -67,10 +68,6 @@ Unregisters this maptool from the cad dock widget %End QgsAdvancedDigitizingDockWidget *cadDockWidget() const; -%Docstring - -:rtype: QgsAdvancedDigitizingDockWidget -%End bool isAdvancedDigitizingAllowed() const; %Docstring @@ -85,8 +82,6 @@ If true is returned, that does not mean that advanced digitizing is actually act because it is up to the user to enable/disable it when it is allowed. \sa setAdvancedDigitizingAllowed() -:rtype: bool - .. versionadded:: 3.0 %End @@ -98,8 +93,6 @@ to the tool. This may be desirable default behavior for some map tools, but not It is therefore possible to configure the behavior by the map tool. \sa isAutoSnapEnabled() -:rtype: bool - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsmaptoolcapture.sip b/python/gui/qgsmaptoolcapture.sip index 5971f5ecc787..4f884be7f31c 100644 --- a/python/gui/qgsmaptoolcapture.sip +++ b/python/gui/qgsmaptoolcapture.sip @@ -44,15 +44,11 @@ constructor The capture mode :return: Capture mode -:rtype: CaptureMode - %End int addCurve( QgsCurve *c ); %Docstring Adds a whole curve (e.g. circularstring) to the captured geometry. Curve must be in map CRS - -:rtype: int %End void clearCurve( ); @@ -67,16 +63,12 @@ Clear capture curve. Get the capture curve :return: Capture curve -:rtype: QgsCompoundCurve - %End QList snappingMatches() const; %Docstring Return a list of matches for each point on the captureCurve. -:rtype: list of QgsPointLocator.Match - .. versionadded:: 3.0 %End @@ -87,6 +79,7 @@ Return a list of matches for each point on the captureCurve. %Docstring Intercept key events like Esc or Del to delete the last point + :param e: key event %End @@ -106,37 +99,20 @@ convenient method to clean members protected: int nextPoint( const QgsPoint &mapPoint, QgsPoint &layerPoint ); -%Docstring - -:rtype: int -%End int nextPoint( QPoint p, QgsPoint &layerPoint, QgsPoint &mapPoint ); -%Docstring - -:rtype: int -%End int fetchLayerPoint( const QgsPointLocator::Match &match, QgsPoint &layerPoint ); -%Docstring - -:rtype: int -%End int addVertex( const QgsPointXY &point ); -%Docstring - -:rtype: int -%End int addVertex( const QgsPointXY &mapPoint, const QgsPointLocator::Match &match ); %Docstring Variant to supply more information in the case of snapping + :param mapPoint: The vertex to add in map coordinates :param match: Data about the snapping match. Can be an invalid match, if point not snapped. -:rtype: int - .. versionadded:: 2.14 %End @@ -155,8 +131,6 @@ Start capturing Are we currently capturing? :return: Is the tool in capture mode? -:rtype: bool - %End int size(); @@ -164,8 +138,6 @@ Are we currently capturing? Number of points digitized :return: Number of points -:rtype: int - %End QVector points() const; @@ -173,8 +145,6 @@ Number of points digitized List of digitized points :return: List of points -:rtype: list of QgsPointXY - %End void setPoints( const QVector &pointList ); diff --git a/python/gui/qgsmaptooledit.sip b/python/gui/qgsmaptooledit.sip index 20f5017c81a8..b0522c9aedaf 100644 --- a/python/gui/qgsmaptooledit.sip +++ b/python/gui/qgsmaptooledit.sip @@ -27,8 +27,6 @@ Base class for map tools that edit vector geometry %Docstring Return default Z value Use for set Z coordinate to new vertex for 2.5d geometries - -:rtype: float %End protected: @@ -36,20 +34,14 @@ Use for set Z coordinate to new vertex for 2.5d geometries static QColor digitizingStrokeColor(); %Docstring Returns stroke color for rubber bands (from global settings) - -:rtype: QColor %End static int digitizingStrokeWidth(); %Docstring Returns stroke width for rubber bands (from global settings) - -:rtype: int %End static QColor digitizingFillColor(); %Docstring Returns fill color for rubber bands (from global settings) - -:rtype: QColor %End QgsRubberBand *createRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) /Factory/; @@ -57,33 +49,25 @@ Returns fill color for rubber bands (from global settings) Creates a rubber band with the color/line width from the QGIS settings. The caller takes ownership of the returned object + :param geometryType: :param alternativeBand: if true, rubber band will be set with more transparency and a dash pattern. default is false. - -:rtype: QgsRubberBand %End QgsGeometryRubberBand *createGeometryRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) const /Factory/; -%Docstring - -:rtype: QgsGeometryRubberBand -%End QgsVectorLayer *currentVectorLayer(); %Docstring Returns the current vector layer of the map canvas or 0 - -:rtype: QgsVectorLayer %End int addTopologicalPoints( const QVector &geom ); %Docstring Adds vertices to other features to keep topology up to date, e.g. to neighbouring polygons. + :param geom: list of points (in layer coordinate system) :return: 0 in case of success -:rtype: int - %End void notifyNotVectorLayer(); diff --git a/python/gui/qgsmaptoolextent.sip b/python/gui/qgsmaptoolextent.sip index 2bcc2455571a..8fe61dd235b9 100644 --- a/python/gui/qgsmaptoolextent.sip +++ b/python/gui/qgsmaptoolextent.sip @@ -45,6 +45,7 @@ constructor %Docstring Sets a fixed aspect ratio to be used when dragging extent onto the canvas. To unset a fixed aspect ratio, set the width and height to zero. + :param ratio: aspect ratio's width and height * %End @@ -54,15 +55,11 @@ To unset a fixed aspect ratio, set the width and height to zero. Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. If the aspect ratio isn't fixed, the width and height will be set to zero. * - -:rtype: QSize %End QgsRectangle extent() const; %Docstring Returns the current extent drawn onto the canvas. - -:rtype: QgsRectangle %End signals: diff --git a/python/gui/qgsmaptoolidentify.sip b/python/gui/qgsmaptoolidentify.sip index 797fb7ad0c3a..975687a4cb2d 100644 --- a/python/gui/qgsmaptoolidentify.sip +++ b/python/gui/qgsmaptoolidentify.sip @@ -85,14 +85,13 @@ constructor QList identify( int x, int y, const QList &layerList = QList(), IdentifyMode mode = DefaultQgsSetting ); %Docstring Performs the identification. + :param x: x coordinates of mouseEvent :param y: y coordinates of mouseEvent :param layerList: Performs the identification within the given list of layers. Default value is an empty list, i.e. uses all the layers. :param mode: Identification mode. Can use Qgis default settings or a defined mode. Default mode is DefaultQgsSetting. :return: a list of IdentifyResult* -:rtype: list of QgsMapToolIdentify.IdentifyResult - %End QList identify( int x, int y, IdentifyMode mode, LayerType layerType = AllLayers ); @@ -100,22 +99,19 @@ Performs the identification. Performs the identification. To avoid being forced to specify IdentifyMode with a list of layers this has been made private and two publics methods are offered + :param x: x coordinates of mouseEvent :param y: y coordinates of mouseEvent :param mode: Identification mode. Can use Qgis default settings or a defined mode. :param layerType: Only performs identification in a certain type of layers (raster, vector). Default value is AllLayers. :return: a list of IdentifyResult* -:rtype: list of QgsMapToolIdentify.IdentifyResult - %End QgsIdentifyMenu *identifyMenu(); %Docstring return a pointer to the identify menu which will be used in layer selection mode this menu can also be customized - -:rtype: QgsIdentifyMenu %End public slots: @@ -133,6 +129,7 @@ this menu can also be customized Performs the identification. To avoid being forced to specify IdentifyMode with a list of layers this has been made private and two publics methods are offered + :param x: x coordinates of mouseEvent :param y: y coordinates of mouseEvent :param mode: Identification mode. Can use Qgis default settings or a defined mode. @@ -140,28 +137,16 @@ this has been made private and two publics methods are offered :param layerType: Only performs identification in a certain type of layers (raster, vector). :return: a list of IdentifyResult* -:rtype: list of QgsMapToolIdentify.IdentifyResult - %End bool identifyLayer( QList *results, QgsMapLayer *layer, const QgsPointXY &point, const QgsRectangle &viewExtent, double mapUnitsPerPixel, QgsMapToolIdentify::LayerType layerType = AllLayers ); %Docstring Call the right method depending on layer type - -:rtype: bool %End bool identifyRasterLayer( QList *results, QgsRasterLayer *layer, QgsPointXY point, const QgsRectangle &viewExtent, double mapUnitsPerPixel ); -%Docstring - -:rtype: bool -%End bool identifyVectorLayer( QList *results, QgsVectorLayer *layer, const QgsPointXY &point ); -%Docstring - -:rtype: bool -%End }; diff --git a/python/gui/qgsmaptoolidentifyfeature.sip b/python/gui/qgsmaptoolidentifyfeature.sip index 3dc2a2bccdca..ba39510481bb 100644 --- a/python/gui/qgsmaptoolidentifyfeature.sip +++ b/python/gui/qgsmaptoolidentifyfeature.sip @@ -24,6 +24,7 @@ A signal will then be emitted. QgsMapToolIdentifyFeature( QgsMapCanvas *canvas, QgsVectorLayer *vl = 0 ); %Docstring QgsMapToolIdentifyFeature is a map tool to identify a feature on a chosen layer + :param canvas: the map canvas :param vl: the vector layer. The map tool can be initialized without any layer and can be set afterward. %End diff --git a/python/gui/qgsmessagebar.sip b/python/gui/qgsmessagebar.sip index cedb4933cabc..9419e969ed9c 100644 --- a/python/gui/qgsmessagebar.sip +++ b/python/gui/qgsmessagebar.sip @@ -47,41 +47,33 @@ The message bar will take ownership of the item. %Docstring Display a widget as a message on the bar after hiding the currently visible one and putting it in a stack. + :param widget: message widget to display :param level: is QgsMessageBar.INFO, WARNING, CRITICAL or SUCCESS :param duration: timeout duration of message in seconds, 0 value indicates no timeout - -:rtype: QgsMessageBarItem %End bool popWidget( QgsMessageBarItem *item ); %Docstring Remove the passed widget from the bar (if previously added), then display the next one in the stack if any or hide the bar + :param item: item to remove :return: true if the widget was removed, false otherwise -:rtype: bool - %End static QgsMessageBarItem *createMessage( const QString &text, QWidget *parent = 0 ) /Factory/; %Docstring make out a widget containing a message to be displayed on the bar - -:rtype: QgsMessageBarItem %End static QgsMessageBarItem *createMessage( const QString &title, const QString &text, QWidget *parent = 0 ) /Factory/; %Docstring make out a widget containing title and message to be displayed on the bar - -:rtype: QgsMessageBarItem %End static QgsMessageBarItem *createMessage( QWidget *widget, QWidget *parent = 0 ) /Factory/; %Docstring make out a widget containing title and message to be displayed on the bar - -:rtype: QgsMessageBarItem %End void pushMessage( const QString &text, MessageLevel level = INFO, int duration = 5 ); @@ -94,10 +86,6 @@ convenience method for pushing a message with title to the bar %End QgsMessageBarItem *currentItem(); -%Docstring - -:rtype: QgsMessageBarItem -%End signals: void widgetAdded( QgsMessageBarItem *item ); @@ -118,8 +106,6 @@ Remove the currently displayed widget from the bar and display the next in the stack if any or hide the bar. :return: true if the widget was removed, false otherwise -:rtype: bool - %End bool clearWidgets(); @@ -127,13 +113,12 @@ display the next in the stack if any or hide the bar. Remove all items from the bar's widget list :return: true if all items were removed, false otherwise -:rtype: bool - %End void pushSuccess( const QString &title, const QString &message ); %Docstring Pushes a success message with default timeout to the message bar + :param title: title string for message :param message: The message to be displayed @@ -143,6 +128,7 @@ Pushes a success message with default timeout to the message bar void pushInfo( const QString &title, const QString &message ); %Docstring Pushes a information message with default timeout to the message bar + :param title: title string for message :param message: The message to be displayed @@ -152,6 +138,7 @@ Pushes a information message with default timeout to the message bar void pushWarning( const QString &title, const QString &message ); %Docstring Pushes a warning with default timeout to the message bar + :param title: title string for message :param message: The message to be displayed @@ -161,6 +148,7 @@ Pushes a warning with default timeout to the message bar void pushCritical( const QString &title, const QString &message ); %Docstring Pushes a critical warning with default timeout to the message bar + :param title: title string for message :param message: The message to be displayed diff --git a/python/gui/qgsmessagebaritem.sip b/python/gui/qgsmessagebaritem.sip index e66e1216a50d..32f5434fbc90 100644 --- a/python/gui/qgsmessagebaritem.sip +++ b/python/gui/qgsmessagebaritem.sip @@ -38,88 +38,50 @@ make out a widget containing a widget to be displayed on the bar %End QgsMessageBarItem *setText( const QString &text ); -%Docstring - -:rtype: QgsMessageBarItem -%End QString text() const; %Docstring Returns the text for the message. - -:rtype: str %End QgsMessageBarItem *setTitle( const QString &title ); -%Docstring - -:rtype: QgsMessageBarItem -%End QString title() const; %Docstring Returns the title for the message. - -:rtype: str %End QgsMessageBarItem *setLevel( QgsMessageBar::MessageLevel level ); -%Docstring - -:rtype: QgsMessageBarItem -%End QgsMessageBar::MessageLevel level() const; %Docstring Returns the message level for the message. - -:rtype: QgsMessageBar.MessageLevel %End QgsMessageBarItem *setWidget( QWidget *widget ); -%Docstring - -:rtype: QgsMessageBarItem -%End QWidget *widget() const; %Docstring Returns the widget for the message. - -:rtype: QWidget %End QgsMessageBarItem *setIcon( const QIcon &icon ); -%Docstring - -:rtype: QgsMessageBarItem -%End QIcon icon() const; %Docstring Returns the icon for the message. - -:rtype: QIcon %End QgsMessageBarItem *setDuration( int duration ); -%Docstring - -:rtype: QgsMessageBarItem -%End int duration() const; %Docstring returns the duration in second of the message - -:rtype: int %End QString getStyleSheet(); %Docstring returns the styleSheet - -:rtype: str %End signals: diff --git a/python/gui/qgsmessageviewer.sip b/python/gui/qgsmessageviewer.sip index 63c73d4c6b40..3b6acbff999b 100644 --- a/python/gui/qgsmessageviewer.sip +++ b/python/gui/qgsmessageviewer.sip @@ -42,10 +42,6 @@ A generic message view for displaying QGIS messages. void setCheckBoxVisible( bool visible ); void setCheckBoxState( Qt::CheckState state ); Qt::CheckState checkBoxState(); -%Docstring - -:rtype: Qt.CheckState -%End void setCheckBoxQgsSettingsLabel( const QString &label ); }; diff --git a/python/gui/qgsmetadatawidget.sip b/python/gui/qgsmetadatawidget.sip index a7352a6166a8..9b34e315ee6b 100644 --- a/python/gui/qgsmetadatawidget.sip +++ b/python/gui/qgsmetadatawidget.sip @@ -36,8 +36,6 @@ Save all fields in a QgsLayerMetadata object. bool checkMetadata() const; %Docstring Check if values in the wizard are correct. - -:rtype: bool %End void acceptMetadata(); @@ -48,23 +46,17 @@ Saves the metadata to the layer. static QMap parseLanguages(); %Docstring Returns a list of languages available by default in the wizard. - -:rtype: QMap %End static QStringList parseLicenses(); %Docstring Returns a list of licences available by default in the wizard. - -:rtype: list of str %End static QStringList parseLinkTypes(); %Docstring Returns a list of link types available by default in the wizard. -:rtype: list of str - .. seealso:: :py:func:`https` %End @@ -72,16 +64,12 @@ Returns a list of link types available by default in the wizard. %Docstring Returns a list of MIME types available by default in the wizard. -:rtype: list of str - .. seealso:: :py:func:`https` %End static QMap parseTypes(); %Docstring Returns a list of types available by default in the wizard. - -:rtype: QMap %End }; diff --git a/python/gui/qgsnewauxiliaryfielddialog.sip b/python/gui/qgsnewauxiliaryfielddialog.sip index 1217bebfae82..740bd3e79da0 100644 --- a/python/gui/qgsnewauxiliaryfielddialog.sip +++ b/python/gui/qgsnewauxiliaryfielddialog.sip @@ -36,8 +36,6 @@ Constructor. QgsPropertyDefinition propertyDefinition() const; %Docstring Returns the underlying property definition. - -:rtype: QgsPropertyDefinition %End protected: diff --git a/python/gui/qgsnewgeopackagelayerdialog.sip b/python/gui/qgsnewgeopackagelayerdialog.sip index 4fb805bf1a8a..d8262c5d4bd2 100644 --- a/python/gui/qgsnewgeopackagelayerdialog.sip +++ b/python/gui/qgsnewgeopackagelayerdialog.sip @@ -44,8 +44,6 @@ Sets the ``crs`` value for the new layer in the dialog. %Docstring Returns the database path -:rtype: str - .. versionadded:: 3.0 %End diff --git a/python/gui/qgsnewhttpconnection.sip b/python/gui/qgsnewhttpconnection.sip index 708d1479f24b..8eb22cd81a68 100644 --- a/python/gui/qgsnewhttpconnection.sip +++ b/python/gui/qgsnewhttpconnection.sip @@ -60,8 +60,6 @@ and appearance. %Docstring Returns the current connection name. -:rtype: str - .. versionadded:: 3.0 %End @@ -69,8 +67,6 @@ Returns the current connection name. %Docstring Returns the current connection url. -:rtype: str - .. versionadded:: 3.0 %End @@ -86,8 +82,6 @@ Returns the current connection url. Returns true if dialog settings are valid, or false if current settings are not valid and the dialog should not be acceptable. -:rtype: bool - .. versionadded:: 3.0 %End @@ -95,8 +89,6 @@ settings are not valid and the dialog should not be acceptable. %Docstring Returns the "test connection" button. -:rtype: QPushButton - .. versionadded:: 3.0 %End @@ -104,8 +96,6 @@ Returns the "test connection" button. %Docstring Returns the QSettings key for WFS related settings for the connection. -:rtype: str - .. seealso:: :py:func:`wmsSettingsKey()` .. versionadded:: 3.0 @@ -115,8 +105,6 @@ Returns the QSettings key for WFS related settings for the connection. %Docstring Returns the QSettings key for WMS related settings for the connection. -:rtype: str - .. seealso:: :py:func:`wfsSettingsKey()` .. versionadded:: 3.0 diff --git a/python/gui/qgsnewmemorylayerdialog.sip b/python/gui/qgsnewmemorylayerdialog.sip index 4425dc19f8b2..a350a0f332dd 100644 --- a/python/gui/qgsnewmemorylayerdialog.sip +++ b/python/gui/qgsnewmemorylayerdialog.sip @@ -20,12 +20,11 @@ class QgsNewMemoryLayerDialog: QDialog static QgsVectorLayer *runAndCreateLayer( QWidget *parent = 0, const QgsCoordinateReferenceSystem &defaultCrs = QgsCoordinateReferenceSystem() ); %Docstring Runs the dialog and creates a new memory layer + :param parent: parent widget :param defaultCrs: default layer CRS to show in dialog :return: new memory layer -:rtype: QgsVectorLayer - %End QgsNewMemoryLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); @@ -34,8 +33,6 @@ Runs the dialog and creates a new memory layer QgsWkbTypes::Type selectedType() const; %Docstring Returns the selected geometry type - -:rtype: QgsWkbTypes.Type %End void setCrs( const QgsCoordinateReferenceSystem &crs ); @@ -51,16 +48,12 @@ Sets the ``crs`` value for the new layer in the dialog. %Docstring Returns the selected CRS for the new layer. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs()` %End QString layerName() const; %Docstring Returns the layer name - -:rtype: str %End }; diff --git a/python/gui/qgsnewnamedialog.sip b/python/gui/qgsnewnamedialog.sip index c0d41720e91a..7c3bc6e843bc 100644 --- a/python/gui/qgsnewnamedialog.sip +++ b/python/gui/qgsnewnamedialog.sip @@ -29,6 +29,7 @@ the dialog warns users if an entered name already exists. QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = QgsGuiUtils::ModalDialogFlags ); %Docstring New dialog constructor. + :param source: original data source name, e.g. original layer name of the layer to be copied :param initial: initial name :param extensions: base name extensions, e.g. raster base name band extensions or vector layer type extensions @@ -43,6 +44,7 @@ New dialog constructor. %Docstring Sets the hint string for the dialog (the text shown above the name input box). + :param hintString: hint text .. seealso:: :py:func:`hintString()` @@ -55,8 +57,6 @@ input box). Returns the hint string for the dialog (the text shown above the name input box). -:rtype: str - .. seealso:: :py:func:`setHintString()` .. versionadded:: 2.12 @@ -77,8 +77,6 @@ then the dialog will not accept names which already exist. %Docstring Returns whether users are permitted to overwrite existing names. -:rtype: bool - .. versionadded:: 2.12 .. seealso:: :py:func:`setOverwriteEnabled()` @@ -87,6 +85,7 @@ Returns whether users are permitted to overwrite existing names. void setConflictingNameWarning( const QString &string ); %Docstring Sets the string used for warning users if a conflicting name exists. + :param string: warning string. If empty a default warning string will be used. .. versionadded:: 2.12 @@ -98,8 +97,6 @@ Sets the string used for warning users if a conflicting name exists. %Docstring Returns the string used for warning users if a conflicting name exists. -:rtype: str - .. versionadded:: 2.12 .. seealso:: :py:func:`setConflictingNameWarning()` @@ -110,22 +107,19 @@ Returns the string used for warning users if a conflicting name exists. Name entered by user. :return: new name -:rtype: str - %End static bool exists( const QString &name, const QStringList &extensions, const QStringList &existing, Qt::CaseSensitivity cs = Qt::CaseSensitive ); %Docstring Test if name or name with at least one extension exists. + :param name: name or base name :param extensions: base name extensions :param existing: existing names :param cs: case sensitivity for new name to existing names comparison :return: true if name exists -:rtype: bool - %End public slots: void nameChanged(); @@ -135,20 +129,10 @@ Test if name or name with at least one extension exists. QString highlightText( const QString &text ); %Docstring List of names with extensions - -:rtype: str %End static QStringList fullNames( const QString &name, const QStringList &extensions ); -%Docstring - -:rtype: list of str -%End static QStringList matching( const QStringList &newNames, const QStringList &existingNames, Qt::CaseSensitivity cs = Qt::CaseSensitive ); -%Docstring - -:rtype: list of str -%End }; /************************************************************************ diff --git a/python/gui/qgsnewvectorlayerdialog.sip b/python/gui/qgsnewvectorlayerdialog.sip index e0e9930eb7cc..55fd2f1a752a 100644 --- a/python/gui/qgsnewvectorlayerdialog.sip +++ b/python/gui/qgsnewvectorlayerdialog.sip @@ -22,8 +22,6 @@ class QgsNewVectorLayerDialog: QDialog Runs the dialog and creates a layer matching the dialog parameters. :return: fileName on success, empty string use aborted, QString() if creation failed -:rtype: str - %End QgsNewVectorLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); @@ -31,8 +29,6 @@ Runs the dialog and creates a layer matching the dialog parameters. QgsWkbTypes::Type selectedType() const; %Docstring Returns the selected geometry type - -:rtype: QgsWkbTypes.Type %End void attributes( QList< QPair > &at ) const; %Docstring @@ -41,28 +37,20 @@ Appends the chosen attribute names and types to at QString selectedFileFormat() const; %Docstring Returns the file format for storage - -:rtype: str %End QString selectedFileEncoding() const; %Docstring Returns the file format for storage - -:rtype: str %End QString filename() const; %Docstring Returns the name for the new layer - -:rtype: str %End QgsCoordinateReferenceSystem crs() const; %Docstring Returns the selected CRS for the new layer. -:rtype: QgsCoordinateReferenceSystem - .. seealso:: :py:func:`setCrs()` %End diff --git a/python/gui/qgsopacitywidget.sip b/python/gui/qgsopacitywidget.sip index 53ea8c2bbf02..c70e25482b6a 100644 --- a/python/gui/qgsopacitywidget.sip +++ b/python/gui/qgsopacitywidget.sip @@ -32,8 +32,6 @@ Constructor for QgsOpacityWidget. Returns the current opacity selected in the widget, where opacity ranges from 0.0 (transparent) to 1.0 (opaque). -:rtype: float - .. seealso:: :py:func:`setOpacity()` .. seealso:: :py:func:`opacityChanged()` diff --git a/python/gui/qgsoptionsdialogbase.sip b/python/gui/qgsoptionsdialogbase.sip index 1dc9cfa62a44..70f4ffdc0f5a 100644 --- a/python/gui/qgsoptionsdialogbase.sip +++ b/python/gui/qgsoptionsdialogbase.sip @@ -32,14 +32,13 @@ This uses stylesheets. explicit QgsSearchHighlightOptionWidget( QWidget *widget = 0 ); %Docstring Constructor + :param widget: the widget used to search text into %End bool isValid(); %Docstring Returns if it valid: if the widget type is handled and if the widget is not still available - -:rtype: bool %End bool searchHighlight( const QString &searchText ); @@ -47,8 +46,6 @@ Returns if it valid: if the widget type is handled and if the widget is not stil search for a text pattern and highlight the widget if the text is found :return: true if the text pattern is found -:rtype: bool - %End void reset(); @@ -59,8 +56,6 @@ reset the style to the original state QWidget *widget(); %Docstring return the widget - -:rtype: QWidget %End }; @@ -93,6 +88,7 @@ restoreOptionsBaseUi(); // restore the base ui with initOptionsBase or use this QgsOptionsDialogBase( const QString &settingsKey, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = 0, QgsSettings *settings = 0 ); %Docstring Constructor + :param settingsKey: QgsSettings subgroup key for saving/restore ui states, e.g. "ProjectProperties". :param parent: parent object (owner) :param fl: widget flags @@ -103,6 +99,7 @@ Constructor void initOptionsBase( bool restoreUi = true, const QString &title = QString() ); %Docstring Set up the base ui connections for vertical tabs. + :param restoreUi: Whether to restore the base ui at this time. :param title: the window title %End @@ -113,14 +110,13 @@ Set up the base ui connections for vertical tabs. %Docstring Restore the base ui. Sometimes useful to do at end of subclass's constructor. + :param title: the window title (it does not need to be defined if previously given to initOptionsBase(); %End bool iconOnly(); %Docstring Determine if the options list is in icon only mode - -:rtype: bool %End public slots: @@ -128,6 +124,7 @@ Determine if the options list is in icon only mode void searchText( const QString &text ); %Docstring searchText searches for a text in all the pages of the stacked widget and highlight the results + :param text: the text to search .. versionadded:: 3.0 diff --git a/python/gui/qgsoptionswidgetfactory.sip b/python/gui/qgsoptionswidgetfactory.sip index 4ad9618c762f..0b15e893727d 100644 --- a/python/gui/qgsoptionswidgetfactory.sip +++ b/python/gui/qgsoptionswidgetfactory.sip @@ -36,8 +36,6 @@ retrieved when the "help" button is clicked while this options page is active. If an empty string is returned by this method the default QGIS options help will be retrieved. - -:rtype: str %End public slots: @@ -73,8 +71,6 @@ Constructor The icon that will be shown in the UI for the panel. :return: A QIcon for the panel icon. -:rtype: QIcon - .. seealso:: :py:func:`setIcon()` %End @@ -90,8 +86,6 @@ Set the ``icon`` to show in the interface for the factory object. %Docstring The title of the panel. -:rtype: str - .. seealso:: :py:func:`setTitle()` %End @@ -105,11 +99,10 @@ Set the ``title`` for the interface. virtual QgsOptionsPageWidget *createWidget( QWidget *parent = 0 ) const = 0 /Factory/; %Docstring Factory function to create the widget on demand as needed by the options dialog. + :param parent: The parent of the widget. :return: A new widget to show as a page in the options dialog. -:rtype: QgsOptionsPageWidget - %End }; diff --git a/python/gui/qgsorderbydialog.sip b/python/gui/qgsorderbydialog.sip index c29ad124de84..f92d68c8c0e7 100644 --- a/python/gui/qgsorderbydialog.sip +++ b/python/gui/qgsorderbydialog.sip @@ -40,8 +40,6 @@ Set the order by to manage QgsFeatureRequest::OrderBy orderBy(); %Docstring Get the order by defined in the dialog - -:rtype: QgsFeatureRequest.OrderBy %End protected: diff --git a/python/gui/qgsowssourceselect.sip b/python/gui/qgsowssourceselect.sip index 13e4219d04b8..3a61e99db5b1 100644 --- a/python/gui/qgsowssourceselect.sip +++ b/python/gui/qgsowssourceselect.sip @@ -66,29 +66,21 @@ Set status message to theMessage List of image formats (encodings) supported by provider :return: list of format/label pairs -:rtype: list of QgsOWSSourceSelect.SupportedFormat - %End virtual QStringList selectedLayersFormats(); %Docstring List of formats supported for currently selected layer item(s) - -:rtype: list of str %End virtual QStringList selectedLayersCrses(); %Docstring Server CRS supported for currently selected layer item(s) - -:rtype: list of str %End virtual QStringList selectedLayersTimes(); %Docstring List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s) - -:rtype: list of str %End @@ -130,15 +122,11 @@ Clear times QString connName(); %Docstring Connection name - -:rtype: str %End QString connectionInfo(); %Docstring Connection info (uri) - -:rtype: str %End void setConnectionListPosition(); @@ -163,8 +151,6 @@ Add a few example servers to the list. QString descriptionForAuthId( const QString &authId ); %Docstring Returns a textual description for the authority id - -:rtype: str %End @@ -180,29 +166,21 @@ layer name derived from latest layer selection (updated as long it's not edited QString selectedFormat(); %Docstring Returns currently selected format - -:rtype: str %End QString selectedCrs(); %Docstring Returns currently selected Crs - -:rtype: str %End QString selectedTime(); %Docstring Returns currently selected time - -:rtype: str %End QNetworkRequest::CacheLoadControl selectedCacheLoadControl(); %Docstring Returns currently selected cache load control - -:rtype: QNetworkRequest.CacheLoadControl %End diff --git a/python/gui/qgspanelwidget.sip b/python/gui/qgspanelwidget.sip index 1712ccd0c1ad..bd99ae68b798 100644 --- a/python/gui/qgspanelwidget.sip +++ b/python/gui/qgspanelwidget.sip @@ -21,12 +21,14 @@ class QgsPanelWidget : QWidget QgsPanelWidget( QWidget *parent = 0 ); %Docstring Base class for any widget that can be shown as a inline panel + :param parent: Parent widget. %End void setPanelTitle( const QString &panelTitle ); %Docstring Set the title of the panel when shown in the interface. + :param panelTitle: The panel title. %End @@ -35,8 +37,6 @@ Set the title of the panel when shown in the interface. The title of the panel. :return: The title pf the panel. -:rtype: str - %End void connectChildPanels( const QList &panels ); @@ -45,6 +45,7 @@ Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. Use this method if you have children widgets that need to show a panel to the user. + :param panels: A list of panel widgets to connect. %End @@ -54,6 +55,7 @@ Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. Use this method if you have children widgets that need to show a panel to the user. + :param panel: The panel to connect. %End @@ -61,6 +63,7 @@ Use this method if you have children widgets that need to show a panel to the us %Docstring Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs + :param dockMode: True to enable dock mode. %End @@ -69,8 +72,6 @@ widgets and not open dialogs Return the dock mode state. :return: True if in dock mode. If in dock mode the widget -:rtype: bool - will emit the showPanel signal to handle panel opening If false it will open dialogs when openPanel is called. %End @@ -80,6 +81,7 @@ If false it will open dialogs when openPanel is called. The the auto delete property on the widget. True by default. When auto delete is enabled when a panel is removed from the stack it will be deleted. + :param autoDelete: Enable or disable auto delete on the panel. %End @@ -90,19 +92,16 @@ When auto delete is enabled when a panel is removed from the stack it will be deleted. :return: The auto delete value for the widget. -:rtype: bool - %End static QgsPanelWidget *findParentPanel( QWidget *widget ); %Docstring Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget. + :param widget: widget which may be contained within a panel widget :return: parent panel widget if found, otherwise None -:rtype: QgsPanelWidget - .. versionadded:: 3.0 %End @@ -112,6 +111,7 @@ widget. void panelAccepted( QgsPanelWidget *panel ); %Docstring Emitted when the panel is accepted by the user. + :param panel: The panel widget that was accepted. .. note:: @@ -129,6 +129,7 @@ will not emit panelAccepted when the second panel is accepted. void showPanel( QgsPanelWidget *panel ); %Docstring Emit when you require a panel to be show in the interface. + :param panel: The panel widget to show. .. note:: @@ -171,6 +172,7 @@ Widgets are normally removed form the interface using the panel manager or the c %Docstring Overridden key press event to handle the esc event on the widget. + :param event: The key event %End @@ -198,6 +200,7 @@ and only use this wrapper if you can't update your code. %Docstring Wrapper widget for existing widgets which can't have the inheritance tree changed, e.g dialogs. + :param widget: The widget to wrap. :param parent: The parent widget. %End @@ -207,8 +210,6 @@ the inheritance tree changed, e.g dialogs. Returns the internal widget that is wrapped in this panel. :return: The internal widget. Can be None. -:rtype: QWidget - %End }; diff --git a/python/gui/qgspanelwidgetstack.sip b/python/gui/qgspanelwidgetstack.sip index c121b02f1909..1a41f1f64d5a 100644 --- a/python/gui/qgspanelwidgetstack.sip +++ b/python/gui/qgspanelwidgetstack.sip @@ -27,6 +27,7 @@ class to manage the panels. %Docstring A stack widget to manage panels in the interface. Handles the open and close events for added panels. + :param parent: %End @@ -35,6 +36,7 @@ for added panels. Adds the main panel widget to the stack and selects it for the user The main widget can not be closed and only the showPanel signal is attached to handle children widget opening panels. + :param panel: The panel to set as the first widget in the stack. .. note:: @@ -53,8 +55,6 @@ The main panel widget that is set in the stack. The main widget can not be close and doesn't display a back button. :return: The main QgsPanelWidget that is active in the stack. -:rtype: QgsPanelWidget - .. seealso:: :py:func:`setMainPanel()` %End @@ -65,8 +65,6 @@ Removes the main panel widget from the stack and transfers ownsership to the caller. :return: The main widget that is set in the stack. -:rtype: QgsPanelWidget - .. note:: @@ -88,8 +86,6 @@ the widget will be deleted. %Docstring Returns the panel currently shown in the stack. -:rtype: QgsPanelWidget - .. versionadded:: 3.0 %End @@ -118,6 +114,7 @@ remains. %Docstring Show a panel in the stack widget. Will connect to the panels showPanel event to handle nested panels. Auto switches the the given panel for the user. + :param panel: The panel to show. %End @@ -125,6 +122,7 @@ nested panels. Auto switches the the given panel for the user. %Docstring Closes the panel in the widget. Will also delete the widget. This slot is normally auto connected to panelAccepted when a panel is shown. + :param panel: The panel to close. %End diff --git a/python/gui/qgspasswordlineedit.sip b/python/gui/qgspasswordlineedit.sip index 4713049bbc36..92e50fce7636 100644 --- a/python/gui/qgspasswordlineedit.sip +++ b/python/gui/qgspasswordlineedit.sip @@ -28,6 +28,7 @@ entered password. QgsPasswordLineEdit( QWidget *parent = 0, bool passwordVisible = false ); %Docstring Constructor for QgsPasswordLineEdit. + :param parent: parent widget :param passwordVisible: Initial state of the password's visibility %End @@ -35,14 +36,13 @@ Constructor for QgsPasswordLineEdit. void setShowLockIcon( bool visible ); %Docstring Define if a lock icon shall be shown on the left of the widget + :param visible: set to false to hide the lock icon %End bool showLockIcon() const; %Docstring Returns if a lock icon shall be shown on the left of the widget - -:rtype: bool %End void setPasswordVisibility( bool visible ); diff --git a/python/gui/qgspixmaplabel.sip b/python/gui/qgspixmaplabel.sip index d4ed14139878..e941aa5c38ce 100644 --- a/python/gui/qgspixmaplabel.sip +++ b/python/gui/qgspixmaplabel.sip @@ -33,8 +33,6 @@ Calculates the height for the given width. :param width: The width for the widget :return: An appropriate height -:rtype: int - %End virtual QSize sizeHint() const; @@ -44,8 +42,6 @@ An optimal size for the widget. Effectively using the height determined from the width with the given aspect ratio. :return: A size hint -:rtype: QSize - %End public slots: diff --git a/python/gui/qgspluginmanagerinterface.sip b/python/gui/qgspluginmanagerinterface.sip index e3a0ae5ec6ee..b901c3e8fe0d 100644 --- a/python/gui/qgspluginmanagerinterface.sip +++ b/python/gui/qgspluginmanagerinterface.sip @@ -39,8 +39,6 @@ refresh plugin list model (and metadata browser content if necessary) virtual const QMap *pluginMetadata( const QString &key ) const = 0; %Docstring return given plugin metadata - -:rtype: QMap %End virtual void clearRepositoryList() = 0; diff --git a/python/gui/qgspresetcolorrampdialog.sip b/python/gui/qgspresetcolorrampdialog.sip index 433ef3ccf06c..cdc7710b7891 100644 --- a/python/gui/qgspresetcolorrampdialog.sip +++ b/python/gui/qgspresetcolorrampdialog.sip @@ -24,6 +24,7 @@ A widget which allows users to modify the properties of a QgsPresetSchemeColorRa QgsPresetColorRampWidget( const QgsPresetSchemeColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsPresetColorRampWidget. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -32,14 +33,13 @@ Constructor for QgsPresetColorRampWidget. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsPresetSchemeColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsPresetSchemeColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` @@ -70,6 +70,7 @@ A dialog which allows users to modify the properties of a QgsPresetSchemeColorRa QgsPresetColorRampDialog( const QgsPresetSchemeColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsPresetColorRampDialog. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -78,14 +79,13 @@ Constructor for QgsPresetColorRampDialog. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsPresetSchemeColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsPresetSchemeColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` diff --git a/python/gui/qgsprevieweffect.sip b/python/gui/qgsprevieweffect.sip index 99747e077270..99aaec957b0b 100644 --- a/python/gui/qgsprevieweffect.sip +++ b/python/gui/qgsprevieweffect.sip @@ -34,6 +34,7 @@ color blindness modes. void setMode( PreviewMode mode ); %Docstring 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 .. versionadded:: 2.3 @@ -46,8 +47,6 @@ Sets the mode for the preview effect, which controls how the effect modifies a w Returns the mode used for the preview effect. :return: PreviewMode currently used by the effect -:rtype: PreviewMode - .. versionadded:: 2.3 diff --git a/python/gui/qgsprojectionselectiondialog.sip b/python/gui/qgsprojectionselectiondialog.sip index 56ceec4855a3..bf2d460b7adb 100644 --- a/python/gui/qgsprojectionselectiondialog.sip +++ b/python/gui/qgsprojectionselectiondialog.sip @@ -51,8 +51,6 @@ Constructor for QgsProjectionSelectionDialog. %Docstring Returns the CRS currently selected in the widget. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 .. seealso:: :py:func:`setCrs()` @@ -80,8 +78,6 @@ option is selected, calling crs() will return an invalid QgsCoordinateReferenceS Returns whether the "no/invalid" projection option is shown. If this option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setShowNoProjection()` diff --git a/python/gui/qgsprojectionselectiontreewidget.sip b/python/gui/qgsprojectionselectiontreewidget.sip index 0f16a7bac71d..4942ea060e93 100644 --- a/python/gui/qgsprojectionselectiontreewidget.sip +++ b/python/gui/qgsprojectionselectiontreewidget.sip @@ -44,8 +44,6 @@ Constructor for QgsProjectionSelectionTreeWidget. %Docstring Returns the CRS currently selected in the widget. -:rtype: QgsCoordinateReferenceSystem - .. versionadded:: 3.0 .. seealso:: :py:func:`setCrs()` @@ -75,8 +73,6 @@ Sets whether to show the bounnds preview map. Returns whether the "no/invalid" projection option is shown. If this option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setShowNoProjection()` @@ -86,8 +82,6 @@ option is selected, calling crs() will return an invalid QgsCoordinateReferenceS %Docstring Returns whether the bounds preview map is shown. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setShowBoundsMap()` @@ -99,8 +93,6 @@ Returns true if the current selection in the widget is a valid choice. Valid selections include any projection and also the "no/invalid projection" option (if setShowNoProjection() was called). Invalid selections are the group headers (such as "Geographic Coordinate Systems" - -:rtype: bool %End public slots: @@ -127,8 +119,6 @@ Sets the initial "preview" rectangle for the bounds overview map. %Docstring The initial "preview" rectangle for the bounds overview map. -:rtype: QgsRectangle - .. versionadded:: 3.0 .. seealso:: :py:func:`previewRect()` diff --git a/python/gui/qgsprojectionselectionwidget.sip b/python/gui/qgsprojectionselectionwidget.sip index d7c039d2affd..e1ce9d883c90 100644 --- a/python/gui/qgsprojectionselectionwidget.sip +++ b/python/gui/qgsprojectionselectionwidget.sip @@ -44,13 +44,12 @@ Constructor for QgsProjectionSelectionWidget Returns the currently selected CRS for the widget :return: current CRS -:rtype: QgsCoordinateReferenceSystem - %End void setOptionVisible( const CrsOption option, const bool visible ); %Docstring Sets whether a predefined CRS option should be shown in the widget. + :param option: CRS option to show/hide :param visible: whether the option should be shown @@ -61,8 +60,6 @@ Sets whether a predefined CRS option should be shown in the widget. %Docstring Returns whether the specified CRS option is visible in the widget. -:rtype: bool - .. versionadded:: 3.0 .. seealso:: :py:func:`setOptionVisible()` @@ -104,6 +101,7 @@ Emitted when the not set option is selected. void setCrs( const QgsCoordinateReferenceSystem &crs ); %Docstring Sets the current CRS for the widget + :param crs: new CRS %End @@ -111,6 +109,7 @@ Sets the current CRS for the widget %Docstring Sets the layer CRS for the widget. If set, this will be added as an option to the preset CRSes shown in the widget. + :param crs: layer CRS %End diff --git a/python/gui/qgspropertyoverridebutton.sip b/python/gui/qgspropertyoverridebutton.sip index 6935e1c8081c..c526b3bdf9eb 100644 --- a/python/gui/qgspropertyoverridebutton.sip +++ b/python/gui/qgspropertyoverridebutton.sip @@ -35,6 +35,7 @@ and composer. const QgsVectorLayer *layer = 0 ); %Docstring Constructor for QgsPropertyOverrideButton. + :param parent: parent widget :param layer: associated vector layer %End @@ -47,6 +48,7 @@ Constructor for QgsPropertyOverrideButton. bool auxiliaryStorageEnabled = false ); %Docstring Initialize a newly constructed property button (useful if button was included in a UI layout). + :param propertyKey: key for corresponding property :param property: initial value of associated property to show in widget :param definitions: properties definitions for corresponding collection @@ -61,6 +63,7 @@ Initialize a newly constructed property button (useful if button was included in bool auxiliaryStorageEnabled = false ); %Docstring Initialize a newly constructed property button (useful if button was included in a UI layout). + :param propertyKey: key for corresponding property :param property: initial value of associated property to show in widget :param definition: properties definition for button @@ -75,6 +78,7 @@ Initialize a newly constructed property button (useful if button was included in bool auxiliaryStorageEnabled = false ); %Docstring Initialize a newly constructed property button (useful if button was included in a UI layout). + :param propertyKey: key for corresponding property :param collection: associated property collection :param definitions: properties definitions for collection @@ -87,8 +91,6 @@ Initialize a newly constructed property button (useful if button was included in Returns a QgsProperty object encapsulating the current state of the widget. -:rtype: QgsProperty - .. seealso:: :py:func:`setToProperty()` %End @@ -100,15 +102,11 @@ Sets the widget to reflect the current state of a QgsProperty. int propertyKey() const; %Docstring Returns the property key linked to the button. - -:rtype: int %End bool isActive() const; %Docstring Returns true if the button has an active property. - -:rtype: bool %End QgsPropertyDefinition::DataType validDataType() const; @@ -116,24 +114,18 @@ Returns true if the button has an active property. Returns the data type which the widget will accept. This is used to filter out fields from the associated vector layer to only show fields which are compatible with the property. - -:rtype: QgsPropertyDefinition.DataType %End QString fullDescription() const; %Docstring Returns the full definition description and current definition (internally generated on a contextual basis). - -:rtype: str %End QString usageInfo() const; %Docstring Returns usage information for the property. -:rtype: str - .. seealso:: :py:func:`setUsageInfo()` %End @@ -157,8 +149,6 @@ displayed within the widget's pop up menu. Returns the vector layer associated with the button. This controls which fields are displayed within the widget's pop up menu. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setVectorLayer()` %End diff --git a/python/gui/qgsquerybuilder.sip b/python/gui/qgsquerybuilder.sip index b554e14e40e7..86b0fdac322b 100644 --- a/python/gui/qgsquerybuilder.sip +++ b/python/gui/qgsquerybuilder.sip @@ -29,6 +29,7 @@ will be returned. %Docstring This constructor is used when the query builder is called from the vector layer properties dialog + :param layer: existing vector layer :param parent: Parent widget :param fl: dialog flags @@ -40,10 +41,6 @@ vector layer properties dialog QString sql(); -%Docstring - -:rtype: str -%End void setSql( const QString &sqlStatement ); public slots: diff --git a/python/gui/qgsrasterformatsaveoptionswidget.sip b/python/gui/qgsrasterformatsaveoptionswidget.sip index 388aa5c70151..fa1e13a3e422 100644 --- a/python/gui/qgsrasterformatsaveoptionswidget.sip +++ b/python/gui/qgsrasterformatsaveoptionswidget.sip @@ -61,8 +61,6 @@ Set output raster file name %Docstring Returns list of selected options -:rtype: list of str - .. seealso:: :py:func:`setOptions()` %End @@ -99,8 +97,6 @@ and output format QString validateOptions( bool gui = true, bool reportOk = true ); %Docstring Validates options correctness - -:rtype: str %End void updateProfiles(); @@ -129,36 +125,16 @@ Reloads profiles list from QGIS settings private: QString settingsKey( QString profile ) const ; -%Docstring - -:rtype: str -%End QString currentProfileKey() const ; -%Docstring - -:rtype: str -%End QString createOptions( const QString &profile ) const ; -%Docstring - -:rtype: str -%End void deleteCreateOptions( const QString &profile ) ; void setCreateOptions() ; void setCreateOptions( const QString &profile, const QString &options ) ; void setCreateOptions( const QString &profile, const QStringList &list ) ; QStringList profiles() const ; -%Docstring - -:rtype: list of str -%End virtual bool eventFilter( QObject *obj, QEvent *event ) ; QString pseudoFormat() const ; -%Docstring - -:rtype: str -%End }; diff --git a/python/gui/qgsrasterlayersaveasdialog.sip b/python/gui/qgsrasterlayersaveasdialog.sip index 1a9d224d993b..78d6ee5ef29c 100644 --- a/python/gui/qgsrasterlayersaveasdialog.sip +++ b/python/gui/qgsrasterlayersaveasdialog.sip @@ -45,106 +45,26 @@ Constructor for QgsRasterLayerSaveAsDialog ~QgsRasterLayerSaveAsDialog(); Mode mode() const; -%Docstring - -:rtype: Mode -%End int nColumns() const; -%Docstring - -:rtype: int -%End int nRows() const; -%Docstring - -:rtype: int -%End double xResolution() const; -%Docstring - -:rtype: float -%End double yResolution() const; -%Docstring - -:rtype: float -%End int maximumTileSizeX() const; -%Docstring - -:rtype: int -%End int maximumTileSizeY() const; -%Docstring - -:rtype: int -%End bool tileMode() const; -%Docstring - -:rtype: bool -%End bool addToCanvas() const; -%Docstring - -:rtype: bool -%End QString outputFileName() const; -%Docstring - -:rtype: str -%End QString outputFormat() const; -%Docstring - -:rtype: str -%End QgsCoordinateReferenceSystem outputCrs(); -%Docstring - -:rtype: QgsCoordinateReferenceSystem -%End QStringList createOptions() const; -%Docstring - -:rtype: list of str -%End QgsRectangle outputRectangle() const; -%Docstring - -:rtype: QgsRectangle -%End QgsRasterRangeList noData() const; -%Docstring - -:rtype: QgsRasterRangeList -%End QList< int > pyramidsList() const; -%Docstring - -:rtype: list of int -%End QgsRaster::RasterBuildPyramids buildPyramidsFlag() const; -%Docstring - -:rtype: QgsRaster.RasterBuildPyramids -%End QString pyramidsResamplingMethod() const; -%Docstring - -:rtype: str -%End QgsRaster::RasterPyramidsFormat pyramidsFormat() const; -%Docstring - -:rtype: QgsRaster.RasterPyramidsFormat -%End QStringList pyramidsConfigOptions() const; -%Docstring - -:rtype: list of str -%End void hideFormat(); void hideOutput(); diff --git a/python/gui/qgsrasterpyramidsoptionswidget.sip b/python/gui/qgsrasterpyramidsoptionswidget.sip index d2e2108f223c..79bdd2e3f867 100644 --- a/python/gui/qgsrasterpyramidsoptionswidget.sip +++ b/python/gui/qgsrasterpyramidsoptionswidget.sip @@ -27,30 +27,10 @@ Constructor for QgsRasterPyramidsOptionsWidget %End QStringList configOptions() const; -%Docstring - -:rtype: list of str -%End QgsRasterFormatSaveOptionsWidget *createOptionsWidget() /Factory/; -%Docstring - -:rtype: QgsRasterFormatSaveOptionsWidget -%End const QList overviewList() const; -%Docstring - -:rtype: list of int -%End QgsRaster::RasterPyramidsFormat pyramidsFormat() const; -%Docstring - -:rtype: QgsRaster.RasterPyramidsFormat -%End QString resamplingMethod() const; -%Docstring - -:rtype: str -%End void setRasterLayer( QgsRasterLayer *rasterLayer ); void setRasterFileName( const QString &file ); diff --git a/python/gui/qgsratiolockbutton.sip b/python/gui/qgsratiolockbutton.sip index 0e05f2765496..0ab235854809 100644 --- a/python/gui/qgsratiolockbutton.sip +++ b/python/gui/qgsratiolockbutton.sip @@ -32,6 +32,7 @@ Use ``parent`` to attach a parent QWidget to the button. void setLocked( const bool locked ); %Docstring Sets whether the button state is locked. + :param locked: locked state .. seealso:: :py:func:`locked` @@ -42,8 +43,6 @@ Sets whether the button state is locked. Returns whether the button state is locked. :return: true if the button state is locked. -:rtype: bool - .. seealso:: :py:func:`setLocked` %End diff --git a/python/gui/qgsrelationeditorwidget.sip b/python/gui/qgsrelationeditorwidget.sip index 54aa42c306e9..110f31e2eac3 100644 --- a/python/gui/qgsrelationeditorwidget.sip +++ b/python/gui/qgsrelationeditorwidget.sip @@ -33,6 +33,7 @@ class QgsRelationEditorWidget : QgsCollapsibleGroupBox QgsRelationEditorWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring + :param parent: parent widget %End @@ -44,8 +45,6 @@ Define the view mode for the dual view QgsDualView::ViewMode viewMode(); %Docstring Get the view mode for the dual view - -:rtype: QgsDualView.ViewMode %End void setRelationFeature( const QgsRelation &relation, const QgsFeature &feature ); @@ -69,16 +68,12 @@ inserting and deleting entries on the intermediate table as required. %Docstring The feature selection manager is responsible for the selected features which are currently being edited. - -:rtype: QgsIFeatureSelectionManager %End bool showLabel() const; %Docstring Defines if a title label should be shown for this widget. -:rtype: bool - .. versionadded:: 2.18 %End @@ -93,8 +88,6 @@ Defines if a title label should be shown for this widget. %Docstring Determines if the "link feature" button should be shown -:rtype: bool - .. versionadded:: 2.18 %End @@ -109,8 +102,6 @@ Determines if the "link feature" button should be shown %Docstring Determines if the "unlink feature" button should be shown -:rtype: bool - .. versionadded:: 2.18 %End diff --git a/python/gui/qgsrubberband.sip b/python/gui/qgsrubberband.sip index 96c4b334e6cd..23fd91819562 100644 --- a/python/gui/qgsrubberband.sip +++ b/python/gui/qgsrubberband.sip @@ -45,6 +45,7 @@ for tracking the mouse while drawing polylines or polygons. QgsRubberBand( QgsMapCanvas *mapCanvas /TransferThis/, QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry ); %Docstring Creates a new RubberBand. + :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) %End @@ -52,12 +53,14 @@ Creates a new RubberBand. void setColor( const QColor &color ); %Docstring Sets the color for the rubberband + :param color: The color used to render this rubberband %End void setFillColor( const QColor &color ); %Docstring Sets the fill color for the rubberband + :param color: The color used to render this rubberband .. versionadded:: 2.6 @@ -66,13 +69,12 @@ Sets the fill color for the rubberband QColor fillColor() const; %Docstring Returns the current fill color. - -:rtype: QColor %End void setStrokeColor( const QColor &color ); %Docstring Sets the stroke color for the rubberband + :param color: The color used to render this rubberband .. versionadded:: 2.6 @@ -81,14 +83,13 @@ Sets the stroke color for the rubberband QColor strokeColor() const; %Docstring Returns the current stroke color. - -:rtype: QColor %End void setSecondaryStrokeColor( const QColor &color ); %Docstring Sets a secondary stroke color for the rubberband which will be drawn under the main stroke color. Set to an invalid color to avoid drawing the secondary stroke. + :param color: The color used to render a secondary stroke color to this rubberband .. versionadded:: 3.0 @@ -97,26 +98,24 @@ Set to an invalid color to avoid drawing the secondary stroke. QColor secondaryStrokeColor() const; %Docstring Returns the current secondary stroke color. - -:rtype: QColor %End void setWidth( int width ); %Docstring Sets the width of the line. Stroke width for polygon. + :param width: The width for any lines painted for this rubberband %End int width() const; %Docstring Returns the current width of the line or stroke width for polygon. - -:rtype: int %End void setIcon( IconType icon ); %Docstring Sets the icon type to highlight point geometries. + :param icon: The icon to visualize point geometries %End @@ -124,8 +123,6 @@ Sets the icon type to highlight point geometries. IconType icon() const; %Docstring Returns the current icon type to highlight point geometries. - -:rtype: IconType %End void setIconSize( int iconSize ); @@ -136,8 +133,6 @@ Sets the size of the point icons int iconSize() const; %Docstring Returns the current icon size of the point icons. - -:rtype: int %End void setLineStyle( Qt::PenStyle penStyle ); @@ -154,6 +149,7 @@ Sets the style of the brush %Docstring Clears all the geometries in this rubberband. Sets the representation type according to geometryType. + :param geometryType: Defines how the data should be drawn onto the screen. (Use Qgis.Line, Qgis.Polygon or Qgis.Point) %End @@ -162,6 +158,7 @@ Sets the representation type according to geometryType. Adds a vertex to the rubberband and update canvas. The rendering of the vertex depends on the current GeometryType and icon. If adding more points consider using update=false for better performance + :param p: The vertex/point to add :param doUpdate: Should the map canvas be updated immediately? :param geometryIndex: The index of the feature part (in case of multipart geometries) @@ -171,6 +168,7 @@ If adding more points consider using update=false for better performance %Docstring Ensures that a polygon geometry is closed and that the last vertex equals the first vertex. + :param doUpdate: set to true to update the map canvas immediately :param geometryIndex: index of the feature part (in case of multipart geometries) @@ -180,6 +178,7 @@ first vertex. void removePoint( int index = 0, bool doUpdate = true, int geometryIndex = 0 ); %Docstring Removes a vertex from the rubberband and (optionally) updates canvas. + :param index: The index of the vertex/point to remove, negative indexes start at end :param doUpdate: Should the map canvas be updated immediately? :param geometryIndex: The index of the feature part (in case of multipart geometries) @@ -205,11 +204,10 @@ not used to track the last mouse position, the first point of the rubber band ha int partSize( int geometryIndex ) const; %Docstring Returns number of vertices in feature part + :param geometryIndex: The index of the feature part (in case of multipart geometries) :return: number of vertices -:rtype: int - %End void setToGeometry( const QgsGeometry &geom, QgsVectorLayer *layer ); @@ -217,6 +215,7 @@ Returns number of vertices in feature part Sets this rubber band to the geometry of an existing feature. This is useful for feature highlighting. In contrast to addGeometry(), this method does also change the geometry type of the rubberband. + :param geom: the geometry object :param layer: the layer containing the feature, used for coord transformation to map crs. In case of 0 pointer, the coordinates are not going to be transformed. @@ -225,6 +224,7 @@ crs. In case of 0 pointer, the coordinates are not going to be transformed. void setToCanvasRectangle( QRect rect ); %Docstring Sets this rubber band to a map canvas rectangle + :param rect: rectangle in canvas coordinates %End @@ -254,6 +254,7 @@ to the canvas CRS. void setTranslationOffset( double dx, double dy ); %Docstring Adds translation to original coordinates (all in map coordinates) + :param dx: x translation :param dy: y translation %End @@ -263,8 +264,6 @@ Adds translation to original coordinates (all in map coordinates) Returns number of geometries :return: number of geometries -:rtype: int - %End int numberOfVertices() const; @@ -272,17 +271,14 @@ Returns number of geometries Returns count of vertices in all lists of mPoint :return: The total number of vertices -:rtype: int - %End const QgsPointXY *getPoint( int i, int j = 0 ) const; %Docstring Returns a vertex + :param i: The geometry index :param j: The vertex index within geometry i - -:rtype: QgsPointXY %End QgsGeometry asGeometry() const; @@ -290,8 +286,6 @@ Returns a vertex Returns the rubberband as a Geometry :return: A geometry object which reflects the current state of the rubberband. -:rtype: QgsGeometry - %End virtual void updatePosition(); @@ -303,12 +297,14 @@ Returns the rubberband as a Geometry %Docstring Paints the rubber band in response to an update event. + :param p: The QPainter object %End void drawShape( QPainter *p, const QVector &pts ); %Docstring Draws shape of the rubber band. + :param p: The QPainter object :param pts: A list of points used to draw the shape %End diff --git a/python/gui/qgsscalecombobox.sip b/python/gui/qgsscalecombobox.sip index 030d727ece60..e781e0fd03b1 100644 --- a/python/gui/qgsscalecombobox.sip +++ b/python/gui/qgsscalecombobox.sip @@ -31,8 +31,6 @@ Constructor for QgsScaleComboBox. %Docstring Returns the selected scale as a string, e.g. "1:150". -:rtype: str - .. seealso:: :py:func:`setScaleString()` %End @@ -40,8 +38,6 @@ Returns the selected scale as a string, e.g. "1:150". %Docstring Set the selected scale from a ``string``, e.g. "1:150". -:rtype: bool - .. seealso:: :py:func:`scaleString()` %End @@ -50,8 +46,6 @@ Set the selected scale from a ``string``, e.g. "1:150". Returns the selected scale as a double. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setScale()` %End @@ -61,8 +55,6 @@ Returns the minimum scale, or 0 if no minimum scale set. The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. Any scale lower than the minimum scale will automatically be converted to the minimum scale. Except for 0 which is always allowed. - -:rtype: float %End static QString toString( double scale ); @@ -72,8 +64,6 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma The returned string will be rounded (e.g. 1:1000, not 1:1000.345). -:rtype: str - .. seealso:: :py:func:`toDouble()` %End @@ -83,8 +73,6 @@ Helper function to convert a scale ``string`` to double. The returned value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. If specified, ``ok`` will be set to true if the string was successfully interpreted as a scale. -:rtype: float - .. seealso:: :py:func:`toString()` %End diff --git a/python/gui/qgsscalerangewidget.sip b/python/gui/qgsscalerangewidget.sip index 4db61d926f53..28dbd4905572 100644 --- a/python/gui/qgsscalerangewidget.sip +++ b/python/gui/qgsscalerangewidget.sip @@ -36,8 +36,6 @@ If not set, the buttons are hidden. Returns the selected minimum scale (i.e. most "zoomed out" scale), or 0 if minimum scale is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`maximumScale()` .. seealso:: :py:func:`setMinimumScale()` @@ -48,8 +46,6 @@ The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. Returns the selected maximum scale (i.e. most "zoomed in" scale), or 0 if maximum scale is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`minimumScale()` .. seealso:: :py:func:`setMaximumScale()` diff --git a/python/gui/qgsscalevisibilitydialog.sip b/python/gui/qgsscalevisibilitydialog.sip index 10cb79cbac86..bd7f6bbde6ce 100644 --- a/python/gui/qgsscalevisibilitydialog.sip +++ b/python/gui/qgsscalevisibilitydialog.sip @@ -30,8 +30,6 @@ within the dialog. bool hasScaleVisibility() const; %Docstring Return true if scale based visibilty is enabled. - -:rtype: bool %End double minimumScale() const; @@ -39,8 +37,6 @@ Return true if scale based visibilty is enabled. Returns the selected minimum scale, or 0 if minimum scale is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`maximumScale()` .. seealso:: :py:func:`setMinimumScale()` @@ -51,8 +47,6 @@ The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. Returns the selected maximum scale, or 0 if maximum scale is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`minimumScale()` .. seealso:: :py:func:`setMaximumScale()` diff --git a/python/gui/qgsscalewidget.sip b/python/gui/qgsscalewidget.sip index da7626d8ea3c..4897327c9953 100644 --- a/python/gui/qgsscalewidget.sip +++ b/python/gui/qgsscalewidget.sip @@ -48,8 +48,6 @@ Sets whether to show a button to set the scale to the current scale of the map c %Docstring Returns whether a button to set the scale from map canvas is shown or not. -:rtype: bool - .. seealso:: :py:func:`setShowCurrentScaleButton()` %End @@ -62,8 +60,6 @@ Set the map ``canvas`` associated to the current button. %Docstring Returns the selected scale as a string, e.g. "1:150". -:rtype: str - .. seealso:: :py:func:`setScaleString()` %End @@ -71,8 +67,6 @@ Returns the selected scale as a string, e.g. "1:150". %Docstring Set the selected scale from a ``string``, e.g. "1:150". -:rtype: bool - .. seealso:: :py:func:`scaleString()` %End @@ -81,8 +75,6 @@ Set the selected scale from a ``string``, e.g. "1:150". Returns the selected scale as a double. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setScale()` %End @@ -92,8 +84,6 @@ Returns the minimum scale, or 0 if no minimum scale set. The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. Any scale lower than the minimum scale will automatically be converted to the minimum scale. Except for 0 which is always allowed. - -:rtype: float %End static QString toString( double scale ); @@ -103,8 +93,6 @@ The ``scale`` value indicates the scale denominator, e.g. 1000.0 for a 1:1000 ma The returned string will be rounded (e.g. 1:1000, not 1:1000.345). -:rtype: str - .. seealso:: :py:func:`toDouble()` %End @@ -114,8 +102,6 @@ Helper function to convert a scale ``string`` to double. The returned value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. If specified, ``ok`` will be set to true if the string was successfully interpreted as a scale. -:rtype: float - .. seealso:: :py:func:`toString()` %End diff --git a/python/gui/qgsscrollarea.sip b/python/gui/qgsscrollarea.sip index 114253f194ab..39d5f66ecf30 100644 --- a/python/gui/qgsscrollarea.sip +++ b/python/gui/qgsscrollarea.sip @@ -45,8 +45,6 @@ QScrollArea itself or its child viewport(). %Docstring Returns true if a scroll recently occurred within the QScrollArea or its child viewport() - -:rtype: bool %End protected: diff --git a/python/gui/qgssearchquerybuilder.sip b/python/gui/qgssearchquerybuilder.sip index 05bd8ed0b77d..1ba1ede6f7b4 100644 --- a/python/gui/qgssearchquerybuilder.sip +++ b/python/gui/qgssearchquerybuilder.sip @@ -30,8 +30,6 @@ Constructor - takes pointer to vector layer as a parameter QString searchString(); %Docstring returns newly created search string - -:rtype: str %End void setSearchString( const QString &searchString ); diff --git a/python/gui/qgsshortcutsmanager.sip b/python/gui/qgsshortcutsmanager.sip index 6059f5694a68..c2d1b5d524a1 100644 --- a/python/gui/qgsshortcutsmanager.sip +++ b/python/gui/qgsshortcutsmanager.sip @@ -29,6 +29,7 @@ QgsGui.shortcutsManager(). QgsShortcutsManager( QObject *parent /TransferThis/ = 0, const QString &settingsRoot = "/shortcuts/" ); %Docstring Constructor for QgsShortcutsManager. + :param parent: parent object :param settingsRoot: root QgsSettings path for storing settings, e.g., "/myplugin/shortcuts". Leave as the default value to store settings alongside built in QGIS shortcuts, but care must be @@ -39,6 +40,7 @@ taken to not register actions which conflict with the built in QGIS actions. %Docstring Automatically registers all QActions and QShortcuts which are children of the passed object. + :param object: parent object containing actions and shortcuts to register :param recursive: set to true to recursively add child actions and shortcuts @@ -50,6 +52,7 @@ passed object. void registerAllChildActions( QObject *object, bool recursive = false ); %Docstring Automatically registers all QActions which are children of the passed object. + :param object: parent object containing actions to register :param recursive: set to true to recursively add child actions @@ -63,6 +66,7 @@ Automatically registers all QActions which are children of the passed object. void registerAllChildShortcuts( QObject *object, bool recursive = false ); %Docstring Automatically registers all QShortcuts which are children of the passed object. + :param object: parent object containing shortcuts to register :param recursive: set to true to recursively add child shortcuts @@ -76,13 +80,12 @@ Automatically registers all QShortcuts which are children of the passed object. bool registerAction( QAction *action, const QString &defaultShortcut = QString() ); %Docstring Registers an action with the manager so the shortcut can be configured in GUI. + :param action: action to register. The action must have a unique text string for identification. :param defaultShortcut: default key sequence for action :return: true if action was successfully registered -:rtype: bool - .. seealso:: :py:func:`registerShortcut()` @@ -94,13 +97,12 @@ identification. bool registerShortcut( QShortcut *shortcut, const QString &defaultSequence = QString() ); %Docstring Registers a QShortcut with the manager so the shortcut can be configured in GUI. + :param shortcut: QShortcut to register. The shortcut must have a unique QObject.objectName() for identification. :param defaultSequence: default key sequence for shortcut :return: true if shortcut was successfully registered -:rtype: bool - .. seealso:: :py:func:`registerAction()` @@ -110,11 +112,10 @@ identification. bool unregisterAction( QAction *action ); %Docstring Removes an action from the manager. + :param action: action to remove :return: true if action was previously registered in manager and has been removed, or -:rtype: bool - false if action was not previously registered in manager .. seealso:: :py:func:`registerAction()` @@ -125,11 +126,10 @@ false if action was not previously registered in manager bool unregisterShortcut( QShortcut *shortcut ); %Docstring Removes a shortcut from the manager. + :param shortcut: shortcut to remove :return: true if shortcut was previously registered in manager and has been removed, or -:rtype: bool - false if shortcut was not previously registered in manager .. seealso:: :py:func:`registerShortcut()` @@ -141,8 +141,6 @@ false if shortcut was not previously registered in manager %Docstring Returns a list of all actions in the manager. -:rtype: list of QAction - .. seealso:: :py:func:`listShortcuts()` .. seealso:: :py:func:`listAll()` @@ -152,8 +150,6 @@ Returns a list of all actions in the manager. %Docstring Returns a list of shortcuts in the manager. -:rtype: list of QShortcut - .. seealso:: :py:func:`listActions()` .. seealso:: :py:func:`listAll()` @@ -163,8 +159,6 @@ Returns a list of shortcuts in the manager. %Docstring Returns a list of both actions and shortcuts in the manager. -:rtype: list of QObject - .. seealso:: :py:func:`listAction()` .. seealso:: :py:func:`listShortcuts()` @@ -174,9 +168,8 @@ Returns a list of both actions and shortcuts in the manager. %Docstring Returns the default sequence for an object (either a QAction or QShortcut). An empty return string indicates no shortcut. -:param object: QAction or QShortcut to return default key sequence for -:rtype: str +:param object: QAction or QShortcut to return default key sequence for .. seealso:: :py:func:`defaultKeySequence()` %End @@ -185,9 +178,8 @@ An empty return string indicates no shortcut. %Docstring Returns the default sequence for an action. An empty return string indicates no default sequence. -:param action: action to return default key sequence for -:rtype: str +:param action: action to return default key sequence for .. seealso:: :py:func:`objectDefaultKeySequence()` %End @@ -196,9 +188,8 @@ no default sequence. %Docstring Returns the default sequence for a shortcut. An empty return string indicates no default sequence. -:param shortcut: shortcut to return default key sequence for -:rtype: str +:param shortcut: shortcut to return default key sequence for .. seealso:: :py:func:`objectDefaultKeySequence()` %End @@ -206,56 +197,51 @@ no default sequence. bool setKeySequence( const QString &name, const QString &sequence ); %Docstring Modifies an action or shortcut's key sequence. + :param name: name of action or shortcut to modify. Must match the action's QAction.text() or the shortcut's QObject.objectName() :param sequence: new shortcut key sequence -:rtype: bool - .. seealso:: :py:func:`setObjectKeySequence()` %End bool setObjectKeySequence( QObject *object, const QString &sequence ); %Docstring Modifies an object's (either a QAction or a QShortcut) key sequence. + :param object: QAction or QShortcut to modify :param sequence: new shortcut key sequence -:rtype: bool - .. seealso:: :py:func:`setKeySequence()` %End bool setKeySequence( QAction *action, const QString &sequence ); %Docstring Modifies an action's key sequence. + :param action: action to modify :param sequence: new shortcut key sequence -:rtype: bool - .. seealso:: :py:func:`setObjectKeySequence()` %End bool setKeySequence( QShortcut *shortcut, const QString &sequence ); %Docstring Modifies a shortcuts's key sequence. + :param shortcut: QShortcut to modify :param sequence: new shortcut key sequence -:rtype: bool - .. seealso:: :py:func:`setObjectKeySequence()` %End QObject *objectForSequence( const QKeySequence &sequence ) const; %Docstring Returns the object (QAction or QShortcut) matching the specified key sequence, + :param sequence: key sequence to find :return: object with matching sequence, or None if not found -:rtype: QObject - .. seealso:: :py:func:`actionForSequence()` @@ -265,9 +251,8 @@ Returns the object (QAction or QShortcut) matching the specified key sequence, QAction *actionForSequence( const QKeySequence &sequence ) const; %Docstring Returns the action which is associated for a shortcut sequence, or None if no action is associated. -:param sequence: shortcut key sequence -:rtype: QAction +:param sequence: shortcut key sequence .. seealso:: :py:func:`objectForSequence()` @@ -277,9 +262,8 @@ Returns the action which is associated for a shortcut sequence, or None if no ac QShortcut *shortcutForSequence( const QKeySequence &sequence ) const; %Docstring Returns the shortcut which is associated for a key sequence, or None if no shortcut is associated. -:param sequence: shortcut key sequence -:rtype: QShortcut +:param sequence: shortcut key sequence .. seealso:: :py:func:`objectForSequence()` @@ -289,9 +273,8 @@ Returns the shortcut which is associated for a key sequence, or None if no short QAction *actionByName( const QString &name ) const; %Docstring Returns an action by its name, or None if nothing found. -:param name: action name. Must match QAction's text. -:rtype: QAction +:param name: action name. Must match QAction's text. .. seealso:: :py:func:`shortcutByName()` %End @@ -299,9 +282,8 @@ Returns an action by its name, or None if nothing found. QShortcut *shortcutByName( const QString &name ) const; %Docstring Returns a shortcut by its name, or None if nothing found -:param name: shortcut name. Must match QShortcut's QObject.objectName() property. -:rtype: QShortcut +:param name: shortcut name. Must match QShortcut's QObject.objectName() property. .. seealso:: :py:func:`actionByName()` %End @@ -309,8 +291,6 @@ Returns a shortcut by its name, or None if nothing found QString settingsPath() const; %Docstring Returns the root settings path used to store shortcut customisation. - -:rtype: str %End }; diff --git a/python/gui/qgsslider.sip b/python/gui/qgsslider.sip index f1ecfd6861ef..aeba2246dd55 100644 --- a/python/gui/qgsslider.sip +++ b/python/gui/qgsslider.sip @@ -32,10 +32,6 @@ Constructor for QgsSlider void setSingleStep( const QVariant &step ); void setValue( const QVariant &value ); QVariant variantValue() const; -%Docstring - -:rtype: QVariant -%End signals: void valueChanged( const QVariant & ); diff --git a/python/gui/qgssnapindicator.sip b/python/gui/qgssnapindicator.sip index 2a3dbed2a82c..40f30e11f04e 100644 --- a/python/gui/qgssnapindicator.sip +++ b/python/gui/qgssnapindicator.sip @@ -36,8 +36,6 @@ Sets snapping match that should be displayed in map canvas. Invalid match hides QgsPointLocator::Match match() const; %Docstring Returns currently displayed snapping match - -:rtype: QgsPointLocator.Match %End void setVisible( bool visible = true ); @@ -47,17 +45,11 @@ Sets whether the snapping indicator is visible bool isVisible() const; %Docstring Returns whether the snapping indicator is visible - -:rtype: bool %End private: QgsSnapIndicator( const QgsSnapIndicator &rh ); QgsSnapIndicator &operator=( const QgsSnapIndicator & ); -%Docstring - -:rtype: QgsSnapIndicator -%End }; /************************************************************************ diff --git a/python/gui/qgssourceselectprovider.sip b/python/gui/qgssourceselectprovider.sip index 4706051dced3..f0995d08a17b 100644 --- a/python/gui/qgssourceselectprovider.sip +++ b/python/gui/qgssourceselectprovider.sip @@ -36,8 +36,6 @@ This is the interface for those who want to add entries to the QgsDataSourceMana virtual QString providerKey() const = 0; %Docstring Data Provider key - -:rtype: str %End virtual QString name() const; @@ -47,15 +45,11 @@ a particular source select in case the provider has more than one, it should be unique among all providers. The default implementation returns the providerKey() - -:rtype: str %End virtual QString text() const = 0; %Docstring Text for the menu item entry, it will be visible to the user so make sure it's translatable - -:rtype: str %End virtual QString toolTip() const; @@ -63,31 +57,23 @@ Text for the menu item entry, it will be visible to the user so make sure it's t Text for the tooltip menu item entry, it will be visible to the user so make sure it's translatable The default implementation returns an empty string. - -:rtype: str %End virtual QIcon icon() const = 0; %Docstring Creates a new instance of an QIcon for the menu item entry - -:rtype: QIcon %End virtual int ordering( ) const; %Docstring Ordering: the source select provider registry will be able to sort the source selects (ascending) using this integer value - -:rtype: int %End virtual QgsAbstractDataSourceWidget *createDataSourceWidget( QWidget *parent = 0, Qt::WindowFlags fl = Qt::Widget, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Embedded ) const = 0 /Factory/; %Docstring Create a new instance of QgsAbstractDataSourceWidget (or null). Caller takes responsibility of deleting created. - -:rtype: QgsAbstractDataSourceWidget %End }; diff --git a/python/gui/qgssourceselectproviderregistry.sip b/python/gui/qgssourceselectproviderregistry.sip index 8d118db2a814..fbb62c8f9cd4 100644 --- a/python/gui/qgssourceselectproviderregistry.sip +++ b/python/gui/qgssourceselectproviderregistry.sip @@ -42,8 +42,6 @@ Constructor for QgsSourceSelectProviderRegistry. QList< QgsSourceSelectProvider *> providers(); %Docstring Get list of available providers - -:rtype: list of QgsSourceSelectProvider %End void addProvider( QgsSourceSelectProvider *provider /Transfer/ ); @@ -56,22 +54,16 @@ Add a ``provider`` implementation. Takes ownership of the object. Remove ``provider`` implementation from the list (``provider`` object is deleted) :return: true if the provider was actually removed and deleted -:rtype: bool - %End QgsSourceSelectProvider *providerByName( const QString &name ); %Docstring Return a provider by ``name`` or None if not found - -:rtype: QgsSourceSelectProvider %End QList providersByKey( const QString &providerKey ); %Docstring Return a (possibly empty) list of providers by data ``providerkey`` - -:rtype: list of QgsSourceSelectProvider %End diff --git a/python/gui/qgsstatusbar.sip b/python/gui/qgsstatusbar.sip index a809869b14bd..cc85e5ec3b6c 100644 --- a/python/gui/qgsstatusbar.sip +++ b/python/gui/qgsstatusbar.sip @@ -65,8 +65,6 @@ widget itself is not deleted. %Docstring Returns the current message shown in the status bar. -:rtype: str - .. seealso:: :py:func:`showMessage()` %End diff --git a/python/gui/qgssublayersdialog.sip b/python/gui/qgssublayersdialog.sip index 6d0c1c9701fa..f5af09ed2e97 100644 --- a/python/gui/qgssublayersdialog.sip +++ b/python/gui/qgssublayersdialog.sip @@ -54,8 +54,6 @@ Populate the table with layers %Docstring Returns list of selected layers -:rtype: LayerDefinitionList - .. versionadded:: 2.16 %End @@ -70,8 +68,6 @@ Set if we should display the add to group checkbox %Docstring If we should display the add to group checkbox -:rtype: bool - .. versionadded:: 3.0 %End @@ -79,8 +75,6 @@ If we should display the add to group checkbox %Docstring If we should add layers in a group -:rtype: bool - .. versionadded:: 3.0 %End @@ -88,8 +82,6 @@ If we should add layers in a group %Docstring Return column with count or -1 -:rtype: int - .. versionadded:: 3.0 %End diff --git a/python/gui/qgssubstitutionlistwidget.sip b/python/gui/qgssubstitutionlistwidget.sip index 38cdbea37cb9..b103741dd255 100644 --- a/python/gui/qgssubstitutionlistwidget.sip +++ b/python/gui/qgssubstitutionlistwidget.sip @@ -27,12 +27,14 @@ options for exporting and importing substitution lists. QgsSubstitutionListWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSubstitutionListWidget. + :param parent: parent widget %End void setSubstitutions( const QgsStringReplacementCollection &substitutions ); %Docstring Sets the list of substitutions to show in the widget. + :param substitutions: substitution list .. seealso:: :py:func:`substitutions()` @@ -42,8 +44,6 @@ Sets the list of substitutions to show in the widget. %Docstring Returns the list of substitutions currently defined by the widget. -:rtype: QgsStringReplacementCollection - .. seealso:: :py:func:`setSubstitutions()` %End @@ -75,12 +75,14 @@ options for exporting and importing substitution lists. QgsSubstitutionListDialog( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSubstitutionListDialog. + :param parent: parent widget %End void setSubstitutions( const QgsStringReplacementCollection &substitutions ); %Docstring Sets the list of substitutions to show in the dialog. + :param substitutions: substitution list .. seealso:: :py:func:`substitutions()` @@ -90,8 +92,6 @@ Sets the list of substitutions to show in the dialog. %Docstring Returns the list of substitutions currently defined by the dialog. -:rtype: QgsStringReplacementCollection - .. seealso:: :py:func:`setSubstitutions()` %End diff --git a/python/gui/qgssymbolbutton.sip b/python/gui/qgssymbolbutton.sip index 79f8836df471..dee46be0e625 100644 --- a/python/gui/qgssymbolbutton.sip +++ b/python/gui/qgssymbolbutton.sip @@ -48,8 +48,6 @@ to a default symbol style of the new type. %Docstring Returns the symbol type which the button requires. -:rtype: QgsSymbol.SymbolType - .. seealso:: :py:func:`setSymbolType()` %End @@ -64,8 +62,6 @@ Sets the ``title`` for the symbol settings dialog window. %Docstring Returns the title for the symbol settings dialog window. -:rtype: str - .. seealso:: :py:func:`setDialogTitle()` %End @@ -73,8 +69,6 @@ Returns the title for the symbol settings dialog window. %Docstring Returns the current symbol defined by the button. -:rtype: QgsSymbol - .. seealso:: :py:func:`setSymbol()` .. seealso:: :py:func:`changed()` @@ -85,8 +79,6 @@ Returns the current symbol defined by the button. %Docstring Returns the map canvas associated with the widget. -:rtype: QgsMapCanvas - .. seealso:: :py:func:`setMapCanvas()` %End @@ -102,8 +94,6 @@ widget to fetch current settings from the map canvas, such as current scale. %Docstring Returns the layer associated with the widget. -:rtype: QgsVectorLayer - .. seealso:: :py:func:`setLayer()` %End diff --git a/python/gui/qgstablewidgetitem.sip b/python/gui/qgstablewidgetitem.sip index 414fc96ad5e8..36faafd836a2 100644 --- a/python/gui/qgstablewidgetitem.sip +++ b/python/gui/qgstablewidgetitem.sip @@ -40,8 +40,6 @@ By default this will be set to Qt.DisplayRole %Docstring Get the role by which the items should be sorted. By default this will be Qt.DisplayRole - -:rtype: int %End virtual bool operator <( const QTableWidgetItem &other ) const; diff --git a/python/gui/qgstabwidget.sip b/python/gui/qgstabwidget.sip index 3fdedf768d22..cd8a213ffc6f 100644 --- a/python/gui/qgstabwidget.sip +++ b/python/gui/qgstabwidget.sip @@ -55,8 +55,6 @@ Returns the index of the tab with the given widget. This index is not the same as the one provided to insertTab and removeTab since these methods are not aware of hidden tabs. -:rtype: int - .. versionadded:: 3.0 %End diff --git a/python/gui/qgstaskmanagerwidget.sip b/python/gui/qgstaskmanagerwidget.sip index 6900a9b2905f..2a6d0d092cb4 100644 --- a/python/gui/qgstaskmanagerwidget.sip +++ b/python/gui/qgstaskmanagerwidget.sip @@ -27,6 +27,7 @@ A widget which displays tasks from a QgsTaskManager and allows for interaction w QgsTaskManagerWidget( QgsTaskManager *manager, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsTaskManagerWidget + :param manager: task manager associated with widget :param parent: parent widget %End diff --git a/python/gui/qgstextformatwidget.sip b/python/gui/qgstextformatwidget.sip index 29a077d81484..39f16a21cdcf 100644 --- a/python/gui/qgstextformatwidget.sip +++ b/python/gui/qgstextformatwidget.sip @@ -37,6 +37,7 @@ of Labeling. QgsTextFormatWidget( const QgsTextFormat &format = QgsTextFormat(), QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsTextFormatWidget. + :param format: initial formatting settings to show in widget :param mapCanvas: associated map canvas :param parent: parent widget @@ -47,8 +48,6 @@ Constructor for QgsTextFormatWidget. QgsTextFormat format() const; %Docstring Returns the current formatting settings defined by the widget. - -:rtype: QgsTextFormat %End public slots: @@ -56,6 +55,7 @@ Returns the current formatting settings defined by the widget. void setDockMode( bool enabled ); %Docstring Sets whether the widget should be shown in a compact dock mode. + :param enabled: set to true to show in dock mode. %End @@ -77,6 +77,7 @@ Emitted when the text format defined by the widget changes QgsTextFormatWidget( QgsMapCanvas *mapCanvas, QWidget *parent /TransferThis/, Mode mode ); %Docstring Constructor for QgsTextFormatWidget. + :param mapCanvas: associated map canvas :param parent: parent widget :param mode: widget mode @@ -85,18 +86,21 @@ Constructor for QgsTextFormatWidget. void updateWidgetForFormat( const QgsTextFormat &format ); %Docstring Updates the widget's state to reflect the settings in a QgsTextFormat. + :param format: source format %End void setPreviewBackground( const QColor &color ); %Docstring Sets the background color for the text preview widget. + :param color: background color %End void enableDataDefinedAlignment( bool enable ); %Docstring Controls whether data defined alignment buttons are enabled. + :param enable: set to true to enable alignment controls %End @@ -137,6 +141,7 @@ a QgsTextFormat, including shadow, background and buffer. QgsTextFormatDialog( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); %Docstring Constructor for QgsTextFormatDialog. + :param format: initial format settings to show in dialog :param mapCanvas: optional associated map canvas :param parent: parent widget @@ -148,8 +153,6 @@ Constructor for QgsTextFormatDialog. QgsTextFormat format() const; %Docstring Returns the current formatting settings defined by the widget. - -:rtype: QgsTextFormat %End }; @@ -175,6 +178,7 @@ a QgsTextFormat, including shadow, background and buffer. QgsTextFormatPanelWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsTextFormatPanelWidget. + :param format: initial format settings to show in dialog :param mapCanvas: optional associated map canvas :param parent: parent widget @@ -183,8 +187,6 @@ Constructor for QgsTextFormatPanelWidget. QgsTextFormat format() const; %Docstring Returns the current formatting settings defined by the widget. - -:rtype: QgsTextFormat %End virtual void setDockMode( bool dockMode ); diff --git a/python/gui/qgstextpreview.sip b/python/gui/qgstextpreview.sip index 975a3395e693..b0d38455ee16 100644 --- a/python/gui/qgstextpreview.sip +++ b/python/gui/qgstextpreview.sip @@ -32,6 +32,7 @@ the scale and map units must be set by calling setScale() and setMapUnits(). QgsTextPreview( QWidget *parent = 0 ); %Docstring Constructor for QgsTextPreview + :param parent: parent widget %End @@ -41,6 +42,7 @@ Constructor for QgsTextPreview void setFormat( const QgsTextFormat &format ); %Docstring Sets the text format for previewing in the widget. + :param format: text format .. seealso:: :py:func:`format()` @@ -50,8 +52,6 @@ Sets the text format for previewing in the widget. %Docstring Returns the text format used for previewing text in the widget. -:rtype: QgsTextFormat - .. seealso:: :py:func:`setFormat()` %End @@ -70,8 +70,6 @@ The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. Returns the scale used for previewing format sizes in map units. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. -:rtype: float - .. seealso:: :py:func:`setScale()` .. seealso:: :py:func:`mapUnits()` @@ -80,6 +78,7 @@ The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. void setMapUnits( QgsUnitTypes::DistanceUnit unit ); %Docstring Sets the map unit type for previewing format sizes in map units. + :param unit: map units .. seealso:: :py:func:`mapUnits()` @@ -91,8 +90,6 @@ Sets the map unit type for previewing format sizes in map units. %Docstring Returns the map unit type used for previewing format sizes in map units. -:rtype: QgsUnitTypes.DistanceUnit - .. seealso:: :py:func:`setMapUnits()` .. seealso:: :py:func:`scale()` diff --git a/python/gui/qgstreewidgetitem.sip b/python/gui/qgstreewidgetitem.sip index 8283ace1a30b..78775cefa13e 100644 --- a/python/gui/qgstreewidgetitem.sip +++ b/python/gui/qgstreewidgetitem.sip @@ -29,6 +29,7 @@ also correctly handles sorting numeric or mixed text and numeric values. explicit QgsTreeWidgetItem( QTreeWidget *view /TransferThis/, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param view: parent QTreeWidget view :param type: item type %End @@ -36,12 +37,14 @@ Constructor for QgsTreeWidgetItem explicit QgsTreeWidgetItem( int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param type: item type %End QgsTreeWidgetItem( const QStringList &strings, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param strings: list of strings containing text for each column in the item :param type: item type %End @@ -49,6 +52,7 @@ Constructor for QgsTreeWidgetItem QgsTreeWidgetItem( QTreeWidget *view /TransferThis/, const QStringList &strings, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param view: parent QTreeWidget view :param strings: list of strings containing text for each column in the item :param type: item type @@ -57,6 +61,7 @@ Constructor for QgsTreeWidgetItem QgsTreeWidgetItem( QTreeWidget *view /TransferThis/, QTreeWidgetItem *after, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param view: parent QTreeWidget view :param after: QTreeWidgetItem to place insert item after in the view :param type: item type @@ -65,6 +70,7 @@ Constructor for QgsTreeWidgetItem explicit QgsTreeWidgetItem( QTreeWidgetItem *parent /TransferThis/, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param parent: QTreeWidgetItem item :param type: item type %End @@ -72,6 +78,7 @@ Constructor for QgsTreeWidgetItem QgsTreeWidgetItem( QTreeWidgetItem *parent /TransferThis/, const QStringList &strings, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param parent: QTreeWidgetItem item :param strings: list of strings containing text for each column in the item :param type: item type @@ -80,6 +87,7 @@ Constructor for QgsTreeWidgetItem QgsTreeWidgetItem( QTreeWidgetItem *parent /TransferThis/, QTreeWidgetItem *after, int type = Type ); %Docstring Constructor for QgsTreeWidgetItem + :param parent: QTreeWidgetItem item :param after: QTreeWidgetItem to place insert item after in the view :param type: item type @@ -90,6 +98,7 @@ Constructor for QgsTreeWidgetItem 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 text will be used when sorting. + :param column: column index :param value: sort value @@ -102,8 +111,6 @@ Returns the custom sort data for a specified column. If set, this value will be sorting the item instead of the item's display text. If not set, the item's display text will be used when sorting. -:rtype: QVariant - .. seealso:: :py:func:`setSortData()` %End @@ -111,6 +118,7 @@ text will be used when sorting. %Docstring Sets a the item to display always on top of other items in the widget, regardless of the sort column and sort or display value for the item. + :param priority: priority for sorting always on top items. Items with a lower priority will be placed above items with a higher priority. @@ -123,8 +131,6 @@ Returns the item's priority when it is set to show always on top. Items with a l be placed above items with a higher priority. :return: priority, or -1 if item is not set to show always on top -:rtype: int - .. seealso:: :py:func:`setAlwaysOnTopPriority()` %End @@ -134,16 +140,12 @@ be placed above items with a higher priority. %Docstring Returns true if this item should appear before another item when sorting a list of items. - -:rtype: bool %End bool operator>=( const QTreeWidgetItem &other ) const; %Docstring Returns true if this item should appear after another item when sorting a list of items. - -:rtype: bool %End }; @@ -164,6 +166,7 @@ Custom QgsTreeWidgetItem with extra signals when item is edited. explicit QgsTreeWidgetItemObject( int type = Type ); %Docstring Constructor for QgsTreeWidgetItemObject + :param type: item type %End diff --git a/python/gui/qgsunitselectionwidget.sip b/python/gui/qgsunitselectionwidget.sip index e15f5b399d12..397d11691e82 100644 --- a/python/gui/qgsunitselectionwidget.sip +++ b/python/gui/qgsunitselectionwidget.sip @@ -31,6 +31,7 @@ QgsMapUnitScale object. QgsMapUnitScaleWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsMapUnitScaleWidget. + :param parent: parent widget %End @@ -39,8 +40,6 @@ Constructor for QgsMapUnitScaleWidget. Returns a QgsMapUnitScale representing the settings shown in the widget. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setMapUnitScale()` .. seealso:: :py:func:`mapUnitScaleChanged()` @@ -50,6 +49,7 @@ widget. %Docstring Updates the widget to reflect the settings from the specified QgsMapUnitScale object. + :param scale: map unit scale to show in widget .. seealso:: :py:func:`mapUnitScale()` @@ -61,6 +61,7 @@ QgsMapUnitScale object. %Docstring Sets the map canvas associated with the widget. This allows the widget to retrieve the current map scale from the canvas. + :param canvas: map canvas %End @@ -69,6 +70,7 @@ widget to retrieve the current map scale from the canvas. void mapUnitScaleChanged( const QgsMapUnitScale &scale ); %Docstring Emitted when the settings in the widget are modified. + :param scale: QgsMapUnitScale reflecting new settings from the widget %End @@ -94,6 +96,7 @@ QgsMapUnitScale object. QgsMapUnitScaleDialog( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsMapUnitScaleDialog. + :param parent: parent widget %End @@ -102,8 +105,6 @@ Constructor for QgsMapUnitScaleDialog. Returns a QgsMapUnitScale representing the settings shown in the dialog. -:rtype: QgsMapUnitScale - .. seealso:: :py:func:`setMapUnitScale()` %End @@ -111,6 +112,7 @@ dialog. %Docstring Updates the dialog to reflect the settings from the specified QgsMapUnitScale object. + :param scale: map unit scale to show in dialog .. seealso:: :py:func:`mapUnitScale()` @@ -120,6 +122,7 @@ QgsMapUnitScale object. %Docstring Sets the map canvas associated with the dialog. This allows the dialog to retrieve the current map scale from the canvas. + :param canvas: map canvas .. versionadded:: 2.12 @@ -147,12 +150,14 @@ adjustment of minimum and maximum scaling. QgsUnitSelectionWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsUnitSelectionWidget. + :param parent: parent widget %End void setUnits( const QStringList &units, int mapUnitIdx ); %Docstring 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 :param mapUnitIdx: specifies which entry corresponds to the map units, or -1 if none %End @@ -160,6 +165,7 @@ Sets the units which the user can choose from in the combobox. void setUnits( const QgsUnitTypes::RenderUnitList &units ); %Docstring Sets the units which the user can choose from in the combobox. Clears any existing units. + :param units: list of valid units .. versionadded:: 2.9 @@ -168,8 +174,6 @@ Sets the units which the user can choose from in the combobox. Clears any existi int getUnit() const; %Docstring Get the selected unit index - -:rtype: int %End QgsUnitTypes::RenderUnit unit() const; @@ -177,8 +181,6 @@ Get the selected unit index Returns the current predefined selected unit (if applicable). :return: selected output unit, or QgsUnitTypes.RenderUnknownUnit if the widget was populated with custom unit types -:rtype: QgsUnitTypes.RenderUnit - .. versionadded:: 2.9 %End @@ -186,6 +188,7 @@ Returns the current predefined selected unit (if applicable). void setUnit( int unitIndex ) /PyName=setUnitIndex/; %Docstring Sets the selected unit index + :param unitIndex: index of unit to set as current .. note:: @@ -196,14 +199,13 @@ Sets the selected unit index void setUnit( QgsUnitTypes::RenderUnit unit ); %Docstring Sets the selected unit + :param unit: predefined unit to set as current %End QgsMapUnitScale getMapUnitScale() const; %Docstring Returns the map unit scale - -:rtype: QgsMapUnitScale %End void setMapUnitScale( const QgsMapUnitScale &scale ); @@ -215,6 +217,7 @@ Sets the map unit scale %Docstring Sets the map canvas associated with the widget. This allows the widget to retrieve the current map scale from the canvas. + :param canvas: map canvas .. versionadded:: 2.12 diff --git a/python/gui/qgsuserinputdockwidget.sip b/python/gui/qgsuserinputdockwidget.sip index 62ad7ef0fbd0..639ce25957ae 100644 --- a/python/gui/qgsuserinputdockwidget.sip +++ b/python/gui/qgsuserinputdockwidget.sip @@ -35,6 +35,7 @@ Constructor for QgsUserInputDockWidget void addUserInputWidget( QWidget *widget ); %Docstring Add a widget to be displayed in the dock. + :param widget: widget to add. Ownership is not transferred. %End diff --git a/python/gui/qgsvariableeditorwidget.sip b/python/gui/qgsvariableeditorwidget.sip index d489575643f1..e6e6c42b73c8 100644 --- a/python/gui/qgsvariableeditorwidget.sip +++ b/python/gui/qgsvariableeditorwidget.sip @@ -28,6 +28,7 @@ variables from a QgsExpressionContext. QgsVariableEditorWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsVariableEditorWidget. + :param parent: parent widget %End @@ -38,6 +39,7 @@ Constructor for QgsVariableEditorWidget. Overwrites the QgsExpressionContext for the widget. Setting a context allows the widget to show all inherited variables for the context, and highlight any overridden variables within scopes. + :param context: expression context .. seealso:: :py:func:`context()` @@ -48,8 +50,6 @@ and highlight any overridden variables within scopes. Returns the current expression context for the widget. QgsVariableEditorWidget widgets are created with an empty context by default. -:rtype: QgsExpressionContext - .. seealso:: :py:func:`setContext()` %End @@ -57,6 +57,7 @@ are created with an empty context by default. %Docstring Sets the editable scope for the widget. Only variables from the editable scope can be modified by users. + :param scopeIndex: index of current editable scope. Set to -1 to disable editing and make the widget read-only. @@ -68,8 +69,6 @@ editing and make the widget read-only. Returns the current editable scope for the widget. :return: editable scope, or 0 if no editable scope is set -:rtype: QgsExpressionContextScope - .. seealso:: :py:func:`setEditableScopeIndex()` %End @@ -79,6 +78,7 @@ Returns the current editable scope for the widget. Sets the setting group for the widget. QgsVariableEditorWidget widgets with the same setting group will synchronise their settings, e.g., the size of columns in the tree widget. + :param group: setting group .. seealso:: :py:func:`settingGroup()` @@ -91,8 +91,6 @@ the same setting group will synchronise their settings, e.g., the size of columns in the tree widget. :return: setting group name -:rtype: str - .. seealso:: :py:func:`setSettingGroup()` %End @@ -102,8 +100,6 @@ of columns in the tree widget. Returns a map variables set within the editable scope. Read only variables are not returned. This method can be used to retrieve the variables edited an added by users via the widget. - -:rtype: QVariantMap %End public slots: diff --git a/python/gui/qgsvertexmarker.sip b/python/gui/qgsvertexmarker.sip index 60b0d2360ab6..f1440e747334 100644 --- a/python/gui/qgsvertexmarker.sip +++ b/python/gui/qgsvertexmarker.sip @@ -62,8 +62,6 @@ Sets the stroke ``color`` for the marker. %Docstring Returns the stroke color for the marker. -:rtype: QColor - .. seealso:: :py:func:`setColor()` .. seealso:: :py:func:`fillColor()` @@ -88,8 +86,6 @@ applies to some icon types. Returns the fill ``color`` for the marker. This setting only applies to some icon types. -:rtype: QColor - .. versionadded:: 3.0 .. seealso:: :py:func:`setFillColor()` diff --git a/python/gui/qgsvscrollarea.sip b/python/gui/qgsvscrollarea.sip index 0e3fbe30e4a9..2b3cb21821d7 100644 --- a/python/gui/qgsvscrollarea.sip +++ b/python/gui/qgsvscrollarea.sip @@ -26,6 +26,7 @@ scrollbar and fits the width to the contents. QgsVScrollArea( QWidget *parent = 0 ); %Docstring QgsVScrollArea + :param parent: The parent widget %End diff --git a/python/gui/raster/qgshillshaderendererwidget.sip b/python/gui/raster/qgshillshaderendererwidget.sip index 85bdb1dafb69..e9ba9ee1a9ce 100644 --- a/python/gui/raster/qgshillshaderendererwidget.sip +++ b/python/gui/raster/qgshillshaderendererwidget.sip @@ -27,6 +27,7 @@ class QgsHillshadeRendererWidget: QgsRasterRendererWidget QgsHillshadeRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() ); %Docstring Renderer widget for the hill shade renderer. + :param layer: The layer attached for this widget. :param extent: The current extent. %End @@ -34,8 +35,6 @@ class QgsHillshadeRendererWidget: QgsRasterRendererWidget static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/; %Docstring Factory method to create the renderer for this type. - -:rtype: QgsRasterRendererWidget %End virtual QgsRasterRenderer *renderer(); @@ -44,13 +43,12 @@ Factory method to create the renderer for this type. The renderer for the widget. :return: A new renderer for the the config in the widget -:rtype: QgsRasterRenderer - %End void setFromRenderer( const QgsRasterRenderer *renderer ); %Docstring Set the widget state from the given renderer. + :param renderer: The renderer to take the state from. %End @@ -58,8 +56,6 @@ Factory method to create the renderer for this type. %Docstring Returns the direction of the light over the raster between 0-360. -:rtype: float - .. seealso:: :py:func:`setAzimuth()` %End @@ -67,8 +63,6 @@ Returns the direction of the light over the raster between 0-360. %Docstring Returns the angle of the light source over the raster. -:rtype: float - .. seealso:: :py:func:`setAltitude()` %End @@ -76,8 +70,6 @@ Returns the angle of the light source over the raster. %Docstring Returns the Z scaling factor. -:rtype: float - .. seealso:: :py:func:`setZFactor()` %End @@ -85,8 +77,6 @@ Returns the Z scaling factor. %Docstring Returns true if the renderer should use the multi-directional hillshade algorithm. -:rtype: bool - .. seealso:: :py:func:`setMultiDirectional()` %End @@ -95,6 +85,7 @@ Returns true if the renderer should use the multi-directional hillshade algorith void setAltitude( double altitude ); %Docstring Set the altitude of the light source + :param altitude: the altitude .. seealso:: :py:func:`altitude()` @@ -103,6 +94,7 @@ Returns true if the renderer should use the multi-directional hillshade algorith void setAzimuth( double azimuth ); %Docstring Set the azimuth of the light source. + :param azimuth: The azimuth of the light source, between 0 and 360.0 .. seealso:: :py:func:`azimuth()` @@ -111,6 +103,7 @@ Returns true if the renderer should use the multi-directional hillshade algorith void setZFactor( double zfactor ); %Docstring Set the Z scaling factor of the result image. + :param zfactor: The z factor .. seealso:: :py:func:`zFactor()` @@ -119,6 +112,7 @@ Returns true if the renderer should use the multi-directional hillshade algorith void setMultiDirectional( bool isMultiDirectional ); %Docstring Sets whether to render using a multi-directional hillshade algorithm. + :param isMultiDirectional: set to true to use multi directional rendering .. seealso:: :py:func:`multiDirectional()` diff --git a/python/gui/raster/qgsmultibandcolorrendererwidget.sip b/python/gui/raster/qgsmultibandcolorrendererwidget.sip index 88ec9a59ae05..09da0b0c7ffe 100644 --- a/python/gui/raster/qgsmultibandcolorrendererwidget.sip +++ b/python/gui/raster/qgsmultibandcolorrendererwidget.sip @@ -19,10 +19,6 @@ class QgsMultiBandColorRendererWidget: QgsRasterRendererWidget public: QgsMultiBandColorRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() ); static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ); -%Docstring - -:rtype: QgsRasterRendererWidget -%End virtual QgsRasterRenderer *renderer(); diff --git a/python/gui/raster/qgspalettedrendererwidget.sip b/python/gui/raster/qgspalettedrendererwidget.sip index 58d455eb59aa..85b72bb160a3 100644 --- a/python/gui/raster/qgspalettedrendererwidget.sip +++ b/python/gui/raster/qgspalettedrendererwidget.sip @@ -22,10 +22,6 @@ class QgsPalettedRendererWidget: QgsRasterRendererWidget QgsPalettedRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() ); ~QgsPalettedRendererWidget(); static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/; -%Docstring - -:rtype: QgsRasterRendererWidget -%End virtual QgsRasterRenderer *renderer(); diff --git a/python/gui/raster/qgsrasterbandcombobox.sip b/python/gui/raster/qgsrasterbandcombobox.sip index 92c6823fe047..fd35f83c0af8 100644 --- a/python/gui/raster/qgsrasterbandcombobox.sip +++ b/python/gui/raster/qgsrasterbandcombobox.sip @@ -31,8 +31,6 @@ Constructor for QgsRasterBandComboBox. %Docstring Returns the layer currently associated with the combobox. -:rtype: QgsRasterLayer - .. seealso:: :py:func:`setLayer()` %End @@ -41,8 +39,6 @@ Returns the layer currently associated with the combobox. Returns the current band number selected in the combobox, or -1 if no band is selected. -:rtype: int - .. seealso:: :py:func:`setBand()` %End @@ -50,8 +46,6 @@ if no band is selected. %Docstring Returns true if the combo box is showing the "not set" option. -:rtype: bool - .. seealso:: :py:func:`setShowNotSetOption()` %End diff --git a/python/gui/raster/qgsrasterhistogramwidget.sip b/python/gui/raster/qgsrasterhistogramwidget.sip index d502c531aa26..80895b008833 100644 --- a/python/gui/raster/qgsrasterhistogramwidget.sip +++ b/python/gui/raster/qgsrasterhistogramwidget.sip @@ -31,8 +31,6 @@ Constructor for QgsRasterHistogramWidget, for the specified raster ``layer``. bool histoSaveAsImage( const QString &filename, int width = 600, int height = 600, int quality = -1 ); %Docstring Save the histogram as an image to disk - -:rtype: bool %End void setRendererWidget( const QString &name, QgsRasterRendererWidget *rendererWidget = 0 ); @@ -48,8 +46,6 @@ Activate the histogram widget bool computeHistogram( bool forceComputeFlag ); %Docstring Compute the histogram on demand. - -:rtype: bool %End void histoAction( const QString &actionName, bool actionFlag = true ); diff --git a/python/gui/raster/qgsrasterminmaxwidget.sip b/python/gui/raster/qgsrasterminmaxwidget.sip index 62b6d771be3b..01f6bfdceb7c 100644 --- a/python/gui/raster/qgsrasterminmaxwidget.sip +++ b/python/gui/raster/qgsrasterminmaxwidget.sip @@ -27,6 +27,7 @@ Constructor for QgsRasterMinMaxWidget void setExtent( const QgsRectangle &extent ); %Docstring Sets the extent to use for minimum and maximum value calculation. + :param extent: extent in raster layer's CRS .. note:: @@ -40,6 +41,7 @@ precedence over any extent set using this method. Sets the map canvas associated with the widget. This allows the widget to retrieve the current map extent from the canvas. If a canvas is set it will take precedence over any extent set from calling setExtent(). + :param canvas: map canvas .. seealso:: :py:func:`mapCanvas()` @@ -51,8 +53,6 @@ set from calling setExtent(). %Docstring Returns the map canvas associated with the widget. -:rtype: QgsMapCanvas - .. seealso:: :py:func:`setMapCanvas()` .. seealso:: :py:func:`canvasExtent()` @@ -66,15 +66,11 @@ Returns the map canvas associated with the widget. %Docstring Return the extent selected by the user. Either an empty extent for 'full' or the current visible extent. - -:rtype: QgsRectangle %End int sampleSize(); %Docstring Return the selected sample size. - -:rtype: int %End void setFromMinMaxOrigin( const QgsRasterMinMaxOrigin & ); @@ -85,8 +81,6 @@ Return the selected sample size. QgsRasterMinMaxOrigin minMaxOrigin(); %Docstring Return a QgsRasterMinMaxOrigin object with the widget values. - -:rtype: QgsRasterMinMaxOrigin %End void hideUpdatedExtent(); @@ -107,8 +101,6 @@ Uncheck cumulative cut, min/max, std-dev radio buttons bool isCollapsed() const; %Docstring Return if the widget is collaped. - -:rtype: bool %End void setCollapsed( bool b ); diff --git a/python/gui/raster/qgsrasterrendererwidget.sip b/python/gui/raster/qgsrasterrendererwidget.sip index 55e39472207c..8d63bdffec44 100644 --- a/python/gui/raster/qgsrasterrendererwidget.sip +++ b/python/gui/raster/qgsrasterrendererwidget.sip @@ -22,22 +22,15 @@ class QgsRasterRendererWidget: QWidget QgsRasterRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent ); virtual QgsRasterRenderer *renderer() = 0 /Factory/; -%Docstring - -:rtype: QgsRasterRenderer -%End void setRasterLayer( QgsRasterLayer *layer ); const QgsRasterLayer *rasterLayer() const; -%Docstring - -:rtype: QgsRasterLayer -%End virtual void setMapCanvas( QgsMapCanvas *canvas ); %Docstring Sets the map canvas associated with the widget. This allows the widget to retrieve the current map extent and other properties from the canvas. + :param canvas: map canvas .. seealso:: :py:func:`mapCanvas()` @@ -49,8 +42,6 @@ map extent and other properties from the canvas. %Docstring Returns the map canvas associated with the widget. -:rtype: QgsMapCanvas - .. seealso:: :py:func:`setMapCanvas()` .. seealso:: :py:func:`canvasExtent()` @@ -59,28 +50,12 @@ Returns the map canvas associated with the widget. %End virtual QString min( int index = 0 ); -%Docstring - -:rtype: str -%End virtual QString max( int index = 0 ); -%Docstring - -:rtype: str -%End virtual void setMin( const QString &value, int index = 0 ); virtual void setMax( const QString &value, int index = 0 ); virtual QString stdDev(); -%Docstring - -:rtype: str -%End virtual void setStdDev( const QString &value ); virtual int selectedBand( int index = 0 ); -%Docstring - -:rtype: int -%End virtual void doComputations(); %Docstring @@ -90,8 +65,6 @@ Load programmatically with current values virtual QgsRasterMinMaxWidget *minMaxWidget(); %Docstring Return min/max widget when it exists. - -:rtype: QgsRasterMinMaxWidget %End signals: diff --git a/python/gui/raster/qgsrendererrasterpropertieswidget.sip b/python/gui/raster/qgsrendererrasterpropertieswidget.sip index 5a3a288b2c3c..c47969336008 100644 --- a/python/gui/raster/qgsrendererrasterpropertieswidget.sip +++ b/python/gui/raster/qgsrendererrasterpropertieswidget.sip @@ -22,6 +22,7 @@ class QgsRendererRasterPropertiesWidget : QgsMapLayerConfigWidget QgsRendererRasterPropertiesWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = 0 ); %Docstring A widget to hold the renderer properties for a raster layer. + :param layer: The raster layer to style :param canvas: The canvas object used to calculate the max and min values from the extent. :param parent: Parent object @@ -31,6 +32,7 @@ A widget to hold the renderer properties for a raster layer. %Docstring Sets the map canvas associated with the dialog. This allows the widget to retrieve the current map scale and other properties from the canvas. + :param canvas: map canvas .. versionadded:: 2.12 @@ -39,8 +41,6 @@ map scale and other properties from the canvas. QgsRasterRendererWidget *currentRenderWidget(); %Docstring Return the active render widget. Can be null. - -:rtype: QgsRasterRendererWidget %End public slots: @@ -58,6 +58,7 @@ Apply the changes from the dialog to the layer. void syncToLayer( QgsRasterLayer *layer ); %Docstring Sync the widget to the given layer. + :param layer: The layer to use for the widget %End diff --git a/python/gui/raster/qgssinglebandgrayrendererwidget.sip b/python/gui/raster/qgssinglebandgrayrendererwidget.sip index 7fd36804abf7..24e404bdb10a 100644 --- a/python/gui/raster/qgssinglebandgrayrendererwidget.sip +++ b/python/gui/raster/qgssinglebandgrayrendererwidget.sip @@ -20,10 +20,6 @@ class QgsSingleBandGrayRendererWidget: QgsRasterRendererWidget QgsSingleBandGrayRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() ); static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/; -%Docstring - -:rtype: QgsRasterRendererWidget -%End virtual QgsRasterRenderer *renderer(); diff --git a/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip b/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip index 35811714092f..1460e247f238 100644 --- a/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip +++ b/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip @@ -21,10 +21,6 @@ class QgsSingleBandPseudoColorRendererWidget: QgsRasterRendererWidget QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() ); static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/; -%Docstring - -:rtype: QgsRasterRendererWidget -%End virtual QgsRasterRenderer *renderer(); virtual void setMapCanvas( QgsMapCanvas *canvas ); diff --git a/python/gui/symbology/characterwidget.sip b/python/gui/symbology/characterwidget.sip index 9b42f98b0dbe..a91eed08e031 100644 --- a/python/gui/symbology/characterwidget.sip +++ b/python/gui/symbology/characterwidget.sip @@ -33,23 +33,17 @@ Constructor for CharacterWidget. int columns() const; %Docstring Returns the number of columns of characters shown in the widget. - -:rtype: int %End int squareSize() const; %Docstring Returns the size (in pixels) of the square used to render each character preview. - -:rtype: int %End QChar character() const; %Docstring Returns the currently selected character in the widget. -:rtype: QChar - .. seealso:: :py:func:`setCharacter()` .. versionadded:: 3.0 @@ -59,8 +53,6 @@ Returns the currently selected character in the widget. %Docstring Returns the font shown in the widget -:rtype: QFont - .. seealso:: :py:func:`setFont()` .. versionadded:: 3.0 diff --git a/python/gui/symbology/qgs25drendererwidget.sip b/python/gui/symbology/qgs25drendererwidget.sip index 796aef82f653..5403af18c9ee 100644 --- a/python/gui/symbology/qgs25drendererwidget.sip +++ b/python/gui/symbology/qgs25drendererwidget.sip @@ -19,16 +19,16 @@ class Qgs25DRendererWidget : QgsRendererWidget, protected Ui::Qgs25DRendererWidg static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer /Transfer/ ) /Factory/; %Docstring Static creation method + :param layer: the layer where this renderer is applied :param style: :param renderer: the mask renderer (will not take ownership) - -:rtype: QgsRendererWidget %End Qgs25DRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer /Transfer/ ); %Docstring Constructor + :param layer: the layer where this renderer is applied :param style: :param renderer: the mask renderer (will not take ownership) diff --git a/python/gui/symbology/qgsarrowsymbollayerwidget.sip b/python/gui/symbology/qgsarrowsymbollayerwidget.sip index a64dc49a52a8..0d8e083cf636 100644 --- a/python/gui/symbology/qgsarrowsymbollayerwidget.sip +++ b/python/gui/symbology/qgsarrowsymbollayerwidget.sip @@ -19,6 +19,7 @@ class QgsArrowSymbolLayerWidget: QgsSymbolLayerWidget QgsArrowSymbolLayerWidget( QgsVectorLayer *layer, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor + :param layer: the layer where this symbol layer is applied :param parent: the parent widget %End @@ -26,9 +27,8 @@ Constructor static QgsSymbolLayerWidget *create( QgsVectorLayer *layer ) /Factory/; %Docstring Static creation method -:param layer: the layer where this symbol layer is applied -:rtype: QgsSymbolLayerWidget +:param layer: the layer where this symbol layer is applied %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); diff --git a/python/gui/symbology/qgsbrushstylecombobox.sip b/python/gui/symbology/qgsbrushstylecombobox.sip index eb7d8b2a0ea9..8c7c49da1dda 100644 --- a/python/gui/symbology/qgsbrushstylecombobox.sip +++ b/python/gui/symbology/qgsbrushstylecombobox.sip @@ -18,19 +18,11 @@ class QgsBrushStyleComboBox : QComboBox QgsBrushStyleComboBox( QWidget *parent /TransferThis/ = 0 ); Qt::BrushStyle brushStyle() const; -%Docstring - -:rtype: Qt.BrushStyle -%End void setBrushStyle( Qt::BrushStyle style ); protected: QIcon iconForBrush( Qt::BrushStyle style ); -%Docstring - -:rtype: QIcon -%End }; diff --git a/python/gui/symbology/qgscategorizedsymbolrendererwidget.sip b/python/gui/symbology/qgscategorizedsymbolrendererwidget.sip index ebb2d80242c5..52e74609353e 100644 --- a/python/gui/symbology/qgscategorizedsymbolrendererwidget.sip +++ b/python/gui/symbology/qgscategorizedsymbolrendererwidget.sip @@ -19,10 +19,6 @@ class QgsCategorizedSymbolRendererWidget : QgsRendererWidget %End public: static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; -%Docstring - -:rtype: QgsRendererWidget -%End QgsCategorizedSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsCategorizedSymbolRendererWidget(); @@ -34,11 +30,10 @@ class QgsCategorizedSymbolRendererWidget : QgsRendererWidget %Docstring Replaces category symbols with the symbols from a style that have a matching name. + :param style: style containing symbols to match with :return: number of symbols matched -:rtype: int - .. seealso:: :py:func:`matchToSymbolsFromLibrary` @@ -101,15 +96,11 @@ from the XML file with a matching name. int currentCategoryRow(); %Docstring return row index for the currently selected category (-1 if on no selection) - -:rtype: int %End QList selectedCategories(); %Docstring return a list of indexes for the categories unders selection - -:rtype: list of int %End void changeSelectedSymbols(); @@ -122,10 +113,6 @@ change the selected symbols alone for the change button, if there is a selection virtual QList selectedSymbols(); QgsCategoryList selectedCategoryList(); -%Docstring - -:rtype: QgsCategoryList -%End virtual void refreshSymbolView(); virtual void keyPressEvent( QKeyEvent *event ); diff --git a/python/gui/symbology/qgscptcitycolorrampdialog.sip b/python/gui/symbology/qgscptcitycolorrampdialog.sip index ec28c57d2c55..46d5a8937ac0 100644 --- a/python/gui/symbology/qgscptcitycolorrampdialog.sip +++ b/python/gui/symbology/qgscptcitycolorrampdialog.sip @@ -28,6 +28,7 @@ A dialog which allows users to modify the properties of a QgsCptCityColorRamp. QgsCptCityColorRampDialog( const QgsCptCityColorRamp &ramp, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsCptCityColorRampDialog. + :param ramp: initial ramp to show in dialog :param parent: parent widget %End @@ -36,14 +37,13 @@ Constructor for QgsCptCityColorRampDialog. %Docstring Returns a color ramp representing the current settings from the dialog. -:rtype: QgsCptCityColorRamp - .. seealso:: :py:func:`setRamp()` %End void setRamp( const QgsCptCityColorRamp &ramp ); %Docstring Sets the color ramp to show in the dialog. + :param ramp: color ramp .. seealso:: :py:func:`ramp()` @@ -52,15 +52,11 @@ Sets the color ramp to show in the dialog. QString selectedName() const; %Docstring Returns the name of the ramp currently selected in the dialog. - -:rtype: str %End bool saveAsGradientRamp() const; %Docstring Returns true if the ramp should be converted to a QgsGradientColorRamp. - -:rtype: bool %End virtual bool eventFilter( QObject *obj, QEvent *event ); diff --git a/python/gui/symbology/qgsdashspacedialog.sip b/python/gui/symbology/qgsdashspacedialog.sip index d024bbe3ec50..1736d5530831 100644 --- a/python/gui/symbology/qgsdashspacedialog.sip +++ b/python/gui/symbology/qgsdashspacedialog.sip @@ -25,10 +25,6 @@ Constructor for QgsDashSpaceDialog %End QVector dashDotVector() const; -%Docstring - -:rtype: list of qreal -%End }; diff --git a/python/gui/symbology/qgsdatadefinedsizelegendwidget.sip b/python/gui/symbology/qgsdatadefinedsizelegendwidget.sip index 46664d7cbf9d..c0d592c19759 100644 --- a/python/gui/symbology/qgsdatadefinedsizelegendwidget.sip +++ b/python/gui/symbology/qgsdatadefinedsizelegendwidget.sip @@ -37,8 +37,6 @@ when the symbol is given from outside rather than being set inside QgsDataDefine QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const /Factory/; %Docstring Returns configuration as set up in the dialog (may be null). Ownership is passed to the caller. - -:rtype: QgsDataDefinedSizeLegend %End signals: diff --git a/python/gui/symbology/qgsellipsesymbollayerwidget.sip b/python/gui/symbology/qgsellipsesymbollayerwidget.sip index 02340b499d5c..b52291280905 100644 --- a/python/gui/symbology/qgsellipsesymbollayerwidget.sip +++ b/python/gui/symbology/qgsellipsesymbollayerwidget.sip @@ -19,6 +19,7 @@ class QgsEllipseSymbolLayerWidget: QgsSymbolLayerWidget QgsEllipseSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsEllipseSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -26,9 +27,8 @@ Constructor for QgsEllipseSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); diff --git a/python/gui/symbology/qgsgraduatedhistogramwidget.sip b/python/gui/symbology/qgsgraduatedhistogramwidget.sip index 392c6e4edf08..22a2a5b68035 100644 --- a/python/gui/symbology/qgsgraduatedhistogramwidget.sip +++ b/python/gui/symbology/qgsgraduatedhistogramwidget.sip @@ -27,6 +27,7 @@ editing range breaks for a QgsGraduatedSymbolRenderer renderer. QgsGraduatedHistogramWidget( QWidget *parent /TransferThis/ = 0 ); %Docstring QgsGraduatedHistogramWidget constructor + :param parent: parent widget %End @@ -34,6 +35,7 @@ QgsGraduatedHistogramWidget constructor %Docstring Sets the QgsGraduatedSymbolRenderer renderer associated with the histogram. The histogram will fetch the ranges from the renderer before every refresh. + :param renderer: associated QgsGraduatedSymbolRenderer %End @@ -42,6 +44,7 @@ The histogram will fetch the ranges from the renderer before every refresh. void rangesModified( bool rangesAdded ); %Docstring Emitted when the user modifies the graduated ranges using the histogram widget. + :param rangesAdded: true if the user has added ranges, false if the user has just modified existing range breaks %End diff --git a/python/gui/symbology/qgsgraduatedsymbolrendererwidget.sip b/python/gui/symbology/qgsgraduatedsymbolrendererwidget.sip index a3b0233f09f7..a994c8037e64 100644 --- a/python/gui/symbology/qgsgraduatedsymbolrendererwidget.sip +++ b/python/gui/symbology/qgsgraduatedsymbolrendererwidget.sip @@ -18,10 +18,6 @@ class QgsGraduatedSymbolRendererWidget : QgsRendererWidget %End public: static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; -%Docstring - -:rtype: QgsRendererWidget -%End QgsGraduatedSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsGraduatedSymbolRendererWidget(); @@ -69,24 +65,14 @@ Toggle the link between classes boundaries void connectUpdateHandlers(); void disconnectUpdateHandlers(); bool rowsOrdered(); -%Docstring - -:rtype: bool -%End void updateGraduatedSymbolIcon(); QList selectedClasses(); %Docstring return a list of indexes for the classes under selection - -:rtype: list of int %End QgsRangeList selectedRanges(); -%Docstring - -:rtype: QgsRangeList -%End void changeRangeSymbol( int rangeIdx ); void changeRange( int rangeIdx ); @@ -96,10 +82,6 @@ return a list of indexes for the classes under selection virtual QList selectedSymbols(); QgsSymbol *findSymbolForRange( double lowerBound, double upperBound, const QgsRangeList &ranges ) const; -%Docstring - -:rtype: QgsSymbol -%End virtual void refreshSymbolView(); diff --git a/python/gui/symbology/qgsheatmaprendererwidget.sip b/python/gui/symbology/qgsheatmaprendererwidget.sip index e9f7667ecd91..c6460b7950b6 100644 --- a/python/gui/symbology/qgsheatmaprendererwidget.sip +++ b/python/gui/symbology/qgsheatmaprendererwidget.sip @@ -19,16 +19,16 @@ class QgsHeatmapRendererWidget : QgsRendererWidget static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; %Docstring Static creation method + :param layer: the layer where this renderer is applied :param style: :param renderer: the mask renderer (will not take ownership) - -:rtype: QgsRendererWidget %End QgsHeatmapRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); %Docstring Constructor + :param layer: the layer where this renderer is applied :param style: :param renderer: the mask renderer (will not take ownership) diff --git a/python/gui/symbology/qgsinvertedpolygonrendererwidget.sip b/python/gui/symbology/qgsinvertedpolygonrendererwidget.sip index bf69c3ca3f37..7517489b0671 100644 --- a/python/gui/symbology/qgsinvertedpolygonrendererwidget.sip +++ b/python/gui/symbology/qgsinvertedpolygonrendererwidget.sip @@ -24,16 +24,16 @@ A widget used represent options of a QgsInvertedPolygonRenderer static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; %Docstring Static creation method + :param layer: the layer where this renderer is applied :param style: :param renderer: the mask renderer (will not take ownership) - -:rtype: QgsRendererWidget %End QgsInvertedPolygonRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); %Docstring Constructor + :param layer: the layer where this renderer is applied :param style: :param renderer: the mask renderer (will not take ownership) diff --git a/python/gui/symbology/qgslayerpropertieswidget.sip b/python/gui/symbology/qgslayerpropertieswidget.sip index 5eb10f7e9ebd..5dd4780e8b37 100644 --- a/python/gui/symbology/qgslayerpropertieswidget.sip +++ b/python/gui/symbology/qgslayerpropertieswidget.sip @@ -22,6 +22,7 @@ class QgsLayerPropertiesWidget : QgsPanelWidget, QgsExpressionContextGenerator QgsLayerPropertiesWidget( QgsSymbolLayer *layer, const QgsSymbol *symbol, QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsLayerPropertiesWidget. + :param layer: the symbol layer :param symbol: the symbol :param vl: associated vector layer @@ -31,6 +32,7 @@ Constructor for QgsLayerPropertiesWidget. void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -42,8 +44,6 @@ Sets the context in which the symbol widget is shown, e.g., the associated map c %Docstring Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -54,6 +54,7 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma %Docstring Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs + :param dockMode: True to enable dock mode. %End diff --git a/python/gui/symbology/qgsnullsymbolrendererwidget.sip b/python/gui/symbology/qgsnullsymbolrendererwidget.sip index b7ed72ea55a6..52076d303a4c 100644 --- a/python/gui/symbology/qgsnullsymbolrendererwidget.sip +++ b/python/gui/symbology/qgsnullsymbolrendererwidget.sip @@ -26,8 +26,6 @@ class QgsNullSymbolRendererWidget : QgsRendererWidget static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; %Docstring Creates a new QgsNullSymbolRendererWidget object - -:rtype: QgsRendererWidget %End QgsNullSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); @@ -40,8 +38,6 @@ Constructor for QgsNullSymbolRendererWidget %Docstring Returns a pointer to the configured renderer - -:rtype: QgsFeatureRenderer %End protected: diff --git a/python/gui/symbology/qgspenstylecombobox.sip b/python/gui/symbology/qgspenstylecombobox.sip index cf7502000bed..bac0c3d8dc0e 100644 --- a/python/gui/symbology/qgspenstylecombobox.sip +++ b/python/gui/symbology/qgspenstylecombobox.sip @@ -18,19 +18,11 @@ class QgsPenStyleComboBox : QComboBox QgsPenStyleComboBox( QWidget *parent /TransferThis/ = 0 ); Qt::PenStyle penStyle() const; -%Docstring - -:rtype: Qt.PenStyle -%End void setPenStyle( Qt::PenStyle style ); protected: QIcon iconForPen( Qt::PenStyle style ); -%Docstring - -:rtype: QIcon -%End }; @@ -44,10 +36,6 @@ class QgsPenJoinStyleComboBox : QComboBox QgsPenJoinStyleComboBox( QWidget *parent /TransferThis/ = 0 ); Qt::PenJoinStyle penJoinStyle() const; -%Docstring - -:rtype: Qt.PenJoinStyle -%End void setPenJoinStyle( Qt::PenJoinStyle style ); }; @@ -62,10 +50,6 @@ class QgsPenCapStyleComboBox : QComboBox QgsPenCapStyleComboBox( QWidget *parent /TransferThis/ = 0 ); Qt::PenCapStyle penCapStyle() const; -%Docstring - -:rtype: Qt.PenCapStyle -%End void setPenCapStyle( Qt::PenCapStyle style ); }; diff --git a/python/gui/symbology/qgspointclusterrendererwidget.sip b/python/gui/symbology/qgspointclusterrendererwidget.sip index 23271aec1f77..b5b2544e2aad 100644 --- a/python/gui/symbology/qgspointclusterrendererwidget.sip +++ b/python/gui/symbology/qgspointclusterrendererwidget.sip @@ -27,18 +27,18 @@ A widget which allows configuration of the properties for a QgsPointClusterRende static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; %Docstring Returns a new QgsPointClusterRendererWidget. + :param layer: associated vector layer :param style: style collection :param renderer: source QgsPointClusterRenderer renderer :return: new QgsRendererWidget -:rtype: QgsRendererWidget - %End QgsPointClusterRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); %Docstring Constructor for QgsPointClusterRendererWidget. + :param layer: associated vector layer :param style: style collection :param renderer: source QgsPointClusterRenderer renderer diff --git a/python/gui/symbology/qgspointdisplacementrendererwidget.sip b/python/gui/symbology/qgspointdisplacementrendererwidget.sip index aae8ba3132cc..fea5f06266b1 100644 --- a/python/gui/symbology/qgspointdisplacementrendererwidget.sip +++ b/python/gui/symbology/qgspointdisplacementrendererwidget.sip @@ -18,10 +18,6 @@ class QgsPointDisplacementRendererWidget: QgsRendererWidget, QgsExpressionContex %End public: static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; -%Docstring - -:rtype: QgsRendererWidget -%End QgsPointDisplacementRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsPointDisplacementRendererWidget(); diff --git a/python/gui/symbology/qgsrendererpropertiesdialog.sip b/python/gui/symbology/qgsrendererpropertiesdialog.sip index 4ee24205bbe0..40483e245998 100644 --- a/python/gui/symbology/qgsrendererpropertiesdialog.sip +++ b/python/gui/symbology/qgsrendererpropertiesdialog.sip @@ -23,6 +23,7 @@ class QgsRendererPropertiesDialog : QDialog QgsRendererPropertiesDialog( QgsVectorLayer *layer, QgsStyle *style, bool embedded = false, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsRendererPropertiesDialog. + :param layer: associated layer :param style: style collection :param embedded: set to true to indicate that the dialog will be embedded in another widget, rather @@ -35,6 +36,7 @@ than shown as a dialog by itself %Docstring Sets the map canvas associated with the dialog. This allows the widget to retrieve the current map scale and other properties from the canvas. + :param canvas: map canvas .. versionadded:: 2.12 @@ -44,6 +46,7 @@ map scale and other properties from the canvas. %Docstring Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs + :param dockMode: True to enable dock mode. %End @@ -65,6 +68,7 @@ All widgets will fire this event to notify of an internal change. void showPanel( QgsPanelWidget *panel ); %Docstring Emit when you require a panel to be show in the interface. + :param panel: The panel widget to show. .. note:: diff --git a/python/gui/symbology/qgsrendererwidget.sip b/python/gui/symbology/qgsrendererwidget.sip index 4c1dff6a4528..16e1e9b0ebd4 100644 --- a/python/gui/symbology/qgsrendererwidget.sip +++ b/python/gui/symbology/qgsrendererwidget.sip @@ -30,8 +30,6 @@ WORKFLOW: virtual QgsFeatureRenderer *renderer() = 0; %Docstring return pointer to the renderer (no transfer of ownership) - -:rtype: QgsFeatureRenderer %End void showSymbolLevelsDialog( QgsFeatureRenderer *r ); @@ -42,6 +40,7 @@ show a dialog with renderer's symbol level settings virtual void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -53,8 +52,6 @@ Sets the context in which the renderer widget is shown, e.g., the associated map %Docstring Returns the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -64,8 +61,6 @@ Returns the context in which the renderer widget is shown, e.g., the associated %Docstring Returns the vector layer associated with the widget. -:rtype: QgsVectorLayer - .. versionadded:: 2.12 %End @@ -90,8 +85,6 @@ to re-synchronize with the variables. %Docstring Subclasses may provide the capability of changing multiple symbols at once by implementing the following two methods and by connecting the slot contextMenuViewCategories(const QPoint&)* - -:rtype: list of QgsSymbol %End virtual void refreshSymbolView(); @@ -100,8 +93,6 @@ and by connecting the slot contextMenuViewCategories(const QPoint&)* Creates widget to setup data-defined size legend. Returns newly created panel - may be null if it could not be opened. Ownership is transferred to the caller. -:rtype: QgsDataDefinedSizeLegendWidget - .. versionadded:: 3.0 %End @@ -163,6 +154,7 @@ Utility classes for "en masse" size definition QgsDataDefinedValueDialog( const QList &symbolList, QgsVectorLayer *layer, const QString &label ); %Docstring Constructor + :param symbolList: must not be empty :param layer: must not be null :param label: value label @@ -171,6 +163,7 @@ Constructor void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -182,8 +175,6 @@ Sets the context in which the symbol widget is shown, e.g., the associated map c %Docstring Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -193,8 +184,6 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma %Docstring Returns the vector layer associated with the widget. -:rtype: QgsVectorLayer - .. versionadded:: 2.12 %End @@ -207,20 +196,8 @@ Returns the vector layer associated with the widget. private: QgsProperty symbolDataDefined() const ; -%Docstring - -:rtype: QgsProperty -%End virtual QgsProperty symbolDataDefined( const QgsSymbol * ) const = 0 ; -%Docstring - -:rtype: QgsProperty -%End virtual double value( const QgsSymbol * ) const = 0 ; -%Docstring - -:rtype: float -%End virtual void setDataDefined( QgsSymbol *symbol, const QgsProperty &dd ) = 0 ; }; diff --git a/python/gui/symbology/qgsrulebasedrendererwidget.sip b/python/gui/symbology/qgsrulebasedrendererwidget.sip index 69bbd7ad1702..f892a5854bf8 100644 --- a/python/gui/symbology/qgsrulebasedrendererwidget.sip +++ b/python/gui/symbology/qgsrulebasedrendererwidget.sip @@ -64,10 +64,6 @@ Constructor for QgsRuleBasedRendererModel, for the specified ``renderer``. QgsRuleBasedRenderer::Rule *ruleForIndex( const QModelIndex &index ) const; -%Docstring - -:rtype: QgsRuleBasedRenderer.Rule -%End void insertRule( const QModelIndex &parent, int before, QgsRuleBasedRenderer::Rule *newrule ); void updateRule( const QModelIndex &parent, int row ); @@ -94,10 +90,6 @@ class QgsRuleBasedRendererWidget : QgsRendererWidget public: static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; -%Docstring - -:rtype: QgsRendererWidget -%End QgsRuleBasedRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsRuleBasedRendererWidget(); @@ -139,18 +131,10 @@ Opens the dialog for refining a rule using ranges void refineRuleScalesGui( const QModelIndexList &index ); QgsRuleBasedRenderer::Rule *currentRule(); -%Docstring - -:rtype: QgsRuleBasedRenderer.Rule -%End virtual QList selectedSymbols(); QgsRuleBasedRenderer::RuleList selectedRules(); -%Docstring - -:rtype: QgsRuleBasedRenderer.RuleList -%End virtual void refreshSymbolView(); virtual void keyPressEvent( QKeyEvent *event ); @@ -185,6 +169,7 @@ class QgsRendererRulePropsWidget : QgsPanelWidget const QgsSymbolWidgetContext &context = QgsSymbolWidgetContext() ); %Docstring Widget to edit the details of a rule based renderer rule. + :param rule: The rule to edit. :param layer: The layer used to pull layer related information. :param style: The active QGIS style. @@ -197,8 +182,6 @@ Widget to edit the details of a rule based renderer rule. Return the current set rule. :return: The current rule. -:rtype: QgsRuleBasedRenderer.Rule - %End public slots: @@ -222,6 +205,7 @@ Apply any changes from the widget to the set rule. %Docstring Set the widget in dock mode. + :param dockMode: True for dock mode. %End @@ -241,6 +225,7 @@ class QgsRendererRulePropsDialog : QDialog QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Rule *rule, QgsVectorLayer *layer, QgsStyle *style, QWidget *parent /TransferThis/ = 0, const QgsSymbolWidgetContext &context = QgsSymbolWidgetContext() ); %Docstring Constructor for QgsRendererRulePropsDialog + :param rule: associated rule based renderer rule :param layer: source vector layer :param style: style collection @@ -251,10 +236,6 @@ Constructor for QgsRendererRulePropsDialog ~QgsRendererRulePropsDialog(); QgsRuleBasedRenderer::Rule *rule(); -%Docstring - -:rtype: QgsRuleBasedRenderer.Rule -%End public slots: void testFilter(); diff --git a/python/gui/symbology/qgssinglesymbolrendererwidget.sip b/python/gui/symbology/qgssinglesymbolrendererwidget.sip index bc07e3a00bad..6c7feec6de0b 100644 --- a/python/gui/symbology/qgssinglesymbolrendererwidget.sip +++ b/python/gui/symbology/qgssinglesymbolrendererwidget.sip @@ -17,10 +17,6 @@ class QgsSingleSymbolRendererWidget : QgsRendererWidget %End public: static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/; -%Docstring - -:rtype: QgsRendererWidget -%End QgsSingleSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ); ~QgsSingleSymbolRendererWidget(); @@ -36,6 +32,7 @@ class QgsSingleSymbolRendererWidget : QgsRendererWidget %Docstring Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs + :param dockMode: True to enable dock mode. %End diff --git a/python/gui/symbology/qgssmartgroupeditordialog.sip b/python/gui/symbology/qgssmartgroupeditordialog.sip index befb5e40eebf..989aa68238b4 100644 --- a/python/gui/symbology/qgssmartgroupeditordialog.sip +++ b/python/gui/symbology/qgssmartgroupeditordialog.sip @@ -20,15 +20,11 @@ class QgsSmartGroupCondition : QWidget QString constraint(); %Docstring returns the constraint key - -:rtype: str %End QString parameter(); %Docstring returns the parameter - -:rtype: str %End void setConstraint( const QString &constraint ); @@ -72,16 +68,12 @@ class QgsSmartGroupEditorDialog : QDialog QString smartgroupName(); %Docstring returns the value from mNameLineEdit - -:rtype: str %End QString conditionOperator(); %Docstring returns the AND/OR condition - -:rtype: str %End diff --git a/python/gui/symbology/qgsstyleexportimportdialog.sip b/python/gui/symbology/qgsstyleexportimportdialog.sip index 96ca3ad58800..81f8c209b681 100644 --- a/python/gui/symbology/qgsstyleexportimportdialog.sip +++ b/python/gui/symbology/qgsstyleexportimportdialog.sip @@ -29,12 +29,14 @@ class QgsStyleExportImportDialog : QDialog void selectSymbols( const QStringList &symbolNames ); %Docstring selectSymbols select symbols by name + :param symbolNames: list of symbol names %End void deselectSymbols( const QStringList &symbolNames ); %Docstring deselectSymbols deselect symbols by name + :param symbolNames: list of symbol names %End @@ -59,24 +61,28 @@ class QgsStyleExportImportDialog : QDialog void selectTag( const QString &tagName ); %Docstring Select the symbols belonging to the given tag + :param tagName: the name of the group to be selected %End void deselectTag( const QString &tagName ); %Docstring Deselect the symbols belonging to the given tag + :param tagName: the name of the group to be deselected %End void selectSmartgroup( const QString &groupName ); %Docstring selectSmartgroup selects all symbols from a smart group + :param groupName: %End void deselectSmartgroup( const QString &groupName ); %Docstring deselectSmartgroup deselects all symbols from a smart group + :param groupName: %End diff --git a/python/gui/symbology/qgsstylemanagerdialog.sip b/python/gui/symbology/qgsstylemanagerdialog.sip index f1b42db78354..b0849598892b 100644 --- a/python/gui/symbology/qgsstylemanagerdialog.sip +++ b/python/gui/symbology/qgsstylemanagerdialog.sip @@ -23,8 +23,6 @@ class QgsStyleManagerDialog : QDialog QString RampType = QString() ); %Docstring open add color ramp dialog, return color ramp's name if the ramp has been added - -:rtype: str %End public slots: @@ -64,14 +62,10 @@ Open the associated help int addTag(); %Docstring add a tag - -:rtype: int %End int addSmartgroup(); %Docstring add a smartgroup - -:rtype: int %End void removeGroup(); %Docstring @@ -120,10 +114,6 @@ Context menu for the listItems ( symbols list ) protected slots: bool addColorRamp( QAction *action ); -%Docstring - -:rtype: bool -%End void addFavoriteSelectedSymbols(); %Docstring Add selected symbols to favorites @@ -168,50 +158,22 @@ populate list view with color ramps %End int currentItemType(); -%Docstring - -:rtype: int -%End QString currentItemName(); -%Docstring - -:rtype: str -%End bool addSymbol(); %Docstring add a new symbol to style - -:rtype: bool %End bool addColorRamp(); %Docstring add a new color ramp to style - -:rtype: bool %End bool editSymbol(); -%Docstring - -:rtype: bool -%End bool editColorRamp(); -%Docstring - -:rtype: bool -%End bool removeSymbol(); -%Docstring - -:rtype: bool -%End bool removeColorRamp(); -%Docstring - -:rtype: bool -%End void enableSymbolInputs( bool ); %Docstring diff --git a/python/gui/symbology/qgsstylesavedialog.sip b/python/gui/symbology/qgsstylesavedialog.sip index a45908ae634b..eb288cdeeb96 100644 --- a/python/gui/symbology/qgsstylesavedialog.sip +++ b/python/gui/symbology/qgsstylesavedialog.sip @@ -26,6 +26,7 @@ class QgsStyleSaveDialog: QDialog QgsStyleSaveDialog( QWidget *parent /TransferThis/ = 0, QgsStyle::StyleEntity type = QgsStyle::SymbolEntity ); %Docstring Constructor for QgsSymbolSaveDialog + :param parent: parent widget :param type: the QgsStyle entity type being saved %End @@ -33,22 +34,16 @@ Constructor for QgsSymbolSaveDialog QString name() const; %Docstring returns the text value of the name element - -:rtype: str %End QString tags() const; %Docstring returns the text value of the tags element - -:rtype: str %End bool isFavorite() const; %Docstring returns whether the favorite element is checked - -:rtype: bool %End diff --git a/python/gui/symbology/qgssvgselectorwidget.sip b/python/gui/symbology/qgssvgselectorwidget.sip index eba0d1d72d84..2b0436d436d4 100644 --- a/python/gui/symbology/qgssvgselectorwidget.sip +++ b/python/gui/symbology/qgssvgselectorwidget.sip @@ -28,6 +28,7 @@ not block the GUI. %Docstring Constructor for QgsSvgSelectorListModel. All SVGs in folders from the application SVG search paths will be shown. + :param parent: parent object :param iconSize: desired size of SVG icons to create %End @@ -35,6 +36,7 @@ search paths will be shown. QgsSvgSelectorListModel( QObject *parent /TransferThis/, const QString &path, int iconSize = 30 ); %Docstring Constructor for creating a model for SVG files in a specific path. + :param parent: parent object :param path: initial path, which is recursively searched :param iconSize: desired size of SVG icons to create @@ -81,10 +83,6 @@ Constructor for QgsSvgSelectorWidget %End QString currentSvgPath() const; -%Docstring - -:rtype: str -%End public slots: void setSvgPath( const QString &svgPath ); @@ -120,8 +118,6 @@ Constructor for QgsSvgSelectorDialog. QgsSvgSelectorWidget *svgSelector(); %Docstring Returns pointer to the embedded SVG selector widget - -:rtype: QgsSvgSelectorWidget %End protected: diff --git a/python/gui/symbology/qgssymbollayerwidget.sip b/python/gui/symbology/qgssymbollayerwidget.sip index 09f75541902c..6fa2baaf3565 100644 --- a/python/gui/symbology/qgssymbollayerwidget.sip +++ b/python/gui/symbology/qgssymbollayerwidget.sip @@ -20,20 +20,18 @@ class QgsSymbolLayerWidget : QWidget, protected QgsExpressionContextGenerator QgsSymbolLayerWidget( QWidget *parent /TransferThis/, QgsVectorLayer *vl = 0 ); %Docstring Constructor for QgsSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End virtual void setSymbolLayer( QgsSymbolLayer *layer ) = 0; virtual QgsSymbolLayer *symbolLayer() = 0; -%Docstring - -:rtype: QgsSymbolLayer -%End void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -45,8 +43,6 @@ Sets the context in which the symbol widget is shown, e.g., the associated map c %Docstring Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -56,8 +52,6 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma %Docstring Returns the vector layer associated with the widget. -:rtype: QgsVectorLayer - .. versionadded:: 2.12 %End @@ -110,6 +104,7 @@ class QgsSimpleLineSymbolLayerWidget : QgsSymbolLayerWidget QgsSimpleLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSimpleLineSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -117,9 +112,8 @@ Constructor for QgsSimpleLineSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsSimpleLineSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -147,6 +141,7 @@ class QgsSimpleMarkerSymbolLayerWidget : QgsSymbolLayerWidget QgsSimpleMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSimpleMarkerSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -154,9 +149,8 @@ Constructor for QgsSimpleMarkerSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsSimpleMarkerSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -187,6 +181,7 @@ class QgsSimpleFillSymbolLayerWidget : QgsSymbolLayerWidget QgsSimpleFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSimpleFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -194,9 +189,8 @@ Constructor for QgsSimpleFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsSimpleFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -232,6 +226,7 @@ class QgsFilledMarkerSymbolLayerWidget : QgsSymbolLayerWidget QgsFilledMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsFilledMarkerSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -239,9 +234,8 @@ Constructor for QgsFilledMarkerSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsFilledMarkerSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -267,6 +261,7 @@ class QgsGradientFillSymbolLayerWidget : QgsSymbolLayerWidget QgsGradientFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsGradientFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -274,9 +269,8 @@ Constructor for QgsGradientFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsGradientFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -314,6 +308,7 @@ class QgsShapeburstFillSymbolLayerWidget : QgsSymbolLayerWidget QgsShapeburstFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsShapeburstFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -321,9 +316,8 @@ Constructor for QgsShapeburstFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsShapeburstFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -353,6 +347,7 @@ class QgsMarkerLineSymbolLayerWidget : QgsSymbolLayerWidget QgsMarkerLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsMarkerLineSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -360,9 +355,8 @@ Constructor for QgsMarkerLineSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsMarkerLineSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -395,6 +389,7 @@ class QgsSvgMarkerSymbolLayerWidget : QgsSymbolLayerWidget QgsSvgMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSvgMarkerSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -402,9 +397,8 @@ Constructor for QgsSvgMarkerSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsSvgMarkerSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -434,6 +428,7 @@ class QgsRasterFillSymbolLayerWidget : QgsSymbolLayerWidget QgsRasterFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsRasterFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -441,9 +436,8 @@ Constructor for QgsRasterFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsRasterFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -469,6 +463,7 @@ class QgsSVGFillSymbolLayerWidget : QgsSymbolLayerWidget QgsSVGFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsSVGFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -476,9 +471,8 @@ Constructor for QgsSVGFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsSVGFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -493,6 +487,7 @@ Creates a new QgsSVGFillSymbolLayerWidget. %Docstring Enables or disables svg fill color, stroke color and stroke width based on whether the svg file supports custom parameters. + :param resetValues: set to true to overwrite existing layer fill color, stroke color and stroke width with default values from svg file %End @@ -513,6 +508,7 @@ class QgsLinePatternFillSymbolLayerWidget : QgsSymbolLayerWidget QgsLinePatternFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsLinePatternFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -520,9 +516,8 @@ Constructor for QgsLinePatternFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsLinePatternFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -548,6 +543,7 @@ class QgsPointPatternFillSymbolLayerWidget: QgsSymbolLayerWidget QgsPointPatternFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsPointPatternFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -555,9 +551,8 @@ Constructor for QgsPointPatternFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsPointPatternFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -583,6 +578,7 @@ class QgsFontMarkerSymbolLayerWidget : QgsSymbolLayerWidget QgsFontMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsFontMarkerSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -590,9 +586,8 @@ Constructor for QgsFontMarkerSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsFontMarkerSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -633,6 +628,7 @@ class QgsCentroidFillSymbolLayerWidget : QgsSymbolLayerWidget QgsCentroidFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsCentroidFillSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -640,9 +636,8 @@ Constructor for QgsCentroidFillSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsCentroidFillSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); @@ -668,6 +663,7 @@ class QgsGeometryGeneratorSymbolLayerWidget : QgsSymbolLayerWidget QgsGeometryGeneratorSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsGeometryGeneratorSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -675,8 +671,6 @@ Constructor for QgsGeometryGeneratorSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Will be registered as factory - -:rtype: QgsSymbolLayerWidget %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); diff --git a/python/gui/symbology/qgssymbollevelsdialog.sip b/python/gui/symbology/qgssymbollevelsdialog.sip index 29194bd4b530..9dc152e98205 100644 --- a/python/gui/symbology/qgssymbollevelsdialog.sip +++ b/python/gui/symbology/qgssymbollevelsdialog.sip @@ -31,13 +31,12 @@ Constructor for QgsSymbolLevelsWidget bool usingLevels() const; %Docstring Returns whether the level ordering is enabled - -:rtype: bool %End void setForceOrderingEnabled( bool enabled ); %Docstring Sets whether the level ordering is always forced on and hide the checkbox (used by rule-based renderer) + :param enabled: toggle level ordering %End diff --git a/python/gui/symbology/qgssymbolselectordialog.sip b/python/gui/symbology/qgssymbolselectordialog.sip index 99b59a7e0559..e2fcc59e911b 100644 --- a/python/gui/symbology/qgssymbolselectordialog.sip +++ b/python/gui/symbology/qgssymbolselectordialog.sip @@ -31,6 +31,7 @@ Symbol selector widget that can be used to select and build a symbol QgsSymbolSelectorWidget( QgsSymbol *symbol, QgsStyle *style, QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Symbol selector widget that can be used to select and build a symbol + :param symbol: The symbol to load into the widget as a start point. :param style: The style used by the widget. :param vl: The vector layer for the symbol. @@ -40,13 +41,12 @@ Symbol selector widget that can be used to select and build a symbol QMenu *advancedMenu(); %Docstring return menu for "advanced" button - create it if doesn't exist and show the advanced button - -:rtype: QMenu %End void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -58,8 +58,6 @@ Sets the context in which the symbol widget is shown, e.g., the associated map c %Docstring Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -70,8 +68,6 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma Return the symbol that is currently active in the widget. Can be null. :return: The active symbol. -:rtype: QgsSymbol - %End protected: @@ -98,19 +94,19 @@ Update the lock button states based on the current symbol layer. The current symbol layer that is active in the interface. :return: The active symbol layer. -:rtype: QgsSymbolLayer - %End void moveLayerByOffset( int offset ); %Docstring Move the current active layer by a set offset in the list. + :param offset: The offset to move the layer by %End void setWidget( QWidget *widget ); %Docstring Set the properties widget for the active symbol layer. + :param widget: The widget to set to configure the active symbol layer. %End @@ -211,13 +207,12 @@ Constructor for QgsSymbolSelectorDialog. QMenu *advancedMenu(); %Docstring return menu for "advanced" button - create it if doesn't exist and show the advanced button - -:rtype: QMenu %End void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -229,8 +224,6 @@ Sets the context in which the symbol widget is shown, e.g., the associated map c %Docstring Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -241,8 +234,6 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma Return the symbol that is currently active in the widget. Can be null. :return: The active symbol. -:rtype: QgsSymbol - %End protected: @@ -257,10 +248,6 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma void updateLockButton(); QgsSymbolLayer *currentLayer(); -%Docstring - -:rtype: QgsSymbolLayer -%End void moveLayerByOffset( int offset ); diff --git a/python/gui/symbology/qgssymbolslistwidget.sip b/python/gui/symbology/qgssymbolslistwidget.sip index f6bd46a1b768..287ab8f79d78 100644 --- a/python/gui/symbology/qgssymbolslistwidget.sip +++ b/python/gui/symbology/qgssymbolslistwidget.sip @@ -23,6 +23,7 @@ class QgsSymbolsListWidget : QWidget QgsSymbolsListWidget( QgsSymbol *symbol, QgsStyle *style, QMenu *menu, QWidget *parent /TransferThis/, QgsVectorLayer *layer = 0 ); %Docstring Constructor for QgsSymbolsListWidget. + :param symbol: the symbol :param style: the style :param menu: the menu where to show it @@ -36,6 +37,7 @@ Constructor for QgsSymbolsListWidget. void setContext( const QgsSymbolWidgetContext &context ); %Docstring Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. + :param context: symbol widget context .. seealso:: :py:func:`context()` @@ -47,8 +49,6 @@ Sets the context in which the symbol widget is shown, e.g., the associated map c %Docstring Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. -:rtype: QgsSymbolWidgetContext - .. seealso:: :py:func:`setContext()` .. versionadded:: 3.0 @@ -58,8 +58,6 @@ Returns the context in which the symbol widget is shown, e.g., the associated ma %Docstring Returns the vector layer associated with the widget. -:rtype: QgsVectorLayer - .. versionadded:: 2.12 %End diff --git a/python/gui/symbology/qgssymbolwidgetcontext.sip b/python/gui/symbology/qgssymbolwidgetcontext.sip index 5f6540f35153..a79a1035ab0e 100644 --- a/python/gui/symbology/qgssymbolwidgetcontext.sip +++ b/python/gui/symbology/qgssymbolwidgetcontext.sip @@ -33,6 +33,7 @@ Constructor for QgsSymbolWidgetContext. QgsSymbolWidgetContext( const QgsSymbolWidgetContext &other ); %Docstring Copy constructor. + :param other: source QgsSymbolWidgetContext %End @@ -41,6 +42,7 @@ Copy constructor. %Docstring Sets the map canvas associated with the widget. This allows the widget to retrieve the current map scale and other properties from the canvas. + :param canvas: map canvas .. seealso:: :py:func:`mapCanvas()` @@ -50,8 +52,6 @@ map scale and other properties from the canvas. %Docstring Returns the map canvas associated with the widget. -:rtype: QgsMapCanvas - .. seealso:: :py:func:`setMapCanvas()` %End @@ -60,6 +60,7 @@ Returns the map canvas associated with the widget. Sets the optional expression context used for the widget. This expression context is used for evaluating data defined symbol properties and for populating based expression widgets in the layer widget. + :param context: expression context pointer. Ownership is not transferred. .. seealso:: :py:func:`expressionContext()` @@ -73,14 +74,13 @@ Returns the expression context used for the widget, if set. This expression cont evaluating data defined symbol properties and for populating based expression widgets in the layer widget. -:rtype: QgsExpressionContext - .. seealso:: :py:func:`setExpressionContext()` %End void setAdditionalExpressionContextScopes( const QList< QgsExpressionContextScope > &scopes ); %Docstring Sets a list of additional expression context scopes to show as available within the layer. + :param scopes: list of additional scopes which will be added in order to the end of the default expression context .. seealso:: :py:func:`setExpressionContext()` @@ -90,8 +90,6 @@ Sets a list of additional expression context scopes to show as available within %Docstring Returns the list of additional expression context scopes to show as available within the layer. -:rtype: list of QgsExpressionContextScope - .. seealso:: :py:func:`setAdditionalExpressionContextScopes()` %End @@ -100,8 +98,6 @@ Returns the list of additional expression context scopes to show as available wi Returns list of scopes: global, project, atlas, map, layer. Ownership is transferred to the caller. -:rtype: list of QgsExpressionContextScope - .. versionadded:: 3.0 %End diff --git a/python/gui/symbology/qgsvectorfieldsymbollayerwidget.sip b/python/gui/symbology/qgsvectorfieldsymbollayerwidget.sip index 12ca0a64d3de..1df67e6128fd 100644 --- a/python/gui/symbology/qgsvectorfieldsymbollayerwidget.sip +++ b/python/gui/symbology/qgsvectorfieldsymbollayerwidget.sip @@ -19,6 +19,7 @@ class QgsVectorFieldSymbolLayerWidget: QgsSymbolLayerWidget QgsVectorFieldSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsVectorFieldSymbolLayerWidget. + :param vl: associated vector layer :param parent: parent widget %End @@ -26,9 +27,8 @@ Constructor for QgsVectorFieldSymbolLayerWidget. static QgsSymbolLayerWidget *create( QgsVectorLayer *vl ) /Factory/; %Docstring Creates a new QgsVectorFieldSymbolLayerWidget. -:param vl: associated vector layer -:rtype: QgsSymbolLayerWidget +:param vl: associated vector layer %End virtual void setSymbolLayer( QgsSymbolLayer *layer ); diff --git a/python/server/qgsaccesscontrol.sip b/python/server/qgsaccesscontrol.sip index e8de46813b80..771405b277ea 100644 --- a/python/server/qgsaccesscontrol.sip +++ b/python/server/qgsaccesscontrol.sip @@ -42,6 +42,7 @@ Constructor void resolveFilterFeatures( const QList &layers ); %Docstring Resolve features' filter of layers + :param layers: to filter %End @@ -49,6 +50,7 @@ Resolve features' filter of layers %Docstring Filter the features of the layer + :param layer: the layer to control :param filterFeatures: the request to fill %End @@ -59,95 +61,86 @@ Filter the features of the layer Return a clone of the object :return: A clone -:rtype: QgsFeatureFilterProvider - %End QString extraSubsetString( const QgsVectorLayer *layer ) const; %Docstring Return an additional subset string (typically SQL) filter + :param layer: the layer to control :return: the subset string to use -:rtype: str - %End bool layerReadPermission( const QgsMapLayer *layer ) const; %Docstring Return the layer read right + :param layer: the layer to control :return: true if it can be read -:rtype: bool - %End bool layerInsertPermission( const QgsVectorLayer *layer ) const; %Docstring Return the layer insert right + :param layer: the layer to control :return: true if we can insert on it -:rtype: bool - %End bool layerUpdatePermission( const QgsVectorLayer *layer ) const; %Docstring Return the layer update right + :param layer: the layer to control :return: true if we can do an update -:rtype: bool - %End bool layerDeletePermission( const QgsVectorLayer *layer ) const; %Docstring Return the layer delete right + :param layer: the layer to control :return: true if we can do a delete -:rtype: bool - %End QStringList layerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const; %Docstring Return the authorized layer attributes + :param layer: the layer to control :param attributes: the list of attribute :return: the list of visible attributes -:rtype: list of str - %End bool allowToEdit( const QgsVectorLayer *layer, const QgsFeature &feature ) const; %Docstring Are we authorized to modify the following geometry + :param layer: the layer to control :param feature: the concerned feature :return: true if we are allowed to edit the feature -:rtype: bool - %End bool fillCacheKey( QStringList &cacheKey ) const; %Docstring Fill the capabilities caching key + :param cacheKey: the list to fill with a cache variant :return: false if we can't create a cache -:rtype: bool - %End void registerAccessControl( QgsAccessControlFilter *accessControl, int priority = 0 ); %Docstring Register an access control filter + :param accessControl: the access control to add :param priority: the priority used to define the order %End diff --git a/python/server/qgsaccesscontrolfilter.sip b/python/server/qgsaccesscontrolfilter.sip index 2b359670af75..862ed9d52334 100644 --- a/python/server/qgsaccesscontrolfilter.sip +++ b/python/server/qgsaccesscontrolfilter.sip @@ -51,60 +51,53 @@ and must be passed to QgsAccessControlFilter instances. const QgsServerInterface *serverInterface() const; %Docstring Return the QgsServerInterface instance - -:rtype: QgsServerInterface %End virtual QString layerFilterExpression( const QgsVectorLayer *layer ) const; %Docstring Return an additional expression filter + :param layer: the layer to control :return: the filter expression -:rtype: str - %End virtual QString layerFilterSubsetString( const QgsVectorLayer *layer ) const; %Docstring Return an additional subset string (typically SQL) filter + :param layer: the layer to control :return: the subset string -:rtype: str - %End virtual LayerPermissions layerPermissions( const QgsMapLayer *layer ) const; %Docstring Return the layer permissions + :param layer: the layer to control :return: the permission to use on the layer -:rtype: LayerPermissions - %End virtual QStringList authorizedLayerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const; %Docstring Return the authorized layer attributes + :param layer: the layer to control :param attributes: the current list of visible attribute :return: the new list of visible attributes -:rtype: list of str - %End virtual bool allowToEdit( const QgsVectorLayer *layer, const QgsFeature &feature ) const; %Docstring Are we authorized to modify the following geometry + :param layer: the layer to control :param feature: the concerned feature :return: true if we are allowed to edit -:rtype: bool - %End virtual QString cacheKey() const; @@ -112,8 +105,6 @@ Are we authorized to modify the following geometry Cache key to used to create the capabilities cache :return: the cache key, "" for no cache -:rtype: str - %End }; diff --git a/python/server/qgsbufferserverresponse.sip b/python/server/qgsbufferserverresponse.sip index 5729a9fcf5dc..eefe954b47db 100644 --- a/python/server/qgsbufferserverresponse.sip +++ b/python/server/qgsbufferserverresponse.sip @@ -42,37 +42,30 @@ Undo a previous 'setHeader' call %Docstring Return the header value - -:rtype: str %End virtual QMap headers() const; %Docstring Return all the headers - -:rtype: QMap %End virtual bool headersSent() const; %Docstring Return true if the headers have alredy been sent - -:rtype: bool %End virtual void setStatusCode( int code ); %Docstring Set the http status code + :param code: HTTP status code value %End virtual int statusCode() const; %Docstring Return the http status code - -:rtype: int %End virtual void sendError( int code, const QString &message ); @@ -83,6 +76,7 @@ This method delegates error handling at the server level. This is different from calling setReturnCode() which let you return a specific response body. Calling sendError() will end the transaction and any attempt to write data or set headers will be an error. + :param code: HHTP return code value :param message: An informative error message %End @@ -91,8 +85,6 @@ or set headers will be an error. %Docstring Return the underlying QIODevice - -:rtype: QIODevice %End virtual void finish(); @@ -126,8 +118,6 @@ give access to the underlying and return an empty array. Note that each call to 'flush' may empty the buffer and in case of streaming process you may get partial content - -:rtype: QByteArray %End virtual void truncate(); @@ -141,8 +131,6 @@ Clear internal buffer QByteArray body() const; %Docstring Return body - -:rtype: QByteArray %End diff --git a/python/server/qgscapabilitiescache.sip b/python/server/qgscapabilitiescache.sip index c82edd3a9117..059cafd8a7ea 100644 --- a/python/server/qgscapabilitiescache.sip +++ b/python/server/qgscapabilitiescache.sip @@ -24,15 +24,15 @@ A cache for capabilities xml documents (by configuration file path) const QDomDocument *searchCapabilitiesDocument( const QString &configFilePath, const QString &key ); %Docstring Returns cached capabilities document (or 0 if document for configuration file not in cache) + :param configFilePath: the progect file path :param key: key used to separate different version in different cache - -:rtype: QDomDocument %End void insertCapabilitiesDocument( const QString &configFilePath, const QString &key, const QDomDocument *doc ); %Docstring Inserts new capabilities document (creates a copy of the document, does not take ownership) + :param configFilePath: the project file path :param key: key used to separate different version in different cache :param doc: the DOM document @@ -41,6 +41,7 @@ Inserts new capabilities document (creates a copy of the document, does not take void removeCapabilitiesDocument( const QString &path ); %Docstring Remove capabilities document + :param path: the project file path .. versionadded:: 2.16 diff --git a/python/server/qgsconfigcache.sip b/python/server/qgsconfigcache.sip index fae7d5f7939f..43cb0583d6e5 100644 --- a/python/server/qgsconfigcache.sip +++ b/python/server/qgsconfigcache.sip @@ -30,10 +30,6 @@ the Free Software Foundation; either version 2 of the License, or * %End public: static QgsConfigCache *instance(); -%Docstring - -:rtype: QgsConfigCache -%End void removeEntry( const QString &path ); @@ -41,11 +37,10 @@ the Free Software Foundation; either version 2 of the License, or * %Docstring If the project is not cached yet, then the project is read thank to the path. If the project is not available, then a None is returned. + :param path: the filename of the QGIS project :return: the project or None if an error happened -:rtype: QgsProject - .. versionadded:: 3.0 %End diff --git a/python/server/qgsfeaturefilter.sip b/python/server/qgsfeaturefilter.sip index 69d3319a1cc9..345b5e590c0f 100644 --- a/python/server/qgsfeaturefilter.sip +++ b/python/server/qgsfeaturefilter.sip @@ -32,6 +32,7 @@ Constructor void filterFeatures( const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures ) const; %Docstring Filter the features of the layer + :param layer: the layer to control :param filterFeatures: the request to fill %End @@ -41,13 +42,12 @@ Filter the features of the layer Return a clone of the object :return: A clone -:rtype: QgsFeatureFilterProvider - %End void setFilter( const QgsVectorLayer *layer, const QgsExpression &expression ); %Docstring Set a filter for the given layer. + :param layer: the layer to filter :param expression: the filter expression %End diff --git a/python/server/qgsfeaturefilterprovidergroup.sip b/python/server/qgsfeaturefilterprovidergroup.sip index 221e1f6e7845..9d697e165db7 100644 --- a/python/server/qgsfeaturefilterprovidergroup.sip +++ b/python/server/qgsfeaturefilterprovidergroup.sip @@ -31,6 +31,7 @@ Constructor void filterFeatures( const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures ) const; %Docstring Filter the features of the layer + :param layer: the layer to control :param filterFeatures: the request to fill %End @@ -40,18 +41,15 @@ Filter the features of the layer Return a clone of the object :return: A clone -:rtype: QgsFeatureFilterProvider - %End QgsFeatureFilterProviderGroup &addProvider( const QgsFeatureFilterProvider *provider ); %Docstring Add another filter provider to the group + :param provider: The provider to add :return: itself -:rtype: QgsFeatureFilterProviderGroup - %End }; diff --git a/python/server/qgsrequesthandler.sip b/python/server/qgsrequesthandler.sip index 1e15de251278..b4e522602fbd 100644 --- a/python/server/qgsrequesthandler.sip +++ b/python/server/qgsrequesthandler.sip @@ -59,15 +59,11 @@ Remove an HTTP response header QString responseHeader( const QString &name ) const; %Docstring Retrieve response header value - -:rtype: str %End QMap responseHeaders() const; %Docstring Return the response headers - -:rtype: QMap %End void setRequestHeader( const QString &name, const QString &value ); @@ -83,15 +79,11 @@ Remove an HTTP request header QString requestHeader( const QString &name ) const; %Docstring Retrieve request header value - -:rtype: str %End QMap requestHeaders() const; %Docstring Return the Request headers - -:rtype: QMap %End void clear(); @@ -107,8 +99,6 @@ Set the info format string such as "text/xml" bool exceptionRaised() const; %Docstring Pointer to last raised exception - -:rtype: bool %End void clearBody(); @@ -119,22 +109,16 @@ Clear response buffer QByteArray body() const; %Docstring Return response body data - -:rtype: QByteArray %End QByteArray data() const; %Docstring Return request POST data (can be null) - -:rtype: QByteArray %End QString url() const; %Docstring Return request url - -:rtype: str %End void setStatusCode( int code ); @@ -145,8 +129,6 @@ Set response http status code int statusCode() const; %Docstring Return response http status code - -:rtype: int %End QMap parameterMap() const; @@ -154,8 +136,6 @@ Return response http status code Return the parsed parameters as a key-value pair, to modify a parameter setParameter( const QString &key, const QString &value) and removeParameter(const QString &key) must be used - -:rtype: QMap %End void setParameter( const QString &key, const QString &value ); @@ -166,8 +146,6 @@ Set a request parameter QString parameter( const QString &key ) const; %Docstring Return a request parameter - -:rtype: str %End void removeParameter( const QString &key ); @@ -179,15 +157,11 @@ Remove a request parameter QString format() const; %Docstring Return the requested format string - -:rtype: str %End bool headersSent() const; %Docstring Return true if the HTTP headers were already sent to the client - -:rtype: bool %End }; diff --git a/python/server/qgsserver.sip b/python/server/qgsserver.sip index fd64c9d373e7..638dab66e54a 100644 --- a/python/server/qgsserver.sip +++ b/python/server/qgsserver.sip @@ -30,6 +30,7 @@ Creates the server instance void putenv( const QString &var, const QString &val ); %Docstring Set environment variable + :param var: environment variable name :param val: value @@ -54,8 +55,6 @@ the QGIS_PROJECT_FILE setting QgsServerInterface *serverInterface(); %Docstring Returns a pointer to the server interface - -:rtype: QgsServerInterfaceImpl %End @@ -68,10 +67,6 @@ Note: not in Python bindings private: QgsServer( const QgsServer & ); QgsServer &operator=( const QgsServer & ); -%Docstring - -:rtype: QgsServer -%End }; /************************************************************************ * This file has been generated automatically from * diff --git a/python/server/qgsserverexception.sip b/python/server/qgsserverexception.sip index d42eae5a4c96..6b44d1b5893e 100644 --- a/python/server/qgsserverexception.sip +++ b/python/server/qgsserverexception.sip @@ -32,8 +32,6 @@ Constructor %Docstring :return: the return HTTP response code associated with this exception -:rtype: int - %End virtual QByteArray formatResponse( QString &responseFormat /Out/ ) const; @@ -43,8 +41,6 @@ Format the exception for sending to client :param responseFormat: QString to store the content type of the response format. :return: QByteArray the fermatted response. -:rtype: QByteArray - The defaolt implementation return text/xml format. %End @@ -76,39 +72,29 @@ Construction %Docstring :return: message -:rtype: str - %End QString code() const; %Docstring :return: code -:rtype: str - %End QString locator() const; %Docstring :return: locator -:rtype: str - %End QString version() const; %Docstring return exception version - -:rtype: str %End virtual QByteArray formatResponse( QString &responseFormat /Out/ ) const; %Docstring Overridden from QgsServerException - -:rtype: QByteArray %End }; diff --git a/python/server/qgsserverfilter.sip b/python/server/qgsserverfilter.sip index 1acf0a4b028c..bafb0b473750 100644 --- a/python/server/qgsserverfilter.sip +++ b/python/server/qgsserverfilter.sip @@ -42,8 +42,6 @@ and must be passed to QgsServerFilter instances. QgsServerInterface *serverInterface(); %Docstring Return the QgsServerInterface instance - -:rtype: QgsServerInterface %End virtual void requestReady(); diff --git a/python/server/qgsserverinterface.sip b/python/server/qgsserverinterface.sip index 479a4a10cb91..46965af53a4d 100644 --- a/python/server/qgsserverinterface.sip +++ b/python/server/qgsserverinterface.sip @@ -41,8 +41,6 @@ a certain priority through the registerFilter( QgsServerFilter* , int) method. Get pointer to the capabiblities cache :return: QgsCapabilitiesCache -:rtype: QgsCapabilitiesCache - %End virtual QgsRequestHandler *requestHandler() = 0 /KeepReference/; @@ -50,13 +48,12 @@ Get pointer to the capabiblities cache Get pointer to the request handler :return: QgsRequestHandler -:rtype: QgsRequestHandler - %End virtual void registerFilter( QgsServerFilter *filter /Transfer/, int priority = 0 ) = 0; %Docstring Register a QgsServerFilter + :param filter: the QgsServerFilter to add :param priority: an optional priority for the filter order %End @@ -64,6 +61,7 @@ Register a QgsServerFilter virtual void setFilters( QgsServerFiltersMap *filters /Transfer/ ) = 0; %Docstring Set the filters map + :param filters: the QgsServerFiltersMap %End @@ -72,13 +70,12 @@ Set the filters map Return the list of current QgsServerFilter :return: QgsServerFiltersMap list of QgsServerFilter -:rtype: QgsServerFiltersMap - %End virtual void registerAccessControl( QgsAccessControlFilter *accessControl /Transfer/, int priority = 0 ) = 0; %Docstring Register an access control filter + :param accessControl: the access control to register :param priority: the priority used to order them %End @@ -86,15 +83,11 @@ Register an access control filter virtual QgsAccessControl *accessControls() const = 0; %Docstring Gets the registered access control filters - -:rtype: QgsAccessControl %End virtual QString getEnv( const QString &name ) const = 0; %Docstring Return an enrironment variable, used to pass environment variables to Python - -:rtype: str %End virtual QString configFilePath() = 0; @@ -102,25 +95,26 @@ Return an enrironment variable, used to pass environment variables to Python Return the configuration file path :return: QString containing the configuration file path -:rtype: str - %End virtual void setConfigFilePath( const QString &configFilePath ) = 0; %Docstring Set the configuration file path + :param configFilePath: QString with the configuration file path %End virtual void removeConfigCacheEntry( const QString &path ) = 0; %Docstring Remove entry from config cache + :param path: the path of the file to remove %End virtual void removeProjectLayers( const QString &path ) = 0; %Docstring Remove entries from layer cache + :param path: the path of the project which own the layers to be removed %End @@ -129,8 +123,6 @@ Remove entries from layer cache Return the service registry :return: QgsServiceResgistry -:rtype: QgsServiceRegistry - %End diff --git a/python/server/qgsserverprojectutils.sip b/python/server/qgsserverprojectutils.sip index e72fe14bd5f0..910b9aac975c 100644 --- a/python/server/qgsserverprojectutils.sip +++ b/python/server/qgsserverprojectutils.sip @@ -20,438 +20,394 @@ namespace QgsServerProjectUtils bool owsServiceCapabilities( const QgsProject &project ); %Docstring Returns if owsService capabilities are enabled. + :param project: the QGIS project :return: if owsService capabilities are enabled. -:rtype: bool - %End QString owsServiceTitle( const QgsProject &project ); %Docstring Returns the owsService title defined in project. + :param project: the QGIS project :return: the owsService title if defined in project. -:rtype: str - %End QString owsServiceAbstract( const QgsProject &project ); %Docstring Returns the owsService abstract defined in project. + :param project: the QGIS project :return: the owsService abstract if defined in project. -:rtype: str - %End QStringList owsServiceKeywords( const QgsProject &project ); %Docstring Returns the owsService keywords defined in project. + :param project: the QGIS project :return: the owsService keywords if defined in project. -:rtype: list of str - %End QString owsServiceOnlineResource( const QgsProject &project ); %Docstring Returns the owsService online resource defined in project. + :param project: the QGIS project :return: the owsService online resource if defined in project. -:rtype: str - %End QString owsServiceContactOrganization( const QgsProject &project ); %Docstring Returns the owsService contact organization defined in project. + :param project: the QGIS project :return: the owsService contact organization if defined in project. -:rtype: str - %End QString owsServiceContactPosition( const QgsProject &project ); %Docstring Returns the owsService contact position defined in project. + :param project: the QGIS project :return: the owsService contact position if defined in project. -:rtype: str - %End QString owsServiceContactPerson( const QgsProject &project ); %Docstring Returns the owsService contact person defined in project. + :param project: the QGIS project :return: the owsService contact person if defined in project. -:rtype: str - %End QString owsServiceContactMail( const QgsProject &project ); %Docstring Returns the owsService contact mail defined in project. + :param project: the QGIS project :return: the owsService contact mail if defined in project. -:rtype: str - %End QString owsServiceContactPhone( const QgsProject &project ); %Docstring Returns the owsService contact phone defined in project. + :param project: the QGIS project :return: the owsService contact phone if defined in project. -:rtype: str - %End QString owsServiceFees( const QgsProject &project ); %Docstring Returns the owsService fees defined in project. + :param project: the QGIS project :return: the owsService fees if defined in project. -:rtype: str - %End QString owsServiceAccessConstraints( const QgsProject &project ); %Docstring Returns the owsService access constraints defined in project. + :param project: the QGIS project :return: the owsService access constraints if defined in project. -:rtype: str - %End int wmsMaxWidth( const QgsProject &project ); %Docstring Returns the maximum width for WMS images defined in a QGIS project. + :param project: the QGIS project :return: width if defined in project, -1 otherwise. -:rtype: int - %End int wmsMaxHeight( const QgsProject &project ); %Docstring Returns the maximum height for WMS images defined in a QGIS project. + :param project: the QGIS project :return: height if defined in project, -1 otherwise. -:rtype: int - %End int wmsImageQuality( const QgsProject &project ); %Docstring Returns the quality for WMS images defined in a QGIS project. + :param project: the QGIS project :return: quality if defined in project, -1 otherwise. -:rtype: int - %End bool wmsUseLayerIds( const QgsProject &project ); %Docstring Returns if layer ids are used as name in WMS. + :param project: the QGIS project :return: if layer ids are used as name. -:rtype: bool - %End bool wmsInfoFormatSia2045( const QgsProject &project ); %Docstring Returns if the info format is SIA20145. + :param project: the QGIS project :return: if the info format is SIA20145. -:rtype: bool - %End bool wmsFeatureInfoAddWktGeometry( const QgsProject &project ); %Docstring Returns if the geometry is displayed as Well Known Text in GetFeatureInfo request. + :param project: the QGIS project :return: if the geometry is displayed as Well Known Text in GetFeatureInfo request. -:rtype: bool - %End bool wmsFeatureInfoSegmentizeWktGeometry( const QgsProject &project ); %Docstring Returns if the geometry has to be segmentize in GetFeatureInfo request. + :param project: the QGIS project :return: if the geometry has to be segmentize in GetFeatureInfo request. -:rtype: bool - %End int wmsFeatureInfoPrecision( const QgsProject &project ); %Docstring Returns the geometry precision for GetFeatureInfo request. + :param project: the QGIS project :return: the geometry precision for GetFeatureInfo request. -:rtype: int - %End QString wmsFeatureInfoDocumentElement( const QgsProject &project ); %Docstring Returns the document element name for XML GetFeatureInfo request. + :param project: the QGIS project :return: the document element name for XML GetFeatureInfo request. -:rtype: str - %End QString wmsFeatureInfoDocumentElementNs( const QgsProject &project ); %Docstring Returns the document element namespace for XML GetFeatureInfo request. + :param project: the QGIS project :return: the document element namespace for XML GetFeatureInfo request. -:rtype: str - %End QString wmsFeatureInfoSchema( const QgsProject &project ); %Docstring Returns the schema URL for XML GetFeatureInfo request. + :param project: the QGIS project :return: the schema URL for XML GetFeatureInfo request. -:rtype: str - %End QHash wmsFeatureInfoLayerAliasMap( const QgsProject &project ); %Docstring Returns the mapping between layer name and wms layer name for GetFeatureInfo request. + :param project: the QGIS project :return: the mapping between layer name and wms layer name for GetFeatureInfo request. -:rtype: QHash - %End bool wmsInspireActivate( const QgsProject &project ); %Docstring Returns if Inspire is activated. + :param project: the QGIS project :return: if Inspire is activated. -:rtype: bool - %End QString wmsInspireLanguage( const QgsProject &project ); %Docstring Returns the Inspire language. + :param project: the QGIS project :return: the Inspire language if defined in project. -:rtype: str - %End QString wmsInspireMetadataUrl( const QgsProject &project ); %Docstring Returns the Inspire metadata URL. + :param project: the QGIS project :return: the Inspire metadata URL if defined in project. -:rtype: str - %End QString wmsInspireMetadataUrlType( const QgsProject &project ); %Docstring Returns the Inspire metadata URL type. + :param project: the QGIS project :return: the Inspire metadata URL type if defined in project. -:rtype: str - %End QString wmsInspireTemporalReference( const QgsProject &project ); %Docstring Returns the Inspire temporal reference. + :param project: the QGIS project :return: the Inspire temporal reference if defined in project. -:rtype: str - %End QString wmsInspireMetadataDate( const QgsProject &project ); %Docstring Returns the Inspire metadata date. + :param project: the QGIS project :return: the Inspire metadata date if defined in project. -:rtype: str - %End QStringList wmsRestrictedComposers( const QgsProject &project ); %Docstring Returns the restricted composer list. + :param project: the QGIS project :return: the restricted composer list if defined in project. -:rtype: list of str - %End QString wmsServiceUrl( const QgsProject &project ); %Docstring Returns the WMS service url defined in a QGIS project. + :param project: the QGIS project :return: url if defined in project, an empty string otherwise. -:rtype: str - %End QString wmsRootName( const QgsProject &project ); %Docstring Returns the WMS root layer name defined in a QGIS project. + :param project: the QGIS project :return: root layer name if defined in project, an empty string otherwise. -:rtype: str - %End QStringList wmsRestrictedLayers( const QgsProject &project ); %Docstring Returns the restricted layer name list. + :param project: the QGIS project :return: the restricted layer name list if defined in project. -:rtype: list of str - %End QStringList wmsOutputCrsList( const QgsProject &project ); %Docstring Returns the WMS output CRS list. + :param project: the QGIS project :return: the WMS output CRS list. -:rtype: list of str - %End QgsRectangle wmsExtent( const QgsProject &project ); %Docstring Returns the WMS Extent restriction. + :param project: the QGIS project :return: the WMS Extent restriction. -:rtype: QgsRectangle - %End QString wfsServiceUrl( const QgsProject &project ); %Docstring Returns the WFS service url defined in a QGIS project. + :param project: the QGIS project :return: url if defined in project, an empty string otherwise. -:rtype: str - %End QStringList wfsLayerIds( const QgsProject &project ); %Docstring Returns the Layer ids list defined in a QGIS project as published in WFS. + :param project: the QGIS project @return the Layer ids list. - -:rtype: list of str %End int wfsLayerPrecision( const QgsProject &project, const QString &layerId ); %Docstring Returns the Layer precision defined in a QGIS project for the WFS GetFeature. + :param project: the QGIS project :param layerId: the layer id in the project @return the layer precision for WFS GetFeature. - -:rtype: int %End QStringList wfstUpdateLayerIds( const QgsProject &project ); %Docstring Returns the Layer ids list defined in a QGIS project as published as WFS-T with update capabilities. + :param project: the QGIS project @return the Layer ids list. - -:rtype: list of str %End QStringList wfstInsertLayerIds( const QgsProject &project ); %Docstring Returns the Layer ids list defined in a QGIS project as published as WFS-T with insert capabilities. + :param project: the QGIS project @return the Layer ids list. - -:rtype: list of str %End QStringList wfstDeleteLayerIds( const QgsProject &project ); %Docstring Returns the Layer ids list defined in a QGIS project as published as WFS-T with delete capabilities. + :param project: the QGIS project @return the Layer ids list. - -:rtype: list of str %End QString wcsServiceUrl( const QgsProject &project ); %Docstring Returns the WCS service url defined in a QGIS project. + :param project: the QGIS project :return: url if defined in project, an empty string otherwise. -:rtype: str - %End QStringList wcsLayerIds( const QgsProject &project ); %Docstring Returns the Layer ids list defined in a QGIS project as published in WCS. + :param project: the QGIS project :return: the Layer ids list. -:rtype: list of str - %End }; diff --git a/python/server/qgsserverrequest.sip b/python/server/qgsserverrequest.sip index a393e73f722a..b1dca11c5c68 100644 --- a/python/server/qgsserverrequest.sip +++ b/python/server/qgsserverrequest.sip @@ -63,24 +63,18 @@ destructor %Docstring :return: the request url -:rtype: QUrl - %End QgsServerRequest::Method method() const; %Docstring :return: the request method -:rtype: QgsServerRequest.Method - %End QgsServerRequest::Parameters parameters() const; %Docstring Return a map of query parameters with keys converted to uppercase - -:rtype: QgsServerRequest.Parameters %End void setParameter( const QString &key, const QString &value ); @@ -91,8 +85,6 @@ Set a parameter QString parameter( const QString &key ) const; %Docstring Get a parameter value - -:rtype: str %End void removeParameter( const QString &key ); @@ -103,15 +95,15 @@ Remove a parameter QString header( const QString &name ) const; %Docstring Return the header value + :param name: of the header @return the header value or an empty string - -:rtype: str %End void setHeader( const QString &name, const QString &value ); %Docstring Set an header + :param name: :param value: %End @@ -120,13 +112,12 @@ Set an header %Docstring Return the header map @return the headers map - -:rtype: QMap %End void removeHeader( const QString &name ); %Docstring Remove an header + :param name: %End @@ -135,8 +126,6 @@ Remove an header Return post/put data Check for QByteArray.isNull() to check if data is available. - -:rtype: QByteArray %End void setUrl( const QUrl &url ); diff --git a/python/server/qgsserverresponse.sip b/python/server/qgsserverresponse.sip index 0b611c289f74..947d17778d93 100644 --- a/python/server/qgsserverresponse.sip +++ b/python/server/qgsserverresponse.sip @@ -46,36 +46,29 @@ Undo a previous 'setHeader' call virtual QString header( const QString &key ) const = 0; %Docstring Return the header value - -:rtype: str %End virtual QMap headers() const = 0; %Docstring Return the header value - -:rtype: QMap %End virtual bool headersSent() const = 0; %Docstring Return true if the headers have alredy been sent - -:rtype: bool %End virtual void setStatusCode( int code ) = 0; %Docstring Set the http status code + :param code: HTTP status code value %End virtual int statusCode() const = 0; %Docstring Return the http status code - -:rtype: int %End virtual void sendError( int code, const QString &message ) = 0; @@ -85,6 +78,7 @@ This method delegates error handling at the server level. This is different from calling setReturnCode() which let you return a specific response body. Calling sendError() will end the transaction and any attempt to write data or set headers will be an error. + :param code: HHTP return code value :param message: An informative error message %End @@ -103,8 +97,6 @@ This is a convenient method that will write directly to the underlying I/O device :return: the number of bytes that were actually written -:rtype: qint64 - %End @@ -117,8 +109,6 @@ Write server exception virtual QIODevice *io() = 0; %Docstring Return the underlying QIODevice - -:rtype: QIODevice %End virtual void finish() = 0; @@ -148,8 +138,6 @@ give access to the underlying and return an empty array. Note that each call to 'flush' may empty the buffer and in case of streaming process you may get partial content - -:rtype: QByteArray %End virtual void truncate() = 0; diff --git a/python/server/qgsserversettings.sip b/python/server/qgsserversettings.sip index 38ae15685b30..2a5bf1c0da28 100644 --- a/python/server/qgsserversettings.sip +++ b/python/server/qgsserversettings.sip @@ -41,8 +41,6 @@ Load settings according to current environment variables. Load setting for a specific environment variable name. :return: true if loading is successful, false in case of an invalid name. -:rtype: bool - %End void logSummary() const; @@ -55,8 +53,6 @@ Log a summary of settings currently loaded. Returns the ini file loaded by QSetting. :return: the path of the ini file or an empty string if none is loaded. -:rtype: str - %End bool parallelRendering() const; @@ -64,8 +60,6 @@ Returns the ini file loaded by QSetting. Returns parallel rendering setting. :return: true if parallel rendering is activated, false otherwise. -:rtype: bool - %End int maxThreads() const; @@ -73,8 +67,6 @@ Returns parallel rendering setting. Returns the maximum number of threads to use. :return: the number of threads. -:rtype: int - %End int maxCacheLayers() const; @@ -82,8 +74,6 @@ Returns the maximum number of threads to use. Returns the maximum number of cached layers. :return: the number of cached layers. -:rtype: int - %End QgsMessageLog::MessageLevel logLevel() const; @@ -91,8 +81,6 @@ Returns the maximum number of cached layers. Returns the log level. :return: the log level. -:rtype: QgsMessageLog.MessageLevel - %End QString projectFile() const; @@ -100,8 +88,6 @@ Returns the log level. Returns the QGS project file to use. :return: the path of the QGS project or an empty string if none is defined. -:rtype: str - %End QString logFile() const; @@ -109,8 +95,6 @@ Returns the QGS project file to use. Returns the log file. :return: the path of the log file or an empty string if none is defined. -:rtype: str - %End qint64 cacheSize() const; @@ -118,8 +102,6 @@ Returns the log file. Returns the cache size. :return: the cache size. -:rtype: qint64 - %End QString cacheDirectory() const; @@ -127,8 +109,6 @@ Returns the cache size. Returns the cache directory. :return: the directory. -:rtype: str - %End }; diff --git a/python/server/qgsservice.sip b/python/server/qgsservice.sip index 14414849a698..ba45cadb8621 100644 --- a/python/server/qgsservice.sip +++ b/python/server/qgsservice.sip @@ -44,24 +44,18 @@ Destructor %Docstring :return: the name of the service -:rtype: str - %End virtual QString version() const = 0; %Docstring :return: the version of the service -:rtype: str - %End virtual bool allowMethod( QgsServerRequest::Method ) const = 0; %Docstring Return true if the given method is supported for that service. - -:rtype: bool %End virtual void executeRequest( const QgsServerRequest &request, diff --git a/python/server/qgsservicemodule.sip b/python/server/qgsservicemodule.sip index d50bbc0912cc..0ca76537bd99 100644 --- a/python/server/qgsservicemodule.sip +++ b/python/server/qgsservicemodule.sip @@ -41,6 +41,7 @@ Destructor QgsServerInterface *serverIface = 0 ) = 0; %Docstring Ask module to register all provided services + :param registry: QgsServiceRegistry %End }; diff --git a/python/server/qgsserviceregistry.sip b/python/server/qgsserviceregistry.sip index ee20b4c176cf..2d2f5f0e9381 100644 --- a/python/server/qgsserviceregistry.sip +++ b/python/server/qgsserviceregistry.sip @@ -44,12 +44,11 @@ Destructor QgsService *getService( const QString &name, const QString &version = QString() ); %Docstring Retrieve a service from its name + :param name: the name of the service :param version: the version string (optional) :return: QgsService -:rtype: QgsService - If the version is not provided the higher version of the service is returned %End @@ -74,8 +73,6 @@ Unregister service from its name and version :param version: (optional) the specific version to unload :return: the number of services unregistered -:rtype: int - If the version is not specified then all versions from the specified service are unloaded @@ -84,6 +81,7 @@ are unloaded void init( const QString &nativeModulepath, QgsServerInterface *serverIface = 0 ); %Docstring Initialize registry, load modules and auto register services + :param serverIface: the server interface :param nativeModulepath: the native module path %End diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 12b933f97ab7..13147598066a 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -131,12 +131,12 @@ sub processDoxygenLine { $line =~ s/\s*\\return(s)?/\n:return:/; if ( $line =~ m/\\param / ){ + $line =~ s/\s*\\param (\w+)\b/:param $1:/g; if ( $COMMENT_PARAM_LIST == 0 ) { $line = "\n$line"; } $COMMENT_PARAM_LIST = 1; - $line =~ s/\s*\\param (\w+)\b/:param $1:/g; } @@ -947,27 +947,27 @@ sub detect_comment_block{ } else { dbg_info('writing comment'); - write_output("CM1", "%Docstring\n"); if ( $COMMENT !~ m/^\s*$/ ){ + write_output("CM1", "%Docstring\n"); my @comment_lines = split /\n/, $COMMENT; foreach my $comment_line (@comment_lines) { - if ( $RETURN_TYPE ne '' && $comment_line =~ m/^\s*\.\. \w/ ){ - # return type must be added before any other paragraph-level markup - write_output("CM5", ":rtype: $RETURN_TYPE\n\n"); - $RETURN_TYPE = ''; - } + # if ( $RETURN_TYPE ne '' && $comment_line =~ m/^\s*\.\. \w/ ){ + # # return type must be added before any other paragraph-level markup + # write_output("CM5", ":rtype: $RETURN_TYPE\n\n"); + # $RETURN_TYPE = ''; + # } write_output("CM2", "$comment_line\n"); - if ( $RETURN_TYPE ne '' && $comment_line =~ m/:return:/ ){ - # return type must be added before any other paragraph-level markup - write_output("CM5", ":rtype: $RETURN_TYPE\n\n"); - $RETURN_TYPE = ''; - } + # if ( $RETURN_TYPE ne '' && $comment_line =~ m/:return:/ ){ + # # return type must be added before any other paragraph-level markup + # write_output("CM5", ":rtype: $RETURN_TYPE\n\n"); + # $RETURN_TYPE = ''; + # } } - } - if ( $RETURN_TYPE ne '' ){ - write_output("CM3", "\n:rtype: $RETURN_TYPE\n"); - } write_output("CM4", "%End\n"); + } + # if ( $RETURN_TYPE ne '' ){ + # write_output("CM3", "\n:rtype: $RETURN_TYPE\n"); + # } } $COMMENT = ''; $RETURN_TYPE = ''; diff --git a/tests/code_layout/sipifyheader.expected.sip b/tests/code_layout/sipifyheader.expected.sip index a928e356c74b..8cc53f532c8c 100644 --- a/tests/code_layout/sipifyheader.expected.sip +++ b/tests/code_layout/sipifyheader.expected.sip @@ -147,15 +147,9 @@ A multiline method signature virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/; %Docstring Factory annotation - -:rtype: QgsMapLayerRenderer %End SomeObject *createAnother() /Factory/; -%Docstring - -:rtype: SomeObject -%End virtual SomeObject *createAnother2() /Factory/; @@ -178,15 +172,9 @@ Here's some comment mentioning another class QgsAutoAwesomemater.makeLessAwesome I return a pointer. If something bad happens, I return None. :return: pointer to something cool -:rtype: MyPointer - %End bool isOKwithErrMesg( QString &ErrMsg /Out/ ); -%Docstring - -:rtype: bool -%End void InOutParam( bool &ok = true /In,Out/ ); @@ -202,26 +190,14 @@ complex default value and type (i.e. containing commas) should be given as a str %End int inlineKeyWordShouldNotAppear(); -%Docstring - -:rtype: int -%End QString labelForRange( double lower, double upper ) const /PyName=labelForLowerUpper/; -%Docstring - -:rtype: str -%End void setComposition( QgsComposition *c /KeepReference/ ); void removeProxyFactory( QNetworkProxyFactory *factory /TransferBack/ ); bool removeFunctionBody( const QList &list, QgsVectorLayer *vl, Some::Thing _part = -1 /*default =-1*/ ); -%Docstring - -:rtype: bool -%End void multilineBodyAndDefinition( const QList &list2 ); QString returnTypeString() const; -%Docstring - -:rtype: str -%End double returnTypeDouble() const; -%Docstring - -:rtype: float -%End QList< QgsAnnotation * > returnTypeList(); -%Docstring - -:rtype: list of QgsAnnotation -%End QVector< QgsAnnotation > returnTypeVector(); -%Docstring - -:rtype: list of QgsAnnotation -%End QStringList returnTypeStringList(); -%Docstring - -:rtype: list of str -%End QSet returnTypeSet(); -%Docstring - -:rtype: set of QgsActionScope -%End This shouldBeIncluded; static QString invokableMethod(); -%Docstring - -:rtype: str -%End bool initializedMember; @@ -310,10 +252,6 @@ Mulitline body explicit PublicStruct( int _part = -1, int _ring = -1, int _vertex = -1, VertexType _type = SegmentVertex ); bool isValid( const QgsAbstractGeometry *geom ) const; -%Docstring - -:rtype: bool -%End int part; int ring; @@ -361,10 +299,6 @@ remove argument protected: bool thisShouldBeListed(); -%Docstring - -:rtype: bool -%End private: