|
QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
|
A template based class for storing ranges (lower to upper values). More...
#include <qgsrange.h>
Public Member Functions | |
| QgsRange (T lower, T upper, bool includeLower=true, bool includeUpper=true) | |
| Constructor for QgsRange. | |
| QgsRange (T lower, T upper, Qgis::RangeLimits limits) | |
| Constructor for QgsRange. | |
| bool | contains (const QgsRange< T > &other) const |
Returns true if this range contains another range. | |
| bool | contains (T element) const |
Returns true if this range contains a specified element. | |
| bool | includeLower () const |
Returns true if the lower bound is inclusive, or false if the lower bound is exclusive. | |
| bool | includeUpper () const |
Returns true if the upper bound is inclusive, or false if the upper bound is exclusive. | |
| bool | isEmpty () const |
Returns true if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either the bounds are exclusive. | |
| bool | isSingleton () const |
Returns true if the range consists only of a single value or instant. | |
| T | lower () const |
| Returns the lower bound of the range. | |
| bool | operator!= (const QgsRange< T > &other) const |
| bool | operator== (const QgsRange< T > &other) const |
| bool | overlaps (const QgsRange< T > &other) const |
Returns true if this range overlaps another range. | |
| Qgis::RangeLimits | rangeLimits () const |
| Returns the limit handling of the range. | |
| T | upper () const |
| Returns the upper bound of the range. | |
Protected Attributes | |
| bool | mIncludeLower = true |
| bool | mIncludeUpper = true |
| T | mLower |
| T | mUpper |
A template based class for storing ranges (lower to upper values).
QgsRange classes represent a range of values of some element type. For instance, ranges of int might be used to represent integer ranges.
Ranges can indicate whether the upper and lower values are inclusive or exclusive. The inclusivity or exclusivity of bounds is considered when determining things like whether ranges overlap or during calculation of range intersections.
Definition at line 47 of file qgsrange.h.
|
inline |
Constructor for QgsRange.
The lower and upper bounds are specified, and optionally whether or not these bounds are included in the range.
Definition at line 54 of file qgsrange.h.
|
inline |
Constructor for QgsRange.
The lower and upper bounds are specified, and whether or not these bounds are included in the range.
Definition at line 67 of file qgsrange.h.
Returns true if this range contains another range.
Definition at line 138 of file qgsrange.h.
|
inline |
Returns true if this range contains a specified element.
Definition at line 154 of file qgsrange.h.
|
inline |
Returns true if the lower bound is inclusive, or false if the lower bound is exclusive.
Definition at line 94 of file qgsrange.h.
|
inline |
Returns true if the upper bound is inclusive, or false if the upper bound is exclusive.
Definition at line 102 of file qgsrange.h.
|
inline |
Returns true if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either the bounds are exclusive.
Definition at line 126 of file qgsrange.h.
|
inline |
Returns true if the range consists only of a single value or instant.
Definition at line 132 of file qgsrange.h.
|
inline |
Returns the lower bound of the range.
Definition at line 79 of file qgsrange.h.
Definition at line 193 of file qgsrange.h.
Definition at line 191 of file qgsrange.h.
Returns true if this range overlaps another range.
Definition at line 171 of file qgsrange.h.
|
inline |
|
inline |
Returns the upper bound of the range.
Definition at line 86 of file qgsrange.h.
|
protected |
Definition at line 198 of file qgsrange.h.
|
protected |
Definition at line 199 of file qgsrange.h.
|
protected |
Definition at line 196 of file qgsrange.h.
|
protected |
Definition at line 197 of file qgsrange.h.