CurveCalibrator.h 876 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#ifndef CURVECALIBRATOR_H
#define CURVECALIBRATOR_H

#include <QWidget>
#include <QVector>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
12 13 14 15 16
#include <QPen>
#include <QColor>
#include <QString>
#include <QSignalMapper>
#include <QDebug>
17

18 19 20
#include "AbstractCalibrator.h"

class CurveCalibrator : public AbstractCalibrator
21 22 23 24
{
Q_OBJECT
public:
    explicit CurveCalibrator(QString title = QString(), QWidget *parent = 0);
25
    ~CurveCalibrator();
26 27

    void set(const QVector<float> &data);
28
signals:
29 30 31 32
    void setpointChanged(int setpoint, float raw);    

protected slots:
    void setSetpoint(int setpoint);
33 34

protected:
35 36
    QVector<double> *setpoints;
    QVector<double> *positions;
37 38
    QwtPlot *plot;
    QwtPlotCurve *curve;
39 40

    QSignalMapper *signalMapper;
41 42 43
};

#endif // CURVECALIBRATOR_H