QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsIntRange Class Reference

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

#include <qgsrange.h>

Inheritance diagram for QgsIntRange:
Inheritance graph
[legend]

Public Member Functions

 QgsIntRange (int lower, int upper, Qgis::RangeLimits limits)
 Constructor for QgsIntRange.
 
 QgsIntRange (int lower=std::numeric_limits< int >::lowest(), int upper=std::numeric_limits< int >::max(), bool includeLower=true, bool includeUpper=true)
 Constructor for QgsIntRange.
 
bool isInfinite () const
 Returns true if the range consists of all possible values.
 
- Public Member Functions inherited from QgsRange< int >
 QgsRange (int lower, int upper, bool includeLower=true, bool includeUpper=true)
 Constructor for QgsRange.
 
 QgsRange (int lower, int upper, Qgis::RangeLimits limits)
 Constructor for QgsRange.
 
bool contains (const QgsRange< int > &other) const
 Returns true if this range contains another range.
 
bool contains (int 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.
 
int lower () const
 Returns the lower bound of the range.
 
bool operator!= (const QgsRange< int > &other) const
 
bool operator== (const QgsRange< int > &other) const
 
bool overlaps (const QgsRange< int > &other) const
 Returns true if this range overlaps another range.
 
Qgis::RangeLimits rangeLimits () const
 Returns the limit handling of the range.
 
int upper () const
 Returns the upper bound of the range.
 

Additional Inherited Members

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

Detailed Description

QgsRange which stores a range of integer values.

See also
QgsDoubleRange
QgsDateRange
QgsDateTimeRange

Definition at line 326 of file qgsrange.h.

Constructor & Destructor Documentation

◆ QgsIntRange() [1/2]

QgsIntRange::QgsIntRange ( int  lower,
int  upper,
Qgis::RangeLimits  limits 
)
inline

Constructor for QgsIntRange.

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 336 of file qgsrange.h.

◆ QgsIntRange() [2/2]

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

Constructor for QgsIntRange.

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 350 of file qgsrange.h.

Member Function Documentation

◆ isInfinite()

bool QgsIntRange::isInfinite ( ) const
inline

Returns true if the range consists of all possible values.

Since
QGIS 3.18

Definition at line 381 of file qgsrange.h.


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