[Kst] kdeextragear-2/kst/kst/datasources/planck
George Staikos
staikos at kde.org
Wed Feb 4 17:19:35 CET 2004
CVS commit by staikos:
add updates support
M +3 -0 planck.cpp 1.12
M +5 -0 planckdata.cpp 1.6
M +2 -0 planckdata.h 1.7
M +16 -0 plancktoi.cpp 1.11
M +2 -0 plancktoi.h 1.6
--- kdeextragear-2/kst/kst/datasources/planck/planck.cpp #1.11:1.12
@@ -50,4 +50,7 @@ KstObject::UpdateType PlanckSource::upda
// - ranges - range of an object in a group being watched is changed
// - new contents?
+ if (_valid && _planckTOI && _planckTOI->updated()) {
+ return KstObject::UPDATE;
+ }
return KstObject::NO_CHANGE;
}
--- kdeextragear-2/kst/kst/datasources/planck/planckdata.cpp #1.5:1.6
@@ -86,4 +86,9 @@ int Source::readObject(const QString& ob
+bool Source::updated() const {
+ return false;
+}
+
+
QSize Source::range(const QString& object) const {
Q_UNUSED(object)
--- kdeextragear-2/kst/kst/datasources/planck/planckdata.h #1.6:1.7
@@ -44,4 +44,6 @@ class Source : public KShared {
virtual bool isValid() const;
+ virtual bool updated() const;
+
virtual bool setGroup(const QString& group);
--- kdeextragear-2/kst/kst/datasources/planck/plancktoi.cpp #1.10:1.11
@@ -23,4 +23,7 @@
#define PIOLIBDEBUG
#include "plancktoi.h"
+#ifdef KST_HAVE_PLANCK
+#include <HL2_PIOLIB/PIOErr.h>
+#endif
using namespace Planck;
@@ -66,4 +69,17 @@ TOI::~TOI() {
+bool TOI::updated() const {
+#ifdef KST_HAVE_PLANCK
+ if (_isValid) {
+ const TOIGroup *tg = findGroup(_group);
+ if (tg) {
+ return PIOUPDATE == PIOCheckUpdateGrp(tg->_group);
+ }
+ }
+#endif
+ return false;
+}
+
+
void TOI::reset() {
#ifdef PIOLIBDEBUG
--- kdeextragear-2/kst/kst/datasources/planck/plancktoi.h #1.5:1.6
@@ -39,4 +39,6 @@ class TOI : public Source {
virtual void reset();
+ virtual bool updated() const;
+
virtual int readObject(const QString& object, double *buf, long start, long end);
More information about the Kst
mailing list