##// END OF EJS Templates
Removed hack from QCustomPlot, moved to QCustomPlotVect class.
Removed hack from QCustomPlot, moved to QCustomPlotVect class.

File last commit:

r7:6e23aedd1ca8 default
r7:6e23aedd1ca8 default
Show More
qcustomplotvect.h
38 lines | 1.4 KiB | text/x-c | CLexer
#ifndef QCUSTOMPLOTVECT_H
#define QCUSTOMPLOTVECT_H
#include <QWidget>
#include <qcustomplot.h>
class QCPGraphVect : public QCPGraph
{
Q_OBJECT
public:
explicit QCPGraphVect(QCPAxis *keyAxis, QCPAxis *valueAxis);
~QCPGraphVect();
QVector<QCPData> *data() const { return mData; }
void setData(QVector<QCPData> *data);
protected:
QVector<QCPData>* mData;
virtual void draw(QCPPainter *painter);
virtual QCPRange getKeyRange(bool &foundRange, SignDomain inSignDomain, bool includeErrors) const; // overloads base class interface
virtual QCPRange getValueRange(bool &foundRange, SignDomain inSignDomain, bool includeErrors) const;
void getPreparedData(QVector<QCPData> *lineData, QVector<QCPData> *scatterData) const;
void getVisibleDataBounds(QVector<QCPData>::const_iterator &lower, QVector<QCPData>::const_iterator &upper) const;
int countDataInBounds(const QVector<QCPData>::const_iterator &lower, const QVector<QCPData>::const_iterator &upper, int maxCount) const;
void getPlotData(QVector<QPointF> *lineData, QVector<QCPData> *scatterData) const;
void getLinePlotData(QVector<QPointF> *linePixelData, QVector<QCPData> *scatterData) const;
};
class QCustomPlotVect : public QCustomPlot
{
Q_OBJECT
public:
QCustomPlotVect(QWidget *parent = 0);
~QCustomPlotVect();
QCPGraphVect *addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0);
protected:
};
#endif // QCUSTOMPLOTVECT_H