A class which extends a list of QtlRange.
More...
A class which extends a list of QtlRange.
◆ SuperClass
Redefine the superclass type.
◆ QtlRangeList() [1/4]
QtlRangeList::QtlRangeList |
( |
| ) |
|
|
inline |
◆ QtlRangeList() [2/4]
QtlRangeList::QtlRangeList |
( |
const SuperClass & |
other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
[in] | other | Other instance to copy. |
◆ QtlRangeList() [3/4]
QtlRangeList::QtlRangeList |
( |
const QtlRange & |
e | ) |
|
|
inline |
Constructor from one initial element.
- Parameters
-
◆ QtlRangeList() [4/4]
QtlRangeList::QtlRangeList |
( |
std::initializer_list< QtlRange > |
args | ) |
|
|
inline |
Constructor from a variadic list of elements.
This constructor is only enabled if the compiler supports C++11 initializer lists
- Parameters
-
[in] | args | List of initial elements. |
◆ totalValueCount()
quint64 QtlRangeList::totalValueCount |
( |
| ) |
const |
Get the total number of values in all ranges.
- Returns
- The number of values in all ranges.
◆ first()
qint64 QtlRangeList::first |
( |
| ) |
const |
Get the lowest value in all ranges.
- Returns
- The lowest value in all ranges or 0 if the list is empty.
◆ last()
qint64 QtlRangeList::last |
( |
| ) |
const |
Get the highest value in all ranges.
- Returns
- The highest value in all ranges or -1 if the list is empty.
◆ enclosing()
QtlRange QtlRangeList::enclosing |
( |
| ) |
const |
Get the enclosing range.
- Returns
- The enclosing range, from first() to last().
◆ add()
Add a given offset to first and last value of all elements in the list.
There is no overflow, the ranges are bounded by qint64.
- Parameters
-
- Returns
- A reference to this object.
◆ scale()
Scale all ranges in the list by a given factor.
- Parameters
-
- Returns
- A reference to this object.
◆ sort()
Sort the list.
- Returns
- A reference to this object.
◆ merge()
Merge all overlapping or adjacent segments.
- Parameters
-
- Returns
- A reference to this object.
- See also
- Qtl::MergeFlags
◆ clip()
Remove values outside the given range.
- Parameters
-
[in] | range | Limit the values within that range. |
- Returns
- A reference to this object.
◆ toString()
QString QtlRangeList::toString |
( |
const QString & |
separator = " " | ) |
const |
Convert the list of ranges to a string.
- Parameters
-
[in] | separator | A string to insert between ranges. |
- Returns
- A string in format "[first, last]<sep>[first, last]<sep>...".
The documentation for this class was generated from the following files: