[Kst] extragear/graphics/kst/src/libkstapp

Barth Netterfield netterfield at astro.utoronto.ca
Sat Oct 7 00:54:42 CEST 2006


SVN commit 593159 by netterfield:

Some cleanups to image color scale stepping.



 M  +9 -17     kst2dplot.cpp  
 M  +2 -3      kst2dplot.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #593158:593159
@@ -908,13 +908,6 @@
   _yScaleMode = scalemode_in;
 }
 
-void Kst2DPlot::autoSetColorScaleSpikeInsensitive(double per) {
-  KstImageList images = kstObjectSubList<KstBaseCurve,KstImage>(Curves);
-  for (KstImageList::Iterator i = images.begin(); i != images.end(); ++i) {
-    (*i)->setThresholdToSpikeInsensitive(per);
-  }
-}
-
 bool Kst2DPlot::addCurve(KstBaseCurvePtr incurve) {
   if (!Curves.contains(incurve)) {
     Curves.append(incurve);
@@ -3370,9 +3363,6 @@
     case ZOOM_XY_MODES:
       setXScaleMode(mode);
       setYScaleMode(modeExtra);
-//       if (modeExtra==NOSPIKE) { // guess this is what they wanted...
-//         autoSetColorScaleSpikeInsensitive();
-//       }
       break;
     case ZOOM_Y_LOCAL_MAX:
       zoomSelfYLocalMax(false);
@@ -3521,7 +3511,7 @@
                         this, SLOT(menuYLogSlot()), Key_L);
   submenu->insertSeparator();
   submenu->insertItem(i18n("Next &Image Color Scale"),
-                      this, SLOT(menuNextColorScale()), Key_I);
+                      this, SLOT(menuNextImageColorScale()), Key_I);
   
   submenu = new KPopupMenu(menu);
   menu->insertItem(i18n("&Scroll"), submenu);
@@ -4634,9 +4624,9 @@
   }
 }
 
-void Kst2DPlot::menuNextColorScale() {
+void Kst2DPlot::menuNextImageColorScale() {
   if (_menuView) {
-    nextColorScale();
+    nextImageColorScale();
     _menuView->paint();
   }
 }
@@ -5128,18 +5118,20 @@
 void Kst2DPlot::zoomSpikeInsensitiveMax(KstViewWidget *view) {
   setXScaleMode(NOSPIKE);
   setYScaleMode(NOSPIKE);
-  //autoSetColorScaleSpikeInsensitive();
   KstApp::inst()->tiedZoomMode(ZOOM_XY_MODES, true, 0.0, NOSPIKE, NOSPIKE, view, tagName());
   pushScale();
   setDirty();
 }
 
-void Kst2DPlot::nextColorScale() {
+void Kst2DPlot::nextImageColorScale() {
   const double per[5] = {0.0, 0.0001, 0.001, 0.005, 0.02};
   if (++_i_per>=5) {
     _i_per = 0;
   }
-  autoSetColorScaleSpikeInsensitive(per[_i_per]);
+  KstImageList images = kstObjectSubList<KstBaseCurve,KstImage>(Curves);
+  for (KstImageList::Iterator i = images.begin(); i != images.end(); ++i) {
+    (*i)->setThresholdToSpikeInsensitive(per[_i_per]);
+  }
 }
 
 void Kst2DPlot::keyPressEvent(QWidget *vw, QKeyEvent *e) {
@@ -5205,7 +5197,7 @@
       zoomSpikeInsensitiveMax(view);
       break;
     case Key_I:
-      nextColorScale();
+      nextImageColorScale();
       break;
     case Key_Z:
       zoomToggle();
--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.h #593158:593159
@@ -124,8 +124,7 @@
   void clearCurves();
   void setXScaleMode(KstScaleModeType scalemode);
   void setYScaleMode(KstScaleModeType scalemode);
-  void autoSetColorScaleSpikeInsensitive(double per);
-  void nextColorScale();
+  void nextImageColorScale();
 
   void pushAdjustLineWidth(int adjustment);
   void popLineWidth();
@@ -432,7 +431,7 @@
   void menuZoomSpikeInsensitiveMax();
   void menuNextMarker();
   void menuPrevMarker();
-  void menuNextColorScale();
+  void menuNextImageColorScale();
 
   void timezoneChanged(const QString& tz, int utcOffset);
 


More information about the Kst mailing list