Hello everyone - thx for reading!

I am working on a plot for an ad-converter. Because I'm new to C++, Qt and Qwt, I am currently studying the refreshtest example to get a clue of how to implement the plot. I think I get most of the code, but the following is not clear to me:

When and by what are these functions called:

Qt Code:
  1. QPointF CircularBuffer::sample(size_t i) const
  2. {
  3. const int size = d_values.size();
  4.  
  5. int index = d_startIndex + i;
  6. if ( index >= size )
  7. index -= size;
  8.  
  9. const double x = i * d_step - d_offset - d_interval;
  10. const double y = d_values.data()[index];
  11.  
  12. return QPointF(x, y);
  13. }
  14.  
  15. QRectF CircularBuffer::boundingRect() const
  16. {
  17. return QRectF(-1.0, -d_interval, 2.0, d_interval);
  18. }
To copy to clipboard, switch view to plain text mode 

Since this is the Qwt forum, I desisted from posting the whole code of the example. I hope thats fine.


Looking forward for your help!
Emi