Skip to content
Permalink
Browse files

Add 'accessor for' to doxygen compliance blacklist

Use "Returns the..." instead
  • Loading branch information
nyalldawson committed May 26, 2018
1 parent 487a6a8 commit b6b08e96a0ae3ae984f77fc2519663ad004e8ee0
@@ -33,16 +33,16 @@ Constructor

void setDpi( double dpi );
%Docstring
Set the dpi to be used in scale calculations
Sets the ``dpi`` (dots per inch) for the output resolution, to be used in scale calculations.

:param dpi: Dots per inch of monitor resolution
.. seealso:: :py:func:`dpi`
%End

double dpi();
%Docstring
Accessor for dpi used in scale calculations
Returns the DPI (dots per inch) used in scale calculations.

:return: int the dpi used for scale calculations.
.. seealso:: :py:func:`setDpi`
%End

void setMapUnits( QgsUnitTypes::DistanceUnit mapUnits );
@@ -437,7 +437,7 @@ Removes a vector layer join

QgsVectorLayerJoinBuffer *joinBuffer();
%Docstring
Accessor to the join buffer object
Returns the join buffer object.

.. versionadded:: 2.14.7
%End
@@ -224,7 +224,7 @@ to caller.

virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() );
%Docstring
Accessor for the raster layers pyramid list.
Returns 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
@@ -199,7 +199,7 @@ Set the data provider.

LayerType rasterType();
%Docstring
Accessor for raster layer type (which is a read only property)
Returns the raster layer type (which is a read only property).
%End

void setRenderer( QgsRasterRenderer *renderer /Transfer/ );
@@ -218,27 +218,31 @@ Sets raster resample filter. Takes ownership of the resample filter object

QgsRasterPipe *pipe();
%Docstring
Get raster pipe
Returns the raster pipe.
%End

int width() const;
%Docstring
Accessor that returns the width of the (unclipped) raster
Returns the width of the (unclipped) raster.

.. seealso:: :py:func:`height`
%End

int height() const;
%Docstring
Accessor that returns the height of the (unclipped) raster
Returns the height of the (unclipped) raster.

.. seealso:: :py:func:`width`
%End

int bandCount() const;
%Docstring
Get the number of bands in this layer
Returns the number of bands in this layer.
%End

QString bandName( int bandNoInt ) const;
%Docstring
Get the name of a band given its number
Returns the name of a band given its number.
%End

virtual QgsRasterDataProvider *dataProvider();
@@ -40,14 +40,19 @@ Constructor for QgsRasterTransparency.
double percentTransparent;
};


QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList() const;
%Docstring
Accessor for transparentSingleValuePixelList
Returns the transparent single value pixel list.

.. seealso:: :py:func:`setTransparentSingleValuePixelList`
%End

QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList() const;
%Docstring
Accessor for transparentThreeValuePixelList
Returns the transparent three value pixel list.

.. seealso:: :py:func:`setTransparentThreeValuePixelList`
%End

void initializeTransparentPixelList( double value );
@@ -63,11 +68,15 @@ Resets the transparency list to single red, green, and blue values.
void setTransparentSingleValuePixelList( const QList<QgsRasterTransparency::TransparentSingleValuePixel> &newList );
%Docstring
Sets the transparent single value pixel list, replacing the whole existing list.

.. seealso:: :py:func:`transparentSingleValuePixelList`
%End

void setTransparentThreeValuePixelList( const QList<QgsRasterTransparency::TransparentThreeValuePixel> &newList );
%Docstring
Sets the transparent three value pixel list, replacing the whole existing list.

.. seealso:: :py:func:`transparentThreeValuePixelList`
%End

int alphaValue( double value, int globalTransparency = 255 ) const;
@@ -58,7 +58,7 @@ class APP_EXPORT QgsProjectProperties : public QgsOptionsDialogBase, private Ui:
QString title() const;
void title( QString const &title );

//! Accessor for projection
//! Returns the projection as a WKT string
QString projectionWkt();

public slots:
@@ -44,14 +44,14 @@ class CORE_EXPORT QgsScaleCalculator
QgsUnitTypes::DistanceUnit mapUnits = QgsUnitTypes::DistanceMeters );

