Gra zręcznościowa „Straszna Epidemia"  V1.2
Projekt Wizualizacja Danych Sensorycznych Kewin Gałuszka rok akademicki 2019/2020
Dokumentacja klasy QCPDataRange

Describes a data range given by begin and end index. Więcej...

#include <qcustomplot.h>

Metody publiczne

 QCPDataRange ()
 
 QCPDataRange (int begin, int end)
 
bool operator== (const QCPDataRange &other) const
 
bool operator!= (const QCPDataRange &other) const
 
int begin () const
 
int end () const
 
int size () const
 
int length () const
 
void setBegin (int begin)
 
void setEnd (int end)
 
bool isValid () const
 
bool isEmpty () const
 
QCPDataRange bounded (const QCPDataRange &other) const
 
QCPDataRange expanded (const QCPDataRange &other) const
 
QCPDataRange intersection (const QCPDataRange &other) const
 
QCPDataRange adjusted (int changeBegin, int changeEnd) const
 
bool intersects (const QCPDataRange &other) const
 
bool contains (const QCPDataRange &other) const
 

Funkcje powiązane

(Zauważ, że to nie są metody klas.)

QDebug operator<< (QDebug d, const QCPDataRange &dataRange)
 

Opis szczegółowy

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 points to the data point just after the last data point that's part of the data range, similarly to the nomenclature used 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.

Nota
Do not confuse QCPDataRange with QCPRange. A QCPRange describes an interval in floating point plot coordinates, e.g. the current axis range.

Definicja w linii 895 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPDataRange() [1/2]

QCPDataRange::QCPDataRange ( )

Creates an empty QCPDataRange, with begin and end set to 0.

Definicja w linii 2230 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ QCPDataRange() [2/2]

QCPDataRange::QCPDataRange ( int  begin,
int  end 
)

Creates a QCPDataRange, initialized with the specified begin and end.

No checks or corrections are made to ensure the resulting range is valid (isValid).

Definicja w linii 2241 pliku qcustomplot.cpp.

Dokumentacja funkcji składowych

◆ adjusted()

QCPDataRange QCPDataRange::adjusted ( int  changeBegin,
int  changeEnd 
) const
inline

Returns a data range where changeBegin and changeEnd were added to the begin and end indices, respectively.

Definicja w linii 920 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ begin()

int QCPDataRange::begin ( ) const
inline

Definicja w linii 905 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ bounded()

QCPDataRange QCPDataRange::bounded ( const QCPDataRange other) const

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.)

Definicja w linii 2256 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ contains()

bool QCPDataRange::contains ( const QCPDataRange other) const

Returns whether all data points of other are also contained inside this data range.

Zobacz również
intersects

Definicja w linii 2312 pliku qcustomplot.cpp.

◆ end()

int QCPDataRange::end ( ) const
inline

Definicja w linii 906 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ expanded()

QCPDataRange QCPDataRange::expanded ( const QCPDataRange other) const

Returns a data range that contains both this data range as well as other.

Definicja w linii 2272 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ intersection()

QCPDataRange QCPDataRange::intersection ( const QCPDataRange other) const

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.)

Zobacz również
QCPDataSelection::intersection

Definicja w linii 2287 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ intersects()

bool QCPDataRange::intersects ( const QCPDataRange other) const

Returns whether this data range and other share common data points.

Zobacz również
intersection, contains

Definicja w linii 2301 pliku qcustomplot.cpp.

◆ isEmpty()

bool QCPDataRange::isEmpty ( ) const
inline

Returns whether this range is empty, i.e. whether its begin index equals its end index.

Zobacz również
size, length

Definicja w linii 916 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ isValid()

bool QCPDataRange::isValid ( ) const
inline

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.

Nota
Invalid ranges should be avoided and are never the result of any of QCustomPlot's methods (unless they are themselves fed with invalid ranges). Do not pass invalid ranges to QCustomPlot's methods. The invalid range is not inherently prevented in QCPDataRange, to allow temporary invalid begin/end values while manipulating the range. An invalid range is not necessarily empty (isEmpty), since its length can be negative and thus non-zero.

Definicja w linii 915 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ length()

int QCPDataRange::length ( ) const
inline

Returns the number of data points described by this data range. Equivalent to size.

Definicja w linii 908 pliku qcustomplot.h.

◆ operator!=()

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

Definicja w linii 902 pliku qcustomplot.h.

◆ operator==()

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

Definicja w linii 901 pliku qcustomplot.h.

◆ setBegin()

void QCPDataRange::setBegin ( int  begin)
inline

Sets the begin of this data range. The begin index points to the first data point that is part of the data range.

No checks or corrections are made to ensure the resulting range is valid (isValid).

Zobacz również
setEnd

Definicja w linii 911 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ setEnd()

void QCPDataRange::setEnd ( int  end)
inline

Sets the end of this data range. The end index points to the data point just after the last data point that is part of the data range.

No checks or corrections are made to ensure the resulting range is valid (isValid).

Zobacz również
setBegin

Definicja w linii 912 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ size()

int QCPDataRange::size ( ) const
inline

Returns the number of data points described by this data range. This is equal to the end index minus the begin index.

Zobacz również
length

Definicja w linii 907 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

Dokumentacja przyjaciół i funkcji związanych

◆ operator<<()

QDebug operator<< ( QDebug  d,
const QCPDataRange dataRange 
)
related

Prints dataRange in a human readable format to the qDebug output.

Definicja w linii 1068 pliku qcustomplot.h.

Oto graf wywołań dla tej funkcji:

Dokumentacja dla tej klasy została wygenerowana z plików: