qcustomplot.h File Reference
#include <QtCore/qglobal.h>
#include <QtCore/QObject>
#include <QtCore/QPointer>
#include <QtCore/QSharedPointer>
#include <QtCore/QTimer>
#include <QtGui/QPainter>
#include <QtGui/QPaintEvent>
#include <QtGui/QMouseEvent>
#include <QtGui/QWheelEvent>
#include <QtGui/QPixmap>
#include <QtCore/QVector>
#include <QtCore/QString>
#include <QtCore/QDateTime>
#include <QtCore/QMultiMap>
#include <QtCore/QFlags>
#include <QtCore/QDebug>
#include <QtCore/QStack>
#include <QtCore/QCache>
#include <QtCore/QMargins>
#include <qmath.h>
#include <limits>
#include <algorithm>
#include <QtNumeric>
#include <QtWidgets/QWidget>
#include <QtPrintSupport/QtPrintSupport>
Include dependency graph for qcustomplot.h:

Go to the source code of this file.

Classes

class  QCPVector2D
 
class  QCPPainter
 
class  QCPAbstractPaintBuffer
 
class  QCPPaintBufferPixmap
 
class  QCPLayer
 
class  QCPLayerable
 
class  QCPRange
 
class  QCPDataRange
 
class  QCPDataSelection
 
class  QCPSelectionRect
 
class  QCPMarginGroup
 
class  QCPLayoutElement
 
class  QCPLayout
 
class  QCPLayoutGrid
 
class  QCPLayoutInset
 
class  QCPLineEnding
 
class  QCPAxisTicker
 
class  QCPAxisTickerDateTime
 
class  QCPAxisTickerTime
 
class  QCPAxisTickerFixed
 
class  QCPAxisTickerText
 
class  QCPAxisTickerPi
 
class  QCPAxisTickerLog
 
class  QCPGrid
 
class  QCPAxis
 
class  QCPAxisPainterPrivate
 
struct  QCPAxisPainterPrivate::CachedLabel
 
struct  QCPAxisPainterPrivate::TickLabelData
 
class  QCPScatterStyle
 
class  QCPDataContainer< DataType >
 The generic data container for one-dimensional plottables. More...
 
class  QCPSelectionDecorator
 
class  QCPAbstractPlottable
 
class  QCPItemAnchor
 
class  QCPItemPosition
 
class  QCPAbstractItem
 
class  QCustomPlot
 
class  QCPPlottableInterface1D
 Defines an abstract interface for one-dimensional plottables. More...
 
class  QCPAbstractPlottable1D< DataType >
 A template base class for plottables with one-dimensional data. More...
 
class  QCPColorGradient
 
class  QCPSelectionDecoratorBracket
 
class  QCPAxisRect
 
class  QCPAbstractLegendItem
 
class  QCPPlottableLegendItem
 
class  QCPLegend
 
class  QCPTextElement
 
class  QCPColorScaleAxisRectPrivate
 
class  QCPColorScale
 
class  QCPGraphData
 
class  QCPGraph
 
class  QCPCurveData
 
class  QCPCurve
 
class  QCPBarsGroup
 
class  QCPBarsData
 
class  QCPBars
 
class  QCPStatisticalBoxData
 
class  QCPStatisticalBox
 
class  QCPColorMapData
 
class  QCPColorMap
 
class  QCPFinancialData
 
class  QCPFinancial
 
class  QCPErrorBarsData
 
class  QCPErrorBars
 
class  QCPItemStraightLine
 
class  QCPItemLine
 
class  QCPItemCurve
 
class  QCPItemRect
 
class  QCPItemText
 
class  QCPItemEllipse
 
class  QCPItemPixmap
 
class  QCPItemTracer
 
class  QCPItemBracket
 

Namespaces

 QCP
 

Macros

#define QCP_DEVICEPIXELRATIO_SUPPORTED
 
#define QCP_DEVICEPIXELRATIO_FLOAT
 
#define QCUSTOMPLOT_VERSION_STR   "2.0.1"
 
