[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Feb 11 14:43:20 CET 2004


CVS commit by staikos: 

make vectors accessible from js


  M +1 -0      kstvector.cpp   1.55
  M +80 -76    kstvector.h   1.41


--- kdeextragear-2/kst/kst/kstvector.cpp  #1.54:1.55
@@ -457,3 +457,4 @@ return xv;
 }
 
+#include "kstvector.moc"
 // vim: et sw=2 ts=2

--- kdeextragear-2/kst/kst/kstvector.h  #1.40:1.41
@@ -45,5 +45,6 @@ typedef KSharedPtr<KstVector> KstVectorP
 
 class KstVector : public KstObject {
-public:
+  Q_OBJECT
+  public:
   /**
    * Vectors automatically add themselves to the global vector collection
@@ -53,4 +54,5 @@ public:
   virtual ~KstVector();
 
+  public slots:
   virtual int length() const;
 
@@ -61,7 +63,4 @@ public:
   double value(int i);
 
-  /** Return a pointer to the raw vector */
-  double *const value() const;
-
   /** Return Minimum value in Vector */
   double min() const;
@@ -96,10 +95,4 @@ public:
   void newSync();
 
-  /** Save vector information */
-  virtual void save(QTextStream &ts);
-
-  /** Update the vector.  Return true if there was new data. */
-  virtual UpdateType update(int update_counter = -1);
-
   /** return a sensible label for this vector */
   virtual QString label() const;
@@ -115,10 +108,20 @@ public:
   void zero();
 
-  virtual void setTagName(const QString& newTag);
+  public:
+    /** Save vector information */
+    virtual void save(QTextStream &ts);
+
+    /** 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);
 
-protected: // Protected attributes
+    virtual void setTagName(const QString& newTag);
+
+    /** Return a pointer to the raw vector */
+    double *const value() const;
+
+  protected: // Protected attributes
   /** current number of samples */
   int _size;
@@ -154,5 +157,5 @@ protected: // Protected attributes
   void UpdateScalars();
 
-protected:
+  protected:
   friend class KstDataObject;
   virtual double* realloced(double *memptr, int newSize);
@@ -163,2 +166,3 @@ typedef KstObjectMap<KstVectorPtr> KstVe
 
 #endif
+// vim: ts=2 sw=2 et





More information about the Kst mailing list