[Kst] kdeextragear-2/kst

George Staikos staikos at kde.org
Wed Jun 30 20:37:51 CEST 2004


CVS commit by staikos: 

zoom pause implemented


  M +0 -2      devel-docs/RELEASE_PLAN-0.98   1.6
  M +15 -0     kst/kst2dplot.cpp   1.125
  M +1 -0      kst/kst2dplot.h   1.52


--- kdeextragear-2/kst/devel-docs/RELEASE_PLAN-0.98  #1.5:1.6
@@ -6,6 +6,4 @@
 - data object dialogs are possibly buggy
 - plot columns have to be polished, implemented, and completed
-- zoom boxes don't work on updating data! (George)
-        - zoom should do temporary pause
 - Kst Settings don't work
 - do events work?

--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.124:1.125
@@ -199,4 +199,5 @@ void Kst2DPlot::commonConstructor(const 
                                 bool x_log,
                                 bool y_log) {
+  _zoomPaused = false;
   _dirty = true;
   _oldSize.setWidth(0);
@@ -902,4 +903,8 @@ void Kst2DPlot::paint(KstPaintType type,
   bool doDraw = false;
 
+  if (_zoomPaused) {
+    return;
+  }
+
   if (type == P_PAINT) {
     if (_oldSize == size()) {
@@ -951,4 +956,8 @@ void Kst2DPlot::paint(KstPaintType type,
 
 void Kst2DPlot::draw() {
+  if (_zoomPaused) {
+    return;
+  }
+
   _buffer.buffer().resize(size());
   _buffer.buffer().fill(backgroundColor());
@@ -960,4 +969,8 @@ void Kst2DPlot::draw(QPainter &p) {
 /* Draws to the buffer */
 
+  if (_zoomPaused) {
+    return;
+  }
+
   double in_xleft_bdr_px = KST::alignment.x(size());
 
@@ -2288,4 +2301,5 @@ void Kst2DPlot::mousePressEvent(QWidget 
           _mouse.plotGeometry = GetPlotRegion();
           _mouse.zoomStart(_mouse.mode, e->pos());
+          _zoomPaused = true;
         }
       }
@@ -2328,4 +2342,5 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
   bool doUpdate = false;
 
+  _zoomPaused = false;
   static_cast<KstViewWidget*>(view)->viewObject()->releaseMouse(this);
 

--- kdeextragear-2/kst/kst/kst2dplot.h  #1.51:1.52
@@ -258,4 +258,5 @@ private:
   bool _hasFocus : 1;
   bool _dirty : 1;
+  bool _zoomPaused : 1;
 
   int _draggableLabel : 15; // I think this should be enough





More information about the Kst mailing list