AbstractCalibrator.h 604 Bytes
Newer Older
1 2 3 4 5 6
#ifndef ABSTRACTCALIBRATOR_H
#define ABSTRACTCALIBRATOR_H

#include <QWidget>
#include <QString>
#include <QLabel>
7
#include <QVector>
8

9 10
#include <math.h>

11 12 13 14 15 16 17
class AbstractCalibrator : public QWidget
{
Q_OBJECT
public:
    explicit AbstractCalibrator(QWidget *parent = 0);
    ~AbstractCalibrator();

18
    virtual void set(const QVector<float>& data)=0;
19 20
signals:
    void setpointChanged(int index, float value);
21

22 23 24 25 26 27 28 29 30 31 32 33
public slots:
    void channelChanged(float raw);

protected:
    QLabel *pulseWidth;

    QVector<float> *log;
    float logExtrema();
    float logAverage();
};

#endif // ABSTRACTCALIBRATOR_H