[Kst] extragear/graphics/kst/kst/extensions/js
George Staikos
staikos at kde.org
Mon Jan 16 20:56:17 CET 2006
SVN commit 498995 by staikos:
Time interpretation class added
M +1 -0 Makefile.am
M +7 -0 bind_axis.cpp
M +7 -0 bind_axis.h
A bind_timeinterpretation.cpp [License: GPL (v2+)]
A bind_timeinterpretation.h [License: GPL (v2+)]
M +1 -0 classindex.xml
--- trunk/extragear/graphics/kst/kst/extensions/js/Makefile.am #498994:498995
@@ -46,6 +46,7 @@
bind_window.cpp \
bind_plot.cpp \
bind_axis.cpp \
+ bind_timeinterpretation.cpp \
bind_collection.cpp \
bind_plotcollection.cpp \
bind_curvecollection.cpp \
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_axis.cpp #498994:498995
@@ -16,6 +16,7 @@
***************************************************************************/
#include "bind_axis.h"
+#include "bind_timeinterpretation.h"
#include <kstdatacollection.h>
#include <kstplotlabel.h>
@@ -79,6 +80,7 @@
{ "scaleMode", 0L, &KstBindAxis::scaleMode },
{ "label", &KstBindAxis::setLabel, &KstBindAxis::label },
{ "type", 0L, &KstBindAxis::type },
+ { "interpretation", 0L, &KstBindAxis::interpretation },
{ 0L, 0L, 0L }
};
@@ -611,6 +613,11 @@
}
+KJS::Value KstBindAxis::interpretation(KJS::ExecState *exec) const {
+ return KJS::Object(new KstBindTimeInterpretation(exec, const_cast<KstBindAxis*>(this))); // yuck
+}
+
+
KJS::Value KstBindAxis::minorTickCount(KJS::ExecState *exec) const {
if (!_d) {
KJS::Object eobj = KJS::Error::create(exec, KJS::GeneralError);
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_axis.h #498994:498995
@@ -167,8 +167,15 @@
</ul>
*/
KJS::Value scaleMode(KJS::ExecState *exec) const;
+ /* @property TimeInterpretation interpretation
+ @readonly
+ @description The method with which the axis is interpreted and times are
+ displayed.
+ */
+ KJS::Value interpretation(KJS::ExecState *exec) const;
protected:
+ friend class KstBindTimeInterpretation;
KstBindAxis(int id);
void addBindings(KJS::ExecState *exec, KJS::Object& obj);
QGuardedPtr<Kst2DPlot> _d;
--- trunk/extragear/graphics/kst/kst/extensions/js/classindex.xml #498994:498995
@@ -51,6 +51,7 @@
<class name="Size" file="bind_size"/>
<class name="StringCollection" file="bind_stringcollection"/>
<class name="String" file="bind_string"/>
+ <class name="TimeInterpretation" file="bind_timeinterpretation"/>
<class name="VectorCollection" file="bind_vectorcollection"/>
<class name="Vector" file="bind_vector"/>
<class name="ViewObjectCollection" file="bind_viewobjectcollection"/>
More information about the Kst
mailing list