[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Nov 16 22:25:20 CET 2005


SVN commit 480865 by arwalker:

remove obsolete method

 M  +0 -37     kstvector.cpp  
 M  +0 -3      kstvector.h  


--- trunk/extragear/graphics/kst/kst/kstvector.cpp #480864:480865
@@ -459,43 +459,6 @@
 }
 
 
-KstVectorPtr KstVector::generateVector(double x0, double x1, int n, const QString &tag) {
-  if (n < 2) {
-    n = 2;
-  }
-
-  if (x0 > x1) {
-    double tx;
-    tx = x0;
-    x0 = x1;
-    x1 = tx;
-  }
-
-  if (x0 == x1) {
-    x1 = x0 + 0.1;
-  }
-
-  QString t = tag;
-  if (t.isEmpty()) {
-    t = KST::suggestVectorName("X(" + QString::number(x0) + ".." + QString::number(x1) + ")");
-  }
-
-  KstVectorPtr xv = new KstVector(t, n);
-  KST::addVectorToList(xv);
-  xv->_saveable = false;
-
-  for (int i = 0; i < n; i++) {
-    xv->value()[i] = x0 + double(i) * (x1 - x0) / (n - 1);
-  }
-
-  xv->_scalars["min"]->setValue(x0);
-  xv->_scalars["max"]->setValue(x1);
-  xv->updateScalars();
-
-  return xv;
-}
-
-
 void KstVector::setProvider(KstObject* obj) {
   _provider = obj;
 }
--- trunk/extragear/graphics/kst/kst/kstvector.h #480864:480865
@@ -122,9 +122,6 @@
     /** Update the vector.  Return true if there was new data. */
     virtual UpdateType update(int update_counter = -1);
 
-    /** Generate a new vector [x0..x1] with n total points */
-    static KstVectorPtr generateVector(double x0, double x1, int n, const QString& tag);
-
     virtual void setTagName(const QString& newTag);
 
     /** Return a pointer to the raw vector */


More information about the Kst mailing list