qcustomplotvect.h
39 lines
| 1.5 KiB
| text/x-c
|
CLexer
r7 | #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); | ||||
r8 | QVector<QCPData>* getVisibleData(); | |||
r7 | 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 | ||||