QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
QgsDoubleRange Class Reference

QgsRange which stores a range of double values. More...

#include <qgsrange.h>

Inheritance diagram for QgsDoubleRange:
Inheritance graph
[legend]

Public Member Functions

 QgsDoubleRange (double lower, double upper, Qgis::RangeLimits limits)
 Constructor for QgsDoubleRange. More...
 
 QgsDoubleRange (double lower=std::numeric_limits< double >::lowest(), double upper=std::numeric_limits< double >::max(), bool includeLower=true, bool includeUpper=true)
 Constructor for QgsDoubleRange. More...
 
bool isInfinite () const
 Returns true if the range consists of all possible values. More...
 
bool operator!= (const QgsDoubleRange &other) const
 
bool operator== (const QgsDoubleRange &other) const
 
- Public Member Functions inherited from QgsRange< double >
 QgsRange (double lower, double upper, bool includeLower=true, bool includeUpper=true)
 Constructor for QgsRange. More...
 
 QgsRange (double lower, double upper, Qgis::RangeLimits limits)
 Constructor for QgsRange. More...
 
bool contains (const QgsRange< double > &other) const
 Returns true if this range contains another range. More...
 
bool contains (double element) const
 Returns true if this range contains a specified element. More...
 
bool includeLower () const
 Returns true if the lower bound is inclusive, or false if the lower bound is exclusive. More...
 
bool includeUpper () const
 Returns true if the upper bound is inclusive, or false if the upper bound is exclusive. More...
 
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. More...
 
bool isSingleton () const
 Returns true if the range consists only of a single value or instant. More...
 
double lower () const
 Returns the lower bound of the range. More...
 
bool operator!= (const QgsRange< double > &other) const
 
bool operator== (const QgsRange< double > &other) const
 
bool overlaps (const QgsRange< double > &other) const
 Returns true if this range overlaps another range. More...
 
Qgis::RangeLimits rangeLimits () const
 Returns the limit handling of the range. More...
 
double upper () const
 Returns the upper bound of the range. More...
 

Additional Inherited Members

- Protected Attributes inherited from QgsRange< double >
bool mIncludeLower
 
bool mIncludeUpper
 
double mLower
 
double mUpper
 

Detailed Description

QgsRange which stores a range of double values.

See also
QgsIntRange
QgsDateRange
QgsDateTimeRange

Definition at line 230 of file qgsrange.h.

Constructor & Destructor Documentation

◆ QgsDoubleRange() [1/2]

QgsDoubleRange::QgsDoubleRange ( double  lower,
double  upper,
Qgis::RangeLimits  limits 
)
inline

Constructor for QgsDoubleRange.

The lower and upper bounds are specified, and whether or not these bounds are included in the range.

Since
QGIS 3.38

Definition at line 240 of file qgsrange.h.

◆ QgsDoubleRange() [2/2]

QgsDoubleRange::QgsDoubleRange ( double  lower = std::numeric_limits< double >::lowest(),
double  upper = std::numeric_limits< double >::max(),
bool  includeLower = true,
bool  includeUpper = true 
)
inline

Constructor for QgsDoubleRange.

The lower and upper bounds are specified, and optionally whether or not these bounds are included in the range.

The default values for lower and upper construct an infinite range (see isInfinite()).

Since
QGIS 3.18

Definition at line 254 of file qgsrange.h.

Member Function Documentation

◆ isInfinite()

bool QgsDoubleRange::isInfinite ( ) const
inline

Returns true if the range consists of all possible values.

Since
QGIS 3.18

Definition at line 285 of file qgsrange.h.

◆ operator!=()

bool QgsDoubleRange::operator!= ( const QgsDoubleRange other) const
inline

Definition at line 309 of file qgsrange.h.

◆ operator==()

bool QgsDoubleRange::operator== ( const QgsDoubleRange other) const
inline

Definition at line 301 of file qgsrange.h.


The documentation for this class was generated from the following file: