[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Thu Oct 4 17:34:27 UTC 2012
SVN commit 1319235 by netterfield:
BUG: 307726
Enable renaming of plugins.
M +6 -0 libkstapp/basicplugindialog.cpp
M +5 -0 libkstapp/filterfitdialog.cpp
M +6 -1 libkstmath/basicpluginfactory.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/basicplugindialog.cpp #1319234:1319235
@@ -98,6 +98,12 @@
if (BasicPlugin* plugin = kst_cast<BasicPlugin>(dataObject())) {
plugin->writeLock();
plugin->change(_basicPluginTab->configWidget());
+ if (DataDialog::tagStringAuto()) {
+ plugin->setDescriptiveName(QString());
+ } else {
+ plugin->setDescriptiveName(DataDialog::tagString());
+ }
+
plugin->registerChange();
plugin->unlock();
}
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.cpp #1319234:1319235
@@ -306,6 +306,11 @@
if (BasicPlugin* plugin = kst_cast<BasicPlugin>(dataObject())) {
plugin->writeLock();
plugin->change(_filterFitTab->configWidget());
+ if (DataDialog::tagStringAuto()) {
+ plugin->setDescriptiveName(QString());
+ } else {
+ plugin->setDescriptiveName(DataDialog::tagString());
+ }
plugin->registerChange();
plugin->unlock();
}
--- branches/work/kst/portto4/kst/src/libkstmath/basicpluginfactory.cpp #1319234:1319235
@@ -34,15 +34,18 @@
DataObjectConfigWidget* configWidget;
QString pluginName;
+ QString descriptiveName;
BasicPluginPtr dataObject;
bool validTag;
-
while (!xml.atEnd()) {
const QString n = xml.name().toString();
if (xml.isStartElement()) {
if (n == BasicPlugin::staticTypeTag) {
QXmlStreamAttributes attrs = xml.attributes();
pluginName = attrs.value("type").toString();
+ if (attrs.value("descriptiveNameIsManual").toString() == "true") {
+ descriptiveName = attrs.value("descriptiveName").toString();
+ }
Object::processShortNameIndexAttributes(attrs);
configWidget = DataObject::pluginWidget(pluginName);
@@ -135,6 +138,8 @@
return 0;
}
+ dataObject->setDescriptiveName(descriptiveName);
+
dataObject->writeLock();
dataObject->registerChange();
dataObject->unlock();
More information about the Kst
mailing list