#define QCUSTOMPLOT_VERSION   0x020001
 
#define QCP_LIB_DECL
 
#define Q_DECL_OVERRIDE
 

Typedefs

typedef QCPDataContainer< QCPGraphDataQCPGraphDataContainer
 
typedef QCPDataContainer< QCPCurveDataQCPCurveDataContainer
 
typedef QCPDataContainer< QCPBarsDataQCPBarsDataContainer
 
typedef QCPDataContainer< QCPStatisticalBoxDataQCPStatisticalBoxDataContainer
 
typedef QCPDataContainer< QCPFinancialDataQCPFinancialDataContainer
 
typedef QVector< QCPErrorBarsDataQCPErrorBarsDataContainer
 

Enumerations

enum  QCP::ResolutionUnit { QCP::ruDotsPerMeter, QCP::ruDotsPerCentimeter, QCP::ruDotsPerInch }
 
enum  QCP::ExportPen { QCP::epNoCosmetic, QCP::epAllowCosmetic }
 
enum  QCP::SignDomain { QCP::sdNegative, QCP::sdBoth, QCP::sdPositive }
 
enum  QCP::MarginSide {
  QCP::msLeft = 0x01, QCP::msRight = 0x02, QCP::msTop = 0x04, QCP::msBottom = 0x08,
  QCP::msAll = 0xFF, QCP::msNone = 0x00, QCP::msLeft = 0x01, QCP::msRight = 0x02,
  QCP::msTop = 0x04, QCP::msBottom = 0x08, QCP::msAll = 0xFF, QCP::msNone = 0x00,
  QCP::msLeft = 0x01, QCP::msRight = 0x02, QCP::msTop = 0x04, QCP::msBottom = 0x08,
  QCP::msAll = 0xFF, QCP::msNone = 0x00
}
 
enum  QCP::AntialiasedElement {
  QCP::aeAxes = 0x0001, QCP::aeGrid = 0x0002, QCP::aeSubGrid = 0x0004, QCP::aeLegend = 0x0008,
  QCP::aeLegendItems = 0x0010, QCP::aePlottables = 0x0020, QCP::aeItems = 0x0040, QCP::aeScatters = 0x0080,
  QCP::aeErrorBars = 0x0100, QCP::aeFills = 0x0200, QCP::aeZeroLine = 0x0400, QCP::aeAll = 0xFFFF,
  QCP::aeNone = 0x0000, QCP::aeAxes = 0x0001, QCP::aeGrid = 0x0002, QCP::aeSubGrid = 0x0004,
  QCP::aeLegend = 0x0008, QCP::aeLegendItems = 0x0010, QCP::aePlottables = 0x0020, QCP::aeItems = 0x0040,
  QCP::aeScatters = 0x0080, QCP::aeFills = 0x0200, QCP::aeZeroLine = 0x0400, QCP::aeOther = 0x8000,
  QCP::aeAll = 0xFFFF, QCP::aeNone = 0x0000, QCP::aeAxes = 0x0001, QCP::aeGrid = 0x0002,
  QCP::aeSubGrid = 0x0004, QCP::aeLegend = 0x0008, QCP::aeLegendItems = 0x0010, QCP::aePlottables = 0x0020,
  QCP::aeItems = 0x0040, QCP::aeScatters = 0x0080, QCP::aeErrorBars = 0x0100, QCP::aeFills = 0x0200,
  QCP::aeZeroLine = 0x0400, QCP::aeAll = 0xFFFF, QCP::aeNone = 0x0000
}
 
enum  QCP::PlottingHint {
  QCP::phNone = 0x000, QCP::phFastPolylines = 0x001, QCP::phForceRepaint = 0x002, QCP::phCacheLabels = 0x004,
  QCP::phNone = 0x000, QCP::phFastPolylines = 0x001, QCP::phImmediateRefresh = 0x002, QCP::phCacheLabels = 0x004,
  QCP::phNone = 0x000, QCP::phFastPolylines = 0x001, QCP::phForceRepaint = 0x002, QCP::phCacheLabels = 0x004
}
 
