QGIS API Documentation 3.41.0-Master (d2aaa9c6e02)
|
A template based class for storing temporal ranges (beginning to end values). More...
#include <qgsrange.h>
Public Member Functions | |
QgsTemporalRange (const T &begin=T(), const T &end=T(), bool includeBeginning=true, bool includeEnd=true) | |
Constructor for QgsTemporalRange. | |
T | begin () const |
Returns the beginning of the range. | |
bool | contains (const QgsTemporalRange< T > &other) const |
Returns true if this range contains another range. | |
bool | contains (const T &element) const |
Returns true if this range contains a specified element. | |
T | end () const |
Returns the upper bound of the range. | |
bool | extend (const QgsTemporalRange< T > &other) |
Extends the range in place by extending this range out to include an other range. | |
bool | includeBeginning () const |
Returns true if the beginning is inclusive, or false if the beginning is exclusive. | |
bool | includeEnd () const |
Returns true if the end is inclusive, or false if the end is exclusive. | |
bool | isEmpty () const |
Returns true if the range is empty, ie the beginning equals (or exceeds) the end and either of the bounds are exclusive. | |
bool | isInfinite () const |
Returns true if the range consists of all possible values. | |
bool | isInstant () const |
Returns true if the range consists only of a single instant. | |
bool | operator!= (const QgsTemporalRange< T > &other) const |
bool | operator== (const QgsTemporalRange< T > &other) const |
bool | overlaps (const QgsTemporalRange< T > &other) const |
Returns true if this range overlaps another range. | |
Static Public Member Functions | |
static QList< QgsTemporalRange< T > > | mergeRanges (const QList< QgsTemporalRange< T > > &ranges) |
Merges a list of temporal ranges. | |
A template based class for storing temporal ranges (beginning to end values).
QgsTemporalRange classes represent a range of values of some temporal type. For instance, ranges of QDateTime might be used to represent datetime 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 424 of file qgsrange.h.
|
inline |
Constructor for QgsTemporalRange.
The begin and end are specified, and optionally whether or not these bounds are included in the range.
Definition at line 434 of file qgsrange.h.
|
inline |
Returns the beginning of the range.
Definition at line 450 of file qgsrange.h.
|
inline |
Returns true
if this range contains another range.
Definition at line 516 of file qgsrange.h.
|
inline |
Returns true
if this range contains a specified element.
Definition at line 548 of file qgsrange.h.
|
inline |
Returns the upper bound of the range.
Definition at line 457 of file qgsrange.h.
|
inline |
Extends the range in place by extending this range out to include an other range.
If other is empty the range is not changed. If the range is empty and other is not, the range is changed and set to other.
true
if the range was extended Definition at line 610 of file qgsrange.h.
|
inline |
Returns true
if the beginning is inclusive, or false
if the beginning is exclusive.
Definition at line 465 of file qgsrange.h.
|
inline |
Returns true
if the end is inclusive, or false
if the end is exclusive.
Definition at line 472 of file qgsrange.h.
|
inline |
Returns true
if the range is empty, ie the beginning equals (or exceeds) the end and either of the bounds are exclusive.
A range with both invalid beginning and end is considered infinite and not empty.
Definition at line 496 of file qgsrange.h.
|
inline |
Returns true
if the range consists of all possible values.
Definition at line 486 of file qgsrange.h.
|
inline |
Returns true
if the range consists only of a single instant.
Definition at line 479 of file qgsrange.h.
|
inlinestatic |
Merges a list of temporal ranges.
Any overlapping ranges will be converted to a single range which covers the entire range of the input ranges.
The returned value will be a list of non-contiguous ranges which completely encompass the input ranges, sorted in ascending order.
Definition at line 673 of file qgsrange.h.
|
inline |
Definition at line 712 of file qgsrange.h.
|
inline |
Definition at line 704 of file qgsrange.h.
|
inline |
Returns true
if this range overlaps another range.
Definition at line 575 of file qgsrange.h.