rahulch

Untitled

Feb 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void ChartModel::appendData(double leftEye)
  2. {
  3.     int const vecSize = vec_.size();
  4.     qDebug() << "vecSize = " << vecSize;
  5.  
  6.     beginInsertRows(QModelIndex (), vecSize, vecSize+1);
  7.    
  8.     double const xVal = vec_.size();
  9.     double const yVal = leftEye;
  10.     vec_.append(qMakePair<double, double>(xVal, yVal));
  11.  
  12.     if (xVal > 30) {
  13.         set_xMin(xVal - 30);
  14.         set_xMax(xVal);
  15.     } else {
  16.         set_xMin(0);
  17.         set_xMax(30);
  18.     }
  19.  
  20.     endInsertRows();
  21. }
Add Comment
Please, Sign In to add comment