Class: QgsIntRange¶
-
class
qgis.core.
QgsIntRange
(lower: int, upper: int, includeLower: bool = True, includeUpper: bool = True)¶ Bases:
sip.wrapper
Constructor for QgsRange. The
lower
andupper
bounds are specified, and optionally whether or not these bounds are included in the range.QgsIntRange(QgsIntRange)
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.
See also
See also
Note
not available in Python bindings (but class provided for template-based inheritance)
New in version 3.0: Enums
Methods
Returns
True
if this range contains another range.Returns
True
if the lower bound is inclusive, orFalse
if the lower bound is exclusive.Returns
True
if the upper bound is inclusive, orFalse
if the upper 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.Returns
True
if the range consists only of a single value or instant.Returns the lower bound of the range.
Returns
True
if this range overlaps another range.Returns the upper bound of the range.
Signals
Attributes
-
contains
(self, other: QgsIntRange) → bool¶ Returns
True
if this range contains another range.See also
contains(self, element: int) -> bool Returns
True
if this range contains a specifiedelement
.
-
includeLower
(self) → bool¶ Returns
True
if the lower bound is inclusive, orFalse
if the lower bound is exclusive.See also
See also
-
includeUpper
(self) → bool¶ Returns
True
if the upper bound is inclusive, orFalse
if the upper bound is exclusive.See also
See also
-
isEmpty
(self) → bool¶ Returns
True
if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either the bounds are exclusive.See also
-
isSingleton
(self) → bool¶ Returns
True
if the range consists only of a single value or instant.See also
-
lower
(self) → int¶ Returns the lower bound of the range.
See also
See also
-
overlaps
(self, other: QgsIntRange) → bool¶ Returns
True
if this range overlaps another range.See also
-
upper
(self) → int¶ Returns the upper bound of the range.
See also
See also
-