[Kst] extragear/graphics/kst/kst/extensions/js
George Staikos
staikos at kde.org
Wed Jan 18 23:53:11 CET 2006
SVN commit 499876 by staikos:
well Kst2DPlot doesn't set it's dirty variables properly and it's just too late
to mess with that code. For now the script language will do a setdirty+paint
for every operation. We'll fix it in 1.3
M +41 -0 bind_axis.cpp
M +7 -0 bind_timeinterpretation.cpp
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_axis.cpp #499875:499876
@@ -18,6 +18,7 @@
#include "bind_axis.h"
#include "bind_timeinterpretation.h"
+#include <kst.h>
#include <kstdatacollection.h>
#include <kstplotlabel.h>
@@ -204,6 +205,8 @@
} else {
_d->yLabel()->setText(value.toString(exec).qstring());
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -239,6 +242,8 @@
} else {
_d->setYTransformedExp(value.toString(exec).qstring());
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -274,6 +279,8 @@
} else {
_d->setLog(_d->isXLog(), value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -309,6 +316,8 @@
} else {
_d->setYGridLines(value.toBoolean(exec), _d->hasYMinorGrid());
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -344,6 +353,8 @@
} else {
_d->setYGridLines(_d->hasYMajorGrid(), value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -379,6 +390,8 @@
} else {
_d->setYReversed(value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -414,6 +427,8 @@
} else {
_d->setYOffsetMode(value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -449,6 +464,8 @@
} else {
_d->setSuppressLeft(value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -484,6 +501,8 @@
} else {
_d->setSuppressRight(value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -519,6 +538,8 @@
} else {
_d->setYTicksInPlot(value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -554,6 +575,8 @@
} else {
_d->setYTicksOutPlot(value.toBoolean(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -582,6 +605,8 @@
}
KstWriteLocker rl(_d);
_d->setGridLinesColor(cv.toColor(), _d->minorGridColor(), false, _d->defaultMinorGridColor());
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -610,6 +635,8 @@
}
KstWriteLocker rl(_d);
_d->setGridLinesColor(_d->majorGridColor(), cv.toColor(), _d->defaultMajorGridColor(), false);
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -651,6 +678,8 @@
} else {
_d->setYMinorTicks(value.toInt32(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -725,6 +754,8 @@
} else {
_d->setYMajorTicks(value.toInt32(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -741,6 +772,8 @@
} else {
i = _d->yScaleMode();
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
return KJS::Number(i);
}
@@ -764,6 +797,8 @@
} else {
_d->setYScaleMode(AUTO);
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
return KJS::Undefined();
}
@@ -787,6 +822,8 @@
} else {
_d->setYScaleMode(NOSPIKE);
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
return KJS::Undefined();
}
@@ -818,6 +855,8 @@
_d->setYScaleMode(EXPRESSION);
_d->setYExpressions(args[0].toString(exec).qstring(), args[1].toString(exec).qstring());
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
return KJS::Undefined();
}
@@ -849,6 +888,8 @@
_d->setYScaleMode(FIXED);
_d->setYScale(args[0].toNumber(exec), args[1].toNumber(exec));
}
+ _d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
return KJS::Undefined();
}
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_timeinterpretation.cpp #499875:499876
@@ -19,6 +19,7 @@
#include <kstdatacollection.h>
+#include <kst.h>
#include <kdebug.h>
KstBindTimeInterpretation::KstBindTimeInterpretation(KJS::ExecState *exec, KstBindAxis *d)
@@ -196,6 +197,8 @@
_d->_d->getYAxisInterpretation(isIt, interp, disp);
_d->_d->setYAxisInterpretation(value.toBoolean(exec), interp, disp);
}
+ _d->_d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -286,6 +289,8 @@
_d->_d->getYAxisInterpretation(isIt, interp, disp);
_d->_d->setYAxisInterpretation(isIt, newInterp, disp);
}
+ _d->_d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
@@ -388,6 +393,8 @@
_d->_d->getYAxisInterpretation(isIt, interp, disp);
_d->_d->setYAxisInterpretation(isIt, interp, newDisp);
}
+ _d->_d->setDirty();
+ KstApp::inst()->paintAll(KstPainter::P_PAINT);
}
// vim: ts=2 sw=2 et
More information about the Kst
mailing list