[Kst] branches/work/kst/portto4/kst/src
Mike Fenton
mike at staikos.net
Mon Jun 16 16:56:34 CEST 2008
SVN commit 821136 by fenton:
Cleanup of unused constructors.
Fix Sample Plugin constructor access.
Remove unnecessary friend classes and comment from primitives, relations and dataobjects.
M +1 -2 libkst/datavector.h
M +2 -2 libkst/editablevector.h
M +1 -2 libkst/generatedvector.h
M +2 -2 libkst/object.cpp
M +0 -1 libkst/objectstore.h
M +0 -34 libkst/scalar.cpp
M +1 -2 libkst/vector.h
M +0 -11 libkstmath/basicplugin.cpp
M +0 -1 libkstmath/basicplugin.h
M +0 -61 libkstmath/csd.cpp
M +0 -1 libkstmath/csd.h
M +0 -7 libkstmath/dataobject.cpp
M +0 -1 libkstmath/dataobject.h
M +1 -2 libkstmath/equation.h
M +0 -67 libkstmath/image.cpp
M +0 -1 libkstmath/image.h
M +0 -1 libkstmath/psd.h
M +0 -5 libkstmath/relation.cpp
M +0 -1 libkstmath/relation.h
M +9 -6 plugins/sampleplugin/sampleplugin.h
--- branches/work/kst/portto4/kst/src/libkst/datavector.h #821135:821136
@@ -134,8 +134,7 @@
virtual ~DataVector();
- friend class DataVectorFactory;
- friend class ObjectStore; // FIXME: remove this when factory is working
+ friend class ObjectStore;
virtual QString _automaticDescriptiveName() const;
--- branches/work/kst/portto4/kst/src/libkst/editablevector.h #821135:821136
@@ -41,8 +41,8 @@
KST_EXPORT EditableVector(ObjectStore *store, const QByteArray& data);
KST_EXPORT EditableVector(ObjectStore *store, int n=0);
- friend class EditableVectorFactory;
- friend class ObjectStore; // FIXME: remove this when factory works
+ friend class ObjectStore;
+
virtual QString _automaticDescriptiveName() const;
};
--- branches/work/kst/portto4/kst/src/libkst/generatedvector.h #821135:821136
@@ -44,8 +44,7 @@
GeneratedVector(ObjectStore *store, double x0=0, double x1=0, int n=0);
GeneratedVector(ObjectStore *store, const QByteArray &data, double x0, double x1, int n);
- friend class GeneratedVectorFactory;
- friend class ObjectStore; // FIXME: remove this when factory works
+ friend class ObjectStore;
virtual QString _automaticDescriptiveName() const;
};
--- branches/work/kst/portto4/kst/src/libkst/object.cpp #821135:821136
@@ -29,8 +29,8 @@
const QString Object::staticTypeString = I18N_NOOP("Object");
Object::Object() :
- Shared(), KstRWLock(),
- _store(0L), NamedObject()
+ Shared(), KstRWLock(), NamedObject(),
+ _store(0L)
{
_dirty = false;
--- branches/work/kst/portto4/kst/src/libkst/objectstore.h #821135:821136
@@ -47,7 +47,6 @@
~ObjectStore();
template<class T> SharedPtr<T> createObject();
- template<class T> SharedPtr<T> createObject(const QDomElement& e);
template<class T> bool addObject(T *o);
bool removeObject(Object *o);
--- branches/work/kst/portto4/kst/src/libkst/scalar.cpp #821135:821136
@@ -52,40 +52,6 @@
}
-// Scalar::Scalar(ObjectStore *store, const QDomElement& e)
-// : Primitive(store), _orphan(false), _displayable(true), _editable(false) {
-// QDomNode n = e.firstChild();
-// bool ok;
-//
-// _value = 0.0; // must init this first
-//
-// while (!n.isNull()) {
-// QDomElement e = n.toElement();
-// if(!e.isNull()) {
-// if (e.tagName() == "tag") {
-// setTagName(ObjectTag::fromString(e.text()));
-// } else if (e.tagName() == "orphan") {
-// _orphan = true;
-// } else if (e.tagName() == "value") {
-// setValue(e.text().toDouble());
-// } else if (e.tagName() == "editable") {
-// _editable = true;
-// }
-// }
-// n = n.nextSibling();
-// }
-//
-// if (tag().name().toDouble(&ok) == value() && ok) {
-// _displayable = false;
-// }
-//
-// _shortName = "X"+QString::number(_xnum);
-// if (_xnum>max_xnum)
-// max_xnum = _xnum;
-// _xnum++;
-// }
-
-
Scalar::~Scalar() {
}
--- branches/work/kst/portto4/kst/src/libkst/vector.h #821135:821136
@@ -63,8 +63,7 @@
virtual ~Vector();
- friend class VectorFactory;
- friend class ObjectStore; // FIXME: remove this when VectorFactory is working
+ friend class ObjectStore;
public:
void change(QByteArray& data);
--- branches/work/kst/portto4/kst/src/libkstmath/basicplugin.cpp #821135:821136
@@ -43,17 +43,6 @@
}
-// BasicPlugin::BasicPlugin(ObjectStore *store, const QDomElement& e)
-// : DataObject(store, e), _isFit(false) {
-// _typeString = i18n("Plugin");
-// _type = "Plugin";
-// _shortName = "P"+QString::number(_pnum);
-// if (_pnum>max_pnum)
-// max_pnum = _pnum;
-// _pnum++;
-// }
-//
-
BasicPlugin::~BasicPlugin() {
}
--- branches/work/kst/portto4/kst/src/libkstmath/basicplugin.h #821135:821136
@@ -94,7 +94,6 @@
protected:
BasicPlugin(ObjectStore *store);
-// BasicPlugin(ObjectStore *store, const QDomElement &e);
virtual ~BasicPlugin();
virtual QString parameterName(int index) const;
--- branches/work/kst/portto4/kst/src/libkstmath/csd.cpp #821135:821136
@@ -56,67 +56,6 @@
}
-// CSD::CSD(ObjectStore *store, const QDomElement &e)
-// : DataObject(store, e) {
-// QString in_tag;
-// QString vecName;
-// QString in_vectorUnits, in_rateUnits;
-// VectorPtr in_V;
-// double in_freq = 60.0;
-// bool in_average = true;
-// int in_averageLength = 8;
-// bool in_removeMean = true;
-// bool in_apodize = true;
-// ApodizeFunction in_apodizeFxn = WindowOriginal;
-// int in_windowSize = 5000;
-// double in_gaussianSigma = 3.0;
-// PSDType in_outputType = PSDAmplitudeSpectralDensity;
-//
-// QDomNode n = e.firstChild();
-// while (!n.isNull()) {
-// QDomElement e = n.toElement(); // try to convert the node to an element.
-// if (!e.isNull()) { // the node was really an element.
-// if (e.tagName() == "tag") {
-// in_tag = e.text();
-// } else if (e.tagName() == "vector") {
-// vecName = e.text();
-// } else if (e.tagName() == "samplerate") {
-// in_freq = e.text().toDouble();
-// } else if (e.tagName() == "average") {
-// in_average = (e.text() != "0");
-// } else if (e.tagName() == "fftlength") {
-// in_averageLength = e.text().toInt();
-// } else if (e.tagName() == "apodize") {
-// in_apodize = (e.text() != "0");
-// } else if (e.tagName() == "apodizefunction") {
-// in_apodizeFxn = ApodizeFunction(e.text().toInt());
-// } else if (e.tagName() == "gaussiansigma") {
-// in_gaussianSigma = e.text().toDouble();
-// } else if (e.tagName() == "removemean") {
-// in_removeMean = (e.text() != "0");
-// } else if (e.tagName() == "windowsize") {
-// in_windowSize = e.text().toInt();
-// } else if (e.tagName() == "vectorunits") {
-// in_vectorUnits = e.text();
-// } else if (e.tagName() == "rateunits") {
-// in_rateUnits = e.text();
-// } else if (e.tagName() == "outputtype") {
-// in_outputType = (PSDType)e.text().toInt();
-// }
-// }
-// n = n.nextSibling();
-// }
-//
-// _inputVectorLoadQueue.append(qMakePair(QString(INVECTOR), vecName));
-//
-// setTagName(ObjectTag::fromString(in_tag));
-//
-// commonConstructor(store, in_V, in_freq, in_average, in_removeMean,
-// in_apodize, in_apodizeFxn, in_windowSize, in_averageLength, in_gaussianSigma,
-// in_vectorUnits, in_rateUnits, in_outputType, vecName);
-// }
-
-
void CSD::change(VectorPtr in_V, double in_freq, bool in_average,
bool in_removeMean, bool in_apodize, ApodizeFunction in_apodizeFxn,
int in_windowSize, int in_length, double in_gaussianSigma,
--- branches/work/kst/portto4/kst/src/libkstmath/csd.h #821135:821136
@@ -91,7 +91,6 @@
bool in_apodize, ApodizeFunction in_apodizeFxn, int in_windowSize, int in_length,
double in_gaussianSigma, PSDType in_outputType, const QString& in_vectorUnits = QString::null,
const QString& in_rateUnits = QString::null);
-// CSD(ObjectStore *store, const QDomElement& e);
virtual ~CSD();
friend class ObjectStore;
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.cpp #821135:821136
@@ -54,13 +54,6 @@
_isInputLoaded = false;
}
-// DataObject::DataObject(ObjectStore *store, const QDomElement& e) : Object() {
-// Q_UNUSED(e)
-// //qDebug() << "+++ CREATING DATA OBJECT: " << (void*)this << endl;
-// _curveHints = new CurveHintList;
-// _isInputLoaded = false;
-// }
-//
DataObject::~DataObject() {
delete _curveHints;
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.h #821135:821136
@@ -137,7 +137,6 @@
protected:
DataObject(ObjectStore *store);
-// DataObject(ObjectStore *store, const QDomElement& e);
virtual ~DataObject();
double *vectorRealloced(VectorPtr v, double *memptr, int newSize) const;
--- branches/work/kst/portto4/kst/src/libkstmath/equation.h #821135:821136
@@ -85,8 +85,7 @@
Equation(ObjectStore *store, const QString& equation = QString::null, VectorPtr xvector = 0L, bool do_interp = false);
~Equation();
- friend class EquationFactory;
- friend class ObjectStore; // FIXME: remove this when factory is working
+ friend class ObjectStore;
QString _automaticDescriptiveName() const;
--- branches/work/kst/portto4/kst/src/libkstmath/image.cpp #821135:821136
@@ -47,74 +47,7 @@
}
-// Image::Image(ObjectStore *store, const QDomElement& e) : Relation(store, e) {
-// QString in_matrixName, in_paletteName;
-// bool in_hasColorMap = false, in_hasContourMap = false;
-// double in_zLower = 0, in_zUpper = 0;
-// _autoThreshold = false;
-//
-// /* parse the DOM tree */
-// QDomNode n = e.firstChild();
-// while( !n.isNull() ) {
-// QDomElement e = n.toElement(); // try to convert the node to an element.
-// if( !e.isNull() ) { // the node was really an element.
-// if (e.tagName() == "tag") {
-// setTagName(ObjectTag::fromString(e.text()));
-// } else if (e.tagName() == "matrixtag") {
-// in_matrixName = e.text();
-// } else if (e.tagName() == "legend") {
-// setLegendText(e.text());
-// } else if (e.tagName() == "palettename") {
-// in_paletteName = e.text();
-// } else if (e.tagName() == "lowerthreshold") {
-// in_zLower = e.text().toDouble();
-// } else if (e.tagName() == "upperthreshold") {
-// in_zUpper = e.text().toDouble();
-// } else if (e.tagName() == "hascolormap") {
-// in_hasColorMap = (e.text() != "0");
-// } else if (e.tagName() == "hascontourmap") {
-// in_hasContourMap = (e.text() != "0");
-// } else if (e.tagName() == "numcontourlines") {
-// _numContourLines = e.text().toInt();
-// } else if (e.tagName() == "contourcolor") {
-// _contourColor.setNamedColor(e.text());
-// } else if (e.tagName() == "contourweight") {
-// _contourWeight = e.text().toInt();
-// } else if (e.tagName() == "autothreshold") {
-// _autoThreshold = (e.text() != "0");
-// }
-//
-// }
-// n = n.nextSibling();
-// }
-//
-// _inputMatrixLoadQueue.append(qMakePair(QString(THEMATRIX), in_matrixName));
-//
-// _typeString = staticTypeString;
-// _type = "Image";
-// _hasColorMap = in_hasColorMap;
-// _hasContourMap = in_hasContourMap;
-// _zLower = in_zLower;
-// _zUpper = in_zUpper;
-//
-// if (_hasColorMap) {
-// _pal = Palette(in_paletteName);
-// }
-//
-// if (!_hasColorMap) {
-// setColorDefaults();
-// }
-// if (!_hasContourMap) {
-// setContourDefaults();
-// }
-// _shortName = "I"+QString::number(_inum);
-// if (_inum>max_inum)
-// max_inum = _inum;
-// _inum++;
-//
-// }
-
//constructor for colormap only
Image::Image(ObjectStore *store, MatrixPtr in_matrix, double lowerZ, double upperZ, bool autoThreshold, const QString &paletteName) : Relation(store) {
_inputMatrices[THEMATRIX] = in_matrix;
--- branches/work/kst/portto4/kst/src/libkstmath/image.h #821135:821136
@@ -125,7 +125,6 @@
const QColor& contourColor,
int contourWeight);
-// Image(ObjectStore *store, const QDomElement& e);
virtual ~Image();
friend class ObjectStore;
--- branches/work/kst/portto4/kst/src/libkstmath/psd.h #821135:821136
@@ -99,7 +99,6 @@
bool average, int average_len,
bool in_apodize, bool in_removeMean,
const QString& VUnits, const QString& RUnits, ApodizeFunction in_apodizeFxn = WindowOriginal, double in_gaussianSigma = 3.0, PSDType in_output = PSDAmplitudeSpectralDensity);
-// PSD(ObjectStore *store, const QDomElement& e);
virtual ~PSD();
friend class ObjectStore;
--- branches/work/kst/portto4/kst/src/libkstmath/relation.cpp #821135:821136
@@ -30,11 +30,6 @@
const QString Relation::staticTypeString = I18N_NOOP("Relation");
-// Relation::Relation(ObjectStore *store, const QDomElement& e) : Object() {
-// commonConstructor();
-// }
-
-
Relation::Relation(ObjectStore *store) : Object() {
commonConstructor();
}
--- branches/work/kst/portto4/kst/src/libkstmath/relation.h #821135:821136
@@ -72,7 +72,6 @@
const QString& typeString() const { return staticTypeString; }
Relation(ObjectStore *store);
-// Relation(ObjectStore *store, const QDomElement& e);
virtual ~Relation();
virtual void showNewDialog() { }
--- branches/work/kst/portto4/kst/src/plugins/sampleplugin/sampleplugin.h #821135:821136
@@ -21,12 +21,6 @@
Q_OBJECT
public:
- SamplePluginSource(Kst::ObjectStore *store);
-
- ~SamplePluginSource();
-
- virtual QString _automaticDescriptiveName() const;
-
Kst::VectorPtr vector() const;
virtual void change(Kst::DataObjectConfigWidget *configWidget);
@@ -42,6 +36,15 @@
virtual QStringList outputStringList() const;
virtual void saveProperties(QXmlStreamWriter &s);
+
+ protected:
+ SamplePluginSource(Kst::ObjectStore *store);
+ ~SamplePluginSource();
+
+ virtual QString _automaticDescriptiveName() const;
+
+ friend class Kst::ObjectStore;
+
};
More information about the Kst
mailing list