[Kst] kdeextragear-2/kst/kst/extensions/js

George Staikos staikos at kde.org
Thu Mar 31 19:57:36 CEST 2005


CVS commit by staikos: 

- add a collection base class (read-only right now) and create a plot collection
- attach the plot collection to the window class


  A            bind_collection.cpp   1.1 [GPL (v2+)]
  A            bind_collection.h   1.1 [GPL (v2+)]
  A            bind_plotcollection.cpp   1.1 [GPL (v2+)]
  A            bind_plotcollection.h   1.1 [GPL (v2+)]
  M +2 -1      Makefile.am   1.18
  M +7 -0      bind_window.cpp   1.2
  M +1 -0      bind_window.h   1.2


--- kdeextragear-2/kst/kst/extensions/js/Makefile.am  #1.17:1.18
@@ -15,5 +15,6 @@
                         bind_datavector.cpp bind_equation.cpp \
                         bind_powerspectrum.cpp bind_curve.cpp bind_point.cpp \
-                        bind_window.cpp bind_plot.cpp
+                        bind_window.cpp bind_plot.cpp bind_collection.cpp \
+                        bind_plotcollection.cpp
 
 

--- kdeextragear-2/kst/kst/extensions/js/bind_window.cpp  #1.1:1.2
@@ -17,4 +17,5 @@
 
 #include "bind_window.h"
+#include "bind_plotcollection.h"
 
 #include <kst.h>
@@ -102,4 +103,5 @@ static WindowBindings windowBindings[] =
 static WindowProperties windowProperties[] = {
   { "name", &KstBindWindow::setWindowName, &KstBindWindow::windowName },
+  { "plots", 0L, &KstBindWindow::plots },
   { 0L, 0L, 0L }
 };
@@ -225,3 +227,8 @@ KJS::Value KstBindWindow::close(KJS::Exe
 
 
+KJS::Value KstBindWindow::plots(KJS::ExecState *exec) const {
+  return KJS::Object(new KstBindPlotCollection(exec, _d));
+}
+
+
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/extensions/js/bind_window.h  #1.1:1.2
@@ -47,4 +47,5 @@ class KstBindWindow : public KstBinding 
     void setWindowName(KJS::ExecState *exec, const KJS::Value& value);
     KJS::Value windowName(KJS::ExecState *exec) const;
+    KJS::Value plots(KJS::ExecState *exec) const;
 
   protected:




More information about the Kst mailing list