Skip to content

Commit

Permalink
Expose a method to Python
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 13, 2018
1 parent 0ab6327 commit a2042a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions python/core/auto_generated/raster/qgsrasterrange.sip.in
Expand Up @@ -64,6 +64,15 @@ Sets the maximum value for the range.

bool operator==( QgsRasterRange o ) const;

static bool contains( double value, const QgsRasterRangeList &rangeList );
%Docstring
Tests if a ``value`` is within the list of ranges

:param value: value
:param rangeList: list of ranges

:return: true if value is in at least one of ranges
%End

};

Expand Down
3 changes: 1 addition & 2 deletions src/core/raster/qgsrasterrange.h
Expand Up @@ -80,9 +80,8 @@ class CORE_EXPORT QgsRasterRange
* \param value value
* \param rangeList list of ranges
* \returns true if value is in at least one of ranges
* \note not available in Python bindings
*/
static bool contains( double value, const QgsRasterRangeList &rangeList ) SIP_SKIP;
static bool contains( double value, const QgsRasterRangeList &rangeList );

private:
double mMin = std::numeric_limits<double>::quiet_NaN();
Expand Down

0 comments on commit a2042a4

Please sign in to comment.