enum  QCP::Interaction {
  QCP::iRangeDrag = 0x001, QCP::iRangeZoom = 0x002, QCP::iMultiSelect = 0x004, QCP::iSelectPlottables = 0x008,
  QCP::iSelectAxes = 0x010, QCP::iSelectLegend = 0x020, QCP::iSelectItems = 0x040, QCP::iSelectOther = 0x080,
  QCP::iRangeDrag = 0x001, QCP::iRangeZoom = 0x002, QCP::iMultiSelect = 0x004, QCP::iSelectPlottables = 0x008,
  QCP::iSelectAxes = 0x010, QCP::iSelectLegend = 0x020, QCP::iSelectItems = 0x040, QCP::iSelectOther = 0x080,
  QCP::iRangeDrag = 0x001, QCP::iRangeZoom = 0x002, QCP::iMultiSelect = 0x004, QCP::iSelectPlottables = 0x008,
  QCP::iSelectAxes = 0x010, QCP::iSelectLegend = 0x020, QCP::iSelectItems = 0x040, QCP::iSelectOther = 0x080
}
 
enum  QCP::SelectionRectMode { QCP::srmNone, QCP::srmZoom, QCP::srmSelect, QCP::srmCustom }
 
enum  QCP::SelectionType {
  QCP::stNone, QCP::stWhole, QCP::stSingleData, QCP::stDataRange,
  QCP::stMultipleDataRanges
}
 

Functions

bool QCP::isInvalidData (double value)
 
bool QCP::isInvalidData (double value1, double value2)
 
void QCP::setMarginValue (QMargins &margins, QCP::MarginSide side, int value)
 
int QCP::getMarginValue (const QMargins &margins, QCP::MarginSide side)
 
 Q_DECLARE_TYPEINFO (QCPVector2D, Q_MOVABLE_TYPE)
 
const QCPVector2D operator* (double factor, const QCPVector2D &vec)
 
const QCPVector2D operator* (const QCPVector2D &vec, double factor)
 
const QCPVector2D operator/ (const QCPVector2D &vec, double divisor)
 
const QCPVector2D operator+ (const QCPVector2D &vec1, const QCPVector2D &vec2)
 
const QCPVector2D operator- (const QCPVector2D &vec1, const QCPVector2D &vec2)
 
const QCPVector2D operator- (const QCPVector2D &vec)
 
 Q_DECLARE_TYPEINFO (QCPRange, Q_MOVABLE_TYPE)
 
const QCPRange operator+ (const QCPRange &range, double value)
 
const QCPRange operator+ (double value, const QCPRange &range)
 
const QCPRange operator- (const QCPRange &range, double value)
 
const QCPRange operator* (const QCPRange &range, double value)
 
const QCPRange operator* (double value, const QCPRange &range)
 
const QCPRange operator/ (const QCPRange &range, double value)
 
 Q_DECLARE_TYPEINFO (QCPDataRange, Q_MOVABLE_TYPE)
 
const QCPDataSelection operator+ (const QCPDataSelection &a, const QCPDataSelection &b)
 
const QCPDataSelection operator+ (const QCPDataRange &a, const QCPDataSelection &b)
 
const QCPDataSelection operator+ (const QCPDataSelection &a, const QCPDataRange &b)
 
const QCPDataSelection operator+ (const QCPDataRange &a, const QCPDataRange &b)
 
const QCPDataSelection operator- (const QCPDataSelection &a, const QCPDataSelection &b)
 
const QCPDataSelection operator- (const QCPDataRange &a, const QCPDataSelection &b)
 
const QCPDataSelection operator- (const QCPDataSelection &a, const QCPDataRange &b)
 
