QCPFinancial Class Reference

#include </home/florent/devel/release/src/gepetto-viewer/plugins/pyqcustomplot/qcustomplot-1.3.2/qcustomplot.h>

Inheritance diagram for QCPFinancial:
Collaboration diagram for QCPFinancial:

Public Types

enum  ChartStyle {
  csOhlc, csCandlestick, csOhlc, csCandlestick,
  csOhlc, csCandlestick
}
 
enum  WidthType { wtAbsolute, wtAxisRectRatio, wtPlotCoords }
 
enum  ChartStyle {
  csOhlc, csCandlestick, csOhlc, csCandlestick,
  csOhlc, csCandlestick
}
 
enum  ChartStyle {
  csOhlc, csCandlestick, csOhlc, csCandlestick,
  csOhlc, csCandlestick
}
 

Public Member Functions

 QCPFinancial (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual ~QCPFinancial ()
 
QCPFinancialDataMapdata () const
 
ChartStyle chartStyle () const
 
double width () const
 
bool twoColored () const
 
QBrush brushPositive () const
 
QBrush brushNegative () const
 
QPen penPositive () const
 
QPen penNegative () const
 
void setData (QCPFinancialDataMap *data, bool copy=false)
 
void setData (const QVector< double > &key, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close)
 
void setChartStyle (ChartStyle style)
 
void setWidth (double width)
 
void setTwoColored (bool twoColored)
 
void setBrushPositive (const QBrush &brush)
 
void setBrushNegative (const QBrush &brush)
 
void setPenPositive (const QPen &pen)
 
void setPenNegative (const QPen &pen)
 
void addData (const QCPFinancialDataMap &dataMap)
 
void addData (const QCPFinancialData &data)
 
void addData (double key, double open, double high, double low, double close)
 
void addData (const QVector< double > &key, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close)
 
void removeDataBefore (double key)
 
void removeDataAfter (double key)
 
void removeData (double fromKey, double toKey)
 
void removeData (double key)
 
virtual void clearData ()
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const
 
 QCPFinancial (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual ~QCPFinancial ()
 
QSharedPointer< QCPFinancialDataContainerdata () const
 
ChartStyle chartStyle () const
 
double width () const
 
WidthType widthType () const
 
bool twoColored () const
 
QBrush brushPositive () const
 
QBrush brushNegative () const
 
QPen penPositive () const
 
QPen penNegative () const
 
void setData (QSharedPointer< QCPFinancialDataContainer > data)
 
void setData (const QVector< double > &keys, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close, bool alreadySorted=false)
 
void setChartStyle (ChartStyle style)
 
void setWidth (double width)
 
void setWidthType (WidthType widthType)
 
void setTwoColored (bool twoColored)
 
void setBrushPositive (const QBrush &brush)
 
void setBrushNegative (const QBrush &brush)
 
void setPenPositive (const QPen &pen)
 
void setPenNegative (const QPen &pen)
 
void addData (const QVector< double > &keys, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close, bool alreadySorted=false)
 
void addData (double key, double open, double high, double low, double close)
 
virtual QCPDataSelection selectTestRect (const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
 
virtual QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE
 
virtual QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE
 
 QCPFinancial (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual ~QCPFinancial ()
 
QCPFinancialDataMapdata () const
 
ChartStyle chartStyle () const
 
double width () const
 
bool twoColored () const
 
QBrush brushPositive () const
 
QBrush brushNegative () const
 
QPen penPositive () const
 
QPen penNegative () const
 
void setData (QCPFinancialDataMap *data, bool copy=false)
 
void setData (const QVector< double > &key, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close)
 
void setChartStyle (ChartStyle style)
 
void setWidth (double width)
 
void setTwoColored (bool twoColored)
 
void setBrushPositive (const QBrush &brush)
 
void setBrushNegative (const QBrush &brush)
 
void setPenPositive (const QPen &pen)
 
void setPenNegative (const QPen &pen)
 
void addData (const QCPFinancialDataMap &dataMap)
 
void addData (const QCPFinancialData &data)
 
void addData (double key, double open, double high, double low, double close)
 
void addData (const QVector< double > &key, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close)
 
void removeDataBefore (double key)
 
void removeDataAfter (double key)
 
void removeData (double fromKey, double toKey)
 
void removeData (double key)
 
virtual void clearData ()
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const
 
- Public Member Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QString name () const
 
bool antialiasedFill () const
 
bool antialiasedScatters () const
 
bool antialiasedErrorBars () const
 
QPen pen () const
 
QPen selectedPen () const
 
QBrush brush () const
 
QBrush selectedBrush () const
 
QCPAxiskeyAxis () const
 
QCPAxisvalueAxis () const
 
bool selectable () const
 
bool selected () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setAntialiasedErrorBars (bool enabled)
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual bool addToLegend ()
 
virtual bool removeFromLegend () const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false) const
 
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual ~QCPAbstractPlottable ()
 
QString name () const
 
bool antialiasedFill () const
 
bool antialiasedScatters () const
 
QPen pen () const
 
QBrush brush () const
 
QCPAxiskeyAxis () const
 
QCPAxisvalueAxis () const
 
QCP::SelectionType selectable () const
 
bool selected () const
 
QCPDataSelection selection () const
 
QCPSelectionDecoratorselectionDecorator () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (QCP::SelectionType selectable)
 
Q_SLOT void setSelection (QCPDataSelection selection)
 
void setSelectionDecorator (QCPSelectionDecorator *decorator)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false, bool inKeyRange=false) const
 
bool addToLegend (QCPLegend *legend)
 
bool addToLegend ()
 
bool removeFromLegend (QCPLegend *legend) const
 
bool removeFromLegend () const
 
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QString name () const
 
bool antialiasedFill () const
 
bool antialiasedScatters () const
 
bool antialiasedErrorBars () const
 
QPen pen () const
 
QPen selectedPen () const
 
QBrush brush () const
 
QBrush selectedBrush () const
 
QCPAxiskeyAxis () const
 
QCPAxisvalueAxis () const
 
bool selectable () const
 
bool selected () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setAntialiasedErrorBars (bool enabled)
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual bool addToLegend ()
 
virtual bool removeFromLegend () const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false) const
 
- Public Member Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
 
 ~QCPLayerable ()
 
bool visible () const
 
QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
QCPLayerlayer () const
 
bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
 
virtual ~QCPLayerable ()
 
bool visible () const
 
QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
QCPLayerlayer () const
 
bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
 
 ~QCPLayerable ()
 
bool visible () const
 
QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
QCPLayerlayer () const
 
bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 
- Public Member Functions inherited from QCPAbstractPlottable1D< QCPFinancialData >
 QCPAbstractPlottable1D (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
virtual ~QCPAbstractPlottable1D ()
 
virtual int dataCount () const Q_DECL_OVERRIDE
 
virtual double dataMainKey (int index) const Q_DECL_OVERRIDE
 
virtual double dataSortKey (int index) const Q_DECL_OVERRIDE
 
virtual double dataMainValue (int index) const Q_DECL_OVERRIDE
 
virtual QCPRange dataValueRange (int index) const Q_DECL_OVERRIDE
 
virtual QPointF dataPixelPosition (int index) const Q_DECL_OVERRIDE
 
virtual bool sortKeyIsMainKey () const Q_DECL_OVERRIDE
 
virtual int findBegin (double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
 
virtual int findEnd (double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
 
virtual QCPPlottableInterface1Dinterface1D () Q_DECL_OVERRIDE
 
- Public Member Functions inherited from QCPPlottableInterface1D
virtual ~QCPPlottableInterface1D ()
 

Static Public Member Functions

static QCPFinancialDataMap timeSeriesToOhlc (const QVector< double > &time, const QVector< double > &value, double timeBinSize, double timeBinOffset=0)
 
static QCPFinancialDataContainer timeSeriesToOhlc (const QVector< double > &time, const QVector< double > &value, double timeBinSize, double timeBinOffset=0)
 
static QCPFinancialDataMap timeSeriesToOhlc (const QVector< double > &time, const QVector< double > &value, double timeBinSize, double timeBinOffset=0)
 

Protected Member Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual QCPRange getKeyRange (bool &foundRange, SignDomain inSignDomain=sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, SignDomain inSignDomain=sdBoth) const
 
void drawOhlcPlot (QCPPainter *painter, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end)
 
void drawCandlestickPlot (QCPPainter *painter, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end)
 
double ohlcSelectTest (const QPointF &pos, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end) const
 
double candlestickSelectTest (const QPointF &pos, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end) const
 
void getVisibleDataBounds (QCPFinancialDataMap::const_iterator &lower, QCPFinancialDataMap::const_iterator &upper) const
 
virtual void draw (QCPPainter *painter) Q_DECL_OVERRIDE
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE
 
void drawOhlcPlot (QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected)
 
void drawCandlestickPlot (QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected)
 
double getPixelWidth (double key, double keyPixel) const
 
double ohlcSelectTest (const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const
 
double candlestickSelectTest (const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const
 
void getVisibleDataBounds (QCPFinancialDataContainer::const_iterator &begin, QCPFinancialDataContainer::const_iterator &end) const
 
QRectF selectionHitBox (QCPFinancialDataContainer::const_iterator it) const
 
virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual QCPRange getKeyRange (bool &foundRange, SignDomain inSignDomain=sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, SignDomain inSignDomain=sdBoth) const
 
void drawOhlcPlot (QCPPainter *painter, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end)
 
void drawCandlestickPlot (QCPPainter *painter, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end)
 
double ohlcSelectTest (const QPointF &pos, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end) const
 
double candlestickSelectTest (const QPointF &pos, const QCPFinancialDataMap::const_iterator &begin, const QCPFinancialDataMap::const_iterator &end) const
 
void getVisibleDataBounds (QCPFinancialDataMap::const_iterator &lower, QCPFinancialDataMap::const_iterator &upper) const
 
- Protected Member Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
QPen mainPen () const
 
QBrush mainBrush () const
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
void applyErrorBarsAntialiasingHint (QCPPainter *painter) const
 
double distSqrToLine (const QPointF &start, const QPointF &end, const QPointF &point) const
 
virtual QRect clipRect () const Q_DECL_OVERRIDE
 
virtual QCP::Interaction selectionCategory () const Q_DECL_OVERRIDE
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const Q_DECL_OVERRIDE
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE
 
virtual void deselectEvent (bool *selectionStateChanged) Q_DECL_OVERRIDE
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
QPen mainPen () const
 
QBrush mainBrush () const
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
void applyErrorBarsAntialiasingHint (QCPPainter *painter) const
 
double distSqrToLine (const QPointF &start, const QPointF &end, const QPointF &point) const
 
- Protected Member Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 
- Protected Member Functions inherited from QCPAbstractPlottable1D< QCPFinancialData >
void getDataSegments (QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
 
void drawPolyline (QCPPainter *painter, const QVector< QPointF > &lineData) const
 

Protected Attributes

QCPFinancialDataMapmData
 
ChartStyle mChartStyle
 
double mWidth
 
bool mTwoColored
 
QBrush mBrushPositive
 
QBrush mBrushNegative
 
QPen mPenPositive
 
QPen mPenNegative
 
WidthType mWidthType
 
- Protected Attributes inherited from QCPAbstractPlottable
QString mName
 
bool mAntialiasedFill
 
bool mAntialiasedScatters
 
bool mAntialiasedErrorBars
 
QPen mPen
 
QPen mSelectedPen
 
QBrush mBrush
 
QBrush mSelectedBrush
 
QPointer< QCPAxismKeyAxis
 
QPointer< QCPAxismValueAxis
 
bool mSelectable
 
bool mSelected
 
QCP::SelectionType mSelectable
 
QCPDataSelection mSelection
 
QCPSelectionDecoratormSelectionDecorator
 
- Protected Attributes inherited from QCPLayerable
bool mVisible
 
QCustomPlotmParentPlot
 
QPointer< QCPLayerablemParentLayerable
 
QCPLayermLayer
 
bool mAntialiased
 
- Protected Attributes inherited from QCPAbstractPlottable1D< QCPFinancialData >
QSharedPointer< QCPDataContainer< QCPFinancialData > > mDataContainer
 

Friends

class QCustomPlot
 
class QCPLegend
 

Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectableChanged (bool selectable)
 
void selectionChanged (bool selected)
 
void selectionChanged (const QCPDataSelection &selection)
 
void selectableChanged (QCP::SelectionType selectable)
 
void selectionChanged (bool selected)
 
void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
void layerChanged (QCPLayer *newLayer)
 
void layerChanged (QCPLayer *newLayer)
 
- Protected Types inherited from QCPAbstractPlottable
enum  SignDomain {
  sdNegative, sdBoth, sdPositive, sdNegative,
  sdBoth, sdPositive
}
 
enum  SignDomain {
  sdNegative, sdBoth, sdPositive, sdNegative,
  sdBoth, sdPositive
}
 

Member Enumeration Documentation

◆ ChartStyle [1/3]

Defines the possible representations of OHLC data in the plot.

See also
setChartStyle
Enumerator
csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

◆ ChartStyle [2/3]

Defines the possible representations of OHLC data in the plot.

See also
setChartStyle
Enumerator
csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

◆ ChartStyle [3/3]

Defines the possible representations of OHLC data in the plot.

See also
setChartStyle
Enumerator
csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

csOhlc 

Open-High-Low-Close bar representation.

csCandlestick 

Candlestick representation.

◆ WidthType

Defines the ways the width of the financial bar can be specified. Thus it defines what the number passed to setWidth actually means.

See also
setWidthType, setWidth
Enumerator
wtAbsolute 

width is in absolute pixels

wtAxisRectRatio 

width is given by a fraction of the axis rect size

wtPlotCoords 

width is in key coordinates and thus scales with the key axis range

Constructor & Destructor Documentation

◆ QCPFinancial() [1/3]

QCPFinancial::QCPFinancial ( QCPAxis keyAxis,
QCPAxis valueAxis 
)
explicit

◆ ~QCPFinancial() [1/3]

virtual QCPFinancial::~QCPFinancial ( )
virtual

◆ QCPFinancial() [2/3]

QCPFinancial::QCPFinancial ( QCPAxis keyAxis,
QCPAxis valueAxis 
)
explicit

◆ ~QCPFinancial() [2/3]

virtual QCPFinancial::~QCPFinancial ( )
virtual

◆ QCPFinancial() [3/3]

QCPFinancial::QCPFinancial ( QCPAxis keyAxis,
QCPAxis valueAxis 
)
explicit

◆ ~QCPFinancial() [3/3]

virtual QCPFinancial::~QCPFinancial ( )
virtual

Member Function Documentation

◆ addData() [1/10]

void QCPFinancial::addData ( const QCPFinancialDataMap dataMap)

◆ addData() [2/10]

void QCPFinancial::addData ( const QCPFinancialDataMap dataMap)

◆ addData() [3/10]

void QCPFinancial::addData ( const QCPFinancialData data)

◆ addData() [4/10]

void QCPFinancial::addData ( const QCPFinancialData data)

◆ addData() [5/10]

void QCPFinancial::addData ( double  key,
double  open,
double  high,
double  low,
double  close 
)

◆ addData() [6/10]

void QCPFinancial::addData ( double  key,
double  open,
double  high,
double  low,
double  close 
)

◆ addData() [7/10]

void QCPFinancial::addData ( const QVector< double > &  key,
const QVector< double > &  open,
const QVector< double > &  high,
const QVector< double > &  low,
const QVector< double > &  close 
)

◆ addData() [8/10]

void QCPFinancial::addData ( const QVector< double > &  key,
const QVector< double > &  open,
const QVector< double > &  high,
const QVector< double > &  low,
const QVector< double > &  close 
)

◆ addData() [9/10]

void QCPFinancial::addData ( const QVector< double > &  keys,
const QVector< double > &  open,
const QVector< double > &  high,
const QVector< double > &  low,
const QVector< double > &  close,
bool  alreadySorted = false 
)

◆ addData() [10/10]

void QCPFinancial::addData ( double  key,
double  open,
double  high,
double  low,
double  close 
)

◆ brushNegative() [1/3]

QBrush QCPFinancial::brushNegative ( ) const
inline

◆ brushNegative() [2/3]

QBrush QCPFinancial::brushNegative ( ) const
inline

◆ brushNegative() [3/3]

QBrush QCPFinancial::brushNegative ( ) const
inline

◆ brushPositive() [1/3]

QBrush QCPFinancial::brushPositive ( ) const
inline

◆ brushPositive() [2/3]

QBrush QCPFinancial::brushPositive ( ) const
inline

◆ brushPositive() [3/3]

QBrush QCPFinancial::brushPositive ( ) const
inline

◆ candlestickSelectTest() [1/3]

double QCPFinancial::candlestickSelectTest ( const QPointF &  pos,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
) const
protected

◆ candlestickSelectTest() [2/3]

double QCPFinancial::candlestickSelectTest ( const QPointF &  pos,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
) const
protected

◆ candlestickSelectTest() [3/3]

double QCPFinancial::candlestickSelectTest ( const QPointF &  pos,
const QCPFinancialDataContainer::const_iterator begin,
const QCPFinancialDataContainer::const_iterator end,
QCPFinancialDataContainer::const_iterator closestDataPoint 
) const
protected

◆ chartStyle() [1/3]

ChartStyle QCPFinancial::chartStyle ( ) const
inline

◆ chartStyle() [2/3]

ChartStyle QCPFinancial::chartStyle ( ) const
inline

◆ chartStyle() [3/3]

ChartStyle QCPFinancial::chartStyle ( ) const
inline

◆ clearData() [1/2]

virtual void QCPFinancial::clearData ( )
virtual

Implements QCPAbstractPlottable.

◆ clearData() [2/2]

virtual void QCPFinancial::clearData ( )
virtual

Implements QCPAbstractPlottable.

◆ data() [1/3]

QCPFinancialDataMap* QCPFinancial::data ( ) const
inline

◆ data() [2/3]

QCPFinancialDataMap* QCPFinancial::data ( ) const
inline

◆ data() [3/3]

QSharedPointer<QCPFinancialDataContainer> QCPFinancial::data ( ) const
inline

◆ draw() [1/3]

virtual void QCPFinancial::draw ( QCPPainter painter)
protectedvirtual

Implements QCPAbstractPlottable.

◆ draw() [2/3]

virtual void QCPFinancial::draw ( QCPPainter painter)
protectedvirtual

Implements QCPAbstractPlottable.

◆ draw() [3/3]

virtual void QCPFinancial::draw ( QCPPainter painter)
protectedvirtual

Implements QCPAbstractPlottable.

◆ drawCandlestickPlot() [1/3]

void QCPFinancial::drawCandlestickPlot ( QCPPainter painter,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
)
protected

◆ drawCandlestickPlot() [2/3]

void QCPFinancial::drawCandlestickPlot ( QCPPainter painter,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
)
protected

◆ drawCandlestickPlot() [3/3]

void QCPFinancial::drawCandlestickPlot ( QCPPainter painter,
const QCPFinancialDataContainer::const_iterator begin,
const QCPFinancialDataContainer::const_iterator end,
bool  isSelected 
)
protected

◆ drawLegendIcon() [1/3]

virtual void QCPFinancial::drawLegendIcon ( QCPPainter painter,
const QRectF &  rect 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ drawLegendIcon() [2/3]

virtual void QCPFinancial::drawLegendIcon ( QCPPainter painter,
const QRectF &  rect 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ drawLegendIcon() [3/3]

virtual void QCPFinancial::drawLegendIcon ( QCPPainter painter,
const QRectF &  rect 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ drawOhlcPlot() [1/3]

void QCPFinancial::drawOhlcPlot ( QCPPainter painter,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
)
protected

◆ drawOhlcPlot() [2/3]

void QCPFinancial::drawOhlcPlot ( QCPPainter painter,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
)
protected

◆ drawOhlcPlot() [3/3]

void QCPFinancial::drawOhlcPlot ( QCPPainter painter,
const QCPFinancialDataContainer::const_iterator begin,
const QCPFinancialDataContainer::const_iterator end,
bool  isSelected 
)
protected

◆ getKeyRange() [1/3]

virtual QCPRange QCPFinancial::getKeyRange ( bool &  foundRange,
SignDomain  inSignDomain = sdBoth 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ getKeyRange() [2/3]

virtual QCPRange QCPFinancial::getKeyRange ( bool &  foundRange,
SignDomain  inSignDomain = sdBoth 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ getKeyRange() [3/3]

virtual QCPRange QCPFinancial::getKeyRange ( bool &  foundRange,
QCP::SignDomain  inSignDomain = QCP::sdBoth 
) const
virtual

Implements QCPAbstractPlottable.

◆ getPixelWidth()

double QCPFinancial::getPixelWidth ( double  key,
double  keyPixel 
) const
protected

◆ getValueRange() [1/3]

virtual QCPRange QCPFinancial::getValueRange ( bool &  foundRange,
SignDomain  inSignDomain = sdBoth 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ getValueRange() [2/3]

virtual QCPRange QCPFinancial::getValueRange ( bool &  foundRange,
SignDomain  inSignDomain = sdBoth 
) const
protectedvirtual

Implements QCPAbstractPlottable.

◆ getValueRange() [3/3]

virtual QCPRange QCPFinancial::getValueRange ( bool &  foundRange,
QCP::SignDomain  inSignDomain = QCP::sdBoth,
const QCPRange inKeyRange = QCPRange() 
) const
virtual

Implements QCPAbstractPlottable.

◆ getVisibleDataBounds() [1/3]

void QCPFinancial::getVisibleDataBounds ( QCPFinancialDataMap::const_iterator &  lower,
QCPFinancialDataMap::const_iterator &  upper 
) const
protected

◆ getVisibleDataBounds() [2/3]

void QCPFinancial::getVisibleDataBounds ( QCPFinancialDataMap::const_iterator &  lower,
QCPFinancialDataMap::const_iterator &  upper 
) const
protected

◆ getVisibleDataBounds() [3/3]

void QCPFinancial::getVisibleDataBounds ( QCPFinancialDataContainer::const_iterator begin,
QCPFinancialDataContainer::const_iterator end 
) const
protected

◆ ohlcSelectTest() [1/3]

double QCPFinancial::ohlcSelectTest ( const QPointF &  pos,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
) const
protected

◆ ohlcSelectTest() [2/3]

double QCPFinancial::ohlcSelectTest ( const QPointF &  pos,
const QCPFinancialDataMap::const_iterator &  begin,
const QCPFinancialDataMap::const_iterator &  end 
) const
protected

◆ ohlcSelectTest() [3/3]

double QCPFinancial::ohlcSelectTest ( const QPointF &  pos,
const QCPFinancialDataContainer::const_iterator begin,
const QCPFinancialDataContainer::const_iterator end,
QCPFinancialDataContainer::const_iterator closestDataPoint 
) const
protected

◆ penNegative() [1/3]

QPen QCPFinancial::penNegative ( ) const
inline

◆ penNegative() [2/3]

QPen QCPFinancial::penNegative ( ) const
inline

◆ penNegative() [3/3]

QPen QCPFinancial::penNegative ( ) const
inline

◆ penPositive() [1/3]

QPen QCPFinancial::penPositive ( ) const
inline

◆ penPositive() [2/3]

QPen QCPFinancial::penPositive ( ) const
inline

◆ penPositive() [3/3]

QPen QCPFinancial::penPositive ( ) const
inline

◆ removeData() [1/4]

void QCPFinancial::removeData ( double  fromKey,
double  toKey 
)

◆ removeData() [2/4]

void QCPFinancial::removeData ( double  fromKey,
double  toKey 
)

◆ removeData() [3/4]

void QCPFinancial::removeData ( double  key)

◆ removeData() [4/4]

void QCPFinancial::removeData ( double  key)

◆ removeDataAfter() [1/2]

void QCPFinancial::removeDataAfter ( double  key)

◆ removeDataAfter() [2/2]

void QCPFinancial::removeDataAfter ( double  key)

◆ removeDataBefore() [1/2]

void QCPFinancial::removeDataBefore ( double  key)

◆ removeDataBefore() [2/2]

void QCPFinancial::removeDataBefore ( double  key)

◆ selectionHitBox()

QRectF QCPFinancial::selectionHitBox ( QCPFinancialDataContainer::const_iterator  it) const
protected

◆ selectTest() [1/3]

virtual double QCPFinancial::selectTest ( const QPointF &  pos,
bool  onlySelectable,
QVariant *  details = 0 
) const
virtual

Implements QCPAbstractPlottable.

◆ selectTest() [2/3]

virtual double QCPFinancial::selectTest ( const QPointF &  pos,
bool  onlySelectable,
QVariant *  details = 0 
) const
virtual

Implements QCPAbstractPlottable.

◆ selectTest() [3/3]

virtual double QCPFinancial::selectTest ( const QPointF &  pos,
bool  onlySelectable,
QVariant *  details = 0 
) const
virtual

Implements QCPAbstractPlottable.

◆ selectTestRect()

virtual QCPDataSelection QCPFinancial::selectTestRect ( const QRectF &  rect,
bool  onlySelectable 
) const
virtual

Implements a rect-selection algorithm assuming the data (accessed via the 1D data interface) is point-like. Most subclasses will want to reimplement this method again, to provide a more accurate hit test based on the true data visualization geometry.

Reimplemented from QCPAbstractPlottable1D< QCPFinancialData >.

◆ setBrushNegative() [1/3]

void QCPFinancial::setBrushNegative ( const QBrush &  brush)

◆ setBrushNegative() [2/3]

void QCPFinancial::setBrushNegative ( const QBrush &  brush)

◆ setBrushNegative() [3/3]

void QCPFinancial::setBrushNegative ( const QBrush &  brush)

◆ setBrushPositive() [1/3]

void QCPFinancial::setBrushPositive ( const QBrush &  brush)

◆ setBrushPositive() [2/3]

void QCPFinancial::setBrushPositive ( const QBrush &  brush)

◆ setBrushPositive() [3/3]

void QCPFinancial::setBrushPositive ( const QBrush &  brush)

◆ setChartStyle() [1/3]

void QCPFinancial::setChartStyle ( ChartStyle  style)

◆ setChartStyle() [2/3]

void QCPFinancial::setChartStyle ( ChartStyle  style)

◆ setChartStyle() [3/3]

void QCPFinancial::setChartStyle ( ChartStyle  style)

◆ setData() [1/6]

void QCPFinancial::setData ( QCPFinancialDataMap data,
bool  copy = false 
)

◆ setData() [2/6]

void QCPFinancial::setData ( QCPFinancialDataMap data,
bool  copy = false 
)

◆ setData() [3/6]

void QCPFinancial::setData ( const QVector< double > &  key,
const QVector< double > &  open,
const QVector< double > &  high,
const QVector< double > &  low,
const QVector< double > &  close 
)

◆ setData() [4/6]

void QCPFinancial::setData ( const QVector< double > &  key,
const QVector< double > &  open,
const QVector< double > &  high,
const QVector< double > &  low,
const QVector< double > &  close 
)

◆ setData() [5/6]

void QCPFinancial::setData ( QSharedPointer< QCPFinancialDataContainer data)

◆ setData() [6/6]

void QCPFinancial::setData ( const QVector< double > &  keys,
const QVector< double > &  open,
const QVector< double > &  high,
const QVector< double > &  low,
const QVector< double > &  close,
bool  alreadySorted = false 
)

◆ setPenNegative() [1/3]

void QCPFinancial::setPenNegative ( const QPen &  pen)

◆ setPenNegative() [2/3]

void QCPFinancial::setPenNegative ( const QPen &  pen)

◆ setPenNegative() [3/3]

void QCPFinancial::setPenNegative ( const QPen &  pen)

◆ setPenPositive() [1/3]

void QCPFinancial::setPenPositive ( const QPen &  pen)

◆ setPenPositive() [2/3]

void QCPFinancial::setPenPositive ( const QPen &  pen)

◆ setPenPositive() [3/3]

void QCPFinancial::setPenPositive ( const QPen &  pen)

◆ setTwoColored() [1/3]

void QCPFinancial::setTwoColored ( bool  twoColored)

◆ setTwoColored() [2/3]

void QCPFinancial::setTwoColored ( bool  twoColored)

◆ setTwoColored() [3/3]

void QCPFinancial::setTwoColored ( bool  twoColored)

◆ setWidth() [1/3]

void QCPFinancial::setWidth ( double  width)

◆ setWidth() [2/3]

void QCPFinancial::setWidth ( double  width)

◆ setWidth() [3/3]

void QCPFinancial::setWidth ( double  width)

◆ setWidthType()

void QCPFinancial::setWidthType ( WidthType  widthType)

◆ timeSeriesToOhlc() [1/3]

static QCPFinancialDataMap QCPFinancial::timeSeriesToOhlc ( const QVector< double > &  time,
const QVector< double > &  value,
double  timeBinSize,
double  timeBinOffset = 0 
)
static

◆ timeSeriesToOhlc() [2/3]

static QCPFinancialDataMap QCPFinancial::timeSeriesToOhlc ( const QVector< double > &  time,
const QVector< double > &  value,
double  timeBinSize,
double  timeBinOffset = 0 
)
static

◆ timeSeriesToOhlc() [3/3]

static QCPFinancialDataContainer QCPFinancial::timeSeriesToOhlc ( const QVector< double > &  time,
const QVector< double > &  value,
double  timeBinSize,
double  timeBinOffset = 0 
)
static

◆ twoColored() [1/3]

bool QCPFinancial::twoColored ( ) const
inline

◆ twoColored() [2/3]

bool QCPFinancial::twoColored ( ) const
inline

◆ twoColored() [3/3]

bool QCPFinancial::twoColored ( ) const
inline

◆ width() [1/3]

double QCPFinancial::width ( ) const
inline

◆ width() [2/3]

double QCPFinancial::width ( ) const
inline

◆ width() [3/3]

double QCPFinancial::width ( ) const
inline

◆ widthType()

WidthType QCPFinancial::widthType ( ) const
inline

Friends And Related Function Documentation

◆ QCPLegend

QCPLegend
friend

◆ QCustomPlot

QCustomPlot
friend

Member Data Documentation

◆ mBrushNegative

QBrush QCPFinancial::mBrushNegative
protected

◆ mBrushPositive

QBrush QCPFinancial::mBrushPositive
protected

◆ mChartStyle

ChartStyle QCPFinancial::mChartStyle
protected

◆ mData

QCPFinancialDataMap * QCPFinancial::mData
protected

◆ mPenNegative

QPen QCPFinancial::mPenNegative
protected

◆ mPenPositive

QPen QCPFinancial::mPenPositive
protected

◆ mTwoColored

bool QCPFinancial::mTwoColored
protected

◆ mWidth

double QCPFinancial::mWidth
protected

◆ mWidthType

WidthType QCPFinancial::mWidthType
protected

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