[Kst] branches/work/kst/portto4/kst

Barth Netterfield netterfield at astro.utoronto.ca
Fri Sep 14 23:26:53 UTC 2012


SVN commit 1316329 by netterfield:

A collection of little (but possibly important) changes.

Add CumulativeAverage plugin.

Creating a new plot from a data object dialog in 'collumns' mode didn't
work.  This fixes it.

The name for statistics plugin objects was terrible.  This improves it.

Properly save plugins and other data objects in the kst file.

Creating a plugin from the create menu now doesn't create a curve - just
the plugin.

Revert change to cumulative sum plugin: It should be a 'filter' plugin.

The last two items will be further discussed on the list.


 M  +1 -0      cmake/src/plugins/CMakeLists.txt  
 M  +3 -0      src/libkstapp/curvedialog.cpp  
 M  +2 -1      src/libkstapp/document.cpp  
 M  +3 -0      src/libkstapp/equationdialog.cpp  
 M  +5 -0      src/libkstapp/filterfitdialog.cpp  
 M  +3 -0      src/libkstapp/histogramdialog.cpp  
 M  +3 -0      src/libkstapp/imagedialog.cpp  
 M  +3 -0      src/libkstapp/powerspectrumdialog.cpp  
 M  +1 -1      src/plugins/dataobject/statistics/statistics.cpp  
 A             src/plugins/filters/cumulativeaverage (directory)  
 A             src/plugins/filters/cumulativeaverage/cumulativeaverage.cpp   [License: GPL (v2+)]
 A             src/plugins/filters/cumulativeaverage/cumulativeaverage.h   [License: GPL (v2+)]
 A             src/plugins/filters/cumulativeaverage/cumulativeaverage.pro  
 AM            src/plugins/filters/cumulativeaverage/cumulativeaverageconfig.ui  
 A             src/plugins/filters/cumulativeaverage/kstplugin_cumulativeaverage.desktop  
 M  +1 -1      src/plugins/filters/cumulativesum/cumulativesum.h  
 M  +2 -1      src/plugins/filters/filters.pro  


--- branches/work/kst/portto4/kst/cmake/src/plugins/CMakeLists.txt #1316328:1316329
@@ -18,6 +18,7 @@
 kst_add_plugin(dataobject genericfilter)
 
 kst_add_plugin(filters cumulativesum)
+kst_add_plugin(filters cumulativeaverage)
 kst_add_plugin(filters despike)
 kst_add_plugin(filters differentiation)
 
--- branches/work/kst/portto4/kst/src/libkstapp/curvedialog.cpp #1316328:1316329
@@ -466,9 +466,12 @@
 
           if (_curveTab->curvePlacement()->place() != CurvePlacement::ExistingPlot) {
               plotItem->view()->appendToLayout(_curveTab->curvePlacement()->layout(), plotItem, _curveTab->curvePlacement()->gridColumns());
+              if (_curveTab->curvePlacement()->layout() == CurvePlacement::Custom) {
+                plotItem->createCustomLayout(_curveTab->curvePlacement()->gridColumns());
           }
       }
   }
+  }
 
   return ObjectPtr(curve.data());
 }
--- branches/work/kst/portto4/kst/src/libkstapp/document.cpp #1316328:1316329
@@ -60,6 +60,7 @@
 ObjectList<DataObject> Document::sortedDataObjectList() {
   ObjectList<DataObject> sorted;
   ObjectList<DataObject> raw = objectStore()->getObjects<DataObject>();
+
   sorted.clear();
 
 
@@ -82,7 +83,7 @@
   // or whose inputs have parents which are already in the sorted list.
   // do this at most n^2 times, which is worse than worse case.
   int i=0;
-  while (!raw.isEmpty() && (++i < n*n)) {
+  while (!raw.isEmpty() && (++i <= n*n)) {
     DataObjectPtr D = raw.takeFirst();
     if (D->inputFlagsSet()) {
       D->setOutputFlags(true);
--- branches/work/kst/portto4/kst/src/libkstapp/equationdialog.cpp #1316328:1316329
@@ -373,9 +373,12 @@
 
           if (_equationTab->curvePlacement()->place() != CurvePlacement::ExistingPlot) {
               plotItem->view()->appendToLayout(_equationTab->curvePlacement()->layout(), plotItem, _equationTab->curvePlacement()->gridColumns());
+              if (_equationTab->curvePlacement()->layout() == CurvePlacement::Custom) {
+                plotItem->createCustomLayout(_equationTab->curvePlacement()->gridColumns());
           }
       }
   }
+  }
 
   return ObjectPtr(equation.data());
 }
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.cpp #1316328:1316329
@@ -41,6 +41,8 @@
   _curveAppearance->setVisible(false);
   _curvePlacement->setVisible(false);
   _ignoreAutoScale->setVisible(false);
+  _curvePlacement->setPlace(CurvePlacement::NoPlot);
+
   pluginChanged(pluginName);
   connect(_pluginCombo, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(pluginChanged(const QString&)));
 }
