[Kst] kdeextragear-2/kst/kst/extensions/js
George Staikos
staikos at kde.org
Thu Mar 31 06:30:16 CEST 2005
CVS commit by staikos:
- add point class
- add notes about backward compat
- activate curve class
- fix major typos in curve class
- make curve class use point
A bind_point.cpp 1.1 [GPL (v2+)]
A bind_point.h 1.1 [GPL (v2+)]
A compatibility.txt 1.1
M +1 -1 Makefile.am 1.16
M +10 -12 bind_curve.cpp 1.2
M +1 -0 bindings.txt 1.8
M +6 -0 js.cpp 1.17
--- kdeextragear-2/kst/kst/extensions/js/Makefile.am #1.15:1.16
@@ -14,5 +14,5 @@
bind_scalar.cpp bind_string.cpp bind_datasource.cpp \
bind_datavector.cpp bind_equation.cpp \
- bind_powerspectrum.cpp bind_curve.cpp
+ bind_powerspectrum.cpp bind_curve.cpp bind_point.cpp
--- kdeextragear-2/kst/kst/extensions/js/bind_curve.cpp #1.1:1.2
@@ -17,4 +17,5 @@
#include "bind_curve.h"
+#include "bind_point.h"
#include "bind_vector.h"
@@ -138,12 +139,12 @@ static CurveBindings curveBindings[] = {
static CurveProperties curveProperties[] = {
- { "setTagName", &KstBindCurve::setTagName, &KstBindCurve::tagName },
- { "setColor", &KstBindCurve::setColor, &KstBindCurve::color },
- { "setXVector", &KstBindCurve::setXVector, &KstBindCurve::xVector },
- { "setYVector", &KstBindCurve::setYVector, &KstBindCurve::yVector },
- { "setXErrorVector", &KstBindCurve::setXErrorVector, &KstBindCurve::xErrorVector },
- { "setYErrorVector", &KstBindCurve::setYErrorVector, &KstBindCurve::yErrorVector },
- { "setXMinusErrorVector", &KstBindCurve::setXMinusErrorVector, &KstBindCurve::xMinusErrorVector },
- { "setYMinusErrorVector", &KstBindCurve::setYMinusErrorVector, &KstBindCurve::yMinusErrorVector },
+ { "tagName", &KstBindCurve::setTagName, &KstBindCurve::tagName },
+ { "color", &KstBindCurve::setColor, &KstBindCurve::color },
+ { "xVector", &KstBindCurve::setXVector, &KstBindCurve::xVector },
+ { "yVector", &KstBindCurve::setYVector, &KstBindCurve::yVector },
+ { "xErrorVector", &KstBindCurve::setXErrorVector, &KstBindCurve::xErrorVector },
+ { "yErrorVector", &KstBindCurve::setYErrorVector, &KstBindCurve::yErrorVector },
+ { "xMinusErrorVector", &KstBindCurve::setXMinusErrorVector, &KstBindCurve::xMinusErrorVector },
+ { "yMinusErrorVector", &KstBindCurve::setYMinusErrorVector, &KstBindCurve::yMinusErrorVector },
{ "samplesPerFrame", 0L, &KstBindCurve::samplesPerFrame },
{ "ignoreAutoScale", &KstBindCurve::setIgnoreAutoScale, &KstBindCurve::ignoreAutoScale },
@@ -275,8 +276,5 @@ KJS::Value KstBindCurve::point(KJS::Exec
double x, y;
_d->point(i, x, y);
- // FIXME: bind KstPoint first
- //return KJSEmbed::convertToValue(exec, KstPoint(x, y));
- abort();
- return KJS::Undefined();
+ return KJS::Object(new KstBindPoint(exec, x, y));
}
--- kdeextragear-2/kst/kst/extensions/js/bindings.txt #1.7:1.8
@@ -12,4 +12,5 @@
String DONE
DataSource DONE
+Point DONE (simply x,y)
KstFile
Matrix
--- kdeextragear-2/kst/kst/extensions/js/js.cpp #1.16:1.17
@@ -35,8 +35,10 @@
#include <kparts/part.h>
+#include "bind_curve.h"
#include "bind_datasource.h"
#include "bind_datavector.h"
#include "bind_equation.h"
#include "bind_kst.h"
+#include "bind_point.h"
#include "bind_powerspectrum.h"
#include "bind_scalar.h"
@@ -90,4 +92,6 @@ void KstJS::createBindings() {
KJS::Object globalObj = _jsPart->globalObject();
+ new KstBindPoint(exec, &globalObj);
+
new KstBindVector(exec, &globalObj);
new KstBindScalar(exec, &globalObj);
@@ -99,4 +103,6 @@ void KstJS::createBindings() {
new KstBindPowerSpectrum(exec, &globalObj);
+ new KstBindCurve(exec, &globalObj);
+
new KstBindKst(exec, &globalObj);
}
More information about the Kst
mailing list