Describes a data range given by begin and end index. More...
(Note that these are not member functions.)
Describes a data range given by begin and end index.
QCPDataRange holds two integers describing the begin (setBegin) and end (setEnd) index of a contiguous set of data points. The end index corresponds to the data point just after the last data point of the data range, like in standard iterators.
Data Ranges are not bound to a certain plottable, thus they can be freely exchanged, created and modified. If a non-contiguous data set shall be described, the class QCPDataSelection is used, which holds and manages multiple instances of QCPDataRange. In most situations, QCPDataSelection is thus used.
Both QCPDataRange and QCPDataSelection offer convenience methods to work with them, e.g. bounded, expanded, intersects, intersection, adjusted, contains. Further, addition and subtraction operators (defined in QCPDataSelection) can be used to join/subtract data ranges and data selections (or mixtures), to retrieve a corresponding QCPDataSelection.
QCustomPlot's data selection mechanism is based on QCPDataSelection and QCPDataRange.
Creates an empty QCPDataRange, with begin and end set to 0.
Creates a QCPDataRange, initialized with the specified begin and end.
No checks or corrections are made to ensure the resulting range is valid (isValid).
Returns the number of data points described by this data range. This is equal to the end index minus the begin index.
Returns the number of data points described by this data range. Equivalent to size.
Returns whether this range is valid. A valid range has a begin index greater or equal to 0, and an end index greater or equal to the begin index.
Returns a data range that matches this data range, except that parts exceeding other are excluded.
This method is very similar to intersection, with one distinction: If this range and the other range share no intersection, the returned data range will be empty with begin and end set to the respective boundary side of other, at which this range is residing. (intersection would just return a range with begin and end set to 0.)
Returns a data range that contains both this data range as well as other.
Returns the data range which is contained in both this data range and other.
This method is very similar to bounded, with one distinction: If this range and the other range share no intersection, the returned data range will be empty with begin and end set to 0. (bounded would return a range with begin and end set to one of the boundaries of other, depending on which side this range is on.)
Returns a data range where changeBegin and changeEnd were added to the begin and end indices, respectively.
Returns whether this data range and other share common data points.
Returns whether all data points of other are also contained inside this data range.
Prints dataRange in a human readable format to the qDebug output.