[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Sun Oct 30 01:11:11 CEST 2005
SVN commit 475637 by staikos:
switch the data type to double for time functions and bump the revision number
happy recompile!
M +4 -4 datasources/planck/planck.cpp
M +2 -2 datasources/planck/planck.h
M +3 -3 kstdatasource.cpp
M +5 -5 kstdatasource.h
--- trunk/extragear/graphics/kst/kst/datasources/planck/planck.cpp #475636:475637
@@ -275,7 +275,7 @@
}
-int PlanckSource::sampleForTime(int seconds, bool *ok) {
+int PlanckSource::sampleForTime(double ms, bool *ok) {
if (!_valid) {
if (ok) {
*ok = false;
@@ -283,7 +283,7 @@
return -1;
}
- return _planckObject->sampleForTimeRelative(seconds, ok);
+ return _planckObject->sampleForTimeRelative(ms, ok);
}
@@ -309,7 +309,7 @@
}
-int PlanckSource::relativeTimeForSample(int sample, bool *ok) {
+double PlanckSource::relativeTimeForSample(int sample, bool *ok) {
if (!_valid) {
if (ok) {
*ok = false;
@@ -326,7 +326,7 @@
return -1;
}
- return int(floor(t - i + 0.5));
+ return floor(t - i + 0.5);
}
--- trunk/extragear/graphics/kst/kst/datasources/planck/planck.h #475636:475637
@@ -51,12 +51,12 @@
int sampleForTime(const QDateTime& time, bool *ok = 0L);
- int sampleForTime(int seconds, bool *ok = 0L);
+ int sampleForTime(double ms, bool *ok = 0L);
QDateTime timeForSample(int sample, bool *ok = 0L);
// in (ms)
- int relativeTimeForSample(int sample, bool *ok = 0L);
+ double relativeTimeForSample(int sample, bool *ok = 0L);
bool reset();
--- trunk/extragear/graphics/kst/kst/kstdatasource.cpp #475636:475637
@@ -821,8 +821,8 @@
-int KstDataSource::sampleForTime(int seconds, bool *ok) {
- Q_UNUSED(seconds)
+int KstDataSource::sampleForTime(double ms, bool *ok) {
+ Q_UNUSED(ms)
if (ok) {
*ok = false;
}
@@ -841,7 +841,7 @@
-int KstDataSource::relativeTimeForSample(int sample, bool *ok) {
+double KstDataSource::relativeTimeForSample(int sample, bool *ok) {
Q_UNUSED(sample)
if (ok) {
*ok = false;
--- trunk/extragear/graphics/kst/kst/kstdatasource.h #475636:475637
@@ -30,7 +30,7 @@
#include "kstobject.h"
#include "kst_export.h"
-#define KST_CURRENT_DATASOURCE_KEY 0x00000001
+#define KST_CURRENT_DATASOURCE_KEY 0x00000002
#define KST_KEY_DATASOURCE_PLUGIN(x) extern "C" Q_UINT32 key_##x() { return KST_CURRENT_DATASOURCE_KEY; }
@@ -43,7 +43,7 @@
double yMin;
double xStepSize;
double yStepSize;
- double* z; // the data
+ double *z; // the data
};
class KstScalar;
@@ -192,12 +192,12 @@
virtual int sampleForTime(const QDateTime& time, bool *ok = 0L);
- virtual int sampleForTime(int seconds, bool *ok = 0L);
+ virtual int sampleForTime(double milliseconds, bool *ok = 0L);
virtual QDateTime timeForSample(int sample, bool *ok = 0L);
- // in (s)
- virtual int relativeTimeForSample(int sample, bool *ok = 0L);
+ // in (ms)
+ virtual double relativeTimeForSample(int sample, bool *ok = 0L);
protected:
void updateNumFramesScalar();
More information about the Kst
mailing list