[Kst] kdeextragear-2/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Wed Mar 3 15:05:49 CET 2004
CVS commit by netterfield:
automatic default names get inserted in the plugin dialog if the user
applies without entering a name.
M +19 -14 kst/kstplugindialog_i.cpp 1.56
M +10 -0 kst/kstview.cpp 1.80
M +2 -2 kst/plugin.h 1.16
M +1 -2 kst/pluginxmlparser.cpp 1.14
M +1 -1 plugins/Makefile.am 1.10
M +1 -1 plugins/linefit/linefit.xml 1.4
--- kdeextragear-2/kst/kst/kstplugindialog_i.cpp #1.55:1.56
@@ -230,9 +230,11 @@ void KstPluginDialogI::update(int new_in
if (field) {
QLineEdit *li = static_cast<QLineEdit*>(field);
+ QString ts;
if ((*it)._type == Plugin::Data::IOValue::TableType) { // vector
- li->setText(plugin->outputVectors()[(*it)._name]->tagName());
+ ts = plugin->outputVectors()[(*it)._name]->tagName();
} else { // scalar
- li->setText(plugin->outputScalars()[(*it)._name]->tagName());
+ ts = plugin->outputScalars()[(*it)._name]->tagName();
}
+ li->setText(ts);
}
}
@@ -291,6 +294,9 @@ bool KstPluginDialogI::saveOutputs(KstPl
if (li->text().isEmpty()) {
- KMessageBox::sorry(this, i18n("The field %1 is empty. Not saving.").arg((*it)._name));
- return false;
+ QString tagName = Select->currentText();
+ if (tagName.endsWith(newPluginString)) {
+ tagName = plugin->tagName();
+ }
+ li->setText(tagName+"-"+(*it)._name);
}
@@ -341,8 +347,4 @@ void KstPluginDialogI::new_I() {
plugin->setPlugin(pPtr);
- if (!saveOutputs(plugin, pPtr)) {
- return;
- }
-
if (tagName.endsWith(newPluginString)) {
QString tmpTagName;
@@ -354,4 +356,7 @@ void KstPluginDialogI::new_I() {
}
plugin->setTagName(tagName);
+ if (!saveOutputs(plugin, pPtr)) {
+ return;
+ }
}
}
--- kdeextragear-2/kst/kst/kstview.cpp #1.79:1.80
@@ -1056,4 +1056,6 @@ void KstView::zoomOutSlot() {
KstPlot *plot, *iplot;
+ if (count<1) return;
+
plot = KST::plotList.at(MouseInfo->getPlotNum());
plot->getLScale(xmin, ymin, xmax, ymax);
@@ -1085,4 +1087,6 @@ void KstView::xzoomInSlot() {
KstPlot *plot, *iplot;
+ if (count<1) return;
+
plot = KST::plotList.at(MouseInfo->getPlotNum());
plot->getLScale(xmin, ymin, xmax, ymax);
@@ -1215,4 +1219,6 @@ void KstView::moveVertical(bool up) {
KstPlot *plot, *iplot;
+ if (KST::plotList.count()<1) return;
+
plot = KST::plotList.at(MouseInfo->getPlotNum());
plot->getLScale(xmin, ymin, xmax, ymax);
@@ -1268,4 +1274,6 @@ void KstView::moveHorizontal(bool left)
KstPlot *plot, *iplot;
+ if (count<1) return;
+
plot = KST::plotList.at(MouseInfo->getPlotNum());
plot->getLScale(xmin, ymin, xmax, ymax);
@@ -1310,4 +1318,6 @@ void KstView::logSlot(bool x) {
bool xLog, yLog;
+ if (count<1) return;
+
plot = KST::plotList.at(MouseInfo->getPlotNum());
if (!plot) {
--- kdeextragear-2/kst/kst/pluginxmlparser.cpp #1.13:1.14
@@ -16,4 +16,5 @@
***************************************************************************/
+#include <stdio.h>
#include "pluginxmlparser.h"
--- kdeextragear-2/kst/plugins/Makefile.am #1.9:1.10
@@ -9,3 +9,3 @@
endif
-SUBDIRS=linefit autocorrelation crosscorrelation periodogram phase statistics chop $(FITS_SUBDIR) $(FITSNONLINEAR_SUBDIR) $(INTERPOLATIONS_SUBDIR) editor
+SUBDIRS=ACFilters linefit autocorrelation crosscorrelation periodogram phase statistics chop $(FITS_SUBDIR) $(FITSNONLINEAR_SUBDIR) $(INTERPOLATIONS_SUBDIR) editor
--- kdeextragear-2/kst/plugins/linefit/linefit.xml #1.3:1.4
@@ -31,5 +31,5 @@
</output>
<output>
-<float name="chi^2" descr="The chi-square result of the interpolation." />
+<float name="chi^2" descr="The chi-square result of the interpolation."/>
</output>
</interface>
More information about the Kst
mailing list