[Kst] branches/work/kst/1.6/kst/src/extensions/js

Andrew Walker arwalker at sumusltd.com
Wed Nov 28 21:13:41 CET 2007


SVN commit 742735 by arwalker:

first draft of spectrogram functionality in javaScript

 M  +2 -0      Makefile.am  
 A             bind_csd.cpp   [License: GPL (v2+)]
 A             bind_csd.h   [License: GPL (v2+)]
 A             bind_csdcollection.cpp   [License: GPL (v2+)]
 A             bind_csdcollection.h   [License: GPL (v2+)]
 M  +4 -3      bind_powerspectrumcollection.cpp  
 M  +2 -0      classindex.xml  
 M  +2 -0      js.cpp  


--- branches/work/kst/1.6/kst/src/extensions/js/Makefile.am #742734:742735
@@ -42,6 +42,7 @@
 			    bind_datavector.cpp \
 			    bind_equation.cpp \
 			    bind_powerspectrum.cpp \
+			    bind_csd.cpp \
 			    bind_curve.cpp \
 			    bind_point.cpp \
 			    bind_window.cpp \
@@ -66,6 +67,7 @@
 			    bind_histogramcollection.cpp \
 			    bind_equationcollection.cpp \
 			    bind_powerspectrumcollection.cpp \
+			    bind_csdcollection.cpp \
 			    bind_matrixcollection.cpp \
 			    bind_dataobject.cpp \
 			    bind_dataobjectcollection.cpp \
--- branches/work/kst/1.6/kst/src/extensions/js/bind_powerspectrumcollection.cpp #742734:742735
@@ -35,12 +35,14 @@
 
 KJS::Value KstBindPowerSpectrumCollection::length(KJS::ExecState *exec) const {
   Q_UNUSED(exec)
+
   return KJS::Number(_psds.count());
 }
 
 
 QStringList KstBindPowerSpectrumCollection::collection(KJS::ExecState *exec) const {
   Q_UNUSED(exec)
+
   return _psds;
 }
 
@@ -48,6 +50,7 @@
 KJS::Value KstBindPowerSpectrumCollection::extract(KJS::ExecState *exec, const KJS::Identifier& item) const {
   KstPSDList pl = kstObjectSubList<KstDataObject,KstPSD>(KST::dataObjectList);
   KstPSDPtr p = *pl.findTag(item.qstring());
+
   if (p) {
     return KJS::Object(new KstBindPowerSpectrum(exec, p));
   }
@@ -58,6 +61,7 @@
 KJS::Value KstBindPowerSpectrumCollection::extract(KJS::ExecState *exec, unsigned item) const {
   KstPSDList pl = kstObjectSubList<KstDataObject,KstPSD>(KST::dataObjectList);
   KstPSDPtr p;
+
   if (item < pl.count()) {
     p = pl[item];
   }
@@ -66,6 +70,3 @@
   }
   return KJS::Undefined();
 }
-
-
-// vim: ts=2 sw=2 et
--- branches/work/kst/1.6/kst/src/extensions/js/classindex.xml #742734:742735
@@ -50,6 +50,8 @@
   <class name="ScalarCollection" file="bind_scalarcollection"/>
   <class name="Scalar" file="bind_scalar"/>
   <class name="Size" file="bind_size"/>
+  <class name="SpectrogramCollection" file="bind_csdcollection"/>
+  <class name="Spectrogram" file="bind_csd"/>
   <class name="StringCollection" file="bind_stringcollection"/>
   <class name="String" file="bind_string"/>
   <class name="TimeInterpretation" file="bind_timeinterpretation"/>
--- branches/work/kst/1.6/kst/src/extensions/js/js.cpp #742734:742735
@@ -46,6 +46,7 @@
 
 #include "bind_arrow.h"
 #include "bind_box.h"
+#include "bind_csd.h"
 #include "bind_curve.h"
 #include "bind_datamatrix.h"
 #include "bind_datasource.h"
@@ -201,6 +202,7 @@
   new KstBindMatrix(exec, &globalObj);
   new KstBindDataMatrix(exec, &globalObj);
 
+  new KstBindCSD(exec, &globalObj);
   new KstBindEquation(exec, &globalObj);
   new KstBindPlugin(exec, &globalObj);
   new KstBindPowerSpectrum(exec, &globalObj);


More information about the Kst mailing list