[Kst] branches/work/kst/portto4/kst
Mike Fenton
mike at staikos.net
Fri Oct 5 15:46:06 CEST 2007
SVN commit 721557 by fenton:
Conversion of KstHistogram to Kst::Histogram and associated changes.
M +1 -1 src/libkstmath/defaultnames.cpp
A src/libkstmath/histogram.cpp src/libkstmath/ksthistogram.cpp#721549 [License: GPL (v2+)]
A src/libkstmath/histogram.h src/libkstmath/ksthistogram.h#721549 [License: GPL (v2+)]
D src/libkstmath/ksthistogram.cpp
D src/libkstmath/ksthistogram.h
M +2 -2 src/libkstmath/libkstmath.pro
M +5 -5 tests/testhistogram.cpp
--- branches/work/kst/portto4/kst/src/libkstmath/defaultnames.cpp #721556:721557
@@ -18,7 +18,7 @@
#include "dataobjectcollection.h"
#include "datacollection.h"
#include "defaultnames.h"
-#include "ksthistogram.h"
+#include "histogram.h"
#include "kstpsd.h"
#include "kstvcurve.h"
--- branches/work/kst/portto4/kst/src/libkstmath/libkstmath.pro #721556:721557
@@ -37,7 +37,7 @@
kstvcurve.cpp \
kstimage.cpp \
defaultnames.cpp \
- ksthistogram.cpp \
+ histogram.cpp \
equation.cpp \
curvehint.cpp \
basicplugin.cpp \
@@ -71,7 +71,7 @@
dataobject.h \
defaultnames.h \
equation.h \
- ksthistogram.h \
+ histogram.h \
kstimage.h \
kstlinestyle.h \
kstobjectdefaults.h \
--- branches/work/kst/portto4/kst/tests/testhistogram.cpp #721556:721557
@@ -14,7 +14,7 @@
#include <QtTest>
#include <vector.h>
-#include <ksthistogram.h>
+#include <histogram.h>
#include <datacollection.h>
#include <dataobjectcollection.h>
@@ -26,7 +26,7 @@
void TestHistogram::testHistogram() {
Kst::VectorPtr vp = Kst::Vector::generateVector(0, 10, 100, Kst::ObjectTag::fromString("V1"));
- KstHistogramPtr h1 = new KstHistogram("H1", vp, 0, 10, 10, KST_HS_NUMBER);
+ Kst::HistogramPtr h1 = new Kst::Histogram("H1", vp, 0, 10, 10, Kst::KST_HS_NUMBER);
Kst::dataObjectList.append(h1.data());
QCOMPARE(h1->propertyString(), QLatin1String("Histogram: V1"));
@@ -82,7 +82,7 @@
//dumpPoints(h1, 9);
QCOMPARE(count, 100); // should still account for the whole vector
// min > max
- h1 = new KstHistogram("H2", vp, 10, 0, 10, KST_HS_NUMBER);
+ h1 = new Kst::Histogram("H2", vp, 10, 0, 10, Kst::KST_HS_NUMBER);
QCOMPARE(h1->nBins(), 10);
QCOMPARE(h1->xMin(), 0.0);
QCOMPARE(h1->xMax(), 10.0);
@@ -90,7 +90,7 @@
QCOMPARE(h1->vMax(), 10.0);
QCOMPARE(h1->vNumSamples(), 100);
// min == max
- h1 = new KstHistogram("H3", vp, 10, 10, 2, KST_HS_NUMBER);
+ h1 = new Kst::Histogram("H3", vp, 10, 10, 2, Kst::KST_HS_NUMBER);
QCOMPARE(h1->nBins(), 2);
QCOMPARE(h1->xMin(), 9.0);
QCOMPARE(h1->xMax(), 11.0);
@@ -98,7 +98,7 @@
QCOMPARE(h1->vMax(), 10.0);
QCOMPARE(h1->vNumSamples(), 100);
// max < min
- h1 = new KstHistogram("H4", vp, 11, 9, 1, KST_HS_NUMBER);
+ h1 = new Kst::Histogram("H4", vp, 11, 9, 1, Kst::KST_HS_NUMBER);
QCOMPARE(h1->nBins(), 2);
QCOMPARE(h1->xMax(), 11.0);
QCOMPARE(h1->xMin(), 9.0);
More information about the Kst
mailing list