mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
#ifndef SCATTERWIDGET_H
|
|
#define SCATTERWIDGET_H
|
|
|
|
#include <qapplication.h>
|
|
#include <qwidget.h>
|
|
#include <complex>
|
|
|
|
class ComplexDataEvent;
|
|
class Pointplot;
|
|
|
|
class ScatterWidget
|
|
: public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ScatterWidget(QWidget* parent = 0);
|
|
virtual ~ScatterWidget();
|
|
|
|
public slots:
|
|
void customEvent( QEvent * e );
|
|
void setWidgetTitle(QString title);
|
|
void setWidgetAxisLabels(QString xLabel, QString yLabel);
|
|
void setWidgetXAxisScale(double xMin, double xMax);
|
|
void setWidgetYAxisScale(double yMin, double yMax);
|
|
void setWidgetXAxisAutoScale(bool on);
|
|
void setWidgetYAxisAutoScale(bool on);
|
|
|
|
protected:
|
|
virtual void timerEvent(QTimerEvent *event);
|
|
|
|
private:
|
|
void setData(ComplexDataEvent* e);
|
|
Pointplot* plot_;
|
|
|
|
struct opReal{double operator()(std::complex<double> i) const{return real(i);}};
|
|
struct opImag{double operator()(std::complex<double> i) const{return imag(i);}};
|
|
|
|
double* iData_;
|
|
double* qData_;
|
|
int numPoints_;
|
|
int timerId_;
|
|
bool haveNewData_;
|
|
};
|
|
|
|
#endif // SCATTERWIDGET_H
|