const QCPDataSelection operator- (const QCPDataRange &a, const QCPDataRange &b)
 
 Q_DECLARE_TYPEINFO (QCPLineEnding, Q_MOVABLE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPScatterStyle, Q_MOVABLE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPGraphData, Q_PRIMITIVE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPCurveData, Q_PRIMITIVE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPBarsData, Q_PRIMITIVE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPStatisticalBoxData, Q_MOVABLE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPFinancialData, Q_PRIMITIVE_TYPE)
 
 Q_DECLARE_TYPEINFO (QCPErrorBarsData, Q_PRIMITIVE_TYPE)
 

Variables

const QMetaObject QCP::staticMetaObject
 

Macro Definition Documentation

◆ Q_DECL_OVERRIDE

#define Q_DECL_OVERRIDE

◆ QCP_DEVICEPIXELRATIO_FLOAT

#define QCP_DEVICEPIXELRATIO_FLOAT

◆ QCP_DEVICEPIXELRATIO_SUPPORTED

#define QCP_DEVICEPIXELRATIO_SUPPORTED

◆ QCP_LIB_DECL

#define QCP_LIB_DECL

◆ QCUSTOMPLOT_VERSION

#define QCUSTOMPLOT_VERSION   0x020001

◆ QCUSTOMPLOT_VERSION_STR

#define QCUSTOMPLOT_VERSION_STR   "2.0.1"

Typedef Documentation

◆ QCPBarsDataContainer

Container for storing QCPBarsData points. The data is stored sorted by key.

This template instantiation is the container in which QCPBars holds its data. For details about the generic container, see the documentation of the class template QCPDataContainer.

See also
QCPBarsData, QCPBars::setData

◆ QCPCurveDataContainer

Container for storing QCPCurveData points. The data is stored sorted by t, so the sortKey() (returning t) is different from mainKey() (returning key).

This template instantiation is the container in which QCPCurve holds its data. For details about the generic container, see the documentation of the class template QCPDataContainer.

See also
QCPCurveData, QCPCurve::setData

◆ QCPErrorBarsDataContainer

Container for storing QCPErrorBarsData points. It is a typedef for QVector<QCPErrorBarsData>.

This is the container in which QCPErrorBars holds its data. Unlike most other data containers for plottables, it is not based on QCPDataContainer. This is because the error bars plottable is special in that it doesn't store its own key and value coordinate per error bar. It adopts the key and value from the plottable to which the error bars shall be applied (QCPErrorBars::setDataPlottable). So the stored QCPErrorBarsData doesn't need a sortable key, but merely an index (as QVector provides), which maps one-to-one to the indices of the other plottable's data.

See also
QCPErrorBarsData, QCPErrorBars::setData

◆ QCPFinancialDataContainer

Container for storing QCPFinancialData points. The data is stored sorted by key.

This template instantiation is the container in which QCPFinancial holds its data. For details about the generic container, see the documentation of the class template QCPDataContainer.

See also
QCPFinancialData, QCPFinancial::setData

◆ QCPGraphDataContainer

Container for storing QCPGraphData points. The data is stored sorted by key.

This template instantiation is the container in which QCPGraph holds its data. For details about the generic container, see the documentation of the class template QCPDataContainer.

See also
QCPGraphData, QCPGraph::setData

◆ QCPStatisticalBoxDataContainer

Container for storing QCPStatisticalBoxData points. The data is stored sorted by key.

This template instantiation is the container in which QCPStatisticalBox holds its data. For details about the generic container, see the documentation of the class template QCPDataContainer.

See also
QCPStatisticalBoxData, QCPStatisticalBox::setData

Function Documentation

◆ operator*() [1/4]

const QCPVector2D operator* ( double  factor,
const QCPVector2D vec 
)
inline

◆ operator*() [2/4]

const QCPVector2D operator* ( const QCPVector2D vec,
double  factor 
)
inline

◆ operator*() [3/4]

const QCPRange operator* ( const QCPRange range,
double  value 
)
inline

Multiplies both boundaries of the range by value.

◆ operator*() [4/4]

const QCPRange operator* ( double  value,
const QCPRange range 
)
inline

Multiplies both boundaries of the range by value.

◆ operator+() [1/7]

