hi,everyone
oscilloscope program give me methods to sample the voltage from ADC of s3c2440 platform.Now I have got it.
Then I want to add a square wave on the canvas which could be a comparison with the sampling curve.
I don't know how to implement it.
I know how to add a curve in plot.cpp:
Qt Code:
  1. p_curve = new QwtPlotCurve();
  2. p_curve->setStyle(QwtPlotCurve::Steps);
  3. p_curve->setPen(QPen(Qt::green));
  4. p_curve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
  5. p_curve->setPaintAttribute(QwtPlotCurve::ClipPolygons, false);
  6. p_curve->setData(SquareWaveData());
  7. p_curve->attach(this);
To copy to clipboard, switch view to plain text mode 
The problem is how to produce the data for the square wave which is synchronous with the sampling curve?