@@ -235,6 +237,9 @@
           }
           plotItem->view()->appendToLayout(_filterFitTab->curvePlacement()->layout(), plotItem,
                                            _filterFitTab->curvePlacement()->gridColumns());
+          if (_filterFitTab->curvePlacement()->layout() == CurvePlacement::Custom) {
+            plotItem->createCustomLayout(_filterFitTab->curvePlacement()->gridColumns());
+          }
           break;
       }
       default:
--- branches/work/kst/portto4/kst/src/libkstapp/histogramdialog.cpp #1316328:1316329
@@ -437,9 +437,12 @@
 
           if (_histogramTab->curvePlacement()->place() != CurvePlacement::ExistingPlot) {
               plotItem->view()->appendToLayout(_histogramTab->curvePlacement()->layout(), plotItem, _histogramTab->curvePlacement()->gridColumns());
+              if (_histogramTab->curvePlacement()->layout() == CurvePlacement::Custom) {
+                plotItem->createCustomLayout(_histogramTab->curvePlacement()->gridColumns());
           }
       }
   }
+  }
   return ObjectPtr(histogram.data());
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/imagedialog.cpp #1316328:1316329
@@ -506,9 +506,12 @@
 
           if (_imageTab->curvePlacement()->place() != CurvePlacement::ExistingPlot) {
               plotItem->view()->appendToLayout(_imageTab->curvePlacement()->layout(), plotItem, _imageTab->curvePlacement()->gridColumns());
+              if (_imageTab->curvePlacement()->layout() == CurvePlacement::Custom) {
+                plotItem->createCustomLayout(_imageTab->curvePlacement()->gridColumns());
           }
       }
   }
+  }
 
   return ObjectPtr(image.data());
 }
--- branches/work/kst/portto4/kst/src/libkstapp/powerspectrumdialog.cpp #1316328:1316329
@@ -286,9 +286,12 @@
 
           if (_powerSpectrumTab->curvePlacement()->place() != CurvePlacement::ExistingPlot) {
               plotItem->view()->appendToLayout(_powerSpectrumTab->curvePlacement()->layout(), plotItem, _powerSpectrumTab->curvePlacement()->gridColumns());
+              if (_powerSpectrumTab->curvePlacement()->layout() == CurvePlacement::Custom) {
+                plotItem->createCustomLayout(_powerSpectrumTab->curvePlacement()->gridColumns());
           }
       }
   }
+  }
 
   return ObjectPtr(powerspectrum.data());
 }
--- branches/work/kst/portto4/kst/src/plugins/dataobject/statistics/statistics.cpp #1316328:1316329
@@ -109,7 +109,7 @@
 
 
 QString StatisticsSource::_automaticDescriptiveName() const {
-  return QString("Statistics Plugin Object");
+  return _inputVectors[VECTOR_IN]->descriptiveName() + QString("Statistics");
 }
 
 
--- branches/work/kst/portto4/kst/src/plugins/filters/cumulativesum/cumulativesum.h #1316328:1316329
@@ -65,7 +65,7 @@
     virtual QString pluginName() const;
     virtual QString pluginDescription() const;
 
-    virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Generic; }
+    virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Filter; }
 
     virtual bool hasConfigWidget() const { return true; }
 
--- branches/work/kst/portto4/kst/src/plugins/filters/filters.pro #1316328:1316329
@@ -6,7 +6,8 @@
 SUBDIRS += \
     despike \
     cumulativesum \
-    differentiation
+    differentiation \
+    cumulativeaverage
 
 LibExists(gsl) {
      SUBDIRS += butterworth_bandpass \


More information about the Kst mailing list