const QCPVector2D operator+ ( const QCPVector2D vec1,
const QCPVector2D vec2 
)
inline

◆ operator+() [2/7]

const QCPRange operator+ ( const QCPRange range,
double  value 
)
inline

Adds value to both boundaries of the range.

◆ operator+() [3/7]

const QCPRange operator+ ( double  value,
const QCPRange range 
)
inline

Adds value to both boundaries of the range.

◆ operator+() [4/7]

const QCPDataSelection operator+ ( const QCPDataSelection a,
const QCPDataSelection b 
)
inline

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

◆ operator+() [5/7]

const QCPDataSelection operator+ ( const QCPDataRange a,
const QCPDataSelection b 
)
inline

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

◆ operator+() [6/7]

const QCPDataSelection operator+ ( const QCPDataSelection a,
const QCPDataRange b 
)
inline

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

◆ operator+() [7/7]

const QCPDataSelection operator+ ( const QCPDataRange a,
const QCPDataRange b 
)
inline

Return a QCPDataSelection with the data points in a joined with the data points in b. The resulting data selection is already simplified (see QCPDataSelection::simplify).

◆ operator-() [1/7]

const QCPVector2D operator- ( const QCPVector2D vec1,
const QCPVector2D vec2 
)
inline

◆ operator-() [2/7]

const QCPVector2D operator- ( const QCPVector2D vec)
inline

◆ operator-() [3/7]

const QCPRange operator- ( const QCPRange range,
double  value 
)
inline

Subtracts value from both boundaries of the range.

◆ operator-() [4/7]

const QCPDataSelection operator- ( const QCPDataSelection a,
const QCPDataSelection b 
)
inline

Return a QCPDataSelection with the data points which are in a but not in b.

◆ operator-() [5/7]

const QCPDataSelection operator- ( const QCPDataRange a,
const QCPDataSelection b 
)
inline

Return a QCPDataSelection with the data points which are in a but not in b.

◆ operator-() [6/7]

const QCPDataSelection operator- ( const QCPDataSelection a,
const QCPDataRange b 
)
inline

Return a QCPDataSelection with the data points which are in a but not in b.

◆ operator-() [7/7]

const QCPDataSelection operator- ( const QCPDataRange a,
const QCPDataRange b 
)
inline

Return a QCPDataSelection with the data points which are in a but not in b.

◆ operator/() [1/2]

const QCPVector2D operator/ ( const QCPVector2D vec,
double  divisor 
)
inline

◆ operator/() [2/2]

const QCPRange operator/ ( const QCPRange range,
double  value 
)
inline

Divides both boundaries of the range by value.

◆ Q_DECLARE_TYPEINFO() [1/11]

Q_DECLARE_TYPEINFO ( QCPVector2D  ,
Q_MOVABLE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [2/11]

Q_DECLARE_TYPEINFO ( QCPRange  ,
Q_MOVABLE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [3/11]

Q_DECLARE_TYPEINFO ( QCPDataRange  ,
Q_MOVABLE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [4/11]

Q_DECLARE_TYPEINFO ( QCPLineEnding  ,
Q_MOVABLE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [5/11]

Q_DECLARE_TYPEINFO ( QCPScatterStyle  ,
Q_MOVABLE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [6/11]

Q_DECLARE_TYPEINFO ( QCPGraphData  ,
Q_PRIMITIVE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [7/11]

Q_DECLARE_TYPEINFO ( QCPCurveData  ,
Q_PRIMITIVE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [8/11]

Q_DECLARE_TYPEINFO ( QCPBarsData  ,
Q_PRIMITIVE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [9/11]

Q_DECLARE_TYPEINFO ( QCPStatisticalBoxData  ,
Q_MOVABLE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [10/11]

Q_DECLARE_TYPEINFO ( QCPFinancialData  ,
Q_PRIMITIVE_TYPE   
)

◆ Q_DECLARE_TYPEINFO() [11/11]

Q_DECLARE_TYPEINFO ( QCPErrorBarsData  ,
Q_PRIMITIVE_TYPE   
)