/**
* Set the dpi to be used in scale calculations
* \param dpi Dots per inch of monitor resolution
* Sets the \a dpi (dots per inch) for the output resolution, to be used in scale calculations.
* \see dpi()
*/
void setDpi( double dpi );

/**
* Accessor for dpi used in scale calculations
* \returns int the dpi used for scale calculations.
* Returns the DPI (dots per inch) used in scale calculations.
* \see setDpi()
*/
double dpi();

@@ -504,7 +504,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
bool removeJoin( const QString &joinLayerId );

/**
* Accessor to the join buffer object
* Returns the join buffer object.
* \since QGIS 2.14.7
*/
QgsVectorLayerJoinBuffer *joinBuffer() { return mJoinBuffer; }
@@ -312,7 +312,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
}

/**
* \brief Accessor for the raster layers pyramid list.
* Returns 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
@@ -262,7 +262,9 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
*/
void setDataProvider( const QString &provider, const QgsDataProvider::ProviderOptions &options );

//! \brief Accessor for raster layer type (which is a read only property)
/**
* Returns the raster layer type (which is a read only property).
*/
LayerType rasterType() { return mRasterType; }

//! Sets raster renderer. Takes ownership of the renderer object
@@ -275,19 +277,31 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
QgsBrightnessContrastFilter *brightnessFilter() const { return mPipe.brightnessFilter(); }
QgsHueSaturationFilter *hueSaturationFilter() const { return mPipe.hueSaturationFilter(); }

//! Get raster pipe
/**
* Returns the raster pipe.
*/
QgsRasterPipe *pipe() { return &mPipe; }

//! \brief Accessor that returns the width of the (unclipped) raster
/**
* Returns the width of the (unclipped) raster.
* \see height()
*/
int width() const;

//! \brief Accessor that returns the height of the (unclipped) raster
/**
* Returns the height of the (unclipped) raster.
* \see width()
*/
int height() const;

//! \brief Get the number of bands in this layer
/**
* Returns the number of bands in this layer.
*/
int bandCount() const;

//! \brief Get the name of a band given its number
/**
* Returns the name of a band given its number.
*/
QString bandName( int bandNoInt ) const;

// Returns nullptr if not using the data provider model (i.e. directly using GDAL)
@@ -60,10 +60,17 @@ class CORE_EXPORT QgsRasterTransparency
//
// Initializer, Accessor and mutator for transparency tables.
//
//! \brief Accessor for transparentSingleValuePixelList

/**
* Returns the transparent single value pixel list.
* \see setTransparentSingleValuePixelList()
*/
QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList() const;

//! \brief Accessor for transparentThreeValuePixelList
/**
* Returns the transparent three value pixel list.
* \see setTransparentThreeValuePixelList()
*/
QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList() const;

/**
@@ -78,11 +85,13 @@ class CORE_EXPORT QgsRasterTransparency

/**
* Sets the transparent single value pixel list, replacing the whole existing list.
* \see transparentSingleValuePixelList()
*/
void setTransparentSingleValuePixelList( const QList<QgsRasterTransparency::TransparentSingleValuePixel> &newList );

/**
* Sets the transparent three value pixel list, replacing the whole existing list.
* \see transparentThreeValuePixelList()
*/
void setTransparentThreeValuePixelList( const QList<QgsRasterTransparency::TransparentThreeValuePixel> &newList );

@@ -579,6 +579,8 @@ def memberDocIsNonCompliant(self, member_elem):
return 'Use "Sets the..." instead of "setter"'
elif para.text.strip().lower().startswith('mutator'):
return 'Use "Sets the..." instead of "mutator for..."'
elif para.text.strip().lower().startswith('accessor'):
return 'Use "Returns the..." instead of "accessor for..."'
elif para.text.strip().lower().startswith('return '):
return 'Use "Returns the..." instead of "return ..."'
#elif para.text.strip().lower().startswith('set '):

0 comments on commit b6b08e9

Please sign in to comment.
You can’t perform that action at this time.