#ifndef QMLPLOT_H
#define QMLPLOT_H

#include <QtQuick>


class QCustomPlot;
class QCPAbstractPlottable;

class CustomPlotItem : public QQuickPaintedItem
{
    Q_OBJECT

public:
    CustomPlotItem( QQuickItem* parent = 0 );
    virtual ~CustomPlotItem();

    void paint (QPainter *painter);

    Q_INVOKABLE void initCustomPlot();
    Q_INVOKABLE void showCircle(double x, double y, double radius, int sequence);

protected:

    void drawLine(double x0, double y0, double x1, double y1, int graphNumber);


private:
    QCustomPlot*         m_CustomPlot;
    int                  m_timerId;

private slots:
    void onCustomReplot();
    void updateCustomPlotSize();

};

#endif // QMLPLOT_H
