[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Wed Apr 6 07:34:50 CEST 2005
CVS commit by staikos:
- add missing support for loading string inputs/outputs
- set provider on scalars and strings
M +24 -1 kstplugin.cpp 1.96
--- kdeextragear-2/kst/kst/kstplugin.cpp #1.95:1.96
@@ -61,4 +61,6 @@ KstPlugin::KstPlugin(const QDomElement &
} else if (e.tagName() == "iscalar") {
_inputScalarLoadQueue.append(qMakePair(e.attribute("name"), e.text()));
+ } else if (e.tagName() == "istring") {
+ _inputStringLoadQueue.append(qMakePair(e.attribute("name"), e.text()));
} else if (e.tagName() == "ovector") {
KstVectorPtr v;
@@ -72,5 +74,15 @@ KstPlugin::KstPlugin(const QDomElement &
KST::addVectorToList(v);
} else if (e.tagName() == "oscalar") {
- _outputScalars.insert(e.attribute("name"), new KstScalar(e.text()));
+ KstScalarPtr sp = new KstScalar(e.text());
+ sp->writeLock();
+ sp->setProvider(this);
+ sp->writeUnlock();
+ _outputScalars.insert(e.attribute("name"), sp);
+ } else if (e.tagName() == "ostring") {
+ KstStringPtr sp = new KstString(e.text());
+ sp->writeLock();
+ sp->setProvider(this);
+ sp->writeUnlock();
+ _outputStrings.insert(e.attribute("name"), sp);
}
}
@@ -125,4 +137,7 @@ KstPlugin::KstPlugin(const QDomElement &
if (!_outputScalars.contains((*it)._name)) {
KstScalarPtr s = new KstScalar(tagName() + " scalar - " + (*it)._name);
+ s->writeLock();
+ s->setProvider(this);
+ s->writeUnlock();
_outputScalars.insert((*it)._name, s);
}
@@ -131,4 +146,7 @@ KstPlugin::KstPlugin(const QDomElement &
if (!_outputStrings.contains((*it)._name)) {
KstStringPtr s = new KstString(tagName() + " string - " + (*it)._name);
+ s->writeLock();
+ s->setProvider(this);
+ s->writeUnlock();
_outputStrings.insert((*it)._name, s);
}
@@ -384,4 +402,7 @@ KstObject::UpdateType KstPlugin::update(
if (!_outputScalars.contains(paramName)) {
KstScalarPtr s = new KstScalar(scalarName);
+ s->writeLock();
+ s->setProvider(this);
+ s->writeUnlock();
_outputScalars.insert(paramName, s);
}
@@ -560,4 +581,5 @@ bool KstPlugin::setPlugin(KstSharedPtr<P
KstScalarPtr s = new KstScalar;
s->writeLock();
+ s->setProvider(this);
_outputScalars.insert((*it)._name, s);
_outScalarCnt++;
@@ -565,4 +587,5 @@ bool KstPlugin::setPlugin(KstSharedPtr<P
KstStringPtr s = new KstString;
s->writeLock();
+ s->setProvider(this);
_outputStrings.insert((*it)._name, s);
_outStringCnt++;
More information about the Kst
mailing list