|
QGIS API Documentation 3.99.0-Master (752b475928d)
|
Represents a range of raster values between min and max, optionally including the min and max value. More...
#include <qgsrasterrange.h>
Public Types | |
| enum | BoundsType { IncludeMinAndMax = 0 , IncludeMax , IncludeMin , Exclusive } |
| Handling for min and max bounds. More... | |
Public Member Functions | |
| QgsRasterRange ()=default | |
| Default constructor, both min and max value for the range will be set to NaN. | |
| QgsRasterRange (double min, double max, BoundsType bounds=IncludeMinAndMax) | |
| Constructor for a range with the given min and max values. | |
| QString | asText () const |
| Returns a text representation of the range. | |
| BoundsType | bounds () const |
| Returns the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range. | |
| bool | contains (double value) const |
Returns true if this range contains the specified value. | |
| double | max () const |
| Returns the maximum value for the range. | |
| double | min () const |
| Returns the minimum value for the range. | |
| bool | operator== (const QgsRasterRange &o) const |
| bool | overlaps (const QgsRasterRange &other) const |
Returns true if this range overlaps another range. | |
| void | setBounds (BoundsType type) |
| Sets the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range. | |
| double | setMax (double max) |
| Sets the maximum value for the range. | |
| double | setMin (double min) |
| Sets the minimum value for the range. | |
Static Public Member Functions | |
| static bool | contains (double value, const QgsRasterRangeList &rangeList) |
| Tests if a value is within the list of ranges. | |
Represents a range of raster values between min and max, optionally including the min and max value.
Definition at line 36 of file qgsrasterrange.h.
Handling for min and max bounds.
Definition at line 41 of file qgsrasterrange.h.
|
default |
Default constructor, both min and max value for the range will be set to NaN.
| QgsRasterRange::QgsRasterRange | ( | double | min, |
| double | max, | ||
| BoundsType | bounds = IncludeMinAndMax ) |
Constructor for a range with the given min and max values.
The bounds argument dictates how the min and max value themselves will be handled by the range.
Definition at line 20 of file qgsrasterrange.cpp.
| QString QgsRasterRange::asText | ( | ) | const |
Returns a text representation of the range.
Definition at line 68 of file qgsrasterrange.cpp.
|
inline |
Returns the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range.
Definition at line 81 of file qgsrasterrange.h.
|
inline |
Returns true if this range contains the specified value.
Definition at line 115 of file qgsrasterrange.h.
|
inlinestatic |
Tests if a value is within the list of ranges.
| value | value |
| rangeList | list of ranges |
true if value is in at least one of ranges Definition at line 132 of file qgsrasterrange.h.
|
inline |
Returns the maximum value for the range.
Definition at line 72 of file qgsrasterrange.h.
|
inline |
Returns the minimum value for the range.
Definition at line 66 of file qgsrasterrange.h.
|
inline |
Definition at line 104 of file qgsrasterrange.h.
| bool QgsRasterRange::overlaps | ( | const QgsRasterRange & | other | ) | const |
Returns true if this range overlaps another range.
Definition at line 27 of file qgsrasterrange.cpp.
|
inline |
Sets the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range.
Definition at line 102 of file qgsrasterrange.h.
|
inline |
|
inline |