]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
setData() moved from SPlot2d_Curve
authorsan <san@opencascade.com>
Thu, 9 Jun 2005 13:51:06 +0000 (13:51 +0000)
committersan <san@opencascade.com>
Thu, 9 Jun 2005 13:51:06 +0000 (13:51 +0000)
src/Plot2d/Plot2d_Curve.cxx
src/Plot2d/Plot2d_Curve.h

index 0f9c0125cfd137314b44859cd110739323a05403..399e6be20e45da15728053fdae624efcc9bf58b1 100755 (executable)
@@ -181,6 +181,15 @@ pointList Plot2d_Curve::getPointList() const
   return myPoints;
 }
 
+/*!
+  Sets curve's data. 
+*/
+void Plot2d_Curve::setData( const double* hData, const double* vData, long size )
+{
+  clearAllPoints();
+  for(long i = 0; i < size; i++) addPoint(hData[i], vData[i]);
+}
+
 /*!
   Gets curve's data : abscissas of points
 */
index 133f744da76022b6bd1512209ff2dcf12781dd4e..bbb969679a629b71696eed2b7dd0d64aad38e76e 100755 (executable)
@@ -43,8 +43,11 @@ public:
   void        deletePoint(int thePos);
   void        clearAllPoints();
   pointList   getPointList() const;
+
+  void        setData( const double* hData, const double* vData, long size );
   double*     horData() const;
   double*     verData() const;
+
   int         nbPoints() const;
   bool        isEmpty() const;