[Kst] extragear/graphics/kst/src/libkstmath
Adam Treat
treat at kde.org
Wed Nov 29 23:17:02 CET 2006
SVN commit 609261 by treat:
* Give a better default name to the outputs created by plugins when none
are specified by the user.
M +6 -3 kstbasicplugin.cpp
--- trunk/extragear/graphics/kst/src/libkstmath/kstbasicplugin.cpp #609260:609261
@@ -179,20 +179,23 @@
void KstBasicPlugin::setOutputVector(const QString &type, const QString &name) {
- KstVectorPtr v = new KstVector(name, 0, this, false);
+ QString txt = !name.isEmpty() ? name : propertyString() + " " + type;
+ KstVectorPtr v = new KstVector(txt, 0, this, false);
_outputVectors.insert(type, v);
KST::addVectorToList(v);
}
void KstBasicPlugin::setOutputScalar(const QString &type, const QString &name) {
- KstScalarPtr s = new KstScalar(name, this);
+ QString txt = !name.isEmpty() ? name : propertyString() + " " + type;
+ KstScalarPtr s = new KstScalar(txt, this);
_outputScalars.insert(type, s);
}
void KstBasicPlugin::setOutputString(const QString &type, const QString &name) {
- KstStringPtr s = new KstString(name, this);
+ QString txt = !name.isEmpty() ? name : propertyString() + " " + type;
+ KstStringPtr s = new KstString(txt, this);
_outputStrings.insert(type, s);
}
More information about the Kst
mailing list