mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-01-10 19:20:14 +02:00
32 lines
773 B
C++
Executable File
32 lines
773 B
C++
Executable File
#ifndef SIGNALDISPLAY_H
|
|
#define SIGNALDISPLAY_H
|
|
|
|
#include <QWidget>
|
|
#include <cmath>
|
|
#include <QtGui>
|
|
|
|
class SignalDisplay : public QWidget
|
|
{
|
|
public:
|
|
SignalDisplay(QWidget *&parent);
|
|
void addPoint( int value1);
|
|
void setSecsPerDiv( float value ){ secsPerDiv = fabs(value);}
|
|
void setVoltsPerDiv( float value ){ voltsPerDiv = fabs(value);}
|
|
float getSecsPerDiv(){ return secsPerDiv; }
|
|
void setPointsPerPlot(int value);
|
|
void setColorTrace(QColor color){colorTrace=color;};
|
|
|
|
private:
|
|
void paintEvent(QPaintEvent *event);
|
|
void drawGrid(QPainter &p, QColor colorGrid, int x, int y, int w, int h, int nx, int ny);
|
|
QPoint *waves;
|
|
float voltsPerDiv;
|
|
float secsPerDiv;
|
|
QColor colorTrace;
|
|
int secsIdx;
|
|
int w, h, ox, oy;
|
|
int pointsPerPlot;
|
|
};
|
|
|
|
#endif // SIGNALDISPLAY_H
|