Ejemplo n.º 1
0
MainWindow::MainWindow(QWidget *parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow)
{
  pass_edge = 0;
  order = 3;
  taps = 25;
  alpha = 0.25;
  trans = 0.1;
  stop_dBs = 40;
  bits = 0;
  pts = 250;
  w = new double[pts];
  for (int i=0;i<pts;i++) {
	w[i] = (double)i*i;
  }
  lpf_init(pts);

  Butterworth_on = NULL;
  Chebyshev_on = NULL;
  Elliptic_on = NULL;
  MaxflatFIR_on = NULL;
  MaxflatHalfband_on = NULL;
  RaisedCosine_on = NULL;
  RootRaisedCosine_on = NULL;
  EllipticHalfband_on = NULL;
  Remez_on = NULL;
  NotchIIR_on = NULL;
  CutBoost_on = NULL;

  graph_counter = 0;

  ui->setupUi(this);
  //  setGeometry(400, 250, 542, 390);
  setup(ui->customPlot); 

  setWindowTitle("QCustomPlot: "+demoName);
  statusBar()->clearMessage();

  connect(ui->Butterworth, SIGNAL(released()), this, SLOT(BChanged()));
  connect(ui->Chebyshev, SIGNAL(released()), this, SLOT(CChanged()));
  connect(ui->Elliptic, SIGNAL(released()), this, SLOT(EChanged()));
  connect(ui->MaxflatFIR, SIGNAL(released()), this, SLOT(FChanged()));
  connect(ui->MaxflatHalfband, SIGNAL(released()), this, SLOT(FHChanged()));
  connect(ui->RaisedCosine, SIGNAL(released()), this, SLOT(RCChanged()));
  connect(ui->RootRaisedCosine, SIGNAL(released()), this, SLOT(RRCChanged()));
  connect(ui->EllipticHalfband, SIGNAL(released()), this, SLOT(EHChanged()));
  connect(ui->Remez, SIGNAL(released()), this, SLOT(RChanged()));
  connect(ui->NotchIIR, SIGNAL(released()), this, SLOT(NChanged()));
  connect(ui->CutBoost, SIGNAL(released()), this, SLOT(CBChanged()));

  connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), 
		  this, SLOT(graphPressEvent(QMouseEvent*)));
  connect(ui->customPlot, SIGNAL(mouseMove(QMouseEvent*)), 
		  this, SLOT(graphMoveEvent(QMouseEvent*)));


  ui->customPlot->replot();
}
Ejemplo n.º 2
0
MainWindow::MainWindow(QWidget *parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow)
{
  order = 13;
  alpha = 0.25;
  stop_dBs = 40;
  pts = 250;
  w = new double[pts];
  for (int i=0;i<pts;i++) {
		w[i] = (double)i*i;
  }
  LPF.init(pts);

  MaxflatSubband_on = NULL;
  EllipticSubband_on = NULL;
  CutBoost_on = NULL;
  NotchIIR_on = NULL;

  graph_counter = 0;

  ui->setupUi(this);
  //  setGeometry(400, 250, 542, 390);
  setup(ui->customPlot); 

  setWindowTitle("QCustomPlot: "+demoName);
  statusBar()->clearMessage();

  connect(ui->MaxflatSubband, SIGNAL(released()), this, SLOT(MChanged()));
  connect(ui->EllipticSubband, SIGNAL(released()), this, SLOT(EChanged()));
  connect(ui->CutBoost, SIGNAL(released()), this, SLOT(CChanged()));
  connect(ui->NotchIIR, SIGNAL(released()), this, SLOT(NChanged()));

  connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), 
					this, SLOT(graphPressEvent(QMouseEvent*)));
  connect(ui->customPlot, SIGNAL(mouseMove(QMouseEvent*)), 
					this, SLOT(graphMoveEvent(QMouseEvent*)));


  ui->customPlot->replot();
}
Ejemplo n.º 3
0
MainWindow::MainWindow(QWidget *parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow)
{
  pass_edge = 0;
  order = 3;
  trans = 0.1;
  stop_dBs = 40;
  pts = 250;
  w = new double[pts];
  for (int i=0;i<pts;i++) {
		w[i] = (double)i*i;
  }
  lpf_init(pts);

  Butterworth_on = NULL;
  Chebyshev_on = NULL;
  Chebyshev2_on = NULL;
  Elliptic_on = NULL;

  graph_counter = 0;

  ui->setupUi(this);
  //  setGeometry(400, 250, 542, 390);
  setup(ui->customPlot); 

  setWindowTitle("QCustomPlot: "+demoName);
  statusBar()->clearMessage();

  connect(ui->Butterworth, SIGNAL(released()), this, SLOT(BChanged()));
  connect(ui->Chebyshev, SIGNAL(released()), this, SLOT(CChanged()));
  connect(ui->Chebyshev2, SIGNAL(released()), this, SLOT(C2Changed()));
  connect(ui->Elliptic, SIGNAL(released()), this, SLOT(EChanged()));

  connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)),	this, SLOT(graphPressEvent(QMouseEvent*)));
  connect(ui->customPlot, SIGNAL(mouseMove(QMouseEvent*)), 	this, SLOT(graphMoveEvent(QMouseEvent*)));
  ui->customPlot